diff --git a/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_content_list.json b/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d2d9130d00a97f50a26461b721815635c660cda4 --- /dev/null +++ b/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fc8c1676acaf10e7a4745a4d238989ca39b96e905c3b5958f0a43e018423b7c +size 76667 diff --git a/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_model.json b/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_model.json new file mode 100644 index 0000000000000000000000000000000000000000..15e226f6615d36e2bcd5a2b99e1f0efb857d2a4b --- /dev/null +++ b/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7c981de5d98aa394ac7d538c8e0615551db43c9ac262fc65ee7c2ef7ec76225 +size 97032 diff --git a/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_origin.pdf b/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6ff0e65dab13a80ec0c44fc26a43a8ee2bfb31b0 --- /dev/null +++ b/ghostnetmorefeaturesfromcheapoperations/0b1360cb-d641-41c4-85f9-7e11897bad66_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54468cb3ccbfb6ddceb089165dcda5048b087964e4ae8b1ef5f4a74b064f0b4f +size 473897 diff --git a/ghostnetmorefeaturesfromcheapoperations/full.md b/ghostnetmorefeaturesfromcheapoperations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6886deb8c4163fda8e012f23123c5e2f38d08235 --- /dev/null +++ b/ghostnetmorefeaturesfromcheapoperations/full.md @@ -0,0 +1,302 @@ +# GhostNet: More Features from Cheap Operations + +Kai Han $^{1}$ Yunhe Wang $^{1}$ Qi Tian $^{1*}$ Jianyuan Guo $^{2}$ Chunjing Xu $^{1}$ Chang Xu $^{3}$ $^{1}$ Noah's Ark Lab, Huawei Technologies. $^{2}$ Peking University. + $^{3}$ School of Computer Science, Faculty of Engineering, University of Sydney. + +{kai.han,yunhe.wang,tian.qil,xuchunjing}@huawei.com jyguo@pku.edu.cn c.xu@sydney.edu.au + +# Abstract + +Deploying convolutional neural networks (CNNs) on embedded devices is difficult due to the limited memory and computation resources. The redundancy in feature maps is an important characteristic of those successful CNNs, but has rarely been investigated in neural architecture design. This paper proposes a novel Ghost module to generate more feature maps from cheap operations. Based on a set of intrinsic feature maps, we apply a series of linear transformations with cheap cost to generate many ghost feature maps that could fully reveal information underlying intrinsic features. The proposed Ghost module can be taken as a plug-and-play component to upgrade existing convolutional neural networks. Ghost bottlenecks are designed to stack Ghost modules, and then the lightweight Ghost-Net can be easily established. Experiments conducted on benchmarks demonstrate that the proposed Ghost module is an impressive alternative of convolution layers in baseline models, and our GhostNet can achieve higher recognition performance (e.g. $75.7\%$ top-1 accuracy) than MobileNetV3 with similar computational cost on the ImageNet ILSVRC2012 classification dataset. Code is available at https://github.com/huawei-noah/ghostnet. + +# 1. Introduction + +Deep convolutional neural networks have shown excellent performance on various computer vision tasks, such as image recognition [30, 13], object detection [43, 33], and semantic segmentation [4]. Traditional CNNs usually need a large number of parameters and floating point operations (FLOPs) to achieve a satisfactory accuracy, e.g. ResNet-50 [16] has about $25.6\mathrm{M}$ parameters and requires 4.1B FLOPs to process an image of size $224 \times 224$ . Thus, the recent trend of deep neural network design is to explore portable and efficient network architectures with acceptable performance for mobile devices (e.g. smart phones and self-driving cars). + +![](images/deeb198a1ecfaa3568c7969d08ad9c4ce24ac54d0f788e6cefc39b302cdff69e.jpg) +Figure 1. Visualization of some feature maps generated by the first residual group in ResNet-50, where three similar feature map pair examples are annotated with boxes of the same color. One feature map in the pair can be approximately obtained by transforming the other one through cheap operations (denoted by spanners). + +Over the years, a series of methods have been proposed to investigate compact deep neural networks such as network pruning [14, 39], low-bit quantization [42, 26], knowledge distillation [19, 57], etc. Han et al. [14] proposed to prune the unimportant weights in neural networks. [31] utilized $\ell_1$ -norm regularization to prune filters for efficient CNNs. [42] quantized the weights and the activations to 1-bit data for achieving large compression and speed-up ratios. [19] introduced knowledge distillation for transferring knowledge from a larger model to a smaller model. However, performance of these methods are often upper bounded by pre-trained deep neural networks that have been taken as their baselines. + +Besides them, efficient neural architecture design has a very high potential for establishing highly efficient deep networks with fewer parameters and calculations, and recently has achieved considerable success. This kind of methods can also provide new search unit for automatic search methods [62, 55, 5]. For instance, MobileNet [21, 44, 20] utilized the depthwise and pointwise convolutions to construct a unit for approximating the original convolutional layer with larger filters and achieved comparable performance. ShuffleNet [61, 40] further explored a channel shuffle operation + +to enhance the performance of lightweight models. + +Abundant and even redundant information in the feature maps of well-trained deep neural networks often guarantees a comprehensive understanding of the input data. For example, Figure 1 presents some feature maps of an input image generated by ResNet-50, and there exist many similar pairs of feature maps, like a ghost of each another. Redundancy in feature maps could be an important characteristic for a successful deep neural network. Instead of avoiding the redundant feature maps, we tend to embrace them, but in a cost-efficient way. + +In this paper, we introduce a novel Ghost module to generate more features by using fewer parameters. Specifically, an ordinary convolutional layer in deep neural networks will be split into two parts. The first part involves ordinary convolutions but their total number will be rigorously controlled. Given the intrinsic feature maps from the first part, a series of simple linear operations are then applied for generating more feature maps. Without changing the size of output feature map, the overall required number of parameters and computational complexities in this Ghost module have been decreased, compared with those in vanilla convolutional neural networks. Based on Ghost module, we establish an efficient neural architecture, namely, GhostNet. We first replace original convolutional layers in benchmark neural architectures to demonstrate the effectiveness of Ghost modules, and then verify the superiority of our GhostNets on several benchmark visual datasets. Experimental results show that, the proposed Ghost module is able to decrease computational costs of generic convolutional layer while preserving similar recognition performance, and GhostNets can surpass state-of-the-art efficient deep models such as MobileNetV3 [20], on various tasks with fast inference on mobile devices. + +The rest of the paper is organized as follows: section 2 briefly concludes the related work in the area, followed by the proposed Ghost module and GhostNet in section 3, the experiments and analysis in section 4, and finally, conclusion in section 5. + +# 2. Related Work + +Here we revisit the existing methods for lightening neural networks in two parts: model compression and compact model design. + +# 2.1. Model Compression + +For a given neural network, model compression aims to reduce the computation, energy and storage cost [14, 48, 11, 54]. Pruning connections [15, 14, 50] cuts out the unimportant connections between neurons. Channel pruning [51, 18, 31, 39, 59, 23, 35] further targets on removing useless channels for easier acceleration in practice. Model quantization [42, 24, 26] represents weights or activations + +in neural networks with discrete values for compression and calculation acceleration. Specifically, binarization methods [24, 42, 38, 45] with only 1-bit values can extremely accelerate the model by efficient binary operations. Tensor decomposition [27, 9] reduces the parameters or computation by exploiting the redundancy and low-rank property in weights. Knowledge distillation [19, 12, 3] utilizes larger models to teach smaller ones, which improves the performance of smaller models. The performances of these methods usually depend on the given pre-trained models. The improvement on basic operations and architectures will make them go further. + +# 2.2. Compact Model Design + +With the need for deploying neural networks on embedded devices, a series of compact models are proposed in recent years [7, 21, 44, 20, 61, 40, 53, 56]. Xception [7] utilizes depthwise convolution operation for more efficient use of model parameters. MobileNets [21] are a series of light weight deep neural networks based on depthwise separable convolutions. MobileNetV2 [44] proposes inverted residual block and MobileNetV3 [20] further utilizes AutoML technology [62, 55, 10] achieving better performance with fewer FLOPs. ShuffleNet [61] introduces channel shuffle operation to improve the information flow exchange between channel groups. ShuffleNetV2 [40] further considers the actual speed on target hardware for compact model design. Although these models obtain great performance with very few FLOPs, the correlation and redundancy between feature maps has never been well exploited. + +# 3. Approach + +In this section, we will first introduce the Ghost module to utilize a few small filters to generate more feature maps from the original convolutional layer, and then develop a new GhostNet with an extremely efficient architecture and high performance. + +# 3.1. Ghost Module for More Features + +Deep convolutional neural networks [30, 46, 16] often consist of a large number of convolutions that results in massive computational costs. Although recent works such as MobileNet [21, 44] and ShuffleNet [40] have introduced depthwise convolution or shuffle operation to build efficient CNNs using smaller convolution filters (floating-number operations), the remaining $1 \times 1$ convolution layers would still occupy considerable memory and FLOPs. + +Given the widely existing redundancy in intermediate feature maps calculated by mainstream CNNs as shown in Figure 1, we propose to reduce the required resources, i.e. convolution filters used for generating them. In practice, given the input data $X \in \mathbb{R}^{c \times h \times w}$ , where $c$ is the number of input channels and $h$ and $w$ are the height and width of + +the input data, respectively, the operation of an arbitrary convolutional layer for producing $n$ feature maps can be formulated as + +$$ +Y = X * f + b, \tag {1} +$$ + +where $*$ is the convolution operation, $b$ is the bias term, $Y\in \mathbb{R}^{h^{\prime}\times w^{\prime}\times n}$ is the output feature map with $n$ channels, and $f\in \mathbb{R}^{c\times k\times k\times n}$ is the convolution filters in this layer. In addition, $h^\prime$ and $w^{\prime}$ are the height and width of the output data, and $k\times k$ is the kernel size of convolution filters $f$ , respectively. During this convolution procedure, the required number of FLOPs can be calculated as $n\cdot h^{\prime}\cdot w^{\prime}\cdot c\cdot k\cdot k$ , which is often as large as hundreds of thousands since the number of filters $n$ and the channel number $c$ are generally very large (e.g. 256 or 512). + +![](images/493d3eb8674a83e95cb4b0dbc9affca672b6a498b4cb5a89f15410314572bf6b.jpg) +(a) The convolutional layer. + +![](images/68974320b4fc48f78cd0f4bc9ee1da3c7182c9ac806fb3e7392e74e72e64cf89.jpg) +(b) The Ghost module. +Figure 2. An illustration of the convolutional layer and the proposed Ghost module for outputting the same number of feature maps. $\Phi$ represents the cheap operation. + +According to Eq. 1, the number of parameters (in $f$ and $b$ ) to be optimized is explicitly determined by the dimensions of input and output feature maps. As observed in Figure 1, the output feature maps of convolutional layers often contain much redundancy, and some of them could be similar with each other. We point out that it is unnecessary to generate these redundant feature maps one by one with large number of FLOPs and parameters. Suppose that the output feature maps are "ghosts" of a handful of intrinsic feature maps with some cheap transformations. These intrinsic feature maps are often of smaller size and produced by ordinary convolution filters. Specifically, $m$ intrinsic feature maps $Y' \in \mathbb{R}^{h' \times w' \times m}$ are generated using a primary convolution: + +$$ +Y ^ {\prime} = X * f ^ {\prime}, \tag {2} +$$ + +where $f' \in \mathbb{R}^{c \times k \times k \times m}$ is the utilized filters, $m \leq n$ and the bias term is omitted for simplicity. The hyper-parameters + +such as filter size, stride, padding, are the same as those in the ordinary convolution (Eq. 1) to keep the spatial size (i.e. $h'$ and $w'$ ) of the output feature maps consistent. To further obtain the desired $n$ feature maps, we propose to apply a series of cheap linear operations on each intrinsic feature in $Y'$ to generate $s$ ghost features according to the following function: + +$$ +y _ {i j} = \Phi_ {i, j} \left(y _ {i} ^ {\prime}\right), \quad \forall i = 1, \dots , m, \quad j = 1, \dots , s, \tag {3} +$$ + +where $y_{i}^{\prime}$ is the $i$ -th intrinsic feature map in $Y^{\prime}$ , $\Phi_{i,j}$ in the above function is the $j$ -th (except the last one) linear operation for generating the $j$ -th ghost feature map $y_{ij}$ , that is to say, $y_{i}^{\prime}$ can have one or more ghost feature maps $\{y_{ij}\}_{j=1}^{s}$ . The last $\Phi_{i,s}$ is the identity mapping for preserving the intrinsic feature maps as shown in Figure 2(b). By utilizing Eq. 3, we can obtain $n = m \cdot s$ feature maps $Y = [y_{11}, y_{12}, \dots, y_{ms}]$ as the output data of a Ghost module as shown in Figure 2(b). Note that the linear operations $\Phi$ operate on each channel whose computational cost is much less than the ordinary convolution. In practice, there could be several different linear operations in a Ghost module, e.g. $3 \times 3$ and $5 \times 5$ linear kernels, which will be analyzed in the experiment part. + +Difference from Existing Methods. The proposed Ghost module has major differences from existing efficient convolution schemes. i) Compared with the units in [21, 61] which utilize $1 \times 1$ pointwise convolution widely, the primary convolution in Ghost module can have customized kernel size. ii) Existing methods [21, 44, 61, 40] adopt pointwise convolutions to process features across channels and then take depthwise convolution to process spatial information. In contrast, Ghost module adopts ordinary convolution to first generate a few intrinsic feature maps, and then utilizes cheap linear operations to augment the features and increase the channels. iii) The operation to process each feature map is limited to depthwise convolution or shift operation in previous efficient architectures [21, 61, 53, 28], while linear operations in Ghost module can have large diversity. iv) In addition, the identity mapping is paralleled with linear transformations in Ghost module to preserve the intrinsic feature maps. + +Analysis on Complexities. Since we can utilize the proposed Ghost module in Eq. 3 to generate the same number of feature maps as that of an ordinary convolutional layer, we can easily integrate the Ghost module into existing well-designed neural architectures to reduce the computation costs. Here we further analyze the profit on memory usage and theoretical speed-up by employing the Ghost module. For example, there are 1 identity mapping and $m \cdot (s - 1) = \frac{n}{s} \cdot (s - 1)$ linear operations, and the averaged kernel size of each linear operation is equal to $d \times d$ . Ideally, the $n \cdot (s - 1)$ linear operations can have different shapes and parameters, but the online inference will be obstructed especially considering + +the utility of CPU or GPU cards. Thus, we suggest to take linear operations of the same size (e.g. $3 \times 3$ or $5 \times 5$ ) in one Ghost module for efficient implementation. The theoretical speed-up ratio of upgrading ordinary convolution with the Ghost module is + +$$ +\begin{array}{l} r _ {s} = \frac {n \cdot h ^ {\prime} \cdot w ^ {\prime} \cdot c \cdot k \cdot k}{\frac {n}{s} \cdot h ^ {\prime} \cdot w ^ {\prime} \cdot c \cdot k \cdot k + (s - 1) \cdot \frac {n}{s} \cdot h ^ {\prime} \cdot w ^ {\prime} \cdot d \cdot d} \\ = \frac {c \cdot k \cdot k}{\frac {1}{s} \cdot c \cdot k \cdot k + \frac {s - 1}{s} \cdot d \cdot d} \approx \frac {s \cdot c}{s + c - 1} \approx s, \tag {4} \\ \end{array} +$$ + +where $d \times d$ has the similar magnitude as that of $k \times k$ , and $s \ll c$ . Similarly, the compression ratio can be calculated as + +$$ +r _ {c} = \frac {n \cdot c \cdot k \cdot k}{\frac {n}{s} \cdot c \cdot k \cdot k + (s - 1) \cdot \frac {n}{s} \cdot d \cdot d} \approx \frac {s \cdot c}{s + c - 1} \approx s, \tag {5} +$$ + +which is equal to that of the speed-up ratio by utilizing the proposed Ghost module. + +![](images/509e8639324b0c1c7e1357bce108ee07d37d8ca617690c01521c9de4cb40714f.jpg) +Figure 3. Ghost bottleneck. Left: Ghost bottleneck with stride=1; right: Ghost bottleneck with stride=2. + +![](images/e7af7dbc271ac4748a09f10ec1e4d1e58a72cae3f5476fe33447835f5ce94072.jpg) +Stride=2 bottleneck + +# 3.2. Building Efficient CNNs + +Ghost Bottlenecks. Taking the advantages of Ghost module, we introduce the Ghost bottleneck (G-bneck) specially designed for small CNNs. As shown in Figure 3, the Ghost bottleneck appears to be similar to the basic residual block in ResNet [16] in which several convolutional layers and shortcuts are integrated. The proposed ghost bottleneck mainly consists of two stacked Ghost modules. The first Ghost module acts as an expansion layer increasing the number of channels. We refer the ratio between the number of the output channels and that of the input as expansion ratio. The second Ghost module reduces the number of channels to match the shortcut path. Then the shortcut is connected between the inputs and the outputs of these two Ghost modules. The batch normalization (BN) [25] and ReLU nonlinearity are applied after each layer, except that ReLU is not used after the second Ghost module as suggested by MobileNetV2 [44]. + +Table 1. Overall architecture of GhostNet. G-bneck denotes Ghost bottleneck. #exp means expansion size. #out means the number of output channels. SE denotes whether using SE module. + +
InputOperator#exp#outSEStride
2242 × 3Conv2d 3×3-16-2
1122 × 16G-bneck1616-1
1122 × 16G-bneck4824-2
562 × 24G-bneck7224-1
562 × 24G-bneck724012
282 × 40G-bneck1204011
282 × 40G-bneck24080-2
142 × 80G-bneck20080-1
142 × 80G-bneck18480-1
142 × 80G-bneck18480-1
142 × 80G-bneck48011211
142 × 112G-bneck67211211
142 × 112G-bneck67216012
72 × 160G-bneck960160-1
72 × 160G-bneck96016011
72 × 160G-bneck960160-1
72 × 160G-bneck96016011
72 × 160Conv2d 1×1-960-1
72 × 960AvgPool 7×7----
12 × 960Conv2d 1×1-1280-1
12 × 1280FC-1000--
+ +The Ghost bottleneck described above is for stride $= 1$ . As for the case where stride $= 2$ , the shortcut path is implemented by a downsampling layer and a depthwise convolution with stride $= 2$ is inserted between the two Ghost modules. In practice, the primary convolution in Ghost module here is pointwise convolution for its efficiency. + +GhostNet. Building on the ghost bottleneck, we propose GhostNet as presented in Table 7. We basically follow the architecture of MobileNetV3 [20] for its superiority and replace the bottleneck block in MobileNetV3 with our Ghost bottleneck. GhostNet mainly consists of a stack of Ghost bottlenecks with the Ghost modules as the building block. The first layer is a standard convolutional layer with 16 filters, then a series of Ghost bottlenecks with gradually increased channels are followed. These Ghost bottlenecks are grouped into different stages according to the sizes of their input feature maps. All the Ghost bottlenecks are applied with stride=1 except that the last one in each stage is with stride=2. At last a global average pooling and a convolutional layer are utilized to transform the feature maps to a 1280-dimensional feature vector for final classification. The squeeze and excite (SE) module [22] is also applied to the residual layer in some ghost bottlenecks as in Table 7. In contrast to MobileNetV3, we do not use hard-swish nonlinearity function due to its large latency. The presented architecture provides a basic design for reference, although further hyper-parameters tuning or automatic architecture searching based ghost module will + +further boost the performance. + +Width Multiplier. Although the given architecture in Table 7 can already provide low latency and guaranteed accuracy, in some scenarios we may require smaller and faster models or higher accuracy on specific tasks. To customize the network for the desired needs, we can simply multiply a factor $\alpha$ on the number of channels uniformly at each layer. This factor $\alpha$ is called width multiplier as it can change the width of the entire network. We denote GhostNet with width multiplier $\alpha$ as GhostNet- $\alpha \times$ . Width multiplier can control the model size and the computational cost quadratically by roughly $\alpha^2$ . Usually smaller $\alpha$ leads to lower latency and lower performance, and vice versa. + +# 4. Experiments + +In this section, we first replace the original convolutional layers by the proposed Ghost module to verify its effectiveness. Then, the GhostNet architecture built using the new module will be further tested on the image classification and object detection benchmarks. + +Datasets and Settings. To verify the effectiveness of the proposed Ghost module and GhostNet architecture, we conduct experiments on several benchmark visual datasets, including CIFAR-10 [29], ImageNet ILSVRC 2012 dataset [8], and MS COCO object detection benchmark [34]. + +CIFAR-10 dataset is utilized for analyzing the properties of the proposed method, which consists of $60,000 \times 32$ color images in 10 classes, with 50,000 training images and 10,000 test images. A common data augmentation scheme including random crop and mirroring [16, 18] is adopted. ImageNet is a large-scale image dataset which contains over $1.2M$ training images and $50K$ validation images belonging to 1,000 classes. The common data preprocessing strategy including random crop and flip [16] is applied during training. We also conduct object detection experiments on MS COCO dataset [34]. Following common practice [32, 33], we train models on COCO trainval35k split (union of $80K$ training images and a random $35K$ subset of images from validation set) and evaluate on the minival split with $5K$ images. + +# 4.1. Efficiency of Ghost Module + +# 4.1.1 Toy Experiments. + +We have presented a diagram in Figure 1 to point out that there are some similar feature map pairs, which can be efficiently generated using some efficient linear operations. Here we first conduct a toy experiment to observe the reconstruction error between raw feature maps and the generated ghost feature maps. Taking three pairs in Figure 1 (i.e. red, greed, and blue) as examples, features are extracted using + +the first residual block of ResNet-50 [16]. Taking the feature on the left as input and the other one as output, we utilize a small depthwise convolution filter to learn the mapping, i.e. the linear operation $\Phi$ between them. The size of the convolution filter $d$ is ranged from 1 to 7, MSE (mean squared error) values of each pair with different $d$ are shown in Table 2. + +Table 2. MSE error v.s. different kernel sizes. + +
MSE (10-3)d=1d=3d=5d=7
red pair4.03.33.33.2
green pair25.024.324.123.9
blue pair12.111.211.111.0
+ +It can be found in Table 2 that all the MSE values are extremely small, which demonstrates that there are strong correlations between feature maps in deep neural networks and these redundant feature maps could be generated from several intrinsic feature maps. Besides convolutions used in the above experiments, we can also explore some other low-cost linear operations to construct the Ghost module such as affine transformation and wavelet transformation. However, convolution is an efficient operation already well support by current hardware and it can cover a number of widely used linear operations such as smoothing, blurring, motion, etc. Moreover, although we can also learn the size of each filter w.r.t. the linear operation $\Phi$ , the irregular module will reduce the efficiency of computing units (e.g. CPU and GPU). Thus, we suggest to let $d$ in a Ghost module be a fixed value and utilize depthwise convolution to implement Eq. 3 for building highly efficient deep neural networks in the following experiments. + +Table 3. The performance of the proposed Ghost module with different $d$ on CIFAR-10. + +
dWeights (M)FLOPs (M)Acc. (%)
VGG-1615.031393.6
17.615793.5
37.715893.7
57.716093.4
77.716393.1
+ +Table 4. The performance of the proposed Ghost module with different $s$ on CIFAR-10. + +
sWeights (M)FLOPs (M)Acc. (%)
VGG-1615.031393.6
27.715893.7
35.210793.4
44.08093.0
53.36592.9
+ +# 4.1.2 CIFAR-10. + +We evaluate the proposed Ghost module on two popular network architectures, i.e. VGG-16 [46] and ResNet-56 [16], + +on CIFAR-10 dataset. Since VGG-16 is originally designed for ImageNet, we use its variant [60] which is widely used in literatures for conducting the following experiments. All the convolutional layers in these two models are replaced by the proposed Ghost module, and the new models are denoted as Ghost-VGG-16 and Ghost-ResNet-56, respectively. Our training strategy closely follows the settings in [16], including momentum, learning rate, etc. We first analyze the effects of the two hyper-parameters $s$ and $d$ in Ghost module, and then compare the Ghost-models with the state-of-the-art methods. + +Analysis on Hyper-parameters. As described in Eq. 3, the proposed Ghost Module for efficient deep neural networks has two hyper-parameters, i.e. $s$ for generating $m = n / s$ intrinsic feature maps, and kernel size $d \times d$ of linear operations (i.e. the size of depthwise convolution filters) for calculating ghost feature maps. The impact of these two parameters are tested on the VGG-16 architecture. + +First, we fix $s = 2$ and tune $d$ in $\{1,3,5,7\}$ , and list the results on CIFAR-10 validation set in Table 3. We can see that the proposed Ghost module with $d = 3$ performs better than smaller or larger ones. This is because that kernels of size $1 \times 1$ cannot introduce spatial information on feature maps, while larger kernels such as $d = 5$ or $d = 7$ lead to overfitting and more computations. Therefore, we adopt $d = 3$ in the following experiments for effectiveness and efficiency. + +After investigating the kernel sizes used in the proposed Ghost module, we keep $d = 3$ and tune the other hyperparameter $s$ in the range of $\{2,3,4,5\}$ . In fact, $s$ is directly related to the computational costs of the resulting network, that is, larger $s$ leads to larger compression and speed-up ratio as analyzed in Eq. 5 and Eq. 4. From the results in Table 4, when we increase $s$ , the FLOPs are reduced significantly and the accuracy decreases gradually, which is as expected. Especially when $s = 2$ which means compress VGG-16 by $2\times$ , our method performs even slightly better than the original model, indicating the superiority of the proposed Ghost module. + +Table 5. Comparison of state-of-the-art methods for compressing VGG-16 and ResNet-56 on CIFAR-10. - represents no reported results available. + +
ModelWeightsFLOPsAcc. (%)
VGG-1615M313M93.6
\( \ell_1 \)-VGG-16 [31, 37]5.4M206M93.4
SBP-VGG-16 [18]-136M92.5
Ghost-VGG-16 (s=2)7.7M158M93.7
ResNet-560.85M125M93.0
CP-ResNet-56 [18]-63M92.0
\( \ell_1 \)-ResNet-56 [31, 37]0.73M91M92.5
AMC-ResNet-56 [17]-63M91.9
Ghost-ResNet-56 (s=2)0.43M63M92.7
+ +Comparison with State-of-the-arts. We compare Ghost-Net with several representative state-of-the-art models on both VGG-16 and ResNet-56 architectures. The compared methods include different types of model compression approaches, $\ell_1$ pruning [31, 37], SBP [18], channel pruning (CP) [18] and AMC [17]. For VGG-16, our model can obtain an accuracy slightly higher than the original one with a $2\times$ acceleration, which indicates that there is considerable redundancy in the VGG model. Our Ghost-VGG-16 ( $s = 2$ ) outperforms the competitors with the highest performance $(93.7\%)$ but with significantly fewer FLOPs. For ResNet-56 which is already much smaller than VGG-16, our model can achieve comparable accuracy with baseline with $2\times$ speed-up. We can also see that other state-of-the-art models with similar or larger computational cost obtain lower accuracy than ours. + +Visualization of Feature Maps. We also visualize the feature maps of our ghost module as shown in Figure 4. Although the generated feature maps are from the primary feature maps, they exactly have significant difference which means the generated features are flexible enough to satisfy the need for the specific task. + +![](images/ff16d2131c58172a4cf4fc109472298d31411951f53fea0f8b763a36a5cd7701.jpg) +Figure 4. The feature maps in the 2nd layer of Ghost-VGG-16. The left-top image is the input, the feature maps in the left red box are from the primary convolution, and the feature maps in the right green box are after the depthwise transformation. + +![](images/1ef305c620e27b9706e3cdb6e837d8ecc2df3921eeb5d1fda4f4585198c7f5a7.jpg) +Figure 5. The feature maps in the 2nd layer of vanilla VGG-16. + +# 4.1.3 Large Models on ImageNet + +We next embed the Ghost module in the standard ResNet-50 [16] and conduct experiments on the large-scale ImageNet dataset. ResNet-50 has about 25.6M parameters and 4.1B FLOPs with a top-5 error of $7.8\%$ . We use our Ghost + +Table 6. Comparison of state-of-the-art methods for compressing ResNet-50 on ImageNet dataset. + +
ModelWeights (M)FLOPs (B)Top-1 Acc. (%)Top-5 Acc. (%)
ResNet-50 [16]25.64.175.392.2
Thinet-ResNet-50 [39]16.92.672.190.3
NISP-ResNet-50-B [59]14.42.3-90.8
Versatile-ResNet-50 [49]11.03.074.591.8
SSS-ResNet-50 [23]-2.874.291.9
Ghost-ResNet-50 (s=2)13.02.275.092.3
Shift-ResNet-50 [53]6.0-70.690.1
Taylor-FO-BN-ResNet-50 [41]7.91.371.7-
Slimmable-ResNet-50 0.5× [58]6.91.172.1-
MetaPruning-ResNet-50 [36]-1.073.4-
Ghost-ResNet-50 (s=4)6.51.274.191.9
+ +module to replace all the convolutional layers in ResNet-50 to obtain compact models and compare the results with several state-of-the-art methods, as detailed in Table 6. The training settings such as the optimizer, the learning rate, and the batch size, are totally the same as those in [16] for fair comparisons. + +From the results in Table 6, we can see that our Ghost-ResNet-50 ( $s = 2$ ) obtains about $2 \times$ acceleration and compression ratio, while maintaining the accuracy as that of the original ResNet-50. Compared with the recent state-of-the-art methods including Thinet [39], NISP [59], Versatile filters [49] and Sparse structure selection (SSS) [23], our method can obtain significantly better performance under the $2 \times$ acceleration setting. When we further increase $s$ to 4, Ghost-based model has only a $0.3\%$ accuracy drop with an about $4 \times$ computation speed-up ratio. In contrast, compared methods [53, 58] with similar weights or FLOPs have much lower performance than ours. + +# 4.2. GhostNet on Visual Benchmarks + +After demonstrating the superiority of the proposed Ghost module for efficiently generating feature maps, we then evaluate the well designed GhostNet architecture as shown in Table 7 using Ghost bottlenecks on image classification and object detection tasks, respectively. + +# 4.2.1 ImageNet Classification + +To verify the superiority of the proposed GhostNet, we conduct experiments on ImageNet classification task. We follow most of the training settings used in [61], except that the initial learning rate is set to 0.4 when batch size is 1,024 on 8 GPUs. All the results are reported with single crop top-1 performance on ImageNet validation set. For GhostNet, we set kernel size $k = 1$ in the primary convolution and $s = 2$ and $d = 3$ in all the Ghost modules for simplicity. + +Several modern small network architectures are selected as competitors, including MobileNet series [21, 44, 20], ShuffleNet series [61, 40], ProxylessNAS [2], FBNet [52], MnasNet [47], etc. The results are summarized in Table 7. + +The models are grouped into three levels of computational complexity typically for mobile applications, i.e. $\sim 50$ , $\sim 150$ , and $200 - 300$ MFLOPs. From the results, we can see that generally larger FLOPs lead to higher accuracy in these small networks which shows the effectiveness of them. Our GhostNet outperforms other competitors consistently at various computational complexity levels, since GhostNet is more efficient in utilizing computation resources for generating feature maps. + +![](images/c809065613d53374a52d1c549c6a6c21ec2d7b263d6ffd89a128de18e4bd8d47.jpg) +Figure 6. Top-1 accuracy v.s. FLOPs on ImageNet dataset. + +![](images/43e9d7d2165fa0722f53108fdc068d615d6a0ee195306cf6919c3a126ef23862.jpg) +Figure 7. Top-1 accuracy v.s. latency on ImageNet dataset. + +Table 7. Comparison of state-of-the-art small networks over classification accuracy, the number of weights and FLOPs on ImageNet dataset. + +
ModelWeights (M)FLOPs (M)Top-1 Acc. (%)Top-5 Acc. (%)
ShuffleNetV1 0.5× (g=8) [61]1.04058.881.0
MobileNetV2 0.35× [44]1.75960.382.9
ShuffleNetV2 0.5× [40]1.44161.182.6
MobileNetV3 Small 0.75× [20]2.44465.4-
GhostNet 0.5×2.64266.286.6
MobileNetV1 0.5× [21]1.315063.384.9
MobileNetV2 0.6× [44, 40]2.214166.7-
ShuffleNetV1 1.0× (g=3) [61]1.913867.887.7
ShuffleNetV2 1.0× [40]2.314669.488.9
MobileNetV3 Large 0.75× [20]4.015573.3-
GhostNet 1.0×5.214173.991.4
MobileNetV2 1.0× [44]3.530071.891.0
ShuffleNetV2 1.5× [40]3.529972.690.6
FE-Net 1.0× [6]3.730172.9-
FBNet-B [52]4.529574.1-
ProxylessNAS [2]4.132074.692.2
MnasNet-A1 [47]3.931275.292.5
MobileNetV3 Large 1.0× [20]5.421975.2-
GhostNet 1.3×7.322675.792.7
+ +Actual Inference Speed. Since the proposed GhostNet is designed for mobile applications, we further measure the actual inference speed of GhostNet on an ARM-based mobile phone using the TFLite tool [1]. Following the common settings in [21, 44], we use single-threaded mode with batch size 1. From the results in Figure 7, we can see that GhostNet obtain about $0.5\%$ higher top-1 accuracy than MobileNetV3 with the same latency, and GhostNet need less runtime to achieve similar performance. For example, GhostNet with $75.0\%$ accuracy only has $40~\mathrm{ms}$ latency, while MobileNetV3 with similar accuracy requires about $45~\mathrm{ms}$ to process one image. Overall, our models generally outperform the famous state-of-art models, i.e. MobileNet series [21, 44, 20], ProxylessNAS [2], FBNet [52], and MnasNet [47]. + +# 4.2.2 Object Detection + +In order to further evaluate the generalization ability of GhostNet, we conduct object detection experiments on MS COCO dataset. We use the trainval35k split as training data and report the results in mean Average Precision (mAP) on minival split, following [32, 33]. Both the two-stage Faster R-CNN with Feature Pyramid Networks (FPN) [43, 32] and the one-stage RetinaNet [33] are used as our framework and GhostNet acts as a drop-in replacement for the backbone feature extractor. We train all the models using SGD for 12 epochs from ImageNet pretrained weights with the hyperparameters suggested in [32, 33]. The input images are resized to a short side of 800 and a long side not exceeding 1333. Table 8 shows the detection results, where the FLOPs are calculated using $224 \times 224$ images as common practice. With significantly lower computational costs, GhostNet achieves similar mAP with MobileNetV2 and MobileNetV3, + +both on one-stage RetinaNet and two-stage Faster R-CNN frameworks. + +Table 8. Results on MS COCO dataset. + +
BackboneDetection FrameworkBackbone FLOPsmAP
MobileNetV2 1.0× [44]RetinaNet300M26.7%
MobileNetV3 1.0× [20]219M26.4%
GhostNet 1.1×164M26.6%
MobileNetV2 1.0× [44]Faster R-CNN300M27.5%
MobileNetV3 1.0× [20]219M26.9%
GhostNet 1.1×164M26.9%
+ +# 5. Conclusion + +To reduce the computational costs of recent deep neural networks, this paper presents a novel Ghost module for building efficient neural architectures. The basic Ghost module splits the original convolutional layer into two parts and utilizes fewer filters to generate several intrinsic feature maps. Then, a certain number of cheap transformation operations will be further applied for generating ghost feature maps efficiently. The experiments conducted on benchmark models and datasets illustrate that the proposed method is a plug-and-play module for converting original models to compact ones while remaining the comparable performance. In addition, the GhostNet built using the proposed new module outperforms state-of-the-art portable neural architectures, in both terms of efficiency and accuracy. + +# Acknowledgment + +We thank anonymous reviewers for their helpful comments. Chang Xu was supported by the Australian Research Council under Project DE180101438. + +# References + +[1] Martin Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Schlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaogiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. +[2] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. In ICLR, 2019. +[3] Hanting Chen, Yunhe Wang, Chang Xu, Zhaohui Yang, Chuanjian Liu, Boxin Shi, Chunjing Xu, Chao Xu, and Qi Tian. Data-free learning of student networks. In ICCV, 2019. +[4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2016. +[5] Wuyang Chen, Xinyu Gong, Xianming Liu, Qian Zhang, Yuan Li, and Zhangyang Wang. Fasterseg: Searching for faster real-time semantic segmentation. In ICLR, 2020. +[6] Weijie Chen, Di Xie, Yuan Zhang, and Shiliang Pu. All you need is a few shifts: Designing efficient convolutional neural networks for image classification. In CVPR, 2019. +[7] François Chollet. Xception: Deep learning with depthwise separable convolutions. In CVPR, pages 1251-1258, 2017. +[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. +[9] Emily L Denton, Wojciech Zaremba, Joan Bruna, Yann LeCun, and Rob Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In NeurIPS, pages 1269-1277, 2014. +[10] Xinyu Gong, Shiyu Chang, Yifan Jiang, and Zhangyang Wang. Autogan: Neural architecture search for generative adversarial networks. In ICCV, 2019. +[11] Shupeng Gui, Haotao N Wang, Haichuan Yang, Chen Yu, Zhangyang Wang, and Ji Liu. Model compression with adversarial robustness: A unified optimization framework. In NeurIPS, 2019. +[12] 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 NeurIPS, 2018. +[13] Kai Han, Jianyuan Guo, Chao Zhang, and Mingjian Zhu. Attribute-aware attention model for fine-grained representation learning. In ACM MM, 2018. +[14] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In ICLR, 2016. + +[15] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In NeurIPS, pages 1135-1143, 2015. +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[17] Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. Amc: Automl for model compression and acceleration on mobile devices. In ECCV, 2018. +[18] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In ICCV, 2017. +[19] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. +[20] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenetv3. In ICCV, 2019. +[21] 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. +[22] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018. +[23] Zehao Huang and Naiyan Wang. Data-driven sparse structure selection for deep neural networks. In ECCV, pages 304-320, 2018. +[24] Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In NeurIPS, pages 4107-4115, 2016. +[25] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. +[26] 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 CVPR, pages 2704-2713, 2018. +[27] Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. In BMVC, 2014. +[28] Yunho Jeon and Junmo Kim. Constructing fast network through deconstruction of convolution. In NeurIPS, 2018. +[29] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, CiteSeer, 2009. +[30] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NeurIPS, pages 1097-1105, 2012. +[31] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In ICLR, 2017. +[32] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. + +[33] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In ICCV, 2017. +[34] 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 ECCV. Springer, 2014. +[35] Chuanjian Liu, Yunhe Wang, Kai Han, Chunjing Xu, and Chang Xu. Learning instance-wise sparsity for accelerating deep models. In IJCAI, 2019. +[36] Zechun Liu, Haoyuan Mu, Xiangyu Zhang, Zichao Guo, Xin Yang, Tim Kwang-Ting Cheng, and Jian Sun. Metapruning: Meta learning for automatic neural network channel pruning. In ICCV, 2019. +[37] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. In ICLR, 2019. +[38] 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 ECCV, 2018. +[39] Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. In ICCV, pages 5058-5066, 2017. +[40] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In ECCV, 2018. +[41] Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In CVPR, 2019. +[42] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In ECCV, pages 525-542. Springer, 2016. +[43] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. +[44] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, pages 4510-4520, 2018. +[45] Mingzhu Shen, Kai Han, Chunjing Xu, and Yunhe Wang. Searching for accurate binary neural architectures. In ICCV Workshops, 2019. +[46] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. +[47] 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 CVPR, pages 2820-2828, 2019. +[48] Yue Wang, Ziyu Jiang, Xiaohan Chen, Pengfei Xu, Yang Zhao, Yingyan Lin, and Zhangyang Wang. E2-train: Training state-of-the-art cnns with over $80\%$ energy savings. In NeurIPS, 2019. +[49] Yunhe Wang, Chang Xu, Chunjing Xu, Chao Xu, and Dacheng Tao. Learning versatile filters for efficient convolutional neural networks. In NeurIPS, 2018. + +[50] Yunhe Wang, Chang Xu, Shan You, Dacheng Tao, and Chao Xu. Cnnpack: packing convolutional neural networks in the frequency domain. In NeurIPS, pages 253-261, 2016. +[51] Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In NeurIPS, pages 2074-2082, 2016. +[52] 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 CVPR, pages 10734-10742, 2019. +[53] Bichen Wu, Alvin Wan, Xiangyu Yue, Peter Jin, Sicheng Zhao, Noah Golmant, Amir Gholaminejad, Joseph Gonzalez, and Kurt Keutzer. Shift: A zero flop, zero parameter alternative to spatial convolutions. In CVPR, 2018. +[54] Yixing Xu, Yunhe Wang, Hanting Chen, Kai Han, XU Chunjing, Dacheng Tao, and Chang Xu. Positive-unlabeled compression on the cloud. In NeurIPS, 2019. +[55] Zhaohui Yang, Yunhe Wang, Xinghao Chen, Boxin Shi, Chao Xu, Chunjing Xu, Qi Tian, and Chang Xu. Cars: Continuous evolution for efficient neural architecture search. arXiv preprint arXiv:1909.04977, 2019. +[56] Zhaohui Yang, Yunhe Wang, Chuanjian Liu, Hanting Chen, Chunjing Xu, Boxin Shi, Chao Xu, and Chang Xu. Legonet: Efficient convolutional neural networks with lego filters. In ICML, 2019. +[57] Shan You, Chang Xu, Chao Xu, and Dacheng Tao. Learning from multiple teacher networks. In SIGKDD, 2017. +[58] Jiahui Yu, Linjie Yang, Ning Xu, Jianchao Yang, and Thomas Huang. Slimmable neural networks. In ICLR, 2019. +[59] Ruichi Yu, Ang Li, Chun-Fu Chen, Jui-Hsin Lai, Vlad I Morariu, Xintong Han, Mingfei Gao, Ching-Yung Lin, and Larry S Davis. Nisp: Pruning networks using neuron importance score propagation. In CVPR, 2018. +[60] Sergey Zagoruyko. 92.45 on cifar-10 in torch, 2015. URL http://torch.ch/blog/2015/07/30/cifar.html. +[61] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. CVPR, 2018. +[62] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In CVPR, pages 8697-8710, 2018. \ No newline at end of file diff --git a/ghostnetmorefeaturesfromcheapoperations/images.zip b/ghostnetmorefeaturesfromcheapoperations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0eb8b3b38be7335d2a5c1e5436acbe8bd02430bc --- /dev/null +++ b/ghostnetmorefeaturesfromcheapoperations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80d54c813d3b93752a94d52c8003076aa29125d9f1d2bdb9a241f9197c5516e3 +size 586334 diff --git a/ghostnetmorefeaturesfromcheapoperations/layout.json b/ghostnetmorefeaturesfromcheapoperations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..117db7ecc7b33f3117c3c1ca4d0cff14deaba808 --- /dev/null +++ b/ghostnetmorefeaturesfromcheapoperations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:340ebd173091f1920fd97cc1f2f25b182f3b302491e7b1c4715c9ee2cdc77ac0 +size 424505 diff --git a/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_content_list.json b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f425bd46705e47faf77b574ee310d90f6e1364f0 --- /dev/null +++ b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f22bec6640c788574bf7ef8c9c663f23b1f28a97e98f38478acf84c50fa543f +size 77769 diff --git a/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_model.json b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2a6b60a7d4f8a363816de765c88e86be86113b0e --- /dev/null +++ b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b203ab8688b792459bb1a08faa583b112ff6b99b7c8c7e9dc7b319f3dce59dd +size 96002 diff --git a/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_origin.pdf b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5ff685560754536f4c776d111d3f99fdadb29d78 --- /dev/null +++ b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/6b2d38db-299d-46c9-9bdb-c75d30d19a91_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34c17393a23fb9cfc0e5372a9a18e4c6655ebc8ca0da829762a7934046891bdd +size 1129036 diff --git a/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/full.md b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/full.md new file mode 100644 index 0000000000000000000000000000000000000000..425a58b554fb7b4f3ff637dfd8e9eadef34ee9d6 --- /dev/null +++ b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/full.md @@ -0,0 +1,280 @@ +# Global-Local Bidirectional Reasoning for Unsupervised Representation Learning of 3D Point Clouds + +Yongming Rao $^{1,2,3}$ , Jiwen Lu $^{1,2,3*}$ , Jie Zhou $^{1,2,3,4}$ + +1Department of Automation, Tsinghua University, China + +$^{2}$ State Key Lab of Intelligent Technologies and Systems, China + +3Beijing National Research Center for Information Science and Technology, China + +$^{4}$ Tsinghua Shenzhen International Graduate School, Tsinghua University, China + +raoyongming95@gmail.com; {lujiwen, jzhou}@tsinghua.edu.cn + +# Abstract + +Local and global patterns of an object are closely related. Although each part of an object is incomplete, the underlying attributes about the object are shared among all parts, which makes reasoning the whole object from a single part possible. We hypothesize that a powerful representation of a 3D object should model the attributes that are shared between parts and the whole object, and distinguishable from other objects. Based on this hypothesis, we propose to learn point cloud representation by bidirectional reasoning between the local structures at different abstraction hierarchies and the global shape without human supervision. Experimental results on various benchmark datasets demonstrate the unsupervisedly learned representation is even better than supervised representation in discriminative power, generalization ability, and robustness. We show that unsupervisedly trained point cloud models can outperform their supervised counterparts on downstream classification tasks. Most notably, by simply increasing the channel width of an SSG PointNet++1, our unsupervised model surpasses the state-of-the-art supervised methods on both synthetic and real-world 3D object classification datasets. We expect our observations to offer a new perspective on learning better representation from data structures instead of human annotations for point cloud understanding.2 + +# 1. Introduction + +Facilitating machines to understand the 3D world is crucial to many important real-world applications, such as autonomous driving, augmented reality and robotics. One core problem on 3D geometric data such as point clouds is learn + +![](images/41d0359d6319f1cf4fc3428a53fb4e60a86b15e4d4fbf51e100d6405f799a7ac.jpg) +Figure 1: Illustration of our main idea. We propose to learn representation unsupervisedly from data structures by training the networks to solve two problems: reasoning the whole object from a single part and reasoning detailed structures from the global representation. + +ing powerful representations that are discriminative, generic and robust. To tackle this problem, current state-of-the-arts on point cloud analysis [2,26,28,33,38,43,49,51,54] are established with the help of extensive human-annotated supervised information. However, manually labeled data require the high cost of human labor and may limit the generalization ability of the learned models. Therefore, unsupervised learning is an attractive direction to obtain generic and robust representations for 3D object understanding. + +Learning useful representations from unlabeled data is a fundamental and challenging problem for point cloud analysis. While several efforts have been devoted to learn representation of a point cloud without human supervision [1,8,14, 18,26,31,47,55,56], these methods are mainly based on self-supervision signals provided by generation or reconstruction tasks, including self-reconstruction [1,8,14,26,47,55,56], local-to-global reconstruction [18,31] and distribution estimation [1,26]. These methods have proven to be effective + +in capturing structural and low-level information of point clouds, but usually fail to learn high-level semantic information from point clouds. Therefore, unsupervised models still perform far behind the state-of-the-art supervised model. The goal of this work is to explore an unsupervised learning algorithm that can learn both structural information and semantic knowledge to promote the quality of unsupervisedly learned representation. + +Different from images where local patches are noisy and usually independent from the whole image (for example, given a patch of a dog, we cannot identify whether this image is about animals or the people nearby), the underlying semantic and structural information is shared in all parts of a 3D object. This distinct property of 3D objects makes reasoning the whole object from a single part possible. Based on this observation, we hypothesize that a powerful representation of a 3D object should model the underlying attributes that are shared between parts and the whole object and distinguishable from other objects. As shown in Figure 1, given a point cloud of a tail of an airplane, a good representation of the tail should reflect the type of the corresponding airplane. Simultaneously, the representation of the whole airplane should contain all the necessary details to infer the local structures of this airplane. + +In this paper, we propose a new scheme for unsupervised point cloud representation learning by bidirectional reasoning between local representations at different abstraction hierarchies in a network and global representation of a 3D object. Our method is simple yet effective, which can be applied to a wide range of deep learning methods for point cloud understanding. While most existing unsupervised learning methods focus on exploiting structure information by learning various autoencoders, our method aims to capture the underlying semantic knowledge shared between local structures and global shape in 3D point clouds. Specifically, the proposed Global-Local Reasoning (GLR) consists of two sub-tasks: 1) local-to-global reasoning: we formulate the problem of capturing shared attributes between local parts and global shape as a self-supervised metric learning problem, where local features are encouraged to be closer to the global feature of the same object than features of other objects, such that the distinct semantic information of each object can be extracted by local representations; 2) global-to-local reasoning: we further use the self-supervised tasks including self-reconstruction and normal estimation to learn global features that contain necessary structural information of 3D objects. + +Our experimental results on several benchmark datasets demonstrate that the unsupervisedly learned point cloud representation is even more discriminative, generalizable and robust than supervised representation in downstream object classification tasks. Our unsupervisedly trained models can consistently outperform their supervised counterparts. With + +our unsupervised learning method, we show a simple and light-weight SSG PointNet++ [38] model can achieve very competitive results with supervised methods (92.2% classification accuracy on ModelNet40 [52]). By simply increasing the channel width, we further obtain 93.0% and 87.2% single view accuracy on ModelNet40 and ScanObjectNN [46] benchmarks respectively, surpassing the state-of-the-art unsupervised and supervised methods, while the supervised version of this model suffers from overfitting. + +# 2. Related Work + +Deep Learning on 3D Point Clouds: Recent years have witnessed rapid development on 3D point cloud analysis thanks to the deep learning techniques that are designed to consume 3D point clouds directly [28, 33, 37, 38, 49]. PointNet [26] pioneers this line of works and designed a deep network that can handle unordered and unstructured 3D points by independently learning on each point and fusing point features with max pooling. Though efficient, PointNet fails to capture local structures, which have proven to be crucial to the success of CNNs. PointNet++ [38] is proposed to mitigate this issue by developing a hierarchical grouping architecture to extract local features progressively at different abstraction levels. The subsequent works such as PointCNN [28], PointConv [51] and Relation-Shape CNN [33] also focus on local structures of point cloud and further improve the quality of captured features. Since only the relation between local and global features is needed, our method is suited for all these PointNet++ variants. While recent works push state-of-the-art of point cloud deep learning by promoting the capacity of networks, this work offers a new route to learn powerful representation in an unsupervised fashion, without any human annotations. + +Unsupervised Representation Learning: Unsupervised learning has been an important group of methods in computer vision since the earliest day [13], which aims to learn transformations of the data that make the subsequent downstream problem solving easier [5]. Classical deep methods for unsupervised learning such as autoencoders [21], generative adversarial networks [16] and autoregressive models [35] learn representation by faithfully reconstructing the input data, which focus on low-level variations in data and is not very useful for downstream tasks like classification. Recent works on self-supervised learning present a powerful family of models that can learn discriminative representations with rich semantic knowledge. This group of methods design various problem generators such that models need to learn useful information from data in order to solve these generated problems [3, 10, 11, 19, 44]. In this work, we also follow this line and propose to learn point cloud representation by solving the global-local bidirectional reasoning problem. + +There are several prior attempts on learning representa + +![](images/ce9247d5ee013c0ec9063fb28ff09f8e16a8d030c13dfbf021b2dc5fd33388cd.jpg) +Figure 2: The overall framework of our unsupervised feature learning approach. The representation is learned by connecting local structures and global shape. We map the local representations at different levels and global representations to shared feature space and use a self-supervised metric learning objective to mine semantic knowledge from data. By further incorporating self-reconstruction and normal estimation tasks, a powerful representation that contains rich semantic and structural information can be learned. + +tion of a point cloud without human supervision [1,8, 14, 18, 26, 31, 47, 55, 56]. These methods discover useful information in the 3D point cloud by performing data reconstruction, which has proven to be effective in learning structural information. However, because of lacking effective semantic supervision, previous methods limit the networks' ability in downstream tasks. Our method resolves this issue by incorporating semantic supervision with structural supervision. With the exploration of high-level semantic knowledge, our method is able to learn discriminative representation like supervised method while maintaining the robustness and generalization of unsupervised representation. + +# 3. Approach + +The core of 3D point cloud understanding is to learning discriminative, generic and robust representations that can capture the underlying shape. To achieve this goal in an unsupervised manner, we propose to point cloud representation by solving a bidirectional reasoning problem between the local structures and the global shape. The overall framework of our method is presented in Figure 2. + +# 3.1. Hierarchical Point Cloud Feature Learning + +We begin by reviewing the hierarchical point cloud feature learning framework firstly proposed in PointNet++ [38], on which our method is built. + +Consider a set of 3D points $P \subset \mathbb{R}^3$ with $N$ elements, in which each point $p_i$ is represented by a 3D coordinate. To learn features based on these 3D coordinates, PointNet [37] proposes to use a symmetric function $f$ that is invariant to point permutations to transfer point set into feature space: + +$$ +f (P) = \mathcal {A} (h (p _ {1}), h (p _ {2}), \dots , h (p _ {N})), \tag {1} +$$ + +where $h$ is a multi-layer perceptron network that processes each point independently and shares parameters for all points + +and $\mathcal{A}$ is a symmetric aggregation function like max pooling to summarize features from each point. Since each point is processed independently by $h$ , the structural information among points is captured only by the aggregation function $\mathcal{A}$ . Therefore, PointNet lacks the ability to capture local context. To address this issue, PointNet++ and its variants [28, 33, 51] use a hierarchical structure to learn point cloud feature progressively at different abstraction levels. Specifically, at the $\ell$ -th level, point set is abstracted by using iterative furthest point sampling [38] to produce a new set $P^{\ell} \subset P^{\ell-1}$ with fewer points and we can extract the local geometrical feature $\mathbf{f}_i^\ell$ by applying a small PointNet on the local point subset around the centroid for each point $p_i^\ell \in P^\ell$ . The global representation of the point cloud $\mathbf{g}$ is then obtained by applying another small PointNet model on the points and features at the highest abstraction level. + +Almost all previous works [2,26,28,33,38,43,49,51,54] on supervised point cloud learning employ an end-to-end training paradigm, where the representation is learned directly from the annotated labels. Although achieved promising performance, these methods neglect the intrinsic semantic and structure information contained in the point clouds themselves. In this work, we focus on exploring this property of point cloud and provide a very competitive alternative for point cloud representation learning. + +To discover the structure and semantic information from data without human annotations, we propose two problems for the networks to solve: local-to-global reasoning and global-to-local reasoning, which aim to unsupervisedly learn semantic and structural knowledge respectively. + +# 3.2. Local-to-Global Reasoning + +Humans are able to recognize many objects even when only a small part of the object is presented. This fact inspires us to exploit the relation between local parts and global shape + +as a free and plentiful supervisory signal for training a rich representation for point cloud understanding. Therefore, the goal of local-to-global reasoning is to mine the shared semantic knowledge among different abstraction hierarchies of point clouds. Since global representation usually can better capture the semantic information of 3D objects than local representations, local-to-goal reasoning operates by predicting global representation from local ones. To evaluate the predictions, we formulate the prediction as a self-supervised metric learning problem and use a multi-class N-pair loss [40] to supervise the prediction task. Inspired the idea of instance discrimination [53], to learn the distinct semantic information for each object, we treat the global representation of the current object as the positive sample and use the global representation of other objects as the negative samples. In the following, we describe the details of the local-to-global reasoning. + +Prediction Networks: Since the local features $\{\mathbf{f}_i^\ell, \forall i, \ell\}$ and global feature $\mathbf{g}$ have different numbers of channels, we cannot directly measure the similarity of them. Thus, we first use prediction networks $\{\phi^\ell, \forall \ell\}$ and $\varphi$ to embed them into a shared feature space, respectively. The prediction networks can be implemented as multi-layer perceptron (MLP) networks and the prediction networks are shared at each abstraction level. + +Self-Supervised Metric Learning: A straightforward method to optimize the predictions is to minimize the absolute overall differences between $\phi^{\ell}(\mathbf{f}_i^\ell)$ and $\varphi (\mathbf{g})$ , i.e. minimize $\sum_{i,\ell}||\phi^{\ell}(\mathbf{f}_{i}^{\ell}) - \varphi (\mathbf{g})||$ . However, this objective may lead to degenerate representations that map all inputs to a constant value. Therefore, we choose to supervise the relative quality of the predictions with an unsupervised metric learning task. Specifically, for each embedded local representation $\mathbf{f}_i^\ell$ , we enforce its embedding to be closer to the embedded global representation of the same object than any other object. The local-to-global reasoning objective can be written as: + +$$ +\mathcal {L} _ {\mathrm {G 2 L}} ^ {i, \ell} = \log (1 + \sum_ {\mathbf {g} _ {k} \neq \mathbf {g}} \exp \left(s \phi^ {\ell} \left(\mathbf {f} _ {i} ^ {\ell}\right) ^ {\top} \varphi \left(\mathbf {g} _ {k}\right) - s \phi^ {\ell} \left(\mathbf {f} _ {i} ^ {\ell}\right) ^ {\top} \varphi (\mathbf {g})\right) \tag {2} +$$ + +and + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {G} 2 \mathrm {L}} = \frac {1}{M} \sum_ {i, \ell} \mathcal {L} _ {\mathrm {G} 2 \mathrm {L}} ^ {i, \ell} (3) \\ = - \frac {1}{M} \sum_ {i, \ell} \log \frac {\exp \left(s \phi^ {\ell} \left(\mathbf {f} _ {i} ^ {\ell}\right) ^ {\top} \varphi (\mathbf {g})\right)}{\sum_ {k} \exp \left(s \phi^ {\ell} \left(\mathbf {f} _ {i} ^ {\ell}\right) ^ {\top} \varphi (\mathbf {g} _ {k})\right)}, (3) \\ \end{array} +$$ + +where $\{\mathbf{g}_k, k = 1,2,\dots,m\}$ are the global representations of different point sets in the mini-batch with batch size $m$ and $M$ is the number of local features. Inspired by the studies on metric learning for face recognition [9,30,48] that perform metric learning on features on a hypersphere, we normalize + +the outputs of prediction networks before computing similarities and use a constant value $s = 64$ [9] to re-scale the features. Empirically, our experiments show that forcing features to be distributed on a hypersphere with a radius of $s$ will significantly stabilize the training process and improve the discriminative ability of the learned features. + +Discussions: The proposed local-to-global reasoning is connected to mutual information maximization methods [3, 19, 22, 44] for unsupervised image representation learning. The multi-class N-pair loss can be viewed as a variant of InfoNCE [36]. Therefore, minimizing the $\mathcal{L}_{\mathrm{G2L}}$ maximizes the lower bound of the mutual information between local representations and global representation. From this perspective, our method captures the underlying semantic knowledge of a 3D object by maximizing the mutual information of features at different hierarchies. Unlike previous works that performs adversarial learning between the mutual information estimator and the feature encoder [22] or maximizes the mutual information of seen patches and unseen patches [19], different views of images [3] or different modalities of images [44], our work explores the distinct property of point clouds by connecting local and global structures of a 3D object. Furthermore, our local-to-global loss offers a metric learning view of InfoNCE, which is different from previous works that are based on Noise-Contrastive Estimation [34]. Benefiting our modifications inspired by metric learning and face recognition methods, we observe that our loss is more effective and stable than previous methods on point cloud understanding tasks in our experiments. + +# 3.3. Global-to-Local Reasoning + +Since discovering knowledge that is helpful for downstream tasks from unlabeled data is usually quite intractable, local-to-global reasoning may not necessarily lead to useful representations. This fact is also pointed out by studies on mutual information maximization methods [44, 45], where evidence shows that larger mutual information may not guarantee a better performance for downstream tasks [45]. Intuitively, since the local-to-global reasoning only supervises the local representation to be close to the global one, the quality of global representation is critical. This is, if the global representation is well initiated, decent supervision to local representation will be offered, thus creating a virtuous circle for the learning of local and global features. On the contrary, the learning process may obtain unpredictable results for the bad initial state of global representation. To avoid this issue, we propose an auxiliary global-to-local reasoning task to supervise the networks for learning useful representation corporately. Specifically, we employ two low-level generation tasks, including self-reconstruction and normal estimation as two self-supervision signals, such that global representation needs to capture the basic structural information of point clouds. + +Self-Reconstruction: Self-reconstruction, or point autoencoding, is a widely used technique for unsupervised point cloud representation learning [1,8,14,26,47,55,56]. To perform self-reconstruction, we adopt the folding-based [55] decoder $D$ to deform the canonical 2D grid onto 3D coordinates of a point cloud conditioned on the global representation $\mathbf{g}$ . The reconstruction error is defined as Chamfer Distance [12]: + +$$ +\mathcal {L} _ {\text {r e c o n}} = \sum_ {p \in P} \min _ {x \in D (\mathbf {g})} \| x - p \| _ {2} + \sum_ {x \in D (\mathbf {g})} \min _ {p \in P} \| x - p \| _ {2}. \tag {4} +$$ + +Normal Estimation: Normal estimation is a more challenging task that requires a higher level understanding of the underlying surface information of a 3D shape. Different from previous works [33] that pursue the estimation precision, we use this task as a supervisory signal to improve global representation. Thus, we simply concatenate the 3D coordinates with the global representation and employ a shared light-weight MLP $\sigma$ to produce the estimated normals. The cosine loss is used to measure the estimation error: + +$$ +\mathcal {L} _ {\text {n o r m a l}} = 1 - \frac {1}{N} \sum \cos (\sigma ([ p _ {i}, \varphi (\mathbf {g}) ]), p _ {i} ^ {\text {n o r m a l}}). \tag {5} +$$ + +Combining the local-to-global reasoning and the global-to-local reasoning, we arrive at the global-local bidirectional reasoning objective: + +$$ +\mathcal {L} _ {\mathrm {G L R}} = \mathcal {L} _ {\mathrm {L 2 G}} + \mathcal {L} _ {\mathrm {G 2 L}} = \mathcal {L} _ {\mathrm {L 2 G}} + \mathcal {L} _ {\text {r e c o n}} + \mathcal {L} _ {\text {n o r m a l}}. \tag {6} +$$ + +# 3.4. Point Cloud Analysis with GLR + +Unsupervised Learning with GLR: Point cloud representation can be unsupervisedly learned by enforcing networks to solve the proposed global-local reasoning (GLR) problems, where the representation can be used in various downstream point cloud analysis applications like object classification. The quality of unsupervisedly learned representation is usually evaluated by linear separability of classification task, where a supervised linear SVM [6] model or single-layer neural network is trained on unsupervised representations to measure the test accuracy. For PointNet++ [38] model and its variants, we use the aggregated representation for classification task, which is obtained by summarizing embedded global and local representations: + +$$ +\mathbf {f} = \left[ \mathcal {A} \left(\left\{\phi^ {1} \left(\mathbf {f} _ {i} ^ {1}\right) \right\}\right), \dots , \mathcal {A} \left(\left\{\phi^ {L} \left(\mathbf {f} _ {i} ^ {L} \right\}\right)\right), \varphi (\mathbf {g}) \right], \tag {7} +$$ + +where we use a max pooling operation $\mathcal{A}$ to aggregate local features of each abstraction level from 1 to $L$ and concatenate these features with the global feature. + +Hybrid Learning with GLR: Since supervisedly learned global representation can be viewed as a good initialization for the proposed GLR framework, our method is also compatible with supervised learning methods, where GLR serves as an auxiliary loss to further improve the robustness of representations. + +Implementation: All of our models is trained on a single GTX 1080ti GPU with deep learning library Pytorch [42]. To show our method can be used for various point cloud networks, we consider two baseline models: PointNet++ [38] and Relation-Shape CNN (RSCNN) [33]. Note that for both baseline models, we use the Single-Scale Grouping (SSG) [38] as the point grouping module, which is more than $3 \times$ smaller than Multi-Scale Grouping (MSG) [38] module used in original PointNet++ model. Besides, we divide the MLP used in each set abstraction layer into two fully connected layers and use them before and after aggregation operation, respectively. Our experiments show this modification can reduce computation and improve performance while keeping the number of parameters unchanged. For unsupervised learning setting, we train a linear SVM [6] on unsupervised representations of the training data and report the classification accuracy on the test set. For supervised learning and hybrid learning settings, we use the aforementioned aggregated representation for fair comparison and employ a two-layer classifier where dropout technique [41] with a ratio of $50\%$ is used for each layer. Our models are trained using Adam [24] optimizer with a base learning rate of 0.001, and we decay the learning rate by 0.7 every 20 epochs. The models are trained for 200 epochs, where the momentum for Batch Normalization [23] layers starts with 0.9 and decays with a rate of 0.5 every 20 epochs, following the practice of [33, 38]. Detailed model configurations can be found in Supplementary Material. + +# 4. Experiments + +We extensively evaluate our method on several widely used point cloud classification benchmark datasets including ModelNet10/40 [52], ScanObjectNN [46] and ScanNet [7]. We start by evaluating our method on the discriminative power, generalization ability and robustness across datasets and comparing with the state-of-the-art unsupervised and supervised methods. We then provide detailed experiments to analyze our method on model design and complexity. Finally, we visualize the learned representations to have an intuitive understanding of our method. The following describes the details of the experiments, results and analysis. + +# 4.1. Unsupervised Point Cloud Recognition + +Setup: We tested our method on ModelNet40/10 [52] and ScanObjectNN [46] benchmarks to compare with the state-of-the-arts. ModelNet40 and ModelNet10 comprise 9832/3991 training objects and 2468/908 test objects in 40 and 10 classes respectively, where the points are sampled from CAD models. ScanObjectNN [46] is a real-world data, where 2902 3D objects are extracted from scans. To conduct cross dataset evaluation, we used the "object-only" split in all our experiments. ScanNet [7] was also used in our cross data evaluation experiments, where we followed the + +![](images/93aae931b506ba54d5b7cb326a30f5e5e6dd5f83accddc53f99d87156046d269.jpg) +Figure 3: ModelNet40 classification accuracy $(\%)$ of our unsupervised models and their supervised counterparts. + +![](images/346c2ff25178ab3db431e3c6f7d050433ff86ed93267c0e1e38c90079fa657c5.jpg) + +Table 1: Classification accuracy (%) of three different training strategies on ModelNet40. + +
BackboneUnsupervisedSupervisedHybrid
PN++ (Small)92.2291.6992.42
PN++ (Large)93.0292.0192.76
RSCNN (Small)92.1791.6592.26
RSCNN (Large)92.9492.1492.78
+ +practice in [28] to obtain point cloud from indoor scenes according to the instance segmentation labels. In all our experiments, we sample 1024 points for each point cloud for training and evaluation and all our results are measured using a single view without using the multi-view voting trick to show the neat performance of different models. Surface normal information was used to provide unsupervised signals for our models trained on ModelNet and we did not use it as input. For the models trained on ScanObjectNN and ScanNet, we only used the self-reconstruction loss for global-to-local reasoning. + +Comparisons with the supervised counterparts: We first compared our method with the supervised baselines as presented in Figure 3, where we report the classification accuracy on ModelNet40 using the basic models $(1\times)$ and wider models (1.5 to $6\times$ channel width). Note that we used the same network architecture and training settings for our models and their counterparts for a fair comparison. Clearly, our unsupervised models with different channel widths consistently outperform the supervised counterparts. As increasing the model capacity, our models can achieve better performance and reach the highest accuracy using $5\times$ PointNet++ and $4\times$ RSCNN backbones. In the following experiments, we denote the basic $1\times$ models and the best models as "Small" and "Large" models respectively. Besides, we further compared three different training strategies: unsupervised learning, supervised learning and hybrid learning, which are presented in Table 1. We see hybrid learning can outperform both supervised and unsupervised models when the networks are small, but the unsupervised method achieves the best performance when large networks are used. + +Table 2: Comparisons of the classification accuracy (\%) of our method against the state-of-the-art unsupervised 3D representation learning methods on ModelNet40 and ModelNet10. † indicates that the model is trained on ShapeNet. + +
MethodInputAccuracy
MN40MN10
TL Network [15]voxel74.40-
VConv-DAE [39]voxel75.5080.50
3DGAN [50]voxel83.3091.00
VSL [29]voxel84.5091.00
VIPGAN [17]views91.9894.05
\( LGAN^† \)[1]points85.7095.30
LGAN [1]points87.2792.18
\( FoldingNet^† \)[55]points88.4094.40
\( FoldingNet \)[55]points84.3691.85
\( MRTNet^† \)[14]points86.40-
3D-PointCapsNet [56]points88.90-
MAP-VAE [18]points90.1594.82
Ours w/ \( PN++ \)(Small)points92.2294.82
Ours w/ \( PN++ \)(Large)points93.0295.53
Ours w/ RSCNN (Small)points92.1794.60
Ours w/ RSCNN (Large)points92.9495.50
+ +We conjecture that the supervised models are prone to overfitting more severely to the training set. All these results reveal that our unsupervised representation is more discriminative and generalizable than its supervised counterpart. + +Comparisons with the unsupervised state-of-the-arts: To show the effectiveness of the proposed global-local reasoning method, we compared several variants of our models with the state-of-the-art unsupervised representation learning methods in Table 2. Except for point-based methods, we also compare with some advanced voxel and view based methods. Note that we only use ModelNet40 as the training data, while some methods are trained on larger ShapeNet [52] dataset. Nevertheless, our models outperform all other methods by a large margin. As can be observed, our small PointNet++ model surpasses state-of-the-art methods and our large model significantly advances the best point cloud model (MAP-VAE) by $2.87\%$ on ModelNet40. + +Comparisons with the supervised state-of-the-arts: More notably, our method can even achieve very competitive results compared to state-of-the-art supervised methods in an unsupervised manner. We compared our method with the supervised methods on both the widely used synthetic dataset ModelNet and the recently proposed real-world dataset ScanObjectNN. Our unsupervised representation was trained on ModelNet40 and a linear SVM is then trained on the target dataset to produce predictions. The results are summarized in Table 3 and Table 4. Surprisingly, our unsupervised learned representation can outperform all other + +Table 3: Comparisons of the single-view classification accuracy (\%) of our method against the state-of-the-art supervised point cloud models on ModelNet40. We also list results that use more points, normal information ("nor") or/and multi-view voting trick ("vote") in gray as references. Besides, we show the supervised baselines of our models. + +
Method#PointsSupervisedAcc.
PointNet [37]1k✓89.2
PointNet++ [38]1k✓90.5
PointNet++ [38] (vote)1k✓90.7
SO-Net [27]1k✓92.5
PointCNN [28]1k✓92.5
DGCNN [49]1k✓92.9
DensePoint [32]1k✓92.8
DensePoint [32] (vote)1k✓93.2
RSCNN [33]1k✓92.9
RSCNN [33] (vote)1k✓93.6
DGCNN [49]2k✓93.5
PointNet++ [38] (vote, nor)5k✓91.9
SO-Net [27] (nor)5k✓93.4
KPConv [43]~ 6.8k✓92.9
PN++ (Large)1k✓92.1
Ours w/ PN++ (Large)1k✗93.0
RSCNN (Large)1k✓92.0
Ours w/ RSCNN (Large)1k✗92.9
+ +Table 4: Comparisons of the single-view classification accuracy $(\%)$ of our method against the state-of-the-art supervised point cloud models on ScanObjectNN. + +
MethodSupervisedAccuracy
3DmFV [4]✓73.8
PointNet [37]✓79.2
SpiderCNN [54]✓79.5
PointNet++ [38]✓84.3
DGCNN [49]✓86.2
PointCNN [28]✓85.5
Ours w/ PN++ (Large)✗87.2
Ours w/ RSCNN (Large)✗86.9
+ +state-of-the-arts methods in the single-view setting3 on both datasets. Since only a linear classifier is applied, these results demonstrate that our representation is much more discriminative than the supervised representation on the test set. Moreover, we observe that our representation can achieve very strong results on ScanObjectNN without finetuning. As the categories in ModelNet and ScanObjectNN are different, this evidence indicates that our method can discover semantic knowledge shared in different kinds of objects. + +Table 5: Cross dataset evaluation. We evaluate generalization ability of unsupervised and supervised representations to unseen datasets. We report the classification accuracy (\%) measured using a linear SVM trained on the target dataset. (Sup.: supervised) + +
TaskSup.OursΔ
ModelNet10 → ModelNet3085.4592.34+6.89
ModelNet30 → ModelNet1091.3295.47+4.15
ModelNet40 → ScanObjectNN65.9287.22+21.30
ScanObjectNN → ModelNet4078.7690.80+12.04
ModelNet40 → ScanNet77.3189.23+11.92
ScanNet → ModelNet4080.3891.32+10.94
ScanObjectNN → ScanNet84.3187.96+3.63
ScanNet → ScanObjectNN82.4485.43+2.99
+ +![](images/e588eed72a6b518d36b18f075963061261ca64b74fdfa66f4fa17c6e00a66b61.jpg) +Figure 4: The robustness of our method on sampling density and the number of training samples compared to the supervised baseline. + +![](images/4301191b22d319bc0badb2918814d31e267acd49247d523cf8451c3378428841.jpg) + +Cross Dataset Evaluation: To further explore the generalization ability of the learned representation, we conducted extensive cross data evaluation experiments on ModelNet, ScanObjectNN and ScanNet, which are varying in categories and sources. Our experiments were conducted based on the unsupervised representations of the PointNet++ large model and we compared the results with the supervised version of this model. Specifically, we trained the features using supervised or unsupervised learning methods on the source dataset and used a linear SVM trained on the target dataset to perform classification. The results are presented in Table 5, where we used the rest 30 categories in ModelNet40 apart from 10 categories in ModelNet10 to form the ModelNet30 dataset. We see the unsupervisedly learned representation has much stronger transferability than the supervised counterparts and our models generalize well to various unseen data since we learn from data structures instead of labels. Our method can maintain strong performance even in cross data evaluation, which reflects the unsupervised representation can be a generic representation of 3D objects cross datasets. + +Robustness Analysis: The robustness of our method on sampling density and the number of training samples is shown in Figure 4. For the former, we tested the model + +Table 6: Ablation study of our method. We report the classification accuracy (\%) on ModelNet40. $(\mathcal{L}_{\mathrm{L2G}})$ : local-to-global reasoning, $\mathcal{L}_{\mathrm{recon}}$ : self-reconstruction, Agg: multi-level feature aggregation in Eq. (7), $\mathcal{L}_{\mathrm{normal}}$ : normal estimation, SN: training on ShapeNet.) + +
Model\( {\mathcal{L}}_{\mathrm{L}2\mathrm{G}} \)\( {\mathcal{L}}_{\text{recon }} \)Agg.\( {\mathcal{L}}_{\text{normal }} \)SNAcc.
A✓86.77
B✓90.02
C✓✓90.96
D✓✓✓91.69
E✓✓✓✓92.22
F✓✓✓✓✓92.30
+ +Table 7: Complexity analysis. We report the FLOPs and GPU inference throughput with batch size 16. Measured on NVIDIA GTX 1080Ti GPU. (pc/s: point cloud(s) per second) + +
ModelFLOPsThroughputAcc.
MSG PN++ [38]1.68G113pc/s90.5
SSG RSCNN [33]0.30G634pc/s92.2
Our PN++ (Small)0.31G731pc/s92.2
MSG PN++ [38] (12 votes)14.15G9pc/s90.7
SSG RSCNN [33] (10 votes)2.95G63pc/s92.7
Our PN++ (Large)5.65G194pc/s93.0
+ +trained with 1024 points with sparser points of 1024, 512, 256, 128 and 64. Note that different from previous works [33, 38], we did not perform random input dropout during training. For the latter, we trained the representation with randomly sampled $100\%$ , $50\%$ , $25\%$ , $10\%$ and $1\%$ ModelNet40 training set and trained the linear classifier on the whole set. We used the PointNet++ large model in this experiment. Generally, we see our models are much more robust than their supervised versions. Notably, our method can maintain decent performance even when using only $10\%$ (983 samples) and $1\%$ (98 samples) training samples and achieve $91.4\%$ and $89.3\%$ accuracy on ModelNet40 respectively. + +Visualization: To have an intuitive understanding of our method, we visualized the unsupervised learn features. The results are presented in the supplementary material. + +# 4.2. Method Design Analysis + +Ablation Study: To examine the effectiveness of our designs, we conducted a detailed ablation study based on the small PointNet++ network. The results are summarized in Table 6. The baseline model A can be viewed as a variant of FoldingNet [55], which was trained by self-reconstruction loss only and gets a low classification accuracy of $86.77\%$ . We see the model trained by the proposed local-to-global reasoning task (model B) can significantly improve the baseline + +model by $3.25\%$ . This convincingly verifies its effectiveness. Then, when incorporating these two losses, the accuracy can be further improved to $90.96\%$ . We also observe a $0.73\%$ improvement by aggregating local and global representations (model D). Our full model can be obtained by adding normal estimation supervision (model E), which achieves a notable $92.22\%$ accuracy on ModelNet40 with a very lightweight network. In addition, we also investigated the training set size by adding more training data (model F) from ShapeNet [52], but obtaining a slight improvement on accuracy $(0.08\%)$ . We conjecture that ModelNet is large enough for learning a good representation. Thus we conducted most of the experiments on ModelNet. + +Complexity Analysis: Table 7 shows the model complexity in theoretical computation cost (in FLOPs) and actual inference throughput on GPU of our models and several state-of-the-art methods. We see our large model requires considerable computation cost but maintains an acceptable actual cost on GPU due to the simplicity of the SSG model. These results reveal that increasing channel width can achieve a better trade-off on speed and accuracy compared to voting. For computational cost-sensitive applications, we think our learned model can provide strong supervision to train lighter models for real-time applications by model distillation [20] or generating pseudo labels [25], which is an interesting direction for future research. + +# 5. Conclusion + +We have proposed a new scheme for unsupervised representation learning of 3D point clouds by bidirectional global-local reasoning. Comprehensive experimental studies have demonstrated our unsupervisedly learned representation can surpass its supervised counterpart and achieve state-of-the-art performance on several widely used benchmarks. We expect our method to open a new door for learning better point cloud representation from data structures instead of human annotation. Transferring the learned knowledge to more efficient models and extending our method to more point cloud analysis scenarios like segmentation and detection are interesting directions in future work. + +# 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 Beijing Academy of Artificial Intelligence (BAAI), in part by a grant from the Institute for Guo Qiang, Tsinghua University, in part by the Shenzhen Fundamental Research Fund (Subject Arrangement) under Grant JCYJ20170412170602564, and in part by Tsinghua University Initiative Scientific Research Program. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. In ICML, 2018. 1, 3, 5, 6 +[2] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point convolutional neural networks by extension operators. arXiv preprint arXiv:1803.10091, 2018. 1, 3 +[3] Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. arXiv preprint arXiv:1906.00910, 2019. 2, 4 +[4] Yizhak Ben-Shabat, Michael Lindenbaum, and Anath Fischer. 3dmfv: Three-dimensional point cloud classification in real-time using convolutional neural networks. IEEE Robotics and Automation Letters, 3(4):3145-3152, 2018. 7 +[5] Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. T-PAMI, 35(8):1798-1828, 2013. 2 +[6] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3):273-297, 1995. 5 +[7] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In CVPR, pages 5828-5839, 2017. 5 +[8] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppf-foldnet: Unsupervised learning of rotation invariant 3d local descriptors. In ECCV, pages 602-618, 2018. 1, 3, 5 +[9] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In CVPR, pages 4690–4699, 2019. 4 +[10] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In ICCV, pages 1422-1430, 2015. 2 +[11] Carl Doersch and Andrew Zisserman. Multi-task self-supervised visual learning. In ICCV, pages 2051-2060, 2017. 2 +[12] 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. 5 +[13] Kunihiko Fukushima and Sei Miyake. Neocognitron: A self-organizing neural network model for a mechanism of visual pattern recognition. In Competition and cooperation in neural nets, pages 267–285. Springer, 1982. 2 +[14] Matheus Gadelha, Rui Wang, and Subhransu Maji. Multiresolution tree networks for 3d point cloud processing. In ECCV, pages 103-118, 2018. 1, 3, 5, 6 +[15] Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In ECCV, pages 484-499. Springer, 2016. 6 +[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, pages 2672-2680, 2014. 2 +[17] Zhizhong Han, Mingyang Shang, Yu-Shen Liu, and Matthias Zwicker. View inter-prediction gan: Unsupervised representation learning for 3d shapes by learning global shape memories + +to support local view predictions. In AAAI, volume 33, pages 8376-8384, 2019. 6 +[18] Zhizhong Han, Xiyang Wang, Yu-Shen Liu, and Matthias Zwicker. Multi-angle point cloud-vae: unsupervised feature learning for 3d point clouds from multiple angles by joint self-reconstruction and half-to-half prediction. ICCV, 2019. 1, 3, 6 +[19] 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. 2, 4 +[20] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 8 +[21] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504-507, 2006. 2 +[22] 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. *ICLR*, 2019. 4 +[23] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 5 +[24] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[25] Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In ICMLW, volume 3, page 2, 2013. 8 +[26] Chun-Liang Li, Manzil Zaheer, Yang Zhang, Barnabas Poc-zos, and Ruslan Salakhutdinov. Point cloud gan. arXiv preprint arXiv:1810.05795, 2018. 1, 2, 3, 5 +[27] Jiaxin Li, Ben M Chen, and Gim Hee Lee. So-net: Self-organizing network for point cloud analysis. In CVPR, pages 9397–9406, 2018. 7 +[28] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. In NeurIPS, pages 828-838, 2018. 1, 2, 3, 6, 7 +[29] Shikun Liu, Lee Giles, and Alexander Ororbia. Learning a hierarchical latent-variable model of 3d shapes. In $3DV$ , pages 542-551. IEEE, 2018. 6 +[30] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherface: Deep hypersphere embedding for face recognition. In CVPR, pages 212-220, 2017. 4 +[31] Xinhai Liu, Zhizhong Han, Xin Wen, Yu-Shen Liu, and Matthias Zwicker. L2g auto-encoder: Understanding point clouds by local-to-global reconstruction with hierarchical self-attention. In ACM MM, pages 989–997. ACM, 2019. 1, 3 +[32] Yongcheng Liu, Bin Fan, Gaofeng Meng, Jiwen Lu, Shiming Xiang, and Chunhong Pan. Densepoint: Learning densely contextual representation for efficient point cloud processing. In ICCV, pages 5239-5248, 2019. 7 +[33] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. In CVPR, pages 8895-8904, 2019. 1, 2, 3, 5, 7, 8 + +[34] Andriy Mnih and Koray Kavukcuoglu. Learning word embeddings efficiently with noise-contrastive estimation. In NeurIPS, pages 2265–2273, 2013. 4 +[35] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. 2 +[36] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 4 +[37] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. CVPR, 1(2):4, 2017. 2, 3, 7 +[38] 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. 1, 2, 3, 5, 7, 8 +[39] Abhishek Sharma, Oliver Grau, and Mario Fritz. Vconv-dae: Deep volumetric shape learning without object labels. In ECCV, pages 236-250. Springer, 2016. 6 +[40] Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In NeurIPS, pages 1857-1865, 2016. 4 +[41] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 15(1):1929-1958, 2014. 5 +[42] Benoit Steiner, Zachary DeVito, Soumith Chintala, Sam Gross, Adam Paszke, Francisco Massa, Adam Lerer, Gregory Chanan, Zeming Lin, Edward Yang, et al. Pytorch: An imperative style, high-performance deep learning library. NeurIPS, 32, 2019. 5 +[43] Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatz Marcotegui, Francois Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. ICCV, 2019. 1, 3, 7 +[44] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019. 2, 4 +[45] Michael Tschannen, Josip Djolonga, Paul K. Rubenstein, Sylvain Gelly, and Lucic Mario. On mutual information maximization for representation learning. arXiv preprint arXiv:1907.13625, 2019. 4 +[46] Mikaela Angelina Uy, Quang-Hieu Pham, Binh-Son Hua, Thanh Nguyen, and Sai-Kit Yeung. Revisiting point cloud classification: A new benchmark dataset and classification model on real-world data. In ICCV, pages 1588–1597, 2019. 2, 5 +[47] Diego Valsesia, Giulia Fracastoro, and Enrico Magli. Learning localized generative models for 3d point clouds via graph convolution. In ICLR, 2019. 1, 3, 5 +[48] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In CVPR, pages 5265-5274, 2018. 4 +[49] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E. Sarma, Michael M. Bronstein, and Justin M. Solomon. Dynamic graph cnn for learning on point clouds. TOG, 2019. 1, 2, 3, 7 + +[50] Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In NeurIPS, pages 82–90, 2016. 6 +[51] Wenxuan Wu, Zhongang Qi, and Li Fuxin. Pointconv: Deep convolutional networks on 3d point clouds. In CVPR, pages 9621-9630, 2019. 1, 2, 3 +[52] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In CVPR, pages 1912-1920, 2015. 2, 5, 6, 8 +[53] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pages 3733-3742, 2018. 4 +[54] Yifan Xu, Tianqi Fan, Mingye Xu, Long Zeng, and Yu Qiao. SpiderCNN: Deep learning on point sets with parameterized convolutional filters. ECCV, 2018. 1, 3, 7 +[55] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In CVPR, pages 206–215, 2018. 1, 3, 5, 6, 8 +[56] Yongheng Zhao, Tolga Birdal, Haowen Deng, and Federico Tombari. 3d point capsule networks. In CVPR, pages 1009-1018, 2019. 1, 3, 5, 6 \ No newline at end of file diff --git a/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/images.zip b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b1832a3a664217a296b99e445ae01434561fb18e --- /dev/null +++ b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ede7f3af1c856b3076875a1f72bea31228428aad5a8dfa895f74af82fc458de2 +size 426955 diff --git a/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/layout.json b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..397a3ab1bd65cad102a3606c77d8dc99c1876a96 --- /dev/null +++ b/globallocalbidirectionalreasoningforunsupervisedrepresentationlearningof3dpointclouds/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e19a6ea28eb23ab18003fdf1bb17bfcea46f141bac9395bb55f6bd225f9268c +size 344243 diff --git a/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_content_list.json b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0914d377d60ed7daa0fcbc08fcc535824f452e8d --- /dev/null +++ b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd9ee0cc662620d8519425c99e4c152f177918bef7ecdf452ac6aca9c3302367 +size 78263 diff --git a/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_model.json b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0956e99724688f7749be3c6ec8ba9cade8a03524 --- /dev/null +++ b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:046f5b028226eaf12fab02170e6044c448ba5a0b388259547c70d7fe9618cc75 +size 98798 diff --git a/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_origin.pdf b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2cf2e31ae08349b0a5bd1ead983a6e0c1425fb7a --- /dev/null +++ b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/d846373b-08a0-4831-9584-6e628e86218b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5501ba15c0a6ddbb6a65571a0be1974a601f76f178cbbf2aabccc64e6df9136f +size 1825976 diff --git a/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/full.md b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ef720f9836f0eb17ae27f8cf4f78f2428f078ec3 --- /dev/null +++ b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/full.md @@ -0,0 +1,319 @@ +# Global-Local GCN: Large-Scale Label Noise Cleansing for Face Recognition + +Yaobin Zhang, Weihong Deng*, Mei Wang, Jiani Hu +Beijing University of Posts and Telecommunications + +{zhangyaobin, whdeng, wangmeil, jnhu}@bupt.edu.cn + +Xian Li, Dongyue Zhao, Dongchao Wen +Canon Information Technology (Beijing) Co., Ltd +{lixian, zhaodongyue, wendongchao}@canon-ib.com.cn + +# Abstract + +In the field of face recognition, large-scale web-collected datasets are essential for learning discriminative representations, but they suffer from noisy identity labels, such as outliers and label flips. It is beneficial to automatically cleanse their label noise for improving recognition accuracy. Unfortunately, existing cleansing methods cannot accurately identify noise in the wild. To solve this problem, we propose an effective automatic label noise cleansing framework for face recognition datasets, FaceGraph. Using two cascaded graph convolutional networks, FaceGraph performs global-to-local discrimination to select useful data in a noisy environment. Extensive experiments show that cleansing widely used datasets, such as CASIA-WebFace, VGGFace2, MegaFace2, and MS-Celeb-1M, using the proposed method can improve the recognition performance of state-of-the-art representation learning methods like Arcface. Further, we cleanse massive self-collected celebrity data, namely MillionCelebs, to provide 18.8M images of 636K identities. Training with the new data, Arcface surpasses state-of-the-art performance by a notable margin to reach $95.62\%$ TPR at 1e-5 FPR on the IJB-C benchmark. + +# 1. Introduction + +Label noise cleansing is a long-term issue in building up a dataset [9, 10, 24, 25, 30, 32]. Many studies [7, 20, 43, 44, 48, 58] point out that a noisy dataset is very harmful to model training. In recent years, the face recognition community witnesses a boost in datasets, from the first widely used deep training set CASIA-WebFace (CASIA) [54] to MS-Celeb-1M (MS1M) [21], UMDFace [8] and VGGFace2 [12]. The increasing data scale helps improve the face recognition accuracy, but the label noise also keeps increasing with their scale [43]. Therefore, to construct an effective face recognition training set, on the one + +![](images/d6c40cf65900ae4bf393c8ca8dcc7a725e4da8d88dce56755ebbc1580fb1ee48.jpg) + +![](images/9695ce3da1b33393600b991929fd39cdba168661dec10690d369f6b39cbe6114.jpg) + +![](images/292e758a5548d5e6d2cd40ba371551399294ed69d0137d50f093b778d8452e25.jpg) +(a) Raw data +(c) Edge prediction +Figure 1: Three ideas for face data cleansing. (a) Face data in one identity. (b) Center-based: select images according to their distance to the identity center. (c) Graph-based edge prediction: predict edges on a graph, and pick nodes in the biggest component. (d) Graph-based node prediction: directly predict whether a node is a signal or noise on a graph. + +![](images/a8e4b31ab08718cd7de02181d37b32fa9298512a7b72a2f3c3895b7b9fda38f5.jpg) +(b) Center-based +(d) Node prediction (ours) + +hand, it is necessary to collect as many face images as possible. On the other hand, there must be a reliable data cleansing method to detect and reduce label noise in the dataset. + +Figure 1 compares two existing ideas with ours for cleansing large-scale face recognition datasets. As opposed to noise, the correctly labeled images are denoted as "signals". Suppose there are 10 face samples for an identity, five of which are signals (green box) and the others are noise (red box). Center-based algorithms (Figure 1b) compute the center of each identity and then select samples that are closer to the center as signals. They usually ignore the relationships between samples and rely heavily on the rate + +of signals [7, 54]. In fact, signals can gather together in the feature space, while noise is usually similar to only a few samples. This can be well represented by the graph structure. Considering a face image as a node on the graph, Figure 1c predicts edges between nodes according to their pairwise relationships, then picks nodes in the biggest component as signals. There is a strong assumption in this type of work [14, 36, 47] that all signals are connected. Many graph information other than node relationships is also lost. In this paper, the cleansing idea in Figure 1d is adopted, i.e., directly predicts whether the nodes are signals or noise on the graph. It is more robust to big noise because of its decentralized graph structure. Further, using graph convolution techniques, the cleansing model not only learns node-wise relationships but also performs global awareness on the graph to get more discriminative node representations. + +We find that a single-stage Graph Convolutional Network (GCN) can make global predictions to get good results on many graph-based tasks [13, 29, 41, 49, 53, 59], but sometimes ignores local details of the graph, causing widespread prediction errors in some difficult local regions. To solve this problem, our proposed FaceGraph leverages a cascaded framework with two stages of carefully designed GCNs, namely Global Graph Net and Local Graph Net, to make predictions in a global-to-local manner. The first network makes global graph prediction, then the second network makes local-aware refinement. To efficiently train them, a novel propagation function and some training schemes such as multi-task learning and cooperative learning are designed. In the data cleansing task, FaceGraph outperforms a single-stage GCN by a notable margin and can remove noise more accurately than previous methods. + +To verify the proposed method on real data, we cleanse four widely used large-scale face datasets CASIA [54], MegaFace2 [36], MS1M [21], and VGGFace2 [12]. The effectiveness is assessed in terms of the comparative recognition performance of Arcface [15] trained on different datasets. The results show that datasets cleansed by FaceGraph effectively improve the face recognition performance compared with the ones cleansed by previous methods. Furthermore, to address the problems of low number of identities and high noise rate in the existing face datasets [43, 44], we take a great effort to collect and cleanse a large-scale face dataset, MillionCelebs, using the proposed method. The cleansed MillionCelebs dataset provides 18.8M images of 636K identities, which can largely facilitate the study of large-scale deep face recognition. For instance, the Arcface method trained by this new dataset outperforms state-of-the-art performance on the IJB-C by a notable margin. + +The main contributions can be summarized as follows: (1) We propose the first GCN-based label noise cleansing method for face recognition datasets, significantly enhancing the cleansing performance. (2) A two-stage global-local + +GCN framework is designed with performance far beyond a single-stage network. (3) The MillionCelebs dataset is collected and cleansed to promote state-of-the-art face recognition performance and facilitate the study on large-scale deep learning. MillionCelebs is better than existing public datasets in terms of data size and the number of identities. + +# 2. Related Work + +Label Noise Cleansing. The label noise cleansing methods can be divided into graph-based and non-graph-based. Except for some manual reviewing work [8, 43], non-graph-based methods are usually straightforward and easier to manipulate, but their effects are limited. Angelova et al. [5] adopt data pruning to build a dataset. CASIA-WebFace [54] cleanses every subject by taking its "main photo" as a seed to accept other faces constrained by similarities and tags. VGGFace [38] and VGGFace2 [12] train SVM classifiers to reject outliers. Celeb500k [11] trains a CNN-based label predictor to select samples in a bootstrapping manner. + +Differently, graph-based methods fully consider the data structure. Mode filters [18, 19] recognize noise on a graph by semi-supervised learning. RT [47] iteratively removes noise by instance pruning. MegaFace2 [28] clusters images according to the average pairwise distance in one identity. Unfortunately, most graph-based cleansing attempts have artificially designed parameters, which are hard to take full advantage of the data information. This paper develops a graph-based automatic learnable cleansing algorithm. + +Graph Convolutional Networks. Following the idea of CNNs, GCN is proposed to process problems with non-Euclidean data [49]. The work on semi-supervised classification [29] provides the basic propagation formulation of a multi-layer GCN. Some work [13, 33, 41, 51, 53] modifies it to apply GCN into different categories, such as knowledge base construction and text classification. GraphSAGE [22] learns a principle of aggregation to extend GCN into inductive representation learning. GAT [42] learns a graph attention model in feature propagation. In the computer vision community, GPP [59] predicts positive neighbors in person re-identification. Zhong et al. [57] deploy GCN for anomaly detection. Some other work [45, 52] uses GCN to do face clustering. Different from clustering, the cleansing task needs to select one subgroup from a big group of data, while the others are dropped. In this paper, we explore the introduction of GCN into the field of face dataset cleansing. + +# 3. Methodology + +# 3.1. Overview + +Consider a large-scale face image dataset with label noise, for instance, the celebrity images return by searching keywords on the web. Since the images are naturally + +![](images/ea1a073c2b145da9b5ac5f69bdedb14aa751d021f8ea97408e03549588a4bc1c.jpg) +Figure 2: Overview of FaceGraph. Images in one identity are represented as nodes, and a $k$ -NN graph is built based on deep features. A two-stage cascaded global-local cleansing is performed. In the first stage, GGN classifies all nodes globally. Based on its result, local subgraphs are built for difficult regions, and all subgraphs go through the parameters shared LGNs. The prediction results of LGNs are fused to update GGN result as the output graph. High-scoring nodes are picked as signals. + +grouped by the name of the celebrity, we apply the proposed method to cleanse label noise for each group separately. This procedure largely saves manual labor to label the images. Since the performance of deep face recognition has surpassed human significantly [39], it is possible to achieve better cleansing results than manual labeling. Assume that $n$ face samples in one identity are represented as $d$ -dimensional $l2$ -normalized features $\boldsymbol{x}_i$ , $i \in \{1, 2, \dots, n\}$ . So the identity can be represented as matrix $X = [\boldsymbol{x}_1, \boldsymbol{x}_2, \dots, \boldsymbol{x}_n]^T \in \mathbb{R}^{n \times d}$ . The cleansing task predicts labels $Y = [\boldsymbol{y}_1, \boldsymbol{y}_2, \dots, \boldsymbol{y}_n]^T$ for all $n$ instances, where $\boldsymbol{y}_i \in \{0, 1\}$ , 1 representing signals and 0 representing noise. As shown in Figure 2, FaceGraph is proposed to address the label noise problem with cascaded global-local GCNs: first making global sense (Section 3.2), then locally refining the result with rebuilt subgraphs (Section 3.3). + +# 3.2. Global Graph Net + +Global Graph Net (GGN) is a $L$ -layer node classification graph convolutional network. Based on the pairwise cosine similarity $S$ of feature matrix $X$ + +$$ +S = X X ^ {T}, \tag {1} +$$ + +a $k$ -NN graph $\mathcal{G}$ is built. Taking $\mathcal{G}$ as input, GGN judges nodes on the graph are signals or noise. Figure 3 shows the GGN forward propagation algorithm. The general GCN layer-wise forward propagation formula of node $i$ is + +$$ +\boldsymbol {h} _ {i} ^ {(l + 1)} = \sigma \left[ F _ {j \in \mathcal {N} _ {i}} \left(\boldsymbol {h} _ {j} ^ {(l)}\right) \mathbf {W} ^ {(l)} \right] \tag {2} +$$ + +where $\pmb{h}_j^{(l)}$ means the $l$ -th layer output of node $j$ , $\pmb{h}_j^{(0)} = \pmb{x}_j$ . $\mathcal{N}_i$ is a collection of all neighbors of node $i$ (include itself). $F: \mathbb{R}^{m \times d_{in}} \to \mathbb{R}^{d'}$ is a transforming function that transforms the features of node $i$ and its neighbors into one feature of $d'$ dimension, $m$ is the number of elements in $\mathcal{N}_i$ . $\mathbf{W}^{(l)} \in \mathbb{R}^{d' \times d_{out}}$ is a learnable matrix in the $l$ -th layer. $\sigma$ denotes the activation function. Therefore, the forward + +propagation of a node can be regarded as alternately performing the following two operations: first executing feature transformation $F$ according to its neighbors, then passing through a fully connected layer $\mathbf{W}$ with activation $\sigma$ . + +Since there are big differences between the identities in a face recognition dataset, strong generalization ability is very essential to cleanse it. Following the idea of GraphSAGE [22] that learns a generalizable aggregator, we design the transforming function $F$ in Equation 2 as + +$$ +F _ {j \in \mathcal {N} _ {i}} \left(\boldsymbol {h} _ {j} ^ {(l)}\right) = \left[ \boldsymbol {h} _ {i} ^ {(l)} \| A g g r e g a t e _ {j \in \mathcal {N} _ {i}} \left(\tilde {s _ {i j}} \boldsymbol {h} _ {j} ^ {(l)}\right) \right] \tag {3} +$$ + +where $\tilde{s_{ij}} = \frac{S_{ij}}{\sqrt{D_iD_j}}$ is the normalized similarity score between node $i$ and $j$ , which appears as a weight term in the function. $D_{i}$ is the degree of node $i$ [29]. Aggregate is a learnable aggregating principal function, and $\| \cdot$ is the concatenation operator. Considering that face recognition is mainly based on pairwise similarity, the similarity matrix $S$ is used to help the aggregation process. For node $i$ , the features of its neighbors are weighted by $\tilde{s_{ij}}$ when aggregating, so that the neighbors with low similarity to node $i$ are forced to provide less weighted aggregating information. Then the aggregated vector is directly concatenated with $h_i$ by a "shortcut" to obtain a $d^{\prime} = 2d$ dimensional vector. This shortcut reserves the original node information along with the information from the aggregated neighbors. Aggregate is designed as the sum of the outputs of a neuron: + +$$ +A g g r e g a t e _ {j \in \mathcal {N} _ {i}} \left(\boldsymbol {h} _ {j} ^ {(l)}\right) = \sum_ {j \in \mathcal {N} _ {i}} \sigma \left(\boldsymbol {h} _ {j} ^ {(l)} \mathbf {A} ^ {(l)} + \mathbf {b} ^ {(l)}\right) \tag {4} +$$ + +where $\mathbf{A}^{(l)}$ and $\mathbf{b}^{(l)}$ are deployed to learn the face aggregating principle in the $l$ -th layer. At the last layer, we deploy $\mathbf{W}^{(L)} \in \mathbb{R}^{d' \times 1}$ and sigmoid activation to predict scores for all nodes. The nodes whose score is higher than a threshold are judged as signals. In back-propagation, Stochastic + +![](images/0900e22db1ebe4c63ee92a063667efb5b4d2591ce64b0ecf2b22853faca1decc.jpg) +Figure 3: Global Graph Net architecture and forward propagation algorithm of node $i$ between layer $(l)$ and $(l + 1)$ . + +Gradient Descent (SGD) by the binary cross-entropy loss is used. For a graph with $N$ nodes, the GGN loss is + +$$ +\mathcal {L} _ {G} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \hat {\boldsymbol {y}} _ {i} \cdot \log \boldsymbol {y} _ {i} + (1 - \hat {\boldsymbol {y}} _ {i}) \cdot \log (1 - \boldsymbol {y} _ {i}) \right] \tag {5} +$$ + +where $\pmb{y}_i$ is the network output score of node $i$ between 0 and 1, and $\hat{\pmb{y}}_i\in \{0,1\}$ is the label of node $i$ . + +# 3.3. Local Graph Net + +GGN can handle most simple cases but may ignore local details on a complicated graph and output scores around 0.5 for hard nodes in some local regions, e.g., boundary nodes that are simultaneously adjacent to multiple signals and noise. The second stage network, Local Graph Net (LGN), is designed to solve these hard nodes. We define "low confidence nodes" as nodes that GGN outputs scores between 0.2 and 0.8, and define "high confidence nodes" the complement of low confidence nodes. Low confidence nodes are randomly selected as "local centers" on the graph, then their one-hop and two-hop neighbors are taken to build the local subgraphs. There are two special cases: (a) If one subgraph does not contain any GGN predicted signals, which means it takes very limited graph information, this subgraph is discarded. (b) If GGN predicts all nodes with high confidence, then no "centers" can be found, we pick the nodes that GGN predicts as signals to construct the only one subgraph. + +All generated subgraphs go through parameters shared LGNs for subtle discrimination. LGN is designed the same as GGN in network architecture and outputs scores like GGN as well. For every node, if it is included in at least one subgraph, we obtain its final score by averaging its results from all LGNs that output scores for it. On the contrary, if it is not included in any of the local subgraphs, which means it is neither a local center nor within two-hop range of any local centers, this node is easy to judge and we obtain its final score by simply taking the GGN judgment result of it. + +![](images/07f6d0c4f70093ad645aaa0bb5a9bf0da842b518a385bb79f5fe7e22a8feae4d.jpg) +(a) Images under ID: 0c4f6bn + +![](images/6af4e6008b3766073d19c903e0b5c06d53b7351259fe7b0ff1531b5a6e8a47db.jpg) +(b) Four kinds of garbage classes +Figure 4: Examples of signals and garbage classes. (a) Images of a randomly selected identity from MillionCelebs. (b) Four kinds of garbage classes: fake faces, unrecognizable faces, blurred faces, and face-like patterns. + +Multi-task Learning. In order to let LGN learn to identify useless images from different perspectives, a multi-task learning framework is designed. The node classification task predicts scores for the nodes, and the graph classification task predicts scores for the graph to refuse "garbage class" noise. The two tasks promote each other, which allows LGN to better distinguish the difference between outliers and garbages, so it can improve the recognition of both types of noise. "Garbage class" noise is inevitable in face datasets. Images in a garbage class are all wrongly accepted by the face detector and have nothing to help in learning human faces. Figure 4 shows a good class and four kinds of garbage classes in our dataset. With the supervision of the graph classification task, LGN can directly refuse the entire graph if it is judged as a garbage class. All graph classification results of LGNs vote to make the final decision. GGN is not designed as multi-task learning because its big intraclass noise can interfere with the graph classification judgment. In back-propagation, the LGN loss $\mathcal{L}_L$ is a linear sum of two binary cross-entropy loss by a weight term $\lambda$ : node classification loss $\mathcal{L}_n$ and graph classification loss $\mathcal{L}_g$ . + +$$ +\mathcal {L} _ {L} = \mathcal {L} _ {n} + \lambda \mathcal {L} _ {g} \tag {6} +$$ + +$\mathcal{L}_n$ supervises the node predictions like $\mathcal{L}_G$ . Differently, to calculate $\mathcal{L}_n$ , low confidence nodes are given more weights so that LGN can focus on hard local information. $\mathcal{L}_g$ supervises the network prediction of garbage classes. To calculate it, output features of the second to the last layer of all nodes predicted as signals are averaged as the graph feature. It passes through a fully connected layer with sigmoid activation to obtain the garbage class prediction score. + +# 3.4. Discussion + +In order to unify both global and local scales, an end-to-end "Cooperative Learning" (CL) scheme is designed as shown in Figure 5. For a graph data batch, one CL iteration + +![](images/a5a879d1716feebbdfb760517af142c4ba8eca52936729046bc789fc6f944436.jpg) +Figure 5: The three-step training scheme "Cooperative Learning". The solid line represents forward propagation and the dotted line represents back propagation. + +includes three learning steps. First, update GGN with $\mathcal{L}_G$ . Then take output features of the second to the last layer of GGN as the input of LGN, and LGN is updated with $\mathcal{L}_L$ . Finally, the gradient of $\mathcal{L}_L$ is multiplied by a scaling factor $\alpha$ to back-propagate to GGN, and GGN is updated again. CL helps the two networks promote each other: In feedforward, LGN can learn local predictions from easy to hard based on the real-time classification results of GGN to help convergence, and in back-propagation, GGN can improve its global predictions with gradients from hard local regions. + +The intra-class label noise is cleansed, but the label flip noise still exists, i.e., face images in one class may actually belong to the person of another class, or two classes may contain face images of the same person. To solve these problems, we average the features of cleansed images in each class to get its feature center. Two classes whose center distance is less than a threshold are combined into one class. Then we compare features of all discarded images with all centers, and put one image into one class if it has a high similarity with the center of that class. Finally, following Cao et al. [12], we use the VLAD descriptor clustering [6, 27] to remove duplicated images in the dataset. + +# 4. Experiments + +# 4.1. Experimental Setup + +Evaluation Metrics The label noise of data is categorized as outliers, label flips, and garbage classes. In order to evaluate the data cleansing performance, we build a labeled simulation dataset by randomly selecting 2,000 identities for training and 2,000 identities for testing from IMDb-Face [43], which is a manually cleansed face recognition dataset with noise level under $2\%$ . The clustering metrics BCubed precision (P), recall (R) and F1-measure (F) [4] are adapted for the cleansing tasks. Unlike clustering tasks that every sample should be assigned with a specific classification label, outliers in the cleansing task do not belong to any class and should be discarded. So we do not take outliers + +
Datasets# photos# subjectsNoisy
CASIA-WebFace [54]0.5M10K×
IMDb-Face [43]1.7M59K×
VGGFace2 [12]3.3M9K×
MegaFace2 [36]4.7M672K✓
MS-Celeb-1M [21]7.5M100K✓
MillionCelebs87.0M1M✓
- MegaFace2 [36]20.0M734K×
- FaceGraph18.8M636K×
+ +Table 1: Training datasets used in our experiments. “√” in the last column means label noise rate $>30\%$ . + +and samples mistaken as outliers into the iteration of accumulating P and R. Alternatively, signal rate (SR) and the number of images remained in the cleansed dataset (# remained) are calculated to measure the ability to identify and remove outliers. For the real data validation, we evaluate face recognition performance of ResNet [23] models trained on original and cleansed datasets by the Arcface loss [15]. Ten-fold verification sets [12, 17, 26, 35, 40, 55, 56] are used to test face verification accuracy. The MegaFace Challenge 1 [28] evaluates face recognition performance under 1M distractors environment. The IJB benchmarks [34, 46] evaluate template-wise face recognition performance. + +Implementation Details Table 1 shows face training sets used in our experiments, where “-X” means the dataset is cleansed by method “X”. To guarantee the reliability of graph structures, we obtain 512-dimensional face features from a ResNet100 Arcface model trained with cleansed MS1M, then build 3-NN graphs with self-loop on all nodes. GCNs are designed as 5 layers with 256-dimensional hidden features. The learning rate is 0.001 with weight decay 0.0005 and graph batch size 50. $\alpha$ and $\lambda$ are set 1 and 0.5. + +# 4.2. Experiments on Simulation Datasets + +In this section, we add noise to the simulation dataset and re-cleanse it: We gradually replace its images with randomly selected images from the rest of IMDb-Face as outliers, and randomly put images from one identity to another as label flips. Besides, the simulation dataset is always polluted by $10\%$ "garbage class" noise selected from MS1M [21]. Comparative methods include method of Bansel et al. [7], MegaFace2 [36], VGGFace2 [12] and Celeb500k [11]. GCN [29] and GraphSAGE [22] are also trained in the same way as FaceGraph. An ablation study is made with four setups: only GGN, separately trained FaceGraph (GGN + LGN), and CL trained FaceGraph with (CL + MT) or without (CL) multi-task learning. In the absence of multi-task learning, networks are trained to predict all nodes as noise for garbage classes. For a fair comparison, the garbage removal strategy of MegaFace2 [36] is applied + +
Cleansing MethodsF (%)SR (%)# remained
Noisy--54436
Bansel et al. [7]83.3077.1030128
VGGFace2 [12]48.0441.4335481
Celeb500k [11]73.0772.2917187
MegaFace2 [36]82.6781.6726711
GCN [29]85.3187.0620616
GraphSAGE [22]85.5983.2626985
GGN89.0981.9928660
FaceGraph - GGN+LGN89.8678.6329053
FaceGraph - CL89.4781.9728729
FaceGraph - CL+MT90.0395.5924071
+ +Table 2: F-score, signal rate and the number of remained images of different methods under garbage rate $10\%$ , outlier rate $30\%$ , and label flip rate $30\%$ . + +![](images/64a0c3b330907caf6fa41eafc6d3efced18cb616b94242a2298d1004d411e7a1.jpg) +(a) GGN +Figure 6: FaceGraph output graph of one class in the test set. The numbers on nodes are the prediction scores of networks (in percentage). Wrongly judged nodes (blue) of GGN are corrected by the second-stage LGN, so all noise (gray) and signals (red) are successfully classified. + +![](images/a3da529155d20cf9202dca3bc7bb7ec46542f1c407694100c8d9a2a5eb58332c.jpg) +(b) GGN + LGN + +to methods that do not consider garbage classes. + +In Table 2, we cleanse a dataset with $30\%$ outliers and $30\%$ label flips. It is observed that the GCN-based methods remain stronger discrimination ability while comparable methods lose power in a big noise environment. For FaceGraph, when we separately train two-stage networks, it performs $3.36\%$ worse than a single GGN in signal rate, meaning LGN cannot learn local details efficiently. However, when trained with "CL", FaceGraph maintains the same level signal rate with more images remained than a single GGN, and reaches a higher F at $89.47\%$ . To explore how LGN affects judgment, we visualize the output graph of one class in test sets as in Figure 6. We find that the low confidence nodes, especially wrong nodes, tend to gather together to form some "local regions" that are difficult to deal with. Our algorithm reasonably builds more subgraphs in the difficult regions, so the final judgment of the nodes in these regions can fuse more opinions. It is also observed that the wrong nodes in GGN usually occur in large complicated graphs, while a two-hop range maintains most information for valid graph convolution, so LGNs can focus + +![](images/59a50162d232036a2d96cd8d897dc736875e0dc4e9719f7472d7138c31b490e7.jpg) +(a) F varies with label flip rate + +![](images/cc8c8d92ea93cd36337384059725f925303172577c347e20f7a5f382972b151f.jpg) +(b) F varies with outlier rate + +![](images/178629ba6414e38bdff3b73bd21632d42eb1ffdc8712dd0f2b6dc296866be832.jpg) +Figure 7: Model robustness at different noise levels. The FaceGraph model is stable with the noise rate changing. +Figure 8: ROC curves and AUCs of recognizing useless images. The FaceGraph models can discard useless images with higher confidence than other GCN-based methods. + +on the data distribution of local and hard cases by receiving only small subgraphs as input to simplify the prediction. + +Figure 7 shows cleansing the dataset with gradually contaminated noise. In 7a, we set the outliers at $30\%$ , and vary the label flips from $0\%$ to $60\%$ in steps of $20\%$ ; In 7b, we set the label flips at $30\%$ , and vary the outliers from $0\%$ to $60\%$ in steps of $20\%$ . Celeb500k's model [11] is excluded from comparison because it is trained for specific classes without generalization ability. We find that algorithms have similar performance when the noise rate is low. However, artificial designed methods, especially SVM trained VGGFace2's method [12], drop sharply at high noise rate, while the FaceGraph model is robust to different noise levels. + +ROC curves in Figure 8 compare the ability to remove useless images (outliers and garbage classes) of GCN-based methods. For calculation convenience, we adjust outliers to $60\%$ and do not add label flips. FaceGraph methods all reach higher AUC than GCN and GraphSAGE, for example, a single GGN model surpasses GCN [29] by $8.9\%$ and GraphSAGE [22] by $1.8\%$ . Except "GGN + LGN", FaceGraph methods have much higher TPR at FPR less than 1e-3, which means that they are more confident to remove obvious outliers and garbages. Under the same circumstance, "CL" outperforms "GGN + LGN" by $1.9\%$ AUC. "CL + MT" achieves the highest F $(90.03\%)$ , SR $(95.59\%)$ and + +
Training DatasetsLFWCFP-FPAgeDBCALFWCPLFWSLLFWVGG2-FPAverage
CASIA [54]99.3895.1994.5592.2885.9098.1793.3894.12
-Cleansed by [3]99.3095.0194.4592.1586.2297.9393.1894.03
-FaceGraph99.4295.1994.6592.5586.4397.8893.7894.27
VGGFace2 [12]99.5896.9395.7393.6392.0798.8795.8096.08
-FaceGraph99.6297.0395.9893.5392.1398.8896.0496.17
MegaFace2 [36]99.5791.6789.4089.8283.5298.1391.9892.01
-FaceGraph99.5892.9389.8089.1584.9298.3292.4692.45
MS1M [21]99.6094.1696.4093.0686.8398.9893.7094.67
-IBUG [16]99.8092.7697.7095.3587.4599.4893.0495.08
-DeepGlint [1]99.8093.6697.8295.6388.7599.4392.1695.32
-FaceGraph99.8096.9097.9295.6792.2799.5095.4296.78
+ +Table 3: Cleansse 4 face recognition datasets and train deep models by Arcface [15] to test face verification accuracy $(\%)$ FaceGraph cleansed versions surpass others on at least 6 out of 7 verification sets, and always enhance the average accuracy. + +![](images/8161f1671181d2bd61276a2b7af086ca0c05ae61606cc38648028a3c5f434097.jpg) + +![](images/9b4f1fa750fc864e5c5372da890db74d65a028f85ab0f800e291d429578099a7.jpg) +(c) Before cleansing + +![](images/629d2cface9b301c34fcddd01b80f001f5bd05d1e239e8042f666b6ff10e187f.jpg) + +![](images/f5eea1a3cd1796bfeb4d97c6b09570146a02297afff159cdb0c454a81183b750.jpg) +(d) After cleansing +Figure 9: Visualization of cleansing randomly selected 8 classes from MS1M. (a)(b) t-SNE [31] data distribution; (c)(d) Histogram of pairwise cosine similarity in one class. + +AUC $(97.7\%)$ while keeping the number of remained images moderate, showing that multi-task learning not only helps to recognize garbage classes but also helps to cleanse outliers and label flips, because the model can better distinguish the difference between different types of noise. + +# 4.3. Experiments on Existing Datasets + +A noise-free dataset can significantly enhance the face recognition performance [7, 20, 43], but existing face recognition datasets mostly suffer from label noise problem [43]. In this section, four widely used face datasets are cleansed by the "FaceGraph - CL+MT" model. Considering the data size, CASIA [54] is trained with ResNet34 [23], while others are trained with ResNet50 [23]. Identities that contain less than 8 images in the MegaFace2 dataset [36] are deleted because too many identities with a small number of images can affect its convergence. Table 3 compares face verifi + +cation performances of the original and cleansed datasets. With a smaller amount of data, FaceGraph achieves the highest average accuracy for all datasets and performs better on at least 6 out of 7 test sets. For a dataset with big noise like MS1M [21], FaceGraph gets significant improvement on all test sets and enhances the average recognition accuracy by $2.11\%$ . On the cross-pose and cross-age tests, MS1M-FaceGraph outperforms MS1M by $2.61\%$ on CALFW [56] and $5.44\%$ on CPLFW [55], showing that FaceGraph can master large pose and age gap cases, reserving variations of the same person. Therefore, FaceGraph makes a good trade-off between cleanliness and diversity. + +Randomly selecting 8 classes from MS1M [21], Figure 9 visualizes the feature space distribution using t-SNE [31] embeddings and the histogram of intra-class pairwise similarity of images before and after cleansing. In Figure 9a9b, every class is represented by one color. The original data distribution is very scattered. After cleansing, most scattered samples in one class are discarded, leaving one group that can gather together. In Figure 9c9d, there are two main peaks in the histogram before cleansing, which are at similarity 0.0 and 0.5. The former is obviously caused by the label noise. After cleansing, the peak at 0.0 disappears, meaning that the noise is removed successfully. Moreover, FaceGraph does not eliminate all low-similarity pairs. There are still a few pairs around 0.0 to reserve face variation. + +# 4.4. Experiments on Large-Scale Cleansing + +MillionCelebs A large-scale face recognition training set, namely MillionCelebs, is collected according to a celebrity name list released by Guo et al. [21]. We download 50-100 images for each celebrity from the Internet Image Search Engine, detect faces with MTCNN [50], then align and crop the images to $112 \times 112$ face warps. In this way, we get 87.0M face images of 1M identities. FaceGraph is used to cleanse these images, then we carefully remove + +![](images/f5f127f32a6e2ea93f7842d04c328230f777a918e748704bc51ef5c8fa2e7bbf.jpg) +Figure 10: Demography statistics of MC-FaceGraph. + +![](images/a00014ef514a6fc1fd28a1d6d853186c039003b63f79bc178c86aa16c7ba18c5.jpg) + +![](images/aa0307e19e7ed8775bcda7e4bd601deaf181dd4eb868271b5691d004bc2200cd.jpg) + +identities overlapping with LFW [26], FaceScrub [37] and IJB [34, 46]. Finally, we obtain a cleansed version with 18.8M faces of 636.2k identities, namely MC-FaceGraph. Figure 10 shows demography statistics of MC-FaceGraph extracted from Freebase [2]. It has a great variety in the distribution of human ethnicity and age. Most importantly, it is a large-scale dataset with very high cleanliness, which can significantly improve the face recognition performance. + +To verify the value of FaceGraph in large-scale applications, a ResNet100 [23] face recognition model is trained with MC-FaceGraph. Training with initial SGD learning rate 0.1, weight decay 0.0005 and batch size 720, we decrease the learning rate by 0.1 at the 366,000th, 498,000th, 638,000th iterations, and stop at the 748,000th iteration. Comparable models are trained under the same environment with different training sets. For a fair comparison, the cleansing method of MegaFace2 [36] is also applied to cleanse MillionCelebs, noted as "MC-MegaFace2" [36]. + +MegaFace MegaFace Challenge 1 [28] is a large-scale face recognition challenge that tests the model performance under one million distractors. It measures TPR at 1e-6 FPR for verification and Rank-1 retrieval performance for identification. In Table 4, adopting FaceScrub [37] as probe set and using the wash list provided by DeepInsight [15], the results of two MillionCelebs cleansed versions do not differ a lot, but they all outperform other training datasets by a large margin. For instance, the identification accuracy of MC-FaceGraph is $0.67\%$ higher than MS1M-V2 [15] to reach $99.02\%$ . It nearly saturates the MegaFace Challenge on both identification and verification protocols. + +IJB The IJB-B [46] and IJB-C [34] benchmarks test template-wise face recognition performance. The verification TPR at 1e-5 FPR and identification Rank-1 are reported in Table 5. MC-FaceGraph trained model surpasses all candidates by a large margin. Figure 11 compares ROC curves of listed methods. Two MillionCelebs versions have the same level performance at higher FPR. However, verification accuracy of the MC-MegaFace2 [36] drops sharply at 1e-4 FPR, and becomes worse than many small-scale datasets at 1e-5 FPR. This shows that a large number of identities and images do not necessarily mean an increase in face recognition performance. If there are strict requirements for identifying negative pairs, it is essential to train with a dataset of great cleanliness to learn detailed features. + +
Training DatasetsVer.(%)Id.(%)
CASIA [54]97.1192.93
Asian [1]94.9091.21
IMDb-Face [43]97.8796.26
VGGFace2 [12]98.0095.54
MS1M-IBUG [16]98.2597.53
MS1M-V2 [15]98.4898.35
MC - MegaFace2 [36]98.9798.96
MC - FaceGraph98.9499.02
+ +Table 4: Verification TPR (@FPR=1e-6) and identification Rank-1 on the MegaFace Challenge 1 [28]. "MC-X" means MillionCelebs cleansed by method "X". + +
Training DatasetsIJB-BIJB-C
Ver.(%)Id.(%)Ver.(%)Id.(%)
CASIA [54]62.4286.7069.6188.05
Asian [1]79.1291.2982.6492.26
IMDb-Face [43]64.8793.4166.8594.52
VGGFace2 [12]41.6493.2059.3394.44
MS1M-IBUG [16]80.2792.1988.1693.54
MS1M-V2 [15]89.3394.5093.1595.72
MC - MegaFace2 [36]62.6795.0476.2996.10
MC - FaceGraph92.8295.7695.6296.93
+ +Table 5: Verification TPR (@FPR=1e-5) and identification Rank-1 on the IJB-B [46] and IJB-C [34] benchmarks. + +![](images/9f246f9e1cc84fbb6c53d68dc3f3104e10b14cdf28a429648ddb74dedbd8d418.jpg) +(a) IJB-B + +![](images/ceb2e19018775f913f41c3cf8a9c65513bc1de132e0624667df37c6aa05d25f2.jpg) +(b) IJB-C +Figure 11: Verification ROC curves on IJB-B and IJB-C. MC-FaceGraph keeps good performance at very strict FPR. + +# 5. Conclusion + +In this paper, we propose a novel label noise cleansing method FaceGraph and build a large-scale face recognition dataset MillionCelebs. In the experiments, FaceGraph provides high-quality cleansing results, surpassing existing methods in the ability to find and reject label noise. The MillionCelebs dataset cleansed by FaceGraph also achieves remarkable performance on many benchmarks. + +Acknowledgments This work was supported by Canon Information Technology (Beijing) Co., Ltd. under Grant No. OLA19023. + +# References + +[1] Challenge 3: Face feature test/trillion pairs. trillionpairs deepglint.com. +[2] Freebase data dump. www.freebase.com. +[3] Github: happynear/faceverification. http://github.com/happynear/FaceVerification/. +[4] Enrique Amigó, Julio Gonzalo, Javier Artiles, and Felisa Verdejo. A comparison of extrinsic clustering evaluation metrics based on formal constraints. Information retrieval, 12(4):461-486, 2009. +[5] Anelia Angelova, Yaser Abu-Mostafam, and Pietro Perona. Pruning training sets for learning of object categories. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), volume 1, pages 494-501. IEEE, 2005. +[6] Relja Arandjelovic and Andrew Zisserman. All about vlad. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 1578-1585, 2013. +[7] Ankan Bansal, Carlos Castillo, Rajeev Ranjan, and Rama Chellappa. The do's and don'ts for cnn-based face verification. In Proceedings of the IEEE International Conference on Computer Vision, pages 2545-2554, 2017. +[8] Ankan Bansal, Anirudh Nanduri, Carlos D Castillo, Rajeev Ranjan, and Rama Chellappa. Umdfaces: An annotated face dataset for training deep networks. In 2017 IEEE International Joint Conference on Biometrics (IJCB), pages 464-473. IEEE, 2017. +[9] Carla E Brodley and Mark A Friedl. Identifying mislabeled training data. Journal of artificial intelligence research, 11:131-167, 1999. +[10] Carla E Brodley, Mark A Friedl, et al. Identifying and eliminating mislabeled training instances. In Proceedings of the National Conference on Artificial Intelligence, pages 799-805, 1996. +[11] Jiajiong Cao, Yingming Li, and Zhongfei Zhang. Celeb-500k: A large training dataset for face recognition. In 2018 25th IEEE International Conference on Image Processing (ICIP), pages 2406–2410. IEEE, 2018. +[12] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zisserman. Vggface2: A dataset for recognising faces across pose and age. In Automatic Face & Gesture Recognition (FG 2018), 2018 13th IEEE International Conference on, pages 67-74. IEEE, 2018. +[13] Zhengdao Chen, Xiang Li, and Joan Bruna. Supervised community detection with line graph neural networks. arXiv preprint arXiv:1705.08415, 2017. +[14] Sarah Jane Delany, Nicola Segata, and Brian Mac Namee. Profiling instances in noise reduction. Knowledge-Based Systems, 31:28-40, 2012. +[15] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4690-4699, 2019. +[16] Jiankang Deng, Yuxiang Zhou, and Stefanos Zafeiriou. Marginal loss for deep face recognition. In Proceedings + +of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 60-68, 2017. +[17] Weihong Deng, Jiani Hu, Nanhai Zhang, Binghui Chen, and Jun Guo. Fine-grained face verification: Fglfw database, baselines, and human-dcmn partnership. Pattern Recognition, 66:63-73, 2017. +[18] Weiwei Du and Kiichi Urahama. Error-correcting semi-supervised learning with mode-filter on graphs. In 2009 IEEE 12th International Conference on Computer Vision Workshops, ICCV Workshops, pages 2095-2100. IEEE, 2009. +[19] Weiwei Du and Kiichi Urahama. Error-correcting semi-supervised pattern recognition with mode filter on graphs. In 2010 2nd International Symposium on Aware Computing, pages 6-11. IEEE, 2010. +[20] Benoit Frénay and Michel Verleysen. Classification in the presence of label noise: a survey. IEEE transactions on neural networks and learning systems, 25(5):845-869, 2013. +[21] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In European conference on computer vision, pages 87–102. Springer, 2016. +[22] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pages 1024-1034, 2017. +[23] 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. +[24] Mauricio A Hernández and Salvatore J Stolfo. Real-world data is dirty: Data cleansing and the merge/purge problem. Data mining and knowledge discovery, 2(1):9-37, 1998. +[25] Ray J Hickey. Noise modelling and evaluating learning from examples. Artificial Intelligence, 82(1-2):157-179, 1996. +[26] Gary B Huang, Marwan Mattar, Tamara Berg, and Eric Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. In Workshop on faces in 'Real-Life' Images: detection, alignment, and recognition, 2008. +[27] Herve Jegou, Florent Perronnin, Matthijs Douze, Jorge Sánchez, Patrick Perez, and Cordelia Schmid. Aggregating local image descriptors into compact codes. IEEE transactions on pattern analysis and machine intelligence, 34(9):1704-1716, 2011. +[28] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan Brossard. The megaface benchmark: 1 million faces for recognition at scale. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4873-4882, 2016. +[29] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. +[30] Stéphane Lallich, Fabrice Muhlenbach, and Djamel A Zighed. Improving classification by removing or relabeling mislabeled instances. In International Symposium on Methodologies for Intelligent Systems, pages 5-15. Springer, 2002. + +[31] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. +[32] Jonathan I Maletic and Andrian Marcus. Data cleansing: Beyond integrity analysis. In $Iq$ , pages 200–209. CiteSeer, 2000. +[33] Diego Marcheggiani and Ivan Titov. Encoding sentences with graph convolutional networks for semantic role labeling. arXiv preprint arXiv:1703.04826, 2017. +[34] Brianna Maze, Jocelyn Adams, James A Duncan, Nathan Kalka, Tim Miller, Charles Otto, Anil K Jain, W Tyler Niggel, Janet Anderson, Jordan Cheney, et al. Iarpa janus benchmark-c: Face dataset and protocol. In 2018 International Conference on Biometrics (ICB), pages 158-165. IEEE, 2018. +[35] Stylianos Moschoglou, Athanasios Papaioannou, Christos Sagonas, Jiankang Deng, Irene Kotsia, and Stefanos Zafeiriou. Agedb: The first manually collected, in-the-wild age database. In Computer Vision and Pattern Recognition Workshops, pages 1997-2005, 2017. +[36] Aaron Nech and Ira Kemelmacher-Shlizerman. Level playing field for million scale face recognition. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3406-3415. IEEE, 2017. +[37] Hong-Wei Ng and Stefan Winkler. A data-driven approach to cleaning large face datasets. In 2014 IEEE international conference on image processing (ICIP), pages 343-347. IEEE, 2014. +[38] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, et al. Deep face recognition. In bmvc, volume 1, page 6, 2015. +[39] P Jonathon Phillips, Amy N Yates, Ying Hu, Carina A Hahn, Eilidh Noyes, Kelsey Jackson, Jacqueline G Cava-zos, Geraldine Jeckeln, Rajeev Ranjan, Swami Sankaranarayanan, et al. Face recognition accuracy of forensic examiners, superrecognizers, and face recognition algorithms. Proceedings of the National Academy of Sciences, 115(24):6171-6176, 2018. +[40] C.D. Castillo V.M. Patel R. Chellappa D.W. Jacobs S. Sen Gupta, J.C. Cheng. Frontal to profile face verification in the wild. In IEEE Conference on Applications of Computer Vision, February 2016. +[41] Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. In European Semantic Web Conference, pages 593-607. Springer, 2018. +[42] Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017. +[43] Fei Wang, Liren Chen, Cheng Li, Shiyao Huang, Yanjie Chen, Chen Qian, and Chen Change Loy. The devil of face recognition is in the noise. In European Conference on Computer Vision, pages 780-795. Springer, 2018. +[44] Mei Wang and Weihong Deng. Deep face recognition: A survey. arXiv preprint arXiv:1804.06655, 2018. +[45] Zhongdao Wang, Liang Zheng, Yali Li, and Shengjin Wang. Linkage based face clustering via graph convolution network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1117-1125, 2019. + +[46] Cameron Whitelam, Emma Taborsky, Austin Blanton, Brianna Maze, Jocelyn Adams, Tim Miller, Nathan Kalka, Anil K Jain, James A Duncan, Kristen Allen, et al. Iarpa janus benchmark-b face dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 90-98, 2017. +[47] D Randall Wilson and Tony R Martinez. Instance pruning techniques. In ICML, volume 97, pages 400-411, 1997. +[48] 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):2884-2896, 2018. +[49] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S Yu. A comprehensive survey on graph neural networks. arXiv preprint arXiv:1901.00596, 2019. +[50] Jia Xiang and Gengming Zhu. Joint face detection and facial expression recognition with mtcnn. In Information Science and Control Engineering (ICISCE), 2017 4th International Conference on, pages 424-427. IEEE, 2017. +[51] 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. +[52] Lei Yang, Xiaohang Zhan, Dapeng Chen, Junjie Yan, Chen Change Loy, and Dahua Lin. Learning to cluster faces on an affinity graph. pages 2298-2306, 2019. +[53] Liang Yao, Chengsheng Mao, and Yuan Luo. Graph convolutional networks for text classification. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 7370-7377, 2019. +[54] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z Li. Learning face representation from scratch. arXiv preprint arXiv:1411.7923, 2014. +[55] T. Zheng and W. Deng. Cross-posed lfw: A database for studying cross-posed face recognition in unconstrained environments. Technical Report 18-01, Beijing University of Posts and Telecommunications, February 2018. +[56] Tianyue Zheng, Weihong Deng, and Jiani Hu. Cross-age LFW: A database for studying cross-age face recognition in unconstrained environments. CoRR, abs/1708.08197, 2017. +[57] Jia-Xing Zhong, Nannan Li, Weijie Kong, Shan Liu, Thomas H Li, and Ge Li. Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1237-1246, 2019. +[58] Yaoyao Zhong, Weihong Deng, Mei Wang, Jiani Hu, Jianteng Peng, Xunqiang Tao, and Yaohai Huang. Unequaltraining for deep face recognition with long-tailed noisy data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7812-7821, 2019. +[59] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Learning to adapt invariance in memory for person re-identification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. \ No newline at end of file diff --git a/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/images.zip b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9e5f2e2a13274372a21785577d58096aa765097b --- /dev/null +++ b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:235a7fe755ef9f5a62999427626a551d33c2c50defdfbdabc888677d4cf6f8be +size 631444 diff --git a/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/layout.json b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..44009c6de69c1fc8732d68b4b287038d983bb66f --- /dev/null +++ b/globallocalgcnlargescalelabelnoisecleansingforfacerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7ab2e40d29095668f32cae8e506c0064af866f22bb066e8e2f71e5c62c2006d +size 422244 diff --git a/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_content_list.json b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7ffcfbb988faa802b244a57f9117ba696bfac879 --- /dev/null +++ b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d68ae1ac29ff5c7a616402253f6ecbea40a88bbaea905c623f903411ccb2fbb6 +size 96050 diff --git a/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_model.json b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..980a4d918cef7e478614d8496f37d85632c3caa6 --- /dev/null +++ b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:537932cbecb1f351f4cf12bc74655bd4e075a3a106295851654edd4629e7a2ed +size 116379 diff --git a/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_origin.pdf b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..190e788f02fbc3e4a7ef506329092c77c725798b --- /dev/null +++ b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/32a720c6-93ff-4f45-beaf-f5ea8452f3b6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:042f9c92b987a953f89b52a27d05d9de5814970e9935b2bef22b750763ef7ca6 +size 1694491 diff --git a/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/full.md b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3369ca37a21d3922e3d475c2956158472908fcf6 --- /dev/null +++ b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/full.md @@ -0,0 +1,626 @@ +# Globally Optimal Contrast Maximisation for Event-based Motion Estimation + +Daqi Liu Álvaro Parra Tat-Jun Chin + +School of Computer Science, The University of Adelaide + +{daqi.liu, alvaro.parrabustos, tat-jun.chin}@adelaide.edu.au + +# Abstract + +Contrast maximisation estimates the motion captured in an event stream by maximising the sharpness of the motion-compensated event image. To carry out contrast maximisation, many previous works employ iterative optimisation algorithms, such as conjugate gradient, which require good initialisation to avoid converging to bad local minima. To alleviate this weakness, we propose a new globally optimal event-based motion estimation algorithm. Based on branch-and-bound (BnB), our method solves rotational (3DoF) motion estimation on event streams, which supports practical applications such as video stabilisation and attitude estimation. Underpinning our method are novel bounding functions for contrast maximisation, whose theoretical validity is rigorously established. We show concrete examples from public datasets where globally optimal solutions are vital to the success of contrast maximisation. Despite its exact nature, our algorithm is currently able to process a 50,000-event input in $\approx 300$ seconds (a locally optimal solver takes $\approx 30$ seconds on the same input). The potential for GPU acceleration will also be discussed. + +# 1. Introduction + +By asynchronously detecting brightness changes, event cameras offer a fundamentally different way to detect and characterise physical motion. Currently, active research is being conducted to employ event cameras in many areas, such as robotics/UAVs [9, 21], autonomous driving[22, 31, 32], and spacecraft navigation [7, 8]. While the utility of event cameras extends beyond motion perception, e.g., object recognition and tracking [26, 28], the focus of our work is on estimating visual motion using event cameras. + +Due to the different nature of the data, new approaches are required to extract motion from event streams. A recent successful framework is contrast maximisation (CM) [13]. Given an event stream, CM aims to find the motion parameters that yield the sharpest motion-compensated event image; see Fig. 1. Intuitively, the correct motion parameters will align corresponding events, thereby producing an im + +![](images/0133fe322f99e2e2b8feae7e24e27f1b2f2d72406857535c51e4b42d2a73bc86.jpg) +(a) Event stream (w/o polarity). + +![](images/fb0c83573c5a6c6e84f106225e093bd5894f0f636ad68d85ccbc1c7bebc22d39.jpg) +(b) Contrast $= 0.9993$ (identity). + +![](images/bb7bae18e2457a13dffb7f0ed251dfb41f4a1095e0490ff218b9322d287c791e.jpg) +(c) Contrast $= 1.0103$ (local). + +![](images/d4e8ad37d1d64e43f3a32c545d17125efd4a913876588898eab78d58408f47de.jpg) +(d) Contrast $= 1.9748$ (global). +Figure 1. (a) $10\mathrm{ms}$ event stream under rotational motion [14]. Since event polarity is not used in our work, the events are plotted in the same colour. (b) Event image without motion compensation (identity transformation). (c)(d) Event images produced with locally and globally optimal contrast maximisation. + +age with high contrast. We formally define CM below. + +Event image Let $\mathcal{E} = \{e_i\}_i^N$ be an event stream recorded over time duration $\mathcal{T} = [0,t_{\mathrm{max}}]$ . Each event $e_i = (\mathbf{u}_i,t_i,p_i)$ contains an image position $\mathbf{u}_i$ , time stamp $t_i \in \mathcal{T}$ , and polarity $p_i \in \{-1, + 1\}$ . We assume $\mathcal{E}$ was produced under camera motion $\mathcal{M}$ over a 3D scene, thus each $e_i$ is associated with a scene point that triggered the event. + +We parameterise $\mathcal{M}$ by a vector $\omega \in \Omega$ , and let $X = \{\mathbf{x}_j\}_{j=1}^P$ be the centre coordinates of the pixels in the image plane of the event sensor. Under CM, the event image $H_c$ is defined as a function of $\omega$ , and the intensity at pixel $\mathbf{x}_j$ is + +$$ +H _ {c} \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) = \sum_ {i = 1} ^ {N} \delta \left(\mathbf {x} _ {j} - f \left(\mathbf {u} _ {i}, t _ {i}; \boldsymbol {\omega}\right)\right), \tag {1} +$$ + +where $\delta$ is a kernel function (e.g., Gaussian). Following [13, Sec. 2.1], we do not use event polarities in (1). $H_{c}$ + +is regarded to be captured at time 0, and the function + +$$ +\mathbf {u} _ {i} ^ {\prime} = f \left(\mathbf {u} _ {i}, t _ {i}; \omega\right) \tag {2} +$$ + +warps $\mathbf{u}_i$ to $\mathbf{u}_i'$ in $H_c$ by "undoing" the motion $\mathcal{M}$ between time 0 and $t_i$ . Intuitively, $\mathbf{u}_i'$ is the image position of the 3D scene point that triggered $e_i$ , if it was observed at time 0. + +In practice, the region of support of the kernel $\delta$ in (1) is small w.r.t. image dimensions, e.g., Gaussian kernels with bandwidth $\sigma = 1$ pixel were used in [13, Sec. 2]. This motivates the usage of "discrete" event images + +$$ +H _ {d} \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) = \sum_ {i = 1} ^ {N} \mathbb {I} \left(f \left(\mathbf {u} _ {i}, t _ {i}; \boldsymbol {\omega}\right) \text {l i e s i n p i x e l} \mathbf {x} _ {j}\right), \tag {3} +$$ + +where $\mathbb{I}$ returns 1 if the input predicate is true, and 0 otherwise. As we will show later, conducting CM using $H_{c}$ (with small bandwidth) and $H_{d}$ yields almost identical results. + +Contrast maximisation The contrast of an event image $H$ (continuous or discrete) is the variance of its pixel values. Since $H$ depends on $\omega$ , the contrast is also a function of $\omega$ + +$$ +C (\boldsymbol {\omega}) = \frac {1}{P} \sum_ {j = 1} ^ {P} \left(H \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) - \mu (\boldsymbol {\omega})\right) ^ {2}, \tag {4} +$$ + +where $\mu (\omega)$ is the mean intensity + +$$ +\mu (\boldsymbol {\omega}) = \frac {1}{P} \sum_ {j = 1} ^ {P} H \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right). \tag {5} +$$ + +CM [13] estimates $\mathcal{M}$ by maximising the contrast of $H$ , i.e., + +$$ +\max _ {\boldsymbol {\omega} \in \Omega} C (\boldsymbol {\omega}). \tag {6} +$$ + +The intuition is that the correct $\omega$ will allow $\mathcal{M}$ to align events that correspond to the same scene points in $H$ , thus leading to a sharp or high-contrast event image; see Fig. 1. + +Global versus local solutions By globally optimal (or "global") solution to CM (6), we mean $\omega^{*} \in \Omega$ such that + +$$ +C \left(\boldsymbol {\omega} ^ {*}\right) \geq C (\boldsymbol {\omega}) \forall \boldsymbol {\omega} \in \Omega . \tag {7} +$$ + +A solution $\hat{\omega}$ is approximate if $C(\hat{\omega}) < C(\omega^{*})$ . Also, a solution is locally optimal (or "local") if it is the maximiser of its neighbourhood [24, Chap. 2]. All global solutions are locally optimal, but the converse is not true. + +# 1.1. Previous works + +Previous works on CM (e.g., [11, 13, 28, 29]) apply nonlinear optimisation (e.g., conjugate gradient) to solve (6). Given an initial solution $\omega^{(0)}$ , the solution is successively updated until convergence to a locally optimal solution. In practice, if the local solution is a bad approximate solution, + +there can be significant differences in its quality compared to the global solution; see Fig. 1. This can occur when $\omega^{(0)}$ is too distant from good solutions, or $C(\omega)$ is too nonconcave (e.g., when $\delta$ has a very small bandwidth). Thus, algorithms that can find $\omega^*$ are desirable. + +Recent improvements to CM include modifying the objective function to better suit the targeted settings [11, 29]. However, the optimisation work horse remains locally optimal methods. Other frameworks for event processing [6, 7, 12, 18, 19, 20] conduct filtering, Hough transform, or specialised optimisation schemes; these are generally less flexible than CM [13]. There is also active research in applying deep learning to event data [27, 33, 35, 36], which require a separate training phase on large datasets. + +Contributions We focus on estimating rotational motion from events, which is useful for several applications, e.g., video stabilisation [14] and attitude estimation [8]. + +Specifically, we propose a BnB method for globally optimal CM for rotation estimation. Unlike previous CM techniques, our algorithm does not require external initialisations $\omega^{(0)}$ , and can guarantee finding the global solution $\omega^{*}$ to (6). Our core contributions are novel bounding functions for CM, whose theoretical validity are established. As we will show in Sec. 4, while local methods generally produce acceptable results [13, 14], they often fail during periods with fast rotational motions. On the other hand, our global method always returns accurate results. + +# 2. Rotation estimation from events + +If duration $\mathcal{T}$ is small (e.g., $t_{\mathrm{max}} = 10ms$ ), a fixed axis of rotation and constant angular velocity can be assumed for $\mathcal{M}$ [13]. Following [13, Sec. 3], $\mathcal{M}$ can be parametrised as a 3-vector $\omega$ , where the direction of $\omega$ is the axis of rotation, and the length $\| \omega \|_2$ of $\omega$ is the angular rate of change. Between time 0 and $t$ , the rotation undergone is + +$$ +\mathbf {R} (t; \omega) = \exp ([ \omega t ] _ {\times}), \tag {8} +$$ + +where $\omega t$ is the axis-angle representation of the rotation, $[\omega t]_{\times}$ is the skew symmetric form of $\omega t$ , and $\exp$ is the exponential map (see [1] for details). + +Let $\mathbf{K}$ be the $3\times 3$ intrinsic matrix of the event camera $(\mathbf{K}$ is known after calibration [2, 34]). The warp (2) is thus + +$$ +f \left(\mathbf {u} _ {i}, t _ {i}; \omega\right) = \frac {\mathbf {K} ^ {(1 : 2)} \mathbf {R} \left(t _ {i} ; \omega\right) \tilde {\mathbf {u}} _ {i}}{\mathbf {K} ^ {(3)} \mathbf {R} \left(t _ {i} ; \omega\right) \tilde {\mathbf {u}} _ {i}}, \tag {9} +$$ + +where $\tilde{\mathbf{u}}_i = [\mathbf{u}_i^T 1]^T$ is the homogeneous version of $\mathbf{u}_i$ , and $\mathbf{K}^{(1:2)}$ and $\mathbf{K}^{(3)}$ are respectively the first-two rows and third row of $\mathbf{K}$ . Intuitively, (9) rotates the ray that passes through $\mathbf{u}_i$ using $\mathbf{R}(t_i; \boldsymbol{\omega})$ , then projects the rotated ray onto $H$ . + +Following [13, Sec. 3], we also assume a known maximum angular rate $r_{\mathrm{max}}$ . The domain is thus an $r_{\mathrm{max}}$ -ball + +$$ +\Omega = \left\{\omega \in \mathbb {R} ^ {3} \mid \| \omega \| _ {2} \leq r _ {\max } \right\}, \tag {10} +$$ + +and our problem reduces to maximising $C(\omega)$ over this ball, based on the rotational motion model (9). + +# 2.1. Main algorithm + +Algorithm 1 summarises our BnB algorithm to achieve globally optimal CM for rotation estimation. Starting from the tightest bounding cube $\mathbb{B}$ on the $r_{\mathrm{max}}$ -ball $\Omega$ (the initial $\mathbb{B}$ is thus of size $(2r_{\mathrm{max}})^3$ ), the algorithm recursively subdivides $\mathbb{B}$ and prunes the subcubes until the global solution is found. A lower bound $\underline{C}$ and upper bound $\overline{C}(\mathbb{B})$ are used to prune each $\mathbb{B}$ . When the difference between the bounds is smaller than $\tau$ , the algorithm terminates with $\hat{\omega}$ being the global solution $\omega^*$ (up to error $\tau$ , which can be chosen to be arbitrarily small). See [15, 16] for details of BnB. + +As alluded to above, our core contributions are novel and effective bounding functions for CM using BnB. We describe our bounding functions in the next section. + +Algorithm 1 BnB for rotation estimation from events. +Require: Event stream $\mathcal{E} = \{e_i\}_{i=1}^N$ , maximum angular rate of change $r_{\mathrm{max}}$ , convergence threshold $\tau$ . +1: $q \gets$ Initialise priority queue. +2: $\mathbb{B} \gets$ Cube in $\mathbb{R}^3$ of size $(2r_{\mathrm{max}})^3$ centred at origin. +3: $\omega_c \gets$ Centre of $\mathbb{B}$ . +4: $\hat{\omega} \gets \omega_c$ . +5: Insert $\mathbb{B}$ into $q$ with priority $\overline{C}(\mathbb{B})$ . +6: while $q$ is not empty do +7: $\mathbb{B} \gets$ Dequeue top item from $q$ . +8: If $\overline{C}(\mathbb{B}) - C(\hat{\omega}) \leq \tau$ , then terminate. +9: $\omega_c \gets$ Centre of $\mathbb{B}$ . +10: If $C(\omega_c) \geq C(\hat{\omega})$ , then $\hat{\omega} \gets \omega_c$ . +11: Uniformly subdivide $\mathbb{B}$ into 8 subcubes $\mathbb{B}_1, \ldots, \mathbb{B}_8$ . +12: for $i = 1, \dots, 8$ do +13: if $\overline{C}(\mathbb{B}_i) \geq C(\hat{\omega})$ then +14: Insert $\mathbb{B}_i$ into $q$ with priority $\overline{C}(\mathbb{B}_i)$ . +15: end if +16: end for +17: end while +18: return $\hat{\omega}$ as $\boldsymbol{\omega}^*$ . + +# 3. Bounds for contrast maximisation + +To search for the maximum of $C(\omega)$ using BnB, a lower and upper bound on the objective are required. + +The lower bound $\underline{C}$ must satisfy the condition + +$$ +\underline {{C}} \leq \max _ {\boldsymbol {\omega} \in \Omega} C (\boldsymbol {\omega}), \tag {11} +$$ + +which is trivially achieved by any (suboptimal) solution. In Algorithm 1, the current best solution $\hat{\omega}$ is used to provide $\underline{C}$ , which is iteratively raised as the search progresses. + +The upper bound $\overline{C} (\mathbb{B})$ is defined over a region (a subcube) $\mathbb{B}$ of $\Omega$ , and must satisfy the condition + +$$ +\overline {{C}} (\mathbb {B}) \geq \max _ {\boldsymbol {\omega} \in \mathbb {B}} C (\boldsymbol {\omega}). \tag {A1} +$$ + +Also, as $\mathbb{B}$ collapses to a single point $\omega$ , $\overline{C}(\mathbb{B})$ should equate to $C(\omega)$ ; more formally, + +$$ +\overline {{C}} (\mathbb {B}) \rightarrow C (\omega) \text {w h e n} \mathbb {B} \rightarrow \omega . \tag {A2} +$$ + +See [16] for the rationale of the above conditions for BnB. + +Deriving the upper bound is a more involved process. Our starting point is to rewrite (4) as + +$$ +C (\boldsymbol {\omega}) = \frac {1}{P} \sum_ {j = 1} ^ {P} H \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) ^ {2} - \mu (\boldsymbol {\omega}) ^ {2}, \tag {12} +$$ + +which motivates a bound based on two components + +$$ +\overline {{C}} (\mathbb {B}) := \frac {1}{P} \bar {S} (\mathbb {B}) - \underline {{\mu}} (\mathbb {B}) ^ {2}, \tag {13} +$$ + +where $\overline{S} (\mathbb{B})$ is an upper bound + +$$ +\overline {{S}} (\mathbb {B}) \geq \max _ {\boldsymbol {\omega} \in \mathbb {B}} \sum_ {j = 1} ^ {P} H \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) ^ {2} \tag {14} +$$ + +on the "sum of squares (SoS)" component, and + +$$ +\underline {{\mu}} (\mathbb {B}) \leq \min _ {\boldsymbol {\omega} \in \mathbb {B}} \mu (\boldsymbol {\omega}) \tag {15} +$$ + +is a lower bound of the mean pixel value. Given (14) and (15), then (13) satisfies A1. If equality holds in (14) and (15) when $\mathbb{B}$ is singleton, then (13) also satisfies A2. + +In Secs. 3.1 and 3.2, we develop $\overline{S}(\mathbb{B})$ for continuous and discrete event images, before deriving $\underline{\mu}(\mathbb{B})$ in Sec. 3.3. + +# 3.1. SoS bound for continuous event image + +For the continuous event image $H_{c}$ (1), our SoS upper bound (denoted $\overline{S}_c$ ) is defined as + +$$ +\bar {S} _ {c} (\mathbb {B}) := \sum_ {j = 1} ^ {P} \bar {H} _ {c} \left(\mathbf {x} _ {j}; \mathbb {B}\right) ^ {2}, \tag {16} +$$ + +where $\overline{H}_c(\mathbf{x}_j;\mathbb{B})$ is an upper bound on the value of $H_{c}$ at $\mathbf{x}_j$ . To obtain $\overline{H}_c(\mathbf{x}_j;\mathbb{B})$ , we bound the position + +$$ +\left\{\mathbf {u} _ {i} ^ {\prime} = f \left(\mathbf {u} _ {i}, t _ {i}; \omega\right) \mid \omega \in \mathbb {B} \right\} \tag {17} +$$ + +of each warped event, under all possible $\omega \in \mathbb{B}$ for the warping function (9). To this end, let $\omega_{\mathbf{c}}$ be the centre of a cube $\mathbb{B}$ , and $\omega_{\mathbf{p}}$ and $\omega_{\mathbf{q}}$ be opposite corners of $\mathbb{B}$ . Define + +$$ +\alpha_ {i} (\mathbb {B}) := 0. 5 \left\| \omega_ {\mathbf {p}} t _ {i} - \omega_ {\mathbf {q}} t _ {i} \right\| _ {2}. \tag {18} +$$ + +![](images/f769c00722b6ace823a3142bbef5b1903c365f35eaf77376724ac93672984196.jpg) +(a) + +![](images/80041fff41a99eaf5bc328e9502f9d255208e1c7ec7a1c5672b88f339e136b04.jpg) +(b) +Figure 2. (a) The vector $R(t_i, \omega) \tilde{\mathbf{u}}_i$ for all $\omega \in \mathbb{B}$ lies in the cone $\mathcal{V}_i(\mathbb{B})$ , and the projection of $\mathcal{V}_i(\mathbb{B})$ onto the image plane is an elliptical region $\mathcal{L}_i(\mathbb{B})$ . (b) Example with $5 \times 5$ pixel image and $N = 5$ events; there are thus $N = 5$ discs $\{\mathcal{D}_i(\mathbb{B})\}_{i=1}^5$ on the image. The value in a pixel is the number of discs that intersect the pixel. Pixels with the same color are from the same connected component (CC); there are 9 CCs in this example. (c)(d) Incidence matrix $\mathbf{M}$ corresponding to the example in (b). The solution of IQP and R-IQP are indicated respectively in (c) and (d), where entries $(i, k)$ of $\mathbf{Z}$ that are set to 1 are marked in red. The dominant columns of $\mathbf{M}$ are outlined in green, and their corresponding CCs are also outlined in green in (b). + +![](images/88196c187752d042b7bab82f6ce8fba0641298ec2a5639945bf8633525bf78e8.jpg) +(c) + +![](images/87331ffe19c2c9824d49216a5bc1de347386ad3e733ba042172e79090ae8b233.jpg) +(d) + +Then, the following inequality can be established + +$$ +\angle \left(\mathbf {R} \left(t _ {i}; \omega_ {\mathbf {c}}\right) \tilde {\mathbf {u}} _ {i}, \mathbf {R} \left(t _ {i}; \omega\right) \tilde {\mathbf {u}} _ {i}\right) \leq \alpha_ {i} (\mathbb {B}), \tag {19} +$$ + +which is an extension of [15, Lemma 3.2]. Intuitively, (19) states that the rotated vector $\mathbf{R}(t_i;\omega)\tilde{\mathbf{u}}_i$ under all $\omega \in \mathbb{B}$ must lie within the cone + +$$ +\mathcal {V} _ {i} (\mathbb {B}) := \left\{\tilde {\mathbf {u}} \in \mathbb {R} ^ {3} \mid \angle \left(\mathbf {R} \left(t _ {i}; \omega_ {\mathbf {c}}\right) \tilde {\mathbf {u}} _ {i}, \tilde {\mathbf {u}}\right) \leq \alpha_ {i} (\mathbb {B}) \right\}. \tag {20} +$$ + +Fig. 2a illustrates the cone $\mathcal{V}_i(\mathbb{B})$ . Now, the pinhole projection of all the rays in $\mathcal{V}_i(\mathbb{B})$ yields the 2D region + +$$ +\mathcal {L} _ {i} (\mathbb {B}) = \left\{\mathbf {x} = \frac {\mathbf {K} ^ {(1 : 2)} \tilde {\mathbf {u}}}{\mathbf {K} ^ {(3)} \tilde {\mathbf {u}}} \mid \tilde {\mathbf {u}} \in \mathcal {V} _ {i} (\mathbb {B}) \right\}, \tag {21} +$$ + +which is an elliptical region [23, Chap. 2]; see Fig. 2a. Further, the centre $\mathbf{c}_i(\mathbb{B})$ , semi-major axis $\mathbf{y}_i(\mathbb{B})$ and semiminor axis $\mathbf{z}_i(\mathbb{B})$ of $\mathcal{L}_i(\mathbb{B})$ can be analytically determined (see the supplementary material). We further define + +$$ +\mathcal {D} _ {i} (\mathbb {B}) = \left\{\mathbf {x} \in \mathbb {R} ^ {2} \mid \| \mathbf {x} - \mathbf {c} _ {i} (\mathbb {B}) \| \leq \| \mathbf {y} _ {i} (\mathbb {B}) \| \right\}, \tag {22} +$$ + +i.e., the smallest disc that contains $\mathcal{L}_i(\mathbb{B})$ . + +By construction, $\mathcal{D}_i(\mathbb{B})$ fully contains the set of positions that $\mathbf{u}_i^{\prime}$ can take for all $\omega \in \mathbb{B}$ , i.e., the set (17). We thus define the upper bound on the pixel values of $H_{c}$ as + +$$ +\overline {{H}} _ {c} \left(\mathbf {x} _ {j}; \mathbb {B}\right) = \sum_ {i = 1} ^ {N} \boldsymbol {\delta} \left(\max \left(\left\| \mathbf {x} _ {j} - \mathbf {c} _ {i} (\mathbb {B}) \right\| - \left\| \mathbf {y} _ {i} (\mathbb {B}) \right\|, 0\right)\right). \tag {23} +$$ + +Intuitively, we take the distance of $\mathbf{x}_j$ to the boundary of $\mathcal{D}_i(\mathbb{B})$ to calculate the intensity, and if $\mathbf{x}_j$ is within the disc then the distance is zero. + +Lemma 1. + +$$ +\overline {{H}} _ {c} \left(\mathbf {x} _ {j}; \mathbb {B}\right) \geq \max _ {\boldsymbol {\omega} \in \mathbb {B}} H _ {c} \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) \tag {24} +$$ + +with equality achieved if $\mathbb{B}$ is singleton, i.e., $\mathbb{B} = \{\omega\}$ . + +Proof. See supplementary material. + +![](images/dd2b050e6e425df9aff81532f43691ea5671d773e2b0b391622b643ab0000d54.jpg) + +Given Lemma 1, it is clear that $\overline{S}_c(\mathbb{B})$ satisfies the conditions (see Sec. 3) to be a valid component in the upper bound (13) for the continuous event image $H_{c}$ . + +# 3.2. SoS bound for discrete event image + +Given the $N$ discs $\{\mathcal{D}_i(\mathbb{B})\}_{i = 1}^N$ associated with the $N$ events, define the intersection matrix $\mathbf{T}\in \{0,1\}^{N\times P}$ .. + +$$ +\mathbf {T} _ {i, j} = \left\{ \begin{array}{l l} 1 & \mathcal {D} _ {i} (\mathbb {B}) \text {i n t e r s e c t s p i x e l} \mathbf {x} _ {j}; \\ 0 & \text {o t h e r w i s e .} \end{array} \right. \tag {25} +$$ + +The disc-pixel intersections can be computed efficiently using established techniques [10, 30]. We assume $\sum_{j=1}^{P} \mathbf{T}_{i,j} > 0$ for all $i$ , i.e., each disc intersects at least one pixel. If there are discs that lie beyond the image plane, we ignore these discs without loss of generality. + +A direct extension of $\overline{H}_c$ (23) to the discrete case would be to calculate the pixel upper bound value as + +$$ +\overline {{H}} _ {d} (\mathbf {x} _ {j}; \mathbb {B}) = \sum_ {i = 1} ^ {N} \mathbf {T} _ {i, j}, \tag {26} +$$ + +i.e., number of discs that intersect the pixel; see Fig. 2b. This can however be overly pessimistic, since the pixel value for the discrete event image (3) satisfies + +$$ +\sum_ {j = 1} ^ {P} H _ {d} \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) \leq N \Rightarrow \sum_ {j = 1} ^ {P} H _ {d} \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) ^ {2} \leq N ^ {2}, \tag {27} +$$ + +whereas by using (26), + +$$ +\sum_ {j = 1} ^ {P} \bar {H} _ {d} (\mathbf {x} _ {j}; \mathbb {B}) \leq P N \Rightarrow \sum_ {j = 1} ^ {P} \bar {H} _ {d} (\mathbf {x} _ {j}; \boldsymbol {\omega}) ^ {2} \leq (P N) ^ {2}. \tag {28} +$$ + +Note that $P$ is the number of pixels (e.g., $P = 240 \times 320 = 76k$ for IniVation Davis 240C [3]), thus $(PN)^2 \gg N^2$ . + +To get a tighter bound, we note that the discs $\{\mathcal{D}_i(\mathbb{B})\}_{i = 1}^N$ partition $X$ into a set of connected components (CC) + +$$ +\left\{\mathcal {G} _ {k} \right\} _ {k = 1} ^ {K}, \tag {29} +$$ + +where each $\mathcal{G}_k$ is a connected set of pixels that are intersected by the same discs; see Fig. 2b. Then, define the incidence matrix $\mathbf{M} \in \{0,1\}^{N \times K}$ , where + +$$ +\mathbf {M} _ {i, k} = \left\{ \begin{array}{l l} 1 & \exists \mathbf {x} _ {j} \in \mathcal {G} _ {k} \text {s u c h t h a t} \mathbf {T} _ {i, j} = 1; \\ 0 & \text {o t h e r w i s e .} \end{array} \right. \tag {30} +$$ + +In words, $\mathbf{M}_{i,k} = 1$ if $\mathcal{D}_i(\mathbb{B})$ is a disc that intersect to form $\mathcal{G}_k$ . We then formulate the integer quadratic program + +$$ +\overline {{S}} _ {d} ^ {*} (\mathbb {B}) = \max _ {\mathbf {Z} \in \{0, 1 \} ^ {N \times K}} \quad \sum_ {k = 1} ^ {K} \left(\sum_ {i = 1} ^ {N} \mathbf {Z} _ {i, k} \mathbf {M} _ {i, k}\right) ^ {2} +$$ + +s.t. $\mathbf{Z}_{i,k} \leq \mathbf{M}_{i,k}, \forall i, k,$ (IQP) + +$$ +\sum_ {k = 1} ^ {K} \mathbf {Z} _ {i, k} = 1, \forall i. +$$ + +In words, choose a set of CCs that are intersected by as many discs as possible, while ensuring that each disc is selected exactly once. Intuitively, IQP warps the events (under uncertainty $\omega \in \mathbb{B}$ ) into "clusters" that are populated by as many events as possible, to encourage fewer clusters and higher contrast. See Fig. 2c for a sample solution of IQP. + +# Lemma 2. + +$$ +\overline {{S}} _ {d} ^ {*} (\mathbb {B}) \geq \max _ {\boldsymbol {\omega} \in \mathbb {B}} \sum_ {j = 1} ^ {P} H _ {d} \left(\mathbf {x} _ {j}; \boldsymbol {\omega}\right) ^ {2}, \tag {31} +$$ + +with equality achieved if $\mathbb{B}$ is singleton, i.e., $\mathbb{B} = \{\omega\}$ . + +Proof. See supplementary material. + +![](images/3262c6f961ac2bde5f8d5bf486899067d38ab7e4937a4424cdd016bef102ff65.jpg) + +Solving IQP is challenging, not least because $\{\mathcal{G}_k\}_{k = 1}^K$ and $\mathbf{M}$ are costly to compute and store (the number of CCs is exponential in $N$ ). To simplify the problem, first define the density of a CC $\mathcal{G}_k$ (corresponding to column $\mathbf{M}_{:,k}$ ) as + +$$ +\Delta_ {k} = \sum_ {i = 1} ^ {N} \mathbf {M} _ {i, k}. \tag {32} +$$ + +We say that a column $\mathbf{M}_{\cdot,\eta}$ of $\mathbf{M}$ is dominant if there exists a subset $\Lambda \subset \{1, \ldots, K\}$ (including $\Lambda = \emptyset$ ) such that + +$$ +\mathbf {M} _ {i, k} \leq \mathbf {M} _ {i, \eta} \forall i \in \{1, \dots , N \}, \forall k \in \Lambda , \tag {33} +$$ + +whereas for all $k \notin \Lambda$ , the above does not hold. In words, the 1 elements of columns in $\Lambda$ is a subset of the 1 elements + +Algorithm 2 Computing dominant columns $\mathbf{M}'$ . +Require: Pixels $\{\mathbf{x}_j\}_{j = 1}^P$ , set of discs $\{\mathcal{D}_i(\mathbb{B})\}_{i = 1}^N$ (22). +1: $\mathbf{T}\gets N\times P$ intersection matrix (25) from discs. +2: $\{\overline{H}_d(\mathbf{x}_j;\mathbb{B})\}_{j = 1}^P\gets$ Pixel upper bound image (26). +3: $\{a_j\}_{j = 1}^P\gets$ Array of $P$ elements initialised to O. +4: $\mathbf{M}'\gets []$ (empty matrix). +5: for $i = 1,\dots ,N$ do +6: $c_{max}\gets \max_{\mathbf{x}_j\in \mathcal{D}_i(\mathbb{B})}\overline{H}_d(\mathbf{x}_j;\mathbb{B}).$ +7: $\mathcal{R}\gets \{\mathbf{x}_j\in \mathcal{D}_i(\mathbb{B})\mid \overline{H}_d(\mathbf{x}_j;\mathbb{B}) = c_{max},a_j = 0\} .$ +8: while $\mathcal{R}$ is not empty do +9: Pick a pixel ${\bf x}_j\in \mathcal{R}$ and $a_j\gets 1$ +10: $\mathbf{M}'\gets [\mathbf{M}'\quad \mathbf{T}_{:,j}]$ and $\mathcal{R}\gets \mathcal{R}\setminus \{\mathbf{x}_j\}$ +11: for ${\bf x}_{\ell}\in\mathcal{R}$ do +12: if ${\bf T}_{:, \ell} = {\bf T}_{:, j}$ then +13: $a_{\ell}\gets 1$ and $\mathcal{R}\gets \mathcal{R}\setminus \{\mathbf{x}_{\ell}\}$ +14: end if +15: end for +16: end while +17: end for +18: return $\mathbf{M}'$ + +of $\mathbf{M}_{:, \eta}$ . Geometrically, a dominant column $\mathbf{M}_{:, \eta}$ corresponds to a CC $\mathcal{G}_{\eta}$ such that for all discs that intersect to form the CC, $\mathcal{G}_{\eta}$ is the densest CC that they intersect with; mathematically, there exists $\mathcal{D}_i(\mathbb{B}) \supseteq \mathcal{G}_{\eta}$ such that + +$$ +\max _ {\mathbf {x} _ {j} \in \mathcal {D} _ {i} (\mathbb {B})} \sum_ {i = 1} ^ {N} \mathbf {T} _ {i, j} = \sum_ {i = 1} ^ {N} \mathbf {M} _ {i, \eta}. \tag {34} +$$ + +Figs. 2b and 2c illustrate dominant columns. + +Let $\mathbf{M}' \in \{0,1\}^{N \times K'}$ contain only the dominant columns of $\mathbf{M}$ . Typically, $K' \ll K$ , and $\mathbf{M}'$ can be computed directly without first building $\mathbf{M}$ , as shown in Algorithm 2. Intuitively, the method loops through the discs and incrementally keeps track of the densest CCs to form $\mathbf{M}'$ . + +Lemma 3. Problem IQP has the same solution if $\mathbf{M}$ is replaced with $\mathbf{M}'$ . + +Proof. See supplementary material. + +It is thus sufficient to formulate IQP based on the dominant columns $\mathbf{M}'$ . Further, we relax IQP into + +$$ +\overline {{S}} _ {d} (\mathbb {B}) = \max _ {\mathbf {Z} \in \{0, 1 \} ^ {N \times K ^ {\prime}}} \sum_ {k = 1} ^ {K ^ {\prime}} \left(\sum_ {i = 1} ^ {N} \mathbf {Z} _ {i, k} \mathbf {M} _ {i, k} ^ {\prime}\right) ^ {2} +$$ + +s.t. $\mathbf{Z}_{i,k} \leq \mathbf{M}_{i,k}', \forall i, k$ , (R-IQP) + +$$ +\sum_ {k = 1} ^ {K ^ {\prime}} \sum_ {i = 1} ^ {N} \mathbf {Z} _ {i, k} = N. +$$ + +where we now allow discs to be selected more than once. Since enforcing $\sum_{k=1}^{K'} \mathbf{Z}_{i,k} = 1$ for all $i$ implies + +$\sum_{k=1}^{K'} \sum_{i=1}^{N} \mathbf{Z}_{i,k} = N$ , R-IQP is a valid relaxation. See Fig. 2d for a sample result of R-IQP, and cf. Fig. 2c. + +# Lemma 4. + +$$ +\overline {{S}} _ {d} (\mathbb {B}) \geq \overline {{S}} _ {d} ^ {*} (\mathbb {B}) \tag {35} +$$ + +with equality achieved if $\mathbb{B}$ is singleton, i.e., $\mathbb{B} = \{\omega\}$ . + +Proof. See supplementary material. + +![](images/c960028131bf4793c81e0cc9f15c56a8869726e305b56c62c8e8429aee1e0c94.jpg) + +Bound computation and tightness R-IQP admits a simple solution. First, compute the densities $\{\Delta_k\}_{k=1}^{K'}$ of the columns of $\mathbf{M}'$ . Let $\Delta_{(k)}$ be the $k$ -th highest density, i.e., + +$$ +\Delta_ {(k _ {1})} \geq \Delta_ {(k _ {2})} \text {i f} k _ {1} < k _ {2}. \tag {36} +$$ + +Obtain $\gamma$ as the largest integer such that + +$$ +\sum_ {k = 1} ^ {\gamma} \Delta_ {(k)} < N. \tag {37} +$$ + +Then, the SoS upper bound for the discrete event image is + +$$ +\bar {S} _ {d} (\mathbb {B}) = \sum_ {k = 1} ^ {\gamma} \Delta_ {(k)} ^ {2} + \left(N - \sum_ {k = 1} ^ {\gamma} \Delta_ {(k)}\right) ^ {2}. \tag {38} +$$ + +Intuitively, the procedure greedily takes the densest CCs while ensuring that the quota of $N$ discs is not exceeded. Then, any shortfall in the number of discs is met using the next largest CC partially. Given $\mathbf{M}'$ , the costliest routine is just the sorting of the column sums of $\mathbf{M}'$ . + +Given the final constraint in R-IQP, it is clear that $\overline{S}_d(\mathbb{B})\leq N^2$ . This represents a much tighter SoS upper bound than $\sum_{j = 1}^{P}\overline{H}_{d}(\mathbf{x}_{j};\boldsymbol {\omega})^{2}$ ; see (28). + +# 3.3. Lower bound of mean pixel value + +For the continuous event image (1), the lower bound of the pixel value is the "reverse" of the upper bound (23), i.e., + +$$ +\underline {{H}} _ {c} \left(\mathbf {x} _ {j}; \mathbb {B}\right) = \sum_ {i = 1} ^ {N} \boldsymbol {\delta} \left(\| \mathbf {x} _ {j} - \mathbf {c} _ {i} (\mathbb {B}) \| + \| \mathbf {y} _ {i} (\mathbb {B}) \|\right), \tag {39} +$$ + +whereby for each $\mathcal{D}_i(\mathbb{B})$ , we take the maximum distance between $\mathbf{x}_j$ and a point on the disc. Then, the lower bound of the mean pixel value is simply + +$$ +\underline {{\mu}} _ {c} (\mathbb {B}) = \frac {1}{P} \sum_ {j = 1} ^ {P} \underline {{H}} _ {c} (\mathbf {x} _ {j}; \mathbb {B}). \tag {40} +$$ + +In the discrete event image (3), if all the $N$ discs lie fully in the image plane, the lower bound can be simply calculated as $N / P$ . However, this ideal case rarely happens, hence the the lower bound on the mean pixel vale is + +$$ +\underline {{\mu}} _ {d} (\mathbb {B}) = \frac {1}{P} \sum_ {i = 1} ^ {N} \mathbb {I} \left(\mathcal {D} _ {i} \text {f u l l y l i e i n t h e i m a g e p l a n e}\right). \tag {41} +$$ + +See the supplementary material for proofs of the correctness of the above lower bounds. + +# 3.4. Computational cost and further acceleration + +Our BnB method is able to process $N \approx 50,000$ events in $\approx 300$ seconds. While this does not allow online low latency event processing, it is nonetheless useful for event sensing applications that permit offline computations, e.g., video stabilisation with post-hoc correction. Note that a local method can take up to 30 seconds to perform CM on the same input, which also does not enable online processing1 (Sec. 4 will present more runtime results). + +There is potential to speed-up our algorithm using GPUs. For example, in the bound computations for the discrete event image case, the disc-pixel intersection matrix $\mathbf{T}$ (25) could be computed using GPU-accelerated ray tracing [5, 25], essentially by backprojecting each pixel and intersecting the ray with the cones (20) in parallel. We leave GPU acceleration as future work. + +# 4. Results + +We first examine the runtime and solution quality of our algorithms, before comparing against state-of-the-art methods in the literature. The results were obtained on a standard desktop with a 3.0GHz Intel i5 CPU and 16GB RAM. + +# 4.1. Comparison of bounding functions + +The aim here is to empirically compare the performance of BnB (Algorithm 1) with continuous and discrete event images. We call these variants CMBnB1 and CMBnB2. + +For this experiment, a $10\mathrm{ms}$ subsequence (which contains about $N = 50,000$ events) of the boxes data [14] was used. The underlying camera motion was a pure rotation. + +For CMBnB1, a Gaussian kernel with bandwidth 1 pixel was used (following [13, Sec. 2]). Fig. 3 plots the upper and lower bound values over time in a typical run of Algorithm 1. It is clear that the discrete case converged much faster than the continuous case; while CMBnB2 terminated at about $12k$ iterations, CMBnB1 requiried no fewer than $30k$ iterations. It is evident from Fig. 3 that this difference in performance is due to the much tighter bounding in the discrete case. The next experiment will include a comparison of the solution quality of CMBnB1 and CMBnB2. + +# 4.2. Qualitative comparisons + +To highlight the importance of globally optimal CM, we tested on select $10\mathrm{ms}$ subsequences (about $N = 50k$ events each) from the boxes data [14]—in the next experiment, a more comprehensive experiment and quantitative benchmarking will be described. Here, on the subsequences chosen, we compared BnB against the following methods: + +![](images/faa5a6b925baca60883876a37f7da92132271c28c9363ddb1182c8a5b26c382c.jpg) +Figure 3. Upper and lower bound evolution in branch-and-bound. + +- CMGD1: locally optimal solver (fmincon from Matlab) was used to perform CM with initialisation $\omega = 0$ (equivalent to identity rotation). +- CMGD2: same as above, but initialised with the optimised $\omega$ from the previous $10\mathrm{ms}$ time window. + +Both local methods were executed on the continuous event image with Gaussian kernel of bandwidth 1 pixel. + +Fig. 4 depicts motion compensated event images from two subsequences (Subseq 1 and Subseq 2); see supplementary material for more results. The examined cases show that the local methods (both CMGD1 and CMGD2) can indeed often converge to bad local solutions. Contrast this to BnB which always produced sharp event images. + +These results also show that CM based on continuous and discrete event images yield practically identical solutions. Since CMBnB2 usually converges much faster than CMBnB1, we use CMBnB2 in the remaining experiments. + +# 4.3. Quantitative benchmarking + +We performed benchmarking using publicly available datasets [8, 22]. We introduced two additional variants to CMGD1 and CMGD2: + +- CMRW1: A variant of CM [29] that uses a different objective function (called reward): + +$$ +R w (\boldsymbol {\omega}) = C (\boldsymbol {\omega}) + \frac {1}{P} \sum_ {j = 1} ^ {P} (e ^ {(- H (\mathbf {x} _ {j}; \boldsymbol {\omega}))} + e ^ {(H (\mathbf {x} _ {j}; \boldsymbol {\omega}))}). +$$ + +The initial solution is taken as $\omega = 0$ + +- CMRW2: Same as CMRW1 but initialised with the optimised $\omega$ from the previous subsequence. + +We also compared against EventNet [27], which is based on deep learning. However, similar to the error reported in [27], we found that the error for EventNet was much higher than the error of the CM methods (e.g., the translated angular velocity error of the maximum of EventNet is $17.1\%$ , while it is around $5\%$ for CM). The lack of publicly available implementation also hampered objective testing of EventNet. We thus leave comparisons against deep learning methods as future work. + +# 4.3.1 Rotational motion in indoor scene + +We used event sequences poster, boxes and dynamic from [14, 22], which were recorded using a Davis 240C [4] under rotational motion over a static indoor scene. The ground truth motion was captured using a motion capture system. Each sequence has a duration of 1 minute and around 100 million events. For these sequences, the rotational motion was minor in a large part of the sequences (thereby producing trivial instances to CM), thus in our experiment we used only the final 15 seconds of each sequence, which tended to have more significant motions. + +We split each sequence into contiguous $10\mathrm{ms}$ subsequences which were then subject to CM. For boxes and poster, each CM instance was of size $N \approx 50k$ , while for dynamic, each instance was of size $N \approx 25k$ . For each CM instance, let $\bar{\omega}$ and $\hat{\omega}$ be the ground truth and estimated parameters. An error metric we used is + +$$ +\epsilon = \left\| \bar {\omega} - \hat {\omega} \right\| _ {2}. \tag {42} +$$ + +Our second error metric, which considers only differences in angular rate, is + +$$ +\phi = \left| \left| \left| \bar {\omega} \right| \right| _ {2} - \left| \left| \hat {\omega} \right| \right| _ {2} \right|. \tag {43} +$$ + +Fig. 5a plots $\epsilon$ over all the CM instances for the boxes sequence, while Table 1 shows the average $(\mu)$ and standard deviation $(\sigma)$ of $\epsilon$ and $\phi$ over all CM instances. + +Amongst the local methods, the different objective functions did not yield significant differences in quality. The more important observation was that CMGD2/CMRW2 gave solutions of much higher quality than CMGD1/CMRW1, which confirms that good initialisation is essential for the local methods. Due to its exact nature, CMBnB provided the best quality in rotation estimation; its standard deviation of $\epsilon$ is also lower, indicating a higher stability over the sequences. Moreover, CMBnB does not require any initialisation, unlike the local methods. + +For the three sequences used (dynamic, boxes, poster), the maximum absolute angular velocities are 500, 670 and 1000 deg/s respectively [14, 22]. The average $\phi$ error of CMBnB of 10.09, 17.97 and 46.34 deg/s thus translate into $2.2\%$ , $2.7\%$ and $4.6\%$ of the maximum, respectively. + +Runtime The average runtimes of CMBnB over all instances in the three sequences (dynamic, boxes, poster) were 163.2, 278.3 and 320.6 seconds. CMGD optimised with the conjugate gradient solver in fmincon has average runtimes of 20.2, 31.1 and 35.3 seconds. + +# 4.3.2 Attitude estimation + +We repeated the above experiment on the event-based star tracking (attitude estimation) dataset of [7, 8], which contains 11 event sequences of rotational motion over a star field. Each sequence has a constant angular velocity of 4 + +![](images/0b99279924de5ac467ca7d9bad1a7ca1a2e89dd66d1b3894dfdbd337fa07ab86.jpg) +Figure 4. Qualitative results (motion compensated event images) from Subseq 1 and Subseq 2 of boxes. + +
Methoddynamicboxesposter
μ(ε)μ(φ)σ(ε)σ(φ)μ(ε)μ(φ)σ(ε)σ(φ)μ(ε)μ(φ)σ(ε)σ(φ)
CMGD121.5220.0724.3831.1331.2931.4734.3045.9456.5854.9247.0358.95
CMGD215.0913.3110.3912.0822.0121.7012.7918.8349.6450.1235.9342.77
CMRW121.0318.5925.4128.8332.2832.2336.1146.0159.0358.7149.4960.87
CMRW214.5512.299.8511.2121.9521.4113.7118.4249.4950.0437.5143.35
CMBnB11.9310.097.828.7418.7617.9710.0614.6644.3446.3424.7936.79
+ +![](images/0e181331af07776e23cf98911318fb33895f30b2edde16fcb4b9a1dc53f120fd.jpg) +(a) boxes + +![](images/615dc26d9cf2c819cc466d1ea3363ba065bdde1be9d4d0245d81ec5ded682405.jpg) +(b) Sequence 1 +Figure 5. Error $\phi$ of all CM methods (plotted against time) for (a) boxes sequence [14] and (b) Sequence 1 of [8]. In each subplot, the error of CMBNB is superimposed for reference. + +$\mathrm{deg} / \mathrm{s}$ over a duration of 45 seconds and around 1.5 million events. We split each sequence into $400~\mathrm{ms}$ subsequences, which yielded $N\approx 15,000$ events per subsequence. Fig. 5b + +Table 1. Average and standard deviation of $\epsilon$ and $\phi$ over all CM instances in boxes, dynamic, and poster (best result bolded). + +
Methodμ(ε)μ(φ)σ(ε)σ(φ)
CMGD10.4480.6520.3140.486
CMGD20.2940.4230.2320.323
CMRW10.4290.6010.3460.468
CMRW20.3180.4610.2340.341
CMBnB0.1740.2340.1680.217
+ +Table 2. Average and standard deviation of $\epsilon$ and $\phi$ over all CM instances in the star tracking dataset (best result bolded). + +plots the $\phi$ errors for Sequence 1 in the dataset. The average errors and standard deviation over all CM instances are shown in Table 2. Again, CMBnB gave the highest quality solutions; its average $\phi$ error of $0.234\mathrm{deg / s}$ translate into $5.8\%$ of the maximum. The average runtime of CMBnB and CMGD over all instances were 80.7 and 11.1 seconds. + +# 5. Conclusions + +We proposed a novel globally optimal algorithm for CM based on BnB. The theoretical validity of our algorithm has been established, and the experiments showed that it greatly outperformed local methods in terms of solution quality. + +# Acknowledgements + +This work was supported by ARC DP200101675. We thank S. Bagchi for the implementation of CM and E. Mueggler for providing the dataset used in experiments. + +# References + +[1] http://en.wikipedia.org/w/index.php? title=Exponential%20map%20(Lie%20theory) &oldid=925866493.2 +[2] Event-based vision resources. https://github.com/uzh-rpg/event-based_vision-resources.2 +[3] Jean-Charles Bazin, Hongdong Li, In So Kweon, Cedric Demonceaux, Pascal Vasseur, and Katsushi Ikeuchi. A branch-and-bound approach to correspondence and grouping problems. IEEE transactions on pattern analysis and machine intelligence, 35(7):1565-1576, 2012. 5 +[4] Christian Brandli, Raphael Berner, Minhao Yang, Shih-Chii Liu, and Tobi Delbruck. A $240 \times 180$ 130 db $3\mu s$ latency global shutter spatiotemporal vision sensor. IEEE Journal of Solid-State Circuits, 49(10):2333-2341, 2014. 7 +[5] Nathan A Carr, Jared Hoberock, Keenan Crane, and John C Hart. Fastgpu ray tracing of dynamic meshes using geometry images. In Proceedings of Graphics Interface 2006, pages 203-209. Canadian Information Processing Society, 2006. 6 +[6] Andrea Censi and Davide Scaramuzza. Low-latency event-based visual odometry. In 2014 IEEE International Conference on Robotics and Automation (ICRA), pages 703-710. IEEE, 2014. 2 +[7] Tat-Jun Chin and Samya Bagchi. Event-based star tracking via multiresolution progressive hough transforms. arXiv preprint arXiv:1906.07866, 2019. 1, 2, 7 +[8] Tat-Jun Chin, Samya Bagchi, Anders Eriksson, and Andre van Schaik. Star tracking using an event camera. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0-0, 2019. 1, 2, 7, 8 +[9] Tobi Delbruck and Manuel Lang. Robotic goalie with 3 ms reaction time at $4\%$ cpu load using event-based dynamic vision sensor. Frontiers in neuroscience, 7:223, 2013. 1 +[10] James D Foley, Foley Dan Van, Andries Van Dam, Steven K Feiner, John F Hughes, J Hughes, and Edward Angel. Computer graphics: principles and practice, volume 12110. Addison-Wesley Professional, 1996. 4 +[11] Guillermo Gallego, Mathias Gehrig, and Davide Scaramuzza. Focus is all you need: Loss functions for event-based vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12280-12289, 2019. 2, 6 +[12] Guillermo Gallego, Jon EA Lund, Elias Mueggler, Henri Rebecq, Tobi Delbruck, and Davide Scaramuzza. Event-based, 6-dof camera tracking from photometric depth maps. IEEE transactions on pattern analysis and machine intelligence, 40(10):2402-2412, 2017. 2 +[13] Guillermo Gallego, Henri Rebecq, and Davide Scaramuzza. A unifying contrast maximization framework for event cameras, with applications to motion, depth, and optical flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3867-3876, 2018. 1, 2, 6 +[14] Guillermo Gallego and Davide Scaramuzza. Accurate angular velocity estimation with an event camera. IEEE Robotics and Automation Letters, 2(2):632-639, 2017. 1, 2, 6, 7, 8 +[15] Richard I Hartley and Fredrik Kahl. Global optimization through rotation space search. International Journal of Com + +puter Vision, 82(1):64-79, 2009. 3, 4 +[16] Reiner Horst and Hoang Tuy. Global optimization: deterministic approaches. Springer, 1996. 3 +[17] Mina A Khoei, Sio-hoi Ieng, and Ryad Benosman. Asynchronous event-based motion processing: From visual events to probabilistic sensory representation. Neural computation, 31(6):1114-1138, 2019. 6 +[18] Hanme Kim, Ankur Handa, Ryad Benosman, Sio-Hoi Ieng, and Andrew J Davison. Simultaneous mosaicing and tracking with an event camera. J. Solid State Circ, 43:566-576, 2008. 2 +[19] Hanme Kim, Stefan Leutenegger, and Andrew J Davison. Real-time 3d reconstruction and 6-dof tracking with an event camera. In European Conference on Computer Vision, pages 349-364. Springer, 2016. 2 +[20] Beat Kueng, Elias Mueggler, Guillermo Gallego, and Davide Scaramuzza. Low-latency visual odometry using event-based feature tracks. In 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 16-23. IEEE, 2016. 2 +[21] Elias Mueggler, Basil Huber, and Davide Scaramuzza. Event-based, 6-dof pose tracking for high-speed maneuvers. In 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 2761-2768. IEEE, 2014. 1 +[22] Elias Mueggler, Henri Rebecq, Guillermo Gallego, Tobi Delbruck, and Davide Scaramuzza. The event-camera dataset and simulator: Event-based data for pose estimation, visual odometry, and slam. The International Journal of Robotics Research, 36(2):142-149, 2017. 1, 7 +[23] David Mumford. Algebraic geometry I: complex projective varieties. Springer Science & Business Media, 1995. 4 +[24] Jorge Nocedal and Stephen Wright. Numerical optimization. Springer Science & Business Media, 2006. 2 +[25] Stefan Popov, Johannes Günther, Hans-Peter Seidel, and Philipp Slusallek. Stackless kd-tree traversal for high performancegpu ray tracing. In Computer Graphics Forum, volume 26, pages 415-424. Wiley Online Library, 2007. 6 +[26] Bharath Ramesh, Hong Yang, Garrick Michael Orchard, Ngoc Anh Le Thi, Shihao Zhang, and Cheng Xiang. Dart: distribution aware retinal transform for event-based cameras. IEEE transactions on pattern analysis and machine intelligence, 2019. 1 +[27] Yusuke Sekikawa, Kosuke Hara, and Hideo Saito. Event-net: Asynchronous recursive event processing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3887-3896, 2019. 2, 7 +[28] Timo Stoffregen, Guillermo Gallego, Tom Drummond, Lindsay Kleeman, and Davide Scaramuzza. Event-based motion segmentation by motion compensation. arXiv preprint arXiv:1904.01293, 2019. 1, 2, 6 +[29] Timo Stoffregen and Lindsay Kleeman. Event cameras, contrast maximization and reward functions: An analysis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 7 +[30] Jerry R Van Aken. An efficient ellipse-drawing algorithm. IEEE Computer Graphics and Applications, 4(9):24-35, 1984. 4 +[31] Antoni Rosinol Vidal, Henri Rebecq, Timo Horstschaefer, and Davide Scaramuzza. Ultimate slam? combining events, + +images, and imu for robust visual slam in hdr and high-speed scenarios. IEEE Robotics and Automation Letters, 3(2):994-1001, 2018. 1 +[32] David Weikersdorfer, David B Adrian, Daniel Cremers, and Jörg Conradt. Event-based 3d slam with a depth-augmented dynamic vision sensor. In 2014 IEEE International Conference on Robotics and Automation (ICRA), pages 359-364. IEEE, 2014. 1 +[33] Chengxi Ye. Learning of dense optical flow, motion and depth, from sparse event cameras. PhD thesis, 2019. 2 +[34] Zhengyou Zhang. A flexible new technique for camera calibration. IEEE Transactions on pattern analysis and machine intelligence, 22, 2000. 2 +[35] Alex Zihao Zhu, Liangzhe Yuan, Kenneth Chaney, and Kostas Daniilidis. Ev-flownet: Self-supervised optical flow estimation for event-based cameras. arXiv preprint arXiv:1802.06898, 2018. 2 +[36] Alex Zihao Zhu, Liangzhe Yuan, Kenneth Chaney, and Kostas Daniilidis. Unsupervised event-based learning of optical flow, depth, and egomotion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 989-997, 2019. 2 \ No newline at end of file diff --git a/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/images.zip b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e2dc59401ca7af0f216e79363abf819ebca2accd --- /dev/null +++ b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:672407047b78da1f067d5a27a752498b1b1caa0fecd591279f6bde6c6cee0127 +size 749128 diff --git a/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/layout.json b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d96dcfdeab5e43c8e4f27590e3dfc07efa8ba4da --- /dev/null +++ b/globallyoptimalcontrastmaximisationforeventbasedmotionestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfb812cfbbad239b5f0a78ad92598e8526cde59ff8b5081928618f03baff1321 +size 698366 diff --git a/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_content_list.json b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1248827bc3c5f63b3165842d18170fbf56b0c9ae --- /dev/null +++ b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6d620ceeeb79e39a3788cdc2e84855a46d76a0792cb6c01a3196c7fd0d1b52c +size 79446 diff --git a/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_model.json b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7707f848df22315253a042d9bd25cb57f6755fe2 --- /dev/null +++ b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26de04abb8bf6225e15f998da5533d6eeee195f2328325ddec140a9a7ab9b36e +size 95930 diff --git a/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_origin.pdf b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a5f6a8f483eedcd239fcf50e5829d7cec4088886 --- /dev/null +++ b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/54e9554d-ccd8-4776-8940-4947667b2725_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45d92077a89a163d6f8985c52d74892f2f90078d40bb2dc2d20bb1e48e550a43 +size 392376 diff --git a/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/full.md b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/full.md new file mode 100644 index 0000000000000000000000000000000000000000..91f2bc9a1ae34ea2ab5d206f2029b827b95cc85e --- /dev/null +++ b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/full.md @@ -0,0 +1,431 @@ +# Global Optimality for Point Set Registration Using Semidefinite Programming + +Jose Pedro Iglesias1, Carl Olsson1,2, and Fredrik Kahl1 + +1Chalmers University of Technology, Sweden + +$^{2}$ Lund University, Sweden + +# Abstract + +In this paper we present a study of global optimality conditions for Point Set Registration (PSR) with missing data. PSR is the problem of aligning multiple point clouds with an unknown target point cloud. Since non-linear rotation constraints are present the problem is inherently nonconvex and typically relaxed by computing the Lagrange dual, which is a Semidefinite Program (SDP). + +In this work we show that given a local minimizer the dual variables of the SDP can be computed in closed form. This opens up the possibility of verifying the optimally, using the SDP formulation without explicitly solving it. In addition it allows us to study under what conditions the relaxation is tight, through spectral analysis. We show that if the errors in the (unknown) optimal solution are bounded the SDP formulation will be able to recover it. + +# 1. Introduction + +Point Set Registration (PSR) is a problem with several applications in the area of computer vision [4, 20, 14, 21, 29, 5, 2, 11, 24], which consists of estimating transformations that align two or more sets of 3D points. The instance of PSR with only two views related by a rigid transformation is a particular case which has been been intensively studied and that can be solved in closed form [3]. But as the number of view increases, and incomplete observations are taken in consideration, the problem becomes more complex due to the constraints on the rotations. + +In this work we focus on the registration of multiple point clouds to a global coordinate system. The point clouds correspond to observations of subsets of $n$ points from $m$ local coordinate systems. These observations, besides incomplete, can be noisy and are related through unknown rigid transformations. Assuming that sparse correspondences between 3D points are known, the aim of such problem is not only to estimate the unknown transformations from + +the $m$ local coordinate systems to a global coordinate system, but also the global coordinates of the original set of $n$ points. Solutions or approximated solutions to this problem are not exactly new, as shown in [7], whereby we aim at study global optimality conditions when solving PSR using Semidefinite Programming (SDP) [26]. + +Global optimization over the manifold of rotations have previously been studied by a number of papers. A classical result is that of Horn et al. [13] which showed that registration of two point sets under a Euclidean transformation can be solved globally optimally using singular value decomposition. In [18] a similar problem where the point-to-point correspondences were replaced by point-to-plane correspondences was considered. It was shown how to apply Lagrangian duality to achieve orthogonality or the transformation matrix. The relaxation was tightened in [6], which introduced orientation constraints on the columns of the rotation matrix and added redundant rotation constraints to strengthen the lower bound provided by the dual problem. Yang et al. [28] also applies Lagrangian duality to obtain a quaternion-based certifiably optimal solution to the Wahba problem. + +A problem that has received lots of attention in recent years due to it usefulness in structure from motion and SLAM applications is that of rotation averaging [9, 1, 30, 19, 8] One of the first attempts at solving this problem was presented in [10] where the unit norm constraint was dropped to achieve a linear solution strategy. Fredriksson et al. [9] showed how to incorporate the norm constraint using duality. Martinec and Pajdla [16] used the matrix parameterization but dropped the orthogonality and determinant constraints and extracted an approximate solution from the eigenvalues corresponding to the three smallest eigenvalues of the system matrix. Eriksson et al. [8] recently showed that despite the non-convexity of the problem, applying Lagrangian duality allows to enforce orthonormality and determinant constraints exactly under very generous noise levels. In [12] convexity properties of the single rotation averaging problem are studied. As far as we know these results + +do not generalize to the case of multiple rotations. + +From an application point of view the work that is the closest to ours is that of Chaudhury et al. [7]. This work introduced a spectral and a SDP relaxation that turns global registration of point clouds into a convex problem, which can be solved in polynomial time using a proposed algorithm. The authors also present sufficient conditions on the problem for exact recovery using the proposed algorithm, as well as a detailed stability analysis. + +Motivated by [8], and even though it starts from a similar formulation, this work differs from [7] by proposing a certificate and studying the conditions in terms of the estimated point cloud, global pose and missing data that assures global optimality of a candidate primal solution, using Lagrangian duality and spectral analysis. The main contributions of the paper are: + +- application of Lagrangian duality to the Point Registration Problem, that given a candidate solution to the primal problem allows us to obtain the corresponding dual variable in closed form. This allows verifying the global optimality of a local minimizer without solving the SDP (Lemma 1), which leads to a significant speedup; +- derivation of certificates/bounds (Theorems 1 and 2) on reconstruction errors that, if fulfilled, are sufficient to guarantee global optimality of a candidate primal solution; +- analysis and evaluation of the certificates as function of missing data and spatial distribution of the estimated 3D scene, using synthetic and real data. + +# 1.1. Notation + +Throughout the paper we use lower-case letters to represent scalars and vectors, and upper-case letters for matrices. An element of a matrix $A$ at position $(i,j)$ is referred as $\{A\}_{i,j}$ , while $A_{i,j} \in \mathbb{R}^{n,m}$ corresponds to a block of the matrix $A$ with dimensions $n \times m$ . We use $\| A \|$ as the operator 2-norm of a matrix $A$ , and $A^{\dagger}$ as its Moore-Penrose pseudoinverse. We denote $\lambda_i(A)$ as the $i$ :th eigenvalue of a matrix $A \in \mathbb{R}^{n \times n}$ , such that $\lambda_1(A) \leq \lambda_2(A) \leq \ldots \leq \lambda_n(A)$ . + +# 2. Problem Statement + +The Point Set Registration (PSR) problem consists of estimating $m$ transformations, i.e. pairs of rotations and translations, that align $m$ observed point sets w.r.t. a global coordinate system, along with an "average" point set. The $m$ observed point sets and the "average" point set are usually also called source point sets and target point set, respectively. The problem assumes known correspondences between point sets, and it can have missing data in the sense + +that a source set might lack observations of some points in the target set. The goal is to minimize the distance between the transformed source sets to the target set, and the corresponding optimization problem is usually formulated as + +$$ +\min _ {y, R, t} \quad \sum_ {i, j} w _ {i, j} \| y _ {i} - \left(R _ {j} x _ {i, j} + t _ {j}\right) \| ^ {2}, \tag {1} +$$ + +$$ +\text {s u b j e c t} R _ {j} \in \mathcal {S O} (3), j = 1, \dots , m +$$ + +where $R_{j}$ and $t_j$ are the rotation and translation from frame $j$ to the global frame, $y_{i}$ the $i$ :th point of the target set, $x_{i,j}$ the observation of the $i$ :th point of the $j$ :th source set, and $w_{i,j} = \{0,1\}$ determines if point $i$ is observed in the $j$ :th source set. We assume that the target set has $n$ points and there are $m$ source sets, so $i = 1,\dots ,n$ and $j = 1,\dots ,m$ . Each term of (1) can be written in more compact form using trace notation as follows + +$$ +\begin{array}{l} \left\| y _ {i} - \left(R _ {j} x _ {i, j} + t _ {j}\right) \right\| ^ {2} = \\ = \operatorname {t r} \left(\left[ \begin{array}{l l l} y _ {i} & t _ {j} & R _ {j} \end{array} \right] \left[ \begin{array}{c c c} 1 & - 1 & - x _ {i, j} ^ {T} \\ - 1 & 1 & x _ {i, j} ^ {T} \\ x _ {i, j} & x _ {i, j} & - x _ {i, j} x _ {i, j} ^ {T} \end{array} \right] \left[ \begin{array}{l} y _ {i} ^ {T} \\ t _ {j} ^ {T} \\ R _ {j} ^ {T} \end{array} \right]\right), \tag {2} \\ \end{array} +$$ + +and if we assume that each source set has zero mean, i.e. $\sum_{i}w_{i,j}x_{i,j} = 0$ by summing over $i$ and $j$ the total cost in (1) becomes + +$$ +\operatorname {t r} \left(\left[ \begin{array}{l l l} Y & T & R \end{array} \right] \left[ \begin{array}{c c c} A & - W & - X ^ {T} \\ - W ^ {T} & B & 0 \\ - X & 0 & C \end{array} \right] \left[ \begin{array}{l} Y ^ {T} \\ T ^ {T} \\ R ^ {T} \end{array} \right]\right) \tag {3} +$$ + +where $Y = [y_{1} \ldots y_{n}]$ , $T = [t_{1} \ldots t_{m}]$ , $R = [R_{1} \ldots R_{m}]$ , $\{W\}_{i,j} = w_{i,j}$ , $A$ and $B$ are diagonal matrices with $\{A\}_{i,i} = \sum_{j} w_{i,j}$ and $\{B\}_{j,j} = \sum_{i} w_{i,j}$ , $C$ is a block diagonal matrix with $3 \times 3$ blocks $C_{j,j} = \sum_{i} w_{i,j} x_{i,j} x_{i,j}^{T}$ , and $X = [X_{1}^{T}, \ldots, X_{m}^{T}]^{T}$ with $X_{j} = [w_{1,j} x_{1,j} \ldots w_{n,j} x_{n,j}]$ . The cost function defined in (3) depends on $R, Y$ and $T$ . If we fix $R$ the remaining variables are unconstrained with a least squares objective and we can therefore compute the optimal $Y$ and $T$ in terms of $R$ , which eliminates $Y$ and $T$ . Another way to write (3) is + +$$ +\operatorname {t r} \left(Y A Y ^ {T} - 2 Y W T ^ {T} - 2 Y X ^ {T} R ^ {T} + T B T ^ {T} + R C R ^ {T}\right), \tag {4} +$$ + +where the term $RCR^T$ can be dropped since $RRT$ is constant along its $3 \times 3$ blocks diagonal. From the stationary conditions for the gradient of (4) with respect to the $T$ , we get that $-2YW + 2TB = 0 \Leftrightarrow T = YWB^{-1}$ and by replacing $T$ in (4) + +$$ +\operatorname {t r} \left(Y L Y ^ {T} - 2 Y X ^ {T} R ^ {T}\right). \tag {5} +$$ + +The matrix $L = A - WB^{-1}W^{T}$ is the Laplacian of a weighted graph, with $n$ nodes, each corresponding to a 3D + +point from $Y$ . A similar type of graph was studied by Mieghem et al. [25]. Graph Laplacians have some well known properties: 1) they are positive semidefinite; 2) for non-degenerative cases, they have a unique zero eigenvalue, which corresponds to the eigenvector $\mathbb{1}_n$ , that is a vector of all ones. For simplicity of notation we let $P = L^{\dagger}$ . By considering the eigenvalue decompositions of $L$ and $P$ it is easy to see that the same is true for $P$ , and that non-zero eigenvalues of $P$ can be obtained from the eigenvalues of $L$ as $\lambda_k(P) = 1 / \lambda_{n - k + 2}(L)$ , $k = 2,\dots ,n$ . Alternatively, one can write $L = \sum_{k}\Theta_{k}$ , where $\Theta_{k} = \mathrm{diag}(W_{k}) - \frac{1}{n_{k}} W_{k}^{T}W_{k}$ and $W_{k}$ is row $k$ of $W$ . Note that for source point sets with zero mean, we have that $t_k = \frac{\sum_i w_{i,k}y_k}{\sum_i w_{i,k}} = \frac{1}{n_k} YW_k^T$ , where $n_k = \sum_i w_{i,k}$ . This means that $T_{k}$ can be obtained from $Y$ as $T_{k} = \frac{1}{n_{k}} YW_{k}^{T}W_{k}$ , and consequently $Y_{k} - T_{k} = Y\left(\mathrm{diag}(W_{k}) - \frac{1}{n_{k}} W_{k}^{T}W_{k}\right) = Y\Theta_{k}$ . Each $\Theta_{k}$ is an orthogonal projection, which means $\Theta_k^2 = \Theta_k = \Theta_k^T$ , and it can be interpreted as an operator that selects the set of points of $Y$ that are observed in the point set $k$ and makes it zero-meaned by subtracting its average. For a complete source point set, $W_{k}$ is a all-ones vector and we have $\Theta = I_n - \frac{1}{n}\mathbb{1}_n$ , and as so $\Theta P = P\Theta = P$ . + +To eliminate $Y$ from the expression (5) we again use the stationary point conditions, now using the gradient with respect to $Y$ , which gives + +$$ +2 Y L - 2 R X = 0 \Leftrightarrow Y = R X P + Q, \tag {6} +$$ + +where $Q$ is an arbitrary matrix that fulfills $QL = 0$ . The matrix $Q$ , who's rows are in the nullspace of $L$ , must have constant rows. Since the columns of $X^T$ have zero mean it is clear that $QX^T = 0$ and therefore substituting (6) into (5) we can write our cost function as $-\mathrm{tr}\left(RXP^TR^T\right)$ . Since $Q$ has no influence on the cost function, we can choose $Q = 0$ and as so $Y = RXP$ . We define our primal problem $(P)$ as minimizing the cost function over the rotation matrices group, i.e., + +$$ +(P) \quad \min _ {R} \quad - \operatorname {t r} \left(R X P X ^ {T} R ^ {T}\right) \tag {7} +$$ + +subject to $R_{j}\in \mathcal{SO}(3),j = 1,\ldots ,m.$ + +In the following we let $M = -XPX^T$ . + +# 3. Duality and Optimality Conditions + +This section will focus on sufficient conditions, in terms of the dual variables, for which there is no duality gap between the primal problem (7) and its dual problem. Then, in the next section, we will analyze these conditions in terms of the input data, noise level and missing data. + +Eriksson et al. [8] have studied these conditions for the dual problem applied to the rotation averaging problem. The reasoning and main conclusions, given the similar + +structure of the primal problem, can also be directly applying for the semidefinite program to the PSR problem. In this section we give a brief review of this analysis. For additional details we refer to [8]. + +# 3.1. Relaxation of the Primal Problem + +For a solution $R^*$ to be a minimum of the primal problem $(P)$ it has to fulfill KKT conditions. If we relax the primal by removing the determinant constraint $(\det(R_j) = 1, j = 1, \ldots, m)$ , the Lagrangian of the problem is + +$$ +L (R, \Lambda) = \operatorname {t r} \left(R (\Lambda + M) R ^ {T}\right) - \operatorname {t r} (\Lambda), \tag {8} +$$ + +where $\Lambda = \mathrm{diag}(\Lambda_1, \ldots, \Lambda_m)$ and $\Lambda_j$ are $3 \times 3$ symmetric matrices. From the gradient of (8) we get that the KKT conditions are + +$$ +\begin{array}{l} \left(\Lambda^ {*} + M\right) R ^ {* T} = 0, \\ \vdots \end{array} \tag {9} +$$ + +$$ +R ^ {*} \in \mathcal {S O} (3) ^ {m}. +$$ + +The first equation of (9) allows us to get a closed form solution for $\Lambda^{*}$ as a function of $R^{*}$ , where each block $\Lambda_{i}^{*}$ is given by + +$$ +\Lambda_ {i} ^ {*} = \sum_ {j} X _ {i} P X _ {j} ^ {T} R _ {j} ^ {* T} R _ {i} ^ {*}, i = 1, \dots , m. \tag {10} +$$ + +From (10), and by defining $M_{\Lambda} = \Lambda^{*} + M$ , we get that + +$$ +(M _ {\Lambda}) _ {i, j} = \left\{ \begin{array}{l l} \sum_ {k \neq i} X _ {i} P X _ {k} ^ {T} R _ {k} ^ {* T} R _ {i} ^ {*}, & i = j \\ - X _ {i} P X _ {j} ^ {T}, & \text {o t h e r w i s e} \end{array} . \right. \tag {11} +$$ + +The result from (11) will be used in later sections. + +# 3.2. Sufficient Global Optimality Conditions + +In this section we will define the dual problem of $(P)$ and state conditions in terms of $M_{\Lambda}$ which guarantee that there is no duality gap between the primal and the dual problems. From (8) we can write the dual $(D)$ problem of $(P)$ as + +$$ +\max _ {M _ {\Lambda} \succeq 0} \quad \min _ {R} L (R, \Lambda). \tag {12} +$$ + +Note that we get + +$$ +\min _ {R} L (R, \Lambda) = \left\{ \begin{array}{l l} - \operatorname {t r} (\Lambda), & M _ {\Lambda} \succeq 0 \\ - \infty , & \text {o t h e r w i s e} \end{array} , \right. \tag {13} +$$ + +which gives the dual problem + +$$ +(D) \quad \max _ {M _ {\Lambda} \succeq 0} \operatorname {t r} (\Lambda). \tag {14} +$$ + +The following lemma relates the KKT conditions to the dual problem and forms the basis of our approach: + +Lemma 1 If $R^{*}$ is a KKT point with corresponding Lagrange multiplier $\Lambda^{*}$ then $R^{*}$ is globally optimal and there is no duality gap between $(P)$ and $(D)$ if $M_{\Lambda} \succeq 0$ . + +If the dual variable $\Lambda^{*}$ can be computed by other means than solving the SDP then $M_{\Lambda}^{*} \succeq 0$ can be used as a certificate of optimality. Hence this gives us a way of verifying optimality of a local solution for the PSR problem. + +# 4. Spectral Analysis of $M_{\Lambda}$ + +In this section we investigate under what conditions we can ensure that $M_{\Lambda} \succeq 0$ for a KKT point $R^{*}$ . Our goal is to understand why these problems often give tight relaxations even for relatively high noise levels (see Section 6). + +# 4.1. Decoupling into Noise-free and Noisy Data + +We will start by defining $D_R$ as a block diagonal matrix with $(D_R)_{i,i} = R_i^*$ . Since $D_R$ is an orthogonal matrix, we have that if $D_R M_\Lambda D_R^T$ is positive semidefinite, then $M_\Lambda$ is positive semidefinite as well. From (11), we get that each $3 \times 3$ block of $D_R M_\Lambda D_R^T$ is given by + +$$ +\left(D _ {R} M _ {\Lambda} D _ {R} ^ {T}\right) _ {i, j} = \left\{ \begin{array}{l l} \sum_ {k \neq i} R _ {i} ^ {*} X _ {i} P X _ {k} ^ {T} R _ {k} ^ {* T}, & i = j \\ - R _ {i} ^ {*} X _ {i} P X _ {j} ^ {T} R _ {j} ^ {* T}, & \text {o t h e r w i s e} \end{array} \right. \tag {15} +$$ + +From now on we will again drop the $(.)^{*}$ notation for simplicity. In the absence of noise, $R_{k}X_{k} = Y\Theta_{k}$ , we get that the block elements outside of the diagonal of $D_{R}M_{\Lambda}D_{R}^{T}$ become $-Y\Theta_{i}P\Theta_{j}Y^{T}$ and the diagonal blocks become $\sum_{k\neq i}Y\Theta_{i}P\Theta_{j}Y^{T}$ . This results in a positive semidefinite matrix $D_{Y\Theta}\Phi D_{Y\Theta}^{T}$ , where + +$$ +D _ {Y \Theta} = \left[ \begin{array}{c c c} Y \Theta_ {1} & 0 ^ {3 \times n} & \dots \\ 0 ^ {3 \times n} & Y \Theta_ {2} & \dots \\ \vdots & \vdots & \ddots \end{array} \right] \tag {16} +$$ + +and each $n\times n$ block of $\Phi$ is given by + +$$ +\Phi_ {i, j} = \left\{ \begin{array}{l} I - P, i = j \\ - P, \text {o t h e r w i s e} \end{array} \right.. \tag {17} +$$ + +To the difference between $D_{R}M_{\Lambda}D_{R}^{T}$ and $D_{Y\Theta}\Phi D_{Y\Theta}^{T}$ we will call $\Delta$ , which consist of a matrix that captures the noise dependence of $D_{R}M_{\Lambda}D_{R}^{T}$ . As so, we have $D_{R}M_{\Lambda}D_{R}^{T} = D_{Y\Theta}\Phi D_{Y\Theta}^{T} + \Delta$ . + +# 4.2. Spectral Analysis of the Decoupled Data + +The matrix $D_{R}M_{\Lambda}D_{R}^{T}$ is positive semidefinite if and only if the eigenvalues of $D_{R}M_{\Lambda}D_{R}^{T}$ are greater or equal to zero. Using Weyl's eigenvalue inequality and our noise-free and noisy decomposition of $D_{R}M_{\Lambda}D_{R}^{T}$ , we can write that + +$$ +\lambda_ {1} \left(D _ {R} M _ {\Lambda} D _ {R} ^ {T}\right) \geq \lambda_ {1} \left(D _ {Y \Theta} \Phi D _ {Y \Theta} ^ {T}\right) - \left| \lambda_ {\max } (\Delta) \right| \geq 0. \tag {18} +$$ + +Note that, according to (15), $\sum_{j}\left(D_{R}M_{\Lambda}D_{R}^{T}\right)_{i,j} = 0$ meaning that any matrix $\mu N = \mu [I I \ldots ]^T$ with arbitrary $\mu$ belongs to the null space of $D_{R}M_{\Lambda}D_{R}^{T}$ . For a large enough $\mu$ , we have that $\lambda_1\left(D_R M_\Lambda D_R^T +\mu NN^T\right) = \lambda_4\left(D_R M_\Lambda D_R^T\right)$ . The exact same reasoning can be applied to $D_{Y\Theta}\Phi D_{Y\Theta}^{T}$ , resulting in $\lambda_1\left(D_{Y\Theta}\Phi D_{Y\Theta}^T +\mu NN^T\right) = \lambda_4\left(D_{Y\Theta}\Phi D_{Y\Theta}^T\right)$ . And so, by adding $\mu NN^T$ to both sides we get + +$$ +\lambda_ {4} \left(D _ {R} M _ {\Lambda} D _ {R} ^ {T}\right) \geq \lambda_ {4} \left(D _ {Y \Theta} \Phi D _ {Y \Theta} ^ {T}\right) - \left| \lambda_ {\max } (\Delta) \right| \geq 0. \tag {19} +$$ + +We will use the result from (19) as a lower bound to $\lambda_4(D_R M_\Lambda D_R^T)$ , meaning that if we get $\lambda_4(D_{Y\Theta}\Phi D_{Y\Theta}^T) \geq |\lambda_{\max}(\Delta)|$ then $M_\Lambda$ is positive semidefinite and the KKT point is the global minimum of $(P)$ . + +Now, as stated in [8], we have that $|\lambda_{\max}(\Delta)| \leq \sum_{j} \|\Delta_{i,j}\|$ , where $\Delta_{i,j} = Y \Theta_i P \Theta_j Y^T - R_i X_i P X_j^T R_j^T$ for $i \neq j$ , and $\Delta_{i,i} = -\sum_{i \neq j} \Delta_{i,j}$ . By defining + +$$ +\eta := \max _ {i \neq j} m \| Y \Theta_ {i} P \Theta_ {j} Y ^ {T} - R _ {i} X _ {i} P X _ {j} ^ {T} R _ {j} ^ {T} \| \tag {20} +$$ + +we can conclude that $|\lambda_{\max}(\Delta)| \leq 2\sum_{i \neq j} \|\Delta_{i,j}\| \leq 2\frac{m-1}{m}\eta$ . As so, from (19) we obtain a sufficient condition for global optimality. + +Theorem 1 Given a candidate solution $R^{*}$ that fulfills (9), there is no duality gap between $(P)$ and $(D)$ if + +$$ +\epsilon := \frac {\eta}{\lambda_ {4} \left(D _ {Y \Theta} \Phi D _ {Y \Theta} ^ {T}\right)} \leq \frac {m}{2 (m - 1)}. \tag {21} +$$ + +No missing data case For the particular case of no missing data, we have that $\lambda_4(D_{Y\Theta}\Phi D_{Y\Theta}^T)$ can be simplified. Note that, in this case, $D_Y\Phi D_Y^T = (mI_m - \mathbb{1}_m)\otimes \frac{1}{m} YY^T$ The eigenvalue property of the Kronecker product tells us that the eigenvalues of $D_Y\Phi D_Y^T$ are given by $\lambda_i(mI_m-$ $\mathbb{1}_m)\lambda_j(\frac{1}{m} YY^T)$ with $i = 1,\dots ,m$ and $j = 1,2,3$ .The matrix $mI_{m} - \mathbb{1}_{m}$ has $m$ eigenvalues, where $\lambda_{1}(mI_{m}-$ $\mathbb{1}_m) = 0$ and $\lambda_k(mI_m - \mathbb{1}_m) = m$ $k = 2,\ldots ,m$ . This means that the smallest non-zero eigenvalue of $D_Y\Phi D_Y^T$ is given by $\lambda_4(D_Y\Phi D_Y^T) = \lambda_1(YY^T)$ . The upper bound of $|\lambda_{\mathrm{max}}(\Delta)|$ can also be simplified since now we have + +$$ +\eta_ {0} := \max _ {i \neq j} \| Y Y ^ {T} - R _ {i} X _ {i} X _ {j} ^ {T} R _ {j} ^ {T} \| \tag {22} +$$ + +and consequently a sufficient condition for global optimality for no missing data is obtained. + +Corollary 1.1 (No Missing Data) If all points are visible in all views, i.e., $w_{i,j} = 1$ , $\forall i,j$ , then, given a candidate solution $R^*$ that fulfills (9), there is no duality gap between $(P)$ and $(D)$ if + +$$ +\epsilon_ {0} := \frac {\eta_ {0}}{\lambda_ {1} (Y Y ^ {T})} \leq \frac {m}{2 (m - 1)}. \tag {23} +$$ + +# 4.3. Interpretation and Evaluation + +The results Theorem 1 and specially Corollary 1.1 allow us to obtain some interpretation about the (sufficient) conditions for global optimality. For the no missing data case, one can see that global optimality is guaranteed when the ratio between the biggest eigenvalue of the noise dependent $\eta_0$ and the smallest eigenvalue is smaller than $\frac{m}{2(m - 1)}$ . The $\eta_0$ encapsulates the noise in the problem by quantifying the difference between the covariance matrix of $Y$ and the cross-correlation matrix of each pair of point sets, over $i \neq j$ . Note that in the noise-free case we have $\eta_0 = 0$ . A similar interpretation can be extended to the general case with missing data, where the covariance and correlation matrices in (20), as well as the clean data in $\lambda_4(D_{Y\Theta}\Phi D_{Y\Theta}^T)$ , are weighted based on the observed data through $P$ . + +To evaluate the duality gap and the results from Theorem 1 and Corollary 1.1, we will generate several (100) instances of PSR problems for different noise levels, percentage of missing data, and spatial distribution of the target point cloud. Each instance has $n = 250$ points and $m = 10$ rotations and translations, generated from a Gaussian distribution. The noise in the source point sets is also generated from a Gaussian distribution with standard deviation from 0 to 4 times the standard deviation of the instance's point cloud. For the missing data, we randomly remove $p\%$ of the $n$ points, with $p = \{0, 25, 50\}$ . Since $\epsilon$ depends on $\lambda_4(D_{Y\Theta}\Phi D_{Y\Theta}^T)$ , we also change the instance's point cloud covariance, such that $\frac{\lambda_1(YY^T)}{\lambda_3(YYT)} = q$ , with $q = \{0.1, 0.5, 1\}$ . Note that if $q = 0$ , the point cloud is contained in a 2D-plane. Regarding the duality gap of the SDP relaxation, we solve the SDP problem similarly to what Eriksson et al. [8] do, and then look at the rank of the obtained solution. If the rank is superior to 3 then the relaxation is non-tight. + +For these two experiments, the average rank of $\epsilon$ and of the SDP solution over the PSR problem instances are shown in Figure 1 and 2, respectively, and we have sufficient conditions for global optimality when $\epsilon < \frac{m}{2(m - 1)} = 0.56$ . Since $\epsilon$ can only be evaluated for KKT points, when the SDP gives a solution with rank higher than 3, we project it to a rank 3 solution and then perform local optimization (see Section 6.1 for more details about this). + +One of the main things to note is the high amount of noise that the SDP relaxation allows before there is duality gap. We can also see that the tightness of the relaxation is highly affected by changes in $p$ and $q$ . In particular, from our experiments it is clear that the bound in Theorem 1 gets looser as $\lambda_1 (YY^T) \to 0$ , and consequently $\lambda_4 (D_{Y\Theta} \Phi D_{Y\Theta}^T) \to 0$ , resulting in a reduced usefulness for real problems when the estimated point cloud is close to planar. To improve this, one has to find an alternative decoupling in which the noise-free component does not depend on the point cloud spatial distribution. + +![](images/78c39144c78911be828bb169b8f7544cd72b0cc240066ebebe59aa4be0c496c5.jpg) +Figure 1: Evaluation of the result from Theorem 1 for $0\%$ , $25\%$ and $50\%$ of missing data and under different noise levels. The plotted data points correspond to the average over the generated problem instances. For this experiment, $\frac{\lambda_1(YY^T)}{\lambda_3(YY^T)} = q$ is fixed as 1. + +![](images/cc5ec53937489b9dfecb5bd21824ad3807d7a463ae93b0106edbb2327a20b069.jpg) +Figure 2: Evaluation of the result from Theorem 1 for $q = \{0.1, 0.5, 1\}$ and under different noise levels. The plotted data points correspond to the average over the generated problem instances. For this experiment, we set $p = 0$ (no missing data). + +# 5. An Alternative Spectral Analysis + +In order to find a better noise-free/noisy data decomposition we go back to the matrix $D_{R}M_{\Lambda}D_{R}^{T}$ defined in (15). This matrix can also be written as $D_{R}M_{\Lambda}D_{R}^{T} = D_{1} - D_{2}PD_{2}^{T}$ where $D_{1} = \mathrm{blkdiag}(R_{1}X_{1}Y^{T},\ldots ,R_{m}X_{m}Y^{T})$ and $D_{2} = D_{R}X$ . This means that $D_{R}M_{\Lambda}D_{R}^{T}$ is the Schur complement $Q\setminus L$ of a matrix + +$$ +Q = \left[ \begin{array}{c c} D _ {1} & D _ {2} \\ D _ {2} ^ {T} & L \end{array} \right]. \tag {24} +$$ + +From the Schur complement properties, it follows that if $L \succeq 0$ (which is true since it is the Laplacian of a weighted graph as stated in Section 2), then $D_{R}M_{\Lambda}D_{R}^{T} \succeq 0$ iff $Q \succeq 0$ . The matrix $Q$ has other Schur complement, $Q \setminus D1 = L - D_2^T D_1^{-1}D_2$ and similarly, we have that if $D1 \succeq 0$ , then $Q \succeq 0$ iff $L - D_2^T D_1^{-1}D_2 \succeq 0$ . This means that finding + +the sufficient conditions for $D_{R}M_{\Lambda}D_{R}^{T}\succeq 0$ is equivalent to doing the same for $D_{1}\succeq 0$ and $Q\setminus D_1\succeq 0$ . Since $D_{1}$ is a block diagonal matrix, $D_{1}\succeq 0$ iff $R_{k}X_{k}Y^{T}\succeq 0$ , for all $k = 1,\ldots ,m$ . + +The matrix $Q \setminus D_1$ has rank $n - 4$ , and its null-space its spanned by a all-ones vector $\mathbb{1}$ and $Y$ . Note also that $\mathbb{1}$ and $Y$ are orthogonal since $Y^T\mathbb{1} = 0$ . + +# 5.1. Decoupling into Noise-free and Noisy Data + +The procedure for decoupling $Q \setminus D_{1}$ into noise-free and noisy matrices is similar to the one followed in Section 4.1. + +In a noise-free situation, we have that $Q \setminus D_1$ becomes $L - \sum_{i} \Theta_i Y^T \tilde{C}_i^{-1} Y \Theta_i$ with $\tilde{C}_i = Y \Theta_i Y^T$ . Note that this matrix shares the same rank and null space as $Q \setminus D_1$ . + +The noisy matrix, here denominated as $\Delta^{\prime}$ , can be obtained by subtracting $L - \sum_{i}\Theta_{i}Y^{T}\tilde{C}_{i}^{-1}Y\Theta_{i}$ from $Q\setminus D_1$ which results in + +$$ +\Delta^ {\prime} = \sum_ {i} \Theta_ {i} Y ^ {T} \tilde {C} _ {i} ^ {- 1} Y \Theta_ {i} - X _ {i} ^ {T} R _ {i} ^ {T} C _ {i} ^ {- 1} R _ {i} X _ {i} \tag {25} +$$ + +where $C_i^{-1} = (R_iX_iY^T)^{-1}$ + +# 5.2. Spectral Analysis of the Decoupled Data + +Just as in Section 4.2, we apply the Weyl's eigenvalue inequality to our decoupled data, and use the 4-dimensional null space of $Q \setminus D_1$ (and $L - \sum_{i} \Theta_i Y^T \tilde{C}_i^{-1} Y \Theta_i$ ) to consider the smallest non-zero eigenvalues, resulting in the inequality + +$$ +\lambda_ {1} (Q \backslash D _ {1}) \geq \lambda_ {5} \left(L - \sum_ {i} \Theta_ {i} Y ^ {T} \tilde {C} _ {i} ^ {- 1} Y \Theta_ {i}\right) - \eta^ {\prime} \geq 0, \tag {26} +$$ + +where we define + +$$ +\begin{array}{l} \eta^ {\prime} := \left| \lambda_ {\max } \left(\Delta^ {\prime}\right) \right| = \\ = \| \sum_ {i} \Theta_ {i} Y ^ {T} \tilde {C} _ {i} ^ {- 1} Y \Theta_ {i} - X _ {i} ^ {T} R _ {i} ^ {T} C _ {i} ^ {- 1} R _ {i} X _ {i} \|. \tag {27} \\ \end{array} +$$ + +From the eigenvalue inequality (26) we are able to draw a new sufficient condition for global optimality. + +Theorem 2 Given a candidate solution $R^*$ that fulfills (9), if $R_k X_k Y^T \succeq 0$ for all $k = 1, \ldots, m$ , then there is no duality gap between $(P)$ and $(D)$ if + +$$ +\epsilon^ {\prime} := \frac {\eta^ {\prime}}{\lambda_ {5} \left(L - \sum_ {i} \Theta_ {i} Y ^ {T} \tilde {C} _ {i} ^ {- 1} Y \Theta_ {i}\right)} \leq 1. \tag {28} +$$ + +No missing data case In the absence of missing data, we have $L = mI - \mathbb{1}_n$ , $Y\Theta_{i} = Y$ and $\tilde{C}_i = \tilde{C} = YY^T$ . In this case we are able to obtain a closed-form solution for $\lambda_5(L - \sum_i\Theta_iY^T\tilde{C}_i^{-1}Y\Theta_i)$ that does not depend on the point cloud spatial distribution, as desired. Since $\mathbb{1}_n = \mathbb{1}\mathbb{1}^T$ + +and $\mathbb{1}$ belongs to the null space of the noise-free matrix, we get that, for the no missing data case, + +$$ +\lambda_ {5} \left(L - \sum_ {i} \Theta_ {i} Y ^ {T} \tilde {C} _ {i} ^ {- 1} Y \Theta_ {i}\right) = \lambda_ {4} \left(m \left(I - Y ^ {T} \tilde {C} ^ {- 1} Y\right)\right) \tag {29} +$$ + +The term $Y^{T}\tilde{C}^{-1}Y$ has eigenvalues $\{0,\dots ,01,1,1\}$ , which means that $m(I - Y^T\tilde{C}^{-1}Y)$ will have eigenvalues $\{0,0,0,m,\ldots ,m\}$ . Recall that we have shown that $Y$ belongs to the null-space of the noise-free matrix, by adding $\mu Y^{T}Y$ we get that the eigenvalues of $m(I - Y^T\tilde{C}^{-1}Y) + \mu Y^{T}Y$ will be $\{m,\dots ,m,?,\dots ,?\}$ , where by ? we represent the eigenvalues of $\mu Y^{T}Y$ for a sufficiently large $\mu$ . This means that the smallest non-zero eigenvalue will be + +$$ +\lambda_ {5} \left(L - \sum_ {i} \Theta_ {i} Y ^ {T} \tilde {C} _ {i} ^ {- 1} Y \Theta_ {i}\right) = m. \tag {30} +$$ + +The expression for (27) also simplifies as + +$$ +\eta_ {0} ^ {\prime} := \left\| m Y ^ {T} \tilde {C} ^ {- 1} Y - \sum_ {i} X _ {i} ^ {T} R _ {i} ^ {T} C _ {i} ^ {- 1} R _ {i} X _ {i} \right\|, \tag {31} +$$ + +resulting in the following corollary. + +Corollary 2.1 (No Missing Data) If all points are visible in all views, i.e., $w_{i,j} = 1$ , $\forall i,j$ , given a candidate solution $R^{*}$ that fulfills (9), if $R_{k}X_{k}Y^{T} \succeq 0$ for all $k = 1,\ldots,m$ , then there is no duality gap between $(P)$ and $(D)$ if + +$$ +\epsilon_ {0} ^ {\prime} := \frac {\eta_ {0} ^ {\prime}}{m} \leq 1. \tag {32} +$$ + +# 5.3. Interpretation and Evaluation + +By comparing the results from Theorem 2 and Corollary 2.1 with Theorem 1 and Corollary 1.1, respectively, one can draw some connections. First, and as desired, the noise-free component has now no dependence on the point cloud distribution. Second, while in Theorem 1 we have $\eta$ as the difference between correlation matrices, weighted by $P$ (graph of observable data), in Theorem 2 we have $\eta'$ as the difference between the Gram matrices of $Y$ and the source point sets, normalized by the correlation matrices $\tilde{C}_i$ and $C_i$ respectively. + +To evaluate the result from Theorem 2 we apply it to the PSR problem instances generated in Section 4.3, under the same noise, missing data and point cloud covariance conditions. The results of the two experiments with the generated data are shown in Figures 3 and 4. We have sufficient conditions for global optimality of the candidate solution if $\epsilon' \leq 1$ and since the bound is tight, we also plot the maximum $\epsilon'$ over the instances for each noise level (red triangles) to clarify that in some instances we got $\epsilon' > 1$ even though the average is below 1. + +![](images/4b7f508d6c280105f96c5fc4bc5aba514bf0a5e1c50bc34d0489ee55fc087dbc.jpg) +(a) $p = 0$ + +![](images/a0cd3ed743dd4fc234ac9d9e9f59c85ac0e92fff72c23f41ba51e0ca36da1387.jpg) +(b) $p = 0.25$ + +![](images/b1829884ce6d1612a10dea30a6b1a0437a63a84aae352d8e6ea46484031f5b16.jpg) +(c) $p = 0.5$ + +![](images/2183e5938157025b2842a6ebd28f85cae794402605a0bf8843efb5273095ebf2.jpg) +Figure 3: Evaluation of the result from Theorem 2 under the same conditions as in Figure 1. The continuous red line shows the average of $\epsilon'$ over the instances and the red triangles the maximum $\epsilon'$ obtain for each noise level. +(a) $q = 1$ + +![](images/c98dced74f73b428f2852b8f8b3f5c52591dcfb7b3404e50ad2e756caacb613a.jpg) +(b) $q = 0.5$ + +![](images/00f38bcd283ab816680ea2f97ce6c93055b442c830c98163730c5c98a9f3dae6.jpg) +(c) $q = 0.1$ + +![](images/a37a46cd4d661164f14dd8f0dce66eb5c12f71f3d9360bd952beaa6d8a9d27b5.jpg) +Figure 4: Evaluation of the result from Theorem 2 under the same conditions as in Figure 2. The continuous red line shows the average of $\epsilon'$ over the instances and the red triangles the maximum $\epsilon'$ obtain for each noise level. +Figure 5: Comparison between the running time of our local optimizer and solving the SDP using SeDuMi [23]. + +As desired, the result from Theorem 2 is more robust to changes in the target point cloud's shape, giving a tighter bound on $\epsilon'$ . Additionally, there is also some improvement in terms of the tightness of the bound for different missing data percentages when compared with the result from Lemma 1. + +# 6. Experiments + +Given Lemma 1 and Theorems 1, and 2 we will now apply it to real data. We also give a brief explanation of the local optimizer used for obtaining the candidate solutions. + +# 6.1. Local Optimization + +One of the main applications of our results is enabling the test for global optimality of a local minimum obtained through some local optimization algorithm. This is particularly advantageous since local optimization provides faster convergence compared to solving the SDP. Figure 5 shows a comparison between the running time of the local optimization method using in our experiments and solving the SDP, for increasing values of $m$ (number of source point sets). + +In our simple local optimizer, we linearize rotations as $R \approx (I + a_{1}S_{1} + a_{2}S_{2} + a_{3}S_{3})R$ , with + +$$ +S _ {1} = \left[ \begin{array}{c c c} 0 & - 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{array} \right], S _ {2} = \left[ \begin{array}{c c c} 0 & 0 & - 1 \\ 0 & 0 & 0 \\ 1 & 0 & 0 \end{array} \right], S _ {3} = \left[ \begin{array}{c c c} 0 & 0 & 0 \\ 0 & 0 & - 1 \\ 0 & 1 & 0 \end{array} \right]. \tag {33} +$$ + +and where $a_1, a_2$ , and $a_3$ parameterize each rotation. We update the parameters of each rotation independently using the gradient of the linearized cost function of the primal (P), and then project the solution into $\mathcal{SO}(3)$ using the exponential map $R \gets e^{a_1 S_1 + a_2 S_2 + a_3 S_3} R$ . As a stopping criterion, we used a threshold on the average magnitude of the gradient. Note that this is a simplistic local optimizer for this problem, and that more efficient methods can (and should) be used to solve it. + +![](images/2f9fc700a0ef11e01380c570eb31b04ed51247e3a8c8735c1957afbaad62097c.jpg) +Figure 6: (a) Evaluation of our results in the $fr1/teddy$ sequence of the TUM RGB-D dataset ( $m = 47$ , $n = 3606$ ). The solution obtained with the local optimizer is the global minimum of (P) since it resulted in a psd $M_{\Lambda}$ and $\epsilon' = 0.1769$ . We also got $\epsilon = 2.0963$ ; (b) Evaluation of our results in the $fr3/teddy$ sequence of the TUM RGB-D dataset ( $m = 50$ , $n = 2812$ ). The solution obtained with the local optimizer resulted in a non-psd $M_{\Lambda}$ , $\epsilon = 2157.6$ and $\epsilon' = 714.84$ . + +# 6.2. Evaluation of Results using Real Data + +In order to show that the results from Lemma 1 and Theorems 1 and 2 can be applied to real problems, we use the local optimizer to reconstruct part of two sequences of the TUM RGB-D dataset [22]: $fr1/teddy$ and $fr3/teddy$ . The correspondences between images in each sequence are obtained by matching SIFT features [15], using MATLAB [17] and VLFeat library [27]. Three of the images used and two different points of view of the reconstruction scene are shown in Figures 6a and 6b. + +For the $fr1/teddy$ sequence we use the first 47 images to get the point clouds and correspondences, resulting in $n = 3606$ points. The result obtained by using our local optimizer resulted in $M_{\Lambda} \succeq 0$ , which by Lemma 1 directly implies that it is a global maximum of (P). We also evaluate the results from Theorems 1 and 2, which give $\epsilon = 2.0963$ and $\epsilon' = 0.1769$ , respectively, and the latter also provide sufficient conditions for global optimality of the candidate solution. The fact that the sufficient condition related to $\epsilon$ is not fulfilled shows, even though valid, how sensible this condition is to missing data and spatial distribution of the point cloud. + +For the $fr3/teddy$ sequence we take 1 in every 6 images, perform the SIFT matching and end up with $n = 2812$ points. For our candidate solution obtained with the local optimizer we got a non-psd $M_{\Lambda}$ , $\epsilon = 2157.6$ and $\epsilon' = 714.84$ . We also solved the SDP and the solution obtained had rank 4, which shows that the SDP relaxation for this sequence is non-tight. This sequence differs from the previous by having more movement and flow of points, resulting in more missing data and less shared points between source point sets, and as it is possible to see in Figure 1 and 2 these factors make the SDP relaxation less tight for lower amounts of noise. + +# 7. Conclusions + +In this paper we study global optimality conditions for the Point Set Registration problem through SDP relaxation. We use Lagrangian duality to determine a sufficient condition, Lemma 1, that guarantee that a candidate solution is a global minimum of the primal problem. Then, through spectral analysis, we decouple the problem into noise-free and noisy components, and define bounds (Theorems 1 and 2) that can also be used to test for global optimality of a candidate solution. In particular, for the no missing data scenario, we present Corollaries 1.1 and 2.1 that can be efficiently computed. + +The experiments show that the SDP relaxation is tight for relatively high amounts of noise in the source point sets, but it degrades as the target point cloud becomes close to planar and as we increase the amount of missing data in the problem. This restricts the use of SDP relaxation for PSR from scenarios where the reconstructed scene is roughly planar or where there are few shared points between several source points sets. + +However, for scenarios where most of the points are observable, the SDP relaxation is tight and our results can be applied as a certificate for global optimality of a candidate solution. + +# Acknowledgements + +This work was supported by the Swedish Research Council (grants no. 2016-04445 and no. 2018-05375) and the Swedish Foundation for Strategic Research (Semantic Mapping and Visual Navigation for Smart Robots). + +# References + +[1] Mica Arie-Nachimson, Shahar Z Kovalsky, Ira Kemelmacher-Shlizerman, Amit Singer, and Ronen Basri. Global motion estimation from point matches. In International Conference on 3D Imaging, Modeling, Processing, Visualization and Transmission, 2012. 1 +[2] Federica Arrigoni, Beatrice Rossi, and Andrea Fusiello. Global registration of 3d point sets via lrs decomposition. In ECCV, 2016. 1 +[3] K. S. Arun, T. S. Huang, and S. D. Blostein. Least-squares fitting of two 3-d point sets. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-9(5):698–700, Sep. 1987. 1 +[4] P. J. Besl and N. D. McKay. A method for registration of 3-d shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 14(2):239-256, Feb 1992. 1 +[5] Uttaran Bhattacharya and Venu Madhav Govindu. Efficient and robust registration on the 3d special euclidean group. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1 +[6] Jesus Briales and Javier Gonzalez-Jimenez. Convex global 3d registration with lagrangian duality. In International Conference on Computer Vision and Pattern Recognition (CVPR), jul 2017. 1 +[7] Kunal N Chaudhury, Yuehaw Khoo, and Amit Singer. Global registration of multiple point clouds using semidefinite programming. SIAM Journal on Optimization, 25(1):468-501, 2015. 1, 2 +[8] Anders P. Eriksson, Carl Olsson, Fredrik Kahl, and Tat-Jun Chin. Rotation averaging and strong duality. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 127-135, 2018. 1, 2, 3, 4, 5 +[9] Johan Fredriksson and Carl Olsson. Simultaneous multiple rotation averaging using Lagrangian duality. In *Asian Conference on Computer Vision*, 2012. 1 +[10] V. Govindu. Combining two-view constraints for motion estimation. In IEEE Conference on Computer Vision and Pattern Recognition, 2001. 1 +[11] V. M. Govindu and A. Pooja. On averaging multiview relations for 3d scan registration. IEEE Transactions on Image Processing, 23(3):1289-1302, 2014. 1 +[12] R. Hartley, J. Trumpf, and Y. Dai. Rotation averaging and weak convexity. In International Symposium on Mathematical Theory of Networks and Systems, 2010. 1 +[13] Berthold K. P. Horn, Hugh M. Hilden, and Shahriar Negahdaripour. Closed-form solution of absolute orientation using orthonormal matrices. J. Opt. Soc. Am. A, 5(7):1127-1135, Jul 1988. 1 +[14] H. Li and R. Hartley. The 3d-3d registration problem revisited. In 2007 IEEE 11th International Conference on Computer Vision, pages 1–8, Oct 2007. 1 +[15] David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91-110, Nov 2004. 8 + +[16] D. Martinec and T. Pajdla. Robust rotation and translation estimation in multiview reconstruction. In IEEE Conference on Computer Vision and Pattern Recognition, 2007. 1 +[17] MATLAB. version 9.5.0 (R2018b). The MathWorks Inc., Natick, Massachusetts, 2018. 8 +[18] Carl Olsson and Anders P. Eriksson. Solving quadratically constrained geometrical problems using lagrangian duality. In International Conference on Pattern Recognition (ICPR), 2008. 1 +[19] David M. Rosen, Luca Carlone, Afonso S. Bandeira, and John J. Leonard. SE-Sync: A certifiably correct algorithm for synchronization over the special Euclidean group. CoRR, abs/1612.07386, 2016. 1 +[20] Szymon Rusinkiewicz and Marc Levoy. Efficient variants of the icp algorithm. Proc. 3DIM, 2001, 10 2001. 1 +[21] G. C. Sharp, S. W. Lee, and D. K. Wehe. Multiview registration of 3d scenes by minimizing error between coordinate frames. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(8):1037-1050, Aug 2004. 1 +[22] J. Sturm, N. Engelhard, F. Endres, W. Burgard, and D. Cremers. A benchmark for the evaluation of rgb-d slam systems. In Proc. of the International Conference on Intelligent Robot Systems (IROS), Oct. 2012. 8 +[23] Jos F. Sturm and Gerardo A. Guerra. A matlab toolbox for optimization over symmetric cones. 1999. 7 +[24] A. Torsello, E. Rodolà, and A. Albarelli. Multiview registration via graph diffusion of dual quaternions. In CVPR 2011, pages 2441-2448, 2011. 1 +[25] P. Van Mieghem, K. Devriendt, and H. Cetinay. Pseudoinverse of the laplacian and best spreader node in a network. Phys. Rev. E, 96:032311, Sep 2017. 3 +[26] Lieven Vandenberghe and Stephen Boyd. Semidefinite programming. SIAM Rev., 38(1):49-95, Mar. 1996. 1 +[27] Andrea Vedaldi and Brian Fulkerson. Vlfeat: An open and portable library of computer vision algorithms. volume 3, pages 1469-1472, 10 2010. 8 +[28] Heng Yang and Luca Carlone. A quaternion-based certifiably optimal solution to the wahba problem with outliers. pages 1665-1674, 10 2019. 1 +[29] Lei Zhang, Ligang Liu, Craig Gotsman, and Steven J. Gortler. An as-rigid-as-possible approach to sensor network localization. ACM Trans. Sen. Netw., 6(4):35:1–35:21, July 2010. 1 +[30] Y. Zhong and N. Boumal. Near-optimal bounds for phase synchronization. ArXiv e-prints, Mar. 2017. 1 \ No newline at end of file diff --git a/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/images.zip b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b4d52ab26f8b27ec3770b36fa0ca214a8081edbd --- /dev/null +++ b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c2f49932524859f5cd5953fb0233120e3b6ca0578f15bc7abc3d25a741927b4 +size 384650 diff --git a/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/layout.json b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..08429399fbb7f7b78717c8cb0b2833a274446b90 --- /dev/null +++ b/globaloptimalityforpointsetregistrationusingsemidefiniteprogramming/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fe31e5a496c2bde6473fd341c45360a702c9259ee8025c41d0a833700622a6c +size 617001 diff --git a/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_content_list.json b/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..681de1f3fa6849080f1622a59c70f095d33efcd2 --- /dev/null +++ b/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:452631c24adaecb3b5c0449775b0f7c869139691611a698129f773cc419e15b9 +size 76714 diff --git a/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_model.json b/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..66df9a2a556c323a1d779d262595db8bf83020e9 --- /dev/null +++ b/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d17ff225133ea1ea5e68704b53fe9d56be47b88abe1b5537acacc2482a84a6a3 +size 94016 diff --git a/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_origin.pdf b/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bbbd9fbd74d2ac3a63253be0294a6b3368957f8b --- /dev/null +++ b/globaltextureenhancementforfakefacedetectioninthewild/d048fd97-adf3-40c1-923f-beb4286675c8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87b43d47c6f1232ed2401f09a28eb28b433b8bc37cf58486910c9c2dad22e25b +size 1697410 diff --git a/globaltextureenhancementforfakefacedetectioninthewild/full.md b/globaltextureenhancementforfakefacedetectioninthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4bb4bf6a65c989b4b4b1046d5ee0dde1882958a0 --- /dev/null +++ b/globaltextureenhancementforfakefacedetectioninthewild/full.md @@ -0,0 +1,325 @@ +# Global Texture Enhancement for Fake Face Detection In the Wild + +Zhengzhe Liu, Xiaojuan Qi $^{1,2}$ , Philip H. S. Torr $^{1}$ $^{1}$ University of Oxford, $^{2}$ The University of Hong Kong + +# Abstract + +Generative Adversarial Networks (GANs) can generate realistic fake face images that can easily fool human beings. On the contrary, a common Convolutional Neural Network (CNN) discriminator can achieve more than $99.9\%$ accuracy in discerning fake/real images. In this paper, we conduct an empirical study on fake/real faces, and have two important observations: firstly, the texture of fake faces is substantially different from real ones; secondly, global texture statistics are more robust to image editing and transferable to fake faces from different GANs and datasets. Motivated by the above observations, we propose a new architecture coined as Gram-Net, which leverages global image texture representations for robust fake image detection. Experimental results on several datasets demonstrate that our Gram-Net outperforms existing approaches. Especially, our Gram-Net is more robust to image edits, e.g. down-sampling, JPEG compression, blur, and noise. More importantly, our Gram-Net generalizes significantly better in detecting fake faces from GAN models not seen in the training phase and can perform decently in detecting fake natural images. + +# 1. Introduction + +With the development of GANs [9, 12, 13, 1], computers can generate vivid face images that can easily deceive human beings as shown in Figure 1. (Can you guess which images are generated from GANs?) These generated fake faces will inevitably bring serious social risks, e.g. fake news and evidence, and pose threats to security. Thus, powerful techniques to detect these fake faces are highly desirable. However, in contrast to the intensive studies in GANs, our understanding of generated faces is fairly superficial and how to detect fake faces is still an under-explored problem. Moreover, fake faces in practical scenarios are from different unknown sources, i.e. different GANs, and may undergo unknown image distortions such as downsampling, blur, noise and JPEG compression, which makes this task even more challenging. In this paper, we aim to produce new insights on understanding fake faces from GANs and propose a new ar + +![](images/c62eb1ba6e37b5bf5d2262eda5bd9c6042dd895cc57f179fc51b680c6c463ece.jpg) + +![](images/21bc62108d59126fcb59498885a23dad91a657cdddc82fae48122cb6c949afd4.jpg) + +![](images/8e6114b4ec12b3b23827c1827ad70e0de077f7b642a05a960fb603eff0433523.jpg) + +![](images/55739139d0e0da62037811c0e82f4b66a59e8db6288528be99c23559e9c38580.jpg) +Figure 1. Can you determine which are real and which are fake? (answer key below) $^{1}$ + +![](images/2d4b1ea127745ff1719b4e6fe6848b6e9d2463626d2f36458ca9b5be6922d7a0.jpg) + +![](images/3470022906458ccd5e5c666098c68931cdf854d57c45bffa99d7b1459e8cf9eb.jpg) + +chitecture to tackle the above challenges. Our contributions are as follows. + +Contribution 1. To facilitate the understanding of face images from GANs, we systematically study the behavior of human beings and CNN models in discriminating fake/real faces detailed in Section 3.1. In addition, we conduct extensive ablation experiments to diagnose the CNN discriminator and perform low-level statistics analysis as verification. + +These empirical studies lead us to the following findings. + +- Texture statistics of fake faces are substantially different from natural faces. +- Human focus on visible shape/color artifacts to detect fake face while CNNs focus more on texture regions. +- CNNs take textures as an important cue for fake face detection. A ResNet model performs almost perfectly in detecting untouched fake faces if the training data and testing data are from the same source. + +Contribution 2. Although a CNN based fake face detector performs significantly better than human beings, it is still not robust enough to handle real-world scenarios, where images may be modified and/or from different unknown sources. With further analysis of the relationship between texture and fake face detection, we found large texture information is + +more robust to image distortions and more invariant for face images from different GANs. However, CNNs cannot fully capture long-range or global cues due to their limited effective receptive field as studied in [21]. Motivated by the above observation, we further develop a novel architecture – Gram-Net, which improves the robustness and generalization ability of CNNs in detecting fake faces. The model incorporates “Gram Block” into the CNN backbone shown in Figure 5. The introduced Gram layer computes global texture representations in multiple semantic levels, which complements the backbone CNN. + +Contribution 3 Experiments on fake faces from StyleGAN [13], PGGAN [12], DRAGAN [15], DCGAN [29], StarGAN [4], and real faces from CelebA-HQ [12], FFHQ [13], CelebA [20], show that our Gram-Net achieves state-of-the-art performance on fake face detection. Specifically, our proposed Gram-Net is robust for detecting fake faces which are edited by resizing (10% improvement), blurring (15% improvement), adding noise (13% improvement) and JPEG compressing (9% improvement). More importantly, Gram-Net demonstrates significantly better generalization abilities. It surpasses the compared approaches by a large margin (more than 10% improvement) to detect fake faces generated by GANs that are not seen in the training phase and GANs trained for other tasks including image-to-image translation GANs, e.g. StarGAN. Further, our experiments show that Gram-Net (trained on StyleGAN) generalizes much better with a 10% improvement to detect fake natural images from GANs trained on ImageNet [16], e.g. BigGAN [3]. + +# 2. Related work + +GANs for human face generation. Recently, GAN models [8, 29, 15, 1, 2, 12, 13, 19, 36, 4] have been actively studied with applications for face image generation. One stream of research is to design GANs [8, 29, 15, 1, 2] for generating random face images from random vectors. Early works [8, 29, 15, 1, 2] can generate high quality low resolution images but suffer from mode collapse issues for generating high resolution images. The most advanced high resolution $(1024 \times 1024)$ GAN models – PGGAN [12] and StyleGAN [13]– can generate high quality face images that can even fool human beings. Another stream is to utilize GAN models for image-to-image translation tasks [19, 36, 4], e.g., Choi et al. proposed StarGAN model which can perform face image to face image translation. These generated fake faces may cause negative social impact. In this work, we aim to help the community gain more understanding about GAN generated fake faces and introduce novel neural network architecture for robust fake face image detection. + +Fake GAN face detection. Recently, some researchers have investigated the problem of fake face detection [17, + +26, 27, 23, 24, 32, 34, 30]. Color information is exploited in [17, 26]. In contrast, we found the performance of the CNN models changes little even if color information is removed. Marra et al. [23] showed that each GAN leaves specific finger-prints on images, and proposed to identify the source generating these images. However, the method cannot generalize to detect fake faces from GAN models that do not exist in the training data. Xuan et al. [32] adopted data augmentation for improving generalization, nevertheless, further improvements are limited by the detection algorithm. Nataraj et al. [27] proposed to take a color co-occurrence matrix as input for fake face detection. However, the hand-craft feature input results in losing the information of raw data. Zhang et al. [34] designed a model to capture the artifacts caused by the decoder. However, it failed to detect fake images from GANs with drastically different decoder architecture which is not seen in the training phase, while our approach can handle this case effectively. Wang et al. [30] proposed a neuron coverage based fake detector. However, the algorithm is time-consuming, hard to be deployed in real systems, and the performance is still far from satisfactory. Marra et al. [25] detected fake images with incremental learning. However, it only works when many GAN models are accessible in the training phase. Other works [18, 33] focused on the alignment of face landmarks to check whether the face is edited by face-swapping tools like DeepFakes [19]. Unlike the above, we intensively analyze fake faces, and correspondingly propose a novel simple framework which is more robust and exhibits significantly better generalization abilities. + +Textures in CNNs. The texture response of CNNs has attracted increasing attention in the last few years. Geirho et al. [7] showed that CNN models are strongly biased on textures rather than shapes. Our empirical study also reveals that CNN can utilize texture for fake face detection which is in line with the findings in [7]. Motivated by the above observation, we further analyzed texture differences in terms of low-level statistics. Gatys et al. [5] proposed that the Gram matrix is a good description of texture, which is further utilized for texture synthesis and image style transfer [6]. The above works exploit the Gram matrix for generating new images by constructing Gram matrix based matching losses. Our work is related to these methods by resorting to the Gram matrix. However, different from [6, 5], our work adopts the Gram matrix as a global texture descriptor to improve discriminative models and demonstrates its effectiveness in improving robustness and generalization. + +# 3. Empirical Studies and Analysis + +# 3.1. Human vs. CNN + +To shed insights on understanding fake faces generated from GANs, we systematically analyze the behavior of hu- + +man beings and CNNs in discerning fake/real faces by conducting psychophysical experiments. Specifically, our experiments are performed in in-domain setting, where the model is trained and tested on fake images from the same GAN. + +User study. For each participant, we firstly show him/her all the fake/real faces in the training set (10K real and 10K fake images). Then a randomly picked face image in our test set is shown to him/her without a time limit. Finally, he/she is required to click the "real" or "fake" button. On average, it takes around 5.14 seconds to evaluate one image. The results in this paper are based on a total of 20 participants, and each participant is required to rate 1000 images. At the same time, we also collected the user's judgment basis if his/her selection was "fake". According to their Votes, human users typically take as evidence easily recognized shape and color artifacts such as "asymmetrical eyes", "irregular teeth", "irregular letters", to name a few. + +CNN study and results. Testing images are also evaluated by CNN model - ResNet-18 [11]. The training and testing follow the in-domain setup. Table 1 (row1 & row2) shows that human beings are easily fooled by fake faces. In contrast, the ResNet CNN model achieves more than $99.9\%$ accuracy in all experiments. + +Analysis. To gain a deeper understanding about the question "Why CNNs perform so well at fake/real face discrimination?" and "What's the intrinsic difference between fake and real faces?", we further exploited CAM [35] to reveal the regions that CNNs utilize as evidence for fake face detection. Representative classification activation maps are shown in Figure 2. We can easily observe that the discriminative regions (warm color regions in Figure 2) for CNNs mainly lie in the texture regions, e.g. skin and hair, while the regions with clear artifacts make little contribution (cold color, red bounding box in Figure 2). The above observation motivates us to further study whether texture is an important cue that CNNs utilize for fake face detection and whether fake faces are different from real ones regarding texture statistics. + +# 3.2. Is texture an important cue utilized by CNNs for fake face detection? + +To validate the importance of textures for fake face detection, we conduct in-domain experiments on the skin regions since they contain rich texture information and less structural information such as shape. More specifically, we design the following controlled experiments on skin regions. + +- Original (skin): The input is the left cheek skin region based on DLib [14] face alignment algorithm as shown in Figure 3 (a - b). This is to verify whether the skin region contains enough useful information for fake face detection. + +- Gray-scale (skin): The skin regions are converted to gray-scale images. Typical examples are shown in Figure 3 (c - d). This experiment is to ablate the influence of color. +- $L0$ -filtered (skin): Small textures of the skin regions are filtered with $L_{0}$ filter [31]. The $L_{0}$ algorithm can keep shape and color information while smoothing small textures. Typical examples are shown in Figure 3 (e - f). + +Experimental results are shown in Table 1 (row 3 - row 5). The results of full image, original skin region, gray-scale skin region as inputs all indicate that skin regions already contain enough information for in-domain fake face detection and that colors do not influence the result much. The significant drop of performance (around $20\%$ ) of $L_{0}$ filtered inputs demonstrates the importance of texture for fake face detection in CNN models. In summary, texture plays a crucial role in CNN fake face detection and CNNs successfully capture the texture differences for discrimination, since the skin region performs on par with the full image in Table 1 (row 2 & row 3). + +# 3.3. What are the differences between real & fake faces in terms of texture? + +Empirical findings in Sec. 3.2 further motivate us to investigate the differences between real/fake faces in terms of texture. In the following, we adopt a texture analysis tool – the gray-level co-occurrence matrix (GLCM) [10]. + +The GLCM $P_{\theta}^{d} \in R^{256 \times 256}$ is created from a gray-scale texture image, and measures the co-occurrence of pixel values at a given offset parameterized by distance $d$ and angle $\theta$ . For example, $P_{\theta}^{d}(i,j)$ indicates how often a pixel with value $i$ and a pixel at offset $(d,\theta)$ with pixel value $j$ co-exist. In our analysis, we calculate $P_{d}^{\theta}$ across the whole dataset to get the statistical results, where $d \in \{1,2,5,10,15,20\}$ and $\theta \in \{0,\pi /2,\pi ,3\pi /2\}$ represents {right, down, left, upper}, $d$ and $\theta$ can capture the property of textures with different size and orientation respectively. From the GLCM, we compute the texture contrast $C_d$ at different distance offsets as follows, + +$$ +\mathcal {C} _ {d} = \frac {1}{N} \sum_ {i, j = 0} ^ {2 5 5} \sum_ {\theta = 0} ^ {3 \pi / 2} | i - j | ^ {2} P _ {d} ^ {\theta} (i, j) \tag {1} +$$ + +where $N = 256 \times 256 \times 4$ is a normalization factor, $i, j$ represents pixel intensities, and $d$ indicates pixel distances which are adopted to compute $\mathcal{C}_d$ . Larger $\mathcal{C}_d$ reflects stronger texture contrast, sharper and clearer visual effects. Inversely, low value $\mathcal{C}_d$ means the texture is blurred and unclear. + +The contrast component of GLCM is shown in Table 2. Real faces retain stronger contrast than fake faces at all measured distances. One explanation for this phenomenon is that + +
InputHuman vs. CNNsStyleGAN vs. CelebA-HQStyleGAN vs. FFHQPGGAN vs. CelebA-HQ
Full imageHuman Beings75.15%63.90%79.13%
Full imageResNet99.99%99.96%99.99%
Original (skin)ResNet99.93%99.61%99.96%
Gray-scale (skin)ResNet99.76%99.47%99.94%
L0-filtered (skin)ResNet78.64%76.84%72.02%
+ +![](images/aacbe747d0912f5d8596c3c41d959b497e12719ab28170c555c1a5e5974944c3.jpg) +(a) Real + +![](images/3a5916e9d20103c302efc7e4d437ddf5b59a7a7d57ca9004285a34eea2f91d4c.jpg) +(b) Real +Figure 2. Class activation maps from trained ResNet model (better viewed in color). The red bounding box shows the visible artifacts indicated by human observers but activated weakly by CNN: (c) asymmetrical earrings; (d) irregular letter; (e) irregular teeth. + +![](images/0092fe266891c0c7e70768bf88ba1df5bec73058f02cec36963f2e528c4957b1.jpg) +(c) Fake + +![](images/908b4126df885efe64561e49aba3f050751ee0f8bb5da38274afb04b037240b3.jpg) +(d) Fake + +![](images/905f8bd9d0e0e336356ca80562c4f15bc9e4ae7a912c3eb3a0e3684b6cf8f6a8.jpg) +(e) Fake + +![](images/ad3d28be4ded872f0130e57925e796164eea44360a3d499d6f0014e780237fa7.jpg) +(a) Real + +![](images/8835bacd08d0b3ad302a9e6c03d9b3830dbe417890002da8481dd8cdf3681149.jpg) +(b) Fake + +![](images/276831656c400d404ad5e83c8f7abd4bd7fa004229d2d6f77acafd460c463664.jpg) +(c) Real + +![](images/95ea1dff1213453efbd1fc708374d000d39d2aed150bf06804052ac86753a83e.jpg) +(d) Fake +Figure 3. Example images of Original (Skin) (a-b), Gray-scale (Skin) (c-d) and L0 filtered (Skin) (e-f).(better viewed in color) + +![](images/0a04e5149698fb7b55dd7a47eff0baa768ed3db0535c0432317832e198d8c2ca.jpg) +(e) Real + +![](images/6b15d1c80391388193c5439c3d7cac772df6b17f02ee28a068afa677bbc76893.jpg) +(f) Fake + +the CNN based generator typically correlates the values of nearby pixels and cannot generate as strong texture contrast as real data. In this section, we only provide an analysis of texture contrast and admit that the differences between real and fake faces are definitely beyond our analysis. We hope this can stimulate future research in analyzing the texture differences for fake face detection. + +# 4. Improved Model: Better Generalization Ability, More Robust + +Until now, our analysis has been performed in the indomain setting. The next step is to investigate the cross-GAN setting, where training and testing images are from different GAN models. Besides, we also investigate the images which are further modified by unintentional changes such as down- + +Table 1. Quantitative results on fake face detection of human beings and CNNs, and skin region ablation studies in the in-domain setting. + +
Dataset\distance(d)125101520
CelebA-HQ8.6812.3761.52117.94181.30237.30
StyleGAN(on CelebA-HQ)4.928.8447.4093.79146.33193.49
PGGAN(on CelebA-HQ)6.4511.4358.20112.28172.72226.40
+ +Table 2. Contrast property of GLCM calculated with all skin patches in training set. + +sampling, JPEG compression and/or even intentional editing by adding blur or noise. Our following analysis remains to focus on texture due to our findings in Sec. 3.1 – Sec. 3.3. + +# 4.1. Generalization and Robustness Analysis + +Our previous experimental finding is that the trained model performs almost perfectly in in-domain tests. However, our further experiments show that the performance of ResNet is reduced by $22\%$ (worst case) if the images are downsampled to $64 \times 64$ and JPEG compressed (Table 3: "JPEG $8\mathrm{x}\downarrow$ "). Moreover, the model suffers more in cross-GAN setting, especially when the trained models are evaluated on low-resolution GANs, in which the performance dropped to around $64\% -75\%$ (Table 4: Second row). The reduction of performance indicates that the CNN fake/real image discriminator is not robust to image editing and cannot generalize well to cross-GAN images, which limits its practical application. + +To tackle the above problem, we further analyzed the issue. In image editing scenario, we studied the correlation between the modified images and original ones. Specifically, we calculate the Pearson Correlation Coefficient between the original image and edited images in terms of texture contrast $C_d$ as shown in Figure 4. The coefficient value is closer to 1 as the pair distance $d$ increases (i.e. larger image textures and + +![](images/60dc29695adc8881a88d37bc74ffcc1d3a63f092cc87112a142a148b3720b3be.jpg) +(a)Downsample + +![](images/f5b719dd9edc5ec5378c6b2c52b6136b301d22f36c9cddedf83515b81fb84dfe.jpg) +(b) Gaussian blur +Figure 4. Pearson correlation coefficient of texture contrast between edited images and original images. Downsample ratio is 4, Gaussian blur kernel is 3, and Gaussian noise std is 3. + +![](images/7ba43b5b9b9d594e3fb564aa4d7bad858bfc85bd4c45817d2b541cfca064be7c.jpg) +(c) Gaussian noise + +more global), which indicates a strong correlation in large texture between edited and original images. In other words, large image texture has shown to be more robust to image editing. Moreover, in cross-GAN setting, large texture can also provide valuable information since the real/fake difference in terms of texture contrast still hold in the large pair distance $d$ shown in Table 2. Thus a model that can capture long-range information is desirable to improve the model robustness and generalization ability. However, current CNN models cannot incorporate long-range information due to its small effective receptive field which is much smaller than the calculated receptive field as presented in [21]. + +Inspired by [6], we propose to introduce "Gram Block" into the CNN architecture and propose a novel architecture coined as Gram-Net as shown in Figure 5. The "Gram Block" captures the global texture feature and enable long-range modeling by calculating the Gram matrix in different semantic levels. + +# 4.2. Gram-Net Architecture + +The overview of Gram-Net is shown in Figure 5. Gram Blocks are added to the ResNet architecture on the input image and before every downsampling layer, incorporating global image texture information in different semantic levels. Each Gram Block contains a convolution layer to align the feature dimension from different levels, a Gram matrix calculation layer to extract global image texture feature, two conv-bn-relu layers to refine the representation, and a global-pooling layer to align the gram-style feature with ResNet backbone. The Gram matrix is calculated as follows. + +$$ +G _ {i j} ^ {l} = \sum_ {k} F _ {i k} ^ {l} F _ {j k} ^ {l} \tag {2} +$$ + +where $F^l$ represents the $l$ -th feature map whose spatial dimension is vectorized, and $F_{ik}^{l}$ represents the $k$ th element in the $i$ th feature map of layer $l$ . We show Gram matrix is a good descriptor for global or long-range texture as follows. + +Can Gram matrix capture global texture information? In CNNs, each convolution layer $l$ can be viewed as a filter bank, and the feature map $F^l$ is a set of response images to these filters. + +$G^{l}$ is the eccentric covariance matrix of channels in layer $l$ . Each element $G_{ij}^{l}$ measures the covariance between the $i$ th and $j$ th vectorised response map in the layer. Equation 3 is the covariance matrix $C^l$ of feature maps, and Gram matrix $G^{l}$ in Equation 4 is actually the covariance matrix without subtracting the mean value. The diagonal elements of Gram matrix shows the response of the particular filter, while other elements show the coherence of different filters. In a word, Gram matrix is a summary of spatial statistics which discards the spatial and content information in the feature maps, and provides a stationary description of the texture. + +$$ +C ^ {l} = \left(c o v \left(F _ {i} ^ {l}, F _ {j} ^ {l}\right)\right) _ {n \times n} = \left(\mathbb {E} \left[ \left(F _ {i} ^ {l T} - \overline {{F _ {i} ^ {l T}}}\right) \left(F _ {j} ^ {l} - \overline {{F _ {j} ^ {l}}}\right) \right]\right) _ {n \times n} = +$$ + +$$ +\frac {1}{n - 1} \left[ \begin{array}{c c c} \left(F _ {1} ^ {l T} - \overline {{F _ {1} ^ {l T}}}\right) \left(F _ {1} ^ {l} - \overline {{F _ {1} ^ {l}}}\right) & \dots & \left(F _ {1} ^ {l T} - \overline {{F _ {1} ^ {l T}}}\right) \left(F _ {n} ^ {l} - \overline {{F _ {n} ^ {l}}}\right) \\ \vdots & \ddots & \\ \left(F _ {n} ^ {l T} - \overline {{F _ {n} ^ {l T}}}\right) \left(F _ {1} ^ {l} - \overline {{F _ {1} ^ {l}}}\right) & \dots & \left(F _ {n} ^ {l T} - \overline {{F _ {n} ^ {l T}}}\right) \left(F _ {n} ^ {l} - \overline {{F _ {n} ^ {l}}}\right) \end{array} \right] \tag {3} +$$ + +$$ +G ^ {l} = \left(F _ {i} ^ {l T} F _ {j} ^ {l}\right) _ {n \times n} = \left[ \begin{array}{c c c} F _ {1} ^ {l T} F _ {1} ^ {l} & \dots & F _ {1} ^ {l T} F _ {n} ^ {l} \\ \vdots & \ddots & \\ F _ {n} ^ {l T} F _ {1} ^ {l} & \dots & F _ {n} ^ {l T} F _ {n} ^ {l} \end{array} \right] \tag {4} +$$ + +In addition, $G_{ij}^{l}$ is a descriptor for the whole feature map, which is not limited by the receptive field of CNNs. This property enables it to extract long-range texture feature effectively, which complements the CNN backbone. + +To further analyze the information captured by Gram-Net and the CNN baseline, we adopt [22] to generate the reconstructed input that can produce the approximate feature map as the original input. The reconstructed inputs for reproducing the feature in "res-block 2" and "avg-pool" are shown + +![](images/85f3df6714de94928cb0b94c89ea4dc4d0ee32d9ee7c0fd7d048731fa638db87.jpg) +Figure 5. Gram-Net architecture. We extract global image texture feature with 6 Gram Blocks in different semantic levels from ResNet. $\oplus$ means concatenation. + +![](images/d67486e895b4875c5621fb077d1f550940f246b8977229af41d76900cd4c7920.jpg) +(a) Original + +![](images/ac641de646c189d0e79a5ca3d9162ac429aa281f11e20f2295ec8ddba459098c.jpg) +(b) ResNet +Figure 6. Visualization of reconstructed input. Reconstructed images are multiplied by a scale factor for clearer visualization. (a) is the original image. (b)(c) are reconstructed inputs for reproducing 'res-block2' feature in ResNet and Gram-Net respectively. (d)(e) are reconstructed inputs for reproducing 'avg-pool' in ResNet and Gram-Net respectively. + +![](images/8b7c24d66d2e0d08685d8fe3cb277e46f39f14201120dbf6c0e7ab0d1549e09f.jpg) +(c) Gram-Net + +![](images/dd81fa69a07942115ce6ebcbca9f3bc14ec8ca34abb636c24a9003ad97b35756.jpg) +(d) ResNet + +![](images/ffa4058920b62d495fa21f6338fbd3f89b97aa97e55a358c3359d00c2810569a.jpg) +(e) Gram-Net + +in Figure 6. The texture size of the reconstructed input image from Gram-Net is larger than that of baseline ResNet, which shows that our Gram-Net captures long-range texture patterns for discrimination. + +# 5. Experiments + +Implementation details. We implement all the approaches with PyTorch [28]. Models are initialized with pretrained ImageNet weights. We train all the models with learning rate $1e^{-5}$ and select model on validation set. The validation set contains totally 800 images from DCGAN, StarGAN, CelebA, PGGAN, StyleGAN on CelebA-HQ, StyleGAN on FFHQ, CelebA-HQ and FFHQ (100 for each). In all the experiments, the models are trained on 10k real and 10k fake images and evaluated on a holdout test set containing 10k real and 10k fake images. + +Experimental setup. We conduct experiments in indomain and cross-GAN settings, and further test the models on GANs trained on other datasets (cross-dataset). All the images are bilinear- resized to $512 \times 512$ which serves our baseline resolution, because we found that models on this resolution already performs almost the same as $1024 \times 1024$ and can accelerate the inference. All fake images are derived by directly evaluating the author-released code and model with default parameters. We compare the performance of our Gram-Net with a recent fake face detectors Co-detect [27] and ResNet. We choose ResNet-18 as baseline because it al + +ready achieves much better performance than human beings described in Section 3.1. For a fair comparison, we implement Gram-Net and [27] with the same ResNet-18 backbone, which takes the hand-craft texture descriptor GLCM of RGB channels as input. We train these three networks with images randomly bilinear-resized into range $64 \times 64$ to $256 \times 256$ as data augmentation, and evaluate the models regarding accuracy and their robustness to image editing and cross-GAN generalization ability. To minimize the influence of randomness, we repeat each experiment five times by randomly splitting training and testing sets and show the error bar. + +Robustness and cross-GAN generalization experiments on high-resolution GANs. We edit the images with down-sampling and JPEG compression, which often occur unintentionally when the images are uploaded to the Internet, put into slides or used as a video frame. Specifically, the models are evaluated in the following settings. 1) Original inputs with size $512 \times 512$ ("Origin"), 2) Downsampled images to resolution $64 \times 64$ ("8x ↓"), 3) JPEG Compressed $512 \times 512$ images ("JPEG"), 4) JPEG compressed and downsampled images ("JPEG 8x ↓"). In addition, GAN and real images can be edited by adding blur or noise intentionally. In table 3, Gaussian blur ("blur") is with kernel size 25 ("blur"), and Gaussian noise ("blur") is with standard deviation 5. + +The evaluation results are listed in Table 3. Our Gram-Net outperforms the compared methods in all scenarios. On aver + +
Training setTesting setMethodOriginal %8x ↓ %JPEG %JPEG 8x ↓Blur %Noise %Avg.
StyleGAN vs. CelebA-HQStyleGAN vs. CelebA-HQCo-detect ResNet Gram-Net79.93 ± 1.34 96.73 ± 3.60 99.10 ± 1.3671.80 ± 1.30 85.10 ± 6.22 95.84 ± 1.9874.58 ± 3.25 96.68 ± 3.50 99.05 ± 1.3771.25 ±1.18 83.33 ± 5.95 92.39 ± 2.6671.39 ±1.42 79.48 ± 8.70 94.20 ± 5.5754.09 ± 2.45 87.92 ± 6.16 92.47 ± 4.5270.51 88.20 95.51
CelebA-HQPGGAN vs. CelebA-HQCo-detect ResNet Gram-Net71.22 ± 3.76 93.74 ± 3.03 98.54 ± 1.2762.02 ± 2.86 77.75 ± 4.82 82.40 ± 6.3064.08 ± 1.93 89.35 ± 1.50 94.65 ± 3.2861.24 ± 2.28 69.35 ± 3.25 79.77 ± 6.1362.46 ± 3.31 78.06 ± 7.57 91.96 ± 4.7849.96 ± 0.28 82.65 ± 2.37 88.29 ± 3.4461.83 81.82 89.26
PGGAN vs. CelebA-HQPGGAN vs. CelebA-HQCo-detect ResNet Gram-Net91.14 ± 0.61 97.38 ± 0.52 98.78 ± 0.4982.94 ± 1.03 90.87 ± 1.90 94.66 ± 3.1086.00 ± 1.70 94.67 ± 1.15 97.29 ± 1.0582.46 ± 1.06 89.93 ± 1.50 94.08 ± 3.2284.24 ± 0.93 97.25 ± 0.87 98.55 ± 0.9254.77 ± 2.42 66.60 ± 9.61 70.32 ± 12.0480.26 89.45 92.28
CelebA-HQStyleGAN vs. CelebA-HQCo-detect ResNet Gram-Net57.30 ± 1.62 97.98 ± 1.90 98.55 ± 0.8957.41 ± 0.85 87.91 ± 1.01 91.57 ± 2.9552.90 ± 1.67 92.03 ± 4.14 94.28 ± 3.6782.46 ± 1.06 82.23 ± 1.39 83.64 ± 3.4357.41 ± 0.93 94.79 ± 1.32 97.05 ± 1.0450.08 ± 0.10 60.89 ± 7.24 60.07 ± 7.3251.47 85.97 87.52
StyleGAN vs. FFHQStyleGAN vs. FFHQCo-detect ResNet Gram-Net69.73 ± 2.41 90.27 ± 3.05 98.96 ± 0.5167.27 ± 1.68 70.99 ± 1.13 89.22 ± 4.4467.48 ± 2.83 89.35 ± 3.42 98.69 ± 0.8164.65 ± 1.67 67.96 ± 1.13 87.86 ± 3.4264.55 ± 1.93 75.60 ± 10.75 70.99 ± 6.0754.66 ± 3.97 81.32 ± 5.06 94.27 ± 2.1264.74 81.50 90.00
+ +Table 3. Performance on in-domain and cross to high-resolution GANs. In each training setting, the first half shows results in the in-domain setting and the second half shows results in the cross-GAN setting. Column (Avg.) shows the averaged results across all settings. The accuracy in "Original %" column is lower than the results in Table 1 because the models are selected to achieve best average performance in all the settings with validation set. The average inference time for one image on RTX 2080 Ti are as follows. Gram-Net takes $2.40e^{-3}$ s, ResNet-18 takes $2.35e^{-3}$ s, and Co-detect [27] takes $8.68e^{-3}$ s, in which $6.57e^{-3}$ s for co-occurrence matrix calculation. + +age, it outperforms [27] by more than $20\%$ . The results show that our Gram-Net adaptively extracts robust texture representation in feature space, which is much more powerful than low-level texture representations such as GLCM. Our model also improves the ResNet baseline by around $7\%$ (on average) in both in-domain and cross-GAN settings trained on StyleGAN vs. CelebA-HQ. The reason why Gram-Net improves less when trained on PGGAN vs. CelebA-HQ can be partially explained according to the GLCM statistics shown in Table 2. Images generated by PGGAN have larger $\mathcal{C}_d$ than StyleGAN, which is closer to real images. + +The above results manifest the effectiveness of Gram-Net in extracting features more invariant to different GAN models and more robust to image editing operations, such as downsampling, JPEG compression, blur and noise. + +Generalize to low-resolution GANs. To further evaluate the models' generalization capability, we directly apply the models above to low-resolution GANs trained on CelebA. We randomly choose 10k images from each set to evaluate our model. The fake images are kept at their original sizes, i.e., $64 \times 64$ for DCGAN and DRAGAN, $128 \times 128$ for StarGAN. CelebA images are of size $178 \times 218$ , so we center crop the $178 \times 178$ patch in the middle to make it square. + +The results as listed in Table 4 show that our Gram-Net better generalizes to low-resolution GANs. The performance of baseline ResNet and [27] degrades to around $50\%$ to $75\%$ in this setting. However, our method outperforms the ResNet baseline by around $10\%$ and [27] by around $15\%$ regarding accuracy in all settings. This further demonstrates global image texture feature introduced by our "Gram Block" is more invariant across different GANs, which can even generalize + +to detect fake faces from image-to-image translation model – StarGAN. + +
MethodAccuracy
Co-detect59.81 ± 10.82
ResNet80.55 ± 6.37
Gram-Net93.35 ± 2.25
+ +Table 5. Performance of Gram-Net when StyleGAN discriminator contains Gram-Block. The models are trained on StyleGAN (origin) vs. CelebA-HQ and tested on StyleGAN (with Gram-Block in discriminator) vs. CelebA-HQ. + +Generalize to StyleGAN trained with Gram-Block in discriminator. In this section, we evaluate the model on images from GAN models whose discriminator also contains Gram Blocks. We fine-tune StyleGAN with extra GramBlocks inserted in the discriminator, and further evaluate whether Gram-Net still works in this setting. We add 8 identical Gram-Blocks as in Gram-Net to encode feature maps (from feature map size 1024 to 4) in StyleGAN discriminator, and concatenate the $8 \times 32$ dimension feature vector extracted by Gram-Blocks with the original 512 dimension feature vector in original discriminator before the final classification. We fine-tune the model for 8K epochs on CelebA-HQ initialized by the author released model. We evaluate 10K fake images from StyleGAN with Gram-Block in discriminator and 10K images from CelebA-HQ. The images are resized to $512 \times 512$ resolution. We directly apply the models used in Table 3 and 4 in this setting. + +The results in Table 5 show that our Gram-Net still outperforms baseline methods even though the Gram-Block is inserted in the GAN discriminator. This demonstrates that our findings and analysis in section 3.3 are still valid. + +
Test TrainMethodDCGAN vs. CelebA %DRAGAN vs. CelebA %StarGAN vs. CelebA %Avg.
StyleGAN vs. CelebA-HQCo-detect68.83 ± 9.5759.99 ± 8.8158.60 ± 3.9962.47
ResNet75.11 ± 8.1065.53 ± 8.2064.04 ± 7.6968.22
Gram-Net81.65 ± 3.5176.40 ± 6.0674.96 ± 4.9077.67
+ +Table 4. Performance of Gram-Net on generalization to low-resolution GANs. + +
MethodTrain on StyleGAN vs. CelebA-HQ Test on StyleGAN vs. FFHQTrain on PGGAN vs. CelebA-HQ Test on StyleGAN vs. FFHQTrain on StyleGAN vs. FFHQ Test on StyleGAN vs. CelebA-HQ
Co-detect48.90 ± 3.9548.71 ± 1.4359.22 ± 1.30
ResNet75.45 ± 7.0154.44 ±3.6480.14 ± 7.47
Gram-Net77.69 ± 6.4959.57 ± 8.0780.72 ± 6.02
+ +Table 6. Performance of Gram-Net in cross-dataset settings + +
distance125101520
ImageNet525.70676.601551.852267.162892.903334.14
BigGAN367.65536.811426.662146.902771.963207.97
+ +Table 7. Contrast property of GLCM calculated with BigGAN and ImageNet images in training set with different pair distances. + +Cross-dataset experiments. Cross-dataset generalization is a challenging problem due to the inherent difference in dataset construction. Our experiments show that the statistics of CelebA-HQ and FFHQ are significantly different and can easily be distinguished by a neural network. Specifically, we built a real face image dataset consisting of 10K CelebA-HQ images and 10K FFHQ images, and our further experiments show that a ResNet network can achieve more than $99.9\%$ accuracy to discriminate CelebA-HQ and FFHQ images. This experiment shows that real face datasets significantly differ from each other. + +Despite the fact above, we evaluate our Gram-Net and baseline approaches in the cross-dataset setting as follows: train on StyleGAN(PGGAN) vs. CelebA-HQ and test on StyleGAN vs. FFHQ, train on StyleGAN vs. FFHQ and test on StyleGAN vs. CelebA-HQ. We keep all of the images as their original resolution in this experiment. The models are the same with the ones in Table 3 and 4. + +The result in Table 6 shows that fake image detectors trained on more realistic dataset (FFHQ) and stronger GANs (StyleGAN) have stronger ability to cross to less realistic datasets (CelebA-HQ) and less strong GANs (PGGAN). Also, Gram-Net still outperforms baselines methods. + +Generalize to natural images. In this section, we extend our analysis and apply Gram-Net to fake/real natural images. Specifically, we analyze ImageNet [16] vs. BigGAN [3], where the BigGAN model is trained on ImageNet. + +To analyze fake/real natural images, we further employ GLCM. We find that the difference in terms of texture contract between fake and real face images also holds for natural images. As Table 7 shows, real images retain stronger texture + +contrast than GAN images for all the distances measured. + +To evaluate the generalization ability of our model trained on face images, we directly apply the model used in Table 3 and 4 to test 10K ImageNet and 10K BigGAN images (10 images each class), and the results are shown in Table 8. + +
Training setTesting setMethodAccuracy % .
StyleGAN vs. CelebA-HQImageNet vs. BigGANCo-detect [27] ResNet Gram-Net51.94 ± 2.31 71.93 ± 2.09 80.29 ± 3.20
+ +Table 8. Quantitative results on ImageNet vs BigGAN. + +# 6. Conclusion + +In this paper, we conduct empirical studies on human and CNNs in discriminating fake/real faces and find that fake faces attain different textures from the real ones. Then, we perform low-level texture statistical analysis to further verify our findings. The statistics also show that large texture information is more robust to image editing and invariant among different GANs. Motivated by these findings, we propose a new architecture - Gram-Net, which leverages global texture features to improve the robustness and generalization ability in fake face detection. Experimental results show that Gram-Net significantly outperforms the most recent approaches and baseline models in all settings including indomain, cross-GAN, and cross-dataset. Moreover, our model exhibits better generalization ability in detecting fake natural images. Our work shows a new and promising direction for understanding fake images from GANs and improving fake face detection in the real world. + +# 7. Acknowledgement + +This work was supported by 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 acknowledge the Royal Academy of Engineering and FiveAI. + +# References + +[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International Conference on Machine Learning, pages 214-223, 2017. +[2] David Berthelot, Thomas Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. +[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018. +[4] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8789-8797, 2018. +[5] Leon Gatys, Alexander S Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. In Advances in neural information processing systems, pages 262-270, 2015. +[6] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2414-2423, 2016. +[7] 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. arXiv preprint arXiv:1811.12231, 2018. +[8] 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. +[9] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pages 5767-5777, 2017. +[10] Robert M Haralick, Karthikeyan Shanmugam, et al. Textural features for image classification. IEEE Transactions on systems, man, and cybernetics, (6):610-621, 1973. +[11] 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. +[12] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. arXiv preprint arXiv:1710.10196, 2017. +[13] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. arXiv preprint arXiv:1812.04948, 2018. +[14] Davis E. King. Dlib-ml: A machine learning toolkit. Journal of Machine Learning Research, 10:1755-1758, 2009. +[15] Naveen Kodali, Jacob Abernethy, James Hays, and Zsolt Kira. On convergence and stability of gans. arXiv preprint arXiv:1705.07215, 2017. +[16] 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. +[17] Haodong Li, Bin Li, Shunquan Tan, and Jiwu Huang. Detection of deep network generated images using disparities in color components. arXiv preprint arXiv:1808.07276, 2018. +[18] Yuezun Li and Siwei Lyu. Exposing deepfake videos by detecting face warping artifacts. arXiv preprint arXiv:1811.00656, 2018. +[19] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems, pages 700-708, 2017. +[20] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015. +[21] Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard Zemel. Understanding the effective receptive field in deep convolutional neural networks. In Advances in neural information processing systems, pages 4898-4906, 2016. +[22] 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. +[23] Francesco Marra, Diego Gragnaniello, Davide Cozzolino, and Luisa Verdoliva. Detection of gan-generated fake images over social networks. In 2018 IEEE Conference on Multimedia Information Processing and Retrieval (MIPR), pages 384-389. IEEE, 2018. +[24] Francesco Marra, Diego Gragnaniello, Luisa Verdoliva, and Giovanni Poggi. Do gans leave artificial fingerprints? In 2019 IEEE Conference on Multimedia Information Processing and Retrieval (MIPR), pages 506-511. IEEE, 2019. +[25] Francesco Marra, Cristiano Saltori, Giulia Boato, and Luisa Verdoliva. Incremental learning for the detection and classification of gan-generated images. arXiv preprint arXiv:1910.01568, 2019. +[26] Scott McCloskey and Michael Albright. Detecting gang-generated imagery using color cues. arXiv preprint arXiv:1812.08247, 2018. +[27] Lakshmanan Nataraj, Tajuddin Manhar Mohammed, BS Manjunath, Shivkumar Chandrasekaran, Arjuna Flenner, Jawadul H Bappy, and Amit K Roy-Chowdhury. Detecting gan generated fake images using co-occurrence matrices. arXiv preprint arXiv:1903.06836, 2019. +[28] 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. 2017. +[29] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. +[30] Run Wang, Lei Ma, Felix Juefei-Xu, Xiaofei Xie, Jian Wang, and Yang Liu. Fakespotter: A simple baseline for spotting ai-synthesized fake faces. arXiv preprint arXiv:1909.06122, 2019. +[31] Li Xu, Cewu Lu, Yi Xu, and Jiaya Jia. Image smoothing via 10 gradient minimization. In ACM Transactions on Graphics (TOG), volume 30, page 174. ACM, 2011. + +[32] Xinsheng Xuan, Bo Peng, Jing Dong, and Wei Wang. On the generalization of gan image forensics. arXiv preprint arXiv:1902.11153, 2019. +[33] Xin Yang, Yuezun Li, Honggang Qi, and Siwei Lyu. Exposing gan-synthesized faces using landmark locations. arXiv preprint arXiv:1904.00167, 2019. +[34] Xu Zhang, Svebor Karaman, and Shih-Fu Chang. Detecting and simulating artifacts in gan fake images. arXiv preprint arXiv:1907.06515, 2019. +[35] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2921-2929, 2016. +[36] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE international conference on computer vision, pages 2223-2232, 2017. \ No newline at end of file diff --git a/globaltextureenhancementforfakefacedetectioninthewild/images.zip b/globaltextureenhancementforfakefacedetectioninthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1df0609e35407dd93933d859921198882f06d4d5 --- /dev/null +++ b/globaltextureenhancementforfakefacedetectioninthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cf396cfeefb67ba3f4dab940dc5b833ebcfb3a31ac117342c6eaf9c899b34e4 +size 653508 diff --git a/globaltextureenhancementforfakefacedetectioninthewild/layout.json b/globaltextureenhancementforfakefacedetectioninthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ee71b913a6335ca63919770509673650ed971e95 --- /dev/null +++ b/globaltextureenhancementforfakefacedetectioninthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:448adb972e61bde839028d707e632ed778a40fe432e511606cc3cd81397092a1 +size 393881 diff --git a/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_content_list.json b/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8a7a614e62ca842d5bfbbfdc5348fbc66966bff3 --- /dev/null +++ b/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97fb9af7da7f350805bc9cf30828240a0d19839540fa216fd9a5757d175dc56b +size 70790 diff --git a/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_model.json b/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a84490cf6c0ab9f1d30e716466d649eec50d72f1 --- /dev/null +++ b/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:776d6fc814a805b84e78ea094cfeead0572efb8f79d18d811d616547b43e5625 +size 87328 diff --git a/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_origin.pdf b/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b34cae72b3732fc3d8fa07823190628daa420ead --- /dev/null +++ b/goingdeeperwithleanpointnetworks/f8e614fe-33e3-4139-890f-9241c1545f45_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3c4a320ea58459ec308958fc6d18cbba864e62e5273dae6316877c2b1698492 +size 1197362 diff --git a/goingdeeperwithleanpointnetworks/full.md b/goingdeeperwithleanpointnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d5637881115bd9f6e790c98ab9aa41acbbb9ab8d --- /dev/null +++ b/goingdeeperwithleanpointnetworks/full.md @@ -0,0 +1,261 @@ +# Going Deeper with Lean Point Networks + +Eric-Tuan $\mathbf{Le}^{1}$ + +Iasonas Kokkinos1,2 + +Niloy J. Mitra1,3 + +1University College London 2Ariel AI 3Adobe Research + +# Abstract + +In this work we introduce Lean Point Networks (LPNs) to train deeper and more accurate point processing networks by relying on three novel point processing blocks that improve memory consumption, inference time, and accuracy: a convolution-type block for point sets that blends neighborhood information in a memory-efficient manner; a crosslink block that efficiently shares information across low- and high-resolution processing branches; and a multi-resolution point cloud processing block for faster diffusion of information. By combining these blocks, we design wider and deeper point-based architectures. We report systematic accuracy and memory consumption improvements on multiple publicly available segmentation tasks by using our generic modules as drop-in replacements for the blocks of multiple architectures (PointNet++, DGCNN, SpiderNet, PointCNN). Code and pretrained models are publicly available at geometry.cs.ucl.ac.uk/projects/2020/deepeanpn/. + +# 1. Introduction + +Geometry processing has started profiting from applying deep learning to graphics and 3D shape analysis [25, 33, 6, 3], delivering networks that guarantee desirable properties of point cloud processing, such as permutation-invariance and quantization-free representation [28, 31, 32]. Despite these advances, the memory requirements of a majority of the point processing architectures still impede breakthroughs similar to those made in computer vision. + +Directly working with unstructured representations of 3D data (i.e., not residing on a spatial grid), necessitates re-inventing, for geometry processing, the functionality of basic image processing blocks, such as convolution operations, information exchange pathways, and multi-resolution data flow. Taking a Lagrangian perspective, in order to avoid quantization or multi-view methods, the pioneering PointNet architecture [24] demonstrated how to directly work on point cloud datasets by first lifting individual points to higher dimensional features (via a shared MLP) and then performing permutation-invariant local pooling. Point- + +$\mathrm{Net}++$ [25], by considering local point patches, groups information within a neighborhood based on Euclidean distance and then applies PointNet to the individual groups. This design choice requires explicitly duplicating local memory information among neighboring points, and potentially compromises performance as the networks go deeper. + +![](images/df6d205928210ec77e525ff684f5a4a96e398b812cf35100d2ea666166c2f8fa.jpg) + +![](images/970402da4e5a099b53ed044cec46f2ae8465b4c484a624ec0b3762b32265c669.jpg) + +![](images/e5a5d770e35ce4003187c65eabec1de9ae2a6e20a8a4aaabb69886d5c3c734fc.jpg) +Ground Truth +Segmentation on a faucet +Figure 1. Lean Point Networks (LPNs) can achieve higher point cloud segmentation accuracy while operating at substantially lower memory and inference time. (Top) Memory footprint and inference speed of LPN variants introduced in this work compared to the PointNet++ (PN++) baseline. (Middle) Improvements in accuracy for three segmentation benchmarks of increasing complexity. On the -most complex- PartNet dataset our deep network outperforms the shallow PointNet++ baseline by $3.4\%$ , yielding a $9.7\%$ relative increase. (Bottom) Part Segmentation by PointNet++ and Deep LPN. + +![](images/61985f531e79f5c479322ae474bf9f3e2dd58d32a03a69d52d0173bcb60b0ed8.jpg) +PN++ + +![](images/3cb0fff9836cd30f71375316f72da8e9b84ee949e3c5514411277f82574caac1.jpg) +Deep LPN + +In particular, the memory and computational demands of point network blocks (e.g., PointNet++ and many follow-up architectures) can affect both training speed and, more crucially, inference time. One of the main bottlenecks for such point networks is their memory-intensive nature, as detailed in Sec. 3.1. Specifically, the PointNet++ architecture and its variants replicate point neighborhood information, letting every node carry in its feature vector information about all of its neighborhood. This results in significant memory overhead, and limits the number of layers, features and feature compositions one can compute. + +In this work, we enhance such point processing networks that replicate local neighborhood information by introducing a set of modules that improve memory footprint and accuracy, without compromising on inference speed. We call the resulting architectures Lean Point Networks, to highlight their lightweight memory budget. We build on the decreased memory budget to go deeper with point networks. As has been witnessed repeatedly in the image domain [12, 14, 39], we show that going deep also increases the prediction accuracy of point networks. + +We start in Sec. 3.2 by replacing the grouping operation used in point cloud processing networks with a low-memory alternative that is the point cloud processing counterpart of efficient image processing implementations of convolution. The resulting 'point convolution block' - defined slightly differently from convolution used in classical signal processing - is $67\%$ more memory-efficient and $41\%$ faster than its PointNet++ counterpart, while exhibiting favorable training properties due to more effective mixing of information across neighborhoods. + +We then turn in Sec. 3.3 to improving the information flow across layers and scales within point networks through three techniques: a multi-resolution variant for multi-scale network which still delivers the multi-scale context but at a reduced memory and computational cost, residual links, and a new cross-link block that broadcasts multi-scale information across the network branches. By combining these blocks, we are able to successfully train deeper point networks that allow us to leverage upon larger datasets. + +In Sec. 4 we validate our method on the ShapeNet-Part, ScanNet and PartNet segmentation benchmarks, reporting systematic improvements over the PointNet++ baseline. As shown in Fig. 1, when combined these contributions deliver multifold reductions in memory consumption while improving performance, allowing us in a second stage to train increasingly wide and deep networks. On PartNet, the most complex dataset, our deep architecture achieves a $9.7\%$ relative increase in IoU while decreasing memory footprint by $57\%$ and inference time by $47\%$ . + +Having ablated our design choices on the PointNet++ baseline, in Sec. 4.3 we turn to confirming the generic nature of our blocks. We extend the scope of our experiments + +to three additional networks, (i) DGCNN [33], (ii) SpiderCNN [35], and (iii) PointCNN [21] and report systematic improvements in memory efficiency and performance. + +# 2. Related Work + +Learning in Point Clouds. Learning-based approaches have recently attracted significant attention in the context of Geometric Data Analysis, with several methods proposed specifically to handle point cloud data, including PointNet [24] and several extensions such as PointNet++ [25] and Dynamic Graph CNNs [33] for shape segmentation and classification, PCPNet [10] for normal and curvature estimation, P2P-Net [36] and PU-Net [38] for cross-domain point cloud transformation. Alternatively, kernel-based methods [2, 13, 22, 30] have also been proposed with impressive performance results. Although many alternatives to PointNet have been proposed [27, 20, 21, 13, 40] to achieve higher performance, the simplicity and effectiveness of PointNet and its extension PointNet++ make it popular for many other tasks [37]. + +Taking PointNet++ as our starting point, our work facilitates the transfer of network design techniques developed in computer vision to point cloud processing. In particular, significant accuracy improvements have been obtained with respect to the original AlexNet network [18] by engineering the scale of the filtering operations [41, 26], the structure of the computational blocks [29, 34], and the network's width and depth [12, 39]. A catalyst for experimenting with a larger space of network architecture, however, is the reduction of memory consumption - this motivated us to design lean alternatives to point processing networks. Notably, [42] introduce a new operator to improve point cloud network efficiency, but only focus on increasing the convergence speed by tuning the receptive field. [19] has investigated how residual/dense connections and dilated convolution could help mitigate vanishing gradient observed for deep graph convolution networks but without solving memory limitations, [13] use Monte Carlo estimators to estimate local convolution kernels. By contrast our work explicitly tackles the memory problem with the objective of training deeper/wider networks and shows that there are clear improvements over strong baselines. + +Memory-Efficient Networks. The memory complexity of the standard back-propagation implementation grows linearly with network's depth as backprop requires retaining in memory all of the intermediate activations computed during the forward pass, since they are required for the gradient computation in the backward pass. + +Several methods bypass this problem by trading off speed with memory. Checkpointing techniques [5, 9] use anchor points to free up intermediate computation results, and re-compute them in the backward pass. This is $1.5\mathrm{x}$ slower during training, since one performs effectively two + +forward passes rather than just one. More importantly, applying this technique is easy for chain-structured graphs, e.g., recursive networks [9] but is not as easy for general Directed Acyclic Graphs, such as U-Nets, or multi-scale networks like PointNet++. One needs to manually identify the graph components, making it cumbersome to experiment with diverse variations of architectures. + +Reversible Residual Networks (RevNets) [8] limit the computational block to come in a particular, invertible form of residual network. This is also $1.5\mathrm{x}$ slower during training, but alleviates the need for anchor points altogether. Unfortunately, it is unclear what is the point cloud counterpart of invertible blocks. + +We propose generic blocks to reduce the memory footprint inspired from multi-resolution processing and efficient implementations of the convolution operation in computer vision. As we show in Sec. 4.3, our blocks can be used as drop-in replacements in generic point processing architectures (PointNet++, DGCNN, SpiderNet, PointCNN) without any additional network design effort. + +# 3. Method + +We start with a brief introduction of the PointNet++ network, which serves as an example point network baseline. We then introduce our modules and explain how they decrease memory footprint and improve information flow. + +# 3.1. PointNet and PointNet++ Architectures + +PointNet++ [25] has been proposed as a method of augmenting the basic PointNet architecture with a grouping operation. As shown in Fig. 4(a), grouping is implemented through a 'neighborhood lookup', where each point $\mathbf{p}_i$ looks up its $k$ -nearest neighbors and stacks them to get a point set, say $P_{N_k}^i$ . If each point comes with a $D$ -dimensional feature vector, the result of this process is a tensor $T = \left[ \begin{array}{lll}\mathbf{v} & \mathbf{v}_{[.,1]} & \dots & \mathbf{v}_{[.,K]} \end{array} \right]$ of size $N\times D\times (K + 1)$ . Within the PointNet modules, every vector of this matrix is processed separately by a Multi-Layer-Perceptron that implements a function MLP: $R^{D}\rightarrow R^{D^{\prime}}$ , while at a later point a max-pooling operation over the $K$ neighbors of every point delivers a slim, $N\times D^{\prime}$ matrix. + +When training a network every layer constructs and retains a matrix like $T$ in memory, so that it can be used in the backward pass to update the MLP parameters, and send gradients to earlier layers. While demonstrated to be extremely effective, this design of PointNet++ has two main shortcomings: first, because of explicitly carrying around $k$ -nearest neighbor information for each point, the network layers are memory intensive; and second, being reliant on PointNet, it also delays transmission of global information until the last, max-pooling stage where the results of decoupled MLPs are combined. Many subsequent variants of PointNet++ suffer + +from similar memory and information flow limitations. As we describe now, these shortcomings are alleviated, by our convolution-type point processing layer. + +# 3.2. convPN: a convolution-type PointNet layer + +We propose a novel convolution-type PointNet layer (convPN), that is inspired from efficient implementations of convolution. Standard convolution operates in two steps: (i) neighborhood exposure and (ii) matrix multiplication. Our convPN block follows similar steps, as shown in Fig. 2, but the weight matrix blocks treating different neighbors are tied, so as to ensure permutation invariance. + +In more detail, standard 2D image convolution amounts to forming a $K^2$ tensor in memory when performing $K \times K$ filtering and then implementing a convolution as matrix multiplication. This amounts to the im2col operation used to implement convolutions with General Matrix-Matrix Multiplication (GEMM) [15]. In point clouds the nearest neighbor information provides us with the counterpart to the $K \times K$ neighborhood. + +Based on this observation we propose to use the strategy used in memory-efficient implementations of image convolutions for deep learning: we free the memory from a layer as soon as the forward pass computes its output, rather than maintaining the matrix in memory. In the backward pass we reconstruct the matrix on the fly from the outputs of the previous layer. We perform the required gradient computations and then return the GPU memory resources. + +As shown in Fig. 3, we gain further efficiency by replacing the MLPs of PointNet++ by a sequence of SLP-Pooling modules. This allows us to further reduce memory consumption, saving the layer activations only through the pooled features while at the same time increasing the frequency at which neighbors share information. + +As detailed in the Supplemental Material, a careful implementation of our convolution-type architecture shortens, on average, the time spent for the forward pass and the backward pass by $41\%$ and $68\%$ , respectively, while resulting in a drastic reduction in memory consumption. + +For a network with $L$ layers, the memory consumption of the baseline PointNet++ layer grows as $L \times (N \times D \times K)$ , while in our case memory consumption grows as $L \times (N \times D) + (N \times D \times K)$ , where the term, $L \times (N \times D)$ accounts for the memory required to store the layer activations, while the second term $N \times D \times K$ is the per-layer memory consumption of a single neighborhood convolution layer. As $L$ grows larger, this results in a $K$ -fold drop, shown on Fig. 5. This reduction opens up the possibility of learning much deeper networks, since memory demands now grow substantially more slowly in depth. With minor, dataset-dependent, fluctuations, the memory footprint of our convolution type architecture is on average $67\%$ lower than the PointNet++ baseline, while doubling the number of layers + +![](images/9cd3fd95e2c153695274c4e17b00451a5dbd98c631a82eb785570ae6c3d372df.jpg) +Figure 2. Analogy between 2D convolution and its point cloud counterpart. In both cases, the layer operates in two steps: (i) neighborhood exposure and (ii) matrix multiplication. 2D image convolution amounts to forming a $K^2$ tensor in memory when performing $K \times K$ filtering and then implementing a convolution as matrix multiplication. + +![](images/5161341952197b59808c4bb6a2ba128ffcfc9122ae00c8a4435a43b39a98b854.jpg) +Figure 3. Comparison of a PointNet++ module with our convPN module. The convPN module replaces the MLP with its pooling layer by a sequence of SLP-Pooling modules which has two benefits (i) memory savings as the layer activations are saved only through the pooled features and (ii) better information flow as it increases the frequency at which neighbors share information. + +comes with a memory overhead of $2.7\%$ . + +# 3.3. Improving Information Flow + +We now turn to methods for efficient information propagation through point networks. As has been repeatedly shown in computer vision, this can drastically impact the behavior of the network during training. Our experiments indicate that this is also the case for point processing. + +# (a) Multi-Resolution vs Multi-Scale Processing. + +Shape features can benefit from both local, fine-grained information and global, semantic-level context; their fusion can easily boost the discriminative power of the resulting features. For this we propose to extract neighborhoods of fixed size in downsampled versions of the original point + +cloud. In the coordinates of the original point cloud this amounts to increasing the effective grouping area, but it now comes with a much smaller memory budget. We observe a $58\%$ decrease in memory footprint on average on the three tested datasets. Please refer to in Supplemental for an illustration of the difference between both types of processing. + +(b) Residual Links. We use the standard Residual Network architecture [12], which helps to train deep networks reliably. Residual networks change the network's connectivity to improve gradient flow during training: identity connections provide early network layers with access to undistorted versions of the loss gradient, effectively mitigating the vanishing gradient problem. As our results in Sec. 4 show, this allows us to train deeper networks. + +![](images/353d5a2e9422841f62e870f51f8f8ed96e04a7a0809a6fe2a51482ce47054eb5.jpg) +Network Layers + +![](images/844e573bbce2f0e6c3a746ac13f6e29ff36766df62e7718a1ef505f186091e58.jpg) +(b) mRes + +![](images/56b24652ecf9e6b47ee08d8c99eff4d95e82a11c12aa886010b8b667f16d1e2a.jpg) +(c) mResX + +![](images/b908f0fa2054866f61614bbf7e7b77745552f9af0e5765ecae337ac11c5dbb39.jpg) +(a) PointNet++ (PN++) +(d) convPN + +![](images/d1b1553b399cfa8b8ec473b2b4d23a906fd5b9309532ca0bc256e052dc658e78.jpg) +(e) Stack of convPN layers + +![](images/a114bdd06fc12af5a75895a2f200512fe4449ed7dd3c9453d97364c3e585914a.jpg) +Figure 5. Evolution of memory consumption as the number of layers increases for PointNet++ and LPN (convolution block counterpart) on ShapeNet-Part. Doubling the number of layers for LPN results only in an increase in memory by $+2.3\%$ and $+16.8\%$ for mid- and high-resolution respectively, which favorably compares to the $+72\%$ and $+125\%$ increases for PointNet++. + +(c) Cross Links. Further, we use Cross-Resolution Links to better propagate information in the network during training. We draw inspiration from the Multi-Grid Networks [16], Multiresolution Tree Networks [7], Hypercolumns [11]; and allow layers that reside in different resolution branches to communicate with each other, thereby exchanging low-, mid-, and high-resolution infor + +![](images/f434815e8aefb32d86f79ac500d1355dfa99dd3bc3636ff99a7dc2849aff8041.jpg) +Figure 4. The standard $\mathrm{PN}++$ layer in (a) amounts to the composition of a k-Nearest Neighbor (kNN)-based lookup and a PointNet element. In (b) we propose to combine parallel PointNet++ blocks in a multi-resolution architecture (D and U stand for down- and up-sampling operations), using multiple Single Layer Perceptrons (SLPs) and in (c) allow information to flow across branches of different resolutions through a cross-link element ('xLink'). In (d) we propose to turn the lookup-SLP-pooling cascade into a low-memory counterpart by removing the kNN elements from memory once computed; we also introduce residual links, improving the gradient flow. In (e) we stack the green box in (d) to grow in depth and build our deep architecture. +Figure 6. Cross-link module to connect across resolutions. + +mation throughout the network processing, rather than fusing multi-resolution information at the end of each block. + +Cross-links broadcast information across resolutions as shown in Fig. 6. Note that unlike [7], an MLP transforms the output of one branch to the right output dimensionality so that it can be combined with the output of another branch. Each resolution branch can focus on its own representation and the MLPs will be in charge of making the translation between them. Taking in particular the case of a high-resolution branch communicating its outputs to a mid-resolution branch, we have $N \times D^{H}$ feature vectors at the output of a lookup-SLP-pooling block cascade, which need to be communicated to the $N / 2 \times D^{M}$ vectors of the mid-resolution branch. We first downsample the points, going + +from $N$ to $N/2$ points, and then use an MLP that transforms the vectors to the target dimensionality. Conversely, when going from low- to higher dimensions we first transform the points to the right dimensionality and then upsample them. We have experimented with both concatenating and summing multi-resolution features and have observed that summation behaves systematically better in terms of both training speed and test performance. + +# 4. Evaluation + +We start by defining our tasks and metrics and then turn to validating our two main contributions to model accuracy, namely better network training through improved network flow in Sec. 4.1, and going deeper through memory-efficient processing in Sec. 4.2. We then turn to validating the merit of our modules when used in tandem with a broad array of state-of-the-art architectures in Sec. 4.3, and finally provide a thorough ablation of the impact of our contributions on aspects complementary to accuracy, namely parameter size, memory, and efficiency in Sec. 4.4. + +Dataset and evaluation measures. Our modules can easily be applied to any point cloud related tasks, such as classification, however, we focus here on evaluating our modules on the point cloud segmentation task on three different datasets as it is a more challenging task. The datasets consist of either 3D CAD models or real-world scans. We quantify the complexity of each dataset based on (i) the number of training samples, (ii) the homogeneity of the samples and (iii) the granularity of the segmentation task. Note that a network trained on a bigger and diverse dataset would be less prone to overfitting - as such we can draw more informative conclusions from more complex datasets. We order the datasets by increasing complexity: ShapeNet-Part [4], ScanNet [6] and PartNet [23] for fine-grained segmentation. By its size (24,506 samples) and its granularity (251 labeled parts), PartNet is the most complex dataset. + +To have a fair comparison (memory, speed, accuracy), we re-implemented all the models in Pytorch and consistently compared the vanilla network architectures and our memory-efficient version. We report the performance of networks using their last saved checkpoint (i.e. when training converges), instead of the common (but clearly flawed) practice of using the checkpoint that yields best performance on the test set. These two factors can lead to small differences from the originally reported performances. + +We use two different metrics to report the Intersection over Union (IoU): (i) the mean Intersection over Union (mIoU) and (ii) the part Intersection over Union (pIoU). Please refer to Supplemental for further details. + +# 4.1. Effect of improved information flow + +We report the performance of our variations for PointNet++ on the Shapenet-Part, ScanNet and PartNet datasets + +Table 1. Performance of our modules compared to PointNet++ baseline. The impact of our modules becomes most prominent as the dataset complexity grows. On PartNet our Deep LPN network increases pIoU by $9.7\%$ over PointNet++, outperforming its shallow counterpart by $+2.1\%$ . + +
ShapeNet-Part (13,998 samp.)ScanNet (1,201 samp.)PartNet (17,119 samp.)
mIoU (%)Vox. Acc. (%)pIoU (%)pIoU (%)
PN++84.60 (+0.0%)80.5 (+0.0%)24 (+0.0%)35.2 (+0.0%)
mRes85.47 (+1.0%)79.4 (-1.4%)22 (-8.3%)37.2 (+5.7%)
mResX85.42 (+1.0%)79.5 (-1.2%)22 (-8.3%)37.5 (+6.5%)
LPN85.65 (+1.2%)83.2 (+3.4%)27 (+12.5%)37.8 (+7.4%)
Deep LPN85.66 (+1.3%)82.2 (+2.1%)27 (+12.5%)38.6 (+9.7%)
+ +(Table 1). Our lean and deep architectures can be easily deployed on large and complex datasets. Hence, for Part-Net, we choose to train on the full dataset all at once on a segmentation task across the 17 classes instead of having to train a separate network for each category as in [23]. + +Our architectures substantially improve the memory efficiency of the PointNet++ baseline while also delivering an increase in performance for more complex datasets (see Fig. 1). Indeed, as the data complexity grows, having efficient information flow has a larger influence on the network performance. On PartNet, the spread between our architectures and the vanilla PointNet++ becomes significantly high: our multiresolution (mRes) network increases relative performance by $+5.7\%$ over PointNet++ and this gain reaches $+6.5\%$ with cross-links (mResX). Our convolution-type network (LPN) outperforms other architectures when dataset complexity increases ( $+3.4\%$ on ScanNet and $+7.4\%$ on PartNet) by more efficiently mixing information across neighbours. + +# 4.2. Improvement of accuracy by going deeper + +The memory savings introduced in Sec. 3.2 give the opportunity to design deeper networks. Naively increasing network depth can harm performance [12]. Instead, we use residual connections to improve convergence for our deep network. The architecture, detailed in the Supplemental material, consists in doubling the number of layers in the encoding part. While keeping the impact on efficiency very small $(+6.3\%)$ on inference time on average and $+3.6\%$ on memory consumption at most compared to the shallow LPN), the performance improved (see Table 1). On PartNet, this margin reaches $+2.1\%$ over the shallow LPN and $+9.7\%$ over the vanilla PointNet++. Note the low growth of memory as a function of depth, shown in Fig. 5. As shown in Fig. 7, having a deeper network improves the segmentation quality at the boundaries between parts. In contrast, naively increasing the number of encoding layers from 9 to 15 in PointNet++ leads only to a small increase in performance IoU from $84.60\%$ to $84.66\%$ . + +In Table 2 we compare against Deep GCN [19] in terms + +Table 2. Performance of our deepConPN network compared to Deep GCN (ResGCN-28) and related methods on S3DIS based on a 6-fold validation process. The difference in performance observed on each class can be explained by the different approaches networks have for point convolution. Our deep network clearly outperforms PointNet++ baseline by a spread of +6.8% for mIoU. We achieve similar performance compared to Deep GCN while relying on a weaker baseline (PointNet++ against DGCNN) + +
MethodOAmIOUceilingfloorwallbeamcolumnwindowdoortablechairsofabookcaseboardclutter
MS+CU79.247.888.695.867.336.924.948.652.351.945.110.636.824.737.5
G+RCU81.149.790.392.167.944.724.252.351.258.147.46.939.030.041.9
3DRNN+CF86.956.392.993.873.142.525.947.659.260.466.724.857.036.751.6
DGCNN84.156.1-------------
ResGCN-2885.960.093.195.378.233.937.456.168.264.961.034.651.551.154.4
PointNet78.547.688.088.769.342.423.147.551.654.142.09.638.229.435.2
PointNet++-53.290.291.773.142.721.249.742.362.759.019.645.848.245.6
Deep LPN85.760.091.095.676.150.325.955.156.866.374.325.854.052.355.3
Ground TruthPointNet++Deep LPNGround TruthPointNet++Deep LPN
Bed
+ +Figure 7. Segmentation prediction for both PointNet++ and Deep LPN networks compared to the ground truth. While PointNet++ struggles to detect accurately the boundaries between different parts, ours performs a much finer segmentation in those frontier areas. + +of the overall accuracy and the mean IoU on the S3DIS dataset [1] by following the same 6-fold evaluation process. We attain similar performance to Deep GCN, while relying on our generic memory-efficient network blocks and while based on a weaker baseline compared to Deep GCN (i.e., DGCNN). Moreover, as Deep GCN is not designed to tackle the efficiency issue in Point Networks, our network wins on all counts and successfully reduces both the memory (more than $74\%$ ) and the speed $(-48\%$ and $-89\%$ for the inference and the backward speed respectively). As we show in the following section, these blocks come with the advantage of being applicable to many other point processing networks. + +# 4.3. Evaluation on more architectures + +We have introduced building blocks for point processing networks based on two key ideas, (i) a memory efficient convolution and (ii) improved information flow. Our blocks make it really efficient to capture, process and diffuse information in a point neighbourhood. Diffusing information across neighborhood is the main behavior that most networks, if not all, share. We validate the generality of the proposed modular blocks in the context of other point-based learning setups, as shown in Table 3. Each of our macroblocks can be stacked together, extended into a deeper block by duplicating the green boxes (see Figure 4) or even be modified by changing one of its components by another. We test our framework on three additional networks among the recent approaches, (i) Dynamic Graph CNN [33], (ii) PointCNN [21] and (iii) SpiderCNN [35]. These networks involve a diverse set of point convolution approaches; these + +experiments allow us to assess the generic nature of our modular blocks, and their value as drop-in replacements for existing layers. + +All three of the networks make extensive use of memory which is a bottleneck to depth. We implant our modules directly in the original networks, making, when needed, some approximations from the initial architecture (see Supplemental). We report the performance of each network with our lean counterpart on two metrics: (i) memory footprint and (ii) accuracy in Table 3. Our lean counterparts consistently improve both the accuracy (from $+0.4\%$ up to $+8.0\%$ ) and the memory consumption (from $-19\%$ up to $-69\%$ ). + +Our modular blocks can thus be applied to a wide range of state-of-the-art networks and improve significantly their memory consumption while having a positive impact on performance. + +# 4.4. Ablation study + +In this section we report our extensive experiments to assess the importance of each block of our network architectures. Our lean structure allows us to adjust the network architectures by increasing its complexity, either by (i) adding extra connections or by (ii) increasing the depth. We analyze our networks along four axes: (i) the performance (IoU or accuracy) (Table 1), (ii) the memory footprint, (iii) the inference time and (iv) the backward time. Our main experimental findings regarding network efficiency are reported in Table 4 and ablate the impact of our proposed design choices for point processing networks. + +Memory-efficient Convolutions: As described in + +Table 3. Performance of our blocks on three different architectures (DGCNN, PointCNN and SpiderCNN) on three datasets using two different metrics: (i) memory consumption in Gb and (ii) performance in % (mIoU for ShapeNet-Part, Vox. Acc. for ScanNet and pIoU for PartNet). Our lean counterparts improve significantly both the performance (up to +8.0%) and the memory consumption (up to -69%). + +
DGCNNPointCNNSCNN
ShapeNet-PScanNetPartNetShapeNet-PScanNetPartNetShapeNet-PScanNetPartNet
Mem.Vanilla2.62 (+0%)7.03 (+0%)9.50 (+0%)4.54 (+0%)5.18 (+0%)6.83 (+0%)1.09 (+0%)4.33 (+0%)5.21 (+0%)
Lean0.81 (-69%)3.99 (-43%)5.77 (-39%)1.98 (-56%)3.93 (-24%)5.55 (-19%)0.79 (-28%)3.25 (-25%)3.33 (-36%)
Perf.Vanilla82.59 (+0.0%)74.5 (+0.0%)20.5 (+0.0%)83.60 (+0.0%)77.2 (+0.0%)25.0 (+0.0%)79.86 (+0.0%)72.9 (+0.0%)17.9 (+0.0%)
Lean83.32 (+0.9%)75.0 (+0.7%)21.9 (+6.8%)84.45 (+1.0%)80.1 (+3.8%)27.0 (+8.0%)81.61 (+2.2%)73.2 (+0.4%)18.4 (+2.8%)
+ +Table 4. Efficiency of our network architectures measured with a batch size of 8 samples on a Nvidia GTX 2080Ti GPU. All of our lean architectures allow to save a substantial amount of memory on GPU wrt. the PointNet++ baseline from $58\%$ with mRes to a $67\%$ decrease with LPN. This latter convolution-type architecture wins on all counts, decreasing both inference time $(-41\%)$ and the length of backward pass $(-68\%)$ by a large spread. Starting from this architecture, the marginal cost of going deep is extremely low: doubling the number of layers in the encoding part of the network increases inference time by $6.3\%$ on average and the memory consumption by only $3.6\%$ at most compared to LPN. Please refer to Supplemental for absolute values. + +
Parameters (M)Memory Footprint (Gb)Inference Time (ms)Length Backward pass (ms)
ShapeNet-PartScanNetPartNetShapeNet-PartScanNetPartNetShapeNet-PartScanNetPartNetShapeNet-PartScanNetPartNet
PointNet+++0.0%+0.0%+0.0%+0.0%+0.0%+0.0%+0.0%+0.0%+0.0%+0.0%+0.0%+0.0%
mRes-17.0%-17.6%-16.6%-69.3%-56.5%-47.6%+14.8%+59.2%-19.4%-68.8%-53.8%-63.2%
mResX-10.6%-10.7%-10.1%-65.0%-53.2%-46.3%+28.2%+60.9%-12.5%-29.5%+0.0%-25.4%
LPN+13.8%+13.4%+12.6%-75.7%-66.6%-57.9%-45.6%-30.3%-47.9%-82.7%-42.3%-78.9%
Deep LPN+54.3%+54.0%+50.8%-79.1%-65.4%-57.0%-40.4%-25.6%-46.5%-78.6%-11.5%-72.4%
+ +Sec. 3.2, our leanest architecture is equivalent to constraining each PointNet unit to be composed of a single layer network, and turning its operation into a memory-efficient block by removing intermediate activations from memory. In order to get a network of similar size, multiple such units are stacked to reach the same number of layers as the original network. Our convolution-type network wins on all counts, both on performance and efficiency. Indeed, the IoU is increased by $3.4\%$ on ScanNet and $7.4\%$ on PartNet compared to $\mathrm{PointNet + + }$ baseline. Regarding its efficiency, the memory footprint is decreased by $67\%$ on average while decreasing both inference time $(-41\%)$ and the length of the backward pass $(-68\%)$ . These improvements in speed can be seen as the consequence of processing most computations on flattened tensors and thus reducing drastically the complexity compared to $\mathrm{PointNet + + }$ baseline. + +Multi-Resolution: Processing different resolutions at the same stage of a network has been shown to perform well in shallow networks. Indeed, mixing information at different resolutions helps to capture complex features early in the network. We adopt that approach to design our mRes architecture. Switching from a PointNet++ architecture to a multi-resolution setting increases the IoU by $1.0\%$ on ShapeNet-Part and $5.7\%$ on PartNet. More crucially, this increase in performance comes with more efficiency. Although the inference time is longer (18% longer on average) due to the extra downsampling and upsampling operations, the architecture is much leaner and reduces memory footprint by $58\%$ . Training is quicker though due to a $62\%$ faster backward pass. + +Cross-links: Information streams at different resolutions are processed separately and can be seen as complementary. To leverage this synergy, the network is provided with additional links connecting neighborhood resolutions. We experiment on the impact of those cross-resolution links to check their effect on the optimization. At the price of a small impact on memory efficiency $(+8\%$ wrt. mRes) and speed $(+7\%$ on inference time wrt. mRes), the performance can be improved on PartNet, the most complex dataset, with these extra-links by $0.8\%$ . + +# 5. Conclusion + +We have introduced new generic building blocks for point processing networks, that exhibit favorable memory, computation, and optimization properties when compared to the current counterparts of state-of-the-art point processing networks. Based on PointNet++, our lean architecture LPN wins on all counts, memory efficiency $(-67\%$ wrt. PointNet++) and speed $(-41\%$ and $-68\%$ on inference time and length of backward pass). Its deep counterpart has a marginal cost in terms of efficiency and achieves the best IoU on PartNet $(+9.7\%$ over PointNet++. Those generic blocks exhibit similar performance on all of the additionally tested architectures producing significantly leaner networks (up to $-69\%$ ) and increase in IoU (up to $+8.0\%$ ). Based on our experiments, we anticipate that adding these components to the armament of the deep geometry processing community will allow researchers to train the next generation of point processing networks by leveraging upon the advent of larger shape datasets [23, 17]. + +# 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 Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition, 2016. +[2] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point convolutional neural networks by extension operators. ACM Trans. Graph., 37(4):71:1-71:12, July 2018. +[3] Angel Chang, Angela Dai, Thomas Funkhouser, Maciej Halber, Matthias Nie√üner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3d: Learning from rgb-d data in indoor environments. 09 2017. +[4] 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. Technical Report arXiv:1512.03012 [cs.GR], Stanford University — Princeton University — Toyota Technological Institute at Chicago, 2015. +[5] Tianqi Chen, Bing Xu, Chiyuan Zhang, and Carlos Guestrin. Training deep nets with sublinear memory cost. CoRR, abs/1604.06174, 2016. +[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. +[7] Matheus Gadelha, Rui Wang, and Subhransu Maji. Multiresolution tree networks for 3d point cloud processing. In Proceedings of the European Conference on Computer Vision (ECCV), pages 103-118, 2018. +[8] Aidan N. Gomez, Mengye Ren, Raquel Urtasun, and Roger B. Grosse. The reversible residual network: Backpropagation without storing activations. CoRR, abs/1707.04585, 2017. +[9] Audrunas Gruslys, Remi Munos, Ivo Danihelka, Marc Lancot, and Alex Graves. Memory-efficient backpropagation through time. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 4125-4133. Curran Associates, Inc., 2016. +[10] Paul Guerrero, Yanir Kleiman, Maks Ovsjanikov, and Niloy J. Mitra. PCPNet: Learning local shape properties from raw point clouds. CGF, 37(2):75-85, 2018. +[11] Bharath Hariharan, Pablo Andres Arbeláez, Ross B. Girshick, and Jitendra Malik. Hypercolumns for object segmentation and fine-grained localization. CoRR, abs/1411.5752, 2014. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. 2016. +[13] P. Hermosilla, T. Ritschel, P-P Vazquez, A. Vinacua, and T. Ropinski. Monte carlo convolution for learning on non-uniformly sampled point clouds. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2018), 37(6), 2018. + +[14] Gao Huang, Zhuang Liu, and Kilian Q. Weinberger. Densely connected convolutional networks. CoRR, abs/1608.06993, 2016. +[15] Yangqing Jia. Learning Semantic Image Representations at a Large Scale. PhD thesis, University of California, Berkeley, USA, 2014. +[16] Tsung-Wei Ke, Michael Maire, and Stella X. Yu. Neural multigrid. CoRR, abs/1611.07661, 2016. +[17] Sebastian Koch, Albert Matveev, Zhongshi Jiang, Francis Williams, Alexey Artemov, Evgeny Burnaev, Marc Alexa, Denis Zorin, and Daniele Panozzo. ABC: A big CAD model dataset for geometric deep learning. CoRR, abs/1812.06216, 2018. +[18] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2013. +[19] Guohao Li, Matthias Müller, Ali Thabet, and Bernard Ghanem. Deep GCs: Can GCs go as deep as cnns?, 2019. +[20] Jiaxin Li, Ben M Chen, and Gim Hee Lee. So-net: Self-organizing network for point cloud analysis. pages 9397–9406, 2018. +[21] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. 2018. +[22] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. CoRR, 2019. +[23] Kaichun Mo, Shilin Zhu, Angel X. Chang, Li Yi, Subarna Tripathi, Leonidas J. Guibas, and Hao Su. Partnet: A large-scale benchmark for fine-grained and hierarchical part-level 3d object understanding. CoRR, abs/1812.02713, 2018. +[24] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. CVPR, 1(2):4, 2017. +[25] 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, pages 5099-5108, 2017. +[26] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. 2015. +[27] Hang Su, Varun Jampani, Deqing Sun, Subhransu Maji, Evangelos Kalogerakis, Ming-Hsuan Yang, and Jan Kautz. Splatnet: Sparse lattice networks for point cloud processing. pages 2530-2539, 2018. +[28] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik G. Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In Proc. ICCV, 2015. +[29] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014. +[30] Hugues Thomas, Charles R. Qi, Jean-Emmanuel Deschaud, Beatrix Marcotegui, François Goulette, and Leonidas J. Guibas. Kpconv: Flexible and deformable convolution for point clouds. CoRR, 2019. +[31] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-CNN: Octree-based Convolutional Neu + +ral Networks for 3D Shape Analysis. ACM Transactions on Graphics (SIGGRAPH), 36(4), 2017. +[32] Peng-Shuai Wang, Chun-Yu Sun, Yang Liu, and Xin Tong. Adaptive O-CNN: A Patch-based Deep Representation of 3D Shapes. ACM Transactions on Graphics (SIGGRAPH Asia), 37(6), 2018. +[33] 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. +[34] Saining Xie, Ross B. Girshick, Piotr Dólár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. CoRR, abs/1611.05431, 2016. +[35] Yifan Xu, Tianqi Fan, Mingye Xu, Long Zeng, and Yu Qiao. SpiderCNN: Deep learning on point sets with parameterized convolutional filters. In Proceedings of the European Conference on Computer Vision (ECCV), pages 87-102, 2018. +[36] Kangxue Yin, Hui Huang, Daniel Cohen-Or, and Hao Zhang. P2p-net: Bidirectional point displacement net for shape transform. ACM TOG, 37(4):152:1-152:13, July 2018. +[37] Lequan Yu, Xianzhi Li, Chi-Wing Fu, Daniel Cohen-Or, and Pheng-Ann Heng. Ec-net: an edge-aware point set consolidation network. pages 386-402, 2018. +[38] Lequan Yu, Xianzhi Li, Chi-Wing Fu, Daniel Cohen-Or, and Pheng-Ann Heng. Pu-net: Point cloud upsampling network. In CVPR, 2018. +[39] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. CoRR, abs/1605.07146, 2016. +[40] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Ruslan R Salakhutdinov, and Alexander J Smola. Deep sets. 2017. +[41] Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. 2014. +[42] Zhiyuan Zhang, Binh-Son Hua, and Sai-Kit Yeung. Shellnet: Efficient point cloud convolutional neural networks using concentric shells statistics. In International Conference on Computer Vision (ICCV), 2019. \ No newline at end of file diff --git a/goingdeeperwithleanpointnetworks/images.zip b/goingdeeperwithleanpointnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c72f878c5e4ed1d3dc76135bd44650160e5c05df --- /dev/null +++ b/goingdeeperwithleanpointnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90fe80f15ec36be1d4262e369d401d50c3a98f7cf7cf4f5b8ea7bf9c8492c718 +size 554635 diff --git a/goingdeeperwithleanpointnetworks/layout.json b/goingdeeperwithleanpointnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c451cae68158dd54776304c27e518361025d6ba0 --- /dev/null +++ b/goingdeeperwithleanpointnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7b76635493cc7fe7001a5ccde3e1a4d747468d5af31540fc3b2eca9ff1acc53 +size 356017 diff --git a/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_content_list.json b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..77f6993c7197f430f9c75f123d2a93c7296c2ce0 --- /dev/null +++ b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bb49d85456b18fa7b2dcf483561a54fa3cb1373e1fc948c70ce57307af36c23 +size 79815 diff --git a/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_model.json b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..963726fdc54ca46bec757a33a8086c20c9de58c8 --- /dev/null +++ b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78460a988ae570e49f46b1313add0a6d5085f65a341580a0c8e2dc4ae2ac7cd5 +size 96938 diff --git a/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_origin.pdf b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9431b5b5bd23e8eeb1b7047c940c3d0dda688b41 --- /dev/null +++ b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/dee3b80a-8222-4d7f-845f-47109519ff7f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78d8ba2590a07fde25af6ef55c0235d3d8e50f66f2671222e46c1a0b382c3e56 +size 472792 diff --git a/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/full.md b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..17d0fd6f9360edaed5d68cf97e99fa82229f632b --- /dev/null +++ b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/full.md @@ -0,0 +1,303 @@ +# Gold Seeker: Information Gain from Policy Distributions for Goal-oriented Vision-and-Language Reasoning + +Ehsan Abbasnejad1, Iman Abbasnejad2, Qi Wu1, Javen Shi1, Anton van den Hengel1 + +1{ehsan.abbasnejad,qi.wu01,javen.shi,anton.vandenhengel}@adelaide.edu.au + +2 i.abbasnejad@fugro.com + +1Australian Institute for Machine Learning & The University of Adelaide, Australia, + +$^{2}$ Fugro Australia Marine + +# Abstract + +As Computer Vision moves from passive analysis of pixels to active analysis of semantics, the breadth of information algorithms need to reason over has expanded significantly. One of the key challenges in this vein is the ability to identify the information required to make a decision, and select an action that will recover it. We propose a reinforcement-learning approach that maintains a distribution over its internal information, thus explicitly representing the ambiguity in what it knows, and needs to know, towards achieving its goal. Potential actions are then generated according to this distribution. For each potential action a distribution of the expected outcomes is calculated, and the value of the potential information gain assessed. The action taken is that which maximizes the potential information gain. We demonstrate this approach applied to two vision-and-language problems that have attracted significant recent interest, visual dialog and visual query generation. In both cases the method actively selects actions that will best reduce its internal uncertainty, and outperforms its competitors in achieving the goal of the challenge. + +# 1. Introduction + +The majority of problems that computer vision might be applied to greatly benefit from agents capable of actively seeking the information they need. This might be because the information required is not available at training time, or because it is too broad to be embodied in the code or weights of an algorithm. The ability to seek the information required to complete a task enables a degree of flexibility and robustness that cannot be achieved through other means. + +Some of the applications that lie at the intersection of vision and language have this property, including visual dialog [12, 11], visual question answering [13, 23, 40], and + +![](images/6a2c4ef71b62764146a2b1ee766cb06703086f2a5b77bccb80b697ed2cca897e.jpg) +Figure 1: The role of the SEEKER in many conventional RL-based agents is to select an action based on the current (single) policy. In goal-oriented visual dialogue this means selecting the next query based on the image and the dialogue thus far. Our proposed SEEKER instead exploits a distribution of policies to generate multiple query hypotheses. The one that maximises the potential information gain is then selected. In this sense the agent is able to identify gaps in the information it holds and ask questions that will fill them. + +vision-and-language navigation[6]. These problems require an agent (model) to acquire information on the fly to help to make decisions, because the space of all possible questions (or dialogues) encompasses more information than can be encoded in a training set. Additionally, a range of tasks have been proposed recently that use 'language generation' as a mechanism to gather information towards achieving a (non-language based) goal[47, 23, 24]. These tasks offer a particular challenge because the set of all information that might possibly be involved is inevitably very broad, which makes concrete representations difficult to employ practically. + +In a visual dialog, and particularly goal-oriented visual question generation, an agent needs to understand the user request and complete a task by asking a limited number of questions. Similarly, compositional VQA (e.g. [21]) is a visual query generation problem that requires a model first to convert a natural language question to a sequence of actions (a 'program') and then obtain the answer by running + +the programs on an engine. The question-to-program model represents an information 'seeker', while the broader goal is to generate an answer based on the information acquired. + +Agents applicable to these tasks typically consist of four parts: a context encoder, an information seeker, a responder and a goal executor, as shown in Fig.2. The context encoder is responsible for encoding information such as images, questions, or dialog history to a feature vector. The information seeker is a model that is able to generate new queries (such as natural language questions and programs) based on the goal of the given task and its strategy. The information returned by the responder is added to the context and internal information and sent to the goal executor model to achieve the goal. The seeker model plays a crucial role in goal-oriented vision-and-language tasks, as better seeking strategies that recover more information improve the chance of the goal being achieved. Moreover, the seeker's knowledge of the value of additional information is essential in directing the seeker towards querying what is needed to achieve the goal. In this paper, we focus on exploring the seeker and responder models. + +The conventional 'seeker' models in these tasks follow a sequence-to-sequence generation architecture, that is, they translate an image to a question, or translate a question to a program sequence via supervised learning. This requires large numbers of ground-truth training pairs. Reinforcement learning (RL) is thus employed in such goal-oriented vision-language tasks to mediate this problem due to the RL's ability to focus on achieving a goal through directed trial and error [13]. A policy in RL models specifies how the seeker asks for additional information. However, these methods generally suffer from two major drawbacks: (1) they maintain a single policy that translates the input sequence to the output while disregarding the strategic diversity needed. Intuitively a single policy is not enough in querying diverse information content for various goals—we need multiple strategies. In addition, (2) the RL employed in these approaches can be prohibitively inefficient since the question generation process (or query generation) does not consider its effect in directing the agent towards the goal. In fact, the agent does not have a notion of what information it needs and how it benefits in achieving its goal. + +To this end, in contrast to conventional methods that use a single policy to model a vision-and-language task, we instead maintain a distribution of policies. By employing a Bayesian reinforcement learning framework for learning this distribution of the seeker's policy, our model incorporates the expected gain from a query towards achieving its goal. Our framework, summarized in Fig. 1, uses recently proposed Stein Variational Gradient Descent [26] to perform an efficient update of the posterior policies. Having a distribution over seeking policies, our agent is capable of considering various strategies for obtaining further infor + +![](images/3347129ab1e2e3277ca0574e7af479cf5071e6d8a82fb193e51f5500c2f6eb18.jpg) +Figure 2: Information seeker maintains a distribution over the policies. Each sample (particle) from the distribution can generate a different query. For each query, responder evaluates its gain and the best one is chosen to be executed in EXECUTOR. Based on how well the query leads to achieving its goal, the policy distribution is updated. + +mation, analogous to human contemplation of various ways to ask a question. Each sample from the seeker's policy posterior represents a policy of its own, and seeks a different piece of information. This allows the agent to further contemplate the outcome of the various strategies before seeking additional information and considers the consequence towards the goal. We then formalize an approach for the agent to evaluate the consequence of receiving additional information towards achieving its goal. This consequence is the intrinsic reward the policy distribution receives to update its strategy for question generation. + +We apply the proposed approach to two complex vision-and-language tasks, namely GuessWhat [13] and CLEVR [21], and show that it outperforms the comparative baselines and achieves the state-of-art results. + +# 2. Related work + +Goal-oriented Visual Dialog Das et al. [12] proposed a visual dialogue task that requires an agent to engage in conversation with a human, centred on the content of a given image. They further (in [11]) propose the use of reinforcement learning in two tasks for visual dialog. de Vries et al. in [13] propose a Guess-What game dataset, where one person asks questions about an image to guess which object has been selected, and the second person answers. This was a critical step in the development of goal-oriented visual dialogue because the objective there was not merely to continue the conversation, but rather to achieve a secondary goal (winning the game). Lee et al. [24] then developed an information theoretic approach which allows a questioner to ask appropriate consecutive questions in GuessWhat. + +RL in Vision-and-Language problems Reinforcement learning (RL) [22, 44, 30] has been adopted in several + +vision-and-language problems, including image captioning [27, 35, 36], VQA [17, 4, 10], and visual dialogue [11, 29]. Recently, some works [8, 41, 5, 3] have integrated Seq2Seq models and RL. RL has also been widely used to improve dialogue managers, which manage transitions between dialogue states [34]. However, nearly all of the methods use a single policy that translates the input sequence to an output. In our work, we instead maintain a distribution of policies. + +Intrinsic rewards Intrinsic rewards refer to rewards beyond those gained from the environment in RL. These rewards are motivated by the sparse nature of environmental rewards and a need to motivate better exploration. For example, curiosity [32] is one such intrinsic reward mechanism by which agents are encouraged to visit new states. This idea has been extended to employ Bayesian methods to learn the expected improvement of the policy for taking an action [16, 19]. We use the expected gain in a vision-and-language task as an intrinsic reward to improve our model. + +# 3. Goal-oriented Vision-Language Task + +We represent our goal-oriented vision-and-language solution as having four constituent parts. The SEEKER takes as input the encoded image and context features produced by an ENCODER to generate a query to seek more information from a RESPONSEER, that will generate a response. The role of RESPONSEER is to model the environment in order to allow the agent to determine which query is best to ask. It takes in a question to produce an answer and its predicted score. Our RESPONSEER is an extension of the 'A-BOT' in [11], in that it instead considers a distribution over possible answers and generates a corresponding upper bound on the score of the question. This is a critical distinction, and represents an approach that is far more statistically justifiable. To enable our approach we develop a synthetic RESPONSEER inspired by the neuro-scientific formulation of agency that computes the translation of intentions into actions and evaluates their consequences in terms of predicted and actual experiences [9]. + +Typically the SEEKER learns a policy to generate queries on the basis of image and context features. The primary novelty in our proposed approach is that the SEEKER instead maintains a distribution of policies that enables multiple query hypotheses to be sampled. The RESPONSE then calculates an upper bound on the information gain for each hypothesis. The final query is that corresponding to the maximal (upper bound on the) information gain. + +Formally, for each game at round $t$ , we have a tuple $(I, C, q^{(t)})$ , where $I$ is the observed image, $C$ is the context information at the current round and $q^{(t)}$ is a query generated by the SEEKER agent. Subsequently, $q^{(t)}$ is sent + +to the RESPONDER that generates a response $a^{(t)}$ . The RESPONDER imitates the potential response for a query and evaluates its value. After $T$ rounds of this 'seek-answer' process, the tuple $(I,C,\{q^{(t)}\}_{t = 1}^{T},\{a^{(t)}\}_{t = 1}^{T})$ is sent to the EXECUTOR who selects the target from the candidate list $O = \{o_1,o_2,\dots,o_N\}$ . The ground truth target is denoted as $o^*$ and the game is success if the $o^*$ is successfully selected by the EXECUTOR. + +To be more specific, in the Guesswhat (visual dialog) setting, $C$ is the dialog history and $q^{(t)}$ is a natural language question. Then, $O$ is the candidate object bounding boxes. The answer $a^{(t)}$ is provided by the oracle as either Yes/No or N/A (not applicable for the cases when the question is unrelated). In the CLEVR (VQA), $C$ is a single question asked by users and $q^{(t)}$ is a functional program, while the $O$ is a candidate answer vocabulary. The answers in this problem are the same as the target candidates. + +# 3.1. Reinforcement Learning + +Reinforcement learning considers agents interacting with their environment by taking a sequence of actions and assessing their effect through a scalar reward. The agent's task is to learn a policy that maximizes the expected cumulative rewards from its interaction with the environment. + +Consider a vision-and-language task where the agent generates a query $q^{(t)} \in \mathcal{Q}$ at each time step $t$ given the state $\mathbf{s}^{(t)}$ . Each $\mathbf{s}^{(t)}$ encompasses the history of the dialog (including past query-answer pairs) and the input image. Upon receiving an answer $a^{(t)} \in \mathcal{A}$ for the query, the agent then observes a new state $\mathbf{s}^{(t + 1)}$ and receives a scalar reward $r(\mathbf{s}^{(t)},q^{(t)}) \in R$ . The goal of the reinforcement learning in this task is to find a querying policy $\pi (q^{(t)}|\mathbf{s}^{(t)},\pmb {\theta})$ given the state $\mathbf{s}^{(t)}$ to maximize an expected return: + +$$ +J (\boldsymbol {\pi}) = \mathbb {E} _ {\mathbf {s} _ {0}, q _ {0}, \dots \sim \boldsymbol {\pi}} [ \sum_ {t = 0} ^ {\infty} \gamma^ {t} r (\mathbf {s} ^ {(t)}, q ^ {(t)}) ], +$$ + +where $0 \leq \gamma^t \leq 1$ is a discount factor. State variable $\mathbf{s}^{(t)}$ is generally considered to encompass all the information needed for the agent to take an action (in our application, generate a query). The expected return $J$ depends on $\pi$ because $q^{(t)} \sim \pi(q^{(t)}|\mathbf{s}^{(t)},\pmb{\theta})$ drawn from the policy (distribution) $\pi$ (i.e. $\pi(\pmb{\theta}|C,I,C)$ ). The state $\mathbf{s}^{(t+1)} \sim P(\mathbf{s}^{(t+1)}|\mathbf{s}^{(t)},q^{(t)})$ is generated by the seeker's environmental dynamics which are unknown. In policy gradient algorithms [45] such as the well-known REINFORCE [46], the gradient is estimated by samples from the policy $\pi(q|\mathbf{s},\pmb{\theta})$ . Specifically, REINFORCE uses the following approximator of the policy gradient: + +$$ +\nabla_ {\pmb {\theta}} J (\pmb {\theta}) \approx \sum_ {t = 0} ^ {\infty} \nabla_ {\pmb {\theta}} \log \pi (q ^ {(t)} | \mathbf {s} ^ {(t)}, \pmb {\theta}) r (\mathbf {s} ^ {(t)}, q ^ {(t)}), +$$ + +This gradient is computed based on a single rollout trajectory, where $r(\mathbf{s}^{(t)},q^{(t)}) = \sum_{i = 0}^{\infty}\gamma^{i}r(\mathbf{s}^{(t + i)},q^{(t + i)})$ is the + +accumulated return from time step $t$ . + +# 4. Information SEEKER and the RESPONDER + +As discussed, our approach maintains a distribution of policies, $\pi$ and updates it using the RESPONSE and EXECUTOR. In a nutshell, our approach takes the following steps for training an information seeking agent: + +1. Conditioned on the history and context, the distribution of the query is: + +$$ +\pi (q ^ {(t)} | \mathbf {s} ^ {(t)}, C, I) = \int \pi (q ^ {(t)} | \mathbf {s} ^ {(t)}, \pmb {\theta}) \pi (\pmb {\theta} | C, I) d \pmb {\theta}, +$$ + +where we can sample to generate a query, i.e. + +$$ +q _ {i} ^ {(t)} \sim \pi \left(q ^ {(t)} | \mathbf {s} ^ {(t)}, \boldsymbol {\theta} _ {i}\right), \quad \boldsymbol {\theta} _ {i} \sim \pi (\boldsymbol {\theta} | C, I) \tag {1} +$$ + +$$ +\text {f o r} \quad i = 1, \dots , n; +$$ + +where $n$ is the number of query samples simulating the alternative queries that could be made. + +2. Our RESPONDER models belief over the potential answers and calculates the gain for each query $q_{i}^{(t)}$ . Since ultimately we need to choose one query, we choose the one with highest gain and incorporate it into the reward for the RL (see Section 4.1); +3. The SEEKER models belief over the policy space rather than maintaining only a single policy (hence we can sample multiple parameters from its distribution in Eq. (1)). The posterior $\pi (\pmb {\theta}|\{q^{(t)}\}_{t}^{T},\{a^{(t)}\}_{t}^{T},o,C,I)$ considering the outcome of executing the query (potentially at multiple rounds) and a prior is formulated as part of the RL framework. Here, $a^{(t)}$ is the correct answer obtained from the environment. For example in case of GuessWhat game, it is the answer obtained from the oracle. (see Section 4.2); +4. The SEEKER updates its belief over the distribution of the policies by incorporating the feedback from the environment. This update has to ensure the posterior for the parameters of the SEEKER remains valid (see Section 4.3). + +# 4.1. Query Gain and the RESPONDER + +In our approach the agent keeps a model (RESPONDER) of the environment to be able to predict what might most valuably be asked. The agent uses this model to imitate the behavior of the goal EXECUTOR and anticipate its potential response. Utilizing this model, the agent generates queries with answers that bring it closer to achieving its goal. In particular, we define the gain from state $\mathbf{s}^{(t)}$ is, + +$$ +\mathcal {G} _ {\boldsymbol {\omega}} (\mathbf {s} ^ {(t)}, q ^ {(t)}) = \mathbb {E} _ {a} [ u (p (a | \mathbf {s} ^ {(t)}, q ^ {(t)}, C, I; \boldsymbol {\omega})) ] \quad (2) +$$ + +where $u$ is a scoring function for the answers and $\omega$ is the set of parameters of the RESPONDER. Here, $p(a|\mathbf{s}^{(t)},q^{(t)},C,I;\omega)$ is the probability of the answer for a given query in the RESPONDER. This gains effectively evaluates the score of an answer. Particularly we find $\omega$ such that the expected goal under this policy is maximized. Intuitively, the agent queries $q^{(t)}$ at time $t$ only if it believes the answer $a^{(t)}$ it receives ultimately maximizes the gain in achieving its goal at state $\mathbf{s}^{(t)}$ . For instance, in the Guess-What game the RESPONDER takes in the history of the dialog and the current question and evaluates how good it is for achieving the goal (i.e. guessing the correct object). + +In order to integrate this measure into an RL framework, we use this gain in the reward. This reward is collected by choosing the best query according to its gain in Eq. (2), i.e. $\max_{q^{(t)}}\mathcal{G}_{\omega}(\mathbf{s}^{(t)},q^{(t)})$ (although in practice with probability $\epsilon$ we sample an alternative query from the SEEKER's distribution $\pi$ to encourage exploration). Moreover, inspired by curiosity-driven and information maximizing exploration [16, 32], we incorporate this gain as an intrinsic motivation to consider the gain, i.e. + +$$ +r ^ {\text {n e w}} \left(\mathbf {s} ^ {(t)}, q ^ {(t)}\right) = r \left(\mathbf {s} ^ {(t)}, q ^ {(t)}\right) + \eta \mathcal {G} _ {\omega} \left(\mathbf {s} ^ {(t)}, q ^ {(t)}\right) \tag {3} +$$ + +$$ +J (\boldsymbol {\theta}) = \mathbb {E} _ {\pi (\mathbf {s}, q | \boldsymbol {\theta})} \left[ \sum_ {t = 0} ^ {\infty} \gamma^ {t} r ^ {\text {n e w}} \left(\mathbf {s} ^ {(t)}, q ^ {(t)}\right) \right], \tag {4} +$$ + +for $\eta \geq 0$ that controls the intrinsic reward. In this new reward, an agent's anticipation of the answer is taken into account when updating the policy. When the seeker knows the answer and its gain is small, the parameters are not changed significantly. In other words, there is no need for further changes to the questions where the answer is known. On the other hand, when the agent anticipates a large gain from the answer and receives a large reward, the policy has to be adjusted by a larger change in the parameters. Similarly, if the agent expects a large gain and is not rewarded, there has to be significant update in the policy. + +In addition, for each parameter of the SEEKER and each corresponding query $q^{(t)}$ , we have a different gain. As such, when the variance of this gain $\mathbb{V}_{q^{(t)}}[\mathcal{G}(\mathbf{s}^{(t)}, q^{(t)})]$ is small, all the queries are expected to have similar answer and hence are almost the same. + +The advantage of this approach is twofold: (1) it helps deal with sparse rewards and (2) if a query's response carries more information by providing better gain, we encourage its positive reinforcement. This allows the agent to learn to mimic the behavior of the goal executor and generalize to unseen cases. + +# 4.2. Information SEEKER's Belief + +As discussed in Eq. (1), each query is sampled from the seeker's policy distribution. Each sample of the parameter $\theta$ gives rise to a different querying policy allowing us + +to model policy distribution. This distribution allows for the agent to consider alternatives, or contemplates, various query policies to improve the overall dialog performance. As such, here we consider the policy parameter $\theta$ as a random variable (leading to random policies that we can model their distribution) and seek a distribution to optimize the expected return. We incorporate a prior distribution $\pi_0$ over the policy parameter, for instance, for when we have no answer for query-response pairs or to incorporate prior domain knowledge of parameters. The posterior in the conventional definition is + +$$ +\pi (\boldsymbol {\theta} | C ^ {+}, I) \propto \pi (o | \{q ^ {(t)} \} _ {t} ^ {T}, \{a ^ {(t)} \} _ {t} ^ {T}, C, I, \boldsymbol {\theta}) \pi_ {0} (\boldsymbol {\theta}). +$$ + +where we denote $C^+ = C \cup \{\{q^{(t)}\}_t^T, \{a^{(t)}\}_t^T, o\}$ as an augmented context with the rollout of one seeker's round (for instance a dialog round in GuessWhat). Since we need to define an additional likelihood for the goal and even then this posterior is intractable (unless major approximations and simplifying assumptions are made), we alternatively utilize the RL framework in which this posterior is used for. Specifically, we formulate the problem to find the policy distribution $\pi$ under which the expected cumulative reward is maximized with additional prior regularization: + +$$ +\max _ {\pi} \left\{\mathbb {E} _ {\pi (\boldsymbol {\theta} | C ^ {+}, I)} [ J (\boldsymbol {\theta}) ] - \alpha \mathbf {K L} (\pi \| \pi_ {0}) \right\}, \tag {5} +$$ + +where $\mathbf{KL}(\pi ||\pi_0) = \mathbb{E}_\pi [\log \pi (\pmb {\theta}|C^+,I) - \log \pi_0(\pmb {\theta})]$ . Effectively we seek a parameter distribution that gives rise to policies that maximize the expected reward while is close to the prior. It is easy to see if we use an uninformative prior such as a uniform distribution, the second KL term is simplified to the entropy of $\pi$ . Then optimization in Eq. (5) becomes $\max_{\pi}\left\{\mathbb{E}_{\pi (\pmb {\theta}|C^{+},I)}[J(\pmb {\theta})] + \alpha \mathbf{H}(\pi)\right\}$ which explicitly encourages exploration in the parameter space. This exploration yields diverse policies that result in varied queries. + +By taking the derivative of the objective function in Eq. (5) and setting it to zero, the optimal distribution of policy parameter $\theta$ is obtained as + +$$ +\pi (\boldsymbol {\theta} \mid C ^ {+}, I) \propto \exp (J (\boldsymbol {\theta}) / \alpha) \pi_ {0} (\boldsymbol {\theta}). \tag {6} +$$ + +In this formulation, $\pi (\pmb {\theta}|C^{+},I)$ is the "posterior" of the parameters $\pmb{\theta}$ in the conventional Bayesian approach. Then, $\exp (J(\pmb {\theta}) / \alpha)$ is effectively the "likelihood" function. The coefficient $\alpha$ is the parameter that controls the strength of exploration in the parameter space and how far the posterior is from the prior. As $\alpha \rightarrow 0$ , samples drawn from $\pi (\pmb {\theta}|C^{+},I)$ will be concentrated on a single policy and lead to less diverse seekers. + +Remember from Eq. (4) that the "likelihood" here considers the agent's anticipation of the answer. If its reward is higher, then a larger change to the parameter is needed to allow exploitation of new knowledge about the effect of the current policy on the goal. + +![](images/cc73cc04f97a2720cee8fc2e8b4b13ad8d58a34707694183ac366ffaa4435564.jpg) +Figure 3: An illustration of the multi-modal distribution of the SEEKERS policies. Unlike conventional policy gradient methods that only explore nearest mode, our novel approach always use a number of initial points (i.e. the policy parameters) to explore multiple modes collaboratively in analogy of human contemplation of multiple strategies. We only show two initial points, a red rectangle and black asterisk, for the ease of visualization. + +Similar ideas of entropy regularization has been investigated in other reinforcement learning methods [28, 38]. However, in our approach we use the regularization to obtain the posterior for the policy parameters in the information seeking framework where the gain from the RESPONDER refines the policy distribution. + +# 4.3. SEEKER's Posterior Update + +A conventional method to utilise the posterior in Eq. (6) is Markov Chain Monte Carlo (MCMC) sampling. However, MCMC methods are computationally expensive, suffer from slow convergence and have high-variance due to stochastic nature of estimating $J(\pmb{\theta})$ . Since estimating $J(\pmb{\theta})$ by itself is a computationally demanding task and may vary significantly for each policy, we look for an efficient alternative. Thus, rather than $J(\pmb{\theta})$ , we use the gradient information $\nabla_{\pmb{\theta}}J(\pmb{\theta})$ that points to the direction for seeker's policy change using the Stein variational gradient descent (SVGD) for Bayesian inference [25, 26, 2, 1]. SVGD is a nonparametric variational inference algorithm that leverages efficient deterministic dynamics to transport a set of particles $\{\pmb{\theta}_i\}_{i=1}^n$ to approximate given target posterior distributions $\pi(\pmb{\theta}|C^+,I)$ . Unlike traditional variational inference methods, SVGD does not confine the approximation within a parametric families, which means the SEEKER's policy does not need to be approximated by another. Further, SVGD converges faster than MCMC due to the deterministic updates that efficiently leverage gradient information of the SEEKER's policy posterior. This inference is efficiently performed by iteratively updating multiple "particles" $\{\pmb{\theta}_i\}$ as $\pmb{\theta}_i = \pmb{\theta}_i + \epsilon_\theta \psi^*(\pmb{\theta}_i)$ , where $\epsilon_\theta$ is a step size and $\psi(\cdot)$ is a function in the unit ball of a reproducing kernel Hilbert space (RKHS). Here, $\psi^*$ is chosen as the solution to minimizing KL divergence between the particles and the target distribution. It was shown that this function has a closed form empirical estimate [26]: + +$$ +\begin{array}{l} \hat {\psi} (\boldsymbol {\theta} _ {i}) = \frac {1}{n} \sum_ {j = 1} ^ {n} [ \nabla_ {\boldsymbol {\theta} _ {j}} \log \pi (\boldsymbol {\theta} _ {j} | C ^ {+}, I) k (\boldsymbol {\theta} _ {j}, \boldsymbol {\theta} _ {i}) \\ \left. + \nabla_ {\boldsymbol {\theta} _ {j}} k \left(\boldsymbol {\theta} _ {j}, \boldsymbol {\theta} _ {i}\right) \right]. \tag {7} \\ \end{array} +$$ + +Algorithm 1 Seeker +Input: Learning rate $\epsilon_{\theta},\epsilon_{\omega}$ , kernel $k(\pmb {\theta},\pmb{\theta}^{\prime})$ , initial policy +particles $\{\pmb {\theta}_i\}$ , context history $C$ , image $I$ +for iteration $t = 0,1,\dots,T$ do for particle $i = 1,\ldots ,n$ do Sample $q\sim \pi (q|\mathbf{s}^{(t)},C,I;\pmb {\theta}_i)$ Compute $\mathcal{G}(\mathbf{s}^{(t)},q)$ from Eq. (2). end for Select $q^{(t)}$ with maximum gain $a^{(t)} = \arg \max_{a}p(a|\mathbf{s}^{(t)},q^{(t)},C,I;\omega)$ $\omega \leftarrow \omega +\epsilon_{\omega}\nabla_{\omega}\log \Big(p(o|a^{(t)},\mathbf{s}^{(t)};\omega)\Big)$ ▷ score Compute $\nabla_{\pmb{\theta}_i}J(\pmb {\theta}_i)$ in Eq. (4). ▷ from Eq. (3) for particle $i = 0,1,\dots,n$ do $J_{\mathrm{new}}(\pmb {\theta}_j) = \frac{1}{\alpha} J(\pmb {\theta}_j) + \log \pi_0(\pmb {\theta}_j)$ $\Delta \pmb {\theta}_i\gets \frac{1}{n}\sum_{j = 1}^n\Big[\nabla_{\pmb{\theta}_j}J_{\mathrm{new}}(\pmb {\theta}_j)\boldsymbol {k}(\pmb {\theta}_j,\pmb {\theta}_i) + \nabla_{\pmb{\theta}_j}\boldsymbol {k}(\pmb {\theta}_j,\pmb {\theta}_i)\Big]$ $\pmb {\theta}_i\gets \pmb {\theta}_i + \epsilon \Delta \pmb {\theta}_i$ ▷ update the policy end for +end for + +where $k$ is the positive definite kernel associated with the RKHS space. In this update rule $\hat{\psi}$ , the first term involves the gradient $\nabla_{\pmb{\theta}}\log \pi (\pmb {\theta}|C^{+},I)$ which moves the seeker's policy particles $\pmb{\theta}_i$ towards the high probability regions by sharing information across similar particles. The second term $\nabla_{\pmb{\theta}_j}k(\pmb {\theta}_j,\pmb {\theta}_i)$ utilizes the curvature of the parameter space to push the particles away from each other, which leads to diversification of the seeker's policies. + +An example of the landscape of the policies is shown in Fig. 3. Each initial sample from the policy distribution can move towards one of the modes of a highly multi-modal distribution. These moves are governed by the gradient of the policy that in our case consists of the agent's belief about the answer and its consequence once its response is known. In addition, kernel $k$ controls the distance between the parameters to deter from collapsing to a single point in multimodal distribution. It is intuitive from the figure that a better gradient from the rewards by incorporating the answers and considering the distribution of policies improves the performance of the seeker by guiding the parameter updates. + +It is noteworthy to mention that even though we only receive the reward for one sample of $q^{(t)}$ taken from one particle (from Eq. 2), due to our formalization the posterior is adjusted for all particles allowing the feedback to be propagated. + +It is important to note that diversification in the parameter space allows for an accurate modeling of a highly multimodal policy space. Otherwise, the policy distribution collapses to a single point which is the same as the conventional maximum a posteriori (MAP) estimate. This MAP estimate only considers a single policy that in the highly complex task of vision-language is inadequate. + +# 5. Experiments + +To evaluate the performance of the SEEKER we conducted experiments on two different goal-oriented vision-and-language datasets: GuessWhat [13] and CLEVR [21]. The former is a visual dialog task while the later is a compositional visual question answering task. In both experiments we pre-train the networks using the supervised model and refine using reinforcement learning, as is common practice in this area [11, 13]. Policies are generated by sampling from the policy posterior $\pmb{\theta} \sim \pi(\pmb{\theta} | C^+, I)$ and generate the query with the highest gain measured by the RESPONDER. Our approach outperforms the previous state-of-art in both cases. Note that our approach is architecture neutral and as such we expect using better representations to even improve performance further. + +# 5.1. GuessWhat + +GuessWhat [13] is a classical goal-oriented visual dialog game. In each game, a random object in the scene is assigned to the answerer, but hidden from the questioner (our SEEKER). The questioner can ask a series of yes/no questions to locate the object. The list of objects is also hidden from the questioner during the question-answer rounds. Once the questioner has gathered enough information, the guesser (our EXECUTOR) can start to guess. If a guess is correct the game is successfully concluded. The extrinsic reward is "one" at the end of a dialog (i.e. series of question-answers) when the predicted object matches the true object the oracle chose. + +Implementation Details In our model, the information seeker is a set of 10 recurrent neural networks (RNNs) that represent the particles from the likelihood in Eq. (6). We use LSTM [15] cells in these RNNs for which the parameters are updated according to Eq. (7) to simulate the posterior. The hidden representations of these LSTM networks (with size 1024) correspond to the state in the reward function. The image representation is obtained using VGG [39]. The concatenation of the image and history features are given to each particle in the SEEKER for question generation where each word is sampled conditioned on its previous word. We use $u(\cdot) = \exp(\cdot)$ to operate as the score function for computing gain in Eq. (2), and reward in Eq. (4). + +We set $\eta = 0.1 \times \frac{\mathrm{epoch}_{\mathrm{max}} - \mathrm{epoch}}{\mathrm{epoch}_{\mathrm{max}}}$ to encourage the policies to explore more in the initial stages. In addition, $\alpha = 0.001$ . We use the median trick from [26] to compute the RBF-kernel's hyper-parameter which essentially ensures $\sum_{j} k(\pmb{\theta}_{i}, \pmb{\theta}_{j}) \approx 1$ . + +Overall Results We compare two cases, labeled New Object and New Image. In the former the object sought is new, but the image has been seen previously. In the latter the image is also previously unseen. We report the prediction accuracy for the guessed objects. It is clear that the accuracies + +
ModelNew ObjectNew Image
Supervised-S [13]41.639.2
Supervised-G [13]43.540.8
RL-S [40]56.558.5
RL-G [40]60.358.4
Tempered [47]62.6-
Tempered-Seq2Seq [47]63.5-
Tempered-MemoryNet [47]68.3-
Ours (no intrinsic reward)63.3-
Ours64.262.1
Ours+MemoryNet (Single)70.167.9
Ours+MemoryNet74.472.1
+ +Table 1: Accuracy in identifying the goal object in the Guess-What dataset (higher is better). The "S" indicator is for sampling for words method vs "G" which is greedy. Ours+MemoryNet is the method with modified RESPONDER that employs Memory network and Attention. Further, (Single) indicates training our method with a single particle. + +are generally higher for the new objects as they are obtained from the already seen images. + +The results are summarized in Table 1. As shown, using the conventional REINFORCE [40] by either sampling each word (RL-S) or greedily selecting one (RL-G) improves the performance compared to the supervised baseline significantly. Since our approach explores and exploits the space of policies for question generation better, it achieves better performance. Furthermore, this performance is improved when a better goal seeker or RESPONSE model is employed. Better RESPONSE leads to more realistic intrinsic rewards that corresponds to true gains and guide the policy distribution to a better posterior. For instance, employing a Memory network [43] within the RESPONSE improves its performance that in turn is reflected in the quality of the questions and consequently agent's ability to achieve goals more accurately. Note that even in this case the single particle experiment has improved since the rewards are more accurate to evaluate the question-answer relations. + +# 5.2. CLEVR + +CLEVR [21] is a synthetically generated dataset containing 700K (image, question, answer, program) tuples. Images are 3D-rendered objects of various shapes, materials, colors, and sizes. Questions are compositional in nature and range from counting questions to comparison questions and can be $40+$ words long. An answer is a word from a set of 28 choices. For each image and question, a program consists of step-by-step instructions, on how to answer the question. During the test, the programs are not given, which need to be generated conditioned on the input question. The extrinsic reward is "one" when the generated program yields the correct answer. + +
ModelOverallCountCompare NumbersExistQuery AttributeCompare Attribute
NMN [7]72.152.572.779.379.078.0
N2NMN [17]88.868.584.985.790.088.8
Human [21]92.686.786.496.695.096.0
LSTM+RN [37]95.590.193.697.897.197.9
PG+EE (9k) [20]88.679.779.789.792.696.0
PG+EE (18k) [20]95.490.196.295.397.397.9
PG+EE (700k) [20]96.992.798.697.198.198.9
FiLM [33]97.694.593.899.299.299.0
DDRprog [42]98.396.598.498.899.199.0
MAC [18]98.997.299.499.599.399.5
TbD-net [31]98.796.899.198.999.499.2
TbD-net++ [31]99.197.699.499.299.599.6
Ours+G+entropy (9k)91.486.493.689.893.296.2
Ours+G+entropy (18k)95.693.396.895.497.898.1
Ours+G+entropy (700k)97.496.898.198.296.298.1
Ours+D+entropy (9k)94.792.295.693.295.197.7
Ours+D+entropy (18k)96.694.696.195.698.198.6
Ours+D+entropy (700k)98.398.199.197.198.698.8
Ours+G+exp (9k)91.887.593.790.293.196.5
Ours+G+exp (18k)96.393.396.895.497.898.1
Ours+G+exp (700k)98.096.298.698.098.099.0
Ours+D+exp (9k)95.291.596.793.895.798.7
Ours+D+exp (18k)97.194.598.296.198.398.6
Ours+D+exp (700k)98.997.899.298.999.599.3
Ours+D+exp++ (700k)99.297.899.599.499.699.6
+ +Table 2: Performance comparison of state-of-the-art models on the CLEVR dataset. "Ours+G+entropy" is our seeker when used with the generic architecture and entropic gain; "Ours+D+entropy" is the same except for using designed architecture. Similarly, "Ours+G+exp" is generic architecture with $u_{\mathrm{exp}}$ ; and, "Ours+D+exp" is its designed counterpart. We achieve state of the art performance, especially using smaller ground-truth programs. The '++' indicator shows a model was trained using higher-resolution $28 \times 28$ feature maps rather than $14 \times 14$ . + +Implementation Details We follow the experimental setup of [20, 21] in which uses a ResNet [14] to encode the given images and a standard LSTM [15] to generate programs in the context encoder. We use 10 particles in Algorithm 1 to model the policy distribution using samples from the pre-trained model with added noise so that they correspond to different initial policies. For more efficient implementation, we use two sets of shared parameters for the encoder in the underlying Seq2Seq model and use independent parameters for the LSTM decoder. This parameter sharing also ensures there are common latent representations that particles learn. We use our information SEEKER model in Section 4 to generate samples or programs for each question and consider the consequence of that program using the RESPONSE internally to choose one. Once a program is generated, it is then executed by the goal EXECUTOR to obtain the feedback and compute the corresponding rewards. The computed reward is then used to update the policy distributions as discussed. We use the Adam optimization method with learning rate set to $10^{-5}$ to update + +![](images/f9f9aadc5c5415f62414ce640d7481cc6b6c36142f299176e0afcf865fefee9e.jpg) +Figure 4: An example of a question and the programs generated using samples from the posterior in CLEVR. Samples from the policy distribution take the input image and the question and generate its corresponding programs. As observed, these two samples produce different program sequences which enable to explore multiple distributions over the goal (final answer) shown on top in the cloud. Expected score of each question $\mathcal{G}_{\omega}(\mathbf{s}^{(t)},q^{(t)})$ gives us an indication of which one is better to ask. + +both the SEEKER and the RESPONSES parameters. The testing procedure thus takes an image and question pair, produces a program, then the goal executor produces an answer. The goal EXECUTOR then evaluates the quality of the generated program. We set $\alpha = 0.01$ and $\eta$ similar to the GuessWhat experiment. + +Overall Results For the RESPONDER and the EXECUTOR, we consider two alternative baselines: (G)eneric similar to [20] where each module follows a generic architecture; and, (D)signed similar to [31] where each module is specifically designed based on the desired operation. + +![](images/18c4c1bf7a23e4340c2faf2d8fab2b3c4c00c6e02fce0287f5090435413827ee.jpg) +Figure 5: Average reward for the agent at each iteration; and, average distance between particles in the posterior for CLEVR. + +![](images/9356201d0dbd8eca32c3e019f75756aec8b1050a1c92aea8f2e98e03fe386bde.jpg) + +We report the accuracy of the goal executor. Since the later case provides a better representation on each module, we expect it to perform better. Further, we use two functions $u_{entropy}(\cdot) = \log (\cdot)$ (corresponding to the information-theoretic notion of gain in the expectation) and $u_{\exp}(\cdot) = \exp (\cdot)$ to operate on the output of the RESPONDER's score to compute the gain and ultimately the new reward in Eq. (2) and (4). The results in Tab. 2 show that our approach outperforms the baselines almost to the maximum extent possible. In particular, our approach almost achieves the same performance as that of [20] with half the programs used for training with the same neural architecture. Moreover, the choice of $u$ affects the policies found, for instance using $u_{entropy}$ generally leads to outperforming in the "count" function. Thus, since $u_{\mathrm{exp}}$ has a smaller range and is smoother, it provides a more uniform penalty for mistakes in all modules during training leading to generally better performance. As shown in Figure 4, each sample from the policy generates + +a different program. In addition, we are able to utilize the attention mechanism in the model to reason about where in the image the information seeker focuses. + +Fig. 5 plots the average reward at each iteration, and the average distance between the particles in the policies. If the problem was indeed unimodal (as conventional methods assume), all the particles would collapse to a single point indicated by a zero average distance. However, as is observed, while the distance between the particles decreases in early stages, they soon increase indicating convergence to independent modes. Our context encoder, unlike [23], is a pixel level model that does not extract objects explicitly from the given image. To be fair, we only consider methods that are directly comparable. + +# 6. Conclusion + +The ability to identify the information needed to support a conclusion, and the actions required to obtain it, is a critical capability if agents are to move beyond carrying out low-level prescribed tasks towards achieving flexible high semantic level goals. The method we describe is capable of reasoning about the information it holds, and the information it will need to achieve its goal, in order to identify the action that will best enable it to fill the gap between the two. Our approach thus actively seeks the information it needs to achieve its goal on the basis of a model of the uncertainty in its own understanding. + +If we are to enable agents that actively work towards a high-level goal the capability our approach demonstrates will be critical. In particular, agents need to be able to consider alternative policies for achieving a goal and their corresponding uncertainty, evaluate the outcome of executing those policies and the information it gains. + +Acknowledgment: This material is based on research sponsored by Air Force Research Laboratory and DARPA under agreement number FA8750-19-2-0501. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. + +# References + +[1] Ehsan Abbasnejad, Anthony R. Dick, and Anton van den Hengel. Infinite variational autoencoder for semi-supervised learning. In CVPR, pages 781-790. IEEE Computer Society, 2017. +[2] Ehsan Abbasnejad, Justin Domke, and Scott Sanner. Loss-calibrated monte carlo action selection. In Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. +[3] Ehsan Abbasnejad, Qinfeng Shi, Anton van den Hengel, and Lingqiao Liu. A generative adversarial density estimator. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[4] Ehsan Abbasnejad, Damien Teney, Amin Parvaneh, Qinfeng Shi, Anton van den Hengel, and Lingqiao Liu. Counterfactual vision and language learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. +[5] Ehsan Abbasnejad, Qi Wu, Qinfeng Shi, and Anton van den Hengel. What's to know? uncertainty as a guide to asking goal-oriented questions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[6] 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 CVPR, 2018. +[7] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. CVPR, pages 39-48, 2016. +[8] Nabiha Asghar, Pascal Poupart, Jiang Xin, and Hang Li. Online sequence-to-sequence reinforcement learning for open-domain conversational agents. arXiv preprint arXiv:1612.03929, 2016. +[9] Valérian Chambon, Nura Sidarus, and Patrick Haggard. From action intentions to action effects: how does the sense of agency come about? Frontiers in Human Neuroscience, 8:320, 2014. +[10] Anton van den Hengel Damien Teney, Ehsan Abbasnejad. Unshuffling data for improved generalization. arXiv preprint arXiv:2002.11894, 2020. +[11] A. Das, S. Kottur, J. M. F. Moura, S. Lee, and D. Batra. Learning cooperative visual dialog agents with deep reinforcement learning. In ICCV, pages 2970-2979, 2017. +[12] Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, José MF Moura, Devi Parikh, and Dhruv Batra. Visual dialog. In ICCV, 2017. +[13] Harm de Vries, Florian Strub, Sarath Chandar, Olivier Pietquin, Hugo Larochelle, and Aaron C. Courville. Guess-what?! visual object discovery through multi-modal dialogue. In CVPR, 2017. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. + +[15] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. 9:1735-80, 12 1997. +[16] Rein Houthooft, Xi Chen, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 1109-1117. Curran Associates, Inc., 2016. +[17] Ronghang Hu, Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Kate Saenko. Learning to reason: End-to-end module networks for visual question answering. arXiv preprint arXiv:1704.05526, 2017. +[18] Drew Arad Hudson and Christopher D. Manning. Compositional attention networks for machine reasoning. In ICLR, 2018. +[19] Laurent Itti and Pierre F. Baldi. Bayesian surprise attracts human attention. In Y. Weiss, B. Schölkopf, and J. C. Platt, editors, NIPS, pages 547-554. 2006. +[20] J. Johnson, B. Hariharan, L. v. Maaten, J. Hoffman, L. Fei-Fei, C. L. Zitnick, and R. Girshick. Inferring and executing programs for visual reasoning. In ICCV, volume 00, pages 3008–3017, Oct. 2018. +[21] 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, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, 2017. +[22] Leslie Pack Kaelbling, Michael L Littman, and Andrew W Moore. Reinforcement learning: A survey. J. Arti. Intell. Research, 4:237-285, 1996. +[23] Sang-Woo Lee, Yu-Jung Heo, and Byoung-Tak Zhang. Answerer in questioner's mind for goal-oriented visual dialogue. CoRR, abs/1802.03881, 2018. +[24] Sang-Woo Lee, Yu-Jung Heo, and Byoung-Tak Zhang. Answerer in questioner's mind for goal-oriented visual dialogue. arXiv preprint arXiv:1802.03881, 2018. +[25] Qiang Liu. Stein variational gradient descent as gradient flow. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, NIPS, pages 3115-3123. Curran Associates, Inc., 2017. +[26] Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose bayesian inference algorithm. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 2378-2386. Curran Associates, Inc., 2016. +[27] Siqi Liu, Zhenhai Zhu, Ning Ye, Sergio Guadarrama, and Kevin Murphy. Optimization of image description metrics using policy gradient methods. arXiv preprint arXiv:1612.00370, 2016. +[28] Yang Liu, Prajit Ramachandran, Qiang Liu, and Jian Peng. Stein variational policy gradient. arXiv preprint arXiv:1704.02399, 2017. + +[29] 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. arXiv preprint arXiv:1706.01554, 2017. +[30] Anthony Manchin, Ehsan Abbasnejad, and Anton van den Hengel. Reinforcement learning with attention that works: A self-supervised approach. In Tom Gedeon, Kok Wai Wong, and Minho Lee, editors, Neural Information Processing, pages 223-230, Cham, 2019. Springer International Publishing. +[31] D. Mascharka, P. Tran, R. Soklaski, and A. Majumdar. Transparency by Design: Closing the Gap Between Performance and Interpretability in Visual Reasoning. ArXiv e-prints, March 2018. +[32] Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In ICML, 2017. +[33] Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron C. Courville. Film: Visual reasoning with a general conditioning layer. In AAAI, 2018. +[34] Olivier Pietquin, Matthieu Geist, Senthilkumar Chandramohan, and Hervé Frezza-Buet. Sample-efficient batch reinforcement learning for dialogue management optimization. TSLP, 7(3):7, 2011. +[35] Zhou Ren, Xiaoyu Wang, Ning Zhang, Xutao Lv, and Li-Jia Li. Deep reinforcement learning-based image captioning with embedding reward. Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2017. +[36] Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jarret Ross, and Vaibhava Goel. Self-critical sequence training for image captioning. arXiv preprint arXiv:1612.00563, 2016. +[37] Adam Santoro, David Raposo, David G. T. Barrett, Mateusz Malinowski, Razvan Pascanu, Peter W. Battaglia, and Timothy P. Lillicrap. A simple neural network module for relational reasoning. In NIPS, 2017. +[38] John Schulman, Sergey Levine, Philipp Moritz, Michael Jordan, and Pieter Abbeel. Trust region policy optimization. ICML'15, pages 1889-1897, 2015. +[39] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. +[40] Florian Strub, Harm De Vries, Jeremie Mary, Bilal Piot, Aaron Courville, and Olivier Pietquin. End-to-end optimization of goal-driven and visually grounded dialogue systems. arXiv preprint arXiv:1703.05423, 2017. +[41] Pei-Hao Su, Milica Gasic, Nikola Mrksic, Lina Rojas-Barahona, Stefan Ultes, David Vandyke, Tsung-Hsien Wen, and Steve Young. Continuously learning neural dialogue management. arXiv preprint arXiv:1606.02689, 2016. +[42] Joseph Suarez, Justin Johnson, and Fei-Fei Li. DDRprog: A CLEVR differentiable dynamic reasoning programmer, 2018. + +[43] Sainbayar Sukhbaatar, arthur szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, NIPS. 2015. +[44] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. +[45] Richard S. Sutton, David McAllester, Satinder Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. NIPS'99, Cambridge, MA, USA, 1999. MIT Press. +[46] Ronald Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. ML, 8, May 1992. +[47] Rui Zhao and Volker Tresp. Improving goal-oriented visual dialog agents via advanced recurrent nets with tempered policy gradient. In *IJCAI*, 2018. \ No newline at end of file diff --git a/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/images.zip b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5cc020c8e4dc75ebb85d4ce869dac7af4cfa6c39 --- /dev/null +++ b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db537f9eb936497be489ba68ff0d54758928267982124f7ba3c2d07cc0148fd9 +size 361802 diff --git a/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/layout.json b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e2bb474825195e9d378fd875ae295f33815b3cb1 --- /dev/null +++ b/goldseekerinformationgainfrompolicydistributionsforgoalorientedvisionandlangaugereasoning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c29c1817c1447cab8479ebc10ee598f0c231359a39188f18e427f63b7a61049 +size 396910 diff --git a/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_content_list.json b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e7a0caff8087cb8f590fc590d50b7e53c2df28cb --- /dev/null +++ b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad9c891511463da4381571309a7762a892d25f3312b010a5bb429ed353e5df15 +size 79905 diff --git a/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_model.json b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fbf7e9c189f9407408ee0292ae4418bca5442c00 --- /dev/null +++ b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3a42870045f3ddd3ee047672da68757124fb5918979df6cca19c8fa89264757 +size 101187 diff --git a/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_origin.pdf b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6f70d61886cfb949c4e6b2f11147615337fb4183 --- /dev/null +++ b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/830eb049-2d51-45b8-a3ed-f877bb803562_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdd9f34be8aeb92e83e124a8e7d6f9a61d7b5308909fe8b1d66eda8101834cb7 +size 6145058 diff --git a/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/full.md b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5b87c1a30e2eecbcf21dab2b0c5ce3f06e90b974 --- /dev/null +++ b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/full.md @@ -0,0 +1,307 @@ +# Google Landmarks Dataset v2 A Large-Scale Benchmark for Instance-Level Recognition and Retrieval + +Tobias Weyand * André Araujo * Bingyi Cao Jack Sim Google Research, USA {weyand, andreaujo, bingyi, jacksim} @ google.com + +# Abstract + +While image retrieval and instance recognition techniques are progressing rapidly, there is a need for challenging datasets to accurately measure their performance – while posing novel challenges that are relevant for practical applications. We introduce the Google Landmarks Dataset v2 (GLDv2), a new benchmark for large-scale, fine-grained instance recognition and image retrieval in the domain of human-made and natural landmarks. GLDv2 is the largest such dataset to date by a large margin, including over 5M images and 200k distinct instance labels. Its test set consists of 118k images with ground truth annotations for both the retrieval and recognition tasks. The ground truth construction involved over 800 hours of human annotator work. Our new dataset has several challenging properties inspired by real-world applications that previous datasets did not consider: An extremely long-tailed class distribution, a large fraction of out-of-domain test photos and large intra-class variability. The dataset is sourced from Wikipedia Commons, the world's largest crowdsourced collection of landmark photos. We provide baseline results for both recognition and retrieval tasks based on state-of-the-art methods as well as competitive results from a public challenge. We further demonstrate the suitability of the dataset for transfer learning by showing that image embeddings trained on it achieve competitive retrieval performance on independent datasets. The dataset images, ground-truth and metric scoring code are available at https://github.com/cvdfoundation/google-landmark. + +# 1. Introduction + +Image retrieval and instance recognition are fundamental research topics which have been studied for decades. The task of image retrieval [42, 29, 22, 44] is to rank images in an index set w.r.t. their relevance to a query image. The task of instance recognition [31, 16, 38] is to identify which specific instance of an object class (e.g. the instance “Mona Lisa” of the object class “painting”) is shown in a query image. + +![](images/29a3281643e27a78350fab8c8e35174e8dc65cbe229952974740232722d62ea3.jpg) +Figure 1: The Google Landmarks Dataset v2 contains a variety of natural and human-made landmarks from around the world. Since the class distribution is very long-tailed, the dataset contains a large number of lesser-known local landmarks. $^{1}$ + +As techniques for both tasks have evolved, approaches have become more robust and scalable and are starting to "solve" early datasets. Moreover, while increasingly large-scale classification datasets like ImageNet [48], COCO [37] and OpenImages [35] have established themselves as standard benchmarks, image retrieval is still commonly evaluated on very small datasets. For example, the original Oxford5k [42] and Paris6k [43] datasets that were released in 2007 and 2008, respectively, have only 55 query images of 11 instances each, but are still widely used today. Because both datasets only contain images from a single city, results may not generalize to larger-scale settings. + +Many existing datasets also do not present real-world challenges. For instance, a landmark recognition system that is applied in a generic visual search app will be queried with a large fraction of non-landmark queries, like animals, plants, or products, which it is not expected to yield any results for. Yet, most instance recognition datasets have only "on-topic" queries and do not measure the false-positive rate on out-of-domain queries. Therefore, larger, more challenging datasets are necessary to fairly benchmark these techniques while providing enough challenges to motivate further research. + +A possible reason that small-scale datasets have been the + +![](images/50df9d6b5c6c59982cbc4f5c260accc9b3aadf07fd96866e2caed5580e0c1be2.jpg) +Figure 2: Heatmap of the places in the Google Landmarks Dataset v2. + +dominant benchmarks for a long time is that it is hard to collect instance-level labels at scale. Annotating millions of images with hundreds of thousands of fine-grained instance labels is not easy to achieve when using labeling services like Amazon Mechanical Turk, since taggers need expert knowledge of a very fine-grained domain. + +We introduce the Google Landmarks Dataset v2 (GLDv2), a new large-scale dataset for instance-level recognition and retrieval. GLDv2 includes over 5M images of over 200k human-made and natural landmarks that were contributed to Wikimedia Commons by local experts. Fig. 1 shows a selection of images from the dataset and Fig. 2 shows its geographical distribution. The dataset includes 4M labeled training images for the instance recognition task and 762k index images for the image retrieval task. The test set consists of 118k query images with ground truth labels for both tasks. To mimic a realistic setting, only $1\%$ of the test images are within the target domain of landmarks, while $99\%$ are out-of-domain images. While the Google Landmarks Dataset v2 focuses on the task of recognizing landmarks, approaches that solve the challenges it poses should readily transfer to other instance-level recognition tasks, like logo, product or artwork recognition. + +The Google Landmarks Dataset v2 is designed to simulate real-world conditions and thus poses several hard challenges. It is large scale with millions of images of hundreds of thousands of classes. The distribution of these classes is very long-tailed (Fig. 1), making it necessary to deal with extreme class imbalance. The test set has a large fraction of out-of-domain images, emphasizing the need for low false-positive recognition rates. The intra-class variability is very high, since images of the same class can include indoor and outdoor views, as well as images of indirect relevance to a class, such as paintings in a museum. The goal of the Google Landmarks Dataset v2 is to become a new bench + +mark for instance-level recognition and retrieval. In addition, the recognition labels can be used for training image descriptors or pre-training approaches for related domains where less data is available. We show that the dataset is suitable for transfer learning by applying learned descriptors on independent datasets where they achieve competitive performance. + +The dataset was used in two public challenges on Kaggle $^2$ , where researchers and hobbyists competed to develop models for instance recognition and image retrieval. We discuss the results of the challenges in Sec. 5. + +The dataset images, instance labels for training, the ground truth for retrieval and recognition and the metric computation code are publicly available3. + +# 2. Related Work + +Image recognition problems range from basic categorization ("cat", "shoe", "building"), through fine-grained tasks involving distinction of species/models/styles ("Persian cat", "running shoes", "Roman Catholic church"), to instance-level recognition ("Oscar the cat", "Adidas Duramo 9", "Notre-Dame cathedral in Paris"). Our new dataset focuses on tasks that are at the end of this continuum: identifying individual human-made and natural landmarks. In the following, we review image recognition and retrieval datasets, focussing mainly on those which are most related to our work. + +Landmark recognition/retrieval datasets. We compare existing datasets for landmark recognition and retrieval against our newly-proposed dataset in Tab. 1. The Oxford [42] and Paris [43] datasets contain tens of query images and thousands of index images from landmarks in Oxford and Paris, respectively. They have consistently been used in image retrieval for more than a decade, and were re-annotated recently, with the addition of 1M worldwide distractor index images [44]. Other datasets also focus on imagery from a single city: Rome 16k [1]; Geotagged Streetview Images [32] containing 17k images from Paris; San Francisco Landmarks [14] containing 1.7M images; 24/7 Tokyo [56] containing 1k images under different illumination conditions and Paris500k [61], containing 501k images. + +More recent datasets contain images from a much larger variety of locations. The European Cities (EC) 50k dataset [5] contains images from 9 cities, with a total of 20 landmarks; unannotated images from other 5 cities are used as distractors. This dataset also has a version with 1M images from 22 cities where the annotated images come from a single city [4]. The Landmarks dataset by Li et al. [36] contains 205k images of 1k famous landmarks. Two other recent landmark datasets, by Gordo et al. [22] and Radenovic et al. [45], have become popular for training image retrieval models, + +
Dataset nameYear# Landmarks# Test images# Train images# Index imagesAnnotation collectionCoverageStable
Oxford [42]20071155-5kManualCityY
Paris [43]20081155-6kManualCityY
Holidays [28]2008500500-1.5kManualWorldwideY
European Cities 50k [5]201020100-50kManualContinentY
Geotagged StreetView [32]2010-200-17kStreetViewCityY
Rome 16k [1]2010691k-15kGeoTag + SfMCityY
San Francisco [14]2011-80-1.7MStreetViewCityY
Landmarks-PointCloud [36]20121k10k-205kFlickr label + SfMWorldwideY
24/7 Tokyo [56]2015125315-1kSmartphone + ManualCityY
Paris500k [61]201513k3k-501kManualCityN
Landmark URLs [7, 22]2016586-140k-Text query + Feature matchingWorldwideN
Flickr-SfM [45]2016713-120k-Text query + SfMWorldwideY
Google Landmarks [40]201730k118k1.2M1.1MGPS + semi-automaticWorldwideN
Revisited Oxford [44]20181170-5k + 1MManual + semi-automaticWorldwideY
Revisited Paris [44]20181170-6k + 1MManual + semi-automaticWorldwideY
Google Landmarks Dataset v22019200k118k4.1M762kCrowsourced + semi-automaticWorldwideY
+ +Table 1: Comparison of our dataset against existing landmark recognition/retrieval datasets. "Stable" denotes if the dataset can be retained indefinitely. Our Google Landmarks Dataset v2 is larger than all existing datasets in terms of total number of images and landmarks, besides being stable. + +containing hundreds of landmarks and approximately 100k images each; note that these do not contain test images, but only training data. The original Google Landmarks Dataset [40] contains 2.3M images from 30k landmarks, but due to copyright restrictions this dataset is not stable: it shrinks over time as images get deleted by the users who uploaded them. The Google Landmarks Dataset v2 dataset surpasses all existing datasets in terms of the number of images and landmarks, and uses images only with licenses that allow free reproduction and indefinite retention. + +Instance-level recognition datasets. Instance-level recognition refers to a very fine-grained identification problem, where the goal is to visually recognize a single (or indistinguishable) occurrence of an entity. This problem is typically characterized by a large number of classes, with high imbalance, and small intra-class variation. Datasets for such problems have been introduced in the community, besides the landmark datasets mentioned previously. For example: logos [19, 30, 31, 47], cars [8, 63, 65], products [38, 21, 59, 51], artwork [2, 16], among others [11]. + +Other image recognition datasets. There are numerous computer vision datasets for other types of image recognition problems. Basic image categorization is addressed by datasets such as Caltech 101 [20], Caltech 256 [23], ImageNet [48] and more recently OpenImages [35]. Popular fine-grained recognition datasets include CUB-200-2011 [57], iNaturalist [26], Stanford Cars [33], Places [66]. + +# 3. Dataset Overview + +# 3.1. Goals + +The Google Landmarks Dataset v2 aims to mimic the following challenges of industrial landmark recognition systems: Large scale: To cover the entire world, a corpus of millions of photos is necessary. Intra-class variability: Pho + +tos are taken under varying lighting conditions and from different views, including indoor and outdoor views of buildings. There will also be photos related to the landmark, but not showing the landmark itself, e.g. floor plans, portraits of architects, or views from the landmark. Long-tailed class distribution: There are much more photos of famous landmarks than of lesser-known ones. Out-of-domain queries: The query stream that these systems receive may come from various applications such as photo album apps or visual search apps and often contains only a small fraction of landmarks among many photos of other object categories. This poses a significant challenge for the robustness of the recognition algorithm. We designed our dataset to capture these challenges. An additional goal was to use only images whose licenses permit indefinite retention and reproduction in publications. + +Non-goals. In contrast to many other datasets, we explicitly did not design GLDv2 to have clean query and index sets for the reasons mentioned above. Also, the dataset does not aim to measure generalization of embedding models to unseen data – therefore, the index and training sets do not have disjoint class sets. Finally, we do not aim to provide an image-level retrieval ground truth at this point due to very expensive annotation costs. Instead, the retrieval ground truth is on a class-level, i.e. all index images that belong to the same class as a query image will be marked as relevant in the ground truth. + +# 3.2. Scale and Splits + +The Google Landmarks Dataset v2 consists of over 5M images and over 200k distinct instance labels, making it the largest instance recognition dataset to date. It is divided into three subsets: (i) 118k query images with ground truth annotations, (ii) 4.1M training images of 203k landmarks with labels that can be used for training, and (iii) 762k index images of 101k landmarks. We also make available a cleaner, + +reduced training set of 1.2M images and 15k landmarks (see Sec. 5.1). While the index and training set do not share images, their label space is highly overlapping, with 92k common classes. The query set is randomly split into 1/3 validation and 2/3 testing data. The validation data was used for the "Public" leaderboard in the Kaggle competition, which allowed participants to submit solutions and view their scores in real-time. The test set was used for the "Private" leaderboard, which was used for the final ranking and was only revealed at the end of the competition. + +# 3.3. Challenges + +Besides its scale, the Google Landmarks Dataset v2 presents practically relevant challenges, as motivated above. + +Class distribution. The class distribution is extremely long-tailed, as illustrated in Fig. 1. $57\%$ of classes have at most 10 images and $38\%$ of classes have at most 5 images. The dataset therefore contains a wide variety of landmarks, from world-famous ones to lesser-known, local ones. + +Intra-class variation. As is typical for an image dataset collected from the web, the Google Landmarks Dataset v2 has large intra-class variability, including views from different vantage points and of different details of the landmarks, as well as both indoor and outdoor views for buildings. + +Out-of-domain query images. To simulate a realistic query stream, the query set consists of only $1.1\%$ images of landmarks and $98.9\%$ out-of-domain images, for which no result is expected. This puts a strong emphasis on the importance of robustness in a practical instance recognition system. + +# 3.4. Metrics + +The Google Landmarks Dataset v2 uses well-established metrics, which we now introduce. Reference implementations are available on the dataset website. + +Recognition is evaluated using micro Average Precision $(\mu \mathrm{AP})$ [41] with one prediction per query. This is also known as Global Average Precision (GAP). It is calculated by sorting all predictions in descending order of their confidence and computing: + +$$ +\mu \mathrm {A P} = \frac {1}{M} \sum_ {i = 1} ^ {N} \mathrm {P} (i) \operatorname {r e l} (i), \tag {1} +$$ + +where $N$ is the total number of predictions across all queries; $M$ is the total number of queries with at least one landmark from the training set visible in it (note that most queries do not depict landmarks); $\mathrm{P}(i)$ is the precision at rank $i$ ; and $\operatorname{rel}(i)$ is a binary indicator function denoting the correctness of prediction $i$ . Note that this metric penalizes a system that predicts a landmark for an out-of-domain query image; overall, it measures both ranking performance as well as the ability to set a common threshold across different queries. + +Retrieval is evaluated using mean Average Precision@100 (mAP@100), which is a variant of the standard mAP metric + +![](images/ec3e57cd81f078af14f14e036a33804be0d49bed5593efc935980c7adae3e698.jpg) +Figure 3: Histogram of the number of images from the top-20 countries (blue) compared to their populations (red). + +that only considers the top-100 ranked images. We chose this limitation since exhaustive retrieval of every matching image is not necessary in most applications, like image search. The metric is computed as follows: + +$$ +\mathrm {m A P} @ 1 0 0 = \frac {1}{Q} \sum_ {q = 1} ^ {Q} \mathrm {A P} @ 1 0 0 (\mathrm {q}), \tag {2} +$$ + +where + +$$ +\mathrm {A P} @ 1 0 0 (\mathrm {q}) = \frac {1}{\min (m _ {q} , 1 0 0)} \sum_ {k = 1} ^ {\min (n _ {q}, 1 0 0)} \mathrm {P} _ {q} (k) \operatorname {r e l} _ {q} (k) \tag {3} +$$ + +where $Q$ is the number of query images that depict landmarks from the index set; $m_q$ is the number of index images containing a landmark in common with the query image $q$ (note that this is only for queries which depict landmarks from the index set, so $m_q \neq 0$ ); $n_q$ is the number of predictions made by the system for query $q$ ; $\mathrm{P}_q(k)$ is the precision at rank $k$ for the $q$ -th query; and $\operatorname{rel}_q(k)$ is a binary indicator function denoting the relevance of prediction $k$ for the $q$ -th query. Some query images will have no associated index images to retrieve; these queries are ignored in scoring, meaning this metric does not penalize the system if it retrieves landmark images for out-of-domain queries. + +# 3.5. Data Distribution + +The Google Landmarks Dataset v2 is a truly world-spanning dataset, containing landmarks from 246 of the 249 countries in the ISO 3166-1 country code list. Fig. 3 shows the number of images in the top-20 countries and Fig. 4 shows the number of images by continent. We can see that even though the dataset is world-spanning, it is by no means a representative sample of the world, because the number of images per country depends heavily on the activity of the local Wikimedia Commons community. + +Fig. 5 shows the distribution of the dataset images by landmark category, as obtained from the Google Knowledge Graph. By far the most frequent category is churches, + +![](images/e16a01978cf76022d516bed26067c78526d505e03e30b2c55e11d8320a4fdd56.jpg) +Figure 4: Histogram of the number of images per continent (blue) compared to their populations (red). + +![](images/eb8ffb37271ceba7e62602e435a016a307be7a3447cd458271f790f7a8d45b6a.jpg) +Figure 5: Histogram of the number of images by landmark category. This includes only categories with more than $25\mathrm{k}$ images. + +followed by parks and museums. Counting only those categories with over 25k images, roughly $28\%$ are natural landmarks while $72\%$ are human-made. + +# 3.6. Image Licenses + +All images in GLDv2 are freely licensed, so that the dataset is indefinitely retainable and does not shrink over time, allowing recognition and retrieval approaches to be compared over a long period of time. All images can be freely reproduced in publications, as long as proper attribution is provided. The image licenses are either Creative Commons or Public Domain. We provide a list of attributions for those images that require it so dataset users can easily give attribution when using the images in print or on the web. + +# 4. Dataset Construction + +This section details the data collection process and the construction of the ground truth. + +# 4.1. Data Collection + +Data sources. The main data source of the Google Landmarks Dataset v2 is *Wikimedia Commons*5, the media repository behind Wikipedia. Wikipedia Commons hosts millions of photos of landmarks licensed under Creative Commons and Public Domain licenses, contributed by an active community of photographers as well as partner organizations such as libraries, archives and museums. Its large coverage of the world's landmarks is partly thanks to *Wiki Loves Monuments*6, an annual world-wide contest with the goal to upload high-quality, freely licensed photos of landmarks to the site and to label them within a fine-grained taxonomy of the world's cultural heritage sites. In addition to Wikipedia Commons, we collected realistic query images by crowdsourcing. Operators were sent out to take photos of selected landmarks around the world with smartphones. + +Training and index sets. Fig. 6 shows the process we used to mine landmark images from Wikipedia Commons. Wikipedia Commons is organized into a hierarchy of categories that form its taxonomy. Each category has a unique URL where all its associated images are listed. We found that the Wikipedia Commons hierarchy does not have a suitable set of top-level categories that map to human-made and natural landmarks. Instead, we found the Google Knowledge Graph7 to be useful to obtain an exhaustive list of the landmarks of the world. To obtain a list of Wikipedia Commons categories for landmarks, we queried the Google Knowledge Graph with terms like "landmarks", "tourist attractions", "points of interest", etc. For each returned knowledge graph entity, we obtained its associated Wikipedia articles. We then followed the link to the Wikipedia Commons Category page in the Wikipedia article. Note that while Wikipedia may have articles about the same landmark in different languages, Wikipedia Commons only has one category per subject. We then downloaded all images contained in the Wikipedia Commons pages we obtained. To avoid ambiguities, we enforced the restriction that each mined image be associated to a single Wikipedia category or Knowledge Graph entity. We use the Wikipedia Commons category URLs as the canonical class labels. The training and index sets are collected in this manner. + +Query set. The query set consists of "positive" query images of landmarks and "negative" query images not showing landmarks. For collecting the "positive" query set, we selected a subset of the landmarks we collected from Wikipedia Commons and asked crowdsourcing operators to take photos of them. For the "negative" query data collection, we used the same process as for the index and training data, but queried the Knowledge Graph only with terms that are + +5https://commons.wikimedia.org +$^{6}$ https://www.wikilovesmonuments.org +7https://developers.google.com/knowledge-graph + +![](images/7f251a2648ae0cacd64bb12171adb9c64d64f02aac2f302f4642337571d44901.jpg) +Figure 6: Left: pipeline for mining images from Wikipedia Commons. Right: the user interface of the re-annotation tool. + +unrelated to landmarks. We also removed any negative query images that had near-duplicates in the index or training sets. + +Dataset partitioning. The landmark images from Wikipedia Commons were split into training and index sets based on their licenses. We used CC0 and Public Domain photos for the index set while photos with "Creative Commons By" licenses that did not have a "No Derivatives" clause were used for the training set. As a result, the label spaces of index and training sets have a large, but not complete, overlap. + +# 4.2. Test Set Re-Annotation + +Visual inspection of retrieval and recognition results showed that many errors were due to missing ground truth annotations, which was due to the following reasons: (i) Crowdsourced labels from Wikipedia Commons can contain errors and omissions. (ii) Some query images contain multiple landmarks, but only one of them was present in the ground truth. (iii) There are sometimes multiple valid labels for an image on different hierarchical levels. For example, for a picture of a mountain in a park, both the mountain and the park would be appropriate labels. (iv) Some of the "negative" query images do actually depict landmarks. + +We therefore amend the ground truth with human annotations. However, the large number of instance labels makes this a challenging problem: Each query image would need to be annotated with one out of 200k landmark classes, which is infeasible for human raters. We therefore used the model predictions of the top-ranked teams from the challenges to propose potential labels to the raters. To avoid bias in the new annotation towards any particular method, we used the top-10 submissions which represent a wide range of methods (see Sec. 5.4). A similar idea was used to construct the distractor set of the revisited Oxford and Paris datasets [44], where hard distractors were mined using a combination of different retrieval methods. + +Fig. 6 shows the user interface of the re-annotation tool. On the left side, we show a sample of index/train images of a given landmark label. On the right, we show the query images that are proposed for this label and ask raters to click on the correct images. This way, we simplified the question of "which landmark is it?" as "is it this landmark?", which is a simple "yes" or "no" question. Grouping the query images associated with the same landmark class together + +further improved the re-annotation efficiency, since raters do not need to switch context between landmark classes. To make efficient use of rater time, we only selected the highest-confidence candidates from the top submissions, since those are more likely to be missing annotations rather than model errors. In total, we sent out $\sim 10\mathrm{k}$ recognition query images and $\sim 90\mathrm{k}$ retrieval query images for re-annotation. To ensure the re-annotation quality, we sent each image to 3 human raters and assigned the label based on majority voting. In total, we leveraged $\sim 800$ rater hours on the re-annotation process. This re-annotation increased the number of recognition annotations by $72\%$ and the number of retrieval annotations by $30\%$ . If a "negative" query image was verified to contain a landmark, it was moved to the "positive" query set. We will continue to improve the ground truth and will make future versions available on the dataset website. For comparability, past versions will stay available and each ground truth will receive a version number that we ask dataset users to state when publishing results. + +# 5. Experiments + +We demonstrate usage of the dataset and present several baselines that can be used as reference results for future research, besides discussing results from the public challenge. All results presented in this section are w.r.t. version 2.1 of the dataset ground truth. + +# 5.1. Training Set Pre-Processing + +The Google Landmarks Dataset v2 training set presents a realistic crowdsourced setting with diverse types of images for each landmark: e.g., for a specific museum there may be outdoor images showing the building facade, but also indoor images of paintings and sculptures that are on display. Such diversity within a class may pose challenges to the training process, so we consider the pre-processing steps proposed in [64] in order to make each class more visually coherent. Within each class, each image is queried against all others by global descriptor similarity, followed by geometric verification of the top-100 most similar images using local features. The global descriptor is a ResNet-101 [25] embedding and the local features are DELF [40], both trained on the first Google Landmarks Dataset version (GLDv1) [40]. If an image is successfully matched to at least 3 other images, each + +
Training set# Images# Labels
GLDv1-train [40]1,225,02914,951
GLDv2-train4,132,914203,094
GLDv2-train-clean1,580,47081,313
GLDv2-train-no-tail1,223,19527,756
+ +Table 2: Number of images and labels for the different training datasets used in our experiments. + +
TechniqueTraining DatasetMediumHard
\( \mathcal{R}\mathrm{Oxf} \)\( \mathcal{R}\mathrm{{Par}} \)\( \mathcal{R}\mathrm{Oxf} \)\( \mathcal{R}\mathrm{{Par}} \)
ResNet101+ArcFaceLandmarks-full [22]50.870.424.347.1
Landmarks-clean [22]54.270.728.346.0
GLDv1-train [40]68.983.445.367.2
GLDv2-train-clean74.284.951.670.3
GLDv2-train-no-tail73.584.450.769.1
DELF-ASMK*+SP [44]67.876.943.155.4
DELF-R-ASMK* [54]73.380.747.661.3
DELF-R-ASMK*+SP [54]76.080.252.458.6
ResNet152+Triplet [45]GLDv1-train [40]68.779.744.260.3
ResNet101+AP [46]66.380.242.560.8
DELG global-only [10]69.781.645.163.4
DELG global+SP [10]75.482.253.763.7
HesAff-rSIFT-ASMK*+SP [44]-60.661.436.735.0
+ +with at least 30 inliers, it is selected; otherwise discarded. + +We refer to the resulting dataset version as GLDv2-train-clean and make it available on the dataset website. Tab. 2 presents the number of selected images and labels: 1.6M training images (38%) and 81k labels (40%). Even if this version only contains less than half of the data from GLDv2-train, it is still much larger than the training set of any other landmark recognition dataset. We also experiment with another variant where classes with lower than 15 images are removed, referred to as GLDv2-train-no-tail; it has approximately the same number of images as GLDv1-train, but $2 \times$ the number of classes. + +# 5.2. Comparing Training Datasets + +We assess the utility of our dataset's training split for transfer learning, by using it to learn global descriptor models and evaluating them on independent landmark retrieval datasets: Revisited Oxford (ROxf) and Revisited Paris (RPar) [44]. A ResNet-101 [25] model is used, with GeM [45] pooling, trained with ArcFace loss [18]. Results are presented in Tab. 3, where we compare against models trained on other datasets, as well as recent state-of-the-art results - including methods based on global descriptors [45, 46], local feature aggregation [44, 54] and unified global+local features [10]. Note that "SP" denotes methods using local feature-based spatial verification for re-ranking. + +Model training on GLDv2-train-clean provides a substantial boost in performance, compared to training on GLDv1-train: mean average precision (mAP) improves by up to $5\%$ . We also compare with models trained on the Landmarks-full + +Table 3: Retrieval results (\% mAP) on $\mathcal{R}\mathrm{Oxf}$ and $\mathcal{R}\mathrm{Par}$ of baseline models (ResNet-101 + ArcFace loss) learned on different training sets, compared to other techniques. All global descriptors use GeM pooling [45]. + +
TechniqueTraining DatasetTestingValidation
ResNet101+ArcFaceLandmarks-full [22]23.2020.07
Landmarks-clean [22]22.2320.48
GLDv1-train [40]33.2533.21
GLDv2-train-clean27.3426.40
DELF-KD-tree [40]44.8441.07
DELG global-only [10]GLDv1-train [40]32.3732.02
DELG global+SP [10]56.3555.01
+ +Table 4: Baseline results (\% μAP) for the GLDv2 recognition task. + +
TechniqueTraining DatasetTestingValidation
ResNet101+ArcFaceLandmarks-full [22]13.2710.75
Landmarks-clean [22]13.5511.95
GLDv1-train [40]20.6718.82
GLDv2-train-clean24.1522.20
DELF-R-ASMK* [54]18.2116.32
DELF-R-ASMK*+SP [54]GLDv1-train [40]18.7817.38
DELG global-only [10]20.4418.25
DELG global+SP [10]22.3020.43
ResNet101+AP [46]18.7116.30
ResNet101+Triplet [60]GLDv1-train [40]18.9417.14
ResNet101+CosFace [58]21.3518.41
+ +Table 5: Baseline results (\% mAP@100) for the GLDv2 retrieval task. The bottom three results were reported in [64]. + +and Landmarks-clean datasets [22]: performance is significantly lower, which is likely due to their much smaller scale. Our simple global descriptor baseline even outperforms all methods on the $\mathcal{R}\mathrm{Par}$ dataset, and comes close to the state-of-the-art in $\mathcal{R}\mathrm{Oxf}$ . Results in the GLDv2-train-no-tail variant show high performance, although a little lower than GLDv2-train-clean in all cases. + +# 5.3. Benchmarking + +Tab. 4 and Tab. 5 show results of baseline methods for the recognition and retrieval tasks, respectively. The methods shown use deep local and global features extracted with models that were trained using different datasets and loss functions. All global descriptors use GeM [45] pooling. For recognition with global descriptors, all methods compose landmark predictions by aggregating the sums of cosine distances of the top-5 retrieved images; the landmark with the highest sum is used as the predicted label and its sum of cosine distances is used as the confidence score. For DELG with SP, we first find the global descriptor nearest neighbors; then spatially verify the top 100 images; sort images based on the number of inliers; and aggregate scores over the top-5 images to compose the final prediction, where the score of each image is given by $\frac{\min(l,70)}{70} + g$ , where $l$ is the number of inliers and $g$ the global descriptor cosine similarity. For DELF-KD-tree, we use the system proposed in [40] to obtain the top prediction for each query (if any). + +In all cases, training on GLDv1 or GLDv2 improves performance substantially when compared to training on Landmarks-full/clean; for the retrieval task, GLDv2 train + +
Team NameTechniqueBefore re-annotation
TestingValidationTestingValidation
smlyaka [64]GF ensemble → LF → category filter69.3965.8535.5430.96
JL [24]GF ensemble → LF → non-landmark filter66.5361.8637.6132.10
GLRunner [15]GF → non-landmark detector → GF+classifier53.0852.0735.9937.14
+ +Table 6: Top 3 results on recognition challenge (\% μAP). GF = global feature similarity search; LF = local feature matching re-ranking. + +
Team NameTechniqueTestingValidationBefore re-annotationPrecision@100
TestingValidationAfterBefore
smlyaka [64]GF ensemble → DBA/QE → C37.1935.6937.2535.686.094.73
GLRunner [15]GF ensemble → LF → DBA/QE → C34.3832.0434.7532.096.424.83
Layer 6 AI [12]GF ensemble → LF → QE → EGT32.1029.9232.1829.645.133.97
+ +Table 7: Top 3 results on retrieval challenge (% mAP@100). GF = global feature similarity search; LF = local feature matching re-ranking; DBA = database augmentation; QE = query expansion; C = re-ranking based on classifier predictions; EGT = Explore-Exploit Graph Traversal. The last two columns show the effect of the re-annotation on the retrieval precision on the testing set (% Precision@100). + +ing performs better, while for the recognition task, GLDv1 performs better. In the recognition case, a system purely based on local feature matching with DELF-KD-tree outperforms global descriptors; the best performance is obtained when combining both local and global features, as done with DELG. In the retrieval task, our global descriptor approach trained on GLDv2 outperforms all others; in this case, we also report results from [64] comparing different loss functions; CosFace and ArcFace perform similarly, while Triplet and AP losses perform worse. + +# 5.4. Challenge Results + +Tab. 6 and Tab. 7 present the top 3 results from the public challenges, for the recognition and retrieval tracks, respectively. These results are obtained with complex techniques involving ensembling of multiple global and/or local features, usage of trained detectors/classifiers to filter queries, and several query/database expansion techniques. + +The most important building block in these systems is the global feature similarity search, which is the first stage in all successful approaches. These were learned with different backbones such as ResNet [25], ResNeXt [62], Squeeze-and-Excitation [27], FishNet [52] and Inception-V4 [53]; pooling methods such as SPoC [6], RMAC [55] or GeM [45]; loss functions such as ArcFace [18], CosFace [58], N-pairs [50] and triplet [49]. Database-side augmentation [3] is also often used to improve image representations. + +The second most widely used type of method is local feature matching re-ranking, with DELF [40], SURF [9] or SIFT [39]. Other re-ranking techniques which are especially important for retrieval tasks, such as query expansion (QE) [17, 45] and graph traversal [13], were also employed. + +These challenge results can be useful as references for future research. Even with such complex methods, there is still substantial room for improvement in both tasks, indicating that landmark recognition and retrieval are far from solved. + +# 5.5. Effect of Re-annotation + +The goal of the re-annotation (Sec. 4.2) was to fill gaps in the ground truth where index images showing the same + +landmark as a query were not marked as relevant, or where relevant class annotations were missing. To show the effect of this on the metrics, Tab. 6 and 7 also list the scores of the top methods from the challenge before re-annotation. There is a clear improvement in $\mu \mathrm{AP}$ for the recognition challenge, which is due to a large number of correctly recognized instances that were previously not counted as correct. However, a similar improvement cannot be observed for the retrieval results. This is because by the design of the the dataset, the retrieval annotations are on the class level rather than the image level. Therefore, if a class is marked as relevant for a query, all of its images are, regardless of whether they have shared content with the query image. So, while the measured precision of retrieval increases, the measured recall decreases, overall resulting in an almost unchanged mAP score. This is illustrated in the last two columns of Tab. 7, which shows that Precision@100 consistently increases as an effect of the re-annotation. + +# 6. Conclusion + +We have presented the Google Landmarks Dataset v2, a new large-scale benchmark for image retrieval and instance recognition. It is the largest such dataset to date and presents several real-world challenges that were not present in previous datasets, such as extreme class imbalance and out-of-domain test images. We hope that the Google Landmarks Dataset v2 will help advance the state of the art and foster research that deals with these novel challenges for instance recognition and image retrieval. + +Acknowledgements. We would like to thank the Wikimedia Foundation and the Wikimedia Commons contributors for the immensely valuable source of image data they created, Kaggle for their support in organizing the challenges, CVDF for hosting the dataset and the co-organizers of the Landmark Recognition workshops at CVPR'18 and CVPR'19. We also thank all teams participating in the Kaggle challenges, especially those whose solutions we used for re-annotation. Special thanks goes to team smlyaka [64] for contributing the cleaned-up dataset and several baseline experiments. + +# References + +[1] S. Agarwal, Y. Furukawa, N. Snavely, I. Simon, B. Curless, S. Seitz, and R. Szeliski. Building Rome in a Day. Communications of the ACM, 2011. +[2] R. Arandjelovic and A. Zisserman. Smooth object retrieval using a bag of boundaries. In Proc. ICCV, 2011. +[3] R. Arandjelovic and A. Zisserman. Three Things Everyone Should Know to Improve Object Retrieval. In Proc. CVPR, 2012. +[4] Y. Avrithis, Y. Kalantidis, G. Tolias, and E. Spyrou. Retrieving Landmark and Non-landmark Images from Community Photo Collections. In Proc. ACM MM, 2010. +[5] Y. Avrithis, G. Tolias, and Y. Kalantidis. Feature Map Hashing: Sub-linear Indexing of Appearance and Global Geometry. In Proc. ACM MM, 2010. +[6] A. Babenko and V. Lempitsky. Aggregating Local Deep Features for Image Retrieval. In Proc. ICCV, 2015. +[7] A. Babenko, A. Slesarev, A. Chigorin, and V. Lempitsky. Neural Codes for Image Retrieval. In Proc. ECCV, 2014. +[8] Y. Bai, Y. Lou, F. Gao, S. Wang, Y. Wu, and L. Duan. Group-Sensitive Triplet Embedding for Vehicle Reidentification. IEEE Transactions on Multimedia, 2018. +[9] H. Bay, A. Ess, T. Tuytelaars, and L. Van Gool. Speeded-Up Robust Features (SURF). Computer Vision and Image Understanding, 2008. +[10] B. Cao, A. Araujo, and J. Sim. Unifying Deep Local and Global Features for Image Search. arXiv:2001.05027, 2020. +[11] V. Chandrasekhar, D. Chen, S. S. Tsai, N. M. Cheung, H. Chen, G. Takacs, Y. Reznik, R. Vedantham, R. Grzeszczuk, J. Bach, and B. Girod. The Stanford Mobile Visual Search Dataset. In Proc. ACM Multimedia Systems Conference, 2011. +[12] C. Chang, H. Rai, S. K. Gorti, J. Ma, C. Liu, G. Yu, and M. Volkovs. Semi-Supervised Exploration in Image Retrieval. arXiv:1906.04944, 2019. +[13] C. Chang, G. Yu, C. Liu, and M. Volkovs. Explore-Exploit Graph Traversal for Image Retrieval. In Proc. CVPR, 2019. +[14] D. Chen, G. Baatz, K. Koser, S. Tsai, R. Vedantham, T. Pylvanainen, K. Roimela, X. Chen, J. Bach, M. Pollefeys, B. Girod, and R. Grzeseczuk. City-Scale Landmark Identification on Mobile Devices. In Proc. CVPR, 2011. +[15] K. Chen, C. Cui, Y. Du, X. Meng, and H. Ren. 2nd Place and 2nd Place Solution to Kaggle Landmark Recognition and Retrieval Competition 2019. arXiv:1906.03990, 2019. +[16] R. Chiaro, A. Bagdanov, and A. Bimbo. {NoisyArt}: A Dataset for Webly-supervised Artwork Recognition. In Proc. VISAPP, 2019. +[17] O. Chum, A. Mikulik, M. Perdoch, and J. Matas. Total Recall II: Query Expansion Revisited. In Proc. CVPR, 2011. +[18] J. Deng, J. Guo, N. Xue, and S. Zafeiriou. ArcFace: Additive Angular Margin Loss for Deep Face Recognition. In Proc. CVPR, 2019. +[19] I. Fehervari and S. Appalaraju. Scalable Logo Recognition using Proxies. In Proc. WACV, 2019. +[20] L. Fei-Fei, R. Fergus, and P. Perona. Learning Generative Visual Models from Few Training Examples: An Incremental Bayesian Approach Tested on 101 Object Categories. In Proc. CVPR Workshops, 2004. + +[21] Y. Ge, R. Zhang, L. Wu, X. Wang, X. Tang, and P. Luo. DeepFashion2: A Versatile Benchmark for Detection, Pose Estimation, Segmentation and Re-Identification of Clothing Images. In Proc. CVPR, 2019. +[22] A. Gordo, J. Almazan, J. Revaud, and D. Larlus. Deep Image Retrieval: Learning Global Representations for Image Search. In Proc. ECCV, 2016. +[23] G. Griffin, A. Holub, and P. Perona. Caltech-256 Object Category Dataset. Technical Report 7694, California Institute of Technology, 2007. +[24] Y. Gu and C Li. Team JL Solution to Google Landmark Recognition 2019. arXiv:1906.11874, 2019. +[25] K. He, X. Zhang, S. Ren, and J. Sun. Deep Residual Learning for Image Recognition. In Proc. CVPR, 2016. +[26] G.V. Horn, O.M. Aodha, Y. Song, Y. Cui, C. Sun, A. Shepard, H. Adam, P. Perona, and S. Belongie. The iNaturalist Species Classification and Detection Dataset. In Proc. CVPR, 2018. +[27] J. Hu, L. Shen, and G. Sun. Squeeze-and-Excitation Networks. In Proc. CVPR, 2018. +[28] H. Jégou, M. Douze, and C. Schmid. Hamming Embedding and Weak Geometric Consistency for Large Scale Image Search. In Proc. ECCV, 2008. +[29] H. Jégou, F. Perronnin, M. Douze, J. Sanchez, P. Perez, and C. Schmid. Aggregating Local Image Descriptors into Compact Codes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012. +[30] A. Joly and O. Buisson. Logo Retrieval with a Contrario Visual Query Expansion. In Proc. ACM MM, 2009. +[31] Y. Kalantidis, LG. Pueyo, M. Trevisiol, R. van Zwol, and Y. Avrithis. Scalable Triangulation-based Logo Recognition. In Proc. ICMR, 2011. +[32] J. Knopp, J. Sivic, and T. Pajdla. Avoiding Confusing Features in Place Recognition. In Proc. ECCV, 2010. +[33] J. Krause, M. Stark, J. Deng, , and L. Fei-Fei. 3d Object Representations for Fine-Grained Categorization. In Proc. ICCV Workshops, 2013. +[34] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet Classification with Deep Convolutional Neural Networks. In Proc. NIPS, 2012. +[35] A. Kuznetsova, H. Rom, N. Alldrin, J. Uijlings, I. Krasin, J. Pont-Tuset, S. Kamali, S. Popov, M. Malloci, T. Duerig, and V. Ferrari. The Open Images Dataset V4: Unified Image Classification, Object Detection, and Visual Relationship Detection at Scale. arXiv:1811.00982, 2018. +[36] Y. Li, N. Snavely, D. Huttenlocher, and P. Fua. Worldwide Pose Estimation using 3D Point Clouds. In Proc. ECCV, 2012. +[37] T. Lin, M. Maire, S. Belongie, L. Bourdev, R. Girshick, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. Zitnick. Microsoft COCO: common objects in context. In Proc. ECCV, 2014. +[38] Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang. DeepFashion: Powering Robust Clothes Recognition and Retrieval with Rich Annotations. In Proc. CVPR, 2016. +[39] D. Lowe. Distinctive Image Features from Scale-Invariant Keypoints. IJCV, 2004. + +[40] H. Noh, A. Araujo, J. Sim, T. Weyand, and B. Han. LargeScale Image Retrieval with Attentive Deep Local Features. In Proc. ICCV, 2017. +[41] F. Perronnin, Y. Liu, and J. Renders. A Family of Contextual Measures of Similarity between Distributions with Application to Image Retrieval. In Proc. CVPR, 2009. +[42] J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Object Retrieval with Large Vocabularies and Fast Spatial Matching. In Proc. CVPR, 2007. +[43] J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Lost in Quantization: Improving Particular Object Retrieval in Large Scale Image Databases. In Proc. CVPR, 2008. +[44] F. Radenović, A. Iscen, G. Tolias, Y. Avrithis, and O. Chum. Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking. In Proc. CVPR, 2018. +[45] F. Radenović, G. Tolias, and O. Chum. Fine-tuning CNN Image Retrieval with No Human Annotation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018. +[46] J. Revaud, J. Almazan, R. Rezende, and C. R. de Souza. Learning with Average Precision: Training Image Retrieval with a Listwise Loss. In Proc. CVPR, 2019. +[47] S. Romberg, L. Pueyo, R. Lienhart, and R. van Zwol. Scalable Logo Recognition in Real-world Images. In Proc. ICMR, 2011. +[48] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015. +[49] F. Schroff, D. Kalenichenko, and J. Philbin. A Unified Embedding for Face Recognition and Clustering. In Proc. CVPR, 2015. +[50] K. Sohn. Improved Deep Metric Learning with Multiclass N-Pair Loss Objective. In Proc. NIPS, 2016. +[51] H. Song, Y. Xiang, S. Jegelka, and S. Savarese. Deep Metric Learning via Lifted Structured Feature Embedding. In Proc. CVPR, 2016. +[52] S. Sun, J. Pang, J. Shi, S. Yi, and W. Ouyang. Fishnet: A Versatile Backbone for Image, Region, and Pixel Level Prediction. In Proc. NeurIPS, 2018. +[53] C. Szegedy, S. Ioffe, V. Vanhoucke, and A. Alemi. Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning. In Proc. AAAI, 2017. +[54] M. Teichmann, A. Araujo, M. Zhu, and J. Sim. Detect-to-Retieve: Efficient Regional Aggregation for Image Search. In Proc. CVPR, 2019. +[55] G. Tolias, Y. Avrithis, and H. Jegou. Image Search with Selective Match Kernels: Aggregation Across Single and Multiple Images. IJCV, 2015. +[56] A. Torii, R. Arandjelović, J. Sivic, M. Okutomi, and T. Pajdla. 24/7 place recognition by view synthesis. In Proc. CVPR, 2015. +[57] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. +[58] H. Wang, Y. Wang, Z. Zhou, X. Ji, D. Gong, J. Zhou, Z. Li, and W. Liu. Cosface: Large Margin Cosine Loss for Deep Face Recognition. In Proc. CVPR, 2018. + +[59] X. Wei, Q. Cui, L. Yang, P. Wang, and L. Liu. RPC: A LargeScale Retail Product Checkout Dataset. arXiv:1901.07249, 2019. +[60] K. Q. Weinberger, J. Blitzer, and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. In Proc. NIPS, 2006. +[61] Weyand, T. and Leibe, B. Visual landmark recognition from Internet photo collections: A large-scale evaluation. Computer Vision and Image Understanding, 2015. +[62] S. Xie, R. Girshick, P. Dollar, Z. Tu, and K. He. Aggregated Residual Transformations for Deep Neural Networks. In Proc. CVPR, 2017. +[63] K. Yan, Y. Tian, Y. Wang, W. Zeng, and T. Huang. Exploiting Multi-Grain Ranking Constraints for Precisely Searching Visually-similar Vehicles. In Proc. ICCV, 2017. +[64] S. Yokoo, K. Ozaki, E. Simo-Serra, and S. Iizuka. Two-stage Discriminative Re-ranking for Large-scale Landmark Retrieval. arXiv:2003.11211, 2020. +[65] D. Zapletal and A. Herout. Vehicle Re-Identification for Automatic Video Traffic Surveillance. In Proc. CVPR, 2016. +[66] B. Zhou, A. Lapedriza, A. Khosla, A. Oliva, and A. Torralba. Places: A 10 million Image Database for Scene Recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. \ No newline at end of file diff --git a/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/images.zip b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..383382a37d64e56ed022689518fbc985dbba55bc --- /dev/null +++ b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f13b24a059af51ce2897fac4e595fdccfe76b142d2d6fe5f454f798314190b4 +size 558635 diff --git a/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/layout.json b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8b534c47f2a0fc38cc483bdaa348c9abd910f641 --- /dev/null +++ b/googlelandmarksdatasetv2alargescalebenchmarkforinstancelevelrecognitionandretrieval/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9143416624f8b1ddc9888888bcf8dc51727d9bc4b481d93b25c2aa634390acf4 +size 357615 diff --git a/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_content_list.json b/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6c64bdf5d08ec1be551733f435ad863a6d6d97fe --- /dev/null +++ b/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4b8351750282497c044521954e8f74db7be98e9ad4512675c311a985f4f6f27 +size 77402 diff --git a/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_model.json b/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..261beca3033570a5b29e46e053698a1373f88034 --- /dev/null +++ b/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c2c556defb6111ebbb01e8fdcd1345f79d3ea44ad381863d197bd8a7c23f64c +size 95809 diff --git a/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_origin.pdf b/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fe2550a6f7efb3281b831e81187ffbf350931168 --- /dev/null +++ b/graduallyvanishingbridgeforadversarialdomainadaptation/c506b4b3-07a0-4b91-a2aa-cedbd8a1868c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f14eef019af10ad9e7e98c14ce16ffdd7a13e7b30e576b41b86b9fc574279f7 +size 1124043 diff --git a/graduallyvanishingbridgeforadversarialdomainadaptation/full.md b/graduallyvanishingbridgeforadversarialdomainadaptation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0aaeb17757e67295e80e1b62dad87538ddc92cf9 --- /dev/null +++ b/graduallyvanishingbridgeforadversarialdomainadaptation/full.md @@ -0,0 +1,295 @@ +# Gradually Vanishing Bridge for Adversarial Domain Adaptation + +Shuhao Cui $^{1,2}$ Shuhui Wang $^{1*}$ Junbao Zhuo $^{1,2}$ Chi Su $^{3}$ Qingming Huang $^{1,2,4}$ Qi Tian $^{5}$ + +1Key Lab of Intell. Info. Process., Inst. of Comput. Tech., CAS, Beijing, China +2University of Chinese Academy of Sciences, Beijing, China 3Kingsoft Cloud, Beijing, China +4Peng Cheng Laboratory, Shenzhen, China 5Noah's Ark Lab, Huawei Technologies {cuishuhao18s, wangshuhui}@ict.ac.cn, junbao.zhuo@vipl.ict.ac.cn, suchi@kingsoft.com, qmhuang@ucas.ac.cn, tian.qil@huawei.com + +# Abstract + +In unsupervised domain adaptation, rich domain-specific characteristics bring great challenge to learn domain-invariant representations. However, domain discrepancy is considered to be directly minimized in existing solutions, which is difficult to achieve in practice. Some methods alleviate the difficulty by explicitly modeling domain-invariant and domain-specific parts in the representations, but the adverse influence of the explicit construction lies in the residual domain-specific characteristics in the constructed domain-invariant representations. In this paper, we equip adversarial domain adaptation with Gradually Vanishing Bridge (GVB) mechanism on both generator and discriminator. On the generator, GVB could not only reduce the overall transfer difficulty, but also reduce the influence of the residual domain-specific characteristics in domain-invariant representations. On the discriminator, GVB contributes to enhance the discriminating ability, and balance the adversarial training process. Experiments on three challenging datasets show that our GVB methods outperform strong competitors, and cooperate well with other adversarial methods. The code is available at https://github.com/cuishuhao/GVB. + +# 1. Introduction + +Diverse vision applications have gained significant improvement with the cutting-edge technologies such as deep convolutional neural networks (CNN). Despite of success already achieved, even a subtle departure from training data may still cause existing shallow or deep models to make spurious predictions. Directly applying a deep CNN well-trained on millions of images to a new domain encounters performance degradation, while collecting labeled samples for the new domain is expensive and time-consuming. To alleviate such notorious domain discrepancy, researchers re + +![](images/7e52d4a09f9f80e2e18b429ff39508b6291cf78067c60fc235eee7f3c328a0fa.jpg) +Figure 1. Illustration of the bridge for adversarial domain adaptation. On the generator, the bridge models domain-specific representations and connects either source or target domain to intermediate domain. On the discriminator, the bridge balances the adversarial game by providing additive adjustable discriminating ability. In these processes, the method to construct bridge is the key issue in our study. + +sort to unsupervised domain adaptation (UDA) [5, 13, 37, 39, 46, 50] that transfers knowledge from labeled source data to related unlabeled target data. + +In traditional UDA methods, domain discrepancy is reduced by learning transferable representations [10, 14, 28], or reweighing the importance of the samples [29]. Deep methods carry forward the thought of learning transferable representations by distribution alignment on multiple layers [8, 9, 23, 44, 51]. Recently, many domain adaptation methods are inspired by Generative Adversarial Networks (GAN) [1, 12, 27, 49]. Based on GAN, the transferable representations are constructed by the generator that tries to fool the discriminator in the minmax game [9, 17, 35, 36, 40]. In these studies, the discrepancy between source and target domains is considered to be directly minimized. Towards more robust UDA, we reinvestigate the intrinsic weakness possessed by existing domain discrepancy minimization paradigms. + +To reduce domain discrepancy, the great challenge lies in the rich domain-specific characteristics, which are deemed to be mitigated by distribution alignment [8, 23] or adversarial training [9, 35]. Towards more comprehensive reduction of domain-specific characteristics, some methods [2, 3, 11] explicitly model domain-specific and domain-invariant representations by input image reconstruction. The time-consuming reconstruction function demands rich domain characteristics in domain-specific representations. Such characteristics inevitably result in more domain properties in the intermediate domain, which is expected to be domain-invariant. From another perspective of adversarial learning, the adversarial minmax game could achieve better results by balancing the learning ability between the generator and discriminator. Strengthening the discriminating ability by multiple discriminators [30] may facilitate better collaboration with a strong generator in some situations, while the overly critical multiple discriminators may also break the brittle balance of adversarial training. + +In this paper, we define the bridge as a basic concept, which is a measurement modeling the discrepancy between the existing and ideal representations. As shown by example in Figure 1, the bridge is applied to the generator and discriminator. The bridge on generator models domain-specific parts and connects both source and target domains to the intermediate domain, thus it could mitigate the overall transfer difficulty and facilitate more comprehensive domain alignment. The bridge on discriminator measures the discrepancy between the discriminating function hyperplane and the ideal domain decision boundary. + +The key constraint on our constructed bridge is that the range of the bridge is progressively reduced. With the constraint, the bridge mechanism is called Gradually Vanishing Bridge (GVB) for adversarial domain adaptation. We denote GVB applied to generator and discriminator as GVB-G and GVB-D, respectively. Among the bridges, the bridge on generator models domain-specific parts, thus GVB-G could explicitly reduce domain-specific characteristics. Therefore, GVB-G plays the main role in learning domain-invariant representations. It could also reduce the adverse influence of domain characteristics in the representations, and avoid the influence of hard examples with excessive domain characteristics. + +Both GVB-G and GVB-D are integrated into the whole framework, denoted as GVB-GD, to ensure the balance and robustness of the two-player minmax game. Experiments show that GVB-GD outperforms competitors on three challenging datasets and achieves state-of-the-art on OfficeHome. We also apply GVB to other UDA methods including CDAN [24] and Symnets [48]. The improvements on CDAN and Symnets show the general applicability of GVB on adversarial domain adaptation. For better explanation, we visualize the bridge in GVB-GD to validate that the + +bridge could measure the domain-specific characteristics. We further verify the functionality and necessity of GVB, by observation that larger range of GVB-G output tends to result in higher misclassification probability. + +In summary, the key contributions are as follows: + +- We propose a new framework which constructs GVB on both generator and discriminator to achieve more balanced adversarial training for domain adaptation. +- As the key role in the framework, GVB on generator could alleviate the transfer difficulty and explicitly reduce the domain characteristics in the representations. +- GVB outperforms competitors in most cases, and visualization also show the positive effect of GVB. + +# 2. Related Work + +Visual domain adaptation, first proposed by [34], receives increasing attention and fruitful results [45, 43], especially with deep learning techniques [8, 9, 15, 18, 19, 6]. Techniques developed on deep networks could be mainly categorized into moment alignment and adversarial training. Moment-alignment-based methods [14, 23, 25, 38, 44] are proposed to measure and minimize the domain discrepancy with maximum mean discrepancy (MMD) [23], correlation distance [38, 51] or other distance metric [20, 25] calculated on task-specific features. + +Motivated by the Generative adversarial networks (GAN) [12], adversarial learning has been successfully explored in various research fields including domain adaptation [4, 36, 42]. In Domain Adversarial Neural Network (DANN) [9], the authors propose a gradient reversal layer to confuse the domain classifier. Many methods such as ADDA [40], CyCADA [17], SBADA [33], and MCD [35] are proposed to build adversarial frameworks to directly minimize the domain discrepancy. Typically, CDAN [24] is a principled framework that conditions the adversarial adaptation models on discriminative information conveyed in the classifier predictions. Symnets [48] makes a symmetric design of source and target task classifiers, in which both domain classifiers produce classification outputs. + +Some methods try to explicitly model the bridge on generator, but they still face many problems. SGF [28] and GFK [10] build the bridge between domains on Grassmannian manifolds, but could not be easily applied to deep networks. In deep methods, DSN [2], DISE [3] and DLOW [11] formulate the bridge between source and target by reconstructing input images on pixel level. However, the time-consuming reconstruction function does not guarantee less residual domain characteristics in the domain-invariant representations. We avoid using image reconstruction function and reduce the range of bridge on generator to get + +![](images/6e508b4c337796ce5e9e72b5f4dcfcfc85cd09f3d4d21816ba03b8af84539507.jpg) +Figure 2. The proposed GVB-GD framework, which is an end-to-end network shared by source domain and target domain. In GVB-G, the bridge layer $G_{3}$ outputs $\gamma_{i}$ that captures domain-specific properties. The intermediate representation $r_i$ is the classifier response $c_{i}$ subtracted by bridge $\gamma_{i}$ . Similarly, in GVB-D, the bridge layer $D_{2}$ provides additive discriminating ability to the base domain classifier in discriminator. The network is trained by minimizing classification loss, adversarial loss, discriminator loss and generator loss. + +rid of the negative influence of domain-specific characteristics. Besides, multiple discriminators in adversarial networks [30] may break the balance in the adversarial training process with overly critical discriminating ability. In contrast, we pursue a more balanced minmax adversarial game by building the bridge on both generator and discriminator. + +# 3. Method + +We propose GVB for adversarial domain adaptation as shown in Figure 2. In Sec. 3.1, we introduce the baseline for adversarial domain adaptation. The gradually vanishing bridge on generator (GVB-G) is introduced in Sec. 3.2. In Sec. 3.3, we describe the gradually vanishing bridge on discriminator (GVB-D) and the whole framework GVB-GD based on GVB-G and GVB-D. + +# 3.1. Adversarial Domain Adaptation + +We are given source domain $\mathcal{D}_S = \{(x_i^s,y_i^s)\}_{i = 1}^{N_s}$ with $N_{s}$ labeled examples covering $C$ classes where $y_{i}^{s}\in$ $\{1,\dots,C\}$ and target domain $\mathcal{D}_T = \{x_i^t\}_{i = 1}^{N_T}$ with $N_{t}$ unlabeled examples that belong to the same $C$ classes. + +It is widely accepted that methods for domain adaptation can be achieved by minimizing a classification loss and an additional transfer loss. The classification loss in $\mathcal{D}_S$ can be calculated as: + +$$ +\mathcal {L} _ {c l s} = \frac {1}{N _ {s}} \sum_ {i = 1} ^ {N _ {s}} L _ {c e} \left(G _ {\star} \left(x _ {i} ^ {s}\right), y _ {i} ^ {s}\right) \tag {1} +$$ + +where $L_{ce}$ is the cross-entropy loss function and $G_{\star}$ is the + +network structure to obtain class responses. To construct transfer loss, inspired by [23, 35], we directly minimize the domain discrepancy on classifier responses. Besides, we adopt popular methods of adversarial training, the same with other deep domain adaptation methods [8, 17, 24]. Thus the transfer loss could be formulated as: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {t r a n s}} ^ {\text {a d v}} = - \frac {1}{N _ {s}} \sum_ {\substack {i = 1 \\ N}} ^ {N _ {s}} \log D _ {\star} \left(G _ {\star} \left(x _ {i} ^ {s}\right)\right) \tag{2} \\ - \frac {1}{N _ {t}} \sum_ {j = 1} ^ {N _ {t}} \log (1 - D _ {\star} (G _ {\star} (x _ {j} ^ {t}))) \\ \end{array} +$$ + +where $D_{\star}$ is the constructed discriminator. Some methods utilize extra loss, such as reconstruction loss, which can be denoted by $\mathcal{L}_{ext}$ . The overall objective function is: + +$$ +\min _ {G _ {\star}} \quad \mathcal {L} _ {c l s} + \mathcal {L} _ {t r a n s} ^ {a d v} + \mathcal {L} _ {e x t} \tag {3} +$$ + +$$ +\max _ {D _ {\star}} \mathcal {L} _ {t r a n s} ^ {a d v}. +$$ + +This formulation is regarded as the general framework for adversarial domain adaptation. In particular, suppose that the classification network consists of a feature extractor $G_{1}$ and a successive classifier layer $G_{2}$ . For the input data $x_{i}$ , the feature output and the classifier response can be computed as $f_{i} = G_{1}(x_{i})$ and $c_{i} = G_{2}(f_{i})$ , respectively. With the discriminator $D_{1}$ , the baseline of our method could be expressed as: + +$$ +\left\{ \begin{array}{l} G _ {\star} \left(x _ {i}\right) = G _ {2} \left(G _ {1} \left(x _ {i}\right)\right) \\ D _ {\star} \left(G _ {\star}\right) = D _ {1} \left(G _ {\star}\right), \quad \mathcal {L} _ {e x t} = 0, \end{array} \right. \tag {4} +$$ + +# 3.2. Gradually Vanishing Bridge on Generator + +Actually, divergence between source and target domains can hardly be minimized to zero, thus it is quite challenging to seek direct knowledge transfer from source domain $\mathcal{D}_S$ to target domain $\mathcal{D}_T$ . Alternatively, to alleviate the transfer difficulty, we divide the transfer process into two separate processes from either source or target domain to intermediate domain $\mathcal{D}_I$ . $\mathcal{D}_I$ is supposed to lie in the middle of $\mathcal{D}_S$ and $\mathcal{D}_T$ , with much less domain-specific characteristics than $\mathcal{D}_S$ and $\mathcal{D}_T$ . To model domain-specific representations, we construct a bridge layer $G_3$ in light blue boxes in Figure 2. The output of $G_3$ is the bridge denoted as $\gamma_i$ , which captures the domain-specific representation from the input $x_i$ in either $\mathcal{D}_S$ or $\mathcal{D}_T$ , i.e., $\gamma_i = G_3(G_1(x_i))$ . Subtracting bridge $\gamma_i$ from the classifier response $c_i$ , results in the constructed domain-invariant representation, denoted as intermediate representation $r_i$ , calculated as follows: + +$$ +r _ {i} = c _ {i} - \gamma_ {i}. \tag {5} +$$ + +With bridge $\gamma_{i}$ , the framework is the same as Eqn. 4 except the generator. And the overall generator becomes: + +$$ +G _ {\star} \left(x _ {i}\right) = G _ {2} \left(G _ {1} \left(x _ {i}\right)\right) - G _ {3} \left(G _ {1} \left(x _ {i}\right)\right). \tag {6} +$$ + +The adversarial training process enforces that the distributions of $r_i$ across domains are as similar as possible. Therefore, $\gamma_i$ tends to be dominated by domain-specific representations according to Eqn. 5. + +In existing study, some bridge-based methods on the generator have been proposed [2, 3, 11], but the ways of constructing the bridge of existing study remain to be discussed. The bridge is built by image reconstruction in [2, 3, 11]. However, the image reconstruction function inevitably results in too much residual domain-specific characteristics and large overall range in the constructed bridge. In connection to our framework, if the range of $\gamma_{i}$ , measured in vector-norm, is overly large, it has the following interpretations. First, it implies that data $x_{i}$ is a hard example which contains heavy domain-specific properties. Second, the domain-specific and domain-invariant parts for $x_{i}$ can hardly be separated. Consequently, the large range of the bridge means rich domain characteristics in the $\gamma_{i}$ , and inevitably impacts $c_{i}$ and $r_{i}$ . The influence on the representations leads to a higher misclassification probability in $\mathcal{D}_T$ , which is validated by experiment results in Figure 5(a). + +Towards more effective constraint on the bridge, we seek to reduce the influence of domain characteristics in $\gamma_{i}$ . Thus we gradually reduce the influence of $\gamma_{i}$ by progressively minimizing the overall range of $\gamma_{i}$ as follows: + +$$ +\mathcal {L} _ {G} = \frac {1}{\left(N _ {s} + N _ {t}\right) * C} \sum_ {i = 1} ^ {N _ {s} + N _ {t}} \sum_ {j = 1} ^ {C} | \gamma_ {i, j} |, \tag {7} +$$ + +![](images/3047d2d285c561eb83994ea97b445fed70e0e98e46749fb840f6b8eb1b8001d1.jpg) +Figure 3. A toy example of the training process with bridge $\gamma$ . With gradually minimized range of $\gamma$ , the discrepancy between source and target domains is reduced. After adaptation, more points are covered in intermediate domain. But the points still outside of intermediate domain are regarded as hard examples or noisy data. + +where each $\gamma_{i}$ is encouraged to be near zeroes. With the reduced range of $\gamma_{i}$ , the characteristics in $\gamma_{i}$ is suppressed, which results in minor negative effects on $c_{i}$ and $r_i$ . The mechanism of minimizing the range of $\gamma_{i}$ is denoted as GVB. We denote GVB applied to generator as GVB-G. As shown in the experiment in Figure 4, visualization of the data with and without $\gamma_{i}$ also validates that $\gamma_{i}$ still contains rich domain characteristics without input reconstruction. + +For better comprehension of the gradually vanishing bridge mechanism, we show the example in two-dimension space in Figure 3 working on generator. We denote $\mathcal{D}_S$ , $\mathcal{D}_T$ and $\mathcal{D}_I$ with circles in different colors. For simplicity, we assume that the range of bridge $\gamma$ is the single parameter to be optimized, which can measure the distance between the centers of $\mathcal{D}_S(\mathcal{D}_T)$ and $\mathcal{D}_I$ . The distance shows the discrepancy between $\mathcal{D}_S(\mathcal{D}_T)$ and $\mathcal{D}_I$ , which could approximately measure the quantity of domain-specific characteristics in $\mathcal{D}_S(\mathcal{D}_T)$ . $|\gamma|$ appears to be large before domain adaptation, which demonstrates the heavy domain characteristics in $\mathcal{D}_S(\mathcal{D}_T)$ . Based on Eqn. 7, $|\gamma|$ is minimized to reduce domain discrepancy. In this way, $\mathcal{D}_S$ and $\mathcal{D}_T$ will be pushed to be closer and overlapped with $\mathcal{D}_I$ as much as possible to obtain domain-invariant characteristics. In this case, there is less domain-specific characteristics in $\mathcal{D}_S(\mathcal{D}_T)$ , resulting more reliable domain-invariant representations in $\mathcal{D}_I$ . + +Furthermore, all the data points, from either $\mathcal{D}_S$ or $\mathcal{D}_T$ that are possibly dragged into $\mathcal{D}_I$ (i.e., translated with a distance of less than $|\gamma|$ ), are within the region bounded by dashed circle, which is referred to as the candidate intermediate domain. In the training process, the points in the candidate intermediate domain will be dragged into $\mathcal{D}_I$ . After domain adaptation, $|\gamma|$ becomes small, and the candidate intermediate domain will shrink to near the sphere of $\mathcal{D}_I$ . In this case, most of the examples will be included into $\mathcal{D}_I$ (i.e., $|\gamma_i|$ is near zero), while the ones in $\mathcal{D}_S$ or $\mathcal{D}_T$ but outside the candidate intermediate domain are recognized as + +the hard examples that contain too much domain-specific characteristics. + +# 3.3. Gradually Vanishing Bridge on Discriminator + +In adversarial domain adaptation, less attention has been paid to the discriminator. Besides, unlike the generator, which could be pretrained on large-scale datasets such as ImageNet [7], the discriminator is usually randomly initialized. Due to the large computation cost and searching space, the discriminator is prone to run into local minimum. Towards more effective discriminator, we propose to build a bridge layer $D_{2}$ on the discriminator as shown in dark blue boxes in Figure 2. $D_{2}$ models the distance between the basic discriminator $D_{1}$ function hyperplane and ideal decision boundary, and provides additive discriminating power to $D_{1}$ . Thus the overall discriminator becomes: + +$$ +D _ {\star} \left(G _ {\star} \left(x _ {i}\right)\right) = D _ {1} \left(G _ {\star} \left(x _ {i}\right)\right) + D _ {2} \left(G _ {\star} \left(x _ {i}\right)\right). \tag {8} +$$ + +In the two-player game of adversarial learning, it is a common sense that balanced players could stimulate and improve each other more significantly. For example, multiple discriminators [30] may provide domain discrimination from different aspects, but they should be combined properly for more balanced adversarial learning, e.g., combined with a more capable generator. For GVB, the ability of generator is enhanced with the introduction of GVB-G, thus the discriminating ability of the discriminator side should also be adjusted accordingly. Therefore, similar to GVB-G, we progressively minimize the overall range of the bridge on discriminator side as follows: + +$$ +\mathcal {L} _ {D} = \frac {1}{\left(N _ {s} + N _ {t}\right)} \sum_ {i = 1} ^ {N _ {s} + N _ {t}} | \sigma_ {i} |, \tag {9} +$$ + +where $\sigma_{i}$ is the constructed bridge, i.e., $\sigma_{i} = D_{2}(G_{\star}(x_{i}))$ We denote GVB applied to the discriminator as GVB-D. + +Towards more balanced minmax game in the whole training process, we combine GVB-G and GVB-D, and formulate the gradually vanishing bridge on generator and discriminator (GVB-GD). The whole framework could be described as follows: + +$$ +\left\{ \begin{array}{l} G _ {\star} \left(x _ {i}\right) = G _ {2} \left(G _ {1} \left(x _ {i}\right)\right) - G _ {3} \left(G _ {1} \left(x _ {i}\right)\right) \\ D _ {\star} \left(G _ {\star}\right) = D _ {1} \left(G _ {\star}\right) - D _ {2} \left(G _ {\star}\right) \\ \mathcal {L} _ {e x t} = \lambda \mathcal {L} _ {G} + \mu \mathcal {L} _ {D}, \end{array} \right. \tag {10} +$$ + +where the extra loss combines both Eqn. 7 and Eqn. 9 with hyper-parameters $\lambda$ and $\mu$ . Since our proposed GVB mechanism focuses on optimization of minmax game, it is general applicable to adversarial domain adaptation framework. Thus we also apply GVB to existing methods including CDAN [24] and Symnets [48]. CDAN multiplies + +the feature representations and class responses on the generator, to play against the discriminator. Both GVB-G and GVB-D could be applied to CDAN. Symnets builds symmetric generators for domains, but the discriminator is not modeled explicitly. Therefore, only GVB-G could be applied to SymNets. + +# 4. Experiment + +We evaluate the GVB mechanism on three challenging standard benchmarks and compare GVB with state-of-the-art domain adaptation methods. + +# 4.1. Datasets and Settings + +Office-31 [34] is a standard benchmark for visual domain adaptation which contains 4,652 images in 31 categories. It consists of three domains: Amazon (A), Webcam (W) and DSLR (D). We evaluate the methods across the three domains, i.e., six transfer tasks in total. + +Office-Home [41] is a challenging dataset for visual domain adaptation with 15,500 images in 65 categories. It has four significantly different domains: Artistic images (Ar), Clip Art (Cl), Product images (Pr), and Real-World images (Rw). Among four domains, there are totally 12 challenging domain adaptation tasks. + +VisDA-2017 [31] is a simulation-to-real dataset for domain adaptation with over 280,000 images across 12 categories in the training, validation and testing domains. The training images are generated from the same object under different circumstances, while the validation images are collected from MSCOCO. [21]. + +For GVB-GD, we adopt ResNet-50 [16] pre-trained on ImageNet [7] as our backbone network. We build the bridge layer on both the generator and discriminator with several fully-connected layers in experiments. All the experiments are implemented with PyTorch. For each method, we run four random experiments and report the average classification accuracy and we report the standard deviation in Office-31. We compare our method with state-of-the-art domain adaptation methods. For fair comparison, results on Office-31, Office-Home and VisDA-2017 are directly reported from their original papers if available. Similar to our methods, for CDAN and Symnet, when applying GVB on the generator, 'G' is added to the method name, and 'D' is added when GVB is applied on the discriminator. We compare our methods with state-of-art domain adaptation methods: DAN [23], DANN [9], ADDA [40], GTA [36], CDAN [24], Simnet [32], MCD [35] and MDD [47]. + +In the adversarial training, we apply gradient reversal layer (GRL) [8] to the network. In GRL, instead of fixing the adaptation factor, progressive training strategy is adopted to suppress noisy signal from the discriminator at the early stages of the training procedure. To optimize the transfer process, we utilize entropy conditioning proposed + +Table 1. Accuracies (%) on Office-31 for ResNet50-based unsupervised domain adaptation methods. + +
MethodA → DA → WD → WW → DD → AW → AAvg
ResNet-50 [16]68.9±0.268.4±0.296.7±0.199.3±0.162.5±0.360.7±0.376.1
GFK [10]74.5±0.072.8±0.095.0±0.098.2±0.063.4±0.061.0±0.077.5
DAN [23]78.6±0.280.5±0.497.1±0.299.6±0.163.6±0.362.8±0.280.4
DANN [9]79.7±0.482.0±0.496.9±0.299.1±0.168.2±0.467.4±0.582.2
ADDA [40]77.8±0.386.2±0.596.2±0.398.4±0.369.5±0.468.9±0.582.9
Simnet [32]85.3±0.388.6±0.598.2±0.299.7±0.273.4±0.871.8±0.686.2
GTA [36]87.7±0.589.5±0.597.9±0.399.8±0.472.8±0.371.4±0.486.5
MCD [35]92.2±0.288.6±0.298.5±0.1100.0±.069.5±0.169.7±0.386.5
MDD [47]93.5±0.294.5±0.398.4±0.1100.0±.074.6±0.372.2±0.188.9
Baseline89.9±0.392.5±0.598.5±0.399.9±0.170.0±0.471.1±0.387.0
GVB-G93.9±0.494.2±0.498.6±0.2100.0±.071.8±0.373.5±0.488.7
GVB-D92.8±0.593.9±0.498.4±0.2100.0±.072.0±0.372.6±0.388.3
GVB-GD95.0±0.494.8±0.598.7±0.3100.0±.073.4±0.373.7±0.489.3
CDAN [24]92.9±0.293.1±0.198.6±0.1100.0±.071.0±0.369.3±0.387.5
CDAN-G92.1±0.392.9±0.298.2±0.1100.0±.073.5±0.372.8±0.288.2
CDAN-D93.5±0.492.9±0.298.6±0.1100.0±.073.0±0.373.1±0.388.5
CDAN-GD93.7±0.294.0±0.298.6±0.1100.0±.073.4±0.373.0±0.288.8
Symnets [48]93.9±0.590.8±0.198.8±0.3100.0±.074.6±0.672.5±0.588.4
Symnets-G96.1±0.393.8±0.498.8±0.2100.0±.074.9±0.472.8±0.389.4
+ +Table 2. Accuracies (%) on Office-Home for ResNet50-based unsupervised domain adaptation methods. + +
MethodAr→ClAr→PrAr→RwCl→ArClCl→PrClCl→RwPr→ArPrClPrRwRw→ArRwClRw→PrAvg
ResNet-50 [16]34.950.058.037.441.946.238.531.260.453.941.259.946.1
DAN [23]43.657.067.945.856.560.444.043.667.763.151.574.356.3
DANN [9]45.659.370.147.058.560.946.143.768.563.251.876.857.6
MCD [35]48.968.374.661.367.668.85747.175.169.152.279.664.1
BNM [6]52.373.980.063.372.974.961.749.579.770.553.682.267.9
MDD [47]54.973.777.860.071.471.861.253.678.172.560.282.368.1
Symnets [48]47.772.978.564.271.374.263.647.679.473.850.882.667.2
Symnets-G48.074.378.565.172.274.465.149.479.773.851.782.567.8
CDAN [24]50.770.676.057.670.070.057.450.977.370.956.781.665.8
CDAN-G53.672.177.961.971.871.763.852.979.971.558.083.368.2
CDAN-D54.472.977.762.671.971.862.452.179.572.158.183.368.2
CDAN-GD55.374.178.262.472.671.863.854.180.173.158.783.669.0
Baseline54.772.878.562.371.173.161.053.080.072.856.583.468.3
GVB-G56.574.079.264.273.074.165.255.981.274.258.284.070.0
GVB-D55.073.879.064.372.975.063.454.280.973.158.083.669.4
GVB-GD57.074.779.864.674.174.665.255.181.074.659.784.370.4
+ +in [24] that pays more attention to easy-to-classify data. We choose the baseline model as described in Sec. 3.1. For the training of the network, we employ mini-batch stochastic gradient descent (SGD) with momentum of 0.9 to train our model. We keep fixing $\lambda = 1$ and $\mu = 1$ to balance the loss, since our method of GVB is stable under different values of parameters $\lambda$ and $\mu$ . + +# 4.2. Results + +The results on Office-31, Office-Home and VisDA-2017 datasets are separately shown in Table 1, Table 2 and Table 3. Both GVB-G and GVB-D outperform the baseline and most of other competitors significantly, which means the bridge provides prominent improvement for domain adaptation. GVB-GD further outperforms GVB-G and + +![](images/66eee642a892e198373913c1ff9785e53e827c43b1763a9abc609f73f3d1ed80.jpg) + +![](images/fe41dc283686d7b0c05a02431cebc5a1e66b6d6f6d0d0eb112354c754a70c99f.jpg) +(a) GVB-G +Figure 5. Relationship between the range of bridge on target domain and classification result on GVB-GD. + +![](images/1e861420f6fd1505050f5eefb161868c8069028ceb2583839176d5fc15fe17a4.jpg) +Figure 4. Visualization of data with and without the bridge $\gamma_{i}$ on generator on $\mathrm{A} \rightarrow \mathrm{D}$ for GVB-GD. The images shown in the first and last columns are respectively sampled from source domain (Amazon) and target domain (DSLR). The 2nd~5th columns show the generated source images corresponding to different representations by subtracting $\gamma_{i}$ with $0 \times, 5 \times, 10 \times$ and $15 \times$ amplifications from classifier responses $c_{i}$ . Similarly, the 6th~9th columns show the generated target images by subtracting $\gamma_{i}$ with $15 \times, 10 \times, 5 \times$ and $0 \times$ amplifications from $c_{i}$ . +(b) GVB-D + +![](images/68376252fc216a5c8ca79cd01778df9968d636dd01394b68cb4aa6790921bac2.jpg) +(a) ResNet50 +Figure 6. $t$ -SNE of classifier responses by ResNet50, Baseline and GVB-GD (red: Amazon, blue: Webcam). + +![](images/d7c8ce0419a4946406264ef3bfaa69e1cc777880e0925a298348b02b438136e6.jpg) +(b) Baseline + +![](images/04d9c4ebc6668a29cf7a93c3e2d88da48076fd0fc497f3276949e572501c3d3e.jpg) +(c) GVB-GD + +Table 3. Accuracies $(\%)$ of Synthetic $\rightarrow$ Real on VisDA-2017 for unsupervised domain adaptation methods using ResNet-50. + +
MethodAccMethodAccMethodAcc
DAN [23]61.6CDAN [24]70.0Baseline71.3
DANN [9]57.4CDAN-G73.4GVB-G73.1
GTA [36]69.5CDAN-D73.8GVB-D72.8
MDD [47]74.6CDAN-GD74.9GVB-GD75.3
+ +GVB-D for most tasks, which means the bridge on the generator and discriminator can boost each other to learn better domain-invariant representation. Besides, we apply GVB-G to CDAN and Symnets, and GVB-D to CDAN. The well-performed results of CDAN-G, CDAN-D, CDAN-GD and Symnets-G mean the GVB mechanism is generally applicable for mainstream adversarial domain adaptation methods. + +For different datasets on Office-31, Office-Home and VisDA-2017, methods with GVB could achieve well-performed results. Among the datasets, there exists large domain discrepancy in Office-Home and VisDA-2017, while less domain discrepancy in Office. Thus our methods + +with GVB are suitable for both the easy and difficult tasks. Besides, VisDA-2017 is a large-scale dataset, while OfficeHome and Office are relative small datasets. This means our GVB methods are applicable to both small and large datasets. Meanwhile, GVB could cooperate well with methods such as CDAN and Symnets for different tasks. This shows that GVB is generally applicable for a wide range of domain adaptation tasks. + +# 4.3. Qualitative Validation + +Representation visualization. Since we avoid using image reconstruction in the bridge $\gamma$ on generator, there remain concerns on whether there are rich domain-specific characteristics in $\gamma$ . We visualize the representations with and without $\gamma$ in Figure 4 on Office-31. 500 random images from Amazon and 498 images from DSLR are selected to train the network. Similar to FCN [22], we use the encoder-decoder network to achieve the input images reconstruction. The encoder is the same as GVB-GD and the decoder is a deconvolutional neural network that maps classifier responses into images. We utilize the weights of + +Table 4. Accuracies $(\%)$ on Office-Home with ResNet50. Methods with notion of BG (D) are the bridge without minimization. + +
MethodAr→ClAr→PrAr→RwCl→ArAvg
Baseline54.772.878.562.367.1
BG54.172.378.762.967.0
GVB-G56.574.079.264.268.5
BD55.373.179.063.967.8
GVB-D55.073.879.064.368.0
GVB-G+BD56.274.479.664.268.6
GVB-GD57.074.780.064.869.1
+ +encoder with pre-trained GVB-GD on $\mathrm{A}\rightarrow \mathrm{D}$ and fix the encoder parameters in the training process. We train the encoder-decoder network to reconstruct images from both domains by minimizing $L_{2}$ loss between input image and reconstructed image. As the range of $\gamma$ is small compared with classification responses $c$ , it is difficult to directly visualize $\gamma$ . Thus we amplify the $\gamma$ and construct several representations $r = c - \sigma \gamma$ with $\sigma \in \{0,5,10,15\}$ as the inputs of decoder for better visualization. + +From the left to right, we can see the gradual progress from source domain to target domain in Figure 4. Take the first row for example, the body of the bike helmet is white in source domain and blue in target domain. With increasing amplification factor $\sigma$ , the generated helmets from the 2nd to the 5th column become darker and more blue, while those from the 9th to the 6th column becomes whiter. Besides, the helmet is vertical in source domain and slant in target domain, while the object region of the generated images with amplified $\gamma$ is in a circle shape which covers the overlapping region of the original images. Furthermore, the background is white in source domain and brown in target domain, and it appears as half white and half brown in the images with amplified $\gamma$ . All these results validate that $\gamma$ captures rich domain-specific representations. + +Statistical analysis on the bridge. To analyze the relationship between the bridge on target domain and classification results, we calculate the range of the bridge as $|\gamma_i|$ on GVB-GD. In Figure 5, we show the results of A → D on DSLR and sort samples according to the range of bridge. In Figure 5(a), with increasing range of the bridge $\gamma_i$ on generator, the red dots become more intensive and the classification error goes higher. This validates that higher misclassification probability appears with larger $|\gamma_i|$ , thus minimizing the range of $\gamma_i$ tends to result in lower misclassification probability. + +On the discriminator side, as observed in Figure 5(b), $\sigma_{i}$ tends to be large when the input representations could be easily transformed into intermediate domain, i.e., they tend to be more domain-invariant. These "easy" examples need more discriminative ability from discriminator to distinguish which domain they come from, and they need less + +efforts on generator side to produce domain-invariant representations, resulting smaller $|\gamma_i|$ . More importantly, these "easy" samples tend to be easily classified with higher probability since they show more domain-invariance. By contrast, samples with larger $|\gamma_i|$ deliver more domain-specific properties, which results in smaller $|\sigma_i|$ and higher misclassification probability. + +Ablation study. To validate the effect of GVB compared with the single bridge, we conduct ablation experiments as shown in Table 4. Methods with notion of B-G and G-D are the bridge without minimization, i.e., $\lambda = 0$ and $\mu = 0$ . (GVB-G)+(B-D) means to add a bridge on discriminator without minimization to replace the GVB-D, i.e., $\mu = 0$ . GVB-G outperforms B-G by a large margin, this means the gradually vanishing mechanism is indispensable on the generator. Results on GVB-D and B-D are similar, but GVB-GD outperforms (GVB)-G+(B-D). This means GVB-D could cooperate with GVB-G better than B-D for a more balanced adversarial training. + +Feature visualization. We visualize the features of ResNet50 and our methods on $\mathrm{A} \rightarrow \mathrm{D}$ by $t$ -SNE [26] in Figure 6. It is shown in Figure 6(a) that ResNet50 works well in source domain (Amazon) but poorly in target domain (Dslr). The Baseline achieves well-performed global alignment by transferring on classifier responses as shown in Figure 6(b), but the direct transfer leads to a large average distance between target data and its nearest source data. For GVB-GD, target samples are located closer to the source examples. The clusters in Figure 6(c) are more compact that the other two cases, which further validates the learning ability of our GVB mechanism. + +# 5. Conclusion + +In this paper, we propose the gradually vanishing bridge mechanism that can work on the generator and discriminator in adversarial domain adaptation. On the generator, GVB could result in more domain-invariant representation and better reduction of the negative influence of the rich domain-specific characteristics. To achieve a more balanced adversarial training process, GVB is also built on the discriminator side to provide additive discrimination power. We also apply GVB to existing methods and achieve remarkable improvement over their original counterparts. + +Acknowledgement. This work was supported in part by the National Key R&D Program of China under Grant 2018AAA0102003, in part by National Natural Science Foundation of China: 61672497, 61620106009, 61836002, 61931008 and U1636214, and in part by Key Research Program of Frontier Sciences, CAS: QYZDJ-SSW-SYS013. Authors would like to thank Kingsoft Cloud for support of free GPU cloud computing resource and helpful discussion. + +# References + +[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International Conference on Machine Learning, pages 214-223, 2017. +[2] Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. In Advances in Neural Information Processing Systems, pages 343-351, 2016. +[3] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1900-1909, 2019. +[4] Qingchao Chen, Yang Liu, Zhaowen Wang, Ian Wassell, and Kevin Chetty. Re-weighted adversarial adaptation network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7976-7985, 2018. +[5] 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 Proceedings of the IEEE International Conference on Computer Vision, pages 1992-2001, 2017. +[6] Shuhao Cui, Shuhui Wang, Junbao Zhuo, Liang Li, Qingming Huang, and Tian Qi. Towards discriminability and diversity: Batch nuclear-norm maximization under label insufficient situations. arXiv preprint arXiv:2003.12237, 2020. +[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. 2009. +[8] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. +[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. +[10] Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 2066-2073. IEEE, 2012. +[11] Rui Gong, Wen Li, Yuhua Chen, and Luc Van Gool. Dlow: Domain flow for adaptation and generalization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2477-2486, 2019. +[12] 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. +[13] Raghuraman Gopalan, Ruonan Li, and Rama Chellappa. Domain adaptation for object recognition: An unsupervised approach. In 2011 international conference on computer vision, pages 999-1006. IEEE, 2011. + +[14] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Scholkopf, and Alexander Smola. A kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723-773, 2012. +[15] Philip Haeusser, Thomas Frerix, Alexander Mordvintsev, and Daniel Cremers. Associative domain adaptation. In Proceedings of the IEEE International Conference on Computer Vision, pages 2765-2773, 2017. +[16] 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. +[17] 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. +[18] Lanqing Hu, Meina Kan, Shiguang Shan, and Xilin Chen. Duplex generative adversarial network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1498-1507, 2018. +[19] Guoliang Kang, Lu Jiang, Yi Yang, and Alexander G Hauptmann. Contrastive adaptation network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4893-4902, 2019. +[20] Guoliang Kang, Liang Zheng, Yan Yan, and Yi Yang. Deep adversarial attention alignment for unsupervised domain adaptation: the benefit of target expectation maximization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 401-416, 2018. +[21] 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. +[22] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. +[23] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I. Jordan. Learning transferable features with deep adaptation networks. arXiv preprint arXiv:1502.02791, 2015. +[24] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In Advances in Neural Information Processing Systems, pages 1647-1657, 2018. +[25] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 2208-2217. JMLR.org, 2017. +[26] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. +[27] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. + +[28] Jie Ni, Qiang Qiu, and Rama Chellappa. Subspace interpolation via dictionary learning for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 692-699, 2013. +[29] Sinno Jialin Pan, Ivor W Tsang, James T Kwok, and Qiang Yang. Domain adaptation via transfer component analysis. IEEE Transactions on Neural Networks, 22(2):199-210, 2011. +[30] Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adaptation. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. +[31] Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. Visda: The visual domain adaptation challenge, 2017. +[32] Pedro O Pinheiro. Unsupervised domain adaptation with similarity learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8004-8013, 2018. +[33] Paolo Russo, Fabio M Carlucci, Tatiana Tommasi, and Barbara Caputo. From source to target and back: symmetric bi-directional adaptive gan. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8099-8108, 2018. +[34] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In European conference on computer vision, pages 213-226. Springer, 2010. +[35] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3723-3732, 2018. +[36] Swami Sankaranarayanan, Yogesh Balaji, Carlos D Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8503-8512, 2018. +[37] Kihyuk Sohn, Sifei Liu, Guangyu Zhong, Xiang Yu, Ming-Hsuan Yang, and Manmohan Chandraker. Unsupervised domain adaptation for face recognition in unlabeled videos. In Proceedings of the IEEE International Conference on Computer Vision, pages 3210-3218, 2017. +[38] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European Conference on Computer Vision, pages 443-450. Springer, 2016. +[39] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In Proceedings of the IEEE International Conference on Computer Vision, pages 4068-4076, 2015. +[40] 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. +[41] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5018-5027, 2017. + +[42] Riccardo Volpi, Pietro Morierio, Silvio Savarese, and Vittorio Murino. Adversarial feature augmentation for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5495-5504, 2018. +[43] Shuhui Wang, Shuqiang Jiang, Qingming Huang, and Qi Tian. Multi-feature metric learning with knowledge transfer among semantics and social tagging. In 2012 IEEE conference on computer vision and pattern recognition, pages 2240-2247. IEEE, 2012. +[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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2272-2281, 2017. +[45] Jun Yang, Rong Yan, and Alexander G Hauptmann. Cross-domain video concept detection using adaptive svms. In Proceedings of the 15th ACM international conference on Multimedia, pages 188-197, 2007. +[46] Yang Zhang, Philip David, and Boqing Gong. Curriculum domain adaptation for semantic segmentation of urban scenes. In Proceedings of the IEEE International Conference on Computer Vision, pages 2020-2030, 2017. +[47] Yuchen Zhang, Tianle Liu, Mingsheng Long, and Michael Jordan. Bridging theory and algorithm for domain adaptation. In International Conference on Machine Learning, pages 7404-7413, 2019. +[48] Yabin Zhang, Hui Tang, Kui Jia, and Mingkui Tan. Domain-symmetric networks for adversarial domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5031-5040, 2019. +[49] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2223-2232, 2017. +[50] Junbao Zhuo, Shuhui Wang, Shuhao Cui, and Qingming Huang. Unsupervised open domain recognition by semantic discrepancy minimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 750-759, 2019. +[51] Junbao Zhuo, Shuhui Wang, Weigang Zhang, and Qingming Huang. Deep unsupervised convolutional domain adaptation. In Proceedings of the 25th ACM international conference on Multimedia, pages 261-269. ACM, 2017. \ No newline at end of file diff --git a/graduallyvanishingbridgeforadversarialdomainadaptation/images.zip b/graduallyvanishingbridgeforadversarialdomainadaptation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3d4b67369d137facd66942b6ed5fa6189c3365f5 --- /dev/null +++ b/graduallyvanishingbridgeforadversarialdomainadaptation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f90911362bd040533bf82f97b15f8f66eb120850f740517a6e0064cae31efb73 +size 810733 diff --git a/graduallyvanishingbridgeforadversarialdomainadaptation/layout.json b/graduallyvanishingbridgeforadversarialdomainadaptation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0526f0277f0ffe318386f3f3f29e91fd8bcc8dcf --- /dev/null +++ b/graduallyvanishingbridgeforadversarialdomainadaptation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:263cdec4de8f825e67a0b111fe4251470502f78c1bcce234d7b3811de925c994 +size 425848 diff --git a/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_content_list.json b/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ae348ae6430a267896e258e0a4771f0706a77bee --- /dev/null +++ b/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1c17cf559101ce3572942d3987e2e76efc5964d5c3b4ceb162282bd5d25a0c2 +size 75518 diff --git a/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_model.json b/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cff037efb324be23be4da64b675c66f1f5855a13 --- /dev/null +++ b/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db14603cb1d7b98d4798d103c05b10125a5c30a1455db049fa43d010959b8704 +size 90476 diff --git a/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_origin.pdf b/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..65010f457a26dc8cb00e1c816e2b4a6ba0829f5b --- /dev/null +++ b/graphembeddedposeclusteringforanomalydetection/370bf32c-3fef-4ac6-9515-7af403bda86e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a3fe8bc132ff94f7690dae05c4849790e3179c63e3259866b4a44a3e18be6bc +size 481904 diff --git a/graphembeddedposeclusteringforanomalydetection/full.md b/graphembeddedposeclusteringforanomalydetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..967b8bf80c6820a734ae93b9c60f83ef7fe2b147 --- /dev/null +++ b/graphembeddedposeclusteringforanomalydetection/full.md @@ -0,0 +1,329 @@ +# Graph Embedded Pose Clustering for Anomaly Detection + +Amir Markovitz1, Gilad Sharir2, Itamar Friedman2, Lihi Zelnik-Manor2, and Shai Avidan1 + +$^{1}$ Tel-Aviv University, Tel-Aviv, Israel $^{2}$ Alibaba Group + +markovitz2@mail, avidan@eng}.tau.ac.il, {first.last}@alibaba-inc.com + +# Abstract + +We propose a new method for anomaly detection of human actions. Our method works directly on human pose graphs that can be computed from an input video sequence. This makes the analysis independent of nuisance parameters such as viewpoint or illumination. We map these graphs to a latent space and cluster them. Each action is then represented by its soft-assignment to each of the clusters. This gives a kind of "bag of words" representation to the data, where every action is represented by its similarity to a group of base action-words. Then, we use a Dirichlet process based mixture, that is useful for handling proportional data such as our soft-assignment vectors, to determine if an action is normal or not. + +We evaluate our method on two types of data sets. The first is a fine-grained anomaly detection data set (e.g. ShanghaiTech) where we wish to detect unusual variations of some action. The second is a coarse-grained anomaly detection data set (e.g., a Kinetics-based data set) where few actions are considered normal, and every other action should be considered abnormal. + +Extensive experiments on the benchmarks show that our method1 performs considerably better than other state of the art methods. + +# 1. Introduction + +Anomaly detection in video has been investigated extensively over the years. This is because the amount of video captured far surpasses our ability to manually analyze it. Anomaly detection algorithms are designed to help human operators deal with this problem. The question is how to define anomalies and how to detect them. + +The decision of whether an action is normal or not is nuanced. In some cases, we are interested in detecting abnormal variations of an action. For example, an abnormal type of walking. We term this fine-grained anomaly detection. In other cases, we might be interested in defining nor + +mal actions and regard any other action as abnormal. For example, we might be interested in determining that dancing is normal, while gymnastics are abnormal. We call this coarse-grained anomaly detection. + +We desire an algorithm that can handle both types of anomaly detection in a single, unified fashion. Such an algorithm should take as input an unlabeled set of videos that capture normal actions only (fine- or coarse-grained) and use that to train a model that will distinguish normal from abnormal actions. + +We take advantage of the recent progress in human pose estimation and assume our algorithm takes human pose graphs as input. This offers several advantages. First, it abstracts the problem and lets the algorithm focus on human pose and not on irrelevant features such as viewing direction, illumination, or background clutter. In addition, a human pose can be represented as a compact graph, which makes analyzing, training and testing much faster. + +Given a sequence of video frames, we use a pose estimation method to extract the keypoints of every person in each frame. Every person in a clip is represented as a temporal pose graph. We use a combination of an autoencoder and a clustering branch to map the training samples into a latent space where samples are soft clustered. Each sample is then represented by its soft-assignment to each of the $k$ clusters. This can be understood as learning a bag-of-words representation for actions. Each cluster corresponds to an action-word, and each action is represented by its similarity to each of the action-words. Figure 1 gives an overview of our method. + +The soft-assignment vectors capture proportional data and the tool to measure their distribution is the Dirichlet Process Mixture Model. Once we fit the model to the data, we can obtain a normality score for each sample and determine if the action is to be classified as normal or not. + +The algorithm thus consists of a series of abstractions. Using human pose graphs eliminates the need to deal with viewpoint and illumination changes. And the soft-assignment representation abstracts the type of data (fine-grained or coarse-grained) from the Dirichlet model. + +![](images/2fe8eeda6215849bf823aff89e0b12fe37bd48725b38db0af1c4b5bbcaf9536b.jpg) +Figure 1. Model Diagram (Inference Time): To score a video, we first perform pose estimation. The extracted poses are encoded using the encoder part of a Spatio-temporal graph autoencoder (ST-GCAE), resulting in a latent vector. The latent vector is soft-assigned to clusters using a deep clustering layer, with $p_{ik}$ denoting the probability of sample $\mathbf{x}_i$ being assigned to cluster $k$ . + +We evaluate our algorithm in two settings. The first is the ShanghaiTech Campus [16] dataset, a large and extensively evaluated anomaly detection benchmark. This is a typical (fine-grained) anomaly detection benchmark in which normal behavior is taken to be walking, and the goal is to detect abnormal events, such as people running, fighting, riding bicycles, throwing objects, etc. + +The second is a new problem setting we propose, and denote Coarse-grained anomaly detection. Instead of focusing on a single action (i.e., walking), as in the ShanghaiTech dataset, we construct a training set consisting of a varying number of actions that are to be regarded as normal. For example, the training set may consist of video clips of different dancing styles. At test time, every dance video should be classified as normal, while any other action should be classified as abnormal. + +We demonstrate this new, challenging, Coarse-grained anomaly detection setting on two action classification datasets. First is the NTU-RGB+D dataset, where 3D body joints are detected using Kinect. Second is a larger and more challenging dataset that consists of 250 out of the 400 actions in the Kinetics400 dataset2. For both datasets, we use a subset of the actions to define a training set of normal actions and use the rest of the videos to test if the algorithm can correctly distinguish normal from abnormal videos. + +We conduct extensive experiments, compare to a number of competing approaches and find that our algorithm outperforms all of them. + +To summarize, we propose three key contributions: + +- The use of embedded pose graphs and a Dirichlet process mixture for video anomaly detection; +- A new coarse-grained setting for exploring broader aspects of video anomaly detection; +- State-of-the-art AUC of 0.761 for the ShanghaiTech Campus anomaly detection benchmark. + +# 2. Background + +# 2.1. Video Anomaly Detection + +The field of anomaly detection is broad and has a large variation in setting and assumptions, as is evident by the different datasets proposed to evaluate methods in the field. + +For our fine-grained experiment, we use the ShanghaiTech Campus dataset [16]. Containing 130 anomalous events in 13 different scenes, with various camera angles and lighting conditions, it is more diverse and significantly larger than all previous common datasets. It is presented in detail in section 4.1. + +In recent years, numerous works tackled the problem of anomaly detection in video using deep learning based models. Those could be roughly categorized into reconstructive models, predictive models, and generative models. + +Reconstructive models learn a feature representation for each sample and attempt to reconstruct a sample based on that embedding, often using Autoencoders [1, 6, 10]. Predictive model based methods aim to model the current frame based on a set of previous frames, often relying on recurrent neural networks [15, 16, 17] or 3D convolutions [21, 29]. In some cases, reconstruction-based models are combined with prediction based methods for improved accuracy [29]. In both cases, samples poorly reconstructed or predicted are considered anomalous. + +Generative models were also used to reconstruct, predict or model the distribution of the data, often using Variational Autoencoders (VAEs) [3] or GANs [2, 14, 19, 20]. + +A method proposed by Liu et al. [13] uses a generative future frame prediction model and compares a prediction with its ground truth by evaluating differences in gradient-based features and optic flow. This method requires optic flow computation and generating a complete scene, which makes it costly and less robust to large scenery changes. + +Recently, Morais et al. [18] proposed an anomaly detection method using a fully connected RNN to analyze pose + +sequences. The method embeds a sequence, then uses reconstruction and prediction branches to generate past and future poses, respectively. Anomaly score is determined by the reconstruction and prediction errors of the model. + +# 2.2. Graph Convolutional Networks + +To represent human poses as graphs, the inner-graph relations are described using weighted adjacency matrices. Each matrix could be static or learnable and represent any kind of relation. + +In recent years, many approaches were proposed for applying deep learning based methods to graph data. Kipf and Welling [12] proposed the notion of Fast Approximate Convolutions On Graphs. Following Kipf and Welling, both temporal and multiple adjacency extensions were proposed. Works by Yan et al. [27] and Yu et al. [28] proposed temporal extensions, with the former work proposing the use of separable spatial and temporal graph convolutions (ST-GCN), applied sequentially. We follow the basic ST-GCN block design, illustrated in Figure 2. + +Veličković et al. [24] proposed Graph Attention Networks, a GCN extension in which the weighting of neighboring nodes are inferred using an attention mechanism, relying on a fixed adjacency matrix only to determine neighboring nodes. + +Shi et al. [23] recently extended the concept of spatiotemporal graph convolutions by using several adjacency matrices, of which some are learned or inferred. Inferred adjacency is determined using an embedded similarity measure, optimized during training. Adjacency matrices are summed prior to applying the convolution. + +# 2.3. Deep Clustering Models + +Deep clustering methods aim to provide useful cluster assignments by optimizing a deep model under a cluster inducing objective. For example, several recent methods jointly embed and cluster data using unsupervised representation learning methods, such as autoencoders, with clustering modules [5, 8, 25, 26]. + +A method proposed by Xie et al. [26], denoted Deep Embedded Clustering (DEC), proposed an alternating two-step approach. In the first step, a target distribution is calculated using the current cluster assignments. In the next step, the model is optimized to provide cluster assignments similar to the target distribution. Recent extensions tackled DEC's susceptibility to degenerate solutions using regularization methods and various post-processing means [8, 9]. + +# 3. Method + +We design an anomaly detection algorithm that can operate in a number of different scenarios. The algorithm consists of a sequence of abstractions that are designed to help + +each step of the algorithm work better. First, we use a human pose detector on the input data. This abstracts the problem and prevents the next steps from dealing with nuisance parameters such as viewpoint or illumination changes. + +Human actions are represented as space-time graphs and we embed (sub-sections 3.1, 3.2) and cluster (sub-section 3.3) them in some latent space. Each action is now represented as a soft-assignment vector to a group of base actions. This abstracts the underlying type of actions (i.e., fine-grained or coarse-grained), leading to the final stage of learning their distribution. The tool we use for learning the distribution of soft-assignment vectors is the Dirichlet process mixture (sub-section 3.4), and we fit a model to the data. This model is then used to determine if an action is normal or not. + +# 3.1. Feature Extraction + +We wish to capture the relations between body joints, while at the same time provide robustness to external factors such as appearance, viewpoint and lighting. Therefore, we represent a person's pose with a graph. + +Each node of the graph corresponds to a keypoint, a body joint, and each edge represents some relation between two nodes. Many keypoint relations exist, such as physical relations defined anatomically (e.g. the left wrist and elbow are connected) and action relations defined by movements that tend to be highly correlated in the context of a certain action (e.g. the left and right knees tend to move in opposite directions while running). The directions of the graph rise from the fact that some relations are learned during the optimization process and are not symmetric. A nice bonus with this representation is being compact, which is very important for efficient video analysis. + +In order to extend this formulation temporally, pose keypoints extracted from a video sequence are represented as a temporal sequence of pose graphs. The temporal pose graph is a time series of human joint locations. Temporal domain adjacency could be similarly defined by connecting joints in successive frames, allowing us to perform graph convolution operations exploiting both spatial and temporal dimensions of our sequence of pose graphs. + +We propose a deep temporal graph autoencoder based architecture for embedding the temporal pose graphs. Building on the basic block design of ST-GCN, presented in Figure 2, we substitute the basic GCN operator with a novel Spatial Attention Graph Convolution, presented next. + +We use this building block to construct a Spatio-Temporal Graph Convolutional Auto-Encoder, or STGCAE. We use ST-GCAE to embed the spatio-temporal graph and take the embedding to be the starting point for our clustering branch. + +![](images/89a7b6889e316fcb98fe51e7b90eb56860a2c7787e178ddeb165639d0e14bf8d.jpg) +Figure 2. Spatio-Temporal Graph Convolution Block: The basic block used for constructing ST-GCAE. A spatial attention graph convolution (Figure 3) is followed by a temporal convolution and batch normalization. A residual connection is used. + +# 3.2. Spatial Attention Graph Convolution + +We propose a new graph operator, presented in Figure 3, that uses adjacency matrices of three types: Static, Globally-learned and Inferred (attention-based). Each adjacency type is applied with its own GCN, using separate weights. The outputs from the GCNs are stacked in the channel dimension. A $1 \times 1$ convolution is applied as a learnable reduction measure for weighting the stacked outputs, and provides the required output channel number. + +The three adjacency matrices capture different aspects of the model: (i) The use of body-part connectivity as a prior over node relations, represented using the static adjacency matrix. (ii) Dataset level keypoint relations, captured by the global adjacency matrix, and (iii) Sample specific relations, captured by inferred adjacency matrices. Finally, the learnable reduction measure weights the different outputs. + +The static adjacency $A$ is fixed and shared by all layers. The globally-learnable matrix $B$ is learned individually at each layer, and applied equally to all samples during the forward pass. The inferred adjacency matrices $C$ are based on an attention mechanism that uses learned weights to calculate a sample specific adjacency matrix, a different one for every sample in a batch. For example, for a batch of size $N$ of graphs with $V$ nodes, the inferred adjacency size is $[N, V, V]$ , while other adjacencies are $[V, V]$ matrices. + +The globally-learned adjacency is learned by initializing a fully-connected graph, with a complete, uniform, adjacency matrix. The matrix is jointly optimized with the rest of the model's parameters during training. The computational overhead of this adjacency is small for graphs containing no more than a few dozen nodes. + +An inferred adjacency matrix is constructed using a graph self-attention layer. After evaluating a few attention models we chose a simple multiplicative attention mechanism. First, we embed the input twice, using two sets of learned weights. We then transpose one of the embedded matrices and take the dot product between the two and normalize. We then get the inferred adjacency matrix. The attention mechanism chosen is modular and may be replaced with other common alternatives. Further details are provided in the supplementary material. + +![](images/fdd5c3911d3af3f826517fa8dfee3aed47b1f685edf2a74e2b1f08b46cc51412.jpg) +Figure 3. Spatial-Attention Graph Convolution: A zoom into our spatial graph convolving operator, comprised of three GCN [12] operators: One using a hard-coded physical adjacency matrix $(A)$ , the second using a global adjacency matrix learned during training $(B)$ , and the third using an adjacency matrix inferred using an attention submodule $(C)$ . A residual connection is used. GCN modules include batch normalization and ReLU activation, omitted for readability. + +# 3.3. Deep Embedded Clustering + +To build our dictionary of underlying actions, we take the training set samples and jointly embed and cluster them in some latent space. Each sample is then represented by its assignment probability to each of the underlying clusters. The objective is selected to provide distinct latent clusters, over which actions reside. + +We adapt the notion of Deep Embedded Clustering [26] for clustering temporal graphs with our ST-GCAE architecture. The proposed clustering model consists of three parts, an encoder, a decoder, and a soft clustering layer. + +Specifically, our ST-GCAE model maintains the graph's structure but uses large temporal strides with an increasing channel number to compress an input sequence to a latent vector. The decoder uses temporal up-sampling layers and additional graph convolutional blocks, for gradually restoring original channel count and temporal dimension. + +The ST-GCAE's embedding is the starting point for clustering the data. The initial reconstruction based embedding is fine-tuned during our clustering optimization stage to reach the final clustering optimized embedding. + +For each input sample $\mathbf{x}_i$ , we denote the encoder's latent embedding by $\mathbf{z}_i$ , and the soft cluster assignment calculated using the clustering layer by $\mathbf{y}_i$ . We denote the clustering layer's parameters by $\Theta$ . The probability $p_{ik}$ for the $i$ -th sample to be assigned to the $k$ -th cluster is: + +$$ +p _ {i k} = \Pr (y _ {i} = k | \mathbf {z} _ {i}, \Theta) = \frac {\exp \left(\boldsymbol {\theta} _ {k} ^ {T} \mathbf {z} _ {i}\right)}{\sum_ {k ^ {\prime} = 1} ^ {K} \exp \left(\boldsymbol {\theta} _ {k ^ {\prime}} ^ {T} \mathbf {z} _ {i}\right)}. \tag {1} +$$ + +We adopt the clustering objective and optimization algorithm proposed by [26]. The clustering objective is to minimize the KL divergence between the current model probabilistic clustering prediction $P$ and a target distribution $Q$ : + +$$ +L _ {\text {c l u s t e r}} = K L (Q | | P) = \sum_ {i} \sum_ {k} q _ {i k} \log \frac {q _ {i k}}{p _ {i k}}. \tag {2} +$$ + +The target distribution aims to strengthen current cluster assignments by normalizing and pushing each value closer to a value of either 0 or 1. Recurrent application of the function transforming $P$ to $Q$ will eventually result in a hard assignment vector. Each member of the target distribution is calculated using the following equation: + +$$ +q _ {i k} = \frac {p _ {i k} / \left(\sum_ {i ^ {\prime}} p _ {i ^ {\prime} k}\right) ^ {\frac {1}{2}}}{\sum_ {k ^ {\prime}} p _ {i k ^ {\prime}} / \left(\sum_ {i ^ {\prime}} p _ {i ^ {\prime} k ^ {\prime}}\right) ^ {\frac {1}{2}}}. \tag {3} +$$ + +The clustering layer is initialized by the K-means centroids calculated for the encoded training set. Optimization is done in Expectation-Maximization (EM) like fashion. During the Expectation step, the entire model is fixed and, the target distribution $Q$ is updated. During the Maximization stage, the model is optimized to minimize the clustering loss, $L_{cluster}$ . + +# 3.4. Normality Scoring + +This model supports two types of multimodal distributions. One is at the cluster assignment level; the other is at the soft-assignment vector level. For example, an action may be assigned to more than one cluster (cluster-level assignment), leading to a multimodal soft-assignment vector. The soft-assignment vectors themselves (that capture actions) can be modeled by a multimodal distribution as well. + +The Dirichlet process mixture model (DPMM) is a useful measure for evaluating the distribution of proportional data. It meets our required setup: (i) An estimation (fitting) phase, during which a set of distribution parameters is evaluated, and (ii) An inference stage, providing a score for each embedded sample using the fitted model. A thorough overview of the model is given by Blei and Jordan [4]. + +The DPMM is a common mixture extension to the unimodal Dirichlet distribution and uses the Dirichlet Process, an infinite-dimensional extension of the Dirichlet distribution. This model is multimodal and able to capture each mode as a mixture component. A fitted model has several modes, each representing a set of proportions that correspond to one normal behavior. At test time, each sample is scored by its log probability using the fitted model. Further explanations and discussion on the use of DPMM are available in [4, 7]. + +# 3.5. Training + +The training phase of the model consists of two stages, a pre-training stage for the autoencoder, in which the clustering branch of the network remains unchanged, and a fine-tuning stage in which both embedding and clustering are optimized. In detail: + +Pre-Training: the model learns to encode and reconstruct a sequence by minimizing a reconstruction loss, de + +noted $L_{rec}$ , which is an $L_{2}$ loss between the original temporal pose graphs and those reconstructed by ST-GCAE. + +Fine-Tuning: the model optimizes a combined loss function consisting of both the reconstruction loss and a clustering loss. Optimization is done such that the clustering layer is optimized w.r.t. $L_{\text{cluster}}$ , the decoder is optimized w.r.t. $L_{\text{rec}}$ and the encoder is optimized w.r.t. both. The initialization of the clustering layer is done via $K$ -means. As shown by [8], while the encoder is optimized w.r.t. to both losses, the decoder is kept and acts as a regularizer for maintaining the embedding quality of the encoder. The combined loss for this stage is: + +$$ +L _ {\text {c o m b i n e d}} = L _ {\text {r e c}} + \lambda \cdot L _ {\text {c l u s t e r}}. \tag {4} +$$ + +# 4. Experiments + +We evaluated our model in two different settings, using three datasets. The first setting is the common video anomaly detection setting, which we denote as the Fine-grained setting. In this setting, the normal sample consists of a single class and we seek to find fine-grained variations compared to it. For this setting, we use the ShanghaiTech Campus dataset. The second is our new problem setting, which we denote Coarse-grained anomaly detection, in which we seek to find abnormal actions that are different from those defined as normal. + +# 4.1. ShanghaiTech Campus + +Dataset The ShanghaiTech Campus dataset [16] is one of the largest and most diverse datasets available for video anomaly detection. Presenting mostly person-based anomalies, it contains 130 abnormal events captured in 13 different scenes with complex lighting conditions and camera angles. Clips contain any number of people, from no people at all to over 20 people. The dataset contains over 300 untrimmed training and 100 untrimmed testing clips ranging from 15 seconds to over a minute long. + +Experimental Setting An experiment is comprised of two data splits, a training split containing normal examples only and a test split containing both normal and abnormal examples. Training is conducted solely using the training split. A score is calculated for each frame individually, and the combined score is the area under ROC curve for the concatenation of all frame scores in the test set. + +We evaluate video streams of unknown length using a sliding-window approach. We split the input pose sequence to fixed-length, overlapping segments and score each individually. For clips with more than a single person, each person is scored individually. The maximal score over all the people in the frame is taken. As the ShanghaiTech Campus dataset is not annotated for pose, we use a 2D pose estimation model to extract human pose from every clip. + +
ShanghaiTech Campus
Luo et al. [16]0.680
Abati et al. [1]0.725
Liu et al. [13]0.728
Morais et al. [18]0.734
Ours - Pose0.752
Ours - Patches0.761
+ +Table 1. Fine-Grained Anomaly Detection Results: Scores represent frame level AUC. [18] uses keypoint coordinates as input. + +We also evaluate our model using patch embeddings as input features instead of keypoint coordinates. Patches of pixel RGB data are cropped from around each keypoint. The patches are embedded using a CNN and patch feature vectors are used to embed each keypoint. All other aspects of the models are kept the same. + +Given the use of a pose estimation model, the patch embedding may be taken from one of the pose estimation model's hidden layers, requiring no additional computation compared to the coordinate-based variant, other than increased dimension for the input layer. Further details regarding this variant of our model, implementation, and the pose estimation method used are available in the supplemental material. + +Evaluation We follow the evaluation protocol of Luo et al. [16] and report the Area under ROC Curve (AUC) for our model in Table 1. 'Pose' denotes the use of keypoint coordinates as the initial graph node embedding. 'Patch' denotes the use of patch embeddings vectors, as discussed in this section. Our model outperforms previous state of the art methods, both pose and pixel based, by a large margin. + +# 4.2. Coarse-Grained Anomaly Detection + +# 4.2.1 Experimental Setting + +For our second setting of Coarse-Grained Anomaly Detection, a model is trained using a sample of a few action classes considered normal. Training is done without labels, in an unsupervised manner. The model is evaluated by its ability to tell whether a new unseen clip belongs to any of the actions that make up the normal sample. For this setting, we adopt two action recognition datasets to our needs. This gives us great flexibility and control over the type of normal/abnormal actions that we want to detect. The datasets are NTU-RGB+D and Kinetics-250 that are provided with clip level action labels. + +In this setting, we first select 3-5 action classes and denote them our split. Classes are grouped into two sets of samples, split samples, and non-split samples. All labels are dropped. No labels are used beyond this point, except for the final evaluation phase. + +We conduct two complementary experiments. Few vs. Many where there are few normal actions (say 3-5) in the training set and many (tens or even hundreds) actions that are denoted abnormal in the test set. We then repeat the experiment but switch roles of the train and test sets and denote this as Many vs. Few. + +We repeat the above experiments for two types of splits. The first kind, termed random splits, is made of sets of 3-5 classes selected at random from each dataset. The second, which we call meaningful splits, is made of action splits that are subjectively grouped following some binding logic regarding the action's physical or environmental properties. A sample of meaningful and random splits is provided in Table 3. We use 10 random and 10 meaningful splits for evaluating each dataset. + +# 4.2.2 Methods Evaluated + +We compare our algorithm to several anomaly detection algorithms. All algorithms but the last one are unsupervised: + +Autoencoder reconstruction loss We use the reconstruction loss of our ST-GCAE model. In all experiments, the ST-GCAE reached convergence prior to the deep clustering fine-tuning stage. Further optimization of the ST-GCAE yielded no consistent improvement in results. + +Autoencoder based one-class SVM We fit a one-class SVM model using the encoded pose sequence representations (denoted $\mathbf{z}_i$ in section 3.3). During test time, the corresponding representation of each sample is scored using the fitted model. + +Video anomaly detection methods We train the Future Frame Prediction model proposed by Liu et al. [13] and the Skeleton Trajectory model proposed by Morais et al. [18] using our various dataset splits. Anomaly scores for each video are obtained by averaging the per-frame scores provided by the model. As the method proposed by Morais et al. only handles 2D pose, it was not applied to the 3D annotated NTU dataset. + +Classifier softmax scores The supervised baseline uses a classifier trained to classify each of the classes from the dataset split. The classifier architecture is based on the one proposed by [27]. To handle the significantly smaller number of samples, we use a shallower variant. For classifier architecture and implementation details, see suppl. + +During the evaluation phase, a sample is passed through the classifier and its softmax output values are recorded. Anomaly score in this method is calculated by either using the softmax vector's max value or by using the Dirichlet normality score from section 3.4, using softmax probabilities as input. We found Dirichlet based scoring to perform better for most cases, and we report results based on it. + +
MethodNTU-RGB+DKinetics-250
Few vs. ManyMany vs. FewFew vs. ManyMany vs. Few
RandomMeaningfulRandomMeaningfulRandomMeaningfulRandomMeaningful
Supervised0.860.830.820.900.770.710.630.82
Rec. Loss0.500.540.530.540.450.460.510.61
OC-SVM0.600.670.600.690.560.560.520.47
Liu et al. [13]0.570.640.560.630.550.600.550.58
Morais et al. [18]----0.570.590.560.58
Ours0.730.820.720.850.650.730.620.74
+ +It is important to note that this method is fundamentally different from our method and the other baselines. The classifier based method is a supervised method, relying on class action labels that were not used by other methods. It is thus not directly comparable and is here for reference only. + +Table 2. Coarse-Grained Experiment Results: Values represent area under the ROC curve (AUC). In bold are the results of the best performing unsupervised method. Underlined is the best method of all. For all experiments $K = 20$ clusters, see section 3.3 for details. It should be noted that AUC=0.50 in case of random choice. + +
Kinetics
Random 1Arm wrestling (6), Crawling baby (77)Presenting weather forecast (254),Surfing crowd (336)
DancingBelly dancing (18), Capoeira (43),Line dancing (75), Salsa (283),Tango (348), Zumba (399)
GymLunge (183), Pull Ups (255), Push Up (260),Situp (305), Squat (330)
NTU-RGB+D
OfficeAnswer phone (28), Play with phone/tablet (29),Typing on a keyboard (30), Read watch (33)
FightingPunching (50), Kicking (51), Pushing (52),Patting on back (53)
+ +Table 3. Split Examples: A subset of the random and meaningful splits used for evaluating Kinetics and NTU-RGB+D datasets. For each split we list the included classes. Numbers in parentheses are the numeric class labels. For a complete list, See suppl. + +# 4.2.3 Datasets + +NTU-RGB+D The NTU-RGB+D dataset by Shahroudy et al. [22] consists of clips showing one or two people performing one of 60 action classes. Classes include both actions of a single person and two-person interactions, captured using static cameras. It is provided with 3D joint measurements that are estimated using a Kinect depth sensor. + +For this dataset, we use a model configuration similar to the one used for the ShanghaiTech experiments, with dimensions adapted for 3D pose. + +Kinetics-250 The Kinetics dataset by Kay et al. [11] is a collection of 400 action classes, each with over 400 clips that are 10 seconds long. The clips were downloaded from YouTube and may contain any number of people that are not guaranteed to be fully visible. + +Since Kinetics was not intended originally for pose estimation, some classes are unidentifiable by human pose extraction methods, e.g., the hair braiding class contains mostly clips focused on arms and heads. For such videos, a full-body pose estimation algorithm will yield zero keypoints for most cases. + +Therefore, we use a subset of Kinetics-400 that is suitable for evaluation using pose sequences. To do that, we turn to the action classification results of [27]. Using their publicly available model we pick a subset of the 250 best-performing action classes, ranked by their top-1 training classification accuracy. The accuracy of the class that had the lowest score is $18\%$ . We denote our subset Kinetics-250. + +Due to the vast size of Kinetics ( $\sim 1000\mathrm{x}$ larger than ShanghaiTech), we used a single GCN for the spatial convolution, using static $A$ adjacency matrices only, and no pooling. This makes this block identical to the one proposed by [27], used for this specific setting only. We quantify the degradation of this variant in the suppl. Kinetics is not annotated for pose and we use a 2D pose estimation model. + +# 4.2.4 Evaluation + +We report Area under ROC Curve (AUC) results in Table 2. As these datasets require clip level annotations, the sliding window approach is not required for our method, and each temporal pose graph is evaluated in a single forward pass, with the highest scoring person taken. + +As can be seen, our algorithm outperforms all four competing (unsupervised) methods, often by a large margin. The algorithm works well in both random and meaningful split modes, as well as in the Few vs. many and Many vs. few settings. Observe, however, that the algorithm works + +![](images/094f9236d6f1d670528e437cc619d9b27f852d7fe957f0c26963d047b911e71c.jpg) +(a) + +![](images/a4e84e2d232e1b6ca93353736ec8c50cf87cc3fbdd5b12689c98236c3f2ef6ae.jpg) +(b) + +![](images/ad702097957b08c56ff59c824e8169950c729be61ff799ea282832d6f7d732f4.jpg) +(c) +Figure 4. Failure Cases, ShanghaiTech: Frames overlayed with extracted pose. In Column (a), the large crowd is occluding the abnormal skater and each other causing multiple misses. Column (b) depicts a cyclist, considered abnormal. Fast movement caused pose estimation failure, preventing detection. Column (c) depicts a vehicle in the frame, which is not addressed by our method. + +better on the meaningful splits (compared to the random splits). We believe this is because meaningful splits share similar patterns. + +The table also reveals the impact of the quality of pose estimation on results. That is, the $NTU-RGB + D$ dataset is cleaner and the human pose is recovered using the Kinect depth sensor. As a result, the estimated poses are more accurate and the results are generally better than the Kinetics-250 dataset. + +# 4.3. Fail Cases + +Figure 4 shows some failure cases. The recovered pose graph is superimposed on the image. As can be seen, there is significant variability in scenes, viewpoints and poses of the people in a single clip. Depicted in column (a), a highly crowded scene causes numerous occlusions and people being partially detected. The large number of partially extracted people causes a large variation in model provided scores, and misses the abnormal skater for multiple frames. + +The two failures depicted in columns (b-c) show the weakness of relying on extracted pose for representing actions in a clip. Column (b) shows a cyclist very partially extracted by the pose estimation method and missed by the model. Column (c) shows a non-person related event, not handled by our model. Here, a vehicle crossing the frame. + +# 4.4. Ablation Study + +We conduct a number of experiments to evaluate the robustness of our model to noisy normal training sets, i.e., having some percentage of abnormal actions present in the training set, presented next. We also conduct experiments to evaluate the importance of key model components and the stages of our clustering approach, presented in the suppl. + +Robustness to Noise In many scenarios, it is impossible to determine whether a dataset contains nothing but normal samples, and some robustness to noise is required. To evaluate the model's robustness to the presence of abnormal examples in the normal training sample, we introduce a vary + +![](images/5a93793fed6686df3d926997a39955e5ee05de74c4a059489a5bc45e003679ba.jpg) +Figure 5. AUC Loss for Training with Noisy Data: Performance of models trained for NTU-RGB+D splits when a percentage of abnormal samples are added at random. The model is robust to significant amount of noise. At $20\%$ , noise surpasses the amount of data for some of the underlying classes making up the split. Different curves denote different dataset splits. + +ing number of abnormal samples chosen at random to the training set. These are taken from the unused abnormal portion of the dataset. Results are presented in Figure 5. Our model is robust and handles a large amount of abnormal data during training with little performance loss. + +For most anomaly detection settings, events occurring at a $5\%$ rate are considered very frequent. Our model loses on average less than $10\%$ of performance when trained with this amount of distractions. When trained with $20\%$ abnormal noise, there is a considerable decline in performance. In this setting, the training set usually consists of 5 classes, so $20\%$ distraction rate may be larger than an individual underlying class. + +# 5. Conclusion + +We propose an anomaly detection algorithm that relies on estimated human poses. The human poses are represented as temporal pose graphs and we jointly embed and cluster them in a latent space. As a result, each action is represented as a soft-assignment vector in latent space. We analyze the distribution of these vectors using the Dirichlet Process Mixture Model. The normality score provided by the model is used to determine if the action is normal or not. + +The proposed algorithm works on both fine-grained anomaly detection, where the goal is to detect variations of a single action (e.g., walking), as well as a new coarse-grained anomaly detection setting, where the goal is to distinguish between normal and abnormal actions. + +Extensive experiments show that we achieve state-of-the-art results on ShanghaiTech, one of the leading (fine-grained) anomaly detection data sets. We also outperform existing unsupervised methods on our new coarse-grained anomaly detection test. + +# References + +[1] Davide Abati, Angelo Porrello, Simone Calderara, and Rita Cucchiara. Latent space autoregression for novelty detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 6 +[2] Samet Akçay, Amir Atapour-Abarghouei, and Toby P Breckon. Skip-ganomaly: Skip connected and adversarially trained encoder-decoder anomaly detection. arXiv preprint arXiv:1901.08954, 2019. 2 +[3] Jinwon An and Sungzoon Cho. Variational autoencoder based anomaly detection using reconstruction probability. Special Lecture on IE, 2:1-18, 2015. 2 +[4] David M Blei and Michael I Jordan. Variational inference for dirichlet process mixtures. Bayesian analysis, 1(1):121-143, 2006. 5 +[5] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In European Conference on Computer Vision, 2018. 3 +[6] Yong Shean Chong and Yong Haur Tay. Abnormal event detection in videos using spatiotemporal autoencoder. Lecture Notes in Computer Science, page 189196, 2017. 2 +[7] Or Dinari, Angel Yu, Oren Freifeld, and John W Fisher III. Distributed mcmc inference in dirichlet process mixture models using julia. In 2019 19th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CC-GRID), pages 518–525, 2019. 5 +[8] Kamran Ghasedi Dizaji, Amirhossein Herandi, Cheng Deng, Weidong Cai, and Heng Huang. Deep clustering via joint convolutional autoencoder embedding and relative entropy minimization. The IEEE International Conference on Computer Vision (ICCV), 2017. 3, 5 +[9] Philip Haeusser, Johannes Plapp, Vladimir Golkov, Elie Aljalbout, and Daniel Cremers. Associative deep clustering: Training a classification network with no labels. In German Conference on Pattern Recognition. Springer, 2018. 3 +[10] Mahmudul Hasan, Jonghyun Choi, Jan Neumann, Amit K. Roy-Chowdhury, and Larry S. Davis. Learning temporal regularity in video sequences. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2 +[11] 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. 7 +[12] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017. 3, 4 +[13] Wen Liu, Weixin Luo, Dongze Lian, and Shenghua Gao. Future frame prediction for anomaly detection - a new baseline. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2, 6, 7 +[14] William Lotter, Gabriel Kreiman, and David Cox. Unsupervised learning of visual structure using predictive generative networks. arXiv preprint arXiv:1511.06380, 2015. 2 +[15] Weixin Luo, Wen Liu, and Shenghua Gao. Remembering history with convolutional LSTM for anomaly detection. + +In 2017 IEEE International Conference on Multimedia and Expo (ICME), pages 439-444. IEEE, 2017. 2 +[16] Weixin Luo, Wen Liu, and Shenghua Gao. A revisit of sparse coding based anomaly detection in stacked rnN framework. In The IEEE International Conference on Computer Vision (ICCV), 2017. 2, 5, 6 +[17] Jefferson Ryan Medel and Andreas Savakis. Anomaly detection in video using predictive convolutional long short-term memory networks. arXiv preprint arXiv:1612.0390, 2016. 2 +[18] Romero Morais, Vuong Le, Truyen Tran, Budhaditya Saha, Moussa Mansour, and Svetha Venkatesh. Learning regularity in skeleton trajectories for anomaly detection in videos. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 6, 7 +[19] Mahdyar Ravanbakhsh, Moin Nabi, Enver Sangineto, Lucio Marcenaro, Carlo Regazzoni, and Nicu Sebe. Abnormal event detection in videos using generative adversarial nets. In The IEEE International Conference on Image Processing (ICIP), 2017. 2 +[20] Mahdyar Ravanbakhsh, Enver Sangineto, Moin Nabi, and Nicu Sebe. Training adversarial discriminators for cross-channel abnormal event detection in crowds, 2017. 2 +[21] Mohammad Sabokrou, Mohsen Fayyaz, Mahmood Fathy, and Reinhard Klette. Deep-cascade: Cascading 3d deep neural networks for fast anomaly detection and localization in crowded scenes. IEEE Transactions on Image Processing, 26(4):1992-2004, 2017. 2 +[22] Amir Shahroudy, Jun Liu, Tian-Tsong Ng, and Gang Wang. Ntu rgb+d: A large scale dataset for 3d human activity analysis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 7 +[23] Lei Shi, Yifan Zhang, Jian Cheng, and Hanqing Lu. Two-stream adaptive graph convolutional networks for skeleton-based action recognition. In CVPR, 2019. 3 +[24] Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph Attention Networks. International Conference on Learning Representations, 2018. 3 +[25] Zhangyang Wang, Shiyu Chang, Jiayu Zhou, Meng Wang, and Thomas S. Huang. Learning a task-specific deep architecture for clustering. Proceedings of the 2016 SIAM International Conference on Data Mining, Jun 2016. 3 +[26] Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In International conference on machine learning (ICML), 2016. 3, 4 +[27] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI Conference on Artificial Intelligence, 2018. 3, 6, 7 +[28] Bing Yu, Haoteng Yin, and Zhanxing Zhu. Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, Jul 2018. 3 +[29] Yiru Zhao, Bing Deng, Chen Shen, Yao Liu, Hongtao Lu, and Xian-Sheng Hua. Spatio-temporal autoencoder for video anomaly detection. In Proceedings of the 25th ACM international conference on Multimedia. ACM, 2017. 2 \ No newline at end of file diff --git a/graphembeddedposeclusteringforanomalydetection/images.zip b/graphembeddedposeclusteringforanomalydetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8c2d177fb014fbce104067d883983cedca6ee3a3 --- /dev/null +++ b/graphembeddedposeclusteringforanomalydetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c1b289a20c7d71cce69ff2ba8fde0395560c2cf9aa6e6d585e4a73928aa6011 +size 256445 diff --git a/graphembeddedposeclusteringforanomalydetection/layout.json b/graphembeddedposeclusteringforanomalydetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b76ccdc711a76ed2bdd4e60c295aef431561870c --- /dev/null +++ b/graphembeddedposeclusteringforanomalydetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c4526718c6fc82203e257b80fe02f953f86b7f2f30a9079e4d8befeba7514c8 +size 326769 diff --git a/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_content_list.json b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..57826af09ac584a15ed2a90a10a5df2b49c8f5a4 --- /dev/null +++ b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91356ac76ccfdc7ab7ed90ddee6328832beced964433b1a23c1fdab3c3038eeb +size 76540 diff --git a/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_model.json b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bfde8d3ed8cc22826061986dfceba62b97e9133d --- /dev/null +++ b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4e62d326e658f1a85991ea28ef055ee591ca6b6bc11835257b535ef3f9fe727 +size 96282 diff --git a/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_origin.pdf b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e2b484298f7ed0e4541f7c65d579817aab01440e --- /dev/null +++ b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/9d3e491d-55c4-4ce2-9b0b-7361408d6518_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49920bf3708babdaab834e43a80d078fb96280c4d3941ff780439e48078afca7 +size 830377 diff --git a/graphguidedarchitecturesearchforrealtimesemanticsegmentation/full.md b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fd2602dd8cbad97f90ad3c13d01737bc6870d48e --- /dev/null +++ b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/full.md @@ -0,0 +1,332 @@ +# Graph-guided Architecture Search for Real-time Semantic Segmentation + +Peiwen Lin $^{1,*}$ Peng Sun $^{2,*}$ Guangliang Cheng $^{1}$ Sirui Xie $^{3}$ Xi Li $^{2,\dagger}$ Jianping Shi $^{1,\dagger}$ + +$^{1}$ SenseTime Research $^{2}$ Zhejiang University $^{3}$ University of California, Los Angeles {linpeiwen, chengguangliang, shijianping}@sensetime.com {sunpeng1996, xilizju}@zju.edu.cn srxie@ucla.edu + +# Abstract + +Designing a lightweight semantic segmentation network often requires researchers to find a trade-off between performance and speed, which is always empirical due to the limited interpretability of neural networks. In order to release researchers from these tedious mechanical trials, we propose a Graph-guided Architecture Search (GAS) pipeline to automatically search real-time semantic segmentation networks. Unlike previous works that use a simplified search space and stack a repeatable cell to form a network, we introduce a novel search mechanism with a new search space where a lightweight model can be effectively explored through the cell-level diversity and latency-oriented constraint. Specifically, to produce the cell-level diversity, the cell-sharing constraint is eliminated through the cell-independent manner. Then a graph convolution network (GCN) is seamlessly integrated as a communication mechanism between cells. Finally, a latency-oriented constraint is endowed into the search process to balance the speed and performance. Extensive experiments on Cityscapes and CamVid datasets demonstrate that GAS achieves the new state-of-the-art trade-off between accuracy and speed. In particular, on Cityscapes dataset, GAS achieves the new best performance of $73.5\%$ mIoU with speed of 108.4 FPS on Titan Xp. + +# 1. Introduction + +As a fundamental topic in computer vision, semantic segmentation [26, 51, 9, 7] aims at predicting pixel-level labels for images. Leveraging the strong ability of CNNs [38, 18, 19, 12], many works have achieved remarkable performance on public semantic segmentation benchmarks [13, 15, 4]. To pursue higher accuracy, state-of-the-art models become increasingly larger and deeper, and thus require + +![](images/ba09d81df5b9b089ed8353553333491efb991eb46a1d40d14a1e480d715bc452.jpg) +Figure 1. The inference speed and mIoU for different networks on the Cityscapes test set with only fine training data. Our GAS achieves the state-of-the-art trade-off between speed and performance. The Mark * denotes the speed is remeasured on Titan Xp. Best viewed in color. + +high computational resources and large memory overhead, which makes it difficult to deploy on resource-constrained platforms, such as mobile devices, robotics, self-driving cars, etc. + +Recently, many researches have focused on designing and improving CNN models with light computation cost and satisfactory segmentation accuracy. For example, some works [1, 34] reduce the computation cost via the pruning algorithms, and ICNet [50] uses an image cascade network to incorporate multi-resolution inputs. BiSeNet [47] and DFANet [22] utilize a light-weight backbone to speed up, and is equipped with a well-designed feature fusion or aggregation module to remedy the accuracy drop. To achieve such design, researchers acquire expertise in architecture design through enormous trial and error to carefully balance the accuracy and resource-efficiency. + +To design more effective segmentation networks, some + +researchers have explored automatically neural architecture search (NAS) methods [25, 53, 30, 21, 36, 5, 44] and achieved excellent results. For example, Auto-Deeplab [24] searches cell structures and the downsampling strategy together in the same round. CAS [49] searches an architecture with customized resource constraint and a multi-scale module which has been widely used in semantic segmentation field [9, 51]. + +Particularly, CAS has achieved state-of-the-art segmentation performance in mobile setting [50, 22, 47]. Like the general NAS methods, such as ENAS [36], DARTS [25] and SNAS [44], CAS also searches for two types of cells (i.e. normal cell and reduction cell) and then repeatedly stacks the identical cells to form the whole network. This simplifies the search process, but also increases the difficulties to find a good trade-off between performance and speed due to the limited cell diversity. As shown in Figure 2(a), the cell is prone to learn a complicated structure to pursue high performance without any resource constraint, and the whole network will result in high latency. When a low-computation constraint is applied, the cell structures tend to be over-simplified as shown in Figure 2(b), which may not achieve satisfactory performance. + +Different from the traditional search algorithms with simplified search space, in this paper, we propose a novel search mechanism with new search space, where a lightweight model with high performance can be fully explored through the well-designed cell-level diversity and latency-oriented constraint. On one hand, to encourage the cell-level diversity, we make each cell structure independent, and thus the cells with different computation cost can be flexibly stacked to form a lightweight network in Figure 2(c). In this way, simple cells can be applied to the stage with high computation cost to achieve low latency, while complicated cells can be chosen in deep layers with low computation for high accuracy. On the other hand, we apply a real-world latency-oriented constraint into the search process, through which the searched model can achieve better trade-off between the performance and latency. + +However, simply endowing cells with independence in exploring its own structures enlarges the search space and makes the optimization more difficult, which causes accuracy degradation as shown in Figure 5(a) and Figure 5(b). To address this issue, we incorporate a Graph Convolution Network (GCN) [20] as the communication deliverer between cells. Our idea is inspired by [29] that different cells can be treated as multiple agencies, whose achievement of social welfare may require communication between them. Specifically, in the forward process, starting from the first cell, the information of each cell is propagated to the next adjacent cell with a GCN. Our ablation study exhibits that this communication mechanism tends to guide cells to select less-parametric operations, while achieving the satisf + +![](images/7e43c4293e1eeaef69e00881a87402e531adb240531636802bae798d598d013c.jpg) +Figure 2. (a) The network stacked by complicated cells results in high latency and high performance. (b) The network stacked by simple cells leads to low latency and low performance. (c) The cell diversity strategy, i.e. each cell possesses own independent structure, can flexibly construct the high accuracy lightweight network. Best viewed in color. + +factory accuracy. We name the method as Graph-guided Architecture Search (GAS). + +We conduct extensive experiments on the standard Cityscapes [13] and CamVid [4] benchmarks. Compared to other real-time methods, our method locates in the top-right area in Figure 1, which is the state-of-the-art trade-off between the performance and latency. + +The main contributions can be summarized as follows: + +- We propose a novel search framework, for real-time semantic segmentation, with a new search space in which a lightweight model with high performance can be effectively explored. +- We integrate the graph convolution network seamlessly into neural architecture search as a communication mechanism between independent cells. +- The lightweight segmentation network searched with GAS is customizable in real applications. Notably, GAS has achieved $73.5\%$ mIoU on the Cityscapes test set and 108.4 FPS on NVIDIA Titan Xp with one $769 \times 1537$ image. + +# 2. Related Work + +Semantic Segmentation Methods FCN [26] is the pioneer work in semantic segmentation. To improve the segmentation performance, some remarkable works have utilized various heavy backbones [38, 18, 19, 12] or effective modules to capture multi-scale context information [51, 7, 8]. These outstanding works are designed for high-quality + +![](images/95feca884d428c4d769b45b81ec896bde2c9254d72f30119e9563d85e7d1ff52.jpg) +Figure 3. Illustration of our Graph-Guided Network Architecture Search. In reduction cells, all the operations adjacent to the input nodes are of stride two. (a) The backbone network, it's stacked by a series of independent cells. (b) The GCN-Guided Module (GGM), it propagates information between adjacent cells. $\alpha_{k}$ and $\alpha_{k - 1}$ represent the architecture parameters for cell $k$ and cell $k - 1$ , respectively, and $\alpha_{k}$ is the updated architecture parameters by GGM for cell $k$ . The dotted lines indicate GGM is only utilized in the search progress. Best viewed in color. + +segmentation, which is inapplicable to real-time applications. In terms of efficient segmentation methods, there are two mainstreams. One is to employ relatively lighter backbone (e.g. ENet [34]) or introduce some efficient operations (depth-wise dilated convolution). DFANet [22] utilizes a lightweight backbone to speed up and equips with a cross-level feature aggregation module to remedy the accuracy drop. Another is based on multi-branch algorithm that consists of more than one path. For example, ICNet [50] proposes to use the multi-scale image cascade to speed up the inference. BiSeNet [47] decouples the extraction for spatial and context information using two paths. + +Neural Architecture Search Neural Architecture Search (NAS) aims at automatically searching network architectures. Most existing architecture search works are based on either reinforcement learning [52, 17] or evolutionary algorithm [37, 11]. Though they can achieve satisfactory performance, they need thousands of GPU hours. To solve this time-consuming problem, one-shot methods [2, 3] have been developed to greatly solve the time-consuming problem by training a parent network from which each sub-network can inherit the weights. They can be roughly divided into cell-based and layer-based methods according to the type of search space. For cell-based methods, ENAS [36] proposes a parameter sharing strategy among sub-networks, and DARTS [25] relaxes the discrete architecture distribution as continuous deterministic weights, such that they could be optimized with gradient descent. SNAS [44] proposes novel search gradients that + +train neural operation parameters and architecture distribution parameters in the same round of back-propagation. What's more, there are also some excellent works [10, 32] to reduce the difficulty of optimization by decreasing gradually the size of search space. For layer-based methods, FBNet [42], MnasNet [39], ProxylessNAS [5] use a multi-objective search approach that optimizes both accuracy and real-world latency. + +In the field of semantic segmentation, DPC [6] is the pioneer work by introducing meta-learning techniques into the network search problem. Auto-Deeplab [24] searches cell structures and the downsampling strategy together in the same round. More recently, CAS [49] searches an architecture with customized resource constraint and a multiscale module which has been widely used in semantic segmentation field. And [31] over-parameterises the architecture during the training via a set of auxiliary cells using reinforcement learning. Recently, NAS also has been used in object detection, such as NAS-FPN [16], DetNAS [48] and Auto-FPN [45]. + +Graph Convolution Network Convolutional neural networks on graph-structure data is an emerging topic in deep learning research. Kipf [20] presents a scalable approach for graph-structured data that is based on an efficient variant of convolutional neural networks which operate directly on graphs, for better information propagation. After that, Graph Convolution Networks (GCNs) [20] is widely used in many domains, such as video classification [41] and action recognition [46]. In this paper, we apply the GCNs to + +![](images/dd1e70c1eb947359a72bee72aa3173d70c814b88e2ef32a3260fec655902cc10.jpg) +Figure 4. The structure of cell in our GAS. Each colored edge represents one candidate operation. + +model the relationship of adjacent cells in network architecture search. + +# 3. Methods + +As shown in Figure 3, GAS searches for, with GCN-Guided module (GGM), an optimal network constructed by a series of independent cells. In the search process, we take the latency into consideration to obtain a network with computational efficiency. This search problem can be formulated as: + +$$ +\min _ {a \in \mathcal {A}} L _ {v a l} + \beta * L _ {l a t} \tag {1} +$$ + +where $\mathcal{A}$ denotes the search space, $L_{val}$ and $L_{lat}$ are the validation loss and the latency loss, respectively. Our goal is to search an optimal architecture $a\in \mathcal{A}$ that achieves the best trade-off between the performance and speed. + +In this section, we will describe three main components in GAS: 1) Network Architecture Search; 2) GCN-Guided Module; 3) Latency-Oriented Optimization. + +# 3.1. Network Architecture Search + +As shown in Figure 3(a), the whole backbone takes an image as input which is first filtered with three convolutional layers followed by a series of independent cells. The ASPP [9] module is subsequently used to extract the multiscale context for the final prediction. + +A cell is a directed acyclic graph (DAG) as shown in Figure 4. Each cell has two input nodes $i_1$ and $i_2$ , $N$ ordered intermediate nodes, denoted by $\mathcal{N} = \{x_1, \dots, x_N\}$ , and an output node which outputs the concatenation of all intermediate nodes $\mathcal{N}$ . Each node represents the latent representation (e.g. feature map) in the network, and each directed edge in this DAG represents a candidate operation (e.g. conv, pooling). + +The number of intermediate nodes $N$ is 2 in our work. Each intermediate node takes all its previous nodes as input. In this way, $x_{1}$ has two inputs $I_{1} = \{i_{1},i_{2}\}$ and node $x_{2}$ takes $I_{2} = \{i_{1},i_{2},x_{1}\}$ as inputs. The intermediate nodes $x_{i}$ can be calculated by: + +$$ +x _ {i} = \sum_ {c \in I _ {i}} \widetilde {O} _ {h, i} (c) \tag {2} +$$ + +where $\widetilde{O}_{h,i}$ is the selected operation at edge $(h,i)$ . + +To search the selected operation $\widetilde{O}_{h,i}$ , the search space is represented with a set of one-hot random variables from a fully factorizable joint distribution $p(Z)$ [44]. Concretely, each edge is associated with a one-hot random variable which is multiplied as a mask to the all possible operations $O_{h,i} = (o_{h,i}^{1}, o_{h,i}^{2}, \dots, o_{h,i}^{M})$ in this edge. We denote the one-hot random variable as $Z_{h,i} = (z_{h,i}^{1}, z_{h,i}^{2}, \dots, z_{h,i}^{M})$ where $M$ is the number of candidate operations. The intermediate nodes during search process in such way are: + +$$ +x _ {i} = \sum_ {c \in I _ {i}} \widetilde {O} _ {h, i} (c) = \sum_ {c \in I _ {i}} \sum_ {m = 1} ^ {M} z _ {h, i} ^ {m} o _ {h, i} ^ {m} (c) \tag {3} +$$ + +To make $P(Z)$ differentiable, reparameterization [27] is used to relax the discrete architecture distribution to be continuous: + +$$ +Z _ {h, i} = f _ {\alpha_ {h, i}} \left(G _ {h, i}\right) = \operatorname {s o f t m a x} \left(\left(\log \alpha_ {h, i} + G _ {h, i}\right) / \lambda\right) \tag {4} +$$ + +where $\alpha_{h,i}$ is the architecture parameters at the edge $(h,i)$ , and $G_{h,i} = -\log(-\log(U_{h,i}))$ is a vector of Gumbel random variables, $U_{h,i}$ is a uniform random variable and $\lambda$ is the temperature of softmax. + +For the set of candidate operations $O$ , we only use the following 8 kinds of operations to better balance the speed and performance: + +- $3 \times 3$ max pooling + +- skip connection + +- $3 \times 3$ conv + +- zero operation + +- $3 \times 3$ separable conv + +- $3 \times 3$ dilated separable conv (dilation=2) +- $3 \times 3$ dilated separable conv (dilation=4) +- $3 \times 3$ dilated separable conv (dilation=8) + +# 3.2. GCN-Guided Module + +With cell independent to each other, the inter-cell relationship becomes very important for searching efficiently. We propose a novel GCN-Guided Module (GGM) to naturally bridge the operation information between adjacent cells. The total network architecture of our GGM is shown in Figure 3(b). Inspired by [41], the GGM represents the communication between adjacent cells as a graph and perform reasoning on the graph for information delivery. Specifically, we utilize the similarity relations of edges in adjacent cells to construct the graph where each node represents one edge in cells. In this way, the state changes for previous cell can be delivered to current cell by reasoning on this graph. + +As stated in Section 3.1, let $\alpha_{k}$ represents the architecture parameter matrix for the cell $k$ , and the dimension of $\alpha_{k}$ is $p\times q$ where $p$ and $q$ represents the number of edges and the number of candidate operations respectively. Same for cell $k$ , the architecture parameter $\alpha_{k - 1}$ for cell $k - 1$ also is a $p\times q$ matrix. To fuse the architecture parameter information of previous cell $k - 1$ into the current cell + +$k$ and generate the updated $\alpha_{k}^{\prime}$ , we model the information propagation between cell $k - 1$ and cell $k$ as follows: + +$$ +\alpha_ {k} ^ {\prime} = \alpha_ {k} + \gamma \Phi_ {2} (G (\Phi_ {1} (\alpha_ {k - 1}), A d j)) \tag {5} +$$ + +where $Adj$ represents the adjacency matrix of the reasoning graph between cells $k$ and $k - 1$ , and the function $G$ denotes the Graph Convolution Networks (GCNs) [20] to perform reasoning on the graph. $\Phi_1$ and $\Phi_2$ are two different transformations by 1D convolution. Specifically, $\Phi_1$ maps the original architecture parameter to embedding space and $\Phi_2$ transfers it back into the source space after the GCN reasoning. $\gamma$ controls the fusion of two kinds of architecture parameter information. + +For the function $G$ , we construct the reasoning graph between cell $k - 1$ and cell $k$ by their similarity. Given a edge in cell $k$ , we calculate the similarity between this edge and all other edges in cell $k - 1$ and a softmax function is used for normalization. Therefore, the adjacency matrix $Adj$ of the graph between two adjacent cells $k$ and $k - 1$ can be established by: + +$$ +A d j = \operatorname {S o f t m a x} \left(\phi_ {1} \left(\alpha_ {k}\right) * \phi_ {2} \left(\alpha_ {k - 1}\right) ^ {T}\right) \tag {6} +$$ + +where we have two different transformations $\phi_1 = \alpha_k w_1$ and $\phi_2 = \alpha_{k - 1}w_2$ for the architecture parameters, and parameters $w_{1}$ and $w_{2}$ are both $q\times q$ weights which can be learned via back propagation. The result Adj is a $p\times p$ matrix. + +Based on this adjacency matrix $Adj$ , we use the GCNs to perform information propagation on the graph as shown in Equation 7. A residual connection is added to each layer of GCNs. The GCNs allow us to compute the response of a node based on its neighbors defined by the graph relations, so performing graph convolution is equivalent to performing message propagation on the graph. + +$$ +G \left(\Phi_ {1} \left(\alpha_ {k - 1}\right), A d j\right) = A d j \Phi_ {1} \left(\alpha_ {k - 1}\right) W _ {k - 1} ^ {g} + \Phi_ {1} \left(\alpha_ {k - 1}\right) \tag {7} +$$ + +where the $W_{k - 1}^{g}$ denotes the GCNs weight with dimension $d\times d$ , which can be learned via back propagation. + +The proposed well-designed GGM seamlessly integrates the graph convolution network into neural architecture search, which can bridge the operation information between adjacent cells. + +# 3.3. Latency-Oriented Optimization + +To obtain a real-time semantic segmentation network, we take the real-world latency into consideration during the search process, which orients the search process toward the direction to find an optimal lightweight model. Specifically, we create a GPU-latency lookup table [5, 42, 49, 39] which records the inference latency of each candidate operation. During the search process, each candidate operation $m$ at + +edge $(h,i)$ will be assigned a cost $lat_{h,i}^{m}$ given by the prebuilt lookup table. In this way, the total latency for cell $k$ is accumulated as: + +$$ +l a t _ {k} = \sum_ {h, i} \sum_ {m = 1} ^ {M} z _ {h, i} ^ {m} l a t _ {h, i} ^ {m} \tag {8} +$$ + +where $z_{h,i}^{m}$ is the softened one-hot random variable as stated in Section 3.1. Given an architecture $a$ , the total latency cost is estimated as: + +$$ +L A T (a) = \sum_ {k = 0} ^ {K} l a t _ {k} \tag {9} +$$ + +where $K$ refers to the number of cells in architecture $a$ . The latency for each operation $lat_{h,i}^{m}$ is a constant and thus total latency loss is differentiable with respect to the architecture parameter $\alpha_{h,i}$ . The total loss function is designed as follows: + +$$ +L (a, w) = C E \left(a, w _ {a}\right) + \beta \log (L A T (a)) \tag {10} +$$ + +where $CE(a, w_{a})$ denotes the cross-entropy loss of architecture $a$ with parameter $w_{a}$ , $LAT(a)$ denotes the overall latency of architecture $a$ , which is measured in microsecond, and the coefficient $\beta$ controls the balance between the accuracy and latency. The architecture parameter $\alpha$ and the weight $w$ are optimized in the same round of backpropagation. + +# 4. Experiments + +In this section, we conduct extensive experiments to verify the effectiveness of our GAS. Firstly, we compare the network searched by our method with other works on two standard benchmarks. Secondly, we perform the ablation study for the GCN-Guided Module and latency optimization settings, and close with an insight about GCN-Guided Module. + +# 4.1. Benchmark and Evaluation Metrics + +Datasets In order to verify the effectiveness and robustness of our method, we evaluate our method on the Cityscapes [13] and CamVid [4] datasets. Cityscapes [13] is a public released dataset for urban scene understanding. It contains 5,000 high quality pixel-level fine annotated images (2975, 500, and 1525 for the training, validation, and test sets, respectively) with size $1024 \times 2048$ collected from 50 cities. The dense annotation contains 30 common classes and 19 of them are used in training and testing. CamVid [4] is another public released dataset with object class semantic labels. It contains 701 images in total, in which 367 for training, 101 for validation and 233 for testing. The images have a resolution of $960 \times 720$ and 11 semantic categories. + +Evaluation Metrics For evaluation, we use mean of class-wise intersection over union (mIoU), network forward time (Latency), and Frames Per Second (FPS) as the evaluation metrics. + +# 4.2. Implementation Details + +We conduct all experiments using Pytorch 0.4 [35] on a workstation, and the inference time in all experiments is reported on one Nvidia Titan Xp GPU. + +The whole pipeline contains three sequential steps: search, pretraining and finetuning. It starts with the search progress on the target dataset and obtains the light-weight architecture according to the optimized $\alpha$ followed by the ImageNet [14] pretraining, and this pretrained model is subsequently finetuned on the specific dataset for 200 epochs. + +In search process, the architecture contains 14 cells and each cell has $N = 2$ intermediate nodes. With the consideration of speed, the initial channel for network is 8. For the training hyper-parameters, the mini-batch size is set to 16. The architecture parameters $\alpha$ are optimized by Adam, with initial learning rate 0.001, $\beta = (0.5, 0.999)$ and weight decay 0.0001. The network parameters are optimized using SGD with momentum 0.9, weight decay 0.001, and cosine learning scheduler that decays learning rate from 0.025 to 0.001. For gumbel softmax, we set the initial temperature $\lambda$ in equation 4 as 1.0, and gradually decrease to the minimum value of 0.03. The search time cost on Cityscapes takes approximately 10 hours with 16 TitanXP GPU. + +For finetuning details, we train the network with minibatch 8 and SGD optimizer with 'poly' scheduler that decay learning rate from 0.01 to zero. Following [43], the online bootstrapping strategy is applied to the finetuning process. For data augmentation, we use random flip and random resize with scale between 0.5 and 2.0. Finally, we randomly crop the image with a fixed size for training. + +For the GCN-guided Module, we use one Graph Convolution Network (GCN) [20] between two adjacent cells, and each GCN contains one layer of graph convolutions. The kernels size of the GCN parameters $W$ in equation 7 is $64 \times 64$ . We set the $\gamma$ as 0.5 in equation 5 in our experiments. + +# 4.3. Real-time Semantic Segmentation Results + +In this part, we compare the model searched by GAS with other existing real-time segmentation methods on semantic segmentation datasets. The inference time is measured on an Nvidia Titan Xp GPU and the speed of other methods reported on Titan Xp GPU in CAS [49] are used for fair comparison. Moreover, the speed is remeasured on Titan Xp if the origin paper reports it on different GPU and is not mentioned in CAS [49]. + +Results on Cityscapes. We evaluate the network searched by GAS on the Cityscapes test set. The validation set is added to train the network before submitting to + +
MethodInput SizemIoU (%)Latency(ms)FPS
FCN-8S [26]512x102465.3227.234.4
PSPNet [51]713x71381.21288.00.78
DeepLabV3* [7]769x76981.3769.231.3
SegNet [1]640x36057.030.333
ENet [34]640x36058.312.778.4
SQ [40]1024x204859.846.021.7
ICNet [50]1024x204869.526.537.7
SwiftNet [33]1024x204875.126.238.1
ESPNet [28]1024x51260.38.2121.7
BiSeNet [47]768x153668.49.52105.8
DFANet A8[22]1024x102471.310.0100.0
DFANet A†[22]11024x102471.319.0152.6
CAS [49]768x153670.59.25108.0
CAS* [49]768x153672.39.25108.0
GAS769x153771.89.22108.4
GAS*769x153773.59.22108.4
+ +Table 1. Comparing results on the Cityscapes test set. Methods trained using both fine and coarse data are marked with $*$ . The mark $\S$ represents the speed on TitanX, and the mark $\dagger$ represents the speed is remeasured on Titan Xp. + +Cityscapes online server. Following [47, 49], GAS takes as an input image with size $769 \times 1537$ that is resized from origin image size $1024 \times 2048$ . Overall, our GAS gets the best performance among all methods with the speed of 108.4 FPS. With only fine data and without any evaluation tricks, our GAS yields $71.8\%$ mIoU which is the state-of-the-art trade-off between performance and speed for real-time semantic segmentation. GAS achieves $73.5\%$ when the coarse data is added into the training set. The full comparison results are shown in Table 1. Compared to BiSeNet [47] and CAS [49] that have comparable speed with us, our GAS surpasses them along multiple performance points with $3.4\%$ and $1.3\%$ , respectively. Compared to other methods such as SegNet [1], ENet [34], SQ [40] and ICNet [50], our method achieves significant improvement in speed while getting performance gain over them about $14.8\%$ , $13.5\%$ , $12.0\%$ , $2.3\%$ , respectively. + +Results on CamVid. We directly transfer the network searched on Cityscapes to Camvid to verify the transferability of GAS. Table 2 shows the comparison results with other methods. With input size $720 \times 960$ , GAS achieves the $72.8\%$ mIoU with 148.0 FPS which is also the state-of-the-art trade-off between performance and speed, which demonstrates the superior transferability of GAS. + +
MethodmIoU (%)Latency(ms)FPS
SegNet [1]55.634.0129.4
ENet [34]51.316.3361.2
ICNet [50]67.128.9834.5
BiSeNet [47]65.6--
DFANet A [22]64.78.33120
CAS [49]71.25.92169
GAS72.86.53153.1
+ +# 4.4. Ablation Study + +To verify the effectiveness of each component in our framework, extensive ablation studies for the GCN-Guided Module and the latency loss are performed. In addition, we also give some insights about the role of GCN-Guided Module in the search process. + +# 4.4.1 Effectiveness of the GCN-Guided Module + +We propose the GCN-Guided Module (GGM) to build the connection between cells. To verify the effectiveness of the GGM, we conduct a series of experiments with different strategies: a) network stacked by shared cell; b) network stacked by independent cell; c) based on strategy-b, using fully connected layer to infer the relationship between cells; d) based on strategy-b, using GGM to infer the relationship between cells. Experimental results are shown in Figure 5. The performance reported here is the average mIoU over five repeated experiments on the Cityscapes validation set with latency loss weight $\beta = 0.005$ . The numbers below the horizontal axis are the average model size of five architectures (e.g. 2.18M) and the purple line is the variance of mIoU for each strategy. Overall, with only independent cell, the performance degrades a lot due to the enlarged search space which makes optimization more difficult. This performance drop is mitigated by adding communication mechanism between cells. Especially, our GCN-Guided Module can bring about $3\%$ performance improvement compared to the fully-connected mechanism (i.e. setting (c)). + +![](images/e325d4e16272bf9ea36a1d9464355dfd19db234b431fa2d25e9d8dfb7b05bedb.jpg) +Figure 5. Ablation study for the effectiveness of GCN-Guided Module on Cityscapes validation dataset. Best viewed in color. + +Comparison against Random Search As discussed in [23], random search is a competitive baseline for hyperparameter optimization. To further verify the effectiveness of GCN-Guided Module, we randomly sample ten architectures from the search space and evaluate them on the Cityscapes validation set with ImageNet pretrained. Specifically, we try two types of random settings in our experiments: a) fully random search without any constraint; b) randomly select the networks that meet the speed requirement about 108 FPS from the search space. The results are shown in Table 3, in which each value is the average result of ten random architectures. In summary, the network searched by GAS can achieve an excellent trade-off between performance and latency, while random search will result in high overhead without any latency constraint or low performance with latency constraint. + +Table 2. Results on the CamVid test set with resulotion $960 \times 720$ . "-" indicates the corresponding result is not provided by the methods. + +
MethodsmIoU (%)FPS
GAS72.3108.2
Random setting (a)69.661.2
Random setting (b)65.8105.6
+ +Dimension Selection The dimension selection of GCN weight $W$ in Equation 7 is also important, thus we conduct experiments with different GCN weight dimensions (denoted by $d$ ). Experimental results are shown in Table 4 in which the values are the average mIoU over five repeated experiments on the Cityscapes validation set with latency loss weight $\beta = 0.005$ . Experimental result indicates that GAS achieves the best performance when $d = 64$ . + +Table 3. Comparison to random search on the Cityscapes validation set. + +
MethodsmIoU (%)FPS
GCN with d = 1671.6108.6
GCN with d = 3271.8102.2
GCN with d = 6472.4108.4
GCN with d = 12872.1104.1
GCN with d = 25671.5111.2
+ +Table 4. Ablation study for different GCN weight dimensions of the GCN-Guided Module. + +Reasoning Graph For GCN-Guided Module, in addition to the way described in Section 3.2, we also try another way to construct the reasoning graph. Specifically, we treat each candidate operation in a cell as a node in the reasoning graph. Given the architecture parameter $\alpha_{k}$ for cell $k$ with dimension $p\times q$ , we first flatten the $\alpha_{k}$ and $\alpha_{k - 1}$ to the one dimensional vector $\alpha_{k}^{\prime}$ and $\alpha_{k - 1}^{\prime}$ , and then perform matrix multiplication to get adjacent matrix $Adj = \alpha_{k}^{\prime}(\alpha_{k - 1}^{\prime})^{T}$ . Different from the "edge-similarity" reasoning graph in Section 3.2, we call this graph "operation-identity" reasoning graph. We conduct the comparison experiment for two + +types of graphs on the Cityscapes validation set under the same latency loss weight $\beta = 0.005$ , the comparison results are shown in Table 5. + +
Reasoning GraphmIoU (%)FPS
Edge-similarity72.4108.4
Operation-identity70.9102.2
+ +Table 5. The comparison results for reasoning graph for edges and operations. + +Intuitively, the "operation-identity" way provides more fine-grained information about operation selection for other cells, while it also breaks the overall properties of an edge, and thus doesn't consider the other operation information at the same edge when making decision. After visualizing the network, we also found that the "operation-identity" reasoning graph tends to make cell select the same operation for all edge, which increases the difficulty of trade-off between performance and latency. This can also be verified from result in Table 5. So we choose the "edge-similarity" way to construct the reasoning graph as described in Section 3.2. + +Network Visualization We illustrate the network structure searched by GAS in the supplementary material. An interesting observation is that the operations selected by GAS with GGM have fewer parameters and less computational complexity than GAS without GGM, where more dilated or separated convolution kernels are preferred. This exhibits the emergence of concept of burden sharing in a group of cells when they know how much others are willing to contribute. + +# 4.4.2 Effectiveness of the Latency Constraint + +As mentioned above, GAS provides the ability to flexibly achieve a superior trade-off between the performance and speed with the latency-oriented optimization. We conducted a series of experiments with different loss weight $\beta$ in Equation 10. Figure 6 shows the variation of mIoU and latency as $\beta$ changes. With smaller $\beta$ , we can obtain a model with higher accuracy, and vice-versa. When the $\beta$ increases from 0.0005 to 0.005, the latency decreases rapidly and the performance is slightly falling. But when $\beta$ increases from 0.005 to 0.05, the performance drops quickly while the latency decline is fairly limited. Thus in our experiments, we set $\beta$ as 0.005. We can clearly see that the latency-oriented optimization is effective for balancing the accuracy and latency. + +# 4.4.3 Analysis of the GCN-Guided Module + +One concern is about what kind of role does GCN play in the search process. We suspect that its effectiveness is derived from the following two aspects: 1) to search a light- + +![](images/8cf6631c5d05fa3e93e2d13a04f84e27a093a12223089f908edcf504d550c68c.jpg) +Figure 6. The validation accuracy on Cityscapes dataset for different latency constraint. Best viewed in color. + +weight network, we do not allow the cell structures to share with each other to encourage structure diversity. Apparently, learning cell independently makes the search more difficult and does not guarantee better performance, thus the GCN-Guided Module can be regraded as a regularization term to the search process. 2) We have discussed that $p(Z)$ is a fully factorizable joint distribution in above section. As shown in Equation 4, $p(Z_{h,i})$ for current cell becomes a conditional probability if the architecture parameter $\alpha_{h,i}$ depends on the probability $\alpha_{h,i}$ for previous cell. In this case, the GCN-Guided Module plays a role to model the condition in probability distribution $p(Z)$ . + +# 5. Conclusion & Discussion + +In this paper, a novel Graph-guided architecture search (GAS) framework is proposed to tackle the real-time semantic segmentation task. Different from the existing NAS approaches that stack the same searched cell into a whole network, GAS explores to search different cell architectures and adopts the graph convolution network to bridge the information connection among cells. In addition, a latency-oriented constraint is endowed into the search process for balancing the accuracy and speed. Extensive experiments have demonstrated that GAS performs much better than the state-of-the-art real-time segmentation approaches. + +In the future, we will extend the GAS to the following directions: 1) we will search networks directly for the segmentation and detection tasks without retraining. 2) we will explore some deeper research on how to effectively combine the NAS and the graph convolution network. + +Acknowledgement This paper is carried out at SenseTime Research in Beijing, China, and is supported by key scientific technological innovation research project by Ministry of Education, Zhejiang Provincial Natural Science Foundation of China under Grant LR19F020004, Zhejiang University K.P.Chao's High Technology Development Foundation. + +# References + +[1] Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE trans. PAMI, 39(12):2481-2495, 2017. +[2] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In ICML, pages 549-558, 2018. +[3] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Smash: one-shot model architecture search through hypernetworks. arXiv:1708.05344, 2017. +[4] Gabriel J. Brostow, Jamie Shotton, Julien Fauqueur, and Roberto Cipolla. Segmentation and recognition using structure from motion point clouds. In ECCV (1), pages 44-57, 2008. +[5] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv:1812.00332, 2018. +[6] 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 NeurIPS, pages 8713-8724, 2018. +[7] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. CoRR, abs/1706.05587, 2017. +[8] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In ECCV, pages 833-851, 2018. +[9] 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. PAMI, 40(4):834-848, 2018. +[10] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. arXiv:1904.12760, 2019. +[11] Yukang Chen, Qian Zhang, Chang Huang, Lisen Mu, Gaofeng Meng, and Xinggang Wang. Reinforced evolutionary neural architecture search. CoRR, abs/1808.00193, 2018. +[12] François Chollet. Xception: Deep learning with depthwise separable convolutions. In CVPR, pages 1800-1807, 2017. +[13] 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, pages 3213-3223, 2016. +[14] 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. +[15] 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. + +[16] Golnaz Ghiasi, Tsung-Yi Lin, Ruoming Pang, and Quoc V Le. Nas-fpn: Learning scalable feature pyramid architecture for object detection. In CVPR, 2019. +[17] Minghao Guo, Zhao Zhong, Wei Wu, Dahua Lin, and Junjie Yan. IRLAS: inverse reinforcement learning for architecture search. CoRR, abs/1812.05285, 2018. +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[19] Gao Huang, Zhuang Liu, and Kilian Q. Weinberger. Densely connected convolutional networks. CVPR, pages 1-9, 2016. +[20] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv:1609.02907, 2016. +[21] Ben Krause, Emmanuel Kahembwe, Iain Murray, and Steve Renals. Dynamic evaluation of neural sequence models. arXiv:1709.07432, 2017. +[22] Hanchao Li, Pengfei Xiong, Haoqiang Fan, and Jian Sun. Dfanet: Deep feature aggregation for real-time semantic segmentation. In CVPR, pages 9522-9531, 2019. +[23] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. In Proceedings of the Thirty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI 2019, Tel Aviv, Israel, July 22-25, 2019, page 129, 2019. +[24] Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan Yuille, and Li Fei-Fei. Auto-deeplab: Hierarchical neural architecture search for semantic image segmentation. In CVPR, 2019. +[25] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: differentiable architecture search. In ICLR, 2019. +[26] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431-3440, 2015. +[27] Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv:1611.00712, 2016. +[28] Sachin Mehta, Mohammad Rastegari, Anat Caspi, Linda Shapiro, and Hannaneh Hajishirzi. Espnet: Efficient spatial pyramid of dilated convolutions for semantic segmentation. In ECCV, pages 552-568, 2018. +[29] Marvin Minsky. The Society of Mind. Simon & Schuster, 1988. +[30] Renato Negrinho and Geoff Gordon. Deeparchitect: Automatically designing and training deep architectures. arXiv:1704.08792, 2017. +[31] Vladimir Nekrasov, Hao Chen, Chunhua Shen, and Ian Reid. Fast neural architecture search of compact semantic segmentation models via auxiliary cells. In CVPR, pages 9126-9135, 2019. +[32] Asaf Noy, Niv Nayman, Tal Ridnik, Nadav Zamir, Sivan Doveh, Itamar Friedman, Raja Giryes, and Lihi Zelnik-Manor. Asap: Architecture search, anneal and prune. arXiv:1904.04123, 2019. +[33] Marin Orsic, Ivan Kreso, Petra Bevandic, and Sinisa Segvic. In defense of pre-trained imagenet architectures for real-time semantic segmentation of road-driving images. CVPR, pages 12599-12608, 2019. + +[34] Adam Paszke, Abhishek Chaurasia, Sanggil Kim, and Eugenio Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation. arXiv:1606.02147, 2016. +[35] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In NIPS, 2019. +[36] Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In ICML, pages 4092-4101, 2018. +[37] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V. Le. Regularized evolution for image classifier architecture search. CoRR, abs/1802.01548, 2018. +[38] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. +[39] 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 CVPR, pages 2820-2828, 2019. +[40] Michael Treml, José Arjona-Medina, Thomas Unterthiner, Rupesh Durgesh, Felix Friedmann, Peter Schuberth, Andreas Mayr, Martin Heusel, Markus Hofmarcher, Michael Widrich, et al. Speeding up semantic segmentation for autonomous driving. In MLITS, NIPS Workshop, volume 2, page 7, 2016. +[41] Xiaolong Wang and Abhinav Gupta. Videos as space-time region graphs. In ECCV, pages 399-417, 2018. +[42] 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 CVPR, pages 10734-10742, 2019. +[43] Zifeng Wu, Chunhua Shen, and Anton van den Hengel. High-performance semantic segmentation using very deep fully convolutional networks. CoRR, abs/1604.04339, 2016. +[44] Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. SNAS: stochastic neural architecture search. In ICLR, 2019. +[45] Hang Xu, Lewei Yao, Wei Zhang, Xiaodan Liang, and Zhenguo Li. Auto-fpn: Automatic network architecture adaptation for object detection beyond classification. In ICCV, 2019. +[46] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI, 2018. +[47] Changqian Yu, Jingbo Wang, Chao Peng, Changxin Gao, Gang Yu, and Nong Sang. Bisenet: Bilateral segmentation network for real-time semantic segmentation. In ECCV, pages 334-349, 2018. +[48] Xiangyu Zhang Gaofeng Meng Xinyu Xiao Jian Sun Yukang Chen, Tong Yang. Detnas: Backbone search for object detection. In NeurIPS, 2019. + +[49] Yiheng Zhang, Zhaofan Qiu, Jingen Liu, Ting Yao, Dong Liu, and Tao Mei. Customizable architecture search for semantic segmentation. In CVPR, pages 11641-11650, 2019. +[50] Hengshuang Zhao, Xiaojuan Qi, Xiaoyong Shen, Jianping Shi, and Jiaya Jia. Icnet for real-time semantic segmentation on high-resolution images. In ECCV, pages 405-420, 2018. +[51] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, pages 2881-2890, 2017. +[52] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017. +[53] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In CVPR, pages 8697-8710, 2018. \ No newline at end of file diff --git a/graphguidedarchitecturesearchforrealtimesemanticsegmentation/images.zip b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cb70dbbae014e5f1f2365020bb5c2cad28629b87 --- /dev/null +++ b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0c51fddd90f77f91e0e0ae020531cf0dcf1a3614c5852e782c51714b2f6ac97 +size 358284 diff --git a/graphguidedarchitecturesearchforrealtimesemanticsegmentation/layout.json b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d0e430e0a76a615f03522cae6293c232e0b3fad5 --- /dev/null +++ b/graphguidedarchitecturesearchforrealtimesemanticsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:445c4fdca2424d4ca92c1d112e226e0c8550688ba504dfec8ba6a7b87c6b59d0 +size 450845 diff --git a/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_content_list.json b/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f69a338228c98eb32330b21edc5852dd29ead7f4 --- /dev/null +++ b/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70ddbe1796279cd544a22b4fceab2c8addded98c2caf788876c02def4849a085 +size 75028 diff --git a/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_model.json b/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ee20825bfe5713c467933e0689d063cf5083dd4e --- /dev/null +++ b/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f989d495b053097c867f3585add1a7af86b604e1e97079f5d7e8d2d46d0d03e +size 91348 diff --git a/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_origin.pdf b/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..44a9696a45a5e73fda64eea55b60f5796c8c06e3 --- /dev/null +++ b/graphstructurednetworkforimagetextmatching/008a1d82-3c5a-44c5-8b24-b40d9b0d1695_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd978735ac5d59205be489b317e970aea72d180067c24b2f1d075f4684ff99d1 +size 772313 diff --git a/graphstructurednetworkforimagetextmatching/full.md b/graphstructurednetworkforimagetextmatching/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0416cf40a034917c23e630a7c93b8c2ec2dcdccd --- /dev/null +++ b/graphstructurednetworkforimagetextmatching/full.md @@ -0,0 +1,305 @@ +# Graph Structured Network for Image-Text Matching + +Chunxiao Liu $^{1,2}$ , Zhendong Mao $^{3,*}$ , Tianzhu Zhang $^{3}$ , Hongtao Xie $^{3}$ , Bin Wang $^{4}$ , Yongdong Zhang $^{3}$ $^{1}$ Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China + $^{2}$ School of Cyber Security, University of Chinese Academy of Sciences, Beijing, China + $^{3}$ University of Science and Technology of China, Hefei, China $^{4}$ Xiaomi AI Lab, Beijing, China + +liuchunxiao@iie.ac.cn, maozhendong2008@gmail.com, {tzzhang, hxtie, zhyd73}@ustc.edu.cn, wangbin11@xiaomi.com + +# Abstract + +Image-text matching has received growing interest since it bridges vision and language. The key challenge lies in how to learn correspondence between image and text. Existing works learn coarse correspondence based on object co-occurrence statistics, while failing to learn fine-grained phrase correspondence. In this paper, we present a novel Graph Structured Matching Network (GSMN) to learn fine-grained correspondence. The GSMN explicitly models object, relation and attribute as a structured phrase, which not only allows to learn correspondence of object, relation and attribute separately, but also benefits to learn fine-grained correspondence of structured phrase. This is achieved by node-level matching and structure-level matching. The node-level matching associates each node with its relevant nodes from another modality, where the node can be object, relation or attribute. The associated nodes then jointly infer fine-grained correspondence by fusing neighborhood associations at structure-level matching. Comprehensive experiments show that GSMN outperforms state-of-the-art methods on benchmarks, with relative Recall@1 improvements of nearly $7\%$ and $2\%$ on Flickr30K and MSCOCO, respectively. Code will be released at: https://github.com/CrossmodalGroup/GSMN. + +# 1. Introduction + +Image-text matching is an emerging task that matches instance from one modality with instance from another modality. This enables to bridge vision and language, which has potential to improve the performance of other multimodal applications. The key challenge in image-text matching lies in learning correspondence of image and text, such that can reflect similarity of image-text pairs accurately. + +![](images/934b9673d8f2f9e47c74bf3cec1dc0cb687aaa75d48752ef4359a71b96de2ac1.jpg) + +![](images/5b303cf23f0965e92417cb4ac650664f7e618b3de398b8129e08b8b977b53e6c.jpg) + +![](images/0e5e8d6e57e602cb8e72cedab71848e296ce1bc52a0ef74b33074be3cd65abf5.jpg) +Figure 1: Illustration of coarse and fine-grained correspondence. In the left figure, the two dogs are coarsely correlated with the word "dog", while neglecting their relation and attribute (bite or being bitten? gray or brown?). In the right figure, the gray and brown dogs are fine-grained correlated with finer textual details, which is achieved by learning phrase correspondence using a graph-based method. + +Existing approaches either focus on learning global correspondence or local region-word correspondence. The general framework of global correspondence learning methods is to jointly project the whole image and text into a common latent space, where corresponding image and text can be unified into similar representations. Techniques to common space projection range from designing specific networks [23] to adding constraints, such as triplet loss [29], adversarial loss [27] and classification loss [15]. Another branch of image-text matching learns local region-word correspondence, which is used to infer the global similarity of + +image-text pairs. Some researchers focus on learning local correspondence between salient regions and keywords. For example, Ji et al. [10] present to correlate words with partial salient regions detected by a lightweight saliency model, which demands external saliency dataset as a supervision. Recent works discover all possible region-word correspondences. For instance, Lee et al. [14] propose to correlate each word with all the regions with different weights, and vice versa. Following this work, wang et al. [30] integrate positional embedding to guide the correspondence learning and Liu et al. [18] present to eliminate partial irrelevant words and regions in correspondence learning. + +However, existing works only learn coarse correspondence based on object co-occurrence statistics, while failing to learn fine-grained correspondence of structured object, relation and attribute. As a result, they suffer from two limitations: (1) it is hard to learn correspondences of the relation and attribute as they are overwhelmed by object correspondence. (2) objects are prone to correspond to wrong categories without the guidance of descriptive relation and attribute. As shown in Figure 1, the coarse correspondence will incorrectly correlate the word "dog" with all the dogs in the image, while neglecting dogs are with finer details, i.e. brown or gray. By contrast, the fine-grained correspondence explicitly models the object "dog", relation "bite" and attribute "brown" as a phrase. Therefore, the relation "bite" and attribute "brown" can also correlate to a specific region, and they will further promote identifying fine-grained phrase "brown dog bite". + +To learn fine-grained correspondence, we propose a Graph Structured Matching Network (GSMN) that explicitly models object, relation and attribute as a phrase, and jointly infer fine-grained correspondence by performing matching on these localized phrases. This unions the correspondence learning of object, relation and attribute in a mutually enforced way. On the one hand, relation correspondence and attribute correspondence can guide the fine-grained object correspondence learning. On the other hand, the fine-grained object correspondence forces the network to learn relation correspondence and attribute correspondence explicitly. Concretely, the proposed network constructs graph for image and text, respectively. The graph node consists of the object, relation and attribute, the graph edge exists if any two nodes interact with each other (e.g. the node of an object will connect with the node of its relations or attributes). Then we perform node-level and structure-level matching on both visual and textual graphs. The node-level matching associates each node with nodes from another modality differentially, which are then propagated to neighborhoods at structure-level matching. The phrase correspondence can be inferred with the guidance of node correspondence. Moreover, the correspondence of object node can be updated as long as its neighboring relation + +and attribute point to a same object. At last, the updated correspondence is used for predicting the global similarity of image-text pairs, which jointly considers correspondence of all the individual phrases. + +The main contributions of this paper are summarized as: (1) We propose a Graph Structured Matching Network that explicitly constructs the graph structure for image and text, and performs matching by learning fine-grained phrase correspondence. To the best of our knowledge, this is the first framework that performs image-text matching on heterogeneous visual and textual graphs. (2) To the best of our knowledge, this is the first work that uses graph convolutional layer to propagate node correspondence, and uses it to infer fine-grained phrase correspondence. (3) We conduct extensive experiments on Flickr30K and MSCOCO, showing our superiority over state-of-the-arts. + +# 2. Related Work + +Existing works learn correspondence of image and text based on object co-occurrence, which is roughly categorized into two types: global correspondence and local correspondence learning methods, where the former learns the correspondence between the whole image and sentence, and the latter learns that between local region and word. + +The main goal of global correspondence learning methods [19, 4, 29, 29, 31, 22, 34, 1] is to maximize similarity of matched image-text pairs. A main line of research on this field is to first represent image and text as feature vectors, and then project them into a common space optimized by a ranking loss. Some works focus on designing specific networks. For instance, Liu et al. [19] propose to densely correlate image and text exploiting residual blocks. Gu et al. [4] imagine what the matched instance should look like, and improve the correspondence of target instance to this imagined instance. Some works focus on optimization, Wang et al. [29] point out that the correspondence within the same modality should also be preserved while learning correspondence in different modalities. Based on this observation, Wu et al. [31] preserve graph structure among neighborhood images or texts. Such global correspondence learning methods cannot learn correspondence of image and text accurately, because primary objects play the dominant role in the global representation of image-text pairs while secondary objects are mostly ignored. + +The local correspondence learning methods learn region-word correspondence. Some works focus on learning correspondence of salient objects. Karparthy et al. [12] make the first attempt by optimizing correspondence of the most similar region-word pairs. Huang et al. [9] present to order semantic concepts and composite them to infer correspondence. Similarly, Huang et al. [8] propose to recurrently select corresponding region-word pairs. Ji et al. [10] exploit saliency model to localize salient regions, + +![](images/b83c542a23b859f0c9f4e4266b75424232890a02766a836073282557cc52ba3c.jpg) +Figure 2: An overview of our approach, which consists of three modules: (a) Feature Extraction: Faster-RCNN [26] and Stanford CoreNLP [21] are employed to detect salient regions, and parse the semantic dependency, respectively. (b) Graph Construction: The node of graph is object, relation or attribute, the edge exists if any two nodes are semantically dependent. (c1) Node-level Matching: learn correspondence of object, relation and attribute separately. (c2) Structure-level Matching: Propagating the learned correspondence to neighbors to jointly infer fine-grained phrase correspondence. + +and hence the region-word can be correlated more accurately. A lightweight saliency model is employed using an external saliency dataset as a supervision. The local correspondence policy has also been widely used in other fields [32, 17], like [17] that learns distinction and connection among multi-tasks. Another branch of researches [18, 14, 7, 20, 30] present to discover all possible region-word correspondence. Ma et al. [20] present to jointly map global image and text, local regions and words into a common space, which can implicitly learn region-word correspondence. A recent approach SCAN [14] greatly improves the matching performance, which is most relevant to our work. They learn region-word correspondence using attention mechanism, where each region corresponds to multiple words and vice versa. These works learn correspondence based on object co-occurrence, and have achieved much progress in image-text matching. Nonetheless, these only learn coarse correspondence since they mostly rely on correspondence of salient objects, while neglecting the correspondence of relation and attribute is as important as object correspondence. Moreover, the correspondence of relation and attribute can benefit object to correspond to a specific type with a finer detail. By contrast, we explicitly model the image and text as graph structures, and learn fine-grained phrase correspondence. Instead of transforming the image and text as scene graphs using rule-based [33, 11] or classifier-based [28, 6] methods, we only need to identify whether nodes are interact with each other, which avoids the loss of information caused by scene graph generation. + +# 3. Method + +The overview of our proposed network is illustrated in Figure 2. We first extract features of image and text, and + +then construct visual and textual graph. Next, the node-level matching learns node correspondence, and propagate to neighbors in structure-level matching, in which the correspondences of object, relation and attribute are fused to infer the fine-grained phrase correspondence. + +# 3.1. Graph Construction + +Textual Graph. Formally, we seek to construct an undirected sparse graph $G_{1} = (V_{1},E_{1})$ for each text, we use matrix $A$ to represent the adjacent matrix of each node, and add self-loops. The edge weight is denoted as a matrix $W_{e}$ which shows the semantic dependency of nodes. + +To construct the textual graph, we first identify the semantic dependency within the text using off-the-shelf Stanford CoreNLP [21]. This can not only parse the object (nouns), relation (verbs) and attribute (adjectives or quantifiers) in a sentence, but also parse their semantic dependencies. For example, given a text "A brown dog bite a gray dog ear", "A", "brown" are attributes for the first object "dog", and the "bite" is its relation. They are semantically dependent since all of them describe the same object. Based on this observation, we set each word as the graph node, and there exists graph edge between nodes if they are semantically dependent. Then we compute the similarity matrix $S$ of word representations $u$ as + +$$ +s _ {i j} = \frac {\exp \left(\lambda u _ {i} ^ {T} u _ {j}\right)}{\sum_ {j = 0} ^ {m} \exp \left(\lambda u _ {i} ^ {T} u _ {j}\right)}. \tag {1} +$$ + +where the $s_{ij}$ indicates the similarity between $i$ -th and $j$ -th node. $\lambda$ is a scaling factor. The weight matrix $W_{e}$ can be obtained by a Hadamard product between similarity matrix and adjacent matrix, followed by $L_{2}$ normalization, i.e. + +$$ +W _ {e} = \| S \circ A \| _ {2}. \tag {2} +$$ + +Additionally, we also implement the textual graph as a fully-connected graph. In contrast to sparse graph that employs semantic dependency of words, it can exploit implicit dependencies. We find the sparse and dense graphs are complementary to each other, and can greatly improve the performance, see section 4.2.1. + +Visual Graph. To construct the visual graph $G_{2} = (V_{2}, E_{2})$ , we represent each image as an undirected fully-connected graph, where the node is set as salient regions detected by Faster-RCNN [26], and each node is associated with all the other nodes. Inspired by [24] in visual question answering, we use the polar coordinate to model the spatial relation of each image, which disentangles the orientation and distance of pair-wise regions. This can capture both semantic and spatial relationships among different regions, since the relation and attribute are expected to close to object, and the direction information allows to estimate the type of relations. For example, the relations "on" and "under" show opposite relative position to the object "desk". To get edge weight for this fully-connected graph, we compute polar coordinate $(\rho, \theta)$ based on the centres of the bounding boxes of pair-wise regions, and set the edge weight matrix $W_{e}$ as pair-wise polar coordinates. + +# 3.2. Multimodal Graph Matching + +Given a textual graph $G_{1} = (V_{1},E_{1})$ of a text, and a visual graph $G_{2} = (V_{2},E_{2})$ of an image, our goal is to match two graphs to learn fine-grained correspondence, producing similarity $g(G_1,G_2)$ as global similarity of an image-text pair. We define the node representation of textual graph as $U_{\alpha}\in \mathbb{R}^{m\times d}$ , and the node representation of visual graph as $V_{\beta}\in \mathbb{R}^{n\times d}$ . Here, $m$ and $n$ denotes the node number of textual and visual graph, $d$ is the representation dimension. To compute the similarity of these heterogeneous graphs, we first perform node-level matching to associate each node with nodes from another modality graph, i.e. learning node correspondence, and then perform structure-level matching i.e. learning phrase correspondence, by propagating associated nodes to neighbors, which jointly infer fine-grained correspondence of structured object, relation and attribute. + +# 3.2.1 Node-level Matching + +Each node in the textual and visual graphs will match with nodes from another modality graph to learn node correspondence. We first depict the node-level matching on textual graph in details, and then roughly describe that on visual graph since this operation is symmetric on two kinds of graphs. Concretely, we first compute similarities between visual and textual nodes, denoted as $U_{\alpha}V_{\beta}^{T}$ , followed by a softmax function along the visual axis. The similarity value measures how the visual node corresponds to each textual node. Then, we aggregate all the visual nodes as a weighted + +combination of their feature vectors, where the weight is the computed similarities. This process can be formulated as: + +$$ +C _ {t \rightarrow i} = \operatorname {s o f t m a x} _ {\beta} \left(\lambda U _ {\alpha} V _ {\beta} ^ {T}\right) V _ {\beta}. \tag {3} +$$ + +where $\lambda$ is a scaling factor to focus on matched nodes. + +Unlike previous approaches [3, 7, 14] that uses the learned correspondence to compute the global similarity, we present a multi-block module that computes block-wise similarity of the textual node and the aggregated visual node $C_{t \to i}$ . This is computational efficiency and converts the similarity from a scalar into a vector for subsequent operations. Also, this allows different blocks to play different roles in matching. Concretely, we split the $i$ -th feature of the textual node and the its corresponding aggregated visual nodes into $t$ blocks, represented as $[u_{i1}, u_{i2}, \dots, u_{it}]$ and $[c_{i1}, c_{i2}, \dots, c_{it}]$ , respectively. The multi-block similarity is computed within pair-wise blocks. For instance, the similarity in $j$ -th blocks is calculated as $x_{ij} = \cos(u_{ij}, c_{ij})$ . Here, $x_{ij}$ is a scalar value, $\cos(\cdot)$ denotes cosine similarity. The matching vector of $i$ -th textual node can be obtained by concatenating the similarity of all the blocks, that is + +$$ +x _ {i} = x _ {i 1} \left\| x _ {i 2} \right\| \dots \left\| x _ {i t}. \right. \tag {4} +$$ + +where “|” indicates concatenation. In this way, each textual node is associated with its matched visual nodes, which will be propagated to its neighbors at structure-level matching to guide neighbors learn fine-grained phrase correspondence. + +Symmetrically, when given a visual graph, the node-level matching is proceeded on each visual node. The corresponding textual nodes will be associated differentially + +$$ +C _ {i \rightarrow t} = \operatorname {s o f t m a x} _ {\alpha} \left(\lambda V _ {\beta} U _ {\alpha} ^ {T}\right) U _ {\alpha} \tag {5} +$$ + +Then each visual node, together with its associated textual nodes, will be processed by the multi-block module, producing the matching vector $x$ . + +# 3.2.2 Structure-level Matching + +The structure-level matching takes the node-level matching vectors as input, and propagates these vectors to neighbors along with the graph edge. Such a design benefits to learn fine-grained phrase correspondence as neighboring nodes guide that. For example, a sentence "A brown dog bite a gray dog ear", the first "dog" will correspond to the visual brown dog in a finer level, because its neighbors "bite" and "brown" point to the brown dog, and hence the "dog" prefer to correlate with the correct dog in the image. To be specific, the matching vector of each node is updated by integrating neighborhood matching vectors using GCN. The GCN layer will apply $K$ kernels that learn how to integrate neighborhood matching vectors, formulated as + +$$ +\hat {x} _ {i} = \left| \right| _ {k = 1} ^ {K} \sigma \left(\sum_ {j \in N _ {i}} W _ {e} W _ {k} x _ {j} + b\right). \tag {6} +$$ + +where $N_{i}$ denotes the neighborhood of $i$ -th node, $W_{e}$ indicates the edge weight depicted in section 3.1, $W_{k}$ and $b$ are the parameters to be learned of $k$ -th kernel. Note that $k$ kernels are applied, the output of the spatial convolution is defined as a concatenation over the output of $k$ kernels, producing convolved vector that reflects the correspondence of connected nodes. These nodes form the localized phrase. + +The phrase correspondence can be inferred by propagating neighboring node correspondence, which can be used to reason the overall matching score of image-text pair. Here, we feed the convolved vectors into a multi-layer perceptron (MLP) to jointly consider the learned correspondence of all the phrases, and infer the global matching score. This represents how much one structured graph matches another structured graph. This process is formulated as + +$$ +s _ {t \rightarrow i} = \frac {1}{n} \sum_ {i} W _ {s} ^ {u} \left(\sigma \left(W _ {h} ^ {u} \hat {x} _ {i} + b _ {h} ^ {u}\right)\right) + b _ {s} ^ {u}, \tag {7} +$$ + +$$ +s _ {i \rightarrow t} = \frac {1}{m} \sum_ {j} W _ {s} ^ {v} \left(\sigma \left(W _ {h} ^ {v} \hat {x} _ {j} + b _ {h} ^ {v}\right)\right) + b _ {s} ^ {v}. \tag {8} +$$ + +where $Ws, bs$ denote parameters of MLP, which includes two fully-connected layers, the function $\sigma(\cdot)$ indicates the tanh activation. Note that we perform structure-level matching on both visual and textual graphs, which can learn phrase correspondence complement to each other. The overall matching score of an image-text pair is computed as the sum of matching score at two directions + +$$ +g \left(G _ {1}, G _ {2}\right) = s _ {t \rightarrow i} + s _ {i \rightarrow t}. \tag {9} +$$ + +# 3.2.3 Objective Function + +Following previous approaches [18, 14, 2, 30], we employ the triplet loss as the objective function. When using the text $T$ as query, we sample its matched images and mismatched images at each mini-batch, which form positive pairs and negative pairs. The similarity in positive pairs should be higher than that in negative pairs by a margin $\gamma$ . Analogously, when using the image $I$ as query, the negative sample should be a text that mismatches the given query, their similarity relative to positive pairs should also satisfy the above constraints. We focus on optimizing hard negative samples that produce the highest loss, that is + +$$ +L = \sum_ {(I, T)} [ \gamma - g (I, T) + g (I, T ^ {\prime}) ] _ {+} + [ \gamma - g (I, T) + g \left(I ^ {\prime}, T\right) ] _ {+}. \tag {10} +$$ + +where $I^{\prime},T^{\prime}$ are hard negatives, the function $[\cdot ]_{+}$ is equivalent to max[.,0], and $g(\cdot)$ is the global similarity of an image-text pair computed by equation 9. + +# 3.3. Feature Representation + +Visual Representation. Given an image $I$ , we represent its feature as a combination of its $n$ salient regions, which + +are detected by Faster-RCNN pretrained on Visual Genome [13]. The detected regions are feed into pretrained ResNet-101 [5] to extract features, and then transformed into a $d$ -dimensional feature space using a fully connected layer: + +$$ +v _ {i} = W _ {m} \left[ C N N \left(I _ {i}\right) \right] + b _ {m}. \tag {11} +$$ + +where $CNN(\cdot)$ encodes each region within bounding box as a region feature, $W_{m}, b_{m}$ are parameters of the fully connected layer that transforms the feature into the common space. These region features form the image representation, denoted as $[v_{1}, v_{2}, \dots, v_{n}]$ . + +Textual Representation. Given a text $T$ that contains $m$ words, we represent its feature as $[u_1, u_2, \dots, u_m]$ , where each word is associated with a feature vector. We first represent each word as a one-hot vector, and then embed it into $d$ -dimensional feature space using a Bidirectional Gated Recurrent Unit (BiGRU), which enables to integrated forward and backward contextual information into text embeddings. The representation of $i$ -th word is obtained by averaging the hidden state of forward and backward GRU at $i$ -th time step. + +# 4. Experiment + +# 4.1. Dataset and Implementation Details + +To validate the effectiveness of our proposed method, we evaluate it on two most widely used benchmarks, Flickr30K [25] and MSCOCO [16]. Each benchmark contains multiple image-text pairs, where each image is described by five corresponding sentences. Flickr30K collects 31,000 images and $31,000 \times 5 = 155,000$ sentences in total. Following the settings in previous works [12], this benchmark is split into 29,000 training images, 1,000 validation images, and 1,000 testing images. A large-scale benchmark MSCOCO contains 123,287 images and $123,287 \times 5 = 616,435$ sentences, we use 113,287 images for training, both the validation and testing sets contain 5,000 instances. The evaluation result is calculated on 5-folds of testing images. + +The commonly used evaluation metrics for image-text matching are Recall@K (K=1,5,10), denoted as R@1, R@5, and R@10, which depict the percentage of ground truth being retrieved at top 1, 5, 10 results, respectively. The higher Recall@K indicates better performance. Additionally, to show the overall matching performance, we also compute the sum of all the Recall values (rSum) at imaged-to-text and text-to-image directions, that is + +$$ +r S u m = \underbrace {R @ 1 + R @ 5 + R @ 1 0} _ {\text {I m a g e a s q u e r y}} + \underbrace {R @ 1 + R @ 5 + R @ 1 0} _ {\text {T e x t a s q u e r y}}. \tag {12} +$$ + +As for implementation details, we train the proposed network on training set and validate it at each epoch on validation set, selecting the model with the highest rSum to be test. We train the proposed method on 1 Titan Xp GPU + +Table 1: Image-text matching results on Flickr30K, 'ft' and 'fixed' are fine-tuning and no fine-tuning. The bests are in bold. + +
MethodImage BackboneText BackboneImage-to-TextText-to-ImagerSum
R@1R@5R@10R@1R@5R@10
m-CNN [20]fixed VGG-19ft CNN33.664.174.926.256.369.6324.7
DSPE [29]fixed VGG-19w2v+HGLMM40.368.979.929.760.172.1351.0
VSE++ [2]ft ResNet-152ft GRU52.979.187.239.669.679.5407.9
TIMAM [27]fixed ResNet-152Bert53.178.887.642.671.681.9415.6
DANs [23]ft ResNet-152ft LSTM55.081.889.039.469.279.1413.5
SCO [9]fixed ResNet-152ft LSTM55.582.089.341.170.580.1418.5
GXN [4]ft ResNet-152ft GRU56.8-89.641.5-80.1268.0
SCAN [14]Faster R-CNNft Bi-GRU67.490.395.848.677.785.2465.0
BFAN [18]Faster R-CNNft Bi-GRU68.191.4-50.878.4-288.7
PFAN [30]Faster R-CNNft Bi-GRU70.091.895.050.478.786.1472.0
GSMN (sparse)Faster R-CNNft Bi-GRU71.492.096.153.979.787.1480.1
GSMN (dense)Faster R-CNNft Bi-GRU72.693.596.853.780.087.0483.6
GSMN (sparse+dense)Faster R-CNNft Bi-GRU76.494.397.357.482.389.0496.8
+ +Table 2: Image-text matching results on MSCOCO, 'ft' and 'fixed' are fine-tuning and no fine-tuning. The bests are in bold. + +
MethodImage BackboneText BackboneImage-to-TextText-to-ImagerSum
R@1R@5R@10R@1R@5R@10
m-CNN [20]fixed VGG-19ft CNN42.873.184.132.668.682.8384.0
DSPE [29]fixed VGG-19w2v+HGLMM50.179.789.239.675.286.9420.7
VSE++ [2]ft ResNet-152ft GRU64.7-95.952.0-92.0304.6
DPC [35]ft ResNet-152ft ResNet-15265.589.895.547.179.990.0467.8
GXN [4]ft ResNet-152ft GRU68.5-97.956.6-94.5317.5
SCO [9]fixed ResNet-152ft LSTM69.992.997.556.787.594.8499.3
SCAN [14]Faster R-CNNft Bi-GRU72.794.898.458.888.494.8507.9
BFAN [18]Faster R-CNNft Bi-GRU74.995.2-59.488.4-317.9
PFAN [30]Faster R-CNNft Bi-GRU76.596.399.061.689.695.2518.2
GSMN (sparse)Faster R-CNNft Bi-GRU76.195.698.360.488.795.0514.0
GSMN (dense)Faster R-CNNft Bi-GRU74.795.398.260.388.594.6511.6
GSMN (sparse+dense)Faster R-CNNft Bi-GRU78.496.498.663.390.195.7522.5
+ +with 30 and 20 epochs for Flickr30K and MSCOCO, respectively. The Adam optimizer is employed with mini batch size 64. The initial learning rate is set as 0.0002 with decaying $10\%$ every 15 epochs on Flickr30K, and 0.0005 with decaying $10\%$ every 5 epochs on MSCOCO. We set the dimension of word embeddings as 300, which are then feed into Bi-GRU to get 1024-diemensioanl word representation. As for image feature, each image contains 36 regions that are most salient, and extract 2048-dimensional features for each region. The region feature is then transformed into a 1024-dimensional visual representation by a fully-connected layer. At the structure-level matching, we use one spatial graph convolution layer with 8 kernels, each of which are 32-dimensional. After that, we feed each node in the graph into two fully-connected layers followed by a tanh activation to reason the matching score. The scaling factor $\lambda$ setting is investigated at section 4.2.3. As for optimization, the margin $\gamma$ is empirically set as 0.2. + +# 4.2. Experimental Results + +# 4.2.1 Comparisons with state-of-the-arts + +Baselines. we make a comparison with several networks in image-text matching, including (1) typical works m-CNN [20], DSPE [29] and DANs [23] that learn global image-text correspondence by designing different network blocks. (2) $\mathrm{VSE} + +$ [2], DPC [35] and TIMAM [27] that learn correspondence using different optimization. (3) SCO [9], GXN [4] that learn region-word correspondence by designing specific networks. (4) state-of-the-art methods SCAN [14], BFAN [18], PFAN [30]. + +Quantitative Analysis. We provide two versions of our approach, one models the text as a sparse graph and another one models it as a dense graph. We ensemble them by averaging their similarity of image-text pairs, and find that can greatly improve the performance. Note that state-of-the-art + +Table 3: The ablation study on Flickr30K to investigate the effect of different network structures. + +
ModelImage-to-TextText-to-Image
R@1R@10R@1R@10
GSMN-w/o graph63.294.548.784.5
GSMN-w/o t2i64.693.545.882.6
GSMN-w/o i2t67.095.552.386.3
GSMN-2GCN68.494.851.586.0
GSMN-GRU71.195.350.985.6
GSMN-full (sparse)71.496.153.987.1
GSMN-full (dense)72.696.853.787.0
+ +![](images/4151b1868fd1f02ae89a08e8621311308041787a1c132402901e461a60d1068e.jpg) +(a) + +![](images/cb6335f5743a05c082290d2a5831ea1a1737f4e06f8a93315b9fc9291597e767.jpg) +(b) + +![](images/43ea521ab7201e15b4ece1bd4061585d7b3b6891c346077a85a656b3fb720dbd.jpg) +(c) + +![](images/3dbc477ca5426d00bd893b18ef9a3ac2ccebddf2c8205fd9a2a9c3de53069781.jpg) +(d) +Figure 3: Comparison of Recall@1 results on Flickr30K and MSCOCO with different $\lambda$ settings. (a) Image-to-text on Flickr30K. (b) Text-to-image on Flickr30K. (c) Image-to-text on MSCOCO. (d) Text-to-image on MSCOCO. + +methods [30, 14, 18] also use ensemble model. As shown in Table 1, we can observe that the proposed network outperforms state-of-the-arts with respect to all the evaluation metrics on Flickr30K. Compared with the state-of-the-art method PFAN [30] that also utilizing the position information of salient regions, our approach obtains relative $\mathrm{R}@\mathrm{l}$ gains with $6.4\%$ and $7\%$ at image-to-text and text-to-image matching. Diffs from PFAN [30] that embeds position information into visual representation, our approach employs it as the weight of graph edge. The improvement indicates that structured models object, relation and attribute can greatly improve the matching performance. Although a previous approach SCAN [14] uses similar method to learn object correspondence, our approach achieves more improvement, with nearly $10\%$ $\mathrm{R}@\mathrm{l}$ gain, since it ignores to explicitly learn correspondence of the relation and attribute. In addition, our single model also outperforms their ensemble model by a large margin, and the dense model is + +better than sparse one as it can discover latent dependencies. + +The quantitative results on a larger and more complicated dataset MSCOCO is shown at Table 2. We can observe that our approach can outperform state-of-the-art methods with nearly $2\%$ improvement in terms of Recall@1, which is more concerned by users in real applications. Our Recall@10 in image-to-text matching is slightly lower than PFAN since noise exists. Compared with SCAN that is most relevant to our work, we suppress it in terms of all the evaluation metrics, getting over $5.5\%$ and $4.5\%$ relative Recall@1 improvements on two directions. Note that the sparse model performs better than the dense model, it mainly arises from the sentence in this dataset is more complicated, and thus might incorrectly correlate totally irrelevant words if a fully-connected graph is built. + +# 4.2.2 Impact of different network structures + +To validate the impact of different network structures, we conduct ablation studies incrementally on Flickr30K. We compare the full dense model and full sparse model with five models: (1) GSMN-w/o graph, which only performs node-level matching. (2) GSMN-w/o i2t, which only applies the node-level matching and structure-level matching on image-to-text direction. (3) GSMN-w/o t2i, which only applies the node-level matching and structure-level matching on text-to-image direction. (4) GSMN-2GCN, its depth of GCN layer is set as 2. (5) GSMN-GRU, a network that only uses GRU instead of Bi-GRU as the text encoder. As shown in Table 3, The two full models outperform all these types of networks, and they largely exceed the network that only performs matching on single direction. Note that GSMN-2GCN requires more computational cost and GPU memory, results show that a deeper network will drop the performance as it additionally considers indirectly connected nodes, which will disturb the learned correspondence. Compared with GSMN-GRU, our approach achieves more improvement on text-to-image graph, it derives from the Bi-GRU can better model the semantic dependency among object, relation and attribute than GRU, and hence the edge weight of textual graph can be accurately reflected. Note that GSMN-w/o i2t gets better performance than GSMN-w/o t2i, because the implicit relation among regions is difficult to be discovered. + +# 4.2.3 Impact of different parameters + +To validate the impact of different parameters, we conduct extensive experiments on two benchmarks. In this work, the most sensitive parameter is the scaling factor $\lambda$ that determines the relative weight of different nodes in node-level matching, and the edge weight of textual graph. A large $\lambda$ will filter out extensive nodes, and only preserve little nodes that are highly relevant to the specific node. A + +![](images/7ebdae332eecbf7a944a626e08e2f6d84d865db7bb1ba69c468f80bd04066ff2.jpg) +Figure 4: Visualization of node correspondence and phrase correspondence with score inside the box. Best viewed in color. + +Text Query 1: A man with glasses is wearing a beer can crocheted hat. + +![](images/f40bb8aa120f56d91c2ef4d7fc014659d4da005864e1a37a8dd8bb8916c2eff4.jpg) + +Text Query 2: A girl in a jean dress is walking along a raised balance beam + +![](images/f82ced401b6e6c47ee4c4c3970a2eedd188d6a6e2ca824ffaabe597c52792258.jpg) +Figure 5: Visualization of text-to-image matching on Flickr30K. For each text query, we show top 3 ranked images from left to right, where mismatched images are with red boxes and matched images are with green boxes. + +small $\lambda$ is unable to distinguish relevant nodes from irrelevant ones. Hence, an appropriate parameter is important in our proposed network. Here, we investigate the matching performance with setting the $\lambda$ as 5, 10 and 20, see figure 3. We observe the Recall@1 on validation set at each training epoch. The top two subfigures are on Flickr30K, it is obvious that when $\lambda = 20$ , the proposed network yields better Recall@1 on two matching directions, and there is just little difference when the parameter is set as 5 and 10. The bottom two subfigures are on MSCOCO, showing that $\lambda = 10$ is much better. The different parameter setting on two datasets might be caused by different data distribution. + +# 4.2.4 Case Study + +We provide a visualization to show the learned node correspondence and phrase correspondence in Figure 4. Note that we only show the most relevant region for each textual node, it shows different kinds of nodes can associate with their corresponding regions with relatively higher scores. Moreover, we can infer phrase correspondence enclosed by multiple bounding boxes, and their scores are greatly improved. Also, we visualize the text-to-image and image-to-text matching results on Flickr30K, shown in Figure 5 and Figure 6. These show our approach always retrieves the + +![](images/f59926b9132e4a5dc8ddfe165cb45d6f9402732c69cd15ffa61855c389af9c39.jpg) + +1.People are fixing the roof of a house. +2.Three men, one on a ladder, work on a roof. +3.Group gathered to go snowmobiling +4.Two men on a rooftop while another man stands atop a ladder watching them +5. Two men sitting on the roof of a house while +another one stands on a ladder + +![](images/74ec56ae386f62c9b901efd1863b9d1a2d60c0f216fde0a84e2df06bac3bb448.jpg) +Figure 6: Visualization of image-to-text matching on Flickr30K. For each image query, we show top 5 ranked texts, where mismatched texts are marked as red. + +1. An employee is handing a woman a bag while she is browsing through fish on ice at a street market. +2. A lady in a striped shirt is shopping at a fish market. +3. People are shopping for fish at a market +4. A woman wearing a short-sleeved striped shirt and carrying a green shopping bag examines fish in an open air market while a vendor in a white apron over a gray t-shirt hands her an empty plastic bag. +5. The woman is at marketplace buying fish from an Arabic person. + +ground truth with a high rank. In addition, our approach is able to learn fine-grained correspondence of the relation and attribute. For example, for the first text query in Figure 5, our network can distinguish different kinds of hats. + +# 4.3. Conclusion + +In this paper, we propose a graph structured matching network for image-text matching, which performs matching on heterogeneous visual and textual graphs. This is achieved by node-level matching and structure-level matching that infer fine-grained correspondence by propagating node correspondence along the graph edge. Moreover, such a design can learn correspondence of relation and attribute, which are mostly ignored by previous works. With the guidance of relation and attribute, the object correspondence can be greatly improved. Extensive experiments demonstrate the superiority of our network. + +# 5. Acknowledgements + +This work is supported by the National Natural Science Foundation of China, Grant No.U19A2057, the Fundamental Research Funds for the Central Universities, Grant No.WK3480000008, the National Key Research and Development Program of China, Grants No.2016QY03D0505, 2016QY03D0503, 2016YFB081304, Strategic Priority Research Program of Chinese Academy of Sciences, Grant No.XDC02040400. + +# References + +[1] A. Eisenschat and L. Wolf. Linking image and text with 2-way nets. In CVPR, pages 1855-1865, 2017. +[2] Fartash Faghri, David J. Fleet, Jamie Kiros, and Sanja Fidler. Vse++: Improving visual-semantic embeddings with hard negatives. In BMVC, 2018. +[3] Haoqi Fan and Jiatong Zhou. Stacked latent attention for multimodal reasoning. CVPR, pages 1072-1080, 2018. +[4] 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. CoRR, abs/1711.06420, 2017. +[5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. +[6] Roei Herzig, Moshiko Raboh, Gal Chechik, Jonathan Berant, and Amir Globerson. Mapping images to scene graphs with permutation-invariant structured prediction. In Advances in Neural Information Processing Systems, pages 7211-7221, 2018. +[7] Feiran Huang, Xiaoming Zhang, Zhonghua Zhao, and Zhoujun Li. Bi-directional spatial-semantic attention networks for image-text matching. IEEE Transactions on Image Processing, 28(4):2008-2020, 2019. +[8] Yan Huang, Wei Wang, and Liang Wang. Instance-aware image and sentence matching with selective multimodal LSTM. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2310-2318, 2017. +[9] Yan Huang, Qi Wu, Chunfeng Song, and Liang Wang. Learning semantic concepts and order for image and sentence matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6163-6171, 2018. +[10] Zhong Ji, Haoran Wang, Jungong Han, and Yanwei Pang. Saliency-guided attention network for image-sentence matching. arXiv preprint arXiv:1904.09471, 2019. +[11] Justin Johnson, Ranjay Krishna, Michael Stark, Li-Jia Li, David Shamma, Michael Bernstein, and Li Fei-Fei. Image retrieval using scene graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3668-3678, 2015. +[12] Andrej Karpathy, Armand Joulin, and Li Fei-Fei. Deep fragment embeddings for bidirectional image sentence mapping. 3:1889-1897, 2014. +[13] 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. +[14] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In Proceedings of the European Conference on Computer Vision (ECCV), pages 201-216, 2018. +[15] Shuang Li, Tong Xiao, Hongsheng Li, Wei Yang, and Xiaogang Wang. Identity-aware textual-visual matching with + +latent co-attention. 2017 IEEE International Conference on Computer Vision (ICCV), pages 1908-1917, 2017. +[16] 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. +[17] An-An Liu, Yu-Ting Su, Wei-Zhi Nie, and Mohan Kankanhalli. Hierarchical clustering multi-task learning for joint human action grouping and recognition. IEEE transactions on pattern analysis and machine intelligence, 39(1):102-114, 2016. +[18] Chunxiao Liu, Zhendong Mao, An-An Liu, Tianzhu Zhang, Bin Wang, and Yongdong Zhang. Focus your attention: A bidirectional focal attention network for image-text matching. In Proceedings of the 27th ACM International Conference on Multimedia, pages 3-11. ACM, 2019. +[19] Yu Liu, Yanming Guo, Erwin M. Bakker, and Michael S. Lew. Learning a recurrent residual fusion network for multimodal matching. In ICCV, pages 4127-4136, 2017. +[20] Lin Ma, Zhengdong Lu, Lifeng Shang, and Hang Li. Multimodal convolutional neural networks for matching image and sentence. In ICCV, pages 2623-2631, 2015. +[21] Christopher D. Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David McClosky. The Stanford CoreNLP natural language processing toolkit. In Association for Computational Linguistics (ACL) System Demonstrations, pages 55–60, 2014. +[22] Niluthpol Chowdhury Mithun, Rameswar Panda, Evangelos E. Papalexakis, and Amit K. Roy-Chowdhury. Webly supervised joint embedding for cross-modal image-text retrieval. 2018. +[23] 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. +[24] Will Norcliffe-Brown, Stathis Vafeias, and Sarah Parisot. Learning conditioned graph structures for interpretable visual question answering. In Advances in Neural Information Processing Systems, pages 8334-8343, 2018. +[25] Bryan A. Plummer, Liwei Wang, Chris M. Cervantes, Juan C. Caicedo, Julia Hockenmaier, and Svetlana Lazebnik. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models. ICCV, pages 2641–2649, 2015. +[26] S. Ren, K. He, R Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(6):1137-1149, 2017. +[27] Nikolaos Sarafianos, Xiang Xu, and Ioannis A Kakadiaris. Adversarial representation learning for text-to-image matching. arXiv preprint arXiv:1908.10534, 2019. +[28] Sebastian Schuster, Ranjay Krishna, Angel Chang, Li Fei-Fei, and Christopher D Manning. Generating semantically precise scene graphs from textual descriptions for improved image retrieval. In Proceedings of the fourth workshop on vision and language, pages 70–80, 2015. + +[29] Liwei Wang, Yin Li, Jing Huang, and Svetlana Lazebnik. Learning two-branch neural networks for image-text matching tasks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(2):394–407, 2019. +[30] Yaxiong Wang, Hao Yang, Xueming Qian, Lin Ma, Jing Lu, Biao Li, and Xin Fan. Position focused attention network for image-text matching. arXiv preprint arXiv:1907.09748, 2019. +[31] Yiling Wu, Shuhui Wang, and Qingming Huang. Learning semantic structure-preserved embeddings for cross-modal retrieval. In 2018 ACM Multimedia Conference, pages 825-833. ACM, 2018. +[32] Ning Xu, Hanwang Zhang, An-An Liu, Weizhi Nie, Yuting Su, Jie Nie, and Yongdong Zhang. Multi-level policy and reward-based deep reinforcement learning framework for image captioning. IEEE Transactions on Multimedia, 2019. +[33] 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. +[34] Ying Zhang and Huchuan Lu. Deep cross-modal projection learning for image-text matching. In Proceedings of the European Conference on Computer Vision (ECCV), pages 686-701, 2018. +[35] Zhedong Zheng, Liang Zheng, Michael Garrett, Yi Yang, and Yi-Dong Shen. Dual-path convolutional image-text embedding with instance loss. arXiv preprint arXiv:1711.05535, 2017. \ No newline at end of file diff --git a/graphstructurednetworkforimagetextmatching/images.zip b/graphstructurednetworkforimagetextmatching/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..179eb501682b012b5496e2e510bd7d359382b854 --- /dev/null +++ b/graphstructurednetworkforimagetextmatching/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e4f915a89634d075213ca383afeb03477fa27410b3b8d5ca95e0cb9d953974f +size 690970 diff --git a/graphstructurednetworkforimagetextmatching/layout.json b/graphstructurednetworkforimagetextmatching/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9809dd5edee9b9267bb2925938ef61e8a403b857 --- /dev/null +++ b/graphstructurednetworkforimagetextmatching/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfa6d996cb536aabb357e6583ee00fb7aa2ab29c813dcc9558a8b03beb7e3cf5 +size 369691 diff --git a/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_content_list.json b/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..22491df89d46c4901e8bc95dcb74b84b58ec8b92 --- /dev/null +++ b/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcf810088523d3c98ca6caa84d568ce08a10ecd5c800c3c63a5c6aa277c3117d +size 79559 diff --git a/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_model.json b/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4fa77da7ddb3928b1336fa48f9c5be09d8f6c3c5 --- /dev/null +++ b/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2762dd7ea152b1c4ca485e43ef40741c2d45f6d503ce1518ec3d0de77ed73a1f +size 93927 diff --git a/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_origin.pdf b/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9e88547e21771153f255add92a70fe648dcff3b6 --- /dev/null +++ b/graphstructuredreferringexpressionreasoninginthewild/5a1617de-5f13-418b-ba5a-3d4347c5b700_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:222189d53fbee3d2792c59135204e9211ccf87353948cb09d1ac7790aee2a343 +size 1009817 diff --git a/graphstructuredreferringexpressionreasoninginthewild/full.md b/graphstructuredreferringexpressionreasoninginthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..697892e1a0936fdbf677ba9c8f315f9517375e87 --- /dev/null +++ b/graphstructuredreferringexpressionreasoninginthewild/full.md @@ -0,0 +1,303 @@ +# Graph-Structured Referring Expression Reasoning in The Wild + +Sibei Yang + +Guanbin Li $^{2\dagger}$ + +Yizhou $\mathrm{Yu}^{1,3\dagger}$ + +1The University of Hong Kong + +$^{2}$ Sun Yat-sen University + +$^{3}$ Deepwise AI Lab + +sbyang9@hku.hk, liguanbin@mail.sysu.edu.cn, yizhouy@acm.org + +# Abstract + +Grounding referring expressions aims to locate in an image an object referred to by a natural language expression. The linguistic structure of a referring expression provides a layout of reasoning over the visual contents, and it is often crucial to align and jointly understand the image and the referring expression. In this paper, we propose a scene graph guided modular network (SGMN), which performs reasoning over a semantic graph and a scene graph with neural modules under the guidance of the linguistic structure of the expression. In particular, we model the image as a structured semantic graph, and parse the expression into a language scene graph. The language scene graph not only decodes the linguistic structure of the expression, but also has a consistent representation with the image semantic graph. In addition to exploring structured solutions to grounding referring expressions, we also propose Ref-Reasoning, a large-scale real-world dataset for structured referring expression reasoning. We automatically generate referring expressions over the scene graphs of images using diverse expression templates and functional programs. This dataset is equipped with real-world visual contents as well as semantically rich expressions with different reasoning layouts. Experimental results show that our SGMN1 not only significantly outperforms existing state-of-the-art algorithms on the new Ref-Reasoning dataset, but also surpasses state-of-the-art structured methods on commonly used benchmark datasets. It can also provide interpretable visual evidences of reasoning. + +# 1. Introduction + +Grounding referring expressions aims to locate in an image an object referred to by a natural language expression, + +![](images/6844e145bec37591f537aedfaddec205db490ab8ca2286523d4f1e693f76544f.jpg) +Figure 1. Scene Graph guided Modular Network (SGMN) for grounding referring expressions. SGMN first parses the expression into a language scene graph and models the image as a semantic graph, then it performs structured reasoning with neural modules under the guidance of the language scene graph. + +![](images/82707d62dab88fd81d1c428d46147babd81e6cd7c4cf28ab57a253a7ba3c649b.jpg) + +and the object is called the referent. It is a challenging problem because it requires understanding as well as performing reasoning over semantics-rich referring expressions and diverse visual contents including objects, attributes and relations. + +Analyzing the linguistic structure of referring expressions is the key to grounding referring expressions because they naturally provide the layout of reasoning over the visual contents. For the example shown in Figure 1, the composition of the referring expression "the girl in blue smock across the table" (i.e., triplets ("the girl", "in", "blue smock") and ("the girl", "across", "the table")) reveals a tree-structured layout of finding the blue smock, locating the table and identifying the girl who is "in" the blue smock and meanwhile is "across" the table. However, nearly all the existing works either neglect linguistic structures and learn holistic matching scores between monolithic representations of referring expressions and visual contents [18, 29, 23] or neglect syntactic information and explore limited linguistic structures via self-attention mechanisms [26, 8, 24]. + +Consequently, in this paper, we propose a Scene Graph guided modular network (SGMN) to fully analyze the linguistic structure of referring expressions and enable reasoning over visual contents using neural modules under the guidance of the parsed linguistic structure. Specifically, SGMN first models the input image with a structured rep + +resentation, which is a directed graph over the visual objects in the image. The edges of the graph encode the semantic relations among the objects. Second, SGMN analyzes the linguistic structure of the expression by parsing it into a language scene graph [21, 16] using an external parser, including the nodes and edges of which correspond to noun phrases and prepositional/verb phrases respectively. The language scene graph not only encodes the linguistic structure but is also consistent with the semantic graph representation of the image. Third, SGMN performs reasoning on the image semantic graph under the guidance of the language scene graph by using well-designed neural modules [2, 22] includingAttendNode,AttendRelation,Transfer, Merge and Norm. The reasoning process can be explicitly explained via a graph attention mechanism. + +In addition to methods, datasets are also important for making progress on grounding referring expressions, and various real-world datasets have been released [12, 19, 27]. However, recent work [4] indicates dataset biases exist and they may be exploited by the methods. And methods accessing the images only achieve marginally higher performance than a random guess. Existing datasets also have other limitations. First, the samples in the datasets have unbalanced levels of difficulty. Many expressions in the datasets directly describe the referents with attributes due to the annotation process. Such an imbalance makes models learn shallow correlations instead of achieving joint image and text understanding, which defeats the original intention of grounding referring expressions. Second, evaluation is only conducted on final predictions but not on the intermediate reasoning process [17], which does not encourage the development of interpretable models [24, 15]. Thus, a synthetic dataset over simple 3D shapes with attributes is proposed in [17] to address these limitations. However, the visual contents in this synthetic dataset are too simple, which is not conducive to generalizing trained models on the synthetic dataset to real-world scenes. + +To address the aforementioned limitations, we build a large-scale real-world dataset, named Ref-Reasoning. We generate semantically rich expressions over the scene graphs of images [14, 10] using diverse expression templates and functional programs, and automatically obtain the ground-truth annotations at all intermediate steps during the modularized generation process. Furthermore, we carefully balance the dataset by adopting uniform sampling and controlling the distribution of expression-referent pairs over the number of reasoning steps. + +In summary, this paper has the following contributions: + +- A scene graph guided modular neural network is proposed to perform reasoning over a semantic graph and a scene graph using neural modules under the guidance of the linguistic structure of referring expressions, which meets the fundamental requirement of grounding referring expres + +sions. + +- A large-scale real-word dataset, Ref-Reasoning, is constructed for grounding referring expressions. Ref-Reasoning includes semantically rich expressions describing objects, attributes, direct and indirect relations with a variety of reasoning layouts. +- Experimental results demonstrate that the proposed method not only significantly surpasses existing state-of-the-art algorithms on the new Ref-Reasoning dataset, but also outperforms state-of-the-art structured methods on common benchmark datasets. In addition, it can provide interpretable visual evidences of reasoning. + +# 2. Related Work + +# 2.1. Grounding Referring Expressions + +A referring expression normally not only directly describes the appearance of the referent, but also its relations to other objects in the image, and its reference information depends on the meanings of its constituent expressions and the rules used to compose them [9, 24]. However, most of the existing works [29, 23, 25] neglect linguistic structures and learn holistic representations for the objects in the image and the expression. Recently, there are some works which involve the expression analysis into their models, and learn the components of expression and visual inference from end to end. The methods in [9, 26, 28] softly decompose the expression into different semantic components relevant to different visual evidences, and compute a matching score for every component. They use fixed semantic components, e.g. subject-relation-object triplets [9] and subject-location-relation components [26], which are not feasible for complex expressions. DGA [24] analyzes linguistic structures for complex expressions by iteratively attending their constituent expressions. However, they all resort to self-attention on the expression to explore its linguistic structure but neglect its syntactic information. Another work [3] grounds the referent using a parse tree, where each node of the tree is a word (or phrase) which can be a noun, preposition or verb. + +# 2.2. Dataset Bias and Solutions + +Recently, the dataset bias began to be discussed for grounding referring expressions [4, 17]. The work in [4] reveals even the linguistically-motivated models tend to learn shallow correlations instead of making use of linguistic structures because of the dataset bias. In addition, expression-independent models can achieve high performance. The dataset bias can have a significantly negative impact on the evaluation of a model's readiness for joint understanding and reasoning for language and vision. + +![](images/06f430defbfbcf99df0902ad60b0ed1683017a420270bf6d6725012d294e9ecf.jpg) +Figure 2. An overview of our Scene Graph guided Modular Network (SGMN)(better viewed in color). Different colors represent different nodes in the language scene graph and their corresponding nodes in the image semantic graph. SGMN parses the expression into a language scene graph and constructs an image semantic graph over the objects in the input image. Next, it performs reasoning under the guidance of the language scene graph. It first locates the nodes in the image semantic graph for the leaf nodes in the language scene graph using neural modules AttendNode and Norm. Then for the intermediate nodes in the language scene graph, it uses AttendRelation, Transfer and Norm modules to attend the nodes in the image semantic graph, and the Merge module to combine the attention results. + +In order to address the above problem, the work in [17] proposes a new diagnostic dataset, called CLEVR-Ref+. Same as CLEVR [11] in visual question answering, it contains rendered images and automatically generated expressions. In particular, the objects in the images are simple 3D shapes with attributes (i.e., color, size and material), and the expressions are generated using designed templates which include spatial and same-attribute relations. However, the models trained on this synthetic dataset cannot be easily generalized to real-world scenes because the visual contents (i.e., simple 3D shapes with attributes and spatial relations) are too simple to jointly reason about language and vision. + +Thanks for the scene graph annotations of real-world images provided in the Visual Genome datasets [14] and further cleaned in the GQA dataset [10], we generate semantically rich expressions over the scene graphs with objects, attributes and relations using carefully designed templates along with functional programs. + +# 3. Approach + +We now present the proposed scene graph guided modular network (SGMN). As illustrated in Figure 2, given an input expression and an input image with visual objects, our SGMN first builds a pair of semantic graph and scene graph representations for the image and expression respectively, and then performs structured reasoning over the graphs using neural modules. + +# 3.1. Scene Graph Representations + +Scene graph based representations form the basis of our structured reasoning. In particular, the image semantic graph flexibly captures and represents all the visual contents needed for grounding referring expressions in the input image while the language scene graph explores the linguistic + +structure of the input expression, which defines the layout of the reasoning process. In addition, these two types of graphs have consistent structures, where the nodes and edges of the language scene graph respectively correspond to a subset of the nodes and edges of the image semantic graph. + +# 3.1.1 Image Semantic Graph + +Given an image with objects $\mathcal{O} = \{o_i\}_{i=1}^N$ , we define the image semantic graph over the objects $\mathcal{O}$ as a directed graph, $\mathcal{G}^o = (\mathcal{V}^o, \mathcal{E}^o)$ , where $\mathcal{V}^o = \{v_i^o\}_{i=1}^N$ is the set of nodes and node $v_i^o$ corresponds to object $o_i$ ; $\mathcal{E}^o = \{e_{ij}^o\}_{i,j=1}^N$ is the set of directed edges, and $e_{ij}^o$ is the edge from $v_j^o$ to $v_i^o$ , which denotes the relation between objects $o_j$ and $o_i$ . + +For each node $v_{i}^{o}$ , we obtain two types of features, visual feature $\mathbf{v}_{i}^{o}$ extracted from a pretrained CNN model and spatial feature $\mathbf{p}_{i}^{o} = [x_{i},y_{i},w_{i},h_{i},w_{i}h_{i}]$ , where $(x_{i},y_{i})$ , $w_{i}$ and $h_{i}$ are the normalized top-left coordinates, width and height of the bounding box of node $v_{i}$ respectively. For each edge $e_{ij}^{o}$ , we compute the edge feature $\mathbf{e}_{ij}^{o}$ by encoding the relative spatial feature $\mathbf{l}_{ij}^{o}$ between $v_{i}^{o}$ and $v_{j}^{o}$ and the visual feature $\mathbf{v}_{j}^{o}$ of node $v_{j}^{o}$ together because relative spatial information between objects along with their appearance information is the key indicator of their semantic relation [5]. Specifically, the relative spatial feature is represented as $\mathbf{l}_{ij}^{o} = \left[\frac{x_j - x_{ci}}{w_i},\frac{y_j - y_{ci}}{h_i},\frac{x_j + w_j - x_{ci}}{w_i},\frac{y_j + h_j - y_{ci}}{h_i},\frac{w_jh_j}{w_ih_i}\right]$ , where $(x_{ci},y_{ci})$ are the normalized center coordinates of the bounding box of node $v_{i}^{o}$ . And $\mathbf{e}_{ij}^{o}$ is the concatenation of an encoded version of $\mathbf{l}_{ij}^{o}$ and $\mathbf{v}_{j}^{o}$ , i.e., $\mathbf{e}_{ij}^{o} = [\mathbf{W}_{o}^{T}\mathbf{l}_{ij}^{o},\mathbf{v}_{j}^{o}]$ , where $\mathbf{W}_o$ is a learnable matrix. + +# 3.1.2 Language Scene Graph + +Given an expression $S$ , we first use an off-the-shelf scene graph parser [21] to parse the expression into an initial lan- + +guage scene graph, where a node and an edge of the graph correspond to an object and the relation between two objects mentioned in $S$ respectively, and the object is represented as an entity with a set of attributes. + +We define the language scene graph over $S$ as a directed graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , where $\mathcal{V} = \{v_{m}\}_{m = 1}^{M}$ is a set of nodes and node $v_{m}$ is associated with a noun or noun phrase, which is a sequence of words from $S$ ; $\mathcal{E} = \{e_k\}_{k = 1}^K$ is a set of edges and edge $e_k = (v_{ks},r_k,v_{ko})$ is a triplet of subject node $v_{ks}\in \mathcal{V}$ , object node $v_{ko}\in \mathcal{V}$ and relation $r_k$ , the direction of which is from $v_{ko}$ to $v_{ks}$ . Relation $r_k$ is associated with a preposition/verb word or phrase from $S$ , and $e_k$ indicates that subject node $v_{ks}$ is modified by object node $v_{ko}$ . + +# 3.2. Structured Reasoning + +We perform structured reasoning on the nodes and edges of graphs using neural modules under the guidance of the structure of language scene graph $\mathcal{G}$ . In particular, we first design the inference order and reasoning rules for its nodes $\mathcal{V}$ and edges $\mathcal{E}$ . Then, we follow the inference order to perform reasoning. For each node, we adopt theAttendNode module to find its corresponding node in graph $\mathcal{G}^o$ or use the Merge module to combine information from its incident edges. For each edge, we execute specific reasoning steps using carefully designed neural modules, including AttendNode, AttendRelation and Transfer. + +# 3.2.1 Reasoning Process + +In this section, we first introduce the inference order, and then present specific reasoning steps on the nodes and edges respectively. In general, for every node in language scene graph $\mathcal{G}$ , we learn its attention map over the nodes of image semantic graph $\mathcal{G}^o$ on the basis of its connections. + +Given a language scene graph $\mathcal{G}$ , we locate the node with zero out-degree as its referent node $v_{ref}$ because the referent is usually modified by other entities rather than modifying other entities in a referring expression. Then, we perform breadth-first traversal of the nodes in graph $\mathcal{G}$ from the referent node $v_{ref}$ by reversing the direction of all edges, meanwhile, push the visited nodes into a stack which is initially empty. Next, we iteratively pop one node from the stack and perform reasoning on the popped node. The stack determines the inference order for the nodes, and one node can reach the top of the stack only after all of its modifying nodes have been processed. This inference order essentially converts graph $\mathcal{G}$ into a directed acyclic graph. Without loss of generality, suppose node $v_m$ is popped from the stack in the present iteration, and we carry out reasoning on node $v_m$ on the basis of its connections to other nodes. There are two different situations: 1) If the in-degree of $v_m$ is zero, $v_m$ is a leaf node, which means node $v_m$ is not modified by any other nodes. Thus, node $v_m$ should be associated + +with the nodes of image semantic graph $\mathcal{G}^o$ independently; 2) otherwise, if node $v_{m}$ has incident edges $\mathcal{E}_m\in \mathcal{E}$ starting from other nodes, $v_{m}$ is an intermediate node, and its attention map over $\nu^{o}$ should depend on the attention maps of its connected nodes and the edges between them. + +Leaf node. We learn an embedding for the words associated with the nodes of the language scene graph $\mathcal{G}$ in advance. Then, for node $v_{m}$ , suppose its associated phrase consists of words $\{w_t\}_{t=1}^T$ , and the embedded feature vectors for these words are $\{\mathbf{f}_t\}_{t=1}^T$ . We use a bi-directional LSTM [7] to compute the context of every word in this phrase, and define the concatenation of the forward and backward hidden vectors of a word $w_t$ as its context, denoted as $\mathbf{h}_t$ . Meanwhile, we represent the whole phrase using the concatenation of the last hidden vectors of both directions, denoted as $\mathbf{h}$ . In a referring expression, an individual entity is often described by its appearance and spatial location. Therefore, we learn feature representations for node $v_{m}$ from both appearance and spatial location. In particular, inspired by self-attention in [9, 23, 26], we first learn the attention over each word on the basis of its context, and obtain feature representations $\mathbf{v}_m^{look}$ and $\mathbf{v}_m^{loc}$ at node $v_{m}$ by aggregating attention weighted word embedding as follows, + +$$ +\begin{array}{l} \alpha_ {t, m} ^ {\text {l o o k}} = \frac {\exp \left(\mathbf {W} _ {\text {l o o k}} ^ {T} \mathbf {h} _ {t}\right)}{\sum_ {t = 1} ^ {T} \exp \left(\mathbf {W} _ {\text {l o o k}} ^ {T} \mathbf {h} _ {t}\right)}, \mathbf {v} _ {m} ^ {\text {l o o k}} = \sum_ {t = 1} ^ {T} \alpha_ {t, m} ^ {\text {l o o k}} \mathbf {f} _ {t} \tag {1} \\ \alpha_ {t, m} ^ {l o c} = \frac {\exp \left(\mathbf {W} _ {l o c} ^ {T} \mathbf {h} _ {t}\right)}{\sum_ {t = 1} ^ {T} \exp \left(\mathbf {W} _ {l o c} ^ {T} \mathbf {h} _ {t}\right)}, \mathbf {v} _ {m} ^ {l o c} = \sum_ {t = 1} ^ {T} \alpha_ {t, m} ^ {l o c} \mathbf {f} _ {t}, \\ \end{array} +$$ + +where $\mathbf{W}_{look}$ and $\mathbf{W}_{loc}$ are learnable parameters, and $\mathbf{v}_m^{look}$ and $\mathbf{v}_m^{loc}$ correspond to the appearance and spatial location of node $v_m$ . Then, we feed these two features into theAttendNode neural module to compute attention maps $\{\lambda_{n,m}^{look}\}_{n=1}^N$ and $\{\lambda_{n,m}^{loc}\}_{n=1}^N$ over the nodes of image semantic graph $\mathcal{G}^o$ . Finally, we combine these two attention maps to obtain the final attention map for node $v_m$ . A noun phrase may place emphasis on appearance, spatial location or both of them. We flexibly adapt to the variations of noun phrases by learning a pair of weights at node $v_m$ for the attention maps related to appearance and spatial location. The weights (i.e. $\beta^{look}$ and $\beta^{loc}$ ) and the final attention map $\{\lambda_{n,m}\}_{n=1}^N$ for node $v_m$ are computed as follows, + +$$ +\begin{array}{l} \beta^ {l o o k} = \operatorname {s i g m o i d} \left(\mathbf {W} _ {0} ^ {T} \mathbf {h} + b _ {0}\right) \\ \beta^ {l o c} = \operatorname {s i g m o i d} \left(\mathbf {W} _ {1} ^ {T} \mathbf {h} + b _ {1}\right) (2) \\ \lambda_ {n, m} = \beta^ {\text {l o o k}} \lambda_ {n, m} ^ {\text {l o o k}} + \beta^ {\text {l o c}} \lambda_ {n, m} ^ {\text {l o c}} (2) \\ \left\{\lambda_ {n, m} \right\} _ {n = 1} ^ {N} = \operatorname {N o r m} \left(\left\{\lambda_ {n, m} \right\} _ {n = 1} ^ {N}\right), \\ \end{array} +$$ + +where $\mathbf{W}_0^T$ , $b_0$ , $\mathbf{W}_1^T$ and $b_1$ are learnable parameters, and the Norm module is used to constrain the scale of the attention map. + +Intermediate node. As an intermediate node, $v_{m}$ is connected to other nodes that modify it, and such connections are actually a subset of edges, $\mathcal{E}_{m} \in \mathcal{E}$ , incident to $v_{m}$ . We compute an attention map over the edges of image semantic graph $\mathcal{G}^o$ for each edge in this subset, then transfer and combine all these attention maps to obtain a final attention map for node $v_{m}$ . + +For each edge $e_k = (v_{k_s}, r_k, v_{k_o})$ in $\mathcal{E}_m$ (where $v_{k_s}$ is exactly $v_m$ ), we first form a sentence associated with $e_k$ by concatenating the words or phrases associated with $v_{k_s}$ , $r_k$ and $v_{k_o}$ . Then, we obtain the embedded feature vectors $\{\mathbf{f}_t\}_{t=1}^T$ and word contexts $\{\mathbf{h}_t\}_{t=1}^T$ for the words $\{w_t\}_{t=1}^T$ in this sentence and the feature representation of the whole sentence by following the same computation for leaf nodes. Next, we compute the attention map for node $v_{k_s}$ from two different aspects, i.e. subject description and relation-based transfer, because $e_k$ not only directly describes subject $v_{k_s}$ itself but also its relation to object $v_{k_o}$ . From the aspect of subject description, same as the computation for leaf nodes, we obtain attention maps corresponding to the appearance and spatial location of $v_{k_s}$ (i.e. $\{\lambda_{n,k_s}^{look}\}_{n=1}^N$ and $\{\lambda_{n,k_s}^{loc}\}_{n=1}^N$ ) and weights (i.e. $\beta_{k_s}^{look}$ and $\beta_{k_s}^{loc}$ ) to combine them. From the aspect of relation-based transfer, we first compute a relational feature representation for edge $e_k$ as follows, + +$$ +\alpha_ {t, k} ^ {r e l} = \frac {\exp \left(\mathbf {W} _ {r e l} ^ {T} \mathbf {h} _ {t}\right)}{\sum_ {t = 1} ^ {T} \exp \left(\mathbf {W} _ {r e l} ^ {T} \mathbf {h} _ {t}\right)}, \mathbf {r} _ {k} = \sum_ {t = 1} ^ {T} \alpha_ {t, k} ^ {r e l} \mathbf {f} _ {t} \tag {3} +$$ + +where $\mathbf{W}_{rel}$ is a learnable parameter. Then we feed the relational representation $\mathbf{r}_k$ to the AttendRelation neural module to attend the relation $\mathbf{r}_k$ over the edges $\mathcal{E}_{ij}^o$ of graph $\mathcal{G}^o$ , and the computed attention weights are denoted as $\{\gamma_{ij,k}\}_{i,j=1}^{N}$ . Moreover, we use the Transfer module and the Norm module to transfer the attention map $\{\lambda_{n,k_o}\}_{n=1}^N$ for object node $v_{ko}$ to node $v_m$ by modulating $\{\lambda_{n,k_o}\}_{n=1}^N$ with the attention weights on edges $\{\gamma_{ij,k}\}_{i,j=1}^N$ , and the transferred attention map for node $v_m$ is denoted as $\{\lambda_{n,k_s}^{rel}\}_{n=1}^N$ . It is worth mentioning that object node $v_{ko}$ has been accessed before and the attention map $\{\lambda_{n,k_o}\}_{n=1}^N$ for node $v_{ko}$ has been computed. Next, we estimate the weight of relation at edge $e_k$ and integrate the attention maps for node $v_{ks}$ related to subject description and relation-based transfer to obtain attention map $\{\lambda_{n,k_s}\}_{n=1}^N$ for node $v_{ks}$ contributed by edge $e_k$ , and $\{\lambda_{n,k_s}\}_{n=1}^N$ is defined as follows. + +$$ +\beta_ {k} ^ {r e l} = \operatorname {s i g m o i d} \left(\mathbf {W} _ {2} ^ {T} \mathbf {h} + b _ {2}\right) +$$ + +$$ +\lambda_ {n, k _ {s}} = \beta_ {k _ {s}} ^ {\text {l o o k}} \lambda_ {n, k _ {s}} ^ {\text {l o o k}} + \beta_ {k _ {s}} ^ {\text {l o c}} \lambda_ {n, k _ {s}} ^ {\text {l o c}} + \beta_ {n, k _ {s}} ^ {\text {r e l}} \lambda_ {n, k _ {s}} ^ {\text {r e l}} \tag {4} +$$ + +$$ +\{\lambda_ {n, k _ {s}} \} _ {n = 1} ^ {N} = \mathrm {N o r m} (\{\lambda_ {n, k _ {s}} \} _ {n = 1} ^ {N}), +$$ + +where $\mathbf{W}_2$ and $b_{2}$ are learnable parameters. + +Finally, we combine the attention maps $\{\{\lambda_{n,k_s}\}_{n = 1}^N\}$ for node $v_{m}$ contributed by all edges in $\mathcal{E}_m$ using the Merge + +module followed by the Norm module to obtain the final attention map $\{\lambda_{n,m}\}_{n = 1}^{N}$ for node $v_{m}$ . + +# 3.2.2 Neural Modules + +We present a series of neural modules to perform specific reasoning steps, inspired by the neural modules in [22]. In particular, theAttendNode andAttendRelation modules are used to connect the language mode with the vision mode. They receive feature representations of linguistic contents from the language scene graph and output attention maps of the features defined over visual contents in the image semantic graph. The Merge, Norm and Transfer modules are adopted to further integrate and transfer attention maps over the nodes and edges of the image semantic graph. + +AttendNode [appearance query, location query] module aims to find relevant nodes among the nodes of the image semantic graph $\mathcal{G}^o$ given an appearance query and location query. It takes the query vectors of the appearance query and location query as inputs and generate attention maps $\{\lambda_n^{look}\}_{n = 1}^N$ and $\{\lambda_n^{loc}\}_{n = 1}^N$ over the nodes $\mathcal{V}^o$ , where every node $v_{n}^{o}\in \mathcal{V}^{o}$ has two attention weights, i.e., $\lambda_{n}^{look}\in [-1,1]$ and $\lambda_{n}^{loc}\in [-1,1]$ . The query vectors are linguistic features at nodes of the language scene graph, denoted as $\mathbf{v}^{look}$ and $\mathbf{v}^{loc}$ . For node $v_{n}^{o}$ in graph $\mathcal{G}^o$ , its attention weights $\lambda_{n}^{look}$ and $\lambda_{n}^{loc}$ are defined as follows, + +$$ +\lambda_ {n} ^ {\text {l o o k}} = \langle \mathrm {L 2 N o r m} (\mathrm {M L P} _ {0} (\mathbf {v} _ {n} ^ {o})), \mathrm {L 2 N o r m} (\mathrm {M L P} _ {1} (\mathbf {v} ^ {\text {l o o k}})) \rangle , +$$ + +$$ +\lambda_ {n} ^ {\text {l o c}} = \left\langle \mathrm {L 2 N o r m} \left(\mathrm {M L P} _ {2} \left(\mathbf {p} _ {n} ^ {o}\right)\right), \mathrm {L 2 N o r m} \left(\mathrm {M L P} _ {3} \left(\mathbf {v} ^ {\text {l o c}}\right)\right) \right\rangle , \tag {5} +$$ + +where $\mathrm{MLP}_0()$ , $\mathrm{MLP}_1()$ , $\mathrm{MLP}_2()$ and $\mathrm{MLP}_3()$ are multi-layer perceptrons consisting of several linear and ReLU layers, L2Norm() is the L2 normalization, and $\mathbf{v}_n^o$ and $\mathbf{p}_n^o$ are the visual feature and spatial feature at node $v_n^o$ respectively, which are mentioned in Section 3.1.1. + +AttendRelation [relation query] module aims to find relevant edges in the image semantic graph $\mathcal{G}^o$ given a relation query. The purpose of a relation query is to establish connections between nodes in graph $\mathcal{G}^o$ . Given query vector $\mathbf{e}$ , the attention weights $\{\gamma_{ij}\}_{i,j=1}^{N}$ on edges $\{\mathbf{e}_{ij}^o\}_{i,j=1}^{N}$ are defined as follows, + +$$ +\gamma_ {i j} = \sigma \left(\left\langle \mathrm {L 2 N o r m} \left(\mathrm {M L P} _ {5} \left(\mathbf {e} _ {i j} ^ {o}\right)\right), \mathrm {L 2 N o r m} \left(\mathrm {M L P} _ {1} (\mathbf {e})\right) \right\rangle\right) \tag {6} +$$ + +where $\mathrm{MLP}_5()$ , $\mathrm{MLP}_5()$ are multilayer perceptrons, and the ReLU activation function $\sigma$ ensures the attention weights are larger than zero. + +Transfer module aims to find new nodes by passing attention weights $\{\lambda_{n}\}_{n = 1}^{N}$ on nodes that modify those new nodes along attended edges $\{\gamma_{ij}\}_{i,j = 1}^{N}$ . The updated attention weights $\{\lambda_{n}^{new}\}_{n = 1}^{N}$ are calculated as follows, + +$$ +\lambda_ {n} ^ {\text {n e w}} = \sum_ {j = 1} ^ {N} \gamma_ {n, j} \lambda_ {j}. \tag {7} +$$ + +Merge module aims to combine multiple attention maps generated from different edges of the same node, where the attention weights over edges are computed individually. Given the set of attention maps $\Lambda$ for a node, the merged attention map $\{\lambda_n\}_{n=1}^N$ is defined as follows, + +$$ +\lambda_ {n} = \sum_ {\left\{\lambda_ {n} ^ {\prime} \right\} _ {n = 1} ^ {N} \in \Lambda} \lambda_ {n} ^ {\prime}. \tag {8} +$$ + +Norm module aims to set the range of weights in attention maps to $[-1, 1]$ . If the maximum absolute value of an attention map is larger than 1, the attention map is divided by the maximum absolute value. + +# 3.3. Loss Function + +Once all the nodes in the stack have been processed, the final attention map for the referent node of the language scene graph is obtained. This attention map is denoted as $\{\lambda_{n,ref}\}_{n=1}^{N}$ . As in previous methods for grounding referring expressions [9], during the training phase, we adopt the cross-entropy loss, which is defined as + +$$ +p _ {i} = \exp \left(\lambda_ {i, r e f}\right) / \sum_ {n = 1} ^ {N} \exp \left(\lambda_ {n, r e f}\right), \text {l o s s} = - \log \left(p _ {g t}\right) \tag {9} +$$ + +where $p_{gt}$ is the probability of the ground-truth object. During the inference phase, we predict the referent by choosing the object with the highest probability. + +# 4. Ref-Reasoning Dataset + +The proposed dataset is built on the scenes from the GQA dataset [10]. We automatically generate referring expressions for every image on the basis of the image scene graph using a diverse set of expression templates. + +# 4.1. Preparation + +Scene Graph. We generate referring expressions according to the ground-truth image scene graphs. Specifically, we adopt the scene graph annotations provided by the Visual Genome dataset [14] and further normalized by the GQA dataset. In a scene graph annotation of an image, each node represents an object with about 1-3 attributes, and each edge represents a relation (i.e., semantic relation, spatial relation and comparatives) between two objects. In order to use the scene graphs for referring expression generation, we remove some unnatural edges and classes, e.g., "nose left of eyes". In addition, we add edges between objects to represent same-attribute relations between objects, i.e., "same material", "same color" and "same shape". In total, there are 1,664 object classes, 308 relation classes and 610 attribute classes in the adopted scene graphs. + +Expression Template. In order to generate referring expressions with diverse reasoning layouts, for each specified number of nodes, we design a family of referring expression templates for each reasoning layout. We generate expressions according to layouts and templates using functional programs, and the functional program for each template can be easily obtained according to the layout. In particular, layouts are sub-graphs of directed acyclic graphs, where only one node (i.e., the root node) has zero out-degree and other nodes can reach the root node. The functional program for a layout provides a step-wise plan for reaching the root node from leaf nodes (i.e., the nodes with zero in-degree) by traversing all the nodes and edges in this layout, and templates are parameterized natural language expressions, where the parameters can be filled in. Moreover, we set the constraint that the number of nodes in a template ranges from one to five. + +# 4.2. Generation Process + +Given an image, we generate dozens of expressions from the scene graph of the image, and the generation process for one expression is summarized as follows, + +- Randomly sample the referent node and randomly decide the number of nodes, denoted as $C$ . +- Randomly sample a sub-graph with $C$ nodes including the referent node in the scene graph. +- Judge the layout of the sub-graph and randomly sample a referring expression template from the family of templates corresponding to the layout. +- Fill in the parameters in the template using contents of the sub-graph, including relations and objects with randomly sampled attributes. +- Execute the functional program with filled parameters and accept the expression if the referred object is unique in the scene graph. + +Note that we perform extra operations during the generation process: 1) If there are objects that have same-attribute relations in the sub-graph, we avoid choosing the attributes that appear in such relations for these objects. This restriction intends to make the modified node identified by the relation edge instead of the attribute directly. 2) To help balance the dataset, during the process of random sampling, we decrease the chances of nodes and relations whose classes most commonly exist in the scene graphs. In addition, we increase the chances of multi-order relationships with $C = 3$ or $C = 4$ to reasonably increase the level of difficulty for reasoning. 3) We define a difficulty level for a referring expression. We find its shortest sub-expression which can identify the referent in the scene graph, and the number of objects in the sub-expression is defined as the difficulty level. For example, if there is only one bottle in an image, the difficulty level of "the bottle on a table beside + +
Number of ObjectsSplit
onetwothree>= fourvaltest
CNN10.5713.1114.2111.3212.3612.15
CNN+LSTM75.2951.8546.2632.4542.3842.43
DGA73.1454.6348.4837.6345.3745.87
CMRIN79.2056.8750.0735.2945.4345.87
Ours SGMN79.7161.7755.5741.8951.0451.39
+ +Table 1. Comparison with baselines and state-of-the-art methods on Ref-Reasoning dataset. The best performing method is marked in bold. + +a plate" is still one even though it describes three objects and their relations. Then, we obtain the balanced dataset and its final splits by randomly sampling expressions of images according to their difficulty level and the number of nodes described by them. + +# 5. Experiments + +# 5.1. Datasets + +We have conducted extensive experiments on the proposed Ref-Reasoning dataset as well as on three commonly used benchmark datasets (i.e., RefCOCO[27], RefCOCO+[27] and RefCOCOg[19]). Ref-Reasoning contains 791,956 referring expressions in 83,989 images. It has 721,164, 36,183 and 34,609 expression-referent pairs for training, validation and testing, respectively. Ref-Reasoning includes semantically rich expressions describing objects, attributes, direct relations and indirect relations with different layouts. RefCOCO and RefCOCO+ datasets include short expressions collected from an interactive game interface. RefCOCOg collects from a noninteractive settings and it has longer complex expressions. + +# 5.2. Implementation and Evaluation + +The performance of grounding referring expressions is evaluated by accuracy, i.e., the fraction of correct predictions of referents. + +For the Ref-Reasoning dataset, we use a ResNet-101 based Faster R-CNN [20, 6] as the backbone, and adopt a feature extractor which is trained on the training set of GQA with an extra attribute loss following [1]. Visual features of annotated objects are extracted from the pool5 layer of the feature extractor. For the three common benchmark datasets (i.e., RefCOCO, RefCOCO+ and RefCOCOg), we follow CMRIN [23] to extract the visual features of objects in images. To keep the image semantic graph sparse and reduce computational cost, we connect each node in the image semantic graph to its five nearest nodes based on the distances between their normalized center coordinates. We set the mini-batch size to 64. All the models are trained by the Adam optimizer [13] with the learning rate set to 0.0001 and 0.0005 for the Ref-Reasoning dataset and other benchmark datasets respectively. + +# 5.3. Comparison with the State of the Art + +We conduct experimental comparisons between the proposed SGMN and existing state-of-the-art methods on both the collected Ref-Reasoning dataset and three commonly used benchmark datasets. + +Ref-Reasoning Dataset. We evaluate two baselines (i.e., a CNN model and a CNN+LSTM model), two state-of-the-art methods (i.e., CMRIN [23] and DGA [24]) and the proposed SGMN on the Ref-Reasoning dataset. The CNN model is allowed to access objects and images only. The CNN+LSTM model embeds objects and expressions into a common feature space and learns matching scores between them. For CMRIN and DGA, we adopt their default settings [23, 24] in our evaluation. For a fair comparison, all the models use the same visual object features and the same setting in LSTMs. + +Table 1 shows the evaluation results on the Ref-Reasoning dataset. The proposed SGMN significantly outperforms the baselines and existing state-of-the-art models, and it consistently achieves the best performance on all the splits of the testing set, where different splits need different numbers of reasoning steps. The CNN model has a low accuracy of $12.15\%$ , which is much lower than the accuracy (i.e., $41.1\%$ [4]) of the image-only model for the Ref-COCOg dataset, which demonstrates that joint understanding of images and text is required on Ref-Reasoning. The CNN+LSTM model achieves a high accuracy of $75.29\%$ on the split where expressions directly describe the referents. This is because relation reasoning is not required in this split and LSTM may be qualified to capture the semantics of expressions. Compared with the CNN+LSTM model, DGA and CMRIN achieve higher performance on the two-, three- and four-node splits because they learn a language-guided contextual representation for objects. + +Common Benchmark Datasets. Quantitative evaluation results on RefCOCO, RefCOCO+ and RefCOCOg datasets are shown in Table 2. The proposed SGMN consistently outperforms existing structured methods across all the datasets, and it improves the average accuracy over the testing sets achieved by the best performing existing structured method by $0.92\%$ , $2.54\%$ and $2.96\%$ respectively on the RefCOCO, RefCOCO+ and RefCOCOg datasets. Moreover, it also surpasses all the existing models on the + +
RefCOCORefCOCO+RefCOCOg
testAtestBtestAtestBtest
Holistic Models
CMN [9]75.9479.5759.2959.34-
ParallelAttn [29]80.8181.3266.3161.46-
MAttNet* [26]85.2684.5775.1366.1778.12
CMRIN* [23]87.6384.7380.9368.9980.66
DGA* [24]86.6484.7978.3168.1580.26
Structured Models
MattNet* + parser [26]79.7181.2268.3062.9473.72
RvG-Tree* [8]82.5282.9070.2165.4975.20
DGA* + parser [24]84.6983.6974.8365.4376.33
NMTree* [15]85.6385.0875.7467.6278.21
MSGL* [16]85.4585.1275.3167.5078.46
Ours SGMN*86.6785.3678.6669.7781.42
+ +Table 2. Comparison with state-of-the-art methods on RefCOCO, RefCOCO+ and RefCOCOg. We use * to indicate this model uses resnet101 features. None-superscript indicates that model uses vgg16 features. The best performing method is marked in bold. + +RefCOCOg dataset which has relatively longer complex expressions with an average length 8.43, and achieves a performance comparable to the best performing holistic method on the other two common benchmark datasets. Note that holistic models usually have higher performance than structured models on the common benchmark datasets because those datasets include many simple expressions describing the referents without relations, and holistic models are prone to learn shallow correlations without reasoning and may exploit this dataset bias [4, 17]. In addition, the inference mechanism of holistic methods has poor interpretability. + +# 5.4. Qualitative Evaluation + +![](images/4ce901313e551cd473a02939217ebf61b1636869d198e3afb6300091a5542564.jpg) +Figure 3. Qualitative results showing the attention maps over the objects along the language scene graphs predicted by the SGMN. + +Visualizations of two examples along with their language scene graphs and attention maps over the objects in images at every node of the language scene graphs are shown in Figure 3. This qualitative evaluation results demonstrate that the proposed SGMN can generate interpretable visual evidences of intermediate steps in the reasoning process. In Figure 3(a), SGMN parses the expression into a tree structure and finds the referred "woman" who is walking "a dog" and meanwhile is with "pink and + +black hair". Figure 3(b) shows a more complex expression which describes four objects and their relations. SGMN first successfully changes from the initial attention map (bottom-right) to the final attention map (top-right) at the node "a chair" by performing relational reasoning along the edges (i.e., triplets ("a chair", "to the left of", "lamp") and ("lamp", "on", "a floor))), and then identifies the target "blanket" on that chair. + +# 5.5. Ablation Study + +
Number of ObjectsSplit
onetwothree>= fourvaltest
w/o transfer79.1448.5145.9731.5740.6641.88
w/o norm79.3749.4445.6131.5740.8041.93
max merge78.7154.0050.3434.7644.5045.27
min merge78.8353.8351.1135.7945.2546.00
Ours SGMN79.7161.7755.5741.8951.0451.39
+ +Table 3. Ablation study on Ref-Reasoning dataset. The best performing method is marked in bold. + +To demonstrate the effectiveness of reasoning under the guidance of scene graphs inferred from referring expressions as well as the design of neural modules, we train four additional models for comparison. The results are shown in Table 3. All the models have similar performance on the split of expressions directly describing the referents. For the other splits, SGMN without the Transfer module and SGMN without the Norm module have much lower performance than the original SGMN because the former treats the referent as an isolated node without performing relation reasoning while the latter unfairly treats different relational edges and the nodes connected by them. Next, we explore different options of the function (i.e., max, min and sum) used in the Merge module. Compared to SGMN with sum-merge, its performance with min-merge and max-merge drops because max-merge only captures the most significant relation for each intermediate node and min-merge is sensitive to parsing errors and recognition errors. + +# 6. Conclusion + +In this paper, we present a scene graph guided modular network (SGMN) for grounding referring expressions. It performs graph-structured reasoning over the constructed graph representations of the input image and expression using neural modules. In addition, we propose a large-scale real-world dataset for structured referring expression reasoning, named Ref-Reasoning. Experimental results demonstrate that SGMN not only significantly outperforms existing state-of-the-art algorithms on the new Ref-Reasoning dataset, but also surpasses state-of-the-art structured methods on commonly used benchmark datasets. Moreover, it can generate interpretable visual evidences of reasoning via a graph attention mechanism. + +# 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 Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), 2018. 7 +[2] 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. 2 +[3] Volkan Cirik, Taylor Berg-Kirkpatrick, and Louis-Philippe Morency. Using syntax to ground referring expressions in natural images. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 2 +[4] Volkan Cirik, Louis-Philippe Morency, and Taylor Berg-Kirkpatrick. Visual referring expression recognition: What do systems actually learn? arXiv preprint arXiv:1805.11818, 2018. 2, 7, 8 +[5] Bo Dai, Yuqi Zhang, and Dahua Lin. Detecting visual relationships with deep relational networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 3 +[6] 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 (CVPR), pages 770-778, 2016. 7 +[7] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. 4 +[8] R. Hong, D. Liu, X. Mo, X. He, and H. Zhang. Learning to compose and reason with language tree structures for visual grounding. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-1, 2019. 1, 8 +[9] Ronghang Hu, Marcus Rohrbach, Jacob Andreas, Trevor Darrell, and Kate Saenko. Modeling relationships in referential expressions with compositional modular networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1115-1124, 2017. 2, 4, 6, 8 +[10] Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6700-6709, 2019. 2, 3, 6 +[11] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2901–2910, 2017. 3 +[12] Sahar Kazemzadeh, Vicente Ordonez, Mark Matten, and Tamara Berg. Referitgame: Referring to objects in photographs of natural scenes. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 787-798, 2014. 2 +[13] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2015. 7 + +[14] 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. 2, 3, 6 +[15] Daqing Liu, Hanwang Zhang, Zheng-Jun Zha, and Wu Feng. Learning to assemble neural module tree networks for visual grounding. In The IEEE International Conference on Computer Vision (ICCV), 2019. 2, 8 +[16] Daqing Liu, Hanwang Zhang, Zheng-Jun Zha, and Fanglin Wang. Referring expression grounding by marginalizing scene graph likelihood, 2019. 2, 8 +[17] Runtao Liu, Chenxi Liu, Yutong Bai, and Alan L Yuille. Clevr-ref+: Diagnosing visual reasoning with referring expressions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4185-4194, 2019. 2, 3, 8 +[18] Ruotian Luo and Gregory Shakhnarovich. Comprehension-guided referring expressions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7102-7111, 2017. 1 +[19] Junhua Mao, Jonathan Huang, Alexander Toshev, Oana Camburu, Alan L Yuille, and Kevin Murphy. Generation and comprehension of unambiguous object descriptions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 11-20, 2016. 2, 7 +[20] 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. 7 +[21] Sebastian Schuster, Ranjay Krishna, Angel Chang, Li Fei-Fei, and Christopher D Manning. Generating semantically precise scene graphs from textual descriptions for improved image retrieval. In Proceedings of the fourth workshop on vision and language, pages 70–80, 2015. 2, 3 +[22] Jiaxin Shi, Hanwang Zhang, and Juanzi Li. Explainable and explicit visual reasoning over scene graphs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8376-8384, 2019. 2, 5 +[23] Sibei Yang, Guanbin Li, and Yizhou Yu. Cross-modal relationship inference for grounding referring expressions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4145-4154, 2019. 1, 2, 4, 7, 8 +[24] Sibei Yang, Guanbin Li, and Yizhou Yu. Dynamic graph attention for referring expression comprehension. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 7, 8 +[25] Sibei Yang, Guanbin Li, and Yizhou Yu. Relationship-embedded representation learning for grounding referring expressions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. 2 +[26] Licheng Yu, Zhe Lin, Xiaohui Shen, Jimei Yang, Xin Lu, Mohit Bansal, and Tamara L Berg. Mattnet: Modular attention network for referring expression comprehension. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1307-1315, 2018. 1, 2, 4, 8 + +[27] Licheng Yu, Patrick Poirson, Shan Yang, Alexander C Berg, and Tamara L Berg. Modeling context in referring expressions. In European Conference on Computer Vision, pages 69-85. Springer, 2016. 2, 7 +[28] Hanwang Zhang, Yulei Niu, and Shih-Fu Chang. Grounding referring expressions in images by variational context. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4158-4166, 2018. 2 +[29] Bohan Zhuang, Qi Wu, Chunhua Shen, Ian Reid, and Anton van den Hengel. Parallel attention: A unified framework for visual object discovery through dialogs and queries. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4252-4261, 2018. 1, 2, 8 \ No newline at end of file diff --git a/graphstructuredreferringexpressionreasoninginthewild/images.zip b/graphstructuredreferringexpressionreasoninginthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8274f929265d7e627e8c5c39e793291714aa85d8 --- /dev/null +++ b/graphstructuredreferringexpressionreasoninginthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b0cd0447623143b01df94f71ce497d7693067e85c6a0a757f7f2420992889de +size 355832 diff --git a/graphstructuredreferringexpressionreasoninginthewild/layout.json b/graphstructuredreferringexpressionreasoninginthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c4373ae732d708e649fc316f77308d811250811f --- /dev/null +++ b/graphstructuredreferringexpressionreasoninginthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47be3d8bdde7a0d53254bac61258aaa44741fc98c90881c8087c1d002fc180ec +size 449264 diff --git a/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_content_list.json b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0947234bda4f70f9acc7ee62d935a3818c6d530d --- /dev/null +++ b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cab05088e2eb833c91419338c19b6abda5da60ee69b249df2a9c52c642861bd6 +size 88258 diff --git a/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_model.json b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_model.json new file mode 100644 index 0000000000000000000000000000000000000000..788ead7dd38e365dfad439b09f55cf9b59994dd5 --- /dev/null +++ b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fa89a9f2ec8367abcb7d44e5fa5a57819cce9a36247910fb0453a2f91fd86f5 +size 110298 diff --git a/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_origin.pdf b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bc143e1d99f9413b69cb3b6d96ebdc980754cf3c --- /dev/null +++ b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/6e519e45-b659-407f-aa5c-08841b885d02_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a15a1c8b3fb0f6eedef3b8ae7b34671c228ec2c0f47c4c2813e976c0bcea1d3 +size 3559380 diff --git a/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/full.md b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d2978371ff0b2e1af249831af14862287c22fd02 --- /dev/null +++ b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/full.md @@ -0,0 +1,377 @@ +# GraphTER: Unsupervised Learning of Graph Transformation Equivariant Representations via Auto-Encoding Node-wise Transformations + +Xiang Gao $^{1}$ , Wei Hu $^{1,*}$ , and Guo-Jun Qi $^{2}$ + +$^{1}$ Wangxuan Institute of Computer Technology, Peking University, Beijing $^{2}$ Futurewei Technologies + +{gyshgx868, forhuwei}@pku.edu.cn, guojunq@gmail.com + +# Abstract + +Recent advances in Graph Convolutional Neural Networks (GCNNs) have shown their efficiency for non-Euclidean data on graphs, which often require a large amount of labeled data with high cost. It is thus critical to learn graph feature representations in an unsupervised manner in practice. To this end, we propose a novel unsupervised learning of Graph Transformation Equivariant Representations (GraphTER), aiming to capture intrinsic patterns of graph structure under both global and local transformations. Specifically, we allow to sample different groups of nodes from a graph and then transform them node-wise isotropically or anisotropically. Then, we self-train a representation encoder to capture the graph structures by reconstructing these node-wise transformations from the feature representations of the original and transformed graphs. In experiments, we apply the learned GraphTER to graphs of 3D point cloud data, and results on point cloud segmentation/classification show that GraphTER significantly outperforms state-of-the-art unsupervised approaches and pushes greatly closer towards the upper bound set by the fully supervised counterparts. The code is available at: https://github.com/gyshgx868/graph-ter. + +# 1. Introduction + +Graphs are a natural representation of irregular data, such as 3D geometric points, social networks, citation networks and brain networks. Recent advances in Graph Convolutional Neural Networks (GCNNs) have shown their efficiency in learning representations of such data [4, 54, 53, 46], which generalize the celebrated CNN models. Existing GCNNs are mostly trained in a supervised or semi-supervised fashion, requiring a large amount of labeled data to learn graph representations. This prevents the wide appli + +![](images/a1de6ca223f9405e329767efa39f961c12bc2f475719016943bb412ce93196e5.jpg) +Figure 1. An illustration of the proposed GraphTER model for unsupervised feature learning. The encoder learns representations of the original graph data $\mathbf{X}$ associated with adjacency matrix $\mathbf{A}$ and its transformed counterpart $\mathbf{t}(\mathbf{X})$ associated with $\tilde{\mathbf{A}}$ respectively. By decoding node-wise transformations $\mathbf{t}$ from both representations, the auto-encoder is able to learn intrinsically morphable structures of graphs. + +cability of GCNNs due to the high labeling cost especially for large-scale graphs in many real scenarios. Hence, it is demanded to train graph feature representations in an unsupervised fashion, which can adapt to downstream learning tasks on graphs. + +Auto-Encoders (AEs) and Generative Adversarial Networks (GANs) are two most representative methods for unsupervised learning. Auto-encoders aim to train an encoder to learn feature representations by reconstructing input data via a decoder [42, 36, 16, 18]. Most of auto-encoders stick to the idea of reconstructing input data at the output end (e.g., images [16], graphs [19], 3D point clouds [48]), and thus can be classified into the Auto-Encoding Data (AED) [51]. In contrast, GANs [14, 10, 11, 50, 26, 7, 3] extract feature representations in an unsupervised fashion by generating data from input noises via a pair of generator and discriminator, where the noises are viewed as the data representations, and the generator is trained to generate data from the "noise" feature representations. + +Based on AEs and GANs, many approaches have sought + +to learn transformation equivariant representations (TER) to further improve the quality of unsupervised representation learning. It assumes that representations equivarying to transformations are able to encode the intrinsic structures of data such that the transformations can be reconstructed from the representations before and after transformations [34]. Learning transformation equivariant representations has been advocated in Hinton's seminal work on learning transformation capsules [16]. Following this, a variety of approaches have been proposed to learn transformation equivariant representations [20, 41, 38, 40, 23, 12, 9, 8]. Among them are the group equivariant convolutions [6] and group equivariant capsule networks [24] that generalize the CNNs and capsule nets to equivary to various transformations. However, these models are restricted to discrete transformations, and they should be trained in a supervised fashion. This limits their ability to learn unsupervised representations equivariant to a generic composition of continuous transformations [34]. + +To generalize to generic transformations, Zhang et al. [51] propose to learn unsupervised feature representations via Auto-Encoding Transformations (AET) rather than AED. By randomly transforming images, they seek to train auto-encoders by directly reconstructing these transformations from the learned representations of both the original and transformed images. A variational AET [35] is also introduced from an information-theoretic perspective by maximizing the lower bound of mutual information between transformations and representations. Moreover, it has also been theoretically proved [34, 35] that the unsupervised representations by the AET are equivariant to the applied transformations. Unfortunately, these works focus on transformation equivariant representation learning of images that are Euclidean data, which cannot be extended to graphs due to the irregular data structures. + +In this paper, we take a first step towards this goal - we formalize Graph Transformation Equivariant Representation (GraphTER) learning by auto-encoding node-wise transformations in an unsupervised manner. The proposed method is novel in twofold aspects. On one hand, we define graph signal transformations and present a graph-based auto-encoder architecture, which encodes the representations of the original and transformed graphs so that the graph transformations can be reconstructed from both representations. On the other hand, in contrast to the AET where global spatial transformations are applied to the entire input image, we perform node-wise transformations on graphs, where each node can have its own transformation. Representations of individual nodes are thus learned by decoding node-wise transformations to reveal the graph structures around it. These representations will not only capture the local graph structures under node-wise transformations, but also reveal global information about the graph + +as we randomly sample nodes into different groups over training iterations. Different groups of nodes model different parts of graphs, allowing the learned representations to capture various scales of graph structures under isotropic and/or anisotropic node-wise transformations. This results in transformation equivariant representations to characterize the intrinsically morphable structures of graphs. + +Specifically, given an input graph signal and its associated graph, we sample a subset of nodes from the graph (globally or locally) and perform transformations on individual nodes, either isotropically or anisotropically. Then we design a full graph-convolution auto-encoder architecture, where the encoder learns the representations of individual nodes in the original and transformed graphs respectively, and the decoder predicts the applied node-wise transformations from both representations. Experimental results demonstrate that the learned GraphTER significantly outperforms the state-of-the-art unsupervised models, and achieves comparable results to the fully supervised approaches in the 3D point cloud classification and segmentation tasks. + +Our main contributions are summarized as follows. + +- We are the first to propose Graph Transformation Equivariant Representation (GraphTER) learning to extract adequate graph signal feature representations in an unsupervised fashion. +- We define generic graph transformations and formalize the GraphTER to learn feature representations of graphs by decoding node-wise transformations end-to-end in a full graph-convolution auto-encoder architecture. +- Experiments demonstrate the GraphTER model outperforms the state-of-the-art methods in unsupervised graph feature learning as well as greatly pushes closer to the upper bounded performance by the fully supervised counterparts. + +The remainder of this paper is organized as follows. We first review related works in Sec. 2. Then we define graph transformations in Sec. 3 and formalize the Graph-TER model in Sec. 4. Finally, experimental results and conclusions are presented in Sec. 5 and Sec. 6, respectively. + +# 2. Related Works + +Transformation Equivariant Representations. Many approaches have been proposed to learn equivariant representations, including transforming auto-encoders [16], equivariant Boltzmann machines [20, 41], equivariant descriptors [38], and equivariant filtering [40]. Lenc et al. [23] prove that the AlexNet [22] trained on ImageNet learns representations that are equivariant to flip, scaling and rotation transformations. Gens et al. [12] propose an approximately equivariant convolutional architecture, which utilizes sparse and high-dimensional feature maps to deal with + +groups of transformations. Dieleman et al. [9] show that rotation symmetry can be exploited in convolutional networks for effectively learning an equivariant representation. This work is later extended in [8] to evaluate on other computer vision tasks that have cyclic symmetry. Cohen et al. [6] propose group equivariant convolutions that have been developed to equivary to more types of transformations. The idea of group equivariance has also been introduced to the capsule nets [24] by ensuring the equivariance of output pose vectors to a group of transformations. Zhang et al. [51] propose to learn unsupervised feature representations via Auto-Encoding Transformations (AET) by estimating transformations from the learned feature representations of both the original and transformed images. This work is later extended in [35] by introducing a variational transformation decoder, where the AET model is trained from an information-theoretic perspective by maximizing the lower bound of mutual information. + +Auto-Encoders and GANs. Auto-encoders (AEs) have been widely adopted to learn unsupervised representations [17], which employ an encoder to extract feature representations and a decoder to reconstruct the input data from the representations. The idea is based on good feature representations should contain sufficient information to reconstruct the input data. A large number of approaches have been proposed following this paradigm of Auto-Encoding Data (AED), including variational AEs (VAEs) [18], denoising AEs [42], contrastive AEs [36], transforming AEs [16], etc. Based on the above approaches, graph AEs have been proposed to learn latent representations for graphs. These approaches basically learn graph embeddings for plain graphs [5, 43] and attributed graphs [19, 31], which are still trained in the AED fashion. In addition to AEs, Generative Adversarial Networks (GANs) [14] become popular for learning unsupervised representations of data, which tend to generate data from noises sampled from a random distribution. The basic idea of these models is to treat the sampled noise as the feature of the output data, and an encoder can be trained to obtain the "noise" feature representations for input data, while the generator is treated as the decoder to generate data from the "noise" feature representations [10, 11]. Recently, several approaches have been proposed to build graph GANs. For instance, [50] and [26] propose to generate nodes and edges alternately, while [7] and [3] propose to integrate GCNNs with LSTMs and GANs respectively to generate graphs. + +# 3. Graph Transformations + +# 3.1. Preliminaries + +Consider an undirected graph $\mathcal{G} = \{\mathcal{V},\mathcal{E}\}$ composed of a node set $\mathcal{V}$ of cardinality $|\mathcal{V}| = N$ and an edge set $\mathcal{E}$ connecting nodes. Graph signal refers to data/features associated with the nodes of $\mathcal{G}$ , denoted by $\mathbf{X}\in \mathbb{R}^{N\times C}$ with + +$i$ th row representing the $C$ -dimensional graph signal at the $i$ th node of $\mathcal{V}$ . + +To characterize the similarities (and thus the graph structure) among node signals, an adjacency matrix $\mathbf{A}$ is defined on $\mathcal{G}$ , which is a real-valued symmetric $N\times N$ matrix with $a_{i,j}$ as the weight assigned to the edge $(i,j)$ connecting nodes $i$ and $j$ . Formally, the adjacency matrix is constructed from graph signals as follows, + +$$ +\mathbf {A} = f (\mathbf {X}), \tag {1} +$$ + +where $f(\cdot)$ is a linear or non-linear function applied to each pair of nodes to get the pair-wise similarity. For example, a widely adopted function is to nonlinearly construct a $k$ -nearest-neighbor (kNN) graph from node features [44, 52]. + +# 3.2. Graph Signal Transformation + +Unlike Euclidean data like images, graph signals are irregularly sampled, whose transformations are thus nontrivial to define. To this end, we define a graph transformation on the signals $\mathbf{X}$ as node-wise filtering on $\mathbf{X}$ . + +Formally, suppose we sample a graph transformation $\mathbf{t}$ from a transformation distribution $\mathcal{T}_g$ , i.e., $\mathbf{t} \sim \mathcal{T}_g$ . Applying the transformation to graph signals $\mathbf{X}$ that are sampled from data distribution $\mathcal{X}_g$ , i.e., $\mathbf{X} \sim \mathcal{X}_g$ , leads to the filtered graph signal + +$$ +\tilde {\mathbf {X}} = \mathbf {t} (\mathbf {X}). \tag {2} +$$ + +The filter $\mathbf{t}$ is applied to each node individually, which can be either node-invariant or node-variant. In other words, the transformation of each node signal associated with $\mathbf{t}$ can be different from each other. For example, for a translation $\mathbf{t}$ , a distinctive translation can be applied to each node. We will call the graph transformation isotropic (anisotropic) if it is node-invariant (variant). + +Consequently, the adjacency matrix of the transformed graph signal $\tilde{\mathbf{X}}$ equivaries according to (1): + +$$ +\tilde {\mathbf {A}} = f (\tilde {\mathbf {X}}) = f (\mathbf {t} (\mathbf {X})), \tag {3} +$$ + +which transforms the graph structures, as edge weights are also filtered by $\mathbf{t}(\cdot)$ . + +Under this definition, there exist a wide spectrum of graph signal transformations. Examples include affine transformations (translation, rotation and shearing) on the location of nodes (e.g., 3D coordinates in point clouds), and graph filters such as low-pass filtering on graph signals by the adjacency matrix [37]. + +# 3.3. Node-wise Graph Signal Transformation + +As aforementioned, in this paper, we focus on node-wise graph signal transformation, i.e., each node has its own transformation, either isotropically or anisotropically. We seek to learn graph representations through the node-wise transformations by revealing how different parts of graph structures would change globally and locally. + +Specifically, here are two distinct advantages. + +![](images/05bda8cede658a5d8959904f9dbe4f256fc6e0b86f362dee82f53cbda4f7954c.jpg) +(a) Original model + +![](images/7871cb2d1d1d00609a704418d392548bb6634c4e86d4da944ea5c1eba11608b8.jpg) +(b) Global+Isotropic + +![](images/c9d9c6903a4edc1cb4d50ac68ec3d0ad5be858b9551b7a60df7d9810137bae48.jpg) +(c) Global+Anisotropic + +![](images/793a88590541d80e87a51c44da5e9bed4f74095b85153f60d403e9eb3669f5a2.jpg) +(d) Local+Isotropic + +![](images/6ab96745f635f9b9c88f6d084d4b9e20378a5ae047e2440e2945e0b2c508d13f.jpg) +(e) Local+Anisotropic + +![](images/2a853fc2e2131f970b815b79fd381b350a2ffc496e0ec7169b0028e673bb7ed5.jpg) +Figure 2. Demonstration of different sampling (Global or Local) and node-wise translation (Isotropic or Anisotropic) methods on 3D point clouds. Red and blue points represent transformed and non-transformed points, respectively. Note that we adopt the wing as a sampled local point set for clear visualization. +(a) Before transformation. + +![](images/4400012ce42b240b974ea9901a59779142c604833d7c3a51c518870724bf855a.jpg) +(b) After transformation. +Figure 3. An example of $k\mathbf{NN}$ graphs before and after node-wise transformations. We first construct a $k\mathbf{NN}$ ( $k = 5$ ) graph for the yellow node (other connections are omitted). Then we perform node-wise transformations on some blue nodes, which alters the graph structure around the yellow node. + +- The node-wise transformations allow us to use node sampling to study different parts of graphs under various transformations. +- By decoding the node-wise transformations, we will be able to learn the representations of individual nodes. Moreover, these node-wise representations will not only capture the local graph structures under these transformations, but also contain global information about the graph when these nodes are sampled into different groups over iterations during training. + +Next, we discuss the formulation of learning graph transformation equivariant representations by decoding the node-wise transformations via a graph-convolutional encoder and decoder. + +# 4. GraphTER: The Proposed Approach + +# 4.1. The Formulation + +Given a pair of graph signal and adjacency matrix $(\mathbf{X},\mathbf{A})$ , and a pair of transformed graph signal and adjacency matrix $(\tilde{\mathbf{X}},\tilde{\mathbf{A}})$ by a node-wise graph transformation $\mathbf{t}$ , a function $E(\cdot)$ is transformation equivariant if it satisfies + +$$ +E (\tilde {\mathbf {X}}, \tilde {\mathbf {A}}) = E (\mathbf {t} (\mathbf {X}), f (\mathbf {t} (\mathbf {X}))) = \rho (\mathbf {t}) [ E (\mathbf {X}, \mathbf {A}) ], \tag {4} +$$ + +where $\rho (\mathbf{t})$ is a homomorphism of transformation $\mathbf{t}$ in the representation space. + +Our goal is to learn a function $E(\cdot)$ , which extracts equivariant representations of graph signals $\mathbf{X}$ . For this purpose, we employ an encoder-decoder network: we learn a graph encoder $E:(\mathbf{X},\mathbf{A})\mapsto E(\mathbf{X},\mathbf{A})$ , which encodes the feature representations of individual nodes from the graph. To ensure the transformation equivariance of representa + +tions, we train a decoder $D:\left(E(\mathbf{X},\mathbf{A}),E(\tilde{\mathbf{X}},\tilde{\mathbf{A}})\right)\mapsto \hat{\mathbf{t}}$ to estimate the node-wise transformation $\hat{\mathbf{t}}$ from the representations of the original and transformed graph signals. Hence, we cast the learning problem of transformation equivariant representations as the joint training of the representation encoder $E$ and the transformation decoder $D$ . It has been proved that the learned representations in this way satisfy the generalized transformation equivariance without relying on a linear representation of graph structures [35]. + +Further, we sample a subset of nodes $\mathbf{S}$ following a sampling distribution $S_{g}$ from the original graph signal $\mathbf{X}$ , locally or globally in order to reveal graph structures at various scales. Node-wise transformations are then performed on the subset $\mathbf{S}$ isotropically or anisotropically, as demonstrated in Fig. 2. In order to predict the node-wise transformation $\mathbf{t}$ , we choose a loss function $\ell_{\mathbf{S}}(\mathbf{t},\hat{\mathbf{t}})$ that quantifies the distance between $\mathbf{t}$ and its estimate $\hat{\mathbf{t}}$ in terms of their parameters. Then the entire network is trained end-to-end by minimizing the loss + +$$ +\min _ {E, D} \underset {\mathbf {S} \sim \mathcal {S} _ {g}} {\mathbb {E}} \underset {\mathbf {t} \sim \mathcal {T} _ {g}} {\mathbb {E}} \ell_ {\mathbf {S}} (\mathbf {t}, \hat {\mathbf {t}}), \tag {5} +$$ + +where the expectation $\mathbb{E}$ is taken over the sampled graph signals and transformations, and the loss is taken over the (locally or globally) sampled subset $\mathbf{S}$ of nodes in each iteration of training. + +In (5), the node-wise transformation $\hat{\mathbf{t}}$ is estimated from the decoder + +$$ +\hat {\mathbf {t}} = D \left(E (\mathbf {X}, \mathbf {A}), E (\tilde {\mathbf {X}}, \tilde {\mathbf {A}})\right). \tag {6} +$$ + +Thus, we update the parameters in encoder $E$ and decoder $D$ iteratively by backward propagation of the loss. + +# 4.2. The Algorithm + +Given graph signals $\mathbf{X} = \{\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_N\}^\top$ over $N$ nodes, in each iteration of training, we randomly sample a subset of nodes $\mathbf{S}$ from the graph, either globally or locally. Global sampling refers to random sampling over the entire nodes globally, while local sampling is limited to a local set of nodes in the graph. Node sampling not only enables us to characterize global and local graph structures at various scales, but also reduces the number of node-wise transformation parameters to estimate for computational efficiency. + +Figure 4. The architecture of the proposed GraphTER. In the unsupervised feature learning stage, the representation encoder and transformation decoder are jointly trained by minimizing (5). In the supervised evaluation stage, the first several blocks of the encoder are fixed with frozen weights and a linear classifier is trained with labeled samples. +![](images/b8fc7794cf8e4c489b142ee23bb902a7811aa81701224ee483fcba06de947f98.jpg) +is + +Then we draw a node-wise transformation $\mathbf{t}_i$ corresponding to each sample $\mathbf{x}_i$ of nodes in $\mathbf{S}$ , either isotropically or anisotropically. Accordingly, the graph $\tilde{\mathbf{A}}$ associated with the transformed graph also transforms equivariantly from the original $\mathbf{A}$ under $\mathbf{t}$ . Specifically, as illustrated in Fig. 3, we construct a $k$ -NN graph to make use of the connectivity between the nodes, whose matrix representation in $\mathbf{A}$ changes after applying the sampled node-wise transformations. + +To learn the applied node-wise transformations, we design a full graph-convolutional auto-encoder network as illustrated in Fig. 4. Among various paradigms of GCNNs, we choose EdgeConv [44] as a basic building block of the auto-encoder network, which efficiently learns node-wise representations by aggregating features along all the edges emanating from each connected node. Below we will explain the representation encoder and the transformation decoder in detail. + +# 4.2.1 Representation Encoder + +The representation encoder $E$ takes the signals of an original graph $\mathbf{X}$ and the transformed counterparts $\tilde{\mathbf{X}}$ as input, along with their corresponding graphs. $E$ encodes node-wise features of $\mathbf{X}$ and $\tilde{\mathbf{X}}$ through a Siamese encoder network with shared weights, where EdgeConv layers are used as basic feature extraction blocks. As shown in Fig. 3, given a non-transformed central node $\mathbf{x}_i$ and its transformed neighbors $\mathbf{t}_j(\mathbf{x}_j)$ , the input layer of encoded feature of $\mathbf{x}_i$ + +$$ +\begin{array}{l} E _ {\text {i n}} (\tilde {\mathbf {X}}, \tilde {\mathbf {A}}) _ {i} = \max _ {j \in \mathcal {N} (i)} \tilde {a} _ {i, j} \\ = \max _ {j \in \mathcal {N} (i)} \operatorname {R e L U} \left(\theta \left(\mathbf {t} _ {j} \left(\mathbf {x} _ {j}\right) - \mathbf {x} _ {i}\right) + \phi \mathbf {x} _ {i}\right), \tag {7} \\ \end{array} +$$ + +where $\tilde{a}_{i,j}$ denotes the edge feature, i.e., edge weight in $\tilde{\mathbf{A}}$ . $\theta$ and $\phi$ are two weighting parameters, and $j \in \mathcal{N}(i)$ denotes node $j$ is in the $k$ -nearest neighborhood of node $i$ . Then, multiple layers of regular edge convolutions [44] are stacked to form the final encoder. + +Edge convolution in (7) over each node essentially aggregates features from neighboring nodes via edge weights $\tilde{a}_{i,j}$ . Since the edge information of the underlying graph transforms with the transformations of individual nodes as demonstrated in Fig. 3, edge convolution is able to extract higher-level features from the original and transformed edge information. Also, as features of each node are learned via propagation from transformed and non-transformed nodes isotropically or anisotropically by both local or global sampling, the learned representation is able to capture intrinsic graph structures at multiple scales. + +# 4.2.2 Transformation Decoder + +Node-wise features of the original and transformed graphs are then concatenated at each node, which are then fed into the transformation decoder. The decoder consists of several EdgeConv blocks to aggregate the representations of both the original and transformed graphs to predict the node-wise transformations $\mathbf{t}$ . Based on the loss in (5), $\mathbf{t}$ is decoded by minimizing the mean squared error (MSE) between the ground truth and estimated transformation parameters at each sampled node. Fig. 4 illustrates the architecture of learning the proposed GraphTER in such an auto-encoder structure. + +# 5. Experiments + +In this section, we evaluate the GraphTER model by applying it to graphs of 3D point cloud data on two representative downstream tasks: point cloud classification and segmentation. We compare the proposed method with state-of-the-art supervised and unsupervised approaches. + +# 5.1. Datasets and Experimental Setup + +ModelNet40 [47]. This dataset contains 12,311 meshed CAD models from 40 categories, where 9,843 models are used for training and 2,468 models are for testing. For each model, 1,024 points are sampled from the original mesh. We train the unsupervised auto-encoder and the classifier under the training set, and evaluate the classifier under the testing set. + +ShapeNet part [49]. This dataset contains 16,881 3D point clouds from 16 object categories, annotated with 50 parts. Each 3D point cloud contains 2,048 points, most of + +Table 1. Classification accuracy (%) on ModelNet40 dataset. + +
MethodYearUnsupervisedAccuracy
3D ShapeNets [47]2015No84.7
VoxNet [30]2015No85.9
PointNet [32]2017No89.2
PointNet++ [33]2017No90.7
KD-Net [21]2017No90.6
PointCNN [25]2018No92.2
PCNN [2]2018No92.3
DGCNN [44]2019No92.9
RS-CNN [28]2019No93.6
T-L Network [13]2016Yes74.4
VConv-DAE [39]2016Yes75.5
3D-GAN [45]2016Yes83.3
LGAN [1]2018Yes85.7
FoldingNet [48]2018Yes88.4
MAP-VAE [15]2019Yes90.2
L2G-AE [27]2019Yes90.6
GraphTERYes92.0
+ +which are labeled with fewer than six parts. We employ 12, 137 models for training the auto-encoder and the classifier, and 2, 874 models for testing. + +We treat points in each point cloud as nodes in a graph, and the $(x,y,z)$ coordinates of points as graph signals. A $k\mathrm{NN}$ graph is then constructed on the graph signals to guide graph convolution. + +Next, we introduce our node-wise graph signal transformation. In experiments, we sample a portion of nodes with a sampling rate $r$ from the entire graph to perform node-wise transformations, including 1) Global sampling: randomly sample $r\%$ of points from all the points in a 3D point cloud; 2) Local sampling: randomly choose a point and search its $k$ nearest neighbors in terms of Euclidean distance, forming a local set of $r\%$ of points. + +Then, we apply three types of node-wise transformations to the coordinates of point clouds, including 1) Translation: randomly translate each of three coordinates of a point by three parameters in the range $[-0.2, 0.2]$ ; 2) Rotation: randomly rotate each point with three rotation parameters all in the range $[-5^{\circ}, 5^{\circ}]$ ; 3) Shearing: randomly shear the $x$ -, $y$ -, $z$ -coordinates of each point with the six parameters of a shearing matrix in the range $[-0.2, 0.2]$ . We consider two strategies to transform the sampled nodes: Isotropically or Anisotropically, which applies transformations with node-invariant or node-variant parameters. + +# 5.2. Point Cloud Classification + +First, we evaluate the GraphTER model on the ModelNet40 [47] dataset for point cloud classification. + +# 5.2.1 Implementation Details + +In this task, the auto-encoder network is trained via the SGD optimizer with a batch size of 32. The momentum and weight decay rate are set to 0.9 and $10^{-4}$ , respectively. + +The initial learning rate is 0.1, and then decayed using a cosine annealing schedule [29] for 512 training epochs. We adopt the cross entropy loss to train the classifier. + +We deploy eight EdgeConv layers as the encoder, and the number $k$ of nearest neighbors is set to 20 for all EdgeConv layers. Similar to [44], we use shortcut connections for the first five layers to extract multi-scale features, where we concatenate features from these layers to acquire a 1,024-dimensional node-wise feature vector. After the encoder, we employ three consecutive EdgeConv layers as the decoder - the output feature representations of the Siamese encoder first go through a channel-wise concatenation, which are then fed into the decoder to estimate node-wise transformations. The batch normalization layer and LeakyReLU activation function with a negative slope of 0.2 is employed after each convolutional layer. + +During the training procedure of the classifier, the first five EdgeConv layers in the encoder are used to represent input cloud data by node-wise concatenating their output features with the weights frozen. After the five EdgeConv layers, we apply three fully-connected layers node-wise to the aggregated features. Then, global max pooling and average pooling are deployed to acquire the global features, after which three fully-connected layers are used to map the global features to the classification scores. Dropout with a rate of 0.5 is adopted in the last two fully-connected layers. + +# 5.2.2 Experimental Results + +Tab. 1 shows the results for 3D point cloud classification, where the proposed model applies isotropic node-wise shearing transformation with a global sampling rate of $r = 25\%$ . We compare with two classes of methods: unsupervised approaches and supervised approaches. The GraphTER model achieves $92.0\%$ of classification accuracy on the ModelNet40 dataset, which outperforms the state-of-the-art unsupervised methods. In particular, most of the compared unsupervised models combine the ideas of both GAN and AED, and map 3D point clouds to unsupervised representations by auto-encoding data, such as FoldingNet [48], MAP-VAE [15] and L2G-AE [27]. Results show that the GraphTER model achieves significant improvement over these methods, showing the superiority of the proposed node-wise AET over both the GAN and AED paradigms. + +Moreover, the unsupervised GraphTER model also achieves comparable performance with the state-of-the-art fully supervised results. This significantly closes the gap between unsupervised approaches and the fully supervised counterparts in literature. + +# 5.2.3 Ablation Studies + +Further, we conduct ablation studies under various experimental settings of sampling and transformation strategies + +Table 2. Unsupervised classification accuracy (\%) on ModelNet40 dataset with different sampling and transformation strategies. + +
Global SamplingLocal SamplingMean
Iso.Aniso.Iso.Aniso.
Translation90.1590.1589.9189.5589.94
Rotation91.2990.2490.4889.8790.47
Shearing92.0290.3291.6589.9990.99
Mean91.1590.2490.6889.80
90.7090.24
+ +Table 3. Unsupervised classification accuracy $(\%)$ on ModelNet40 dataset applying translation at different node sampling rates. + +
Sampling RateGlobal SamplingLocal SamplingMean
Iso.Aniso.Iso.Aniso.
25%90.1590.1589.9189.5589.94
50%90.0389.6389.9589.4789.77
75%91.0089.6791.4189.7590.46
100%89.6789.9989.6789.9989.83
+ +on the ModelNet40 dataset. + +First, we analyze the effectiveness of different node-wise transformations under global or local sampling. Tab. 2 presents the classification accuracy with three types of node-wise transformation methods. We see that the shearing transformation achieves the best performance, improving by $1.05\%$ on average over translation, and $0.52\%$ over rotation. This shows that the proposed GraphTER model is able to learn better feature representations under more complex transformations. + +Moreover, we see that the proposed model achieves an accuracy of $90.70\%$ on average under global sampling, which outperforms local sampling by $0.46\%$ . This is because global sampling better captures the global structure of graphs, which is crucial in such a graph-level task of classifying 3D point clouds. Meanwhile, under the two sampling strategies, the classification accuracy from isotropic transformations is higher than that from the anisotropic one. The reason lies in the intrinsic difficulty of training the transformation decoder with increased complexity of more parameters when applying anisotropic transformations. + +Moreover, we evaluate the effectiveness of different sampling rates $r$ under the translations as reported in Tab. 3. The classification accuracies under various sampling rates are almost the same, and the result under $r = 25\%$ is comparable to that under $r = 100\%$ . This shows that the performance of the proposed model is insensitive to the variation of sampling rates, i.e., applying node-wise transformations to a small number of nodes in the graph is sufficient to learn intrinsic graph structures. + +# 5.3. Point Cloud Segmentation + +We also apply the GraphTER model to 3D point cloud part segmentation on ShapeNet part dataset [49]. + +# 5.3.1 Implementation Details + +We also use SGD optimizer to train the auto-encoding transformation network. The hyper-parameters are the same as in 3D point cloud classification except that we train for 256 epochs. We adopt the negative log likelihood loss to train the node-wise classifier for segmenting each point in the clouds. + +The auto-encoding architecture is similar to that of the classification task, where we employ five EdgeConv layers as the encoder. However, the first two EdgeConv blocks consist of two MLP layers with the number of neurons \{64, 64\} in each layer. We use shortcut connections to concatenate features from the first four layers to a 512-dimensional node-wise feature vector. + +As for the node-wise classifier, we deploy the same architecture as in [44]. The output features from the encoder are concatenated node-wise with globally max-pooled features, followed by four fully-connected layers to classify each node. During the training procedure, the weights of the first four EdgeConv blocks in the encoder are kept frozen. + +# 5.3.2 Experimental Results + +We adopt the Intersection-over-Union (IoU) metric to evaluate the performance. We follow the same evaluation protocol as in the PointNet [32]: the IoU of a shape is computed by averaging the IoUs of different parts occurring in that shape, and the IoU of a category is obtained by averaging the IoUs of all the shapes belonging to that category. The mean IoU (mIoU) is finally calculated by averaging the IoUs of all the test shapes. + +We also compare the proposed model with unsupervised approaches and supervised approaches in this task, as listed in Tab. 4. We achieve a mIoU of $81.9\%$ , which significantly outperforms the state-of-the-art unsupervised method MAP-VAE [15] by $13.9\%$ . + +Moreover, the unsupervised GraphTER model also achieves the comparable performance to the state-of-the-art fully supervised approaches, greatly pushing closer towards the upper bound set by the fully supervised counterparts. + +# 5.3.3 Visualization Results + +Fig. 5 visualizes the results of the proposed unsupervised model and two state-of-the-art fully supervised methods: DGCNN [44] and RS-CNN [28]. The proposed model produces better segmentation on the "table" model in the first row, and achieves comparable results on the other models. Further, we qualitatively compare the proposed method with the state-of-the-art unsupervised method MAP-VAE [15], as illustrate in Fig. 6. The proposed model leads to more accurate segmentation results than MAP-VAE, e.g., the engines of planes and the legs of chairs. + +Table 4. Part segmentation results on ShapeNet part dataset. Metric is mIoU(%) on points. + +
Unsup.MeanAeroBagCapCarChairEar PhoneGuitarKnifeLampLaptopMotorMugPistolRocketSkate BoardTable
Samples269076558983758697873921547451202184283661525271
PointNet [32]No83.783.478.782.574.989.673.091.585.980.895.365.293.081.257.972.880.6
PointNet++ [33]No85.182.479.087.777.390.871.891.085.983.795.371.694.181.358.776.482.6
KD-Net [21]No82.380.174.674.370.388.673.590.287.281.094.957.486.778.151.869.980.3
PCNN [2]No85.182.480.185.579.590.873.291.386.085.095.773.294.883.351.075.081.8
PointCNN [25]No86.184.186.586.080.890.679.792.388.485.396.177.295.384.264.280.083.0
DGCNN [44]No85.284.083.486.777.890.674.791.287.582.895.766.394.981.163.574.582.6
RS-CNN [28]No86.283.584.888.879.691.281.191.688.486.096.073.794.183.460.577.783.6
LGAN [1]Yes57.054.148.762.643.268.458.374.368.453.482.618.675.154.737.246.766.4
MAP-VAE [15]Yes68.062.767.173.058.577.167.384.877.160.990.835.887.764.245.060.474.8
GraphTERYes81.981.768.183.774.688.168.990.686.680.095.656.390.080.855.270.779.1
+ +![](images/94ba39645997a0a3508e953190c8701eac9a71c9461f40e8d7728a6b9fe5c811.jpg) +(a) Ground-truth + +![](images/a7157928cc97cdc79308700b3cfa0b167ab9f0c4de68d5c881d79bc6d4d0d3d8.jpg) +(b) DGCNN + +![](images/3ddff83c546c6ce739632bd64324eb1a549f9b342ae61ab925da62d3689ba4e2.jpg) +(c) RS-CNN + +![](images/fe4d08d426f97bf4e6a7291272fb5ccd0836c8b97dc076baa0b5a09e0a80faa9.jpg) +(d) GraphTER + +![](images/6438518174b0f070a069d143aa86ab6bfbf66db606c63e7582825c51d621ea21.jpg) +(a) MAP-VAE + +![](images/5f59aa1e6304372d7f6ecac074706f5199514c45115fd873277cd34963a54d02.jpg) +Figure 5. Visual comparison of point cloud part segmentation with supervised methods. Our unsupervised GraphTER learning achieves comparable results with the state-of-the-art fully supervised approaches. + +![](images/9edc102611d94b9a8e01f865910aa7cf1897014dbeba60c177dc5c76f112590f.jpg) + +![](images/ac861561ab87cb4412dacde36c6d2b3c42b57af7b4cf54262a6baa9be52ae00a.jpg) +(b) GraphTER + +![](images/32ff1221709f7ed4adad6752a9d60545022b716bd91cb59fce4bc3b445fb7a1e.jpg) +Figure 6. Visual comparison of point cloud part segmentation with the state-of-the-art unsupervised method MAP-VAE. We achieve more accurate segmentation even in tiny parts and transition regions. + +![](images/4c27b0df236e2b30002716b64708fd73e4ca089ef3eb7239c706a4dd233bcfba.jpg) + +# 5.3.4 Ablation Studies + +Similar to the classification task, we analyze the effectiveness of different node-wise transformations under global or local sampling, as presented in Tab. 5. The proposed model achieves the best performance under the shearing transformation, improving by $1.23\%$ on average over translation, + +Table 5. Unsupervised segmentation results on ShapeNet part dataset with different transformation strategies. Metric is mIoU (\%) on points. + +
Global SamplingLocal SamplingMean
Iso.Aniso.Iso.Aniso.
Translation79.8379.8880.0579.8579.90
Rotation80.2080.2980.8780.0280.35
Shearing81.8880.2881.8980.4881.13
Mean80.6480.1580.9480.12
80.3980.53
+ +and $0.78\%$ over rotation, which demonstrates the benefits of GraphTER learning under complex transformations. + +Further, the proposed model achieves a mIoU of $80.53\%$ on average under local sampling, which outperforms global sampling by $0.14\%$ . This is because local sampling of nodes captures the local structure of graphs better, which is crucial in node-level 3D point cloud segmentation task. + +# 6. Conclusion + +In this paper, we propose a novel paradigm of learning graph transformation equivariant representation (Graph-TER) via auto-encoding node-wise transformations in an unsupervised fashion. We allow it to sample different groups of nodes from a graph globally or locally and then perform node-wise transformations isotropically or anisotropically, which enables it to characterize morphable structures of graphs at various scales. By decoding these node-wise transformations, GraphTER enforces the encoder to learn intrinsic representations that contain sufficient information about structures under applied transformations. We apply the GraphTER model to classification and segmentation of graphs of 3D point cloud data, and experimental results demonstrate the superiority of Graph-TER over the state-of-the-art unsupervised approaches, significantly closing the gap with the fully supervised counterparts. We will apply the general GraphTER model to more applications as future works, such as node classification of citation networks. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. In Proceedings of the 35th International Conference on Machine Learning (ICML), pages 40-49, 2018. +[2] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point convolutional neural networks by extension operators. ACM Transactions on Graphics (TOG), 37(4):1-12, July 2018. +[3] Aleksandar Bojchevski, Oleksandr Shchur, Daniel Zügner, and Stephan Gunnemann. Netgan: Generating graphs via random walks. In Proceedings of the 35th International Conference on Machine Learning (ICML), pages 609-618, 2018. +[4] Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18-42, 2017. +[5] Shaosheng Cao, Wei Lu, and Qiongkai Xu. Deep neural networks for learning graph representations. In Thirtieth AAAI Conference on Artificial Intelligence (AAAI), pages 1145-1152, 2016. +[6] Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pages 2990-2999, 2016. +[7] Nicola De Cao and Thomas Kipf. Molgan: An implicit generative model for small molecular graphs. arXiv preprint arXiv:1805.11973, 2018. +[8] Sander Dieleman, Jeffrey De Fauw, and Koray Kavukcuoglu. Exploiting cyclic symmetry in convolutional neural networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pages 1889-1898, 2016. +[9] Sander Dieleman, Kyle W Willett, and Joni Dambre. Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly Notices of the Royal Astronomical Society, 450(2):1441-1459, 2015. +[10] Jeff Donahue, Philipp Krähenbuhl, and Trevor Darrell. Adversarial feature learning. In International Conference on Learning Representations (ICLR), 2017. +[11] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Olivier Mastropietro, Alex Lamb, Martin Arjovsky, and Aaron Courville. Adversarily learned inference. In International Conference on Learning Representations (ICLR), 2017. +[12] Robert Gens and Pedro M Domingos. Deep symmetry networks. In Advances in Neural Information Processing Systems (NIPS), pages 2537-2545, 2014. +[13] Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In European Conference on Computer Vision (ECCV), pages 484-499. Springer, 2016. +[14] 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 (NIPS), pages 2672–2680, 2014. +[15] Zhizhong Han, Xiyang Wang, Yu-Shen Liu, and Matthias Zwicker. Multi-angle point cloud-vae: Unsupervised feature + +learning for 3d point clouds from multiple angles by joint self-reconstruction and half-to-half prediction. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[16] Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In International Conference on Artificial Neural Networks (ICANN), pages 44–51. Springer, 2011. +[17] Geoffrey E Hinton and Richard S Zemel. Autoencoders, minimum description length and helmholtz free energy. In Advances in Neural Information Processing Systems (NIPS), pages 3-10, 1994. +[18] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations (ICLR), 2014. +[19] Thomas N Kipf and Max Welling. Variational graph autoencoders. In Proceedings of the NIPS Workshop on Bayesian Deep Learning, 2016. +[20] Jyri J Kivinen and Christopher KI Williams. Transformation equivariant boltzmann machines. In International Conference on Artificial Neural Networks (ICANN), pages 1-9. Springer, 2011. +[21] Roman Klokov and Victor Lempitsky. Escape from cells: Deep kd-networks for the recognition of 3d point cloud models. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 863-872, 2017. +[22] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NIPS), pages 1097-1105, 2012. +[23] Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 991-999, 2015. +[24] Jan Eric Lenssen, Matthias Fey, and Pascal Libuschewski. Group equivariant capsule networks. In Advances in Neural Information Processing Systems (NIPS), pages 8844-8853, 2018. +[25] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. In Advances in Neural Information Processing Systems (NIPS), pages 820-830, 2018. +[26] Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning deep generative models of graphs. arXiv preprint arXiv:1803.03324, 2018. +[27] Xinhai Liu, Zhizhong Han, Xin Wen, Yu-Shen Liu, and Matthias Zwicker. L2g auto-encoder: Understanding point clouds by local-to-global reconstruction with hierarchical self-attention. In Proceedings of the 27th ACM International Conference on Multimedia (ACM MM), pages 989–997. ACM, 2019. +[28] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8895-8904, 2019. + +[29] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In International Conference on Learning Representations (ICLR), 2017. +[30] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 922-928. IEEE, 2015. +[31] Shirui Pan, Ruiqi Hu, Guodong Long, Jing Jiang, Lina Yao, and Chengqi Zhang. Adversarily regularized graph autoencoder for graph embedding. In International Joint Conference on Artificial Intelligence (IJCAI), pages 2609-2615, 2018. +[32] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 652-660, 2017. +[33] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in Neural Information Processing Systems (NIPS), pages 5099-5108, 2017. +[34] Guo-Jun Qi. Learning generalized transformation equivariant representations via autoencoding transformations. arXiv preprint arXiv:1906.08628, 2019. +[35] Guo-Jun Qi, Liheng Zhang, Chang Wen Chen, and Qi Tian. Avt: Unsupervised learning of transformation equivariant representations by autoencoding variational transformations. Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2019. +[36] Salah Rifai, Pascal Vincent, Xavier Muller, Xavier Glorot, and Yoshua Bengio. Contractive auto-encoders: Explicit invariance during feature extraction. In Proceedings of the 28th International Conference on Machine Learning (ICML), pages 833–840. Omnipress, 2011. +[37] Aliaksei Sandryhaila and José MF Moura. Discrete signal processing on graphs. IEEE transactions on Signal Processing, 61(7):1644-1656, 2013. +[38] Uwe Schmidt and Stefan Roth. Learning rotation-aware features: From invariant priors to equivariant descriptors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2050-2057. IEEE, 2012. +[39] Abhishek Sharma, Oliver Grau, and Mario Fritz. Vconvdae: Deep volumetric shape learning without object labels. In European Conference on Computer Vision (ECCV), pages 236-250. Springer, 2016. +[40] Henrik Skibbe. Spherical Tensor Algebra for Biomedical Image Analysis. PhD thesis, Verlag nicht ermittelbar, 2013. +[41] Kihyuk Sohn and Honglak Lee. Learning invariant representations with local transformations. In Proceedings of the 29th International Conference on Machine Learning (ICML), pages 1339-1346, 2012. +[42] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th International Conference on Machine Learning (ICML), pages 1096-1103. ACM, 2008. + +[43] Daixin Wang, Peng Cui, and Wenwu Zhu. Structural deep network embedding. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 1225-1234. ACM, 2016. +[44] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. ACM Transactions on Graphics (TOG), 38(5):146, 2019. +[45] Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems (NIPS), pages 82–90, 2016. +[46] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S Yu. A comprehensive survey on graph neural networks. arXiv preprint arXiv:1901.00596, 2019. +[47] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1912-1920, 2015. +[48] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 206–215, 2018. +[49] 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. ACM Transactions on Graphics (TOG), 35(6):210, 2016. +[50] Jiaxuan You, Rex Ying, Xiang Ren, William L Hamilton, and Jure Leskovec. GraphRNN: A deep generative model for graphs. In Proceedings of the 35th International Conference on Machine Learning (ICML), pages 5694-5703, 2018. +[51] 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), pages 2547-2555, 2019. +[52] Yingxue Zhang and Michael Rabbat. A graph-cnn for 3d point cloud classification. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6279-6283. IEEE, 2018. +[53] Ziwei Zhang, Peng Cui, and Wenwu Zhu. Deep learning on graphs: A survey. arXiv preprint arXiv:1812.04202, 2018. +[54] Jie Zhou, Ganqu Cui, Zhengyan Zhang, Cheng Yang, Zhiyuan Liu, and Maosong Sun. Graph neural networks: A review of methods and applications. arXiv preprint arXiv:1812.08434, 2018. \ No newline at end of file diff --git a/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/images.zip b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..354730e38fb9b0cebfd3bc87309e76d1365ad606 --- /dev/null +++ b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b565872df77cef622807ce9350220e9e16fbb4f3f47ae5f35a543b19488125d1 +size 461778 diff --git a/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/layout.json b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9e908bc0d74a8df0dd3d757343f97fadf453a121 --- /dev/null +++ b/graphterunsupervisedlearningofgraphtransformationequivariantrepresentationsviaautoencodingnodewisetransformations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e9a25120610ce1399de77f52c4e5978a3a3c46fbf9f23937e61730ef1b9080d +size 477256 diff --git a/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_content_list.json b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e2b5706c00caa8c0f65c4d69de8e5c4cbb18c00f --- /dev/null +++ b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13ed9f2a7cd8e48209c75f2c3a73bdbf3db593892866f58d021c7e025189624d +size 57547 diff --git a/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_model.json b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fc450df358e7fdfac173187e5f1e7f3f6d92cab3 --- /dev/null +++ b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:584dea44c2827f8d3b49a9af62cc4a700f8fea988f29a048f30c5b592e46531e +size 69469 diff --git a/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_origin.pdf b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5949d6e81f0012aaeab58402b844c5675c8ace3a --- /dev/null +++ b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/58949afc-5adc-48f8-8897-a87bbb58aa67_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3755caacbe22fa020373d325b832c8040a906d5b9dbf1130a9d487cc15c165f9 +size 714875 diff --git a/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/full.md b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..092f6e3dcc224425d4f8d32ea34640b5f228acce --- /dev/null +++ b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/full.md @@ -0,0 +1,268 @@ +# GrappaNet: Combining Parallel Imaging with Deep Learning for Multi-Coil MRI Reconstruction + +Anuroop Sriram + +Jure Zbontar1 + +Tullie Murrell1 + +C. Lawrence Zitnick1 + +Aaron Defazio1 + +Daniel K. Sodickson 2 + +$^{1}$ Facebook AI Research (FAIR) + +$^{2}$ NYU School of Medicine + +# Abstract + +Magnetic Resonance Image (MRI) acquisition is an inherently slow process which has spurred the development of two different acceleration methods: acquiring multiple correlated samples simultaneously (parallel imaging) and acquiring fewer samples than necessary for traditional signal processing methods (compressed sensing). Both methods provide complementary approaches to accelerating MRI acquisition. + +In this paper, we present a novel method to integrate traditional parallel imaging methods into deep neural networks that is able to generate high quality reconstructions even for high acceleration factors. The proposed method, called GrappaNet, performs progressive reconstruction by first mapping the reconstruction problem to a simpler one that can be solved by a traditional parallel imaging methods using a neural network, followed by an application of a parallel imaging method, and finally fine-tuning the output with another neural network. The entire network can be trained end-to-end. We present experimental results on the recently released fastMRI dataset [20] and show that GrappaNet can generate higher quality reconstructions than competing methods for both $4\times$ and $8\times$ acceleration. + +# 1. Introduction + +Magnetic Resonance Imaging (MRI) is the leading diagnostic modality for a wide range of disorders including musculoskeletal, neurological, and oncological diseases. However, the physics of the MRI data acquisition process make it inherently slower than alternate modalities like CT or X-Ray. As a consequence, increasing the speed of MRI acquisition has been a major ongoing research goal for decades. + +Parallel Imaging (PI) is one of the most important and successful developments in reducing MRI scan time [3, 12]. The technique requires the use of multiple physical receiver coils to simultaneously record different views of the object being imaged. Parallel imaging is the default option for + +many scan protocols and it is supported by almost all modern clinical MRI scanners. + +Another approach to accelerating MR imaging is the use of Compressed Sensing (CS), which can speed up MRI acquisition by acquiring fewer samples than required by traditional signal processing methods. To overcome aliasing artifacts introduced by violating the Shannon-Nyquist sampling theorem, CS methods incorporate additional a priori knowledge about the images. Recently, the use of learned image priors through the use of deep learning have rapidly gained in popularity [4, 15, 18, 21]. These approaches have shown a significant improvement in image reconstruction quality, particularly for non-parallel MRIs. + +In this paper, we show that a novel combination of classical parallel imaging techniques with deep neural networks can achieve higher acceleration factors than using either approach alone. Utilizing parallel imaging in deep learning approaches to reconstruction is challenging. The relation between the captured views changes for each scan and is dependent on the configuration of the detectors with respect to the object being imaged. + +To address this challenge we introduce GrappaNet, a new neural network architecture that incorporates parallel imaging. GrappaNet contains a GRAPPA layer that learns a scan-specific reconstruction function to combine the views captured during parallel imaging. To allow the network to fully utilize all the information captured during parallel imaging, the reconstruction is performed jointly across all the complex-valued views captured during the parallel imaging process. Unlike many previous approaches [4], the views are not combined until the final layer to produce the output reconstruction. The model uses a progressive refinement approach in both k-space (frequency domain) and image space to both aid in the optimization and to take advantage of the complementary properties of the two spaces. Most previous approaches typically focus on either reconstructing in image space [4] or k-space [6]. We evaluate the performance of our method on the recently released fastMRI [20] dataset. + +First, we present a brief introduction to parallel MR imaging and review some deep learning methods for parallel MRI + +reconstruction in section 2. Next, we provide a description of the GrappaNet model in section 3, followed by a description of our experiments in section 4. Finally, we conclude with a discussion of future work in section 5. + +# 2. Background and Related Work + +# 2.1. Parallel MRI + +MR scanners image a patient's anatomy by acquiring measurements in the frequency domain using a measuring instrument called a receiver coil. In the MRI literature, these frequency-domain measurements are called $k$ -space samples, where $k$ refers to the spatial wave number. The image can then be obtained by applying an inverse multidimensional Fourier transform $\mathcal{F}^{-1}$ to the measured $k$ -space samples. The underlying image $\mathbf{x} \in \mathbb{C}^M$ is related to the measured $k$ -space samples $\mathbf{k} \in \mathbb{C}^M$ as + +$$ +\mathbf {k} = \mathcal {F} (\mathbf {x}) + \epsilon , \tag {1} +$$ + +where $\epsilon$ is the measurement noise. + +Most modern scanners support parallel imaging: they employ an array of multiple receiver coils that simultaneously obtain k-space samples from the anatomy being imaged. The k-space samples measured by each coil are modulated by their sensitivity to the MR signal arising from different regions. In particular, the k-space sample measured by the $i$ -th coil is + +$$ +\mathbf {k} _ {i} = \mathcal {F} \left(S _ {i} \mathbf {x}\right) + \epsilon_ {i}, i = 1, 2, \dots , N, \tag {2} +$$ + +where $S_{i}$ is a complex-valued diagonal matrix encoding the position dependent sensitivity map of the $i$ -th coil and $N$ is the number of coils. + +Different coils are typically sensitive to different but overlapping regions. It is important to note that the coil sensitivities vary per scan since they depend not only on the configuration of the coils but also on their interaction with the anatomy being imaged. + +# 2.2. Accelerated MRI + +The speed of MRI acquisition is limited by the number of k-space samples obtained. This process can be accelerated by obtaining only a subset of the k-space data: + +$$ +\mathbf {k} _ {i} = M \mathcal {F} \left(S _ {i} \mathbf {x}\right) + \epsilon_ {i}, i = 1, 2, \dots , N, \tag {3} +$$ + +where $M$ is a binary mask operator that selects a subset of the k-space points. The same mask is used for all coils. Applying an inverse Fourier transform naively to this undersampled k-space data results in aliasing artifacts. + +Parallel MRI can be used to accelerate imaging by exploiting the redundancies in k-space samples measured by different coils to estimate the missing k-space points from the observed points. Various parallel imaging methods have been proposed but they can be divided into two broad classes: + +a) SENSE-type methods [12] that operate in the image space, and b) GRAPPA-type methods [3] that operate locally in k-space. The latter is relevant to this work. + +The GRAPPA algorithm estimates the unobserved k-space points as a linear combination of the neighboring observed k-space points from all coils. The same set of weights are used at all spatial locations, which can be seen as a complex-valued convolution in k-space from $N$ channels to $N$ channels, where $N$ is the number of coils. Formally, the unobserved k-space points $\mathbf{k}^u$ are computed from the observed k-space points $\mathbf{k}$ by convolving with GRAPPA weights $G$ : + +$$ +\mathbf {k} ^ {u} = G * \mathbf {k}. \tag {4} +$$ + +During acquisition, the central region of k-space (which corresponds to low spatial frequencies) is fully sampled. This region, called the Auto-Calibration Signal or ACS, is used to estimate the GRAPPA weights $G$ . We can simulate under-sampling in the ACS by masking out certain k-space points. Let the simulated observed and unobserved k-space points in the ACS be $\mathbf{k}'$ and $\mathbf{k}^{u'}$ respectively. From equation 4, the convolution of $G$ and $\mathbf{k}'$ should be equal to $\mathbf{k}^{u'}$ . Thus, we can estimate $G$ by solving the following optimization problem: + +$$ +\hat {G} = \operatorname {a r g m i n} _ {G} \| \mathbf {k} ^ {u ^ {\prime}} - G * \mathbf {k} ^ {\prime} \| ^ {2}. \tag {5} +$$ + +The knee images in the fastMRI dataset [20] were acquired using machines that employ 15 receiver coils and can generally support $2 \times$ acceleration for imaging of the knee using this approach. Higher acceleration factors lead to aliasing artifacts that cannot be removed by standard parallel imaging methods. + +# 2.3. Compressed Sensing for Parallel MRI Reconstruction + +Compressed Sensing [2] enables reconstruction of images by using fewer k-space measurements than is possible with classical signal processing methods by enforcing suitable priors. Compressed sensing has been combined with parallel imaging to achieve higher acceleration factors than those allowed by parallel imaging alone. + +Classical compressed sensing methods use sparsity in some transform domain as a prior. Many classical compressed sensing methods operate in the image domain and solve the following optimization problem: + +$$ +\hat {\mathbf {x}} = \operatorname {a r g m i n} _ {\mathbf {x}} \frac {1}{2} \sum_ {i} \| \mathcal {F} (S _ {i} \mathbf {x}) - \mathbf {k} _ {i} \| ^ {2} + \lambda \Psi (\mathbf {x}), \tag {6} +$$ + +where $\Psi$ is a regularization function that enforces a sparsity constraint in some transform domain such as gradients in the image domain. This problem can be solved by iterative gradient descent style methods. + +In the last few years, there has been rapid development of deep learning based approaches to MRI reconstruction [4, 9, 11, 15, 18, 21]. MRI reconstruction can be viewed as an inverse problem and several previous research papers have proposed neural networks whose design is inspired by the optimization procedure to solve such an inverse problem [4, 9, 11]. One approach in this direction for the multi-coil reconstruction problem is the Variational Network (VN) [4]. The VN model is a deep neural network, each of whose layers implements one gradient update step for the optimization problem in equation 6. The VN uses pre-computed sensitivity maps and achieves excellent reconstructions at low acceleration factors. Computing sensitivity maps becomes more challenging at higher accelerations, which may limit the maximum acceleration this method can achieve. + +An alternate line of work operating in k-space is the RAKI model [1] which replaces the single convolution operation in GRAPPA with a deep convolutional network that is trained independently for each scan. The RAKI method emphasizes the importance of using a scan specific model for multi-coil reconstruction. This method is complementary to our work and can be integrated into the GrappaNet by replacing the GRAPPA layer with the RAKI network. + +A comprehensive survey of recent developments in using deep learning for parallel MRI reconstruction can be found in [10]. + +# 3. GrappaNet + +The GrappaNet is a neural network that takes undersampled, multi-coil k-space data as input and outputs the reconstructed image. Figure 1 shows a diagram of the network architecture that contains three important properties. First, the differentiable GRAPPA layer enables the network to take advantage of the known physical properties of parallel imaging. Next, each convolutional network is applied across all complex-valued views jointly, before being combined in the final stage. This enables the network to take advantage of all the information captured during parallel imaging. Several previous approaches [4, 6], performed reconstruction after collapsing to a single view. Finally, image-to-image mappings using U-Nets are performed in both k-space and image space. Convolutions, pooling, and up-sampling result in very different operations in image space and k-space. We demonstrate in Section 4 that using both these complementary spaces provides improved accuracy. + +The network consists of two convolutional neural networks, with the application of the GRAPPA operator in between them. Denoting the input under-sampled k-space data by $\mathbf{k}$ , the network computes the following function: + +$$ +\mathbf {x} = h \circ f _ {2} (G * f _ {1} (\mathbf {k})), \tag {7} +$$ + +where $f_{1}$ , and $f_{2}$ are convolutional networks that map multi-coil k-space to multi-coil k-space and $h$ combines the multi- + +coil k-space data to a single image by first applying an inverse fourier transform followed by an root sum-of-squares (RSS) operation (equation 8). + +The first network, $f_{1}$ takes the multi-coil k-space data with $R$ -fold under-sampling and maps it to an $R'$ -fold undersampled k-space dataset with the same number of coils. The GRAPPA operator, $G$ , which is separately obtained from the ACS, is then applied to this $R'$ -fold under-sampled dataset to fill in the missing k-space data. This allows the network to take advantage of the known physical properties of the parallel imaging process. $R'$ is chosen to be small enough that traditional parallel imaging methods like GRAPPA can reconstruct the image accurately. We use $R' = 2$ for our experiments. + +# 3.1. U-Net + +Both $f_{1}$ and $f_{2}$ are composed of multiple U-Nets [14], which are convolutional networks that operate at multiple scales. U-Net models and their variants have successfully been used for many image-to-image mapping tasks including MRI reconstruction [5, 7] and image segmentation [13]. The U-Nets used in this work are based on the U-Net baseline models from [20]. + +A U-Net is useful for image to image mapping tasks like semantic segmentation because the presence of pooling and up-sampling layers allow it to learn useful feature maps at multiple scales and abstraction levels. This multi-resolution feature representation helps the U-Net predict the higher level details of the output at the lowest level of the decoder and gradually adds finer, higher frequency details as the up-sampling layers are applied. + +The baseline model, described in [20], used such a U-Net model for MRI image reconstruction. However, that model is only able to perform denoising since it is applied after combining the different views using a root-sum-of-squares (RSS) transform (equation 8). This prevents the baseline model from learning how to combine all of the coils and using the phase information. As a result, the reconstructions from this baseline model are too smooth and lose much of the medically relevant high frequency information (see Figure 3). We show in section 4 that simply applying a U-Net to the real and imaginary data from all coils can significantly improve upon this model. Such a U-Net can potentially learn to combine information from different coils together, which improves performance. + +Han et al [6] show that a U-Net can also be applied directly to under-sampled k-space data. Their work was motivated by connections between encoder-decoder models and a classical CS algorithm called the annihilating filter-based low-rank Hankel matrix approach (ALOHA) [8]. The input to the ALOHA U-Net is zero-filled k-space data and the model fills in the missing information. In an approach similar to the fastMRI baseline model [20], Han et al [6] + +![](images/59817ecc311a81f19bfadf0304c4302537b1b13e8b5903c8ea2e76baf9475f92.jpg) +Figure 1. Left: The full GrappaNet model which takes under-sampled k-space samples as input and outputs the reconstructed image. Right: Details about each of the convolutional networks, which take multi-coil k-space as input and output multi-coil k-space. Here, FT, IFT & RSS refer to 2D Fourier transform, 2D inverse Fourier transform and root sum-of-squares operations (equation 8) respectively. + +![](images/ae66684f33d92ffa5485bd769fb748eb5049d3fd877453fe4e3bf9780b855077.jpg) + +also apply their U-Net after combining all of the coils into a single coil. Taking insight from algorithms like GRAPPA, we posit that it would be beneficial to apply convolutions directly to the multi-coil k-space data. We show in section 4 that such a model outperforms the baseline models. + +The functions $f_{1}$ and $f_{2}$ apply the following series of operations to the input k-space data (see figure 1): a U-Net in k-space followed by a hard data consistency, inverse 2D Fourier transform to convert to image space, a U-Net in the image space, followed by a 2D Fourier transform and data consistency. Each of the U-Nets map 15 complex-valued channels to 15 complex-valued channels. Here, the hard data consistency operations simply copy all of the observed k-space samples to the correct locations in k-space. This ensures that the model only fills in the missing k-space points. + +The function $h$ combines the reconstructed multi-coil k-space data into a single real-valued image by first applying an inverse 2D Fourier transform to each coil, followed by a root sum-of-squares (RSS) operation. The RSS operation combines all the coils into a single real-valued image: + +$$ +R S S \left(\mathbf {x} _ {1}, \dots \mathbf {x} _ {N}\right) = \left(\sum_ {n = 1} ^ {N} \left| \mathbf {x} _ {n} \right| ^ {2}\right) ^ {1 / 2}, \tag {8} +$$ + +where $\mathbf{x}_1,\ldots ,\mathbf{x}_N$ are the images from the $N$ coils. + +# 3.2. GRAPPA Layer + +As explained in the previous section convolutional networks in k-space or image space applied to all coils can, to a limited extent, learn to combine all of the coils. However, as described in 2.2, the coil sensitivities can vary from one imaging examination to another. Traditional parallel imaging methods take this into consideration by estimating distinct sensitivity maps or GRAPPA kernels for each scan. This motivates the need to include a scan-specific component within the neural network that can adapt to differences in the sensitivity profile to improve generalization of the reconstruction model. + +We achieve this adaptation by introducing a new neural network layer that we call the GRAPPA layer. The GRAPPA layer estimates the GRAPPA kernel from the ACS region and then applies a two-dimensional convolution with the estimated kernel. Because the application of GRAPPA is differentiable, the entire network can be trained in an end-to-end fashion using backpropagation. + +# 4. Experimental Results + +We ran all our experiments on the multi-coil knee MRIs from the fastMRI dataset [20], which consists of raw k-space data from 1594 knee MRI exams from four different MRI machines. The dataset contains two types of MRI sequences that are commonly used for knee exams in clinical practice: a Proton Density (PD) weighted sequence and a Proton Density weighted sequence with Fat Saturation (PDFS). We used the same train, validation and test splits as in the original dataset. The training data consisted of 973 volumes which contained k-space data of different sizes. During training, we omitted k-space data with a width greater than 372, which is about $7\%$ of the training data. We evaluated various models on all test images. + +For training our models, we used random masks with $4 \times$ and $8 \times$ accelerations, based on code released with the fastMRI dataset1. We experimented with the following models: + +1. Classical CS baseline based on Total Variation minimization [20] +2. U-Net baseline model applied to RSS inputs [20] +3. Variational Network model introduced in [4] +4. U-Net applied in k-space to 15 coil input +5. U-Net applied in image space to 15 coil input +6. GrappaNet model + +![](images/f1242fcf5a4b125024022b263f4d4b5dcf9ded9d5b53347daa07d938cba1f26e.jpg) +Figure 2. Example reconstructions for $4\times$ under-sampling. The top row shows PD images without fat suppression, and the bottom row shows PDFS images with fat suppression. + +![](images/eb3673d7008f51cad0d42272f63952d3bab71c088f9d5cc248c7115e49587f35.jpg) +Figure 3. Example reconstructions for $8\times$ under-sampling. The top row shows PD images without fat suppression and the bottom row shows PDFS images with fat suppression. + +We used the original implementation of the Variational Network $^2$ . This code runs the ESPIiT algorithm [17] to estimate sensitivity maps from the densely sampled ACS region. These maps are used both as input to the network and also to combine the fully sampled coil responses to compute the training targets. For experiments with $8 \times$ accelerations, the input k-space contains very few ACS lines, which yields poor quality sensitivity maps for the Variational + +Network. The training targets computed using these poor quality sensitivity maps contain aliasing artifacts that make them unsuitable for training. To mitigate this problem, we always use 30 low frequency lines to compute the training target for $8 \times$ experiments. The sensitivity maps used as inputs to the network are still computed from the ACS region. We did not change the model architecture or training procedure from the original implementation, except for the use of random masks. + +![](images/0d56a6fc51a1d292883c13196daff381632ffe760d23581512f5ca97205d2926.jpg) +Figure 4. Example reconstructions for $4\times$ under-sampling with the diagnostically important regions zoomed in. + +![](images/85e10a26a92cd7b42667beb4ca4b3dab04f309b3d267bcbb7ef19a30013e1382.jpg) +Ground Truth + +![](images/1537d3751c46a8e9bcaf6208a356ce8c1a66668cb5f2befce245e466b93029bf.jpg) +Baseline U-Net + +![](images/168be1131ede95c83770cd0487c2ce899d420d77a59a9441e387fb0201ab0ca6.jpg) +Variational Net + +![](images/53348015c6dc9b7143db67fd50dd978974370e98fcd1ffa662d57b163dabe31c.jpg) +Image U-Net + +![](images/b0ae080ec19207c028ad54397303a1d27a3a0b1952e2176c3291a70ff4e83ada.jpg) +GrappaNet + +![](images/7a723b80ac7846d3787c121dfd0dd3d2f60fc14d0f4e4fae549305c1cbc5774b.jpg) +Figure 5. Left: Ground truth, Middle: Reconstruction from baseline, Right: Reconstruction from GrappaNet. The arrow points to the meniscus region, which appears "filled in" with the baseline method. Highly accurate reconstruction of the meniscus is important for radiologists in diagnosing certain pathologies. + +![](images/0199b070931aacb9dd70e7e52566aaca8c44e594659f891dc7cfbff24f37e3cb.jpg) + +![](images/87f0fb184bb1096789aa96e7e6cbe4e216b6da31046a2538ac8f0e75a42fab6d.jpg) + +For the k-space U-Net, the image space U-Net, and the GrappaNet models, we followed the training procedure for the baseline models in [20]. To deal with complex-valued inputs, we simply treated the real and imaginary parts as two distinct channels. Hence, 15-coil complex-valued k-space or image data were treated as 30-channel data. These models were trained using the RMSProp [16] algorithm to minimize a linear combination of Structural Similarity (SSIM) [19] and $L1$ losses: + +$$ +J (\hat {\mathbf {x}}, \mathbf {x}) = - \operatorname {S S I M} (\hat {\mathbf {x}}, \mathbf {x}) + \lambda \| \hat {\mathbf {x}} - \mathbf {x} \| _ {1}, \tag {9} +$$ + +where $\hat{\mathbf{x}}$ is the reconstruction and $\mathbf{x}$ is the ground truth image, after cropping to the central $320 \times 320$ region. Lambda was set to 0.001. The models were trained for 20 epochs with a fixed learning rate of 0.0003. All models were trained on a machine with 8 NVIDIA Volta V100 GPUs using data parallel training for about 3 days. + +The U-Net models applied either to 15-coil k-space input or 15-coil image input start with 384 channels, which are doubled after each pooling. The GrappaNet model contains a total of 4 U-Nets, each of which starts with 192 channels. All three models have roughly 480M parameters. + +Experimental results are shown in table 1, which lists three metrics that are computed in the same manner as [20]: normalized mean squared error (NMSE), peak signal to noise ratio (PSNR) and structural similarity (SSIM) [19]. All of the proposed models perform significantly better than the baselines. The large difference in performance between a U-Net applied to all 15 coils versus the U-Net baseline + +underscores the importance of letting the neural network figure out how to combine the coil images. + +The GrappaNet performs best according to all metrics. The improved performance of the GrappaNet can be attributed to the inclusion of the GRAPPA layer to implement parallel imaging within the network. + +Some example reconstructions are shown in figures 2 and 3 for $4 \times$ and $8 \times$ accelerations, respectively. Figure 4 and 5 show some of the medically relevant regions zoomed in for $4 \times$ acceleration. The baseline U-Net model is able to remove aliasing artifacts, but this comes at the cost of severe over-smoothing. The reconstruction lacks some of the high frequency detail that is clinically relevant. The reconstructions from the image U-Net model are significantly better than the baseline, but they are not as sharp as the reconstructions from the GrappaNet model. + +The Variational Net model makes heavy use of estimated sensitivity maps throughout the network, including in the data consistency terms. It is able to generate good reconstructions with $4\times$ acceleration, which retains a sufficient number of low frequency lines to estimate sensitivity maps. When the acquisition is accelerated by $8\times$ , however, the performance degrades significantly since it is not possible to accurately estimate sensitivity maps for this case. + +# 5. Conclusion and Future Work + +In this paper, we introduced the GrappaNet architecture for multi-coil MRI reconstruction. Multi-coil MRI reconstruction presents an important and challenging problem + +
AccelerationModelNMSEPSNRSSIM
PDPDFSPDPDFSPDPDFS
4-foldClassical CS baseline0.01980.095132.627.50.6930.588
U-Net Baseline0.01540.052534.0029.950.8150.636
Variational Net0.01380.026235.8233.1960.9190.855
K-Space U-Net0.00550.011437.2736.450.9270.870
Image U-Net0.00340.010339.5836.970.9490.886
GrappaNet0.00260.008540.7437.770.9570.891
8-foldClassical CS baseline0.03520.10929.626.80.6420.551
U-Net Baseline0.02610.068231.528.710.7620.559
Variational Net0.02110.081632.1227.720.7880.675
K-Space U-Net0.01890.020636.4532.540.8700.807
Image U-Net0.00790.016036.2634.360.8860.831
GrappaNet0.00710.014636.7635.040.9220.842
+ +Table 1. Experimental results + +due to the prevalence of parallel imaging and the need to make scan-specific adaptations to the neural networks. GrappaNet addresses this challenge by integrating traditional parallel imaging methods with neural networks and training the model end-to-end. This allows the model to generate high fidelity reconstructions even at high acceleration factors. + +The GRAPPA kernel used in the GrappaNet model is estimated from the low-frequency lines of k-space and is used as a fixed input to the model. A possible extension to this work could explore methods to optimize the process of estimating the kernel jointly with the rest of the network during training. + +Quantitative measures such as NMSE, PSNR, and SSIM only provide an estimate for the quality of the reconstructions. Clinically important details are often subtle and contained in small portions of an MRI. Before techniques such as those presented in this paper can be used in practice, proper clinical validation studies need to be performed to ensure that the use of accelerated MRIs does not degrade the quality of diagnosis. + +# References + +[1] Mehmet Akçakaya, Steen Moeller, Sebastian Weingartner, and Kamil Uğurbil. Scan-specific robust artificial-neural-networks for k-space interpolation (raki) reconstruction: Database-free deep learning for fast imaging. Magnetic Resonance in Medicine, 81(1):439-453, 2019. doi: 10.1002/mrm.27420. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/mrm.27420.3 +[2] David Donoho. Compressed sensing. IEEE Transactions on Information Theory, 52(4):1289-1306, 2006. 2 +[3] Mark A. Griswold, Peter M. Jakob, Robin M. Heide + +mann, Mathias Nittka, Vladimir Jellus, Jianmin Wang, Berthold Kiefer, and Axel Haase. Generalized autocalibrating partially parallel acquisitions (GRAPPA). Magnetic Resonance in Medicine, 47(6):1202-1210, 2002. 1, 2 +[4] Kerstin Hammernik, Teresa Klatzer, Erich Kobler, Michael P. Recht, Daniel K. Sodickson, Thomas Pock, and Florian Knoll. Learning a variational network for reconstruction of accelerated MRI data. Magnetic Resonance in Medicine, 79(6):3055-3071, 2018. 1, 3, 4 +[5] Yoseob Han and Jong Chul Ye. Framing U-Net via deep convolutional framelets: Application to sparse-view CT. IEEE Transactions on Medical Imaging, 37 (6), 2018. 3 +[6] Yoseob Han, Jae Jun Yoo, and Jong Chul Ye. Deep learning with domain adaptation for accelerated projection reconstruction MR. Magnetic Resonance in Medicine, 80(3), 2018. 1, 3 +[7] Chang Min Hyun, Hwa Pyung Kim, Sung Min Lee, Sungchul Lee, and Jin Keun Seo. Deep learning for undersampled MRI reconstruction. Physics in medicine and biology, 63(13), 2018. 3 +[8] K. H. Jin and J. C. Ye. Annihilating filter-based low-rank Hankel matrix approach for image inpainting. IEEE Transactions on Image Processing, 24(11): 3498-3511, 2015. 3 +[9] Kyong Hwan Jin, Michael T. McCann, Emmanuel Froustey, and Michael Unser. Deep convolutional neural network for inverse problems in imaging. CoRR, abs/1611.03679, 2016. URL http://arxiv.org/abs/1611.03679.3 + +[10] Florian Knoll, Kerstin Hammernik, Chi Zhang, S. Möller, Thomas Pock, Daniel K. Sodickson, and Mehmet Akçakaya. Deep learning methods for parallel magnetic resonance image reconstruction. CoRR, abs/1904.01112, 2019. 3 +[11] Dong Liang, Jing Cheng, Ziwen Ke, and Leslie Ying. Deep mri reconstruction: Unrolled optimization algorithms meet neural networks. arXiv preprint arXiv:1907.11711, 2019. 3 +[12] Klaas P Pruessmann, Markus Weiger, Markus B Scheidegger, and Peter Boesiger. SENSE: sensitivity encoding for fast MRI. Magnetic resonance in medicine, 42 (5), 1999. 1, 2 +[13] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. Medical Image Computing and Computer-Assisted Intervention, 2015. 3 +[14] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In MICCAI 2015: Medical Image Computing and Computer-Assisted Intervention, volume 9351 of Lecture Notes in Computer Science, pages 234–241. Springer, 2015. 3 +[15] Jo Schlemper, Jose Caballero, Joseph V. Hajnal, Anthony N. Price, and Daniel Rueckert. A deep cascade of convolutional neural networks for MR image reconstruction. Information Processing in Medical Imaging, 2017. 1, 3 +[16] Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5 - rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 2012. 6 +[17] Martin Uecker, Peng Lai, Mark J Murphy, Patrick Virtue, Michael Elad, John M Pauly, Shreyas S Vasanawala, and Michael Lustig. ESPIRiT -an eigenvalue approach to autocalibrating parallel MRI: where SENSE meets GRAPPA. Magnetic resonance in medicine, 71(3), 2014. 5 +[18] Shanshan Wang, Zhenghang Su, Leslie Ying, Xi Peng, Shun Zhu, Feng Liang, Dagan Feng, and Dong Liang. Accelerating magnetic resonance imaging via deep learning. In IEEE International Symposium on Biomedical Imaging (ISBI), 2016. 1, 3 +[19] Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600-612, 2004. 6 + +[20] Jure Zbontar, Florian Knoll, Anuroop Sriram, Matthew J. Muckley, Mary Bruno, Aaron Defazio, Marc Parente, Krzysztof J. Geras, Joe Katsnelson, Hersh Chandarana, Zizhao Zhang, Michal Drozdal, Adriana Romero, Michael Rabbat, Pascal Vincent, James Pinkerton, Duo Wang, Nafissa Yakubova, Erich Owens, C. Lawrence Zitnick, Michael P. Recht, Daniel K. Sodickson, and Yvonne W. Lui. fastmri: An open dataset and benchmarks for accelerated MRI. CoRR, abs/1811.08839, 2018. URL http://arxiv.org/abs/1811.08839. 1, 2, 3, 4, 6 +[21] Bo Zhu, Jeremiah Z. Liu, Stephen F. Cauley, Bruce R. Rosen, and Matthew S. Rosen. Image reconstruction by domain-transform manifold learning. Nature, 555 (7697), 2018. 1, 3 \ No newline at end of file diff --git a/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/images.zip b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5fc2db6f7d1b1a255cd2d19be5e82193b4eb311f --- /dev/null +++ b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b1496dc5d4474687edc7623bc4233aa304b536de864d742830b29a810d1f195 +size 485225 diff --git a/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/layout.json b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1196fbf06e6e18798b17824356f69a1ccc6bcbcc --- /dev/null +++ b/grappanetcombiningparallelimagingwithdeeplearningformulticoilmrireconstruction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b0ed16bdf0c809c8ba77b6a573e1c263d2444dff9c5731de47dad260ab67a16 +size 291358 diff --git a/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_content_list.json b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..3978bf76c1c2538c523c21290ccc5e1f44c557d1 --- /dev/null +++ b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9f91448dc4488098bcaca93c1598aa61599b7c3f943c2fe72b2b61900fa7173 +size 80424 diff --git a/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_model.json b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..faa01d32c19111eb5a791c7566fee9bd5dd65d4a --- /dev/null +++ b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bde7e3bdc8695ba9daf62aa29610cf41af71ffde1f943b0023e3b1cb44707964 +size 97904 diff --git a/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_origin.pdf b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ffb1d61f6253ef4450d579e654e6992b255797e7 --- /dev/null +++ b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/9ccfd726-385c-4b8c-9661-c2620df681fc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99d53daf10455d39a20636267500baf63aef294f5e0f18291adef27e6afc3821 +size 1980610 diff --git a/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/full.md b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4d90ee2fe87420c78d2f230f4f221779482065f6 --- /dev/null +++ b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/full.md @@ -0,0 +1,341 @@ +# GraspNet-1Billion: A Large-Scale Benchmark for General Object Grasping + +Hao-Shu Fang, Chenxi Wang, Minghao Gou. Cewu Lu1 +Shanghai Jiao Tong University + +fhaoshu@gmail.com, {wcx1997, gmh2015, lucewu}@sjtu.edu.cn + +# Abstract + +Object grasping is critical for many applications, which is also a challenging computer vision problem. However, for cluttered scene, current researches suffer from the problems of insufficient training data and the lacking of evaluation benchmarks. In this work, we contribute a large-scale grasp pose detection dataset with a unified evaluation system. Our dataset contains 97,280 RGB-D image with over one billion grasp poses. Meanwhile, our evaluation system directly reports whether a grasping is successful by analytic computation, which is able to evaluate any kind of grasp poses without exhaustively labeling ground-truth. In addition, we propose an end-to-end grasp pose prediction network given point cloud inputs, where we learn approaching direction and operation parameters in a decoupled manner. A novel grasp affinity field is also designed to improve the grasping robustness. We conduct extensive experiments to show that our dataset and evaluation system can align well with real-world experiments and our proposed network achieves the state-of-the-art performance. Our dataset, source code and models are publicly available at www.graspnet.net. + +# 1. Introduction + +Object grasping is a fundamental problem and has many applications in industry, agriculture and service trade. The key of grasping is to detect the grasp poses given visual inputs (image or point cloud) and it has drawn many attentions in computer vision community [11, 30]. + +Though important, there are currently two main hindrances to obtaining further performance gains in this area. Firstly, the grasp poses have different representations including rectangle [36] and 6D pose [41] representation and are evaluated with different metrics [16, 14, 41] correspond + +![](images/4eb9e593c41b989b4635b0e49c560512938b68354f9eefe36994f94fb4d6bbc0.jpg) +Figure 1. Our methodology for building the dataset. We collect data with real-world sensors and annotate grasp poses for every single object by analytic computation. Object 6D poses are manually annotated to project the grasp poses from object coordinate to the scene coordinate. Such methodology greatly reduces the labor of annotating grasp poses. Our dataset is both densely annotated and visually coherent with real world. + +ingly. The difference in evaluation metrics makes it difficult to compare these methods directly in a unified manner, while evaluating with real robots would dramatically increase the evaluation cost. Secondly, it is difficult to obtain large-scale high quality training data [5]. Previous datasets annotated by human [16, 50, 7] are usually small in scale and only provide sparse annotations. While obtaining training data from the simulated environment [26, 9, 48] can generate large scale datasets, the visual domain gap between simulation and reality would inevitably degrade the performance of algorithms in real-world application. + +To form a solid foundation for algorithms built upon, it is important for a benchmark to i) provide data that aligns well with the visual perception from real world sensors, ii) be densely and accurately annotated with large-scale grasp pose ground-truth and iii) evaluate grasp poses with different representations in a unified manner. This is nontrivial, especially when it comes to the data annotation. Given an image or scene, it's hard for us to manually annotate endless grasp poses in continuous space. We circumvent this issue by exploring a new direction, that is, collecting data + +from the real world and annotating them by analytic computation in simulation, which leverages the advantages from both sides. + +Specifically, inspired by previous literature [41], we propose a two-step pipeline to generate tremendous grasp poses for a scene. Thanks to our automatic annotation process, we built the first large-scale in-the-wild grasp pose dataset that can serve as a base for training and evaluating grasp pose detection algorithms. Our dataset contains 97,280 RGB-D images taken from different viewpoints of over 190 cluttered scenes. For all 88 objects in our dataset, we provide accurate 3D mesh models. Each scene is densely annotated with object 6D poses and grasp poses, bringing over one billion grasp poses, which is 5 orders of magnitude larger than previous datasets. Moreover, embedded with an online evaluation system, our benchmark is able to evaluate current mainstream grasping detection algorithms in a unified manner. Experiments also demonstrate that our benchmark can align well with real-world experiments. Fig 1 shows the methodology for building our dataset. + +Given such a large scale dataset, we further propose a novel method for learning grasp poses. For better geometric reasoning and context encoding, we propose an end-to-end 3D based grasp pose detection network. Instead of predicting grasp pose matrix directly, our network seeks a more robust learning way that learns approaching direction and operation parameters (e.g. in-plane rotation, grasp width) explicitly under a unified objective. Moreover, to improve the perturbation resistance of the grasp pose, we propose a novel representation called grasp affinity fields to make our network being robust to perturbation. Experiments demonstrate the effectiveness and efficiency of our proposed method. + +# 2. Related Work + +In this section, we first review deep learning based grasping detection algorithms, followed by related datasets in this area. Point cloud based deep learning methods are also briefly reviewed. + +# Deep Learning Based Grasping Prediction Algorithms + +For deep learning based grasping detection algorithms, they can be divided into three main categories. The most popular one is to detect a graspable rectangle based on RGB-D image input [16, 21, 36, 13, 30, 22, 26, 50, 1, 2, 7, 27, 28]. Lenz et al. [21] proposed a cascaded method with two networks that first prunes out unlikely grasps and then evaluates the remaining grasps with a larger network. Redmon et al. [36] proposed a different network structure that directly regresses the grasp poses in a single step manner, which is faster and more accurate. Mahler et al. [26] proposed a grasp quality CNN to predict the robustness scores of grasping candidates. Zhang [50] and Chu [7] extended + +it to multi-object scenarios. The grasp poses generated by these methods are constrained in 2D plane which limits the degree of freedom of grasp poses. With the rapid development in monocular object 6D pose estimation [17, 45], some researchers [8] predict 6D poses of the objects and project predefined grasp poses to the scene. Such methods have no limitation of grasping orientation, but require a prior knowledge about the object shape. Recently, starting from [42] there is a new line of researches [41, 24, 28, 35] that propose grasping candidates on partial observed point clouds and output a classification score for each candidate using 3D CNN. Such methods require no prior knowledge about the objects. Currently, these methods are evaluated in their own metrics and hard to compare to others. + +Grasping Dataset Cornell grasping dataset [16] first proposed rectangle representation for grasping detection in images. Single object RGB-D images are provided with rectangle grasp poses. [7, 50] built datasets with the same protocol but extend to multi-object scenarios. These grasp poses are annotated by human. [30, 22] collect annotations with real robot experiments. These data labeling methods are time consuming and require strong hardware support. To avoid such problem, some recent works explore using simulated environment [26, 9, 48, 28, 4] to annotate grasp poses. They can generate a much larger scale dataset but the domain gap of visual perception is always a hindrance. Beyond rectangle based annotation, GraspSeg [2] provides pixel-wise annotations for grasp-affordance segmentation and object segmentation. For 6D pose estimation, [45] contributes a dataset with 21 objects and 92 scenes. These datasets mainly focus on a subarea of grasp pose detection. In this work, we aim to build a dataset that is much larger in scale and diversity and covers main aspects of object grasping detection. + +Point Cloud Based Deep Learning Qi et al. first proposed PointNet [33] to directly learn features from raw point cloud inputs. After that, many methods [34, 38, 3, 23, 12, 43, 39, 40, 20, 19, 49, 47, 44, 46, 15] are proposed to perform point cloud classification and segmentation. Beyond that, some recent works [31, 37, 32] extended the PointNet framework to the area of 3D object detection. The most similar network structure to ours is that of Qin et al. [35], which also predicted grasp poses based on PointNet. In this work, we design an end-to-end network with a new representation of grasp pose rather than direct regression. + +# 3. GraspNet-1Billion + +We next describe the main features of our dataset and how we build it. + +![](images/05aca4f93a83cc46193dd5a32e51a0de58a4d7dd760abfc7da9dfb97e288ed7c.jpg) +Figure 2. The key components of our dataset. RGB-D images are taken using both RealSense camera and Kinect camera from different views. The 6D pose of each object, the grasp poses, the rectangle grasp poses and the instance masks are annotated. A unified evaluation system is also provided. + +![](images/c50325c624fcf89035e821124f30b14034f2d92879d73682451d883baa8870ce.jpg) + +![](images/497c5e38d33ce8f490d2017f1d63c16f60a36270513d5e65e00088a51acb52a0.jpg) + +# 3.1. Overview + +Previous grasping dataset either focuses on isolated object [16, 26, 9, 48] or only labels one grasp per scene [30, 22]. Few datasets consider multi-object-multi-grasp setting and are small in scale [50, 7] due to the labor of annotation. Moreover, most of the datasets adopt the rectangle based representation [16] of grasp pose, which constrains the space for placing the gripper. To overcome these issues, we propose a large-scale dataset in cluttered scenario with dense and rich annotations for grasp pose prediction named GraspNet-1Billion. Our dataset contains 88 daily objects with high quality 3D mesh models. The images are collected from 190 cluttered scenes, each contributes 512 RGB-D images captured by two different cameras, bringing 97,280 images in total. For each image, we densely annotate 6-DoF grasp poses by analytic computation of force closure [29]. The grasp poses for each scene varies from 3,000,000 to 9,000,000, and in total our dataset contains over 1.1 billion grasp poses. Besides, we also provide accurate object 6D pose annotations, rectangle based grasp poses, object masks and bounding boxes. Each frame is also associated with a camera pose, thus multi-view point cloud can be easily fused. Fig 2 illustrates the key components of our dataset. + +# 3.2. Data Collection + +We select 32 objects that are suitable for grasping from the YCB dataset [6], 13 adversarial objects from DexNet 2.0 [26] and collects 43 objects of our own to construct our object set. The objects have suitable sizes for grasping and are diverse in shape, texture, size, material, etc. We believe that diverse local geometry can bring better generalization ability for the algorithm. To collect data of cluttered scene, we attach the cameras to a robot arm since it can repeat the trajectory precisely and help automatizing the collecting process. Camera calibration is conducted before data collection to obtain accurate camera poses. Considering + +![](images/fc838f4403cca60362007650d792b1da015468180181439fb44f78b184de8aed.jpg) +Figure 3. Grasp pose annotation pipeline. The grasp point is firstly sampled from point cloud. Then the grasp view, the in-plane rotation and the gripper depth are sampled and evaluated. Finally, the grasps are projected on the scene using the 6D pose of each object. Collision detection is also conducted to avoid the collision between grasps and background or other object. + +different quality of depth image will inevitably affect the algorithms, we adopt two popular RGB-D cameras, Intel RealSense 435 and Kinect 4 Azure, to simultaneously capture the scene and provide rich data. For each scene, we randomly pick around 10 objects from our whole object set and place them in a cluttered manner. The robot arm then moves along a fixed trajectory that covers 256 distinct viewpoints on a quarter sphere. A synchronized image pair from both RGB-D cameras as well as their camera poses will be saved. Note that for camera calibration, we conducted camera extrinsic parameter calibration to avoid the errors from forward kinematics. To be specific, we took photos of a fixed ArUco marker at the 256 data collection points. The camera poses w.r.t the marker coordinate system were obtained. These camera poses are pretty accurate and work well for our dataset. The detail setting of our data collection process will be provided in supplementary materials. + +# 3.3. Data Annotation + +6D Pose Annotation With 97,280 images in total, it would be labor consuming to annotate 6D poses for each + +
DatasetGrasps / sceneObjects / sceneGrasp label6D poseTotal objectsTotal graspsTotal imagesModalityData source
Cornell [16]~81Rect.No24080191035RGB-D1 Cam.
Pinto et al. [30]1-Rect.No15050K50KRGB-D1 Cam.
Levine et al. [22]1-Rect.No-800K800KRGB-D1 Cam.
Mahler et al. [26]11Rect.No1,5006.7M6.7MDepthSim.
Jacquard [9]~201Rect.No11K1.1M54KRGB-DSim.
Zhang et al. [50]~20~3Rect.No-100K4683RGB1 Cam.
Multi-Object [7]~30~4Rect.No-290496RGB-D1 Cam.
VR-Grasping-101 [48]10016-DOFYes1014.8M10KRGB-DSim.
YCB-Video [45]None~5NoneYes21None134KRGB-D1 Cam.
GraspNet (ours)3~9M~106-DOFYes88~1.2B97KRGB-D2 Cams.
+ +Table 1. Summary of the properties of publicly available grasp datasets. "Rect.", "Cam." and "Sim." are short for Rectangle, Camera and Simulation respectively. "-" denotes the number is unknown. + +frame. Thanks to the camera poses recorded, we only need to annotate 6D poses for the first frame of each scene. The 6D poses will then be propagated to the remaining frames by: + +$$ +\mathbf {P} _ {i} ^ {j} = \mathbf {c a m} _ {i} ^ {- 1} \mathbf {c a m} _ {0} \mathbf {P} _ {0} ^ {j}, \tag {1} +$$ + +where $\mathbf{P}_i^j$ is the 6D pose of object $j$ at frame $i$ and $\mathbf{cam}_i$ is the camera pose of frame $i$ . All the 6D pose annotations were carefully refined and double-checked by several annotators to ensure high quality. Object masks and bounding boxes are also obtained by projecting objects onto the images using 6D poses. + +Grasp Pose Annotation Different from labels in common vision tasks, grasp poses distribute in a large and continuous search space, which brings infinite annotations. Annotating each scene manually would be dramatically labor expensive. Considering all the objects are known, we propose a two stage automated pipeline for grasp pose annotation, which is illustrated in Fig. 3. + +First, grasp poses are sampled and annotated for each single object. To achieve that, high quality mesh models are downsampled such that the sampled points (called grasp points) are uniformly distributed in voxel space. For each grasp point, we sample $V$ views uniformly distributed in a spherical space. Grasp candidates are searched in a two-dimensional grid $D \times A$ , where $D$ is the set of gripper depths and $A$ is the set of in-plane rotation angles. Gripper width is determined accordingly such that no empty grasp or collision occurs. Each grasp candidate will be assigned a confidence score based on the mesh model. + +We adopt an analytic computation method to grade each grasp. The force-closure metric [29, 41] has been proved effective in grasp evaluation: given a grasp pose, the associated object and a friction coefficient $\mu$ , force-closure metric outputs a binary label indicating whether the grasp is antipodal under that coefficient. The result is computed based on physical rules, which is robust. Here we adopt an improved metric described in [24]. With $\Delta \mu = 0.1$ as interval, we decrease $\mu$ gradually from 1 to 0.1 step by step until the grasp + +is not antipodal. The grasp with lower friction coefficient $\mu$ has more probability of success. Thus we define our score $s$ as: + +$$ +s = 1. 1 - \mu , \tag {2} +$$ + +such that $s$ lies in $(0,1]$ . + +Second, for each scene, we project these grasps to the corresponding objects based on the annotated 6D object poses: + +$$ +\mathbf {P} ^ {i} = \mathbf {c a m} _ {0} \mathbf {P} _ {0} ^ {i}, +$$ + +$$ +\mathbb {G} _ {(w)} ^ {i} = \mathbf {P} ^ {i} \cdot \mathbb {G} _ {(o)} ^ {i}, \tag {3} +$$ + +where $\mathbf{P}^i$ is the 6D pose of the $i$ -th object in the world frame, $\mathbb{G}_{(o)}^i$ is a set of grasp poses in the object frame and $\mathbb{G}_{(w)}^i$ contains the corresponding poses in the world frame. Besides, collision check is performed to avoid invalid grasps. Following [41], we adopt the simplified gripper model as shown in Fig. 4 and check whether there are object points in this area. After these two steps we can generate densely distributed grasp set $\mathbb{G}_{(w)}$ for each scene. According to statistics, the ratio of positive and negative labels in our dataset is around 1:2. We conduct real world experiment in Sec. 5 using our robot arm and verify that our generated grasp poses can align well with real world grasping. + +# 3.4. Evaluation + +Dataset Split For our 190 scenes, we use 100 for training and 90 for testing. Specifically, we further divide our test sets into 3 categories: 30 scenes with seen objects, 30 with unseen but similar objects and 30 for novel objects. We hope that such setting can better evaluate the generalization ability of different methods. + +New Metrics To evaluate the prediction performance of grasp pose, previous methods adopt the rectangle metric that consider a grasp as correct if: i) the rotation error is less than $30^{\circ}$ and ii) the rectangle IOU is larger than 0.25. + +There are several drawbacks of such metric. Firstly, it can only evaluate rectangle representation of grasp pose. + +Secondly, the error tolerance is set rather high since the groundtruth annotations are not exhaustive. It might overestimate the performance of grasping algorithm. Currently, the Cornell dataset [16] has achieved over $99\%$ accuracy. In this work, we adopt an online evaluation algorithm to evaluate the grasp accuracy. + +We first illustrate how we classify whether a single grasp pose is true positive. For each predicted grasp pose $\hat{\mathbf{P}}_i$ , we associate it with the target object by checking the point cloud inside the gripper. Then, similar to the process of generating grasp annotation, we can get a binary label for each grasp pose by force-closure metric, given different $\mu$ . + +For cluttered scene, grasp pose prediction algorithms are expected to predict multiple grasps. Since for grasping, we usually conduct execution after the prediction, the percentage of true positive is more important. Thus, we adopt Precision@k as our evaluation metric, which measures the precision of top-k ranked grasps. $AP_{\mu}$ denotes the average Precision@k for k ranges from 1 to 50 given friction $\mu$ . Similar to COCO [25], we report $AP_{\mu}$ at different $\mu$ . Specifically, we denote AP for the average of $AP_{\mu}$ ranging from $\mu = 0.2$ to $\mu = 1.0$ , with $\Delta \mu = 0.2$ as interval. + +To avoid dominated by similar grasp poses or grasp poses from single object, we run a pose-NMS before evaluation. For the details of pose-NMS please refer to the supplementary file. + +# 3.5. Discussion + +In this work, we aim to provide a general benchmark for the problem of object grasping. The grasping problem can be decoupled as: i) predict all possible grasp poses (by CV community) and ii) conduct motion planning for specific robotic setting and grasp (by robotics community). For our benchmark, we focus on the vision problem and decouple the labels from the design choices of the robotic environment as much as possible. We provided multiple cameras and multiple views, simplified the gripper model and the collision detection to improve the generality of the dataset. The motion planning and collisions with real gripper and robot arm are not considered as they are related to the robotic environment and should be solved at run-time. We hope our dataset can facilitate fair comparison among different grasp pose detection algorithms. + +We compare our datasets with other publicly available grasp datasets. Table 1 summarizes the main differences at several aspects. We can see that our dataset is much larger in scale and diversity. With our two-step annotation pipeline, we are able to collect real images with dense annotations, which leverages the advantages from both sides. + +For grasp pose evaluation, due to the continuity in grasping space, there are in fact infinite feasible grasp poses. The previous method that pre-computed ground truth for evaluating grasping, no matter collected by human anno + +![](images/5cfd2b801cecc6f3560adc6153422e6df09df645f4d7881ea56aac67b12416e1.jpg) +(a) + +![](images/2b4a39a6b2c2f1a1f626258ea3caaf1d740dc758968520a8321ac5d8a85b117e.jpg) +(b) +Figure 4. (a) The coordinate frame of the gripper. (b) Our new representation of grasp pose. "obj." denotes object point. Our network needs to predict i) the approaching vector $V$ , ii) the approaching distance from grasp point to the origin of gripper frame $D$ , iii) the in-plane rotation around approaching axis $R$ and iv) the gripper width $W$ . + +tation [16] or simulation [9], cannot cover all feasible solution. In contrast, we do not pre-compute labels for the test set, but directly evaluate them by calculating the quality score using force closure metric [29]. Such evaluation method does not assume the representation of the grasp pose, thus is general in practice. Related APIs is made publicly available to facilitate the research in this area. + +# 4. Method + +We then introduce our end-to-end grasp pose detection network, which is illustrated in Fig. 5. Our grasp pose representation is introduced in 4.1. Accordingly, we mainly divide our pipeline into three parts: Approach Network, Operation Network and Tolerance Network. + +# 4.1. Grasp Pose Representation + +Similar to previous works [41, 24], we define the frame of the two-finger parallel gripper as Fig. 4(a). With the known gripper frame, grasp pose detection aims to predict the orientation and translation of the gripper under the camera frame, as well as the width of the gripper. We represent the grasp pose $\mathbf{G}$ as + +$$ +\mathbf {G} = \left[ \mathbf {R} \mathbf {t} w \right], \tag {4} +$$ + +where $\mathbf{R} \in \mathbb{R}^{3 \times 3}$ denotes the gripper orientation, $\mathbf{t} \in \mathbb{R}^{3 \times 1}$ denotes the center of grasp and $w \in \mathbb{R}$ denotes the gripper width that is suitable for grasping the target object. For neural network, directly learning the rotation matrix in $\mathbb{R}^{3 \times 3}$ is not intuitive. The explicit constraints, such as the determinant of rotation matrix must equal one and the inverse of it is its transpose, are difficult to learn. Instead, we adopt the representation from 6D pose estimation [17] that decouples the orientation as viewpoint classification and in-plane rotation prediction. Our problem is then reformulated as follows without loss of generality: for a grasp point on the surface of objects, we predict the feasible approaching vectors, approaching distance, in-plane rotation along the approaching axis and a tight gripper width. Fig. 4(b) explains + +![](images/3043f88b5d26b5e0befc643d299ab496be7944e686a26fa826d4902ed9554e7f.jpg) +Figure 5. Overview of our end-to-end network. (a) For a scene point cloud with $N$ point coordinates as input, a point encoder-decoder extracts cloud features and samples $M$ points with $C$ -dim features. (b) Approaching vectors are predicted by ApproachNet and are used to (c) grouped points in cylinder regions. (d) OperationNet predicts the operation parameters and ToleranceNet predicts the grasp robustness. See text for more details. + +our formulation of grasp pose. Following such formulation, our network design is illustrated as follows. + +# 4.2. Approach Network and Grasp Point Selection + +The approaching vectors and feasible grasp points are jointly estimated by our Approach Network, since some directions are not suitable for grasping due to occlusion. + +Base Network To build a solid foundation for viewpoint classification, we first use a base network for capturing well point cloud geometric features. In this work, we adopt PointNet++ [34] backbone network. Other networks like VoxelNet [51] can be also adopted. Taking a raw point cloud with size $N \times 3$ as input, our base network outputs a new set of points with $C$ channels features. We subsample $M$ points with farthest point sampling [10] to cover the whole scene. + +Output Head We classify feasible approaching vectors into $V$ predefined viewpoints. Meanwhile, for each point, the Approach Network outputs two values to predict its confidence of graspable or not. Therefore, the output of our proposal generation network is $M \times (2 + V)$ , where 2 denotes the binary class of graspable or not and $V$ denotes the number of predefined approaching vectors. + +Loss Function For each candidate point, we assign it a binary label indicating whether it is graspable or not. First, points which are not on the objects are assigned negative labels. Next, for points on the objects, we found those who have at least one graspable ground-truth within $5\mathrm{mm}$ radius neighbor area. Their graspable scores are assigned as 1. Finally, points on the objects but cannot find reference ground-truth grasps are ignored, which do not contribute to the training objective. + +For each graspable point, $V$ virtual approaching vectors are sampled around it under the camera frame. Now, we can define the approaching vector of $j^{th}$ virtual view of $i^{th}$ + +graspable point as $v_{ij}$ . We then look for its ground-truth reference vector $\hat{v}_{ij}$ on the sphere space of the $i^{th}$ point. Similarly, we only consider reference vectors that are within 5 degree bound. With such definition, our target function for an input point cloud is defined as follows: + +$$ +\begin{array}{l} L ^ {A} (\{c _ {i} \}, \{s _ {i j} \}) = \frac {1}{N _ {c l s}} \sum_ {i} L _ {c l s} (c _ {i}, c _ {i} ^ {*}) \\ + \lambda_ {1} \frac {1}{N _ {r e g}} \sum_ {i} \sum_ {j} c _ {i} ^ {*} {\bf 1} (| v _ {i j}, v _ {i j} ^ {*} | < 5 ^ {\circ}) L _ {r e g} (s _ {i j}, s _ {i j} ^ {*}). \\ \end{array} +$$ + +Here, $c_{i}$ denotes the binary prediction of graspable or not for point $i$ . $c_{i}^{*}$ is assigned 1 if point $i$ is positive and 0 if negative. $s_{ij}$ denotes the predicted confidence score for viewpoint $j$ of point $i$ . $s_{ij}^{*}$ is the corresponding groundtruth, which is obtained by choosing the maximum grasp confidence (Eqn. 2) from that viewpoint. $|v_{ij}, v_{ij}^{*}|$ denotes degree difference. Indicator function $\mathbf{1}()$ constrains the loss on approaching vectors that has a nearby groundtruth within 5 degree bound. Here for $L_{cls}$ we use a two class softmax loss, while for $L_{reg}$ we use the smooth $L_{1}$ loss. + +# 4.3. Operation Network + +After getting approaching vectors from graspable points, we further predict in-plane rotation, approaching distance, gripper width and grasp confidence, which is important for operation. Here, grasp confidence have 10 levels (Eqn. 2). + +Cylinder Region Transformation Before forwarding through the operation network, we build a unified representation for each grasp candidate. Since approaching distance is relatively less sensitive, we divide it into $K$ bins. For each given distance $d_{k}$ , we sample points inside the cylinder centered along the approaching vectors to a fixed number. For better learning, all the sampled points are transformed into a new coordinate whose origin is the grasp point and $z$ -axis + +is $\mathbf{v}_{\mathbf{ij}}$ . The transformation matrix $\mathbf{O}_{\mathbf{ij}}$ is calculated as: + +$$ +\mathbf {O} _ {\mathbf {i j}} = \left[ \mathbf {o} _ {\mathbf {i j}} ^ {\mathbf {1}}, \left[ 0, - \mathbf {v} _ {\mathbf {i j}} ^ {(3)}, \mathbf {v} _ {\mathbf {i j}} ^ {(2)} \right] ^ {\mathrm {T}}, \mathbf {v} _ {\mathbf {i j}} \right], +$$ + +$$ +w h e r e \mathbf {o} _ {\mathbf {i j}} ^ {\mathbf {1}} = \left[ 0, - \mathbf {v} _ {\mathbf {i j}} ^ {(3)}, \mathbf {v} _ {\mathbf {i j}} ^ {(2)} \right] ^ {\mathrm {T}} \times \mathbf {v} _ {\mathbf {i j}}, +$$ + +$\mathbf{v}_{\mathbf{ij}}^{(k)}$ is the $k$ -th element of $\mathbf{v}_{\mathbf{ij}}$ . After such transformation, candidate grasp poses has a unified representation and coordinate. + +Rotation and Width It has been proved in previous literature [17] that for predicting in-plane rotation, classification could achieve better results than regression. Following such setting, our rotation network takes the aligned point cloud as input and predicts classification scores and normalized residuals for each binned rotation, as well as the corresponding grasp width and confidence. It is worth noticing that since gripper is symmetric, we only predict rotations ranging from 0 to 180 degree. The objective function for the network is: + +$$ +\begin{array}{l} L ^ {R} \left(R _ {i j}, S _ {i j}, W _ {i j}\right) = \sum_ {d = 1} ^ {K} \left(\frac {1}{N _ {c l s}} \sum_ {i j} L _ {c l s} ^ {d} \left(R _ {i j}, R _ {i j} ^ {*}\right) \right. \\ + \lambda_ {2} \frac {1}{N _ {r e g}} \sum_ {i j} L _ {r e g} ^ {d} \left(S _ {i j}, S _ {i j} ^ {*}\right) \tag {6} \\ \left. + \lambda_ {3} \frac {1}{N _ {r e g}} \sum_ {i j} L _ {r e g} ^ {d} (W _ {i j}, W _ {i j} ^ {*})\right), \\ \end{array} +$$ + +where $R_{ij}$ denotes the binned rotation degrees, $S_{ij}, W_{ij}$ and $d$ denote the grasp confidence scores, gripper widths and approaching distance respectively. $L^{d}$ means loss for the $d^{th}$ binned distance. Here, for $L_{cls}$ we use sigmoid cross entropy loss function for multi-class binary classification. + +# 4.4. Tolerance Network + +After previous steps, our end-to-end network can already predict accurate grasp poses. Beyond that, we further propose a representation called grasp affinity fields(GAFs) to improve the robustness of our grasp poses prediction. Since feasible grasp poses are infinite, humans tend to pick grasp poses that can tolerate larger errors. Inspired by this, our GAFs learn to predict the tolerance to perturbation for each grasp. + +Given a ground truth grasp pose, we search its neighbors in the sphere space to see the farthest distance that the grasp is still robust with grasp score $s > 0.5$ and set it as the target for our GAFs. The loss function is written as: + +$$ +L ^ {F} \left(A _ {i j}\right) = \frac {1}{N _ {r e g}} \sum_ {d = 1} ^ {K} \sum_ {i j} L _ {r e g} ^ {d} \left(T _ {i j}, T _ {i j} ^ {*}\right), \tag {7} +$$ + +where $T_{ij}$ denotes the maximum perturbation that the grasp pose can resist. + +
Objects=1s=0.5s=0.1Objects=1s=0.5s=0.1
Banana98%67%21%Apple97%65%16%
Peeler95%59%9%Dragon96%60%9%
Mug96%62%12%Camel93%67%23%
Scissors89%61%5%Power Drill96%61%14%
Lion98%68%16%Black Mouse98%64%13%
+ +Table 2. Summary of real world success rate of grasping given different grasp score. + +# 4.5. Training and Inference + +During training, the whole network is updated in an end-to-end manner by minimizing the follow objective function: + +$$ +L = L ^ {A} \left(\left\{c _ {i} \right\}, \left\{s _ {i j} \right\}\right) + \alpha L ^ {R} \left(R _ {i j}, S _ {i j}, W _ {i j}\right) + \beta L ^ {F} \left(T _ {i j}\right) \tag {8} +$$ + +During inference, we refine our grasp poses by dividing them into 10 bins according to their grasp scores and resort the grasps in each bin according to the perturbation they can resist predicted by our tolerance network. We divide the predicted grasps into 10 bins because our labels have 10 different grasp scores. Experiments demonstrate that such refinement can improve the grasping quality effectively. + +# 5. Experiments + +In this section, we first conduct robotic experiments to demonstrate that our ground-truth annotations can align well with real-world grasping. Then we benchmark several representative methods on our dataset and compare them with our methods in a unified evaluation metric (Sec. 3.4). Finally, we conduct ablation studies to show the effectiveness of our network components. + +# 5.1. Ground-Truth Evaluation + +To evaluate the quality of our generated grasp poses, we set up a real robotic experiment. Since we need to project grasp poses to the camera frame using objects' 6D poses, we paste ArUco code on the objects and only label their 6D poses once to avoid tedious annotation process. + +We pick 10 objects from our object set and execute grasp poses that has different scores. For each setting we randomly choose 100 grasp poses. For robot arm we adopt a Flexiv Rizon arm and for camera we use the Intel RealSense 435. Table 2 summarizes the success rate of grasping. We can see that for grasp poses with high score, the success rate can achieve 0.96 in average. Meanwhile, the success rate is pretty low for grasp poses with $s = 0.1$ . It indicates that our generated grasp poses are well aligned with real world grasping. + +# 5.2. Benchmarking Representative Methods + +We benchmark different representative methods on our dataset and compare them with our method. + +![](images/51cdc53d38ccf1a06c3ade52807ce1a82e0bddc0089b80d3d42e4808d225596f.jpg) +Figure 6. Qualitative results of our predicted grasp poses. Scenes are constructed using the RGB-D images taken by cameras. Grasps are represented by blue lines. + +![](images/f7f7f67782ccaececfa7f9e1623baf52cbf64012e7380142f4bb16a5ecfe9124.jpg) + +![](images/23ba040e2061d978ced6134ad15b543ed2b2356ac13f731c176eb1c3750c3783.jpg) + +![](images/0da3ca86f9b9afbc43e6f857a14aa9130b14adb88ab7448d48bfcbd62b1993fb.jpg) + +
MethodsSeenUnseenNovel
AP\(AP_{0.8}\)\(AP_{0.4}\)AP\(AP_{0.8}\)\(AP_{0.4}\)AP\(AP_{0.8}\)\(AP_{0.4}\)
GG-CNN[27]15.48/16.8921.84/22.4710.25/11.2313.26/15.0518.37/19.764.62/6.195.52/7.385.93/8.781.86/1.32
Chu et al. [7]15.97/17.5923.66/24.6710.80/12.7415.41/17.3620.21/21.647.06/8.867.64/8.048.69/9.342.52/1.76
GPD [41]22.87/24.3828.53/30.1612.84/13.4621.33/23.1827.83/28.649.64/11.328.24/9.588.89/10.142.67/3.16
Liang et al. [24]25.96/27.5933.01/34.2115.37/17.8322.68/24.3829.15/30.8410.76/12.839.23/10.669.89/11.242.74/3.21
Ours27.56/29.8833.43/36.1916.95/19.3126.11/27.8434.18/33.1914.23/16.6210.55/11.5111.25/12.923.98/3.56
+ +For rectangle based method, we adopt two methods [27, 7] with open implementations. For point cloud proposal method, we adopt [41, 24]. We train these models according to their original implementations. + +For our method, rotation angle is divided into 12 bins and approaching distance is divided into 4 bins with the value of 0.01, 0.02, 0.03, 0.04 meter. We set $M = 1024$ and $V = 300$ . PointNet++ has four set abstraction layers with the radius of 0.04, 0.1, 0.2, 0.3 in meters and grouping size of 64, 32, 16 and 16, by which the point set is down-sampled to the size of 2048, 1024, 512 and 256 respectively. Then the points are up-sampled by two feature propagation layers to the size 1024 with 256-dim features. ApproachNet, OperationNet and ToleranceNet is composed of MLPs with the size of (256, 302, 302), (128, 128, 36) and (128, 64, 12) respectively. For the loss function, we set $\lambda_1, \lambda_2, \lambda_3, \alpha, \beta = 0.5, 1.0, 0.2, 0.5, 0.1$ . + +Our model is implemented with PyTorch and trained with Adam optimizer [18] on one Nvidia RTX 2080 GPU. During training, we randomly sample $20\mathrm{k}$ points from each scene. The initial learning rate is 0.001 and the batch size is 4. The learning rate is decreased to 0.0001 after 60 epochs and then decreased to 0.00001 after 100 epochs. + +We report the results of different methods in Tab. 3. As we can see, rectangle based method has a lower accuracy among all of the metrics. It denotes that previous rectangle based methods might be over-estimated. Our end-to-end network achieves the state-of-the-art result and outperforms previous methods by a large margin. We show some qualitative results of our predicted grasp poses in Fig. 6. + +# 5.3. Ablation Studies + +To evaluate the effectiveness of different components of our network, we conduct ablation studies on the seen test set of Kinect subset. First we evaluate whether different + +Table 3. Evaluation for different methods. The table shows the results on data captured by RealSense/Kinect respectively. + +
MethodAPAP0.8AP0.4
Full29.8836.1919.31
Replace classification with regression23.7433.2812.15
Remove Tolerance Network28.5335.6216.33
+ +Table 4. Ablation studies of our network. See text for more details. + +grasp pose representations would affect the results by directly regressing the direction of the approaching vector and degree of in-plane rotation. Then we evaluate the effectiveness of our ToleranceNet by removing it from our inference pipeline. Results are reported in Tab. 4. We can see that classification based learning scheme is indeed better than direct regression. Meanwhile, the drop of performance after removing the ToleranceNet demonstrates effectiveness of the grasp affinity fields. + +# 6. Conclusion + +In this paper we built a large-scale dataset for cluttered scene object grasping. Our dataset is orders of magnitude larger than previous grasping datasets and diverse in objects, scenes and data sources. It consists of images taken by real world sensor and has rich and dense annotations. We demonstrated that our dataset align well with real world grasping. Meanwhile, we proposed an end-to-end grasp pose prediction network equipped with a novel representation of grasp affinity fields. Experiments showed the superiority of our method. Our code and dataset will be released. + +Acknowledgment 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] Umar Asif, Jianbin Tang, and Stefan Harrer. Ensemblenet: Improving grasp detection using an ensemble of convolutional neural networks. In BMVC, page 10, 2018. +[2] Umar Asif, Jianbin Tang, and Stefan Harrer. Graspnet: An efficient convolutional neural network for real-time grasp detection for low-powered devices. In IJCAI, pages 4875-4882, 2018. +[3] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point convolutional neural networks by extension operators. arXiv preprint arXiv:1803.10091, 2018. +[4] Samarth Brahmbhatt, Ankur Handa, James Hays, and Dieter Fox. Contactgrasp: Functional multi-finger grasp synthesis from contact. arXiv preprint arXiv:1904.03754, 2019. +[5] Shehan Caldera, Alexander Rassau, and Douglas Chai. Review of deep learning methods in robotic grasp detection. Multimodal Technologies and Interaction, 2(3):57, 2018. +[6] Berk Calli, Arjun Singh, James Bruce, Aaron Walsman, Kurt Konolige, Siddhartha Srinivasa, Pieter Abbeel, and Aaron M Dollar. Yale-cmu-berkeley dataset for robotic manipulation research. The International Journal of Robotics Research, 36(3):261–268, 2017. +[7] Fu-Jen Chu, Ruinian Xu, and Patricio A Vela. Real-world multiobject, multigrasp detection. IEEE Robotics and Automation Letters, 3(4):3355-3362, 2018. +[8] Xinke Deng, Yu Xiang, Arsalan Mousavian, Clemens Eppner, Timothy Bretl, and Dieter Fox. Self-supervised 6d object pose estimation for robot manipulation. arXiv preprint arXiv:1909.10159, 2019. +[9] Amaury Depierre, Emmanuel Dellandrea, and Liming Chen. Jacquard: A large scale dataset for robotic grasp detection. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 3511-3516. IEEE, 2018. +[10] Yuval Eldar, Michael Lindenbaum, Moshe Porat, and Yehoshua Y Zeevi. The farthest point strategy for progressive image sampling. IEEE Transactions on Image Processing, 6(9):1305-1315, 1997. +[11] Kuan Fang, Yuke Zhu, Animesh Garg, Andrey Kurenkov, Viraj Mehta, Li Fei-Fei, and Silvio Savarese. Learning task-oriented grasping for tool manipulation from simulated self-supervision. arXiv preprint arXiv:1806.09266, 2018. +[12] Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9224-9232, 2018. +[13] Di Guo, Fuchun Sun, Huaping Liu, Tao Kong, Bin Fang, and Ning Xi. A hybrid deep architecture for robotic grasp detection. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1609-1614. IEEE, 2017. +[14] Stefan Hinterstoisser, Vincent Lepetit, Slobodan Ilic, Stefan Holzer, Gary Bradski, Kurt Konolige, and Nassir Navab. Model based training, detection and pose estimation of texture-less 3d objects in heavily cluttered scenes. In Asian conference on computer vision, pages 548-562. Springer, 2012. + +[15] Mingyang Jiang, Yiran Wu, Tianqi Zhao, Zelin Zhao, and Cewu Lu. Pointsift: A sift-like network module for 3d point cloud semantic segmentation. arXiv preprint arXiv:1807.00652, 2018. +[16] Yun Jiang, Stephen Moseson, and Ashutosh Saxena. Efficient grasping from rgbd images: Learning using a new rectangle representation. In 2011 IEEE International Conference on Robotics and Automation, pages 3304-3311. IEEE, 2011. +[17] Wadim Kehl, Fabian Manhardt, Federico Tombari, Slobodan Ilic, and Nassir Navab. Ssd-6d: Making rgb-based 3d detection and 6d pose estimation great again. In Proceedings of the IEEE International Conference on Computer Vision, pages 1521–1529, 2017. +[18] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. +[19] Roman Klokov and Victor Lempitsky. Escape from cells: Deep kd-networks for the recognition of 3d point cloud models. In Proceedings of the IEEE International Conference on Computer Vision, pages 863-872, 2017. +[20] Truc Le and Ye Duan. Pointgrid: A deep network for 3d shape understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9204-9214, 2018. +[21] Ian Lenz, Honglak Lee, and Ashutosh Saxena. Deep learning for detecting robotic grasps. The International Journal of Robotics Research, 34(4-5):705-724, 2015. +[22] Sergey Levine, Peter Pastor, Alex Krizhevsky, Julian Ibarz, and Deirdre Quillen. Learning hand-eye coordination for robotic grasping with deep learning and large-scale data collection. The International Journal of Robotics Research, 37(4-5):421-436, 2018. +[23] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. In Advances in Neural Information Processing Systems, pages 828-838, 2018. +[24] Hongzhuo Liang, Xiaojian Ma, Shuang Li, Michael Gorner, Song Tang, Bin Fang, Fuchun Sun, and Jianwei Zhang. Pointnetgpd: Detecting grasp configurations from point sets. In 2019 International Conference on Robotics and Automation (ICRA), pages 3629-3635. IEEE, 2019. +[25] 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), pages 740-755. Springer, 2014. +[26] Jeffrey Mahler, Jacky Liang, Sherdil Niyaz, Michael Laskey, Richard Doan, Xinyu Liu, Juan Aparicio Ojea, and Ken Goldberg. Dex-net 2.0: Deep learning to plan robust grasps with synthetic point clouds and analytic grasp metrics. arXiv preprint arXiv:1703.09312, 2017. +[27] Douglas Morrison, Peter Corke, and Jürgen Leitner. Closing the loop for robotic grasping: A real-time, generative grasp synthesis approach. arXiv preprint arXiv:1804.05172, 2018. +[28] Arsalan Mousavian, Clemens Eppner, and Dieter Fox. 6-dof grapnet: Variational grasp generation for object manipulation. arXiv preprint arXiv:1905.10520, 2019. +[29] Van-Duc Nguyen. Constructing force-closure grasps. The International Journal of Robotics Research, 7(3):3-16, 1988. + +[30] Lerrel Pinto and Abhinav Gupta. Supersizing self-supervision: Learning to grasp from 50k tries and 700 robot hours. In 2016 IEEE international conference on robotics and automation (ICRA), pages 3406-3413. IEEE, 2016. +[31] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. arXiv preprint arXiv:1904.09664, 2019. +[32] Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum pointnets for 3d object detection from rgb-d data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 918-927, 2018. +[33] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2017. +[34] Charles R Qi, Li Yi, Hao Su, and Leonidas J Guibas. Point-net++: Deep hierarchical feature learning on point sets in a metric space. arXiv preprint arXiv:1706.02413, 2017. +[35] Yuzhe Qin, Rui Chen, Hao Zhu, Meng Song, Jing Xu, and Hao Su. S4g: Amodal single-view single-shot se (3) grasp detection in cluttered scenes. arXiv preprint arXiv:1910.14218, 2019. +[36] Joseph Redmon and Anelia Angelova. Real-time grasp detection using convolutional neural networks. In 2015 IEEE International Conference on Robotics and Automation (ICRA), pages 1316-1322. IEEE, 2015. +[37] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. PointrCNN: 3d object proposal generation and detection from point cloud. arXiv preprint arXiv:1812.04244, 2018. +[38] Hang Su, Varun Jampani, Deqing Sun, Subhransu Maji, Evangelos Kalogerakis, Ming-Hsuan Yang, and Jan Kautz. Splatnet: Sparse lattice networks for point cloud processing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2530-2539, 2018. +[39] Maxim Tatarchenko, Alexey Dosovitskiy, and Thomas Brox. Octree generating networks: Efficient convolutional architectures for high-resolution 3d outputs. arXiv preprint arXiv:1703.09438, 2017. +[40] Maxim Tatarchenko, Jaesik Park, Vladlen Koltun, and Qian-Yi Zhou. Tangent convolutions for dense prediction in 3d. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3887-3896, 2018. +[41] Andreas ten Pas, Marcus Gualtieri, Kate Saenko, and Robert Platt. Grasp pose detection in point clouds. The International Journal of Robotics Research, 36(13-14):1455–1473, 2017. +[42] Jacob Varley, Jonathan Weisz, Jared Weiss, and Peter Allen. Generating multi-fingered robotic grasps via deep learning. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 4415-4420. IEEE. +[43] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-cnn: Octree-based convolutional neural networks for 3d shape analysis. ACM Transactions on Graphics (TOG), 36(4):72, 2017. +[44] 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. + +[45] Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. PoseCNN: A convolutional neural network for 6d object pose estimation in cluttered scenes. arXiv preprint arXiv:1711.00199, 2017. +[46] Saining Xie, Sainan Liu, Zeyu Chen, and Zhuowen Tu. Attentional shapecontextnet for point cloud recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4606-4615, 2018. +[47] Yifan Xu, Tianqi Fan, Mingye Xu, Long Zeng, and Yu Qiao. Spidercnn: Deep learning on point sets with parameterized convolutional filters. In Proceedings of the European Conference on Computer Vision (ECCV), pages 87-102, 2018. +[48] Xinchen Yan, Jasmined Hsu, Mohammad Khansari, Yunfei Bai, Arkanath Pathak, Abhinav Gupta, James Davidson, and Honglak Lee. Learning 6-dof grasping interaction via deep geometry-aware 3d representations. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 1-9. IEEE, 2018. +[49] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 206–215, 2018. +[50] Hanbo Zhang, Xuguang Lan, Site Bai, Xinwen Zhou, Zhiqiang Tian, and Nanning Zheng. Roi-based robotic grasp detection for object overlapping scenes. arXiv preprint arXiv:1808.10313, 2018. +[51] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4490-4499, 2018. \ No newline at end of file diff --git a/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/images.zip b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3e35fbc7772863a30b1a9df4cf15372ed5192862 --- /dev/null +++ b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb41f0a8a0614ac413dd6af74f0251f253beecdff9748d4162064a962b659c19 +size 527011 diff --git a/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/layout.json b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8c09d14fa7b5c4729fe43abe41c247912c9aa616 --- /dev/null +++ b/graspnet1billionalargescalebenchmarkforgeneralobjectgrasping/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c3e223b5398c48f752a01e4e5570db986c0169ae0abf2b38b1fd64436b19f78 +size 390489 diff --git a/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_content_list.json b/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..29847e5be3c2cbfaea262cd008652ad56d4af1cd --- /dev/null +++ b/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3921ddadd3254036ccbbb25cee3f71f6811bedd75d9cd2417f23c4e067ed0c6a +size 81768 diff --git a/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_model.json b/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bc8042cfb201c7040358d5d077ca54eb8df42926 --- /dev/null +++ b/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bba74d262ae887b32eecbba30c5cd5bb48de6da062138d65d1d95c1be6e305be +size 102119 diff --git a/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_origin.pdf b/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c08ec64a8f274cb6e615561b9ea81782f036047d --- /dev/null +++ b/greedynastowardsfastoneshotnaswithgreedysupernet/f9832d67-402d-4da1-8c17-3754504040cf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fe496e2cd0009a0450fc5562df377c0865b7142f28327a8670dc6c40fd6d663 +size 259212 diff --git a/greedynastowardsfastoneshotnaswithgreedysupernet/full.md b/greedynastowardsfastoneshotnaswithgreedysupernet/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e4a95100b207835cbb493728c3db21984b5a4fe1 --- /dev/null +++ b/greedynastowardsfastoneshotnaswithgreedysupernet/full.md @@ -0,0 +1,322 @@ +# GreedyNAS: Towards Fast One-Shot NAS with Greedy Supernet + +Shan You $^{1,2*}$ , Tao Huang $^{1,3*}$ , Mingmin Yang $^{1*}$ , Fei Wang $^{1}$ , Chen Qian $^{1}$ , Changshui Zhang $^{2}$ $^{1}$ SenseTime $^{2}$ Department of Automation, Tsinghua University + $^{3}$ Dian Group, School of CST, Huazhong University of Science and Technology + +{youshan,huangtao,yangmingmin,wangfei,qianchen}@sensetime.com zcs@mail.tsinghua.edu.cn + +# Abstract + +Training a supernet matters for one-shot neural architecture search (NAS) methods since it serves as a basic performance estimator for different architectures (paths). Current methods mainly hold the assumption that a supernet should give a reasonable ranking over all paths. They thus treat all paths equally, and spare much effort to train paths. However, it is harsh for a single supernet to evaluate accurately on such a huge-scale search space (e.g., $7^{21}$ ). In this paper, instead of covering all paths, we ease the burden of supernet by encouraging it to focus more on evaluation of those potentially-good ones, which are identified using a surrogate portion of validation data. Concretely, during training, we propose a multi-path sampling strategy with rejection, and greedily filter the weak paths. The training efficiency is thus boosted since the training space has been greedily shrunk from all paths to those potentially-good ones. Moreover, we further adopt an exploration and exploitation policy by introducing an empirical candidate path pool. Our proposed method GreedyNAS is easy-to-follow, and experimental results on ImageNet dataset indicate that it can achieve better Top-1 accuracy under same search space and FLOPs or latency level, but with only $\sim 60\%$ of supernet training cost. By searching on a larger space, our GreedyNAS can also obtain new state-of-the-art architectures. + +# 1. Introduction + +By dint of automatic feature engineering, deep neural networks (DNNs) have achieved remarkable success in various computer vision tasks, such as image classification [37, 36, 41, 33, 32, 15, 39], visual generation [34, 35], image retrieval [40, 7, 8, 12] and semantic comprehension [18, 17]. In contrast, neural architecture search (NAS) aims at automatically learning the network architecture to further boost the performance for target tasks [10, 20, 43, 2, 19]. Nevertheless, previous NAS methods in general suffer from + +![](images/744c6562ace55dd8ab4d313c62a96473020ba79c4a7ee44a2934c514a86edacd.jpg) +Figure 1: Diagram of supernet training for our proposed GreedyNAS. The supernet greedily shrinks its training space from all paths (red and blue dots) into potentially-good paths (red dots), and further into candidate pool. + +huge computation budget, such as 2000 GPU days of reinforcement learning [43] and 3150 GPU days of evolution [26] with hundreds of GPUs. + +Current One-shot NAS methods boost the search efficiency by modeling NAS as a one-shot training process of an over-parameterized supernet. As a result, various architectures can be derived from the supernet, and share the same weights. For example, DARTS [21] and its variants [38, 1] parameterize the supernet with an additional categorical distribution for indicating what operations we want to keep. In contrast, recent single path methods adopt a non-parametric architecture modeling, and split the searching into two consecutive stages, i.e., supernet training and architecture sampling. For training supernet, only a single path consisting of a single operation choice is activated and gets optimized by regular gradient-based optimizers. After the supernet is trained well, it is regarded as a performance estimator for all architectures (i.e., paths). Then the optimal architecture can be searched using a hold-out validation dataset via random search [16] or (reinforced) evolutionary [11, 4] algorithms under specified hardware constraint (e.g., FLOPs and latency). As only one path is activated for training, the memory cost coheres with that of traditional network training, and scales well on large-scale datasets (e.g., ImageNet [27]). + +Supernet matters for it serves as a fundamental performance estimator of different architectures (paths). Current methods [16, 11, 4, 3] hold the assumption that the supernet should estimate the (relative) performance accurately for all paths, and thus all paths are treated equally and trained simultaneously. However, the paths contained in the supernet are of fairly huge scale ( $e.g., 7^{21}$ ). Hence it can be harsh for a single supernet to evaluate and give reasonable ranking on such a quantity of paths at the same time. In fact, the ultimate aim of supernet is only to identify a bunch of optimal paths. But the huge search space implies significant variance and variety of paths; there exist many architectures of inferior quality in terms of accuracy performance. $^{1}$ Since the weights of all paths are highly shared, if a weak path is sampled and gets trained, it would disturb the weights of those potentially-good paths. This disturbance will undermine their eventual performance estimation and affect the searched optimal architecture accordingly. The supernet is thus not supposed to care much on these weak paths and get updated for them. Besides, training on those weak paths actually involves unnecessary update of weights, and slows down the training efficiency more or less. + +In this paper, we ease the training burden by encouraging a greedy supernet. A greedy supernet is capable of shifting its focus on performance estimation of those potentially-good paths instead of all paths. Concretely, during the supernet training, we propose a multi-path sampling strategy with rejection to filter the weak paths, so the supernet will greedily train those potentially-good paths. This path filtering can be efficiently implemented via evaluation using a surrogate portion of validation dataset, without harming the computation cost too much. Moreover, we also adopt an exploration and exploitation policy [14, 24] by introducing a candidate pool, which dynamically tracks those potentially-good paths discovered during training. In this way, the supernet improves its training efficiency by switching its training space from all paths into those potentially-good ones, and further into candidate pool by sampling from it, as shown in Figure 1. + +We implement our proposed method GreedyNAS on the large-scale benchmark ImageNet dataset [27], and extensive experimental results indicate our superiority in terms of accuracy performance and supernet training efficiency. For example, with the same search space, our method can achieve higher Top-1 accuracy than that of other comparison methods under the same FLOPs or latency level, but reduces approximate $40\%$ of supernet training cost. By searching on a larger space, we can also obtain new state-of-the-art architectures. + +# 2. Related Work + +One-shot NAS methods mainly aim to train an overparameterized network (a.k.a supernet) that comprises all architectures (paths), which share the same weights mutually. Then the optimal architecture can be derived or searched from the supernet. There are mainly two categories of one-shot NAS methods [9], which differ in how the architectures are modeled and elaborated as follows. + +Parameterized architectures. To use the gradient-based optimizers for direct searching, an real-valued categorical distribution (architecture parameter) is usually introduced in the supernet, and can be thus jointly learned with the supernet weights, such as DARTS [21], FBNet [38] and MdeNAS [42]. When the supernet training is finished, the optimal architecture can be induced by sampling from the categorical distribution. However, it may suffer from the huge GPU memory consumption. ProxylessNAS [1] alleviates this issue by factorizing the searching into multiple binary selection tasks while Single-Path-NAS [29] uses superkernels to encode all operation choices. Basically, they are difficult to integrate a hard hardware constraint (e.g., FLOPs and latency) during search but resort to relaxed regularization terms [38, 1]. + +Sampled single-path architectures. By directly searching the discrete search space, the supernet is trained by sampling and optimizing a single path. The sampling can be uniform sampling [11, 16] or multi-path sampling with fairness [4]. After the supernet is trained, it is supposed to act as a performance estimator for different paths. And the optimal path can be searched by various searchers, such as random search and evolutionary algorithms [6]. For example, ScarletNAS [3] employs a multi-objective searcher [22] to consider classification error, FLOPs and model size for better paths. Different to the previous parameterized methods, the hard hardware constraint can be easily integrated in the searchers. Our proposed method GreedyNAS is cast into this category. + +# 3. Rethinking path training of supernet + +In Single-path One-shot NAS, we utilize an overparameterized supernet $\mathcal{N}$ with parameter $\Omega$ to substantially-ize a search space, which is formulated as a directed acyclic graph (DAG). In the DAG, feature maps act as the nodes, while the operations (or transformations) between feature maps are regarded as edges for connecting sequential nodes. Assume the supernet $\mathcal{N}$ has $L$ layers, and each layer $\mathcal{N}^l$ is allocated with $O$ operation choices $\mathcal{O} = \{o_i\}$ , which can be basic convolution, pooling, identity or different types of building blocks, such as MobileNetV2 block [28] and ShuffleNetV2 block [23]. Then each architecture (i.e., path) denoted as $\pmb{a}$ can be represented by a tuple of size $L$ , i.e., $\pmb{a} = (o^{1}, o^{2}, \dots, o^{L})$ where $o^{j} \in \mathcal{O}$ , $\forall j = 1, 2, \dots, L$ . As + +a result, the search space $\mathcal{A}$ is discrete, and there will be $O^L$ (e.g., $7^{21}$ ) architectures in total, namely, $|\mathcal{A}| = O^L$ . + +Training supernet matters since it is expected to serve as a fundamental performance estimator. Due to the consideration of memory consumption, single-path NAS methods implement training by sampling a single path $\pmb{a}$ from $\mathcal{A}$ , then the sampled paths are all optimized on the training data $\mathcal{D}_{tr}$ . It can be formulated as minimizing an expected loss over the space $\mathcal{A}$ , i.e., + +$$ +\Omega^ {*} = \underset {\Omega} {\arg \min } \mathbb {E} _ {\boldsymbol {a} \sim p (\mathcal {A})} \llbracket \mathcal {L} \left(\omega_ {\boldsymbol {a}}; \mathcal {D} _ {t r}\right) \rrbracket , \tag {1} +$$ + +where $\omega_{a}$ refers to the parameter of path $a$ , and $p(\mathcal{A})$ is a discrete sampling distribution over $\mathcal{A}$ . + +After the supernet $\mathcal{N}(\Omega^{*})$ is trained well, we can evaluate the quality of each path by calculating its (Top-1) accuracy (ACC) on the validation dataset $\mathcal{D}_{val}$ , and the optimal path $a^{*}$ corresponds to the maximum ACC, i.e., + +$$ +\boldsymbol {a} ^ {*} = \underset {\boldsymbol {a} \in \mathcal {A}} {\arg \max } \operatorname {A C C} \left(\omega_ {\boldsymbol {a}} ^ {*}, \mathcal {D} _ {v a l}\right), \tag {2} +$$ + +where $\omega_{\pmb{a}}^{*} \subset \Omega^{*}$ w.r.t. path $\pmb{a}$ in the trained supernet $\mathcal{N}(\Omega^{*})$ . + +# 3.1. Reshaping sampling distribution $p(\mathcal{A})$ + +Current methods assume that the supernet should provide a reasonable ranking over all architectures in $\mathcal{A}$ . Thus all paths $a$ are treated equally, and optimized simultaneously [16, 11, 4, 3]. Then the sampling distribution $p(\mathcal{A})$ amounts to a uniform distribution $p(\mathcal{A}) = U(\mathcal{A})$ over $\mathcal{A}$ , i.e., + +$$ +p (\boldsymbol {a}) = \frac {1}{| \mathcal {A} |} \mathbb {I} (\boldsymbol {a} \in \mathcal {A}), \tag {3} +$$ + +where $\mathbb{I}(\cdot)$ is an indicator function. However, as previously discussed, it is a demanding requirement for the supernet to rank accurately for all paths at the same time. In the huge search space $\mathcal{A}$ , there might be some paths of inferior quality. Since the weights are highly shared in the same supernet, training on these weak paths does have negative influence on the evaluation of those potentially-good paths. To alleviate this disturbance, an intuitive idea is to block the training of these weak paths. + +For simplifying the analysis, we assume the search space $\mathcal{A}$ can be partitioned into two subsets $\mathcal{A}_{good}$ and $\mathcal{A}_{weak}$ by an Oracle good but unknown supernet $\mathcal{N}_o$ , where + +$$ +\mathcal {A} = \mathcal {A} _ {\text {g o o d}} \bigcup \mathcal {A} _ {\text {w e a k}}, \mathcal {A} _ {\text {g o o d}} \bigcap \mathcal {A} _ {\text {w e a k}} = \emptyset , \tag {4} +$$ + +and $\mathcal{A}_{\mathrm{good}}$ indicates the potentially-good paths while $\mathcal{A}_{\mathrm{weak}}$ is for weak paths, i.e., + +$$ +\operatorname {A C C} (\boldsymbol {a}, \mathcal {N} _ {o}, \mathcal {D} _ {v a l}) \geq \operatorname {A C C} (\boldsymbol {b}, \mathcal {N} _ {o}, \mathcal {D} _ {v a l}) \tag {5} +$$ + +holds for all $\pmb{a} \in \mathcal{A}_{\text{good}}, \pmb{b} \in \mathcal{A}_{\text{weak}}$ on validation dataset $\mathcal{D}_{val}$ . Then to screen the weak paths and ease the burden of the supernet training, we can just sample from the potentially-good paths $\mathcal{A}_{\text{good}}$ instead of all paths $\mathcal{A}$ . + +![](images/6b4bcdbb62daf739c40cba92d1a490fe7a6260604c3cd3087d57dab498876f9a.jpg) +Figure 2: Probability of sampling at least $k$ potentially-good paths out of $m$ paths. X-axis: $r = k / m$ . $q = |\mathcal{A}_{good}| / |\mathcal{A}|$ . + +The sampling distribution $p(\mathcal{A})$ is equivalently reshaped by truncation on $\mathcal{A}_{good}$ , i.e., $\pmb {p}(\mathcal{A}) = U(\mathcal{A}_{good};\mathcal{N}_o,\mathcal{D}_{val})$ and + +$$ +p (\boldsymbol {a}; \mathcal {N} _ {o}, \mathcal {D} _ {v a l}) = \frac {1}{| \mathcal {A} _ {\text {g o o d}} |} \mathbb {I} (\boldsymbol {a} \in \mathcal {A} _ {\text {g o o d}}). \tag {6} +$$ + +In this way, the supernet is expected to thoroughly get trained on the potentially-good paths and thus give decent performance ranking. Besides, since the valid search space has been shrunken from $\mathcal{A}$ into $\mathcal{A}_{good}$ , the training efficiency of supernet is improved accordingly. + +# 3.2. Greedy path filtering + +Nevertheless, in the supernet training the Oracle supernet $\mathcal{N}_o$ is unknown, thus we can not sample paths according to Eq.(6) since it relies on $\mathcal{N}_o$ . In this paper, we propose to use greedy strategy and during training, current supernet $\mathcal{N}_{\dagger}$ is progressively regarded as a proxy of the Oracle $\mathcal{N}_o$ . Thus during the supernet training, we greedily sample paths according to the reshaped sampling distribution given by current $\mathcal{N}_{\dagger}$ , namely, $\pmb {p}(\mathcal{A}) = U(\mathcal{A}_{good};\mathcal{N}_{\dagger},\mathcal{D}_{val})$ . The sampled paths will get optimized, then the supernet is get updated and evolves to a decent performance estimator over $\mathcal{A}_{good}$ . + +However, a natural question arises: even given a supernet $\mathcal{N}_{\dagger}$ , how can we sample from the shaped distribution $\pmb{p}(\mathcal{A}) = U(\mathcal{A}_{good};\mathcal{N}_{\dagger},\mathcal{D}_{val})$ ? In other words, how can we accurately identify whether a path is from $\mathcal{A}_{good}$ or $\mathcal{A}_{weak}$ ? Note that the partition of $\mathcal{A}$ is determined by traversing all paths in $\mathcal{A}$ as Eq.(5), which is not affordable in computation. Since we can not accurately know whether a single path is good or weak, to solve this issue, we propose a multi-path sampling strategy with rejection. + +Suppose we uniformly sample a path from $\mathcal{A}$ , then it amounts to be sampled from $\mathcal{A}_{good}$ with probability $q = |\mathcal{A}_{good}| / |\mathcal{A}|$ , and sampled from $\mathcal{A}_{weak}$ with probability $1 - q$ . In this way, if we sample multiple paths independently at a time, we have the following results based on binomial distribution. + +Theorem 1. If $m$ paths are sampled uniformly i.i.d. from $\mathcal{A}$ , and $\mathcal{A}_{\text{good}}$ and $\mathcal{A}_{\text{weak}}$ are defined as Eq.(4) and Eq.(5) based on supernet $\mathcal{N}_{\dagger}$ , then it holds that at least $k$ ( $k \leq m$ ) + +Algorithm 1 Greedy path filtering w.t/w.o candidate pool. + +Input: supernet $\mathcal{N}$ with parameter $\Omega$ , validation data $\mathcal{D}_{val}$ , number of sampled multiple paths $m$ , number of kept paths $k$ , candidate pool $\mathcal{P}$ with sampling probability $\epsilon$ . + +1: if without candidate pool $\mathcal{P}$ then +2: sample $m$ paths $\{\pmb{a}_i\}_{i=1}^m$ i.i.d. w.r.t. $\pmb{a}_i \sim U(\mathcal{A})$ +3: else +4: sample $m$ paths $\{\pmb{a}_i\}_{i=1}^m$ i.i.d. w.r.t. $\pmb{a}_i \sim (1 - \epsilon) \cdot U(\mathcal{A}) + \epsilon \cdot U(\mathcal{P})$ +5: end if +6: randomly sample a batch $\hat{\mathcal{D}}_{val}$ in $\mathcal{D}_{val}$ +7: evaluate the loss $\ell_{i}$ of each path $\pmb{a}_{i}$ on $\hat{\mathcal{D}}_{val}$ +8: rank the paths by $\ell_i$ , and get Top- $k$ indexes $\{t_i\}_{i=1}^k$ +9: return $k$ paths $\{\pmb{a}_{t_i}\}_{i = 1}^k$ and filter the rest + +paths are from $\mathcal{A}_{\mathrm{good}}$ with probability + +$$ +\sum_ {j = k} ^ {m} \mathbb {C} _ {m} ^ {j} q ^ {j} (1 - q) ^ {m - j}, \tag {7} +$$ + +where $q = |\mathcal{A}_{good}| / |\mathcal{A}|$ + +From Theorem 1, we can see by sampling $m$ paths, the probability that at least $k$ paths are from $\mathcal{A}_{good}$ is very high when the proportion of potentially-good paths $q$ is medially large or $k$ is medially small (see Figure 2). For example, if we conservatively assume $60\%$ paths have the potential to be good (i.e., $q = 0.6$ ), we will have $83.38\%$ confidence to say at least 5 out of 10 paths are sampled from $\mathcal{A}_{good}$ . In this way, based on the definition of Eq.(4) and Eq.(5), we just rank the sampled $m$ paths using validation data $\mathcal{D}_{val}$ , keep the Top- $k$ paths and reject the remaining paths. + +However, ranking $m$ paths involves calculation of ACC over all validation dataset $\mathcal{D}_{val}$ as Eq.(5), which is also computationally intensive during the supernet training. In fact, in our multi-path sampling, what we care about is the obtained ranking; we empirically find that it suffices to rank based on the loss $\ell$ (e.g., cross entropy loss for classification) over a surrogate subset of $\mathcal{D}_{val}$ (e.g., 1k images on ImageNet dataset), denoted as $\hat{\mathcal{D}}_{val}$ . The consistency between this rank and that given by ACC on all $\mathcal{D}_{val}$ is fairly significant. More details and analysis refer to the ablation studies in Section 5.3.1. Then the sampling works as Algorithm 1. + +As a result, path filtering can be efficiently implemented for it can run in a simple feed-forward mode (e.g., eval() mode in Pytorch) on a small portion of validation data. In this sense, we block the weak paths greedily during the supernet training. And the validation data $\hat{\mathcal{D}}_{val}$ acts as a rough filter to prevent the training of those low-quality or even harmful paths, so that the supernet can get sufficient training on those potentially-good ones. + +Algorithm 2 Greedy training of supernet. + +Input: supernet $\mathcal{N}$ with parameter $\Omega$ , training data $\mathcal{D}_{tr}$ , validation data $\mathcal{D}_{val}$ , number of sampled multiple paths $m$ , number of kept paths $k$ , max iteration $T$ , training data loader $D$ + +1: initialize candidate pool $\mathcal{P} = \emptyset$ +2: set a Scheduler of pool sampling probability $\epsilon$ +3: for $\tau = 1,..,T / k$ do +4: get the pool sampling probability $\epsilon$ by Scheduler +5: sample $k$ paths $\{a_{t_i}\}_{i = 1}^k$ out of $m$ paths using Algorithm 1 with pool sampling probability $\epsilon$ +6: update candidate pool $\mathcal{P}$ using $\{\pmb{a}_{t_i}\}_{i = 1}^k$ +7: for $i = 1,..,k$ do +8: get a training batch from $D$ +9: update the weights $\omega_{\pmb{a}_{t_i}}$ of path $\pmb{a}_{t_i}$ using gradient-based optimizer +10: end for +11: end for + +# 4. Proposed Approach: GreedyNAS + +In this section, we formally illustrated our proposed NAS method (a.k.a. GreedyNAS) based on a greedy supernet. Our GreedyNAS is composed with three procedures, i.e., supernet training, searching paths and retraining the searched optimal path. The last retraining corresponds to conventional training a given network. We mainly elaborate the first two as follows. + +# 4.1. Greedy training of supernet + +As previously discussed, we propose to maintain a greedy supernet during its training. By doing this, we gradually approximate the sampling $p(\mathcal{A}) = U(\mathcal{A}_{good};\mathcal{N}_{\dagger},\mathcal{D}_{val})$ by keeping the Top- $k$ paths and filtering the bottom $m - k$ paths by evaluating using $\hat{\mathcal{D}}_{val}$ . Then those weak paths are prevented from getting trained, which allows the supernet to focus more on those potentially-good paths and switch its training space from $\mathcal{A}$ into $\mathcal{A}_{good}$ . + +# 4.1.1 Training with exploration and exploitation + +After the greedy path filtering, we have actually identified some potentially-good paths, which amount to some empirically-good ones given by current supernet. Then to further improve the training efficiency, inspired by the Monte Carlo tree search [14] and deep Q-learning (DQN) [24], we propose to train the supernet with an exploration and exploitation (E-E) strategy by reusing these paths. + +Concretely, we introduce a candidate pool $\mathcal{P}$ to store the potentially-good paths discovered during training. Each path $\pmb{a}$ is represented as a tuple of operation choices. Besides, each $a_{i}$ is also allocated with an evaluation loss $\ell_{i}$ . + +The candidate pool is thus formulated as a fixed-size ordered queue with priority $\ell$ . With more potentially-good paths involved, the candidate pool can be maintained by a min-heap structure in real time. + +As a result, we can conservatively implement local search by sampling from the candidate pool since it consists of a smaller number (but promising) of paths. However, this greedy exploitation brings in the risks of losing path diversity for the training. In this way, we also favor a global search with the hope of probing other promising paths that are yet to be sampled and get trained, which can be easily fulfilled by uniform sampling from $\mathcal{A}$ . For achieve a balanced trade-off of exploration and exploitation, we adopt a typical $\epsilon$ -sampling policy, i.e., implementing uniform sampling both from $\mathcal{A}$ and pool $\mathcal{P}$ (line 4 of Algorithm 1), + +$$ +\boldsymbol {a} \sim (1 - \epsilon) \cdot U (\mathcal {A}) + \epsilon \cdot U (\mathcal {P}), \tag {8} +$$ + +where $\epsilon \in [0,1]$ indicates the probability of sampling from the pool $\mathcal{P}$ . Note that candidate pool runs through the training process of supernet; however, it might be not reliable at first since the priority $\ell$ is calculated based on a much less-trained supernet. In this case, we propose to actively anneal the pool sampling probability $\epsilon$ from 0 to a pre-defined level. In our experiment, we find $\epsilon = 0.8$ will be a good option. + +Training with exploration and exploitation encourages the supernet to refine the already-found good paths as well as probing new territory for more better paths. Besides, it actually also contributes to our greedy path filtering by improving our filtering confidence. Basically, the collected potentially-good paths can be regarded as a subset of $\mathcal{A}_{good}$ , then sampling from $\mathcal{P}$ amounts to increasing the probability $q$ of Theorem 1 into + +$$ +q = \epsilon + (1 - \epsilon) | \mathcal {A} _ {\text {g o o d}} | / | \mathcal {A} |, \tag {9} +$$ + +which refers to the proportion of potentially-good paths. For example, assume we evenly sample from $\mathcal{P}$ or $\mathcal{A} (\epsilon = 0.5)$ , then the probability of sampling at least 5 good paths out of 10 paths will rise from $83.38\%$ to $99.36\%$ according to Theorem 1. Comparing reducing $r = k / m$ to increase the sampling confidence, sampling with $\mathcal{P}$ is almost cost-neglectable since we only need to maintain a min-heap. The supernet thus gradually shifts its training from $\mathcal{A}_{good}$ more to $\mathcal{P}$ , and the training efficiency will be further improved accordingly. + +# 4.1.2 Stopping principle via candidate pool + +Different to conventional networks, a supernet serves as a performance estimator and it is difficult to judge when it is trained well. Current single-path NAS methods control its training by manually specifying an maximum epoch number. In our GreedyNAS, however, we propose an adaptive stopping principle based on the candidate pool. + +![](images/5c77fbb009f8f9fb37c25497266810818e7fcb372616016a2e716ba11bc79d73.jpg) +Figure 3: Histogram of accuracy of searched paths on supernet by evolutionary searching method (with or without candidate pool). + +Candidate pool $\mathcal{P}$ indicates a bunch of best empirical paths, and it is updated dynamically during the supernet training. In consequence, if a supernet is trained well, the pool $\mathcal{P}$ should tend to be steady. This steadiness can be measured by the update frequency $\pi$ of candidate pool $\mathcal{P}$ , i.e., + +$$ +\pi := \frac {\left| \mathcal {P} _ {t} \bigcap \mathcal {P} \right|}{\left| \mathcal {P} \right|} \leq \alpha , \tag {10} +$$ + +where $\mathcal{P}_t$ refers to the old $\mathcal{P}$ in previous $t$ iterations. Thus smaller $\pi$ implies that fewer new paths are involved in the pool $\mathcal{P}$ within $t$ iterations, and $\mathcal{P}$ is more steady. Given a certain tolerance level $\alpha^3$ , when the update frequency $\pi$ is less than $\alpha$ , we believe the supernet has been trained enough, and its training can be stopped accordingly. + +# 4.2. Searching with candidate pool + +After the supernet is trained, we can use supernet to evaluate the quality (ACC) of each path on validation dataset $\mathcal{D}_{val}$ , and search the optimal path $a^*$ as Eq.(2). However, enumerating all paths in $\mathcal{A}$ is prohibitively computationally intensive. One remedy is by dint of evolutionary algorithms [11] or reinforced version (e.g., MoreMNAS [5]), which takes the supernet as an off-the-shelf evaluator. In our paper, we adopt the multi-objective NSGA-II [6] algorithm for searching, where the hardware constraint can be easily integrated in the evolution process. If a path violates the pre-defined hardware constraint (e.g., under 330 FLOPs), we just ditch it for good. + +Besides, evolutionary algorithms need to initialize population with size $N_{pop}$ before implementing iterative mutation and crossover. Current methods usually random sample $N_{pop}$ paths under the constraint as initial population. In contrast, our method makes the initialization with the help of candidate pool $\mathcal{P}$ , and select its Top- $\mathcal{N}_{pop}$ paths instead. As Figure 3 shows, searching with candidate pool can boost the evolutionary performance for supplying a good initial population. The ACC of searched paths using candidate pool is on average higher than that using random initialization. More details of our searching algorithm refer to the supplementary materials. + +Table 1: Comparison of classification performance and supernet training efficiency w.r.t. different searching methods on ImageNet dataset under same search space. #optimization means the accumulated #examples calculated for a whole optimization step, while #evaluation is for that of forward evaluation. corrected #optimization is based on our statistics that cost of a whole optimization step is 3.33 times larger than that of forward evaluation. Details of calculation refer to supplementary materials. + +
Methodsperformancesupernet training efficiency
Top-1 (%)FLOPslatencyParams#optimization#evaluationcorrected #optimization
Proxyless-R (mobile) [1]74.60320M79 ms4.0M---
Random Search74.07321M69 ms3.6M1.23M×120-147.6M
Uniform Sampling [11]74.50326M72 ms3.8M1.23M×120-147.6M
FairNAS-C [4]74.69321M75 ms4.4M1.23M×150-184.5M
Random Search-E73.88320M91 ms3.7M1.23M×73-89.8M
Uniform Sampling [11]-E74.17320M94 ms3.6M1.23M×73-89.8M
GreedyNAS (FLOPs≤322M)74.85320M89 ms3.8M1.23M×462.40M×4689.7M
GreedyNAS (latency≤80ms)74.93324M78 ms4.1M1.23M×462.40M×4689.7M
+ +# 5. Experimental Results + +# 5.1. Configuration and settings + +Dataset. We conduct the architecture search on the challenging ImageNet dataset [27]. As [1], we randomly sample 50,000 images (50 images per class) from training dataset as the validation dataset $(|\mathcal{D}_{val}| = 50\mathrm{K})$ , and the rest of training images are used for training. Moreover, we use the original validation dataset as the test dataset to report the accuracy performance. + +Search space. Following [1, 4], we adopt the same macro-structure of supernet for fair comparison as shown in Table 5 (see supplementary materials). Moreover, we use MobileNetV2 inverted bottleneck [28] as the basic building block. For each building block, the convolutional kernel size is within $\{3,5,7\}$ and expansion ratio is selected in $\{3,6\}$ . An identity block is also attached for flexible depth search. As a result, with 21 building blocks, the search space is of size $(3\times 2 + 1)^{21} = 7^{21}$ . In addition, we also implement searching on a larger space by augmenting each building block with an squeeze-and-excitation (SE) option. The size of the larger search space is thus $13^{21}$ . + +Supernet training. For training the supernet, Algorithm 1 is adopted to sample 10 paths and filter 5 paths. We randomly sample 1000 images (1 image per class) from the validation dataset for evaluating paths in Algorithm 1. For training each path, we use a stochastic gradient descent (SGD) optimizer with momentum 0.9 and Nesterov acceleration. The learning rate is decayed with cosine annealing strategy from initial value 0.12. The batch size is 1024. As for candidate pool, we empirically find 1000 is a good option for pool size $|\mathcal{P}|$ , which approximates the amount of paths involved in one epoch. The candidate sampling probability $\epsilon$ is linearly increased from 0 to 0.8. Instead of specifying an epoch number [11, 4], we use the proposed principle to stop the supernet training with tolerance $\alpha = 0.08$ . + +Evolutionary searching. For searching with NSGA-II [6] algorithm, we set the population size as 50 and the number of generations as 20. The population is initialized + +by the candidate pool $\mathcal{P}$ while other comparison methods use random initialization. During searching, we use constraint of FLOPs or latency. All our experiments use Qualcomm®SnapdragonTM 855 mobile hardware development kit (HDK) to measure the latency. + +Retraining. To train the obtained architecture, we use the same strategy as [1] for search space without SE. As for the augmented search space, we adopt a RMSProp optimizer with 0.9 momentum as Mnasnet [30]. Learning rate is increased from 0 to 0.064 in the first 5 epochs with batch size 512, and then decays 0.03 every 3 epochs. Besides, exponential moving average is also adopted with decay 0.999. + +# 5.2. Performance comparison with state-of-the-art methods + +Searching on same search space. For fair comparison, we first benchmark our GreedyNAS to the same search space as [1] to evaluate our superiority to other Single-path One-shot NAS methods. We also cover a baseline method Random Search, which shares the same supernet training strategy with Uniform Sampling [11]; but during search, instead of using evolutionary algorithms it randomly samples 1000 paths, and retrans the rank-1 path according to Top-1 ACC on the supernet. As Table 1 shows, when searching with similar 320 FLOPs, our GreedyNAS achieves the highest Top-1 ACC. We further align our searched constraint to latency of $80~\mathrm{ms}$ . Table 1 indicates that with similar latency, GreedyNAS is still consistently superior to other comparison methods. For example, GreedyNAS can search an architecture with $74.93\%$ Top-1 ACC, enjoying a $0.43\%$ improvement over uniform sampling, which in a way illustrates the superiority of our greedy supernet to a uniform supernet. + +Besides advantages on the classification performance of searched models, we also evaluate our superiority in terms of supernet training efficiency. Since the main differences of our GreedyNAS and other Single-path One-shot NAS methods lie in the supernet training, we report in Table 1 the supernet training cost. To eliminate the efficiency gap + +Table 2: Comparison of searched architectures w.r.t. different state-of-the-art NAS methods. †: searched on CIFAR-10, ‡: TPU, $\star$ : reported by [11]. + +
MethodsTop-1 (%)Top-5 (%)FLOPs (M)latency (ms)Params (M)Memory costtraining cost (GPU days)search cost (GPU days)
SCARLET-C [4]75.692.6280676.0single path1012
MobileNetV2 1.0 [28]72.091.0300383.4---
MnasNet-A1 [30]75.292.5312553.9single path + RL\( 288^‡ \)-
GreedyNAS-C76.292.5284704.7single path7< 1
Proxyless-R (mobile) [1]74.692.2320794.0two paths\( 15^* \)-
FairNAS-C [4]74.792.1321754.4single path102
Uniform Sampling [11]74.7-328--single path12< 1
SCARLET-B [4]76.393.03291046.5single path1012
GreedyNAS-B76.893.03241105.2single path7< 1
SCARLET-A [4]76.993.43651186.7single path1012
EfficientNet-B0 [31]76.393.2390825.3single path--
DARTS [21]73.391.3574-4.7a whole supernet\( 4^† \)-
GreedyNAS-A77.193.3366776.5single path7< 1
+ +due to different implementation tools (e.g., GPU types, datloader wrappers), we calculated the accumulated number of images involved in a whole gradient-based optimization step, i.e., #optimization in Table 1. Our GreedyNAS has an additional evaluation process during training, thus we also report the accumulated number of images for forward evaluation, i.e., #evaluation. For overall efficiency comparison, we empirically find the cost of a whole optimization step is approximately 3.33 times larger than that of a forward evaluation. The corresponding corrected #optimization is covered accordingly. + +From Table 1, we can see that the training cost of our GreedyNAS is much smaller than that of other comparison methods, which indicates GreedyNAS enjoys significant efficiency in supernet training since it greedily shrinks its training space into those potentially-good paths. Besides, we also implement Random Search and Uniform Sampling using same training cost of GreedyNAS, denoted as Random Search-E and Uniform Sampling-E, respectively. The results show that with decreased iterations of supernet training, the searched architectures are inferior to those of larger iterations. In contrast, our method can achieve higher accuracy by a large margin (almost $1\%$ ). This implies that GreedyNAS is capable of learning a decent supernet with much less iterations. + +Searching on augmented search space. To comprehensively illustrate our superiority to various state-of-the-art NAS methods, we implement searching by augmenting the current space with an SE option. Moreover, we search the architectures under different FLOPs constraint. But we also report the corresponding latency and parameter capacity to comprehensively analyze the statistics of searched models. As Table 2 shows, our GreedyNAS achieves new state-of-the-art performance with respect to different FLOPs and latency levels. For example, with similar FLOPs and latency, GreedyNAS-C has higher Top-1 ACC than the competing SCARLET method by a margin + +of $0.6\%$ . Our searched models are visualized in Figure ?? (see supplementary materials). It shows smaller network (GreedyNAS-C) tends to select more identity blocks to reduce the FLOPs while larger networks will exploit more SE modules (GreedyNAS-A&B) to further improve the accuracy performance. Moreover, GreedyNAS-A adopts more $3 \times 3$ kernels to have smaller latency since $3 \times 3$ kernels are optimized more maturely in mobile inference framework. We also report our real training cost in Table 2 based on Tesla V100 GPU. It shows that GreedyNAS can significantly reduce the training time compared to other NAS methods, which empirically validates the efficiency of GreedyNAS. + +# 5.3. Ablation studies + +# 5.3.1 Effect of evaluation in path filtering + +To filter the weak paths, GreedyNAS evaluates each path by a small portion (1000) of validation images as a surrogate for the whole validation dataset (50K images). We first investigate whether this approximation suffices in our experiment. By random sampling 1000 paths from supernet, we examine the correlation of two path orderings, which are generated by ranking the evaluation results using 1000 and 50K validation images, respectively. In Table 3, we report the widely-used Spearman rho [25] and Kendall tau [13] rank correlation coefficient, which are in the range [0, 1] and larger values mean stronger correlation. We also cover three types of supernets, i.e., randomly initialized, trained by uniform sampling and our greedy sampling. + +From Table 3, we can see that our greedy supernet achieves fairly high rank correlation coefficient (0.997 and 0.961), which indicates that the ranking of greedy supernet using 1000 validation images is significantly consistent with that of all validation dataset. Moreover, supernet trained with uniform sampling has smaller correlation coefficient, even with different evaluation images (see left + +Table 3: Rank correlation coefficient of 1000 paths measured by the loss (ACC) of 1K validation images and ACC of 50K validation images w.r.t. different types of supernets. + +
Spearman rhoKendall tau
randomuniform(ACC)greedyrandomuniform(ACC)greedy
0.1550.968(0.869)0.9970.1130.851(0.699)0.961
+ +![](images/dbb5c1296dc5fb24fd61a8aa0c8422c6054944574b6a35b206666a8d7b46d3b7.jpg) +Figure 4: Rank correlation coefficient of 1000 paths measured by the loss of $N$ validation images and ACC of the whole 50K validation images. Left: Comparison (Kendall tau) of supernet by uniform and greedy sampling w.r.t. different number $N$ of evaluation images. Right: $N = 1\mathrm{K}$ w.r.t. different training iterations of supernet by uniform sampling. + +![](images/eb0bdc1f2c6c4e97b364b70ad9142861fe4da9fb989ab023385b1dddf4ebee1a.jpg) + +Figure 4). This implies in a sense that our greedy supernet is more discriminative since it can use less images to identify whether a path is good or weak. Nevertheless, as left Figure 4 shows, too few evaluation images might have weak correlation while too many evaluation images mean greater evaluation cost. But 1000 evaluation images enjoy a balanced trade-off between the rank correlation and evaluation cost. Note that we also report the results w.r.t. ranking using the ACC of 1000 images, which is smaller than that using loss. This results from that during training the value of loss might be more informative than that of ACC. + +As for the random supernet, the correlation coefficient is fairly small (0.155 and 0.113). This makes sense since the ranking is based on the classification performance; however, a random supernet fails to learn sufficient domain-related information but gives disordered ranking of paths. This smaller correlation coefficient implies that it might be not sensible to implement greedy sampling from a random supernet since the ranking evaluated by 1000 validation images will be rather noisy. In this way, we record the trend of rank correlation coefficients with uniform sampling in right Figure 4. It shows that with more iterations, the correlation coefficients increase and at 10K iteration, they tend to be steady at a high level (e.g., 0.81 for Kendall Tau). As a result, in our GreedyNAS we propose to have a warm-up stage by uniform sampling for 10K iterations, so that we can safely use 1000 validation images to evaluate paths. + +# 5.3.2 Effect of path filtering and candidate pool + +To study the effect of our proposed path filtering and the candidate pool, we implement experiments on the search + +Table 4: Comparison of accuracy performance of searched paths by GreedyNAS w.r.t. different usage of path filtering and candidate pool. + +
path filteringcandidate poolTop-1 (%)
sampling (exploitation)evolutionary initializationtraining stopping
Net1----74.31
Net2✓---74.59
Net3-✓✓✓74.48
Net4✓✓-✓74.71
Net5✓✓✓-74.84
Net6✓✓✓✓74.89
+ +space without SE. In our GreedyNAS, path filtering is to block the training of weak paths. In contrast, the use of candidate pool is mainly three-fold as shown in Table 4. First, we can sample from it as the exploitation process; second, we can initialize the evolutionary searching with the pool for better paths; third, we can use it to adaptively stop the supernet training. Then we control each factor and obtain 6 variants of GreedyNAS as well as 6 corresponding searched architectures $\mathrm{Net1} \sim \mathrm{Net6}$ . For fair comparison, we search all nets under 330M FLOPs. Besides, if the candidate pool is not used for stopping training, we specify a maximum epoch 60 as [3]. + +As Table 4 shows, comparing with the baseline Net1 (Net3), Net2 (Net6) achieves $0.28\%$ $(0.41\%)$ better Top-1 ACC, which indicates that path filtering does contribute to the supernet training, and thus improves the searching results. By involving the candidate pool, Net6 can increase its accuracy from $74.59\%$ (Net2) to $74.89\%$ . In specific, initialization with candidate pool in evolutionary algorithms enables to have a $0.18\%$ gain on Top-1 ACC since it helps to search paths with higher ACC on supernet (also see Figure 3). Note that stopping by candidate pool usually saves training cost; however, full training with candidate pool (Net5) seems to drop the accuracy a bit $(0.05\%$ w.r.t. Net6). It might result from that extreme greedy exploitation on the candidate pool harms the supernet training instead. Then the stopping in a sense brings benefits for a more balanced trade-off between exploration and exploitation. + +# 6. Conclusion + +Training a supernet is a key issue for Single-path One-shot NAS methods. In stead of treating all paths equally, we propose to greedily focus on training those potentially-good ones. This greedy path filtering can be efficiently implemented by our proposed multi-path sampling strategy with rejection. Besides, we also adopt an exploration and exploitation policy and introduce a candidate pool to further boost the supernet training efficiency. Our proposed method GreedyNAS shows significant superiority in terms of both accuracy performance and training efficiency. + +# References + +[1] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv preprint arXiv:1812.00332, 2018. +[2] Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. Detnas: Neural architecture search on object detection. arXiv preprint arXiv:1903.10979, 2019. +[3] Xiangxiang Chu, Bo Zhang, Jixiang Li, Qingyuan Li, and Ruijun Xu. Scarletnas: Bridging the gap between scalability and fairness in neural architecture search. arXiv preprint arXiv:1908.06022, 2019. +[4] Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Jixiang Li. Fairnas: Rethinking evaluation fairness of weight sharing neural architecture search. arXiv preprint arXiv:1907.01845, 2019. +[5] Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Hailong Ma. Multi-objective reinforced evolution in mobile neural architecture search. arXiv preprint arXiv:1901.01074, 2019. +[6] Kalyanmoy Deb, Amrit Pratap, Sameer Agarwal, and TAMT Meyarivan. A fast and elitist multiobjective genetic algorithm: Nsga-ii. IEEE transactions on evolutionary computation, 6(2):182-197, 2002. +[7] Cheng Deng, Erkun Yang, Tongliang Liu, Jie Li, Wei Liu, and Dacheng Tao. Unsupervised semantic-preserving adversarial hashing for image search. IEEE Transactions on Image Processing, 28(8):4032-4044, 2019. +[8] Cheng Deng, Erkun Yang, Tongliang Liu, and Dacheng Tao. Two-stream deep hashing with class-specific centers for supervised image search. IEEE Transactions on Neural Networks and Learning Systems, 2019. +[9] Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1-21, 2019. +[10] Minghao Guo, Zhao Zhong, Wei Wu, Dahua Lin, and Junjie Yan. Irlas: Inverse reinforcement learning for architecture search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9021-9029, 2019. +[11] Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path one-shot neural architecture search with uniform sampling. arXiv preprint arXiv:1904.00420, 2019. +[12] Kai Han, Jianyuan Guo, Chao Zhang, and Mingjian Zhu. Attribute-aware attention model for fine-grained representation learning. In Proceedings of the 26th ACM international conference on Multimedia, pages 2040-2048. ACM, 2018. +[13] Maurice G Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81-93, 1938. +[14] Levente Kocsis and Csaba Szepesvári. Bandit based montecarlo planning. In European conference on machine learning, pages 282-293. Springer, 2006. +[15] Shumin Kong, Tianyu Guo, Shan You, and Chang Xu. Learning student networks with few data. In Proceedings of the AAAI Conference on Artificial Intelligence, 2020. +[16] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv preprint arXiv:1902.07638, 2019. + +[17] Yue Liao, Si Liu, Guanbin Li, Fei Wang, Yanjie Chen, Chen Qian, and Bo Li. A real-time cross-modality correlation filtering method for referring expression comprehension. arXiv preprint arXiv:1909.07072, 2019. +[18] Yue Liao, Si Liu, Fei Wang, Yanjie Chen, and Jiashi Feng. Ppdm: Parallel point detection and matching for real-time human-object interaction detection. arXiv preprint arXiv:1912.12898, 2019. +[19] Peiwen Lin, Peng Sun, Guangliang Cheng, Sirui Xie, Xi Li, and Jianping Shi. Graph-guided architecture search for real-time semantic segmentation. arXiv preprint arXiv:1909.06793, 2019. +[20] 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 Proceedings of the European Conference on Computer Vision (ECCV), pages 19–34, 2018. +[21] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: differentiable architecture search. In ICLR (Poster), 2019. +[22] Zhichao Lu, Ian Whalen, Vishnu Boddeti, Yashesh Dhebar, Kalyanmoy Deb, Erik Goodman, and Wolfgang Banzhaf. Nsga-net: a multi-objective genetic algorithm for neural architecture search. arXiv preprint arXiv:1810.03522, 2018. +[23] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In Proceedings of the European Conference on Computer Vision (ECCV), pages 116-131, 2018. +[24] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. +[25] W Pirie. S pearman rank correlation coefficient. Encyclopedia of statistical sciences, 2004. +[26] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 4780-4789, 2019. +[27] 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. International Journal of Computer Vision (IJCV), 115(3):211-252, 2015. +[28] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. *Mobilenetv2: Inverted residuals and linear bottlenecks*. In *Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition*, pages 4510–4520, 2018. +[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. arXiv preprint arXiv:1904.02877, 2019. +[30] 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. + +[31] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114, 2019. +[32] Yehui Tang, Shan You, Chang Xu, Jin Han, Chen Qian, Boxin Shi, Chao Xu, and Changshui Zhang. Reborn filters: Pruning convolutional neural networks with limited data. In Proceedings of the AAAI Conference on Artificial Intelligence, 2020. +[33] Yehui Tang, Shan You, Chang Xu, Boxin Shi, and Chao Xu. Bringing giant neural networks down to earth with unlabeled data. arXiv preprint arXiv:1907.06065, 2019. +[34] Chaoyue Wang, Chang Xu, Chaohui Wang, and Dacheng Tao. Perceptual adversarial networks for image-to-image transformation. IEEE Transactions on Image Processing, 27(8):4066-4079, 2018. +[35] Chaoyue Wang, Chang Xu, Xin Yao, and Dacheng Tao. Evolutionary generative adversarial networks. IEEE Transactions on Evolutionary Computation, 23(6):921-934, 2019. +[36] Fei Wang, Liren Chen, Cheng Li, Shiyao Huang, Yanjie Chen, Chen Qian, and Chen Change Loy. The devil of face recognition is in the noise. In Proceedings of the European Conference on Computer Vision (ECCV), pages 765-780, 2018. +[37] Fei Wang, Mengqing Jiang, Chen Qian, Shuo Yang, Cheng Li, Honggang Zhang, Xiaogang Wang, and Xiaou Tang. Residual attention network for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3156-3164, 2017. +[38] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10734-10742, 2019. +[39] Jianlong Wu, Keyu Long, Fei Wang, Chen Qian, Cheng Li, Zhouchen Lin, and Hongbin Zha. Deep comprehensive correlation mining for image clustering. In Proceedings of the IEEE International Conference on Computer Vision, pages 8150-8159, 2019. +[40] Erkun Yang, Cheng Deng, Chao Li, Wei Liu, Jie Li, and Dacheng Tao. Shared predictive cross-modal deep quantization. IEEE transactions on neural networks and learning systems, 29(11):5292-5303, 2018. +[41] Shan You, Chang Xu, Chao Xu, and Dacheng Tao. Learning from multiple teacher networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1285–1294, 2017. +[42] Xiawu Zheng, Rongrong Ji, Lang Tang, Baochang Zhang, Jianzhuang Liu, and Qi Tian. Multinomial distribution learning for effective neural architecture search. In Proceedings of the IEEE International Conference on Computer Vision, 2019. +[43] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017. \ No newline at end of file diff --git a/greedynastowardsfastoneshotnaswithgreedysupernet/images.zip b/greedynastowardsfastoneshotnaswithgreedysupernet/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9bf9c8ad6f817ec07dd10924593e71b5f05eac25 --- /dev/null +++ b/greedynastowardsfastoneshotnaswithgreedysupernet/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd87cf1aca8254e037db7cc4ded2040216c562e5414699ca0852c24fab590a00 +size 335178 diff --git a/greedynastowardsfastoneshotnaswithgreedysupernet/layout.json b/greedynastowardsfastoneshotnaswithgreedysupernet/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2e1c177388949b8c2884f807fec82be582dafd19 --- /dev/null +++ b/greedynastowardsfastoneshotnaswithgreedysupernet/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78b5f99425877d13c9ecda8bb63c0b8c551dcdfbb3918b4ec79bded2685db137 +size 523170 diff --git a/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_content_list.json b/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ca531a87147fab36d060088982793d2aa66d9ad0 --- /dev/null +++ b/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52e8e5682f0462e99b061d28b6d6f5e1eedabaac0cc4d2a7a61190dc09b88782 +size 82058 diff --git a/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_model.json b/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c6d07d56e17b23887459a31aab2b077dc787856c --- /dev/null +++ b/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b886325635fc88e91a711026f846cfd10893c686f2a2369a9ef6e215dbfad6a0 +size 103088 diff --git a/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_origin.pdf b/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..23cf016ff73d927fa857835ecf556ecc046c6c46 --- /dev/null +++ b/gridgcnforfastandscalablepointcloudlearning/e1776404-d915-42dc-8ed6-850a4888a34e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2c33394a62556fd50b129c577c779ce4f1322855b38c84203c7d7058053a559 +size 1593294 diff --git a/gridgcnforfastandscalablepointcloudlearning/full.md b/gridgcnforfastandscalablepointcloudlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b36a26745bd49010c63216378f6763d91c1c23e5 --- /dev/null +++ b/gridgcnforfastandscalablepointcloudlearning/full.md @@ -0,0 +1,323 @@ +# Grid-GCN for Fast and Scalable Point Cloud Learning + +Qiangeng Xu $^{1}$ Xudong Sun $^{2}$ Cho-Ying Wu $^{1}$ $^{1}$ University of Southern California + +{qiangenx, choyingw, uneumann}@usc.edu + +Panqu Wang2 Ulrich Neumann $^{1}$ $^{2}$ Tusimple, Inc + +{xudong.sun, panqu.wang}@tusimple.ai + +# Abstract + +Due to the sparsity and irregularity of the point cloud data, methods that directly consume points have become popular. Among all point-based models, graph convolutional networks (GCN) lead to notable performance by fully preserving the data granularity and exploiting point interrelation. However, point-based networks spend a significant amount of time on data structuring (e.g., Farthest Point Sampling (FPS) and neighbor points querying), which limit the speed and scalability. In this paper, we present a method, named Grid-GCN, for fast and scalable point cloud learning. Grid-GCN uses a novel data structuring strategy, Coverage-Aware Grid Query (CAGQ). By leveraging the efficiency of grid space, CAGQ improves spatial coverage while reducing the theoretical time complexity. Compared with popular sampling methods such as Farthest Point Sampling (FPS) and Ball Query, CAGQ achieves up to $50 \times$ speed-up. With a Grid Context Aggregation (GCA) module, Grid-GCN achieves state-of-the-art performance on major point cloud classification and segmentation benchmarks with significantly faster runtime than previous studies. Remarkably, Grid-GCN achieves the inference speed of 50fps on ScanNet using 81920 points as input. The supplementary 1 and the code 2 are released. + +# 1. Introduction + +Point cloud data is popular in applications such as autonomous driving, robotics, and unmanned aerial vehicles. Currently, LiDAR sensors can generate millions of points a second, providing dense real-time representations of the world. Many approaches are used for point cloud data processing. Volumetric models are a family of models that transfer point cloud to spatially quantized voxel grids and use a volumetric convolution to perform computation in the grid space [28, 45, 28]. Using grids as data structuring methods, volumetric approaches associate points to locations in grids, and 3D convolutional kernels gather information from neighboring voxels. Although grid data struc + +![](images/789aa8915711245ec7d7239a4bdcd041ee20c5b5105e8366251818c2facb6b3e.jpg) + +![](images/3824ac2dd56709452b74646c632da5c17ffee2c5d7bec8ee998f85900403873a.jpg) +Figure 1: Overview of the Grid-GCN model. (a) Illustration of the network architecture for point cloud segmentation. Our model consists of several GridConv layers, and each can be used in either a downsampling or an upsampling process. A GridConv layer includes two stages: (b) For the data structuring stage, a Coverage-Aware Grid Query (CAGQ) module achieves efficient data structuring and provides point groups for efficient computation. (c) For the convolution stage, a Grid Context Aggregation (GCA) module conducts graph convolution on the point groups by aggregating local context. + +tures are efficient, high voxel resolution is required to preserve the granularity of the data location. Since computation and memory usage grows cubically with the voxel resolution, it is costly to process large point clouds. In addition, since approximately $90\%$ of the voxels are empty for most point clouds[51], significant computation power may be consumed by processing no information. + +Another family of models for point cloud data processing is Point-based models. In contrast to volumetric models, point-based models enable efficient computation but suffer from inefficient data structuring. For example, PointNet [29] consumes the point cloud directly without quantization and aggregates the information at the last stage of the network, so the accurate data locations are intact but the computation cost grows linearly with the number of points. Later studies [30, 47, 41, 37, 46] apply a down-sampling strategy at each layer to aggregate information + +into point group centers, therefore extracting fewer representative points layer by layer (Figure 1(a)). More recently, graph convolutional networks (GCN) [32, 39, 21, 49] are proposed to build a local graph for each point group in the network layer, which can be seen as an extension of the PointNet++ architecture [30]. However, this architecture incurs high data structuring cost (e.g., FPS and k-NN). Liu et al. [27] show that the data structuring cost in three popular point-based models [23, 47, 41] is up to $88\%$ of the overall computational cost. In this paper, we also examine this issue by showing the trends of data structuring overhead in terms of scalability. + +This paper introduces Grid-GCN, which blends the advantages of volumetric models and point-based models, to achieve efficient data structuring and efficient computation at the same time. As illustrated in Figure 1, our model consists of several GridConv layers to process the point data. Each layer includes two stages: a data structuring stage that samples the representative centers and queries neighboring points; a convolution stage that builds a local graph on each point group and aggregates the information to the center. + +To achieve efficient data structuring, we design a Coverage-Aware Grid Query (CAGQ) module, which 1) accelerates the center sampling and neighbor querying, and 2) provides more complete coverage of the point cloud to the learning process. The data structuring efficiency is achieved through voxelization, and the computational efficiency is obtained through performing computation only on occupied areas. We demonstrate CAGQ's outstanding speed and space coverage in Section 4. + +To exploit the point relationships, we also describe a novel graph convolution module, named Grid Context Aggregation (GCA). The module performs Grid context pooling to extract context features of the grid neighborhood, which benefits the edge relation computation without adding extra overhead. + +We demonstrate the Grid-GCN model on two tasks: point cloud classification and segmentation. Specifically, we perform the classification task on the ModelNet40 and ModelNet10 [43], and achieve the state-of-the-art overall accuracy of $93.1\%$ (no voting), while being on average $5\times$ faster than other models. We also perform the segmentation tasks on ScanNet [8] and S3DIS [1] dataset, and achieve $10\times$ speed-up on average than other models. Notably, our model demonstrates its ability on real-time large-scale point-based learning by processing 81920 points in a scene within $20~\mathrm{ms}$ (see Section 5.3.1). + +# 2. Related Work + +Voxel-based methods for 3D learning To extend the success of convolutional neural network models[12, 13] on 2D images, Voxnet and its variants [28, 43, 38, 4, 6] start to transfer point cloud or depth map to occupancy grid and + +apply volumetric convolution. To address the problem of cubically increased memory usage, OctNet[31] constructs tree structures for occupied voxels to avoid the computation in the empty space. Although efficient in data structuring, the drawback of the volumetric approach is the low computational efficiency and the loss of data granularity. + +Point-based methods for point cloud learning Point-based models are first proposed by [29, 30], which pursues the permutation invariant by using pooling to aggregate the point features. Approaches such as kernel correlation [2, 42] and extended convolutions [36] are proposed to better capture local features. To solve the ordering ambiguity, PointCNN [23] predicts the local point order, and RSNet [14] sequentially consumes points from different directions. The computation cost in point-based methods grows linearly with the number of input points. However, the cost of data structuring has become the performance bottleneck on large-scale point clouds. + +Data structuring strategies for point data Most point-based methods [30, 23, 37, 26] use FPS [10] to sample evenly spread group centers. FPS picks the point that maximizes the distance to the selected points. If the number of centers is not very small, the method takes $O(N^2)$ computation. An approximate algorithm [9] can be $O(N\log N)$ . Random Point Sampling (RPS) has the smallest possible overhead, but it's sensitive to density imbalance. Our CAGQ module has the same complexity as RPS, but it performs the sampling and neighbors querying in one shot, which is even faster than RPS with Ball Query or k-NN (see Table 2). KPCov [36] uses a grid sub-sampling to pick points in occupied voxels. Unlike our CAGQ, the strategy cannot query points in the voxel neighbors. CAGQ also has a Coverage-Aware Sampling (CAS) algorithm that optimizes the center selections, which can achieve better coverage than FPS. + +Alternatively, SO-Net [22] builds a self-organizing map. KDNet [15] uses kd-tree to partition the spaces. PATs[48] uses Gumble Subset Sampling to replace FPS. SPG [19] uses a clustering method to group points as super points. All of these methods are either slow in speed or need structure preprocessing. The lattice projection in SPLATNet [33, 11] preserves more point details than voxel space, but it is slower. Studies such as VoxelNet [51, 20] combines the point-based and volumetric methods by using PointNet [29] inside each voxel and applying voxel convolution. A concurrent high-speed model PVCNN [27] uses similar approaches but does not reduce the number of points in each layer progressively. Grid-GCN, yet, can down-sample a large number of points through CAGQ, and aggregate information by considering node relationships in local graphs. + +GCN for point cloud learning Graph convolutional networks have been widely applied on point cloud learning [41, 18, 17]. A local graph is usually built for each point + +![](images/1938bae994192a011b015bee950e452b78d24f0fe70ee617fa12b766af0633c0.jpg) +(a) + +![](images/50c34971c5cdd90b8bc40b85d5bef5f2eec68f6e7b90d29bb286ab292e45a2bc.jpg) +(b) + +![](images/43c6e593af335144c73acf51d75b3a7f204ce9e817ae43c5888e15367e07351a.jpg) +(c) + +![](images/2fdcef111d04f5ee47eface44a61f50643a93af747be34b302ac575659ec9552.jpg) +(d) +Figure 2: Illustration of Coverage-Aware Grid Query (CAGQ). Assume we want to sample $M = 2$ point groups and query $K = 5$ node points for each group. (a) The input is $N$ points (grey). The voxel id and number of points is listed for each occupied voxel. (b) We build voxel-point index and store up to $n_v = 3$ points (yellow) in each voxel. (c) Comparison of different sampling methods: FPS and RPS prefer the two centers inside the marked voxels. Our RVS could randomly pick any two occupied voxels (e.g. (2,0) and (0,0)) as center voxels. If our CAS is used, voxel (0,2) will replace (0,0). (d) Context points of center voxel (2,1) are the yellow points in its neighborhood (we use $3 \times 3$ as an example). CAGQ queries 5 points (yellow points with blue ring) from these context points, then calculate the locations of the group centers. + +group, and GCN aggregates point data according to relations between points. SpecConv[37] blends the point features by using a graph Fourier transformation. Other studies model the edge feature between centers and nodes. Among them, [47, 26, 17, 41, 49] use the geometric relations, while [6, 39] explore semantic relations between the nodes. Apart from those features, our proposed Grid Context Aggregation module considers coverage and extracts the context features to compute the semantic relation. + +# 3. Methods + +# 3.1. Method Overview + +As shown in Figure 1, Grid-GCN is built on a set of GridConv layers. Each GridConv layer processes the information of $N$ points and maps them to $M$ points. The down-sampling GridConv ( $N > M$ ) is repeated several times until a final feature representation is learned. This representation can be directly used for tasks such as classification or further up-sampled by the upsampling GridConv layers ( $N < M$ ) in segmentation tasks. + +GridConv consists of two modules: + +1. A Coverage-Aware Grid Query (CAGQ) module that samples $M$ point groups from $N$ points. Each group includes $K$ node points and a group center. In the upsampling process, CAGQ takes centers directly through long-range connections, and only queries node points for these centers. +2. A Grid Context Aggregation (GCA) module that builds a local graph for each point group and aggregates the information to the group centers. The $M$ group centers are passed as data points for the next layer. + +We list all the notations in the supplementary for clarity. + +# 3.2. Coverage-Aware Grid Query (CAGQ) + +In this subsection, we discuss the details of the CAGQ module. Given a point cloud, CAGQ aims to effectively structure the point cloud, and ease the process of center sampling and neighbor points querying. To perform CAGQ, we first voxelize the input space by setting up a voxel size $(v_x, v_y, v_z)$ . We then map each point to a voxel index $Vid(u, v, w) = floor\left(\frac{x}{v_x}, \frac{y}{v_y}, \frac{z}{v_z}\right)$ . Here we only store up to $n_v$ points in each voxel. + +Let $O_v$ denote all of the non-empty voxels. We then sample $M$ center voxels $O_c \subseteq O_v$ . For each center voxel $v_i$ , we define its voxel neighbors $\pi(v_i)$ as the voxels within the neighbor-hood of a center voxel. In Figure 2d, $\pi(v(2,1))$ are the 3X3 voxels inside the red box. We call the stored points inside $\pi(v_i)$ as context points. Since we build the point-voxel index in the previous step, CAGQ can quickly retrieve context points for each $v_i$ . + +After that, CAGQ picks $K$ node points from the context points of each $v_{i}$ . We calculate the barycenter of node points in a group, as the location of the group center. This entire process is shown in Figure 2. + +Two problems remain to be solved here. (1) How do we sample center voxels $O_{c} \subseteq O_{v}$ . (2) How do we pick $K$ nodes from context points in $\pi(v_{i})$ . + +To solve the first problem, we propose our center voxels sampling framework, which includes two methods: + +1. Random Voxel Sampling (RVS): Each occupied voxel will have the same probability of being picked. The group centers calculated inside these center voxels are more evenly distributed than centers picked on input points by RPS. We discuss the details in Section 4. +2. Coverage-Aware Sampling (CAS): Each selected cen + +ter voxel can cover up to $\lambda$ occupied voxel neighbors. The goal of CAS is to select a set of center voxels $O_{c}$ such that they can cover the most occupied space. Seeking the optimal solution to this problem requires iterating all combinations of selections. Therefore, we employ a greedy algorithm to approach the optimal solution: We first randomly pick $M$ voxels from $O_{v}$ as incumbents; From all of the un-picked voxels, we iteratively select one to challenge a random incumbent each time. If adding this challenger (and in the meantime removes the incumbent) gives us better coverage, we replace the incumbent with the challenger. For a challenger $v_{C}$ and an incumbent $v_{I}$ , the heuristics are calculated as: + +$$ +\delta (x) = \left\{ \begin{array}{l l} 1, & \text {i f} x = 0. \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {1} +$$ + +$$ +H _ {a d d} = \sum_ {V \in \pi (V _ {C})} \delta \left(C _ {V}\right) - \beta \cdot \frac {C _ {V}}{\lambda} \tag {2} +$$ + +$$ +H _ {r m v} = \sum_ {V \in \pi \left(V _ {I}\right)} \delta \left(C _ {V} - 1\right) \tag {3} +$$ + +where $\lambda$ is the amount of neighbors of a voxel and $C_V$ is the number of incumbents covering voxel $V$ . $H_{add}$ represents the coverage gain if adding $V_C$ (penalize by a term of over-coverage). $H_{rmv}$ represents the coverage loss after removing $V_I$ . If $H_{add} > H_{rmv}$ , we replace the incumbent by the challenger voxel. If we set $\beta$ as 0, each replacement is guaranteed to improve the space coverage. + +Comparisons of those methods are further discussed in section 4. + +Node points querying CAGQ also provides two strategies to pick $K$ node points from context points in $\pi(v_i)$ . + +1. Cube Query: We randomly select $K$ points from context points. Compared to the Ball Query used in PointNet++ [30], Cube Query can cover more space when point density is imbalanced. In the scenario of Figure 2, Ball Query samples $K$ points from all raw points (grey) and may never sample any node point from voxel (2,1) which only has 3 raw points. +2. $K$ -Nearest Neighbors: Unlike traditional k-NN where the search space is all points, k-NN in CAGQ only need to search among the context points, making the query substantially faster (We also provide an optimized method in the supplementary materials). We will compare these methods in the next section. + +# 3.3. Grid Context Aggregation + +For each point group provided by CAGQ, we use a Grid Context Aggregation (GCA) module to aggregate features from the node points to the group center. We first construct a local graph $G(V,E)$ , where $V$ consists of the group center and $K$ node points provided by CAGQ. We then connect each node point to the group center. GCA projects a node + +![](images/1c9c337eeaf57f89e509bcabb56ef35892df1e8eee5aad869b1dd256ef5c5711.jpg) +Figure 3: The red point is the group center. Yellow points are its node points. Black points are node points of the yellow points in the previous layer. The coverage weight is an important feature as it encodes the number of black points that have been aggregated to each yellow point. + +point's features $f_{i}$ to $\widetilde{f}_{i}$ . Based on the edge relation between the node and the center, GCA calculates the contribution of $\widetilde{f}_{i}$ and aggregates all these features as the feature of the center $\widetilde{f}_{c}$ . Formally, the GCA module can be described as + +$$ +\tilde {f} _ {c, i} = e \left(\chi_ {i}, f _ {i}\right) * \mathcal {M} (f _ {i}) \tag {4} +$$ + +$$ +\widetilde {f _ {c}} = \mathcal {A} \left(\left\{\widetilde {f _ {c , i}} \right\}, i \in 1, \dots , K\right) \tag {5} +$$ + +where $\widetilde{f}_{c,i}$ is the contribution from a node, and $\chi_{i}$ is the xyz location of the node. $\mathcal{M}$ is a multi-layer perceptron (MLP), $e$ is the edge attention function, and $\mathcal{A}$ is the aggregation function. The edge attention function $e$ has been explored by many previous studies [47, 6, 39]. In this work, we design a new edge attention function with the following improvements to better fit into our network architecture (Figure 4): + +Coverage Weight Previous studies [47, 26, 17, 41, 49] use $\chi_{c}$ of the center and $\chi_{i}$ of a node to model edge attention as a function of geometric relation (Figure 4b). However, the formulation ignores the underlying contribution of each node point from previous layers. Intuitively, node points with more information from previous layers should be given more attention. We illustrate this scenario in Figure 3. With that in mind, we introduce the concept of coverage weight, which is defined as the number of points that have been aggregated to a node in previous layers. This value can be easily computed in CAGQ, and we argue that coverage weight is an important feature in calculating edge attention (see our ablation studies in Table 6). + +Grid Context Pooling Semantic relation is another important aspect when calculating the edge attention. In previous works [6, 39], semantic relation is encoded by using the group center's features $f_{c}$ and a node point's features $f_{i}$ , which requires the group center to be selected from node points. In CAGQ, since a group center is calculated as the barycenter of the node points, we propose Grid context pooling that extracts context features $f_{ctx}$ by pooling from all context points, which sufficiently covers the entire grid space of the local graph. Grid context pooling brings the following benefits: + +- $f_{cxt}$ models the features of a virtual group center, which + +![](images/e97337f189cbe2432bd9aae9681a9e8534c76bd471cfe76941f6818b28b992fe.jpg) + +![](images/62fee88cca16029d4f2aa1c6e8a1c5901821b21c1e47118246bc2a4bee3bf68c.jpg) +Figure 4: Different strategies to compute the contribution $f_{c,i}$ from a node $n_i$ to its center $c$ . $f_i, \chi_i$ are the feature maps and the location of $n_i$ . $e_i$ is the edge feature between $n_i$ and $c$ calculated from the edge attention function. (a) Pointnet++ [30] ignores $e_i$ . (b) computes $e_i$ based on low dimensional geometric relation between $n_i$ and $c$ . (c) also consider semantic relation between the center and the node point, but $c$ has to be sampled on one of the points from the previous layer. (d). Grid-GCN's geo-relation also includes the coverage weight. It pools a context feature $f_{cxt}$ from all stored neighbors to provide a semantic reference in $e_i$ computing. + +![](images/da2b502eaf90defcd461d9ac412a8713e4dcb8ff327e989185ab2d0bac43f0dc.jpg) + +![](images/93569f0926ee1ad56b23557990b00c1fda1cec078b20bda803233f91c8b57a23.jpg) + +allows us to calculate the semantic relation between the center and its node points. + +- Even when group center is picked on a physical point, $f_{cxt}$ is still a useful feature representation as it covers more points in the neighborhood, instead of only the points in the graph. +- Since we have already associated context points to its center voxel in CAGQ, there is no extra point query overhead. $f_{cxt}$ is shared across all edge computation in a local graph, and the pooling is a light-weighted operation requiring no learnable weights, which introduces little computational overhead. + +GCA module is summarized in Figure 4d, and the edge attention function can be model as + +$$ +e = m l p \left(m l p _ {g e o} \left(\chi_ {c}, \chi_ {i}, w _ {i}\right), m l p _ {s e m} \left(f _ {c x t}, f _ {i}\right)\right) \tag {6} +$$ + +# 4. Analysis of CAGQ + +To analyze the benefit of CAGQ, we test the occupied space coverage and the latency of different sampling/querying methods under different conditions on ModelNet40 [43]. Center sampling methods include Random Point Sampling (RPS), Farthest Point Sampling (FPS), our Random Voxel Sampling (RVS), and our Coverage-Aware Sampling (CAS). Neighbor querying methods include Ball Query, Cube query, and K-Nearest Neighbors. The conditions include different numbers of input points, node numbers in a point group, and numbers of point groups, which are denoted by $N$ , $K$ , and $M$ . We summarize the qualitative and quantitative evaluation result in Table 2 and Figure 5. The reported occupied space coverage is calculated as the ratio between the number of voxels occupied by node points of all groups, and the number of voxels occupied by the original $N$ points. Results under more conditions are presented in the supplementary. + +# 4.1. Space Coverage + +In Figure 5a, the centers sampled by RPS are concentrated in the areas with higher point density, leaving most space uncovered. In Figure 5b, FPS picks the points that are far away from each other, mostly on the edges of the 3D shape, which causes the gap between centers. In Figure 5c, our CAS optimizes the voxel selection and covers $75.2\%$ of occupied space. Table 2 lists the percentage of space coverage by RPS, FPS, RVS, and CAS. CAS leads the space coverage in all cases (30% more than RPS). FPS has no advantage over RVS when $K$ is small. + +The factors that benefit CAGQ in space coverage can be summarized as follows: + +- Instead of sampling centers from $N$ points, RVS samples center voxels from occupied space, therefore it is more resilient to point density imbalance (Figure 5). +- CAS further optimizes the result of RVS by conducting a greedy candidate replacement. Each replacement is guaranteed to result in better coverage. +- CAGQ stores the same number of points in each occupied voxel. The context points are more evenly distributed, so are the $K$ node points picked from the context points. Consequently, the strategy reduces the coverage loss caused by density imbalance in a local area. + +# 4.2. Time complexity + +We summarize the time complexity of different methods in Table 1. The detailed deduction is presented in the supplementary. Table 2 shows the empirical results of latency. We see that our CAS is much faster than FPS and achieves $50 \times$ speed-up. CAS + Cube Query can even outperform RPS + Ball Query when the size of the input point cloud is large. This is due to the higher neighborhood query speed. Because of better time complexity, RVS + k-NN leads the performance under all conditions and achieves $6 \times$ speed-up over FPS + k-NN. + +![](images/75640c798602d64a8ffec2cd4c67a523fcd4523bf9333041359aa54b384624cd.jpg) +(a) Random Point Sampling + +![](images/a43c42076e751405452a5c27e0b454d33a5247019383122c568223391bbfff58.jpg) +(b) Farthest Point Sampling +(c) Coverage-Aware Sampling +Figure 5: The visualization of the sampled group center and the queried node points by RPS, FPS, and CAS. The blue and green balls indicate Ball Query. The red squares indicate Cube Query. The ball and cube have the same volume. (a) RPS covers $45.6\%$ of the occupied space, while FPS covers $65\%$ and CAS covers $75.2\%$ . + +![](images/c3546e19487d5e8925e0f6a8542824cbf13243f1f96598f6fbea59408fa0f39f.jpg) + +
Sample centersRPS O(N)FPS[10] O(NlogN)RVS* O(N)CAS* O(N)
Query nodesBall Query O(MN)Cube Query* O(MK)k-NN[7] O(MN)CAGQ k-NN* O(Mn_v)
+ +Table 1: Time complexity: We sample $M$ centers from $N$ points and query $K$ neighbors per center. We limit the maximum number of points in each voxel to $n_v$ . In practice, $K < N$ , and $n_v$ is usually of the same magnitude to $K$ . Approximate FPS algorithm can be $O(N \log N)$ [9]. * indicates our methods. See the supplementary for deduction details. + +# 5. Experiments + +We evaluate Grid-GCN on multiple datasets: ModelNet10 and ModelNet40[43] for object classification, ScanNet[8] and S3DIS[1] for semantic segmentation. Following the convention of PVCNN [27], we report latency and performance in each level of accuracy. We collect the result of other models either from published papers or the authors. All the latency results are reported under the corresponding batch size and number of input points. All experiments are conducted on a single RTX 2080 GPU. Training details are listed in the supplementary. + +# 5.1.3D Object Classification + +Datasets and settings We conduct the classification tasks on the ModelNet10 and ModelNet40 dataset[43]. ModelNet10 is composed of 10 object classes with 3991 training and 908 testing objects. ModelNet40 includes 40 different classes with 9843 training objects and 2468 testing objects. We prepare our data following the convention of PointNet[29], which uses 1024 points with 3 channels of spatial location as input. Several studies use normal [30, 16], octree [40], or kd-tree for input, and [26, 25] use voting for evaluation. + +Evaluation To compare with different models with different levels of accuracy and speed, we train Grid-GCN with 4 different settings to balance performance and speed (Details are shown in section 5.3). The variants are in the + +number of feature channels and the number of node points in a group in the first layer (see Table 6). The results are shown in Table 3. We report our results without voting. For all of the four settings, our Grid-GCN model not only achieves state-of-the-art performance on both ModelNet10 and ModelNet40 datasets, but has the best speed-accuracy trade-off. Although Grid-GCN uses the CAGQ module for data structuring, it has similar latency as PointNet which has no data structuring step while its accuracy is significantly higher than PointNet. + +# 5.2.3D Scene Segmentation + +Dataset and Settings We evaluate our Grid-GCN on two large-scale point cloud segmentation datasets: ScanNet[8] and Stanford 3D Large-Scale Indoor Spaces (S3DIS) [1]. ScanNet consists of 1513 scanned indoor scene, and each voxel is annotated in 21 categories. We follow the experiment setting in [8] and use 1201 scenes for training, and 312 scenes for testing. Following the routine and evaluation protocol in PointNet++[30], we sample 8192 points during training and 3 spatial channels for each point. S3DIS contains 6 large-scale indoor areas with 271 rooms. Each point is labeled with one of 13 categories. Since area 5 is the only area that doesn't have overlaps with other areas, we follow [35, 23, 27] to train on area 1-4 and 6, and test on area 5. In each divided section, 4096 points are sampled for training, and we adopt the evaluation method from [23]. + +Evaluation We report the overall voxel labeling accuracy (OA) and the runtime latency for ScanNet[8]. We trained two versions of the Grid-GCN model, with a full model using $1 \times K$ node points and a compact model using $0.5 \times K$ node points. Results on are reported in Table 4. + +Since the segmentation tasks generally use more input points than the classification model, our advantage of data structuring becomes outstanding. With the same amount of input points (32768) in a batch, Grid-GCN out-speed PointNet++ $4.5 \times$ while maintaining the same level of accuracy. Compared with more sophisticated models such as PointCNN [23] and A-CNN [16], Grid-GCN is $25 \times$ + +
Center samplingRPSFPSRVS*CVS*RPSFPSRVS*CVS*RPSFPSRVS*CVS*
Neighbor queryingBallBallCubeCubeBallBallCubeCubek-NNk-NNk-NNk-NN
NKMOccupied space coverage(%)Latency (ms) with batch size = 1
10248812.312.913.114.90.290.500.510.740.840.850.510.77
812864.072.582.385.60.320.780.440.681.471.740.520.72
1283260.070.161.074.70.370.530.961.1822.2321.082.242.74
12812893.699.595.899.70.380.691.031.1732.4832.546.857.24
819286419.222.922.125.10.641.160.660.821.581.800.650.76
8102482.996.892.494.40.814.900.540.871.535.360.930.97
12825679.990.780.093.51.191.191.171.4121.521.515.1917.68
128102498.899.999.5100.01.225.251.401.76111.4111.724.1827.65
8192032102470.686.378.391.68.3033.523.346.0219.4943.698.7610.05
321024098.899.2100.0100.08.93260.484.229.3520.38272.489.6517.44
128102472.788.279.192.69.6834.724.328.7171.9993.0250.761.94
1281024099.7100.0100.0100.010.73258.495.8311.72234.19442.8769.0283.32
+ +Table 2: Performance comparisons of data structuring methods, run on ModelNet40[43]. Center sampling methods include RPS, FPS, CAGQ's RVS and CAS. Neighbor querying methods include Ball Query, Cube query and K-Nearest Neighbors. Condition variables include N points, M groups and K neighbors per group. Occupied space coverage = num. of occupied voxels of queried points / num. of occupied voxels of the original N points. + +
ModelNet40ModelNet10latency (ms)
Input (xyz as default)OAmAccOAmAcc
OA ≤ 91.5
PointNet[29]16×102489.286.2--15.0
SCNet[44]16×102490.087.6--
SpiderCNN[47]8 × 102490.5---85.0
O-CNN[40]octree90.6---90.0
SO-net[22]8 × 204890.887.394.193.9-
Grid-GCN116×102491.588.693.492.115.9
OA ≤ 92.0
3DmFVNet[3]16×102491.6-95.2-39.0
PAT[48]8 × 102491.7--88.6
Kd-net[15]kd-tree91.888.594.093.5-
PointNet++[30]16×102491.990.7-26.8
Grid-GCN216×102492.089.795.895.321.8
OA > 92.0
DGCNN[41]16×102492.290.2-89.7
PCNN[2]16×102492.3-94.9-226.0
Point2Seq[24]16×102492.6--
A-CNN[16]16×102492.690.395.595.368.0
KPConv[36]16×650092.7---125.0
Grid-GCN316×102492.790.696.595.726.2
Grid-GCNfull16×102493.191.397.597.442.2
+ +and $12 \times$ faster, respectively, while achieving the state-of-the-art accuracy. Remarkably, Grid-GCN can run as fast as 50 to 133 FPS with state-of-the-art performance, which is desired in real-time applications. A popular model + +Table 3: Results on ModelNet10 and ModelNet40[43]. Our full model achieves the state-of-the-art accuracy. With model reduction, our compact models Grid-GCN $^{1-3}$ also out speed other models. We discuss their details in the ablation studies. + +
Input (xyz as default)OAlatency (ms)
OA < 84.0
PointNet[29]8 × 409673.920.3
OctNet[31]volume76.6-
PointNet++[30]8 × 409683.772.3
Grid-GCN(0.5×K)4 × 819283.916.6
OA ≥ 84.0
SpecGCN[37]-84.8-
PointCNN[23]12×204885.1250.0
Shellnet[50]-85.2-
Grid-GCN(1×K)4 × 819285.420.8
A-CNN[16]1 × 819285.492.0
Grid-GCN(1×K)1 × 819285.47.48
+ +Table 4: Results on ScanNet[8]. Grid-GCN achieves $10 \times$ speed-up on average over other models. Under batch size of 4 and 1, we test our model with $1 \times K$ neighbor nodes. A compact model with $0.5 \times K$ is also reported. + +MinkowskiNet[5] doesn't report the overall accuracy, therefore we don't put it in the table. But its github example shows a latency of 103ms on Scannet. + +We show the quantitative results on S3DIS in Table 5 and visual result in Figure 6. Our compact version of GridGCN is generally $4 \times$ to $14 \times$ faster than other models with data structuring. Notably, even compared with PointNet that has no data structuring at all, we are still $1.6 \times$ faster while achieves $12\%$ performance gain in mIOU. For our full model, we are still the fastest and achieve $2 \times$ speed-up over PVCNN++[27], a state-of-the-art study focusing on speed improvement. + +![](images/1684e62b86dff83d228aaef70cab0998b3532245579109e6594ec55fac5fc9f6.jpg) +(a) Ground Truth +Figure 6: Semantic segmentation results on S3DIS [1] area 5. + +![](images/397a8415c686b52da5288205e462e26484f1776fd57b6c76781812209b557e6b.jpg) +(b) Ours + +
Input (xyzrgb as default)mIOUOAlatency(ms)
mIOU< 54.0
PointNet[29]8 × 409641.09-20.9
DGCNN[41]8 × 409647.9483.64178.1
SegCloud[35]-48.92--
RSNet[14]8 × 409651.93-111.5
PointNet++[30]8 × 409652.28-
DeepGCNs[21]1 × 409652.49-45.63
TanConv[34]8 × 409652.885.5-
Grid-GCN(0.5×Ch)8 × 409653.2185.6112.9
mIOU> 54.0
3D-UNet[6]8 × 963 volume54.9386.12574.7
PointCNN[23]-57.2685.91-
PVCNN++[27]8 × 409657.6386.8741.1
Grid-GCN(1×Ch)8 × 409657.7586.9425.9
+ +# 5.3. Ablation Studies + +In the experiment on ModelNet10 and ModelNet40[43], our full model has 3 GridConv layers. As shown in Table 6, we conduct reductions on the number of the output feature channels from GridConv layers, the number of nodes $K$ in the first GridConv layer, and whether to use Grid context pooling and coverage weight. On one hand, reducing the number of channels from $\mathrm{Grid - GCN}^{full}$ gives $\mathrm{Grid - GCN}^3$ $37\%$ speed-up. On the other hand, reducing $K$ and removing Grid context pooling from Grid-GCN doesn't give $\mathrm{Grid - GCN}^2$ much speed benefit but incurs a loss on accu + +Table 5: Results on S3DIS[1] area 5. Grid-GCN is on average $8 \times$ faster than other models. We halve the output channels of GridConv for Grid- $\mathrm{GCN}_{(0.5 \times Ch)}$ . + +
KChannelsPooling WeightOAlatency
Grid-GCN032(32,64,256)NoNo91.115.4ms
Grid-GCN132(32,64,256)NoYes91.515.9ms
Grid-GCN232(64,128,256)NoYes92.021.8ms
Grid-GCN364(64,128,256)YesYes92.726.2ms
Grid-GCNfull64(128,256,512)YesYes93.142.2ms
+ +Table 6: Ablation studies on ModelNet40[43]. Our models have 3 layers of GridConv. K is the number of node points in the first GridConv. We also change the number of the output feature channels from these 3 layers. Grid context pooling (shorted as pooling here) are also removed for Grid-GCN $^{0-2}$ . Grid-GCN $^{0}$ also removes coverage weight in edge relation. + +racy. This demonstrates the efficiency and effectiveness of CAGQ and Grid context pooling. Coverage weight is useful as well because it introduces little overhead in latency but increases the overall accuracy. + +5.3.1 Scalability Analysis + +
Num. of points (N)20484096163844096081920
Num. of clusters (M)5121024204840968192
PointNet++4.78.619.964.6218.9
Grid-GCN4.34.78.112.319.8
+ +Table 7: Inference time (ms) on ScanNet[8] under different scales. We compare Grid-GCN with PoinNet++[30] on different numbers of input points per scene. The batch size is 1. $M$ is the number of point groups on the first network layer. + +We also test our model's scalability by gradually increasing the number of input points on ScanNet [8]. We compare our model with PointNet++ [30], one of the most efficient point-based method. We report the results in Table 7. Under the setting of 2048 points, the latency of two models are similar. However, when increasing the input point from 4096 to 81920, Grid-GCN achieves up to $11 \times$ speed-up over PointNet++, which shows the dominating capability of our model in processing large-scale point clouds. + +# 6. Conclusion + +In this paper, we propose Grid-GCN for fast and scalable point cloud learning. Grid-GCN achieves efficient data structuring and computation by introducing Coverage-Aware Grid Query (CAGQ). CAGQ drastically reduces data structuring cost through voxelization and provides point groups with complete coverage of the whole point cloud. A graph convolution module Grid Context Aggregation (GCA) is also proposed to incorporate the context features and coverage information in the computation. With both modules, Grid-GCN achieves state-of-the-art accuracy and speed on various benchmarks. Grid-GCN, with its superior performance and unparalleled efficiency, can be used in large-scale real-time point cloud processing applications. + +# References + +[1] I. Armeni, A. Sax, A. R. Zamir, and S. Savarese. Joint 2D-3D-Semantic Data for Indoor Scene Understanding. ArXiv e-prints, Feb. 2017. 2, 6, 8 +[2] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point convolutional neural networks by extension operators. arXiv preprint arXiv:1803.10091, 2018. 2, 7 +[3] Yizhak Ben-Shabat, Michael Lindenbaum, and Anath Fischer. 3dmfv: Three-dimensional point cloud classification in real-time using convolutional neural networks. IEEE Robotics and Automation Letters, 3(4):3145-3152, 2018. 7 +[4] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Generative and discriminative voxel modeling with convolutional neural networks. arXiv preprint arXiv:1608.04236, 2016. 2 +[5] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3075-3084, 2019. 7 +[6] Özgün Çiçek, Ahmed Abdulkadir, Soeren S Lienkamp, Thomas Brox, and Olaf Ronneberger. 3d u-net: learning dense volumetric segmentation from sparse annotation. In International conference on medical image computing and computer-assisted intervention, pages 424-432. Springer, 2016. 2, 3, 4, 8 +[7] Thomas Cover and Peter Hart. Nearest neighbor pattern classification. IEEE transactions on information theory, 13(1):21-27, 1967. 6 +[8] 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. 2, 6, 7, 8 +[9] Y Eldar. Irregular image sampling using the voronoi diagram. PhD thesis, M. Sc. thesis, Technion-IIT, Israel, 1992. 2, 6 +[10] Yuval Eldar, Michael Lindenbaum, Moshe Porat, and Yehoshua Y Zeevi. The farthest point strategy for progressive image sampling. IEEE Transactions on Image Processing, 6(9):1305-1315, 1997. 2, 6 +[11] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3254-3263, 2019. 2 +[12] 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. 2 +[13] 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. 2 +[14] Qiangui Huang, Weiyue Wang, and Ulrich Neumann. Recurrent slice networks for 3d segmentation of point clouds. + +In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2626-2635, 2018. 2, 8 +[15] Roman Klokov and Victor Lempitsky. Escape from cells: Deep kd-networks for the recognition of 3d point cloud models. In Proceedings of the IEEE International Conference on Computer Vision, pages 863-872, 2017. 2, 7 +[16] Artem Komarichev, Zichun Zhong, and Jing Hua. A-cnn: Annually convolutional neural networks on point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7421-7430, 2019. 6, 7 +[17] Shiyi Lan, Ruichi Yu, Gang Yu, and Larry S Davis. Modeling local geometric structure of 3d point clouds using geo-cnn. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 998-1008, 2019. 2, 3, 4 +[18] Loic Landrieu and Mohamed Boussaha. Point cloud oversegmentation with graph-structured deep metric learning. arXiv preprint arXiv:1904.02113, 2019. 2 +[19] Loic Landrieu and Martin Simonovsky. Large-scale point cloud semantic segmentation with superpoint graphs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4558-4567, 2018. 2 +[20] Truc Le and Ye Duan. Pointgrid: A deep network for 3d shape understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9204-9214, 2018. 2 +[21] Guohao Li, Matthias Müller, Guocheng Qian, Itzel C Delgadillo, Abdulellah Abualshour, Ali Thabet, and Bernard Ghanem. Deep GCs: Making GCs go as deep as cnns. arXiv preprint arXiv:1910.06849, 2019. 2, 8 +[22] Jiaxin Li, Ben M Chen, and Gim Hee Lee. So-net: Self-organizing network for point cloud analysis. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9397–9406, 2018. 2, 7 +[23] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Pointcnn: Convolution on x-transformed points. In Advances in Neural Information Processing Systems, pages 820-830, 2018. 2, 6, 7, 8 +[24] Xinhai Liu, Zhizhong Han, Yu-Shen Liu, and Matthias Zwicker. Point2sequence: Learning the shape representation of 3d point clouds with an attention-based sequence to sequence network. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8778-8785, 2019. 7 +[25] Yongcheng Liu, Bin Fan, Gaofeng Meng, Jiwen Lu, Shiming Xiang, and Chunhong Pan. Densepoint: Learning densely contextual representation for efficient point cloud processing. In Proceedings of the IEEE International Conference on Computer Vision, pages 5239-5248, 2019. 6 +[26] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8895-8904, 2019. 2, 3, 4, 6 +[27] Zhijian Liu, Haotian Tang, Yujun Lin, and Song Han. Pointvoxel cnn for efficient 3d deep learning. arXiv preprint arXiv:1907.03739, 2019. 2, 6, 7, 8 +[28] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. + +In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 922-928. IEEE, 2015. 1, 2 +[29] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 652-660, 2017. 1, 2, 6, 7, 8 +[30] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in neural information processing systems, pages 5099-5108, 2017. 1, 2, 4, 5, 6, 7, 8 +[31] Gernot Riegler, Ali Osman Ulusoy, and Andreas Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3577-3586, 2017. 2, 7 +[32] Martin Simonovsky and Nikos Komodakis. Dynamic edge-conditioned filters in convolutional neural networks on graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3693-3702, 2017. 2 +[33] Hang Su, Varun Jampani, Deqing Sun, Subhransu Maji, Evangelos Kalogerakis, Ming-Hsuan Yang, and Jan Kautz. Splatnet: Sparse lattice networks for point cloud processing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2530-2539, 2018. 2 +[34] Maxim Tatarchenko, Jaesik Park, Vladlen Koltun, and Qian-Yi Zhou. Tangent convolutions for dense prediction in 3d. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3887-3896, 2018. 8 +[35] Lyne Tchapmi, Christopher Choy, Iro Armeni, JunYoung Gwak, and Silvio Savarese. Segcloud: Semantic segmentation of 3d point clouds. In 2017 International Conference on 3D Vision (3DV), pages 537-547. IEEE, 2017. 6, 8 +[36] Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatrix Marcotegui, François Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. arXiv preprint arXiv:1904.08889, 2019. 2, 7 +[37] Chu Wang, Babak Samari, and Kaleem Siddiqi. Local spectral graph convolution for point set feature learning. In Proceedings of the European Conference on Computer Vision (ECCV), pages 52-66, 2018. 1, 2, 3, 7 +[38] Dominic Zeng Wang and Ingmar Posner. Voting for voting in online point cloud object detection. In Robotics: Science and Systems, volume 1, pages 10-15607, 2015. 2 +[39] Lei Wang, Yuchun Huang, Yaolin Hou, Shenman Zhang, and Jie Shan. Graph attention convolution for point cloud semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10296-10305, 2019. 2, 3, 4 +[40] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis. ACM Transactions on Graphics (SIGGRAPH), 36(4), 2017. 6, 7 +[41] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. ACM Transactions on Graphics (TOG), 38(5):146, 2019. 1, 2, 3, 4, 7, 8 + +[42] Wenxuan Wu, Zhongang Qi, and Li Fuxin. Pointconv: Deep convolutional networks on 3d point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9621-9630, 2019. 2 +[43] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1912-1920, 2015. 2, 5, 6, 7, 8 +[44] Saining Xie, Sainan Liu, Zeyu Chen, and Zhuowen Tu. Attentional shapecontextnet for point cloud recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4606-4615, 2018. 7 +[45] Christopher B Choy Danfei Xu, JunYoung Gwak, and Kevin Chen Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. arXiv preprint arXiv:1604.00449, 2016. 1 +[46] Qiangeng Xu, Weiyue Wang, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. In H. Wallach, H. Larochelle, A. Beygelzimer, F. dAlché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 492-502. Curran Associates, Inc., 2019. 1 +[47] Yifan Xu, Tianqi Fan, Mingye Xu, Long Zeng, and Yu Qiao. Spidercnn: Deep learning on point sets with parameterized convolutional filters. In Proceedings of the European Conference on Computer Vision (ECCV), pages 87-102, 2018. 1, 2, 3, 4, 7 +[48] Jiancheng Yang, Qiang Zhang, Bingbing Ni, Linguo Li, Jinxian Liu, Mengdie Zhou, and Qi Tian. Modeling point clouds with self-attention and gumbel subset sampling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3323–3332, 2019. 2, 7 +[49] Kuangen Zhang, Ming Hao, Jing Wang, Clarence W de Silva, and Chenglong Fu. Linked dynamic graph cnn: Learning on point cloud via linking hierarchical features. arXiv preprint arXiv:1904.10014, 2019. 2, 3, 4 +[50] Zhiyuan Zhang, Binh-Son Hua, and Sai-Kit Yeung. Shellnet: Efficient point cloud convolutional neural networks using concentric shells statistics. arXiv preprint arXiv:1908.06295, 2019. 7 +[51] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4490-4499, 2018. 1, 2 \ No newline at end of file diff --git a/gridgcnforfastandscalablepointcloudlearning/images.zip b/gridgcnforfastandscalablepointcloudlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4afd717b5f26458714b04eddd19c3b64f05f2228 --- /dev/null +++ b/gridgcnforfastandscalablepointcloudlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baef3916b19873f2972c9fba7ee0ae3e1869d5aa85e9f50e4438413644f6eeac +size 784061 diff --git a/gridgcnforfastandscalablepointcloudlearning/layout.json b/gridgcnforfastandscalablepointcloudlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e593df89c9dddf8a321fe76bb7893f05d788a5df --- /dev/null +++ b/gridgcnforfastandscalablepointcloudlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3f1f6c6a79e3843dbac4b9f04918c54a52c8bd08156d33b103125f73a919309 +size 462656 diff --git a/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_content_list.json b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dbb15703632f32d642c17476b64c57fcde079a56 --- /dev/null +++ b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af582e1fe09dec02bed6dc4119b860605434289f90bebcb9bb7831a176146681 +size 78081 diff --git a/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_model.json b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1e482f97496e9f5fa0cf097b68cb41224b0c7560 --- /dev/null +++ b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a18f0d9a5b27663067df2c7dfca97fec93695ae007d7ff78de371e1949886df +size 98509 diff --git a/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_origin.pdf b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2c786b5e96b6df306fba0adc9a6c0aeec138ac66 --- /dev/null +++ b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/1603bd58-51a4-4bb6-8ab6-f50b8a97e573_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7fc830a32befd36886aff877f26348b305d666240063036f30f65394b29999d +size 671862 diff --git a/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/full.md b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4130539288b1f94549ece1acd17ab87ebf167818 --- /dev/null +++ b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/full.md @@ -0,0 +1,362 @@ +# GroupFace: Learning Latent Groups and Constructing Group-based Representations for Face Recognition + +Yonghyun Kim1 Wonpyo Park2 Myung-Cheol Roh1 Jongju Shin1 + +$^{1}$ Kakao Enterprise, $^{2}$ Kakao Corp. + +# Abstract + +In the field of face recognition, a model learns to distinguish millions of face images with fewer dimensional embedding features, and such vast information may not be properly encoded in the conventional model with a single branch. We propose a novel face-recognition-specialized architecture called GroupFace that utilizes multiple group-aware representations, simultaneously, to improve the quality of the embedding feature. The proposed method provides self-distributed labels that balance the number of samples belonging to each group without additional human annotations, and learns the group-aware representations that can narrow down the search space of the target identity. We prove the effectiveness of the proposed method by showing extensive ablation studies and visualizations. All the components of the proposed method can be trained in an end-to-end manner with a marginal increase of computational complexity. Finally, the proposed method achieves the state-of-the-art results with significant improvements in 1:1 face verification and 1:N face identification tasks on the following public datasets: LFW, YTF, CALFW, CPLFW, CFP, AgeDB-30, MegaFace, IJB-B and IJB-C. + +# 1. Introduction + +Face recognition is a primary technique in computer vision to model and understand the real world. Many methods and enormous datasets [3, 10, 16, 25, 32, 41] have been introduced, and recently, methods that use deep learning [7, 9, 14, 19, 34, 35, 44] have greatly improved the face recognition accuracy, but it still falls short of expectations. + +To reduce the shortfall, most of the recent research in face recognition focused on improving the loss function. The streams from CenterLoss [35], CosFace [34], ArcFace [7] and RegularFace [44] all tried to minimize the intra-class variation and maximize the inter-class variation. These methods are effective and have gradually improved the accuracy by elaborating the objective of learning. + +Despite the development of loss functions, general + +![](images/b840812891f916f8a223bfb40151f7dddf69be2f0c1e10947de3a202bdde48be.jpg) +Figure 1. Conceptual scheme of the proposed method. The proposed method enhances the quality of the embedding feature by supporting the instance-based representation of Robert Downey Jr. using the group-aware representation considering Brown-beard Man Group. + +purpose networks, not a network devised for a face recognition, can have difficulty in enabling effective training of the network to recognize a huge number of person identities. Unlike common problems such as classification, in the evaluation stage, a face-recognition model encounters new identities, which are not included in the training set. Thus, the model has to embed nearly 100k identities [10] in the training set and also consider a huge number of unknown identities. However, most of the existing methods just attach several fully-connected layers after widely-used backbone networks such as VGG [25] and ResNet [12] without any designs for the characteristics of face recognition. + +Grouping is a key idea to efficiently-and-flexibly embed a significant number of people and briefly describe an unknown person. Each person has own characteristics in his or her face. At the same time, they have common ones shared in a group of people. In the real world, group-based description (man with deep, black eyes and red beard) that involves common characteristics in the group, can be useful to narrow down the set of candidates, even though it cannot identify the exact person. Unfortunately, explicit grouping requires manual categorizing on huge data and may be limited by the finite range of descriptions by human knowledge. However, by adopting the concept of grouping, the recogni + +tion network can reduce the search space and flexibly embed a significant number of identities into an embedding feature. + +We propose a novel face-recognition architecture called GroupFace that learns multiple latent groups and constructs group-aware representations to effectively adopt the concept of grouping (Figure 1). We define Latent Groups, which are internally determined as latent variables by comprehensively considering facial factors (e.g., hair, pose, beard) and non-facial factors (e.g., noise, background, illumination). To learn the latent groups, we introduce a self-distributed grouping method that determines group labels by considering the overall distribution of latent groups. The proposed GroupFace structurally ensembles multiple group-aware representations into the original instance-based representation for face recognition. + +We summarize the contributions as follows: + +- GroupFace is a novel face-recognition-specialized architecture that integrates the group-aware representations into the embedding feature and provides well-distributed group-labels to improve the quality of feature representation. GroupFace also suggests a new similarity metric to consider the group information additionally. +- We prove the effectiveness of GroupFace in extensive experiments and ablation studies on the behaviors of GroupFace. +- GroupFace can be applied many existing face-recognition methods to obtain a significant improvement with a marginal increase in the resources. Especially, a hard-ensemble version of GroupFace can achieve high recognition-accuracy by adaptively using only a few additional convolutions. + +# 2. Related Works + +Face Recognition has been studied for decades. Many researchers proposed machine learning techniques with feature engineering [1, 5, 6, 28, 17, 23, 31, 38, 42]. Recently, deep learning methods have overcome the limitations of traditional face-recognition approaches with public face-recognition datasets [3, 10, 16, 25, 32, 41]. Deep-Face [30] used 3D face frontalization to achieve a breakthrough in face recognition methods that use deep learning. FaceNet [26] proposed triplet loss to maximize the distance between an anchor and its negative sample, and to minimize the distance between the same anchor and its positive sample. CenterLoss [35] proposed center loss to minimize the distance between samples and their class centers. MarginalLoss [8] adopted the concept of margin to minimize intra-class variations and to keep inter-class distances with margin. RangeLoss [43] used long-tailed data during the train- + +ing stage. RingLoss [47] constrained a feature's magnitude to be a certain number. NormFace [33] proposed to normalize features and fully connected layer weights; verification accuracy increased after normalization. SphereFace [19] proposed angular softmax (A-Softmax) loss with multiplicative angular margin. Based on A-Softmax, CosFace [34] proposed an additive cosine margin and ArcFace [7] applies an additive angular margin. The authors of RegularFace [44] and UniformFace [9] argued that approaches that use angular margin [7, 19, 34] concentrated on intra-class compactness only, then suggested new losses to increase the inter-class variation. These previous methods, in general, focused on how to improve loss functions to improve face recognition accuracy with conventional feature representation. A slight change such as adding a few layers or increasing the number of channels, commonly did not bring a noticeable improvement. However, GroupFace improves the quality of feature representation and achieves a significant improvement by adding a few more layers in parallel. + +Grouping or clustering methods such as k-means internally categorize samples by considering relative metrics such as a cosine similarity or Euclidean distance without explicit class labels. In general, these clustering methods attempt to construct well-distinguished categories by preventing the assignment of most images to one or a few clusters. Recently, several methods that used deep learning [4, 24, 40] have been introduced. These methods are effective, however, they use full batches as in previous methods, not minibatches as in deep learning. Thus, these methods are not readily incorporate deeply and end-to-end in an application framework. To efficiently learn the latent groups, our method introduces a self-distributed grouping method that considers an expectation-normalized probability in a deep manner. + +# 3. Proposed Method + +Our GroupFace learns the latent groups by using a self-distributed grouping method, constructs multiple group-aware representations and ensembles them into the standard instance-based representation to enrich the feature representation for face recognition. + +# 3.1. GroupFace + +We discuss that how the scheme of latent groups are effectively integrated into the embedding feature in Group-Face. + +Instance-based Representation. We will call a feature vector in conventional face recognition scheme [7, 34, 35, 44] as an Instance-based Representation in this paper (Figure 2). The instance-based representation is commonly trained as an embedding feature by using softmax-based loss (e.g., CosFace [34] and ArcFace [7]) and is used to + +![](images/06664f4262c86d39c498bfd612b9313a8a7c3bcc0d0ee3c5f5a38e1377b1de9d.jpg) +Figure 2. GroupFace generates a shared feature of 4096 dimension and deploys a fully-connected layer for an instance-based representation $\mathbf{v}_{\mathbf{x}}$ and $K$ fully-connected layers for group-aware representations $\mathbf{v}_{\mathbf{x}}^{G}$ for a given sample $\mathbf{x}$ . A group-decision-network, which is supervised by the self-distributed labeling, outputs a set of group probabilities $\{p(G_0|\mathbf{x}), p(G_1|\mathbf{x}), \dots, p(G_{K-1}|\mathbf{x})\}$ from the instance-based representation. The final representation of 512 dimension is an aggregation of the instance-based representation and the weighted sum $\mathbf{v}_{\mathbf{x}}^{G}$ of the group-aware representations with the group probabilities. W is a weight of the function $g$ . + +predict an identity as: + +$$ +p \left(\mathbf {y} _ {i} \mid \mathbf {x}\right) = \operatorname {s o f t m a x} _ {k} (g \left(\mathbf {v} _ {\mathbf {x}}\right)), \tag {1} +$$ + +where $\mathbf{y}_i$ is an identity label, $\mathbf{v}_{\mathbf{x}}$ is the instance-based representation of a given sample $\mathbf{x}$ , and $g$ is a function which projects an embedding feature of 512 dimension into $M$ dimensional space. $M$ is the number of person identities. + +Group-aware Representation. GroupFace uses a novel Group-aware Representation as well as the instance-based representation to enrich the embedding features. Each group-aware representation vector is extracted by deploying fully-connected layers for each corresponding group (Figure 2). The embedding feature $(\bar{\mathbf{v}}_{\mathbf{x}},$ Final Representation in Figure 2) of GroupFace is obtained by aggregating the instance-based representation $\mathbf{V}_{\mathbf{x}}$ and the weightedsummed group-aware representation $\mathbf{V}_{\mathbf{x}}^{G}$ . GroupFace predicts an identity by using the enriched final representation $\bar{\mathbf{v}}_{\mathbf{x}_i}$ as: + +$$ +\begin{array}{l} p \left(\mathbf {y} _ {i} \mid \mathbf {x}\right) = \operatorname {s o f t m a x} _ {k} (g (\bar {\mathbf {v}} _ {\mathbf {x}})), \tag {2} \\ = \operatorname {s o f t m a x} _ {k} \left(g \left(\mathbf {v} _ {\mathbf {x}} + \mathbf {v} _ {\mathbf {x}} ^ {G}\right)\right), \\ \end{array} +$$ + +where $\mathbf{v}_{\mathbf{x}}^{G}$ is an ensemble of multiple group-aware representations with group probabilities. + +Structure. GroupFace calculates and uses instance-based representation and group-aware representations, concurrently. The instance-based representation is obtained by the same procedures that are used in conventional face recognition methods [7, 34, 35, 44], and the $K$ group-aware representations are obtained similarly by deploying a fully-connected layer. Then, the group probabilities are calculated from the instance-based representation vector by deploying a Group Decision Network (GDN) that consists of three fully-connected layers and a softmax layer. Using the + +group probabilities, the multiple group-aware representations are sub-ensemble in a soft manner (S-GroupFace) or a hard manner (H-GroupFace). + +1. S-GroupFace aggregates multiple group-aware representations with corresponding probabilities of groups as weights, and is defined as: + +$$ +\mathbf {v} _ {\mathbf {x}} ^ {G} = \sum_ {k \in K} p \left(G _ {k} \mid \mathbf {x}\right) \mathbf {v} _ {\mathbf {x}} ^ {G _ {k}}. \tag {3} +$$ + +2. H-GroupFace selects one of the group-aware representations for which the corresponding group probability has the highest value, and is defined as: + +$$ +\mathbf {v} _ {\mathbf {x}} ^ {G} = \underset {p (G _ {k} | \mathbf {x})} {\arg \max } \mathbf {v} _ {\mathbf {x}} ^ {G _ {k}}. \tag {4} +$$ + +S-GroupFace provides a significant improvement of recognition accuracy with a marginal requirement for additional resources, and H-GroupFace is more suitable for practical applications than S-GroupFace, at the cost of a few additional convolutions. The final representation $\bar{\mathbf{v}}_{\mathbf{x}}$ is enriched by aggregating both the instance-based representation and the sub-ensemble group-aware representation. + +Group-aware Similarity. We introduce a group-aware similarity that is a new similarity considering both the standard embedding feature and the intermediate feature of GDN in the inference stage. The group-aware similarity is penalized by a distance between intermediate features of two given instances because the intermediate feature is not trained on the cosine space and just describes the group identity of a given sample, not the explicit identity of a given sample. The group-aware similarity $S^{*}$ between the $i^{th}$ image $I_{i}$ and the $j^{th}$ image $I_{j}$ is defined as: + +$$ +S ^ {*} \left(\mathbf {x} _ {i}, \mathbf {x} _ {j}\right) = S \left(\bar {\mathbf {v}} _ {\mathbf {x} _ {i}}, \bar {\mathbf {v}} _ {\mathbf {x} _ {j}}\right) - \beta D \left(\hat {\mathbf {v}} _ {\mathbf {x} _ {i}}, \hat {\mathbf {v}} _ {\mathbf {x} _ {j}}\right) ^ {\gamma}, \tag {5} +$$ + +where $S$ is a cosine similarity metric, $D$ is a distance metric, $\hat{\mathbf{v}}_{\mathbf{x}}$ denotes the intermediate feature of GDN and, $\beta$ and $\gamma$ are a constant parameter. The parameters are determined empirically to be $\beta = 0.1$ and $\gamma = 1 / 3$ . + +# 3.2. Self-distributed Grouping + +In this work, we define a group as a set of samples that share any common visual-or-non-visual features that are used for face recognition. Such a group is determined by a deployed GDN. Our GDN is gradually trained in a self-grouping manner that provides a group label by considering the distribution of latent groups without any explicit ground-truth information. + +Naïve Labeling. A naïve way to determine a group label is to take an index that has the maximum activation of softmax outputs. We build a GDN $f$ to determine a belonging group $G^{*}$ for a given sample $\mathbf{x}$ by deploying MLP and attaching a softmax function: + +$$ +p \left(G _ {k} | \mathbf {x}\right) = \operatorname {s o f t m a x} _ {k} (f (\mathbf {x})), \tag {6} +$$ + +$$ +G ^ {*} (\mathbf {x}) = \underset {k} {\arg \max } p \left(G _ {k} | \mathbf {x}\right), \tag {7} +$$ + +where $G_{k}$ is the $k^{th}$ group. The lack of the consideration for the group distribution can cause the naïve solution to assign most of samples to one or few groups. + +Self-distributed Labeling. We introduce an efficient labeling method that utilizes a modified probability regulated by a prior probability to generate uniformly-distributed group labels in a deep manner. We define an expectation-normalized probability $\tilde{p}$ to balance the number of samples among $K$ groups: + +$$ +\tilde {p} \left(G _ {k} | \mathbf {x}\right) = \frac {1}{K} \left\{p \left(G _ {k} | \mathbf {x}\right) - E _ {\mathbf {x} \sim \text {d a t a}} \left[ p \left(G _ {k} | \mathbf {x}\right) \right] \right\} + \frac {1}{K}, \tag {8} +$$ + +where the first $1 / K$ bounds the normalized probability between 0 and 1. Then, the expectation of the expectation-normalized probability is computed as: + +$$ +\begin{array}{l} E _ {\mathbf {x} \sim \mathrm {d a t a}} \left[ \tilde {p} \left(G _ {k} | \mathbf {x}\right) \right], \\ = \frac {1}{K} \left\{E _ {\mathbf {x} \sim \text {d a t a}} [ p (G _ {k} | \mathbf {x}) ] - E _ {\mathbf {x} \sim \text {d a t a}} [ p (G _ {k} | \mathbf {x}) ] \right\} + \frac {1}{K}, \\ = \frac {1}{K}. \tag {9} \\ \end{array} +$$ + +The optimal self-distributed label is obtained as: + +$$ +G ^ {*} (\mathbf {x}) = \underset {k} {\arg \max } \tilde {p} \left(G _ {k} | \mathbf {x}\right). \tag {10} +$$ + +The trained GDN estimates a set of group probabilities that represent the degree to which the sample belongs to the latent groups. As the number of samples approaches infinity, the proposed method stably outputs the uniform-distributed labels (Figure 3). + +![](images/6e6a1a33cf583d6574451f55afa636f0d2faa0c9855df8d50bb7b773688de0b1.jpg) +Figure 3. Conceptual scheme of self-distributed labeling. When group probabilities of 5 samples on 4 groups is obtained by GDN, the expectation-normalized probability is computed by subtracting the corresponding expectation of the group probabilities from the group probabilities. The group identifier of the maximum probability is selected as the label of a given sample and the consideration of the expectation makes the distribution of labels more uniform. + +# 3.3. Learning + +The network of GroupFace is trained by both the standard classification loss, which is a softmax-based loss to distinguish identities, and the self-grouping loss, which is a softmax loss to train latent groups, simultaneously. + +Loss Function. A softmax-based loss $L_{1}$ (ArcFace [7] is mainly used in this work) is used to train a feature representation for identities and is defined as: + +$$ +L _ {1} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \log \frac {e ^ {s \left(\cos \left(\theta_ {\mathbf {y} _ {i}} + m\right)\right)}}{e ^ {s \left(\cos \left(\theta_ {\mathbf {y} _ {i}} + m\right)\right)} + \sum_ {j = 1 , j \neq \mathbf {y} _ {i}} ^ {n} e ^ {s \left(\cos \left(\theta_ {j}\right)\right)}}, \tag {11} +$$ + +where $N$ is a number of samples in a mini-batch, $\theta$ is the angle between a feature and the corresponding weight, $s$ is a scale factor, $m$ is a marginal factor. To construct the optimal group-space, a self-grouping loss, which reduces the difference between the prediction and the self-generated label, is defined as: + +$$ +L _ {2} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \operatorname {C r o s s E n t r o p y} \left(\operatorname {s o f t m a x} \left(f \left(\mathbf {x} _ {i}\right)\right), G ^ {*} \left(\mathbf {x} _ {i}\right)\right). \tag {12} +$$ + +Training. The whole network is trained by using the aggregation of two losses: + +$$ +L = L _ {1} + \lambda L _ {2}, \tag {13} +$$ + +where the parameter $\lambda$ balances the weights of different losses and is empirically set to 0.1. Thus, GDN can learn + +the group, which is an attribute beneficial to face recognition. + +# 4. Experiments + +We describe implementation details and extensively perform experiments and ablation studies to show the effectiveness of GroupFace. + +# 4.1. Implementation Details + +Datasets. For the train, we use MSC Celeb-1M [10] which has contain about 10M images for 100K identities. Due to the noisy labels of MSC Celeb-1M original dataset, we use the refined version [7] which contains 3.8M images for 85k identities. For the test, we conduct our experiments with nine commonly used datasets as follows: + +- LFW [13] which contains 13,233 images from 5,749 identities and provides 6000 pairs from them. CALFW [46] and CPLFW [45] are the reorganized datasets from LFW to include higher pose and age variations. +- YTF [37] which consists of 3,425 videos of 1,595 identities. +- MegaFace [16] which composed of more than 1 million images from 690K identities for challenge 1(MF1). +- CFP-FP [27] which contains 500 subjects, each with 10 frontal and 4 profile images. +- AgeDB-30 [22] which contains 12,240 images of 440 identities. +- IJB-B [36] which contains 67,000 face images, 7,000 face videos and 10,000 non-face images. +- IJB-C [21] which contains 138,000 face images, 11,000 face videos and 10,000 non-face images. + +Metrics. We compare the verification-accuracy for identity-pairs on LFW [13], YTF [37], CALFW [46], CPLFW [45], CFP-FP [27], AgeDB-30 [22] and MegaFace [16] verification task. MegaFace [16] identification task is evaluated by rank-1 identification accuracy with 1 million distractors. We compare a True Accept Rate at a certain False Accept Rate (TAR@FAR) from 1e-4 to 1e-6 on IJB-B [36] and IJB-C [21]. + +Experimental Setting. We construct a normalized face image [7, 19, 34] $(112 \times 112)$ by warping a face-region using five facial points from two eyes, nose and two corners of mouth. We employ the ResNet-100 [12] as the backbone network similar to the recent works [7, 14]. We vectorize the activation and reduced # activations to 4096 (shared feature in Figure 2) by a block of BN-FC. Our GroupFace + +
TAR
FAR=1e-6FAR=1e-5
Baseline [7]0.38280.8933
-4 Groups0.43950.8962
-16 Groups0.44350.8993
-32 Groups0.46780.9115
+ +(a) Number of Groups + +
TAR@FAR=1e-6
Baseline [7]0.3828
- without Loss0.4468
- Naive Labeling0.4535
- Self-distributed Labeling0.4678
+ +(b) Learning for GDN + +
TAR@FAR=1e-6GFLOPS
Baseline [7]0.382824.2G
- H-GroupFace0.443924.4G
- S-GroupFace0.467824.5G
+ +(c) Hard vs. Soft Ensemble + +
TAR
FAR=1e-6FAR=1e-5
Baseline [7]0.38280.8933
- Concat0.47450.8999
- Aggregation0.46780.9115
+ +(d) Aggregation vs. Concatenataion + +
TAR@FAR=1e-6
Baseline [7]0.3828
- GroupFace0.4678
- GroupFace†0.5212
+ +(e) Group-aware Similarity + +
TAR
FAR=1e-6FAR=1e-5FAR=1e-4
ResNet-100 [7]0.38280.89330.9425
ResNet-34 [7]0.39620.86690.9308
+ GroupFace0.43610.88200.9316
+ GroupFace†0.48230.88420.9354
+ +(f) Lightweight Model + +Table 1. Ablation studies for the proposed GroupFace on IJB-B dataset. The baseline is a recognition-model trained by ArcFace [7] and $\dagger$ denotes an evaluation procedure using the group-aware similarity (Eq. 5). + +is attached after $res5c$ in ResNet-100, where its activation dimension is $512 \times 7 \times 7$ . The MLP in GDN consists of two blocks of BN-FC and a FC for group classification. We follow [7, 34] to set the hyper-parameters of the loss function. + +Learning. We train the model with 8 synchronized GPUs and a mini-batch involving 128 images per GPU. To stable the group-probability, the network of GroupFace is trained from the pre-trained network that is trained by only the softmax-based loss [7, 34]. We used a learning rate of 0.005 for the first 50k, 0.0005 for the 20k, and 0.00005 for 10k with a weight decay of 0.0005 and a momentum of 0.9 with stochastic gradient descent (SGD). We compute the expectation of group probabilities by computing the group probabilities of $128 \times 8$ samples on all GPUs and averaging the expectations over the recent $B$ -batches to accurately estimate the expectation of the group probabilities on the population; $B$ between 32 and 128 empirically shows a similar performance. + +# 4.2. Ablation Studies + +To show the effectiveness of the proposed method, we perform the ablation studies on the it's behaviors. For all experiments, we also use the same network structure with the hyper-parameters mentioned earlier. To clearly show the effect of each ablation study, TAR@FAR of the models are compared on IJB-B dataset [36]; all models in the ablation studies shows around $99.85\%$ on LFW. + +Number of Groups. We compare the recognition performance according to the number of groups (Table 1a). As the number of groups grows, the performance increases steadily. In particular, a few initial groups can benefit greatly, and by deploying more groups, significant improvement of performance can be obtained. + +Learning for GDN. We compare the learning method for GDN (Table 1b): (1) without loss (adopt the group-aware network structure only), (2) naive labeling, and (3) self-distributed labeling. Just by applying our novel network structure, the recognition performance is greatly improved. In particular, the performance is further increased by adjusting the proposed self-distributed labeling method. + +Hard vs. Soft. S-GroupFace shows a high improvement in the performance because it uses all group-aware representations comprehensively with a reasonable additional resource (Table 1c). Since H-GroupFace uses only one strongest group-aware representation even if many groups are deployed, the burden of increasing the number of groups is fixed to a slight amount of additional resource. Thus, H-GroupFace can be applied immediately for high performance gains in practical applications. + +Aggregation vs. Concatenation. We compare how to combine the instance-based representation and the group-aware representations into an one embedding feature (Table 1d): (1) aggregation and (2) concatenation. Concatenation-based GroupFace shows a better TAR@FAR=1e-6 by 0.67 percentage points than Aggregation-based GroupFace, however, Aggregation-based GroupFace shows a much bet- + +
Method#ImageLFWYTF
DeepID [29]0.2M99.4793.2
DeepFace [30]4.4M97.3591.4
VGGFace [25]2.6M98.9597.3
FaceNet [26]200M99.6495.1
CenterLoss [35]0.7M99.2894.9
RangeLoss [43]5M99.5293.7
MarginalLoss [8]3.8M99.4895.9
SphereFace [19]0.5M99.4295.0
RegularFace [44]3.1M99.6196.7
CosFace [34]5M99.8197.6
UniformFace [9]6.1M99.8097.7
AFRN [14]3.1M99.8597.1
ArcFace [7]5.8M99.8397.7
GroupFace5.8M99.8597.8
+ +Table 2. Verification accuracy (%) on LFW and YTF. + +ter TAR@FAR=1e-5 by 1.16 percentage points. We chose the Aggregation-based GroupFace that is generally better performing with fewer feature dimensions. + +Group-aware Similarity. The recognition-performance is once again improved significantly by evaluating the group-aware similarity (Table 1e). Even though the group-aware similarity increases the feature dimension for calculating a similarity, it is easy to extract the required feature because the feature is the intermediate output of the recognition network. Especially, this experiment shows that the group-based information is distinct from the conventional identity-based information enough to improve performance in practical usages. We show more detailed experiments in Table 5. + +Lightweight Model. GroupFace is also effective for a lightweight model such as ResNet-34 [12] that requires only 8.9 GFLOPS less than ResNet-100 [12], which requires 24.2 GFLOPS. ResNet-34 based GroupFace shows a similar performance of ResNet-100 based ArcFace [7] and greatly outperforms ResNet-100 in a most difficult criterion (FAR=1e-6). In addition, the group-aware similarity significantly exceed the basic performance of ResNet-34 model (Table 1f). + +# 4.3. Evaluations + +LFW, YTF, CALFW, CPLFW, CFP-FP and AgeDB-30. We compare the verification-accuracy on LFW [13] and YTF [37] with the unrestricted with labelled outside data protocol (Table 2). On YTF, we evaluate all the images without the exclusion of noisy images from image sequences. Even though both datasets are highly-saturated, Our GroupFace surpasses the other recent methods. We also report the verification accuracy on the variant of LFW (CALFW [46], CPLFW [45]), CFP-FP [27] and AgeDB-30 + +
MethodCALFWCPLFWCFP-FPAgeDB-30
CenterLoss [35]85.4877.48--
SphereFace [19]90.3081.40--
VGGFace2 [3]90.5784.00--
CosFace [34]95.7692.2898.1298.11
ArcFace [7]95.4592.0898.2798.28
GroupFace96.2093.1798.6398.28
+ +Table 3. Verification accuracy (%) on CALFW, CPLFW, CFP-FP and AgeDB-30. + +
MethodProtocolIdentVerif
RegularFace [44]Large75.6191.13
UniformFace [9]Large79.9895.36
CosFace [34]Large80.5696.56
ArcFace [7]Large81.0396.98
GroupFaceLarge81.3197.35
SphereFace [19]Large / R97.9197.91
AdaptiveFace [18]Large / R95.0295.61
CosFace [34]Large / R97.9197.91
ArcFace [7]Large / R98.3598.49
GroupFaceLarge / R98.7498.79
+ +Table 4. Identification and verification evaluation on MegaFace. Ident means rank-1 identification accuracy (\%) and Verif means TAR@FAR=1e-6 (\%). R denotes the evaluation procedure on the refined version [7] of MegaFace dataset. + +[22] (Table 3). Our GroupFace shows the better accuracy on all of the above datasets. + +MegaFace. We evaluate our GroupFace under the large-training-set protocol, in which models are trained by using the training set containing more than 0.5M images, on MegaFace [16] (Table 4). GroupFace is the top-ranked face recognition model among the recent published state-of-the-art methods. On the refined MegaFace [7], our GroupFace also outperforms the other models. + +IJB-B and IJB-C. We compare the proposed method with other methods on IJB-B [36] and IJB-C [21] datasets (Table 5). Recent angular-margin-softmax based methods [7, 34] show great performance in the datasets. We reports the improvement of GroupFace in the verification accuracy based on both CosFace [34] and ArcFace [7] without any test-time augmentations such as horizontal flipping. Our GroupFace shows significant improvements on all FAR criteria by 8.5 percentage points on FAR=1e-6, 1.8 percentage points on FAR=1e-5 and 0.2 percentage points on FAR=1e-4 than the ArcFace [7] on IJB-B and by 4.3 percentage points on FAR=1e-6, 1.2 percentage points on FAR=1e-5 and 0.4 percentage points on FAR=1e-4 than the ArcFace [7] on IJB-C. The recognition-performance is once again improved significantly by applying the group-aware similarity (Eq. 5), especially on the most difficult criterion (TAR@FAR=1e + +![](images/9994a4f2066eee37e6269fe7b42eaa727c9d4adf3223a96520de51ad3b282b1a.jpg) +(a) Baseline + +![](images/1378c49bcfb2cbd8c58d6626dedbf54c1b7c6db52365383dc7cfadbec869f0f5.jpg) +(b) $\mathbf{v}_{\mathbf{x}}$ + +![](images/33d5a796c17025b3c49436e4f6d73ff677be4b925581ac729be2bc43a3ffc4e3.jpg) +(c) $\bar{\mathbf{v}}_{\mathbf{x}}$ + +![](images/2d59f9ee04073350f33ad34a6f50a025417bbfa404abda2ac81e4cb9f169c8da.jpg) +Figure 4. A quantitative comparison of the baseline network (ArcFace [7]), $\mathbf{v}_{\mathbf{x}}$ that denotes an instance-based representation of GroupFace and $\bar{\mathbf{v}}_{\mathbf{x}}$ that denotes a final representation of GroupFace for the first eight identities in the refined MSCeleb-1M [10] dataset on a 2D space. The eight colored-circles represent the eight identities. +Figure 5. Average probabilities of 32 groups on the refined MSC Celeb-1M [10] dataset. 12 groups can mainly activate and the rest groups, $R$ , softly affect. + +6) on IJB-B by 5.3 percentage points. + +# 4.4. Visualization + +To show the effectiveness of the proposed method, we visualize the feature representation, the average activation of groups and the visual interpretation of groups. + +2D Projection of Representation. Figure 4 shows a quantitative comparison among (a) the final representation of the baseline network (ArcFace [7]), (b) the instance-based representation of GroupFace and the final representation of GroupFace on a 2D space. We select the first eight identities in the refined MSC Celeb-1M dataset [10] and map the extracted features onto the angular space by using t-SNE [20]. The quantitative comparison shows that the proposed model generates more distinctive feature representations rather than the baseline model and also the proposed model enhances the instance-based representation. + +Activation Distribution of Groups. The proposed Self-Grouping tries to make the samples evenly spread throughout the all groups, and at the same time, the softmax-based loss also simultaneously propagates gradients into GDN so that the identification works best. Thus, the probability distribution is not exactly uniform (Figure 5). Some probabilities of the groups are low and the others are high (e.g., 1, 2, 5, 6, 14, 15, 17, 18, 28, 29, 30, $31^{th}$ groups). The overall + +
MethodTAR on IJB-BTAR on IJB-C
FAR=1e-6FAR=1e-5FAR=1e-4FAR=1e-6FAR=1e-5FAR=1e-4
VGGFace2 [3]-0.6710.800-0.7470.840
CenterFace [35]----0.7810.853
ComparatorNet [39]--0.849--0.885
PRN [15]-0.7210.845---
AFRN [14]-0.7710.885-0.8840.931
CosFace [34]0.36490.88110.94800.88010.93700.9615
ArcFace [7]0.38280.89330.94250.86250.93150.9565
GroupFace-0.41660.89830.94530.88580.93990.9606
GroupFace0.46780.91150.94450.90530.94370.9602
GroupFace†0.52120.91240.94930.89280.94530.9626
+ +Table 5. Verification evaluation according to different FARs on IJB-B and IJB-C. GroupFace is trained by ArcFace [7]. $\bar{\mathbf{\Gamma}}$ denotes that a model is trained by CosFace [34] and $\dagger$ denotes that a model is evaluated by using the group-aware similarity. + +distribution is not uniform as we expected, but we see that there is no dominant one among the high activated group. + +Interpretation of Groups. The trained latent groups are not always visually distinguishable because they are categorized by a non-linear function of GDN using a latent feature, not a facial attribute (e.g., hair, glasses, and mustache). However, there are two cases of groups (Group 5 and 20 in Figure 6) that we can clearly see their visual properties; 95 of randomly-selected 100 images are men in Group 5 and 94 of randomly-selected 100 images are bald men in Group 20. Others are not described as an one visual property, however, they seems to be described as multiple visual properties such as smile women, right-profile people and scared people in Group 1. + +# 5. Conclusion + +We introduce a new face-recognition-specialized architecture that consists of a group-aware network structure and a self-distributed grouping method to effectively manipulate multiple latent group-aware representations. By extensively conducting the ablation studies and experiments, we prove the effectiveness of our GroupFace. The visualization also shows that GroupFace fundamentally enhances the feature representations rather than the existing methods and the latent groups have some meaningful visual descriptions. Our GroupFace provides a significant improvement in the recognition-performance ans is practically applicable to existing recognition systems. The rationale behind the effectiveness of GroupFace is summarized in two main ways: (1) It is well known that additional supervisions from different objectives can bring an improvement of the given task by sharing a network for feature extraction, e.g., a segmentation head can improve accuracy in object detection [2, 11]. Likewise, learning the groups can be a helpful cue to train a more generalized feature extractor for face recognition. (2) GroupFace proposes a novel structure that fuses instance + +![](images/78751458998e2ca52f6f1a4c9736ca3858c623ee81e41443562f0d218851a25c.jpg) +Group 1 + +![](images/5268388d6d63dafe5207fa97af01ce30024158599d8613f2f8288fdd245bdb58.jpg) +Group 5 + +![](images/95a350b8d04b9735bd49c2432659bc4e249844e0c225027ba9d73f853186ec39.jpg) +Group 20 +Figure 6. Example images belonging to each groups. As enormous identities $(80\mathrm{k}\sim)$ of large scale dataset cannot be mapped to a few groups (32), each group contains identities of multiple characteristics. Some groups have one common visual description (Group 5: Some Men, Group 20: Bald Men) with some variations while others have multi-mode visual descriptions. + +![](images/9de71b775d977bdf269c5b2f7875b1a08facdbc79fb76faf6015e0d625119f06.jpg) +Group 29 + +based representation and group-based representation, which is empirically proved its effectiveness. + +# Acknowledgement + +We thank AI team of Kakao Enterprise, especially Won-jae Kim and Yoonho Lee for their helpful feedback. + +# References + +[1] Timo Ahonen, Abdenour Hadid, and Matti Pietikainen. Face recognition with local binary patterns. In Tomás Pajdla and Jiri Matas, editors, European Conference on Computer Vision Workshops, 2004. 2 +[2] Sean Bell, C Lawrence Zitnick, Kavita Bala, and Ross Girshick. Inside-outside net: Detecting objects in context with skip pooling and recurrent neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 8 +[3] Q. Cao, L. Shen, W. Xie, O. M. Parkhi, and A. Zisserman. Vggface2: A dataset for recognising faces across pose and age. In International Conference on Automatic Face and Gesture Recognition, 2018. 1, 2, 7, 8 +[4] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In European Conference on Computer Vision, 2018. 2 +[5] D. Chen, X. Cao, F. Wen, and J. Sun. Blessing of dimensionality: High-dimensional feature and its efficient compression for face verification. In IEEE Conference on Computer Vision and Pattern Recognition, 2013. 2 +[6] D. Chen, X. Cao, D. Wipf, F. Wen, and J. Sun. An efficient joint formulation for bayesian face verification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. 2 +[7] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[8] Jiankang Deng, Yuxiang Zhou, and Stefanos Zafeiriou. Marginal loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2017. 2, 6 +[9] Yueqi Duan, Jiwen Lu, and Jie Zhou. Uniformface: Learning deep equidistributed representation for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 6, 7 +[10] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, European Conference on Computer Vision, 2016. 1, 2, 5, 7 +[11] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In IEEE International Conference on Computer Vision, 2017. 8 +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 1, 5, 6 +[13] Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical report, University of Massachusetts, Amherst, 2007. 5, 6 +[14] Bong-Nam Kang, Yonghyun Kim, Bongjin Jun, and Daijin Kim. Attentional feature-pair relation networks for accurate + +face recognition. In IEEE International Conference on Computer Vision, 2019. 1, 5, 6, 8 +[15] Bong-Nam Kang, Yonghyun Kim, and Daijin Kim. Pairwise relational networks for face recognition. In European Conference on Computer Vision, 2018. 8 +[16] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan Brossard. The megaface benchmark: 1 million faces for recognition at scale. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 1, 2, 5, 7 +[17] N. Kumar, A. C. Berg, P. N. Belhumeur, and S. K. Nayar. Attribute and simile classifiers for face verification. In IEEE International Conference on Computer Vision, 2009. 2 +[18] Hao Liu, Xiangyu Zhu, Zhen Lei, and Stan Z Li. Adaptiveface: Adaptive margin and sampling for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 7 +[19] W. Liu, Y. Wen, Z. Yu, M. Li, B. Raj, and L. Song. Spherical face: Deep hypersphere embedding for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 1, 2, 5, 6, 7 +[20] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008. 7 +[21] B. Maze, J. Adams, J. A. Duncan, N. Kalka, T. Miller, C. Otto, A. K. Jain, W. T. Niggel, J. Anderson, J. Cheney, and P. Grother. Iarpa janus benchmark - c: Face dataset and protocol. In International Conference on Biometrics, 2018. 5, 7 +[22] Stylianos Moschoglou, Athanasios Papaioannou, Christos Sagonas, Jiankang Deng, Irene Kotsia, and Stefanos Zafeiriou. Agedb: the first manually collected, in-the-wild age database. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2017. 5, 7 +[23] Hieu V. Nguyen and Li Bai. Cosine similarity metric learning for face verification. In Ron Kimmel, Reinhard Klette, and Akihiro Sugimoto, editors, Asian Conference on Computer Vision, 2011. 2 +[24] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision, 2016. 2 +[25] Omkar M. Parkhi, Andrea Vedaldi, and Andrew Zisserman. Deep face recognition. In British Machine Vision Conference, 2015. 1, 2, 6 +[26] F. Schroff, D. Kalenichenko, and J. Philbin. Facenet: A unified embedding for face recognition and clustering. In IEEE Conference on Computer Vision and Pattern Recognition, 2015. 2, 6 +[27] S. Sengupta, J. Chen, C. Castillo, V. M. Patel, R. Chellappa, and D. W. Jacobs. Frontal to profile face verification in the wild. In IEEE Winter Conference on Applications of Computer Vision, 2016. 5, 6 +[28] Karen Simonyan, Omkar Parkhi, Andrea Vedaldi, and Andrew Zisserman. Fisher vector faces in the wild. In *British Machine Vision Conference*, 2013. 2 +[29] Yi Sun, Yuheng Chen, Xiaogang Wang, and Xiaou Tang. Deep learning face representation by joint identification + +verification. In International Conference on Neural Information Processing Systems, 2014. 6 +[30] Y. Taigman, M. Yang, M. Ranzato, and L. Wolf. Deepface: Closing the gap to human-level performance in face verification. In IEEE Conference on Computer Vision and Pattern Recognition, 2014. 2, 6 +[31] M. A. Turk and A. P. Pentland. Face recognition using eigenfaces. In IEEE Conference on Computer Vision and Pattern Recognition, 1991. 2 +[32] Fei Wang, Liren Chen, Cheng Li, Shiyao Huang, Yanjie Chen, Chen Qian, and Chen Change Loy. The devil of face recognition is in the noise. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss, editors, European Conference on Computer Vision, 2018. 1, 2 +[33] Feng Wang, Xiang Xiang, Jian Cheng, and Alan Loddon Yuille. Normface: L2 hypersphere embedding for face verification. In ACM International Conference on Multimedia, 2017. 2 +[34] H. Wang, Y. Wang, Z. Zhou, X. Ji, D. Gong, J. Zhou, Z. Li, and W. Liu. Cosface: Large margin cosine loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1, 2, 3, 5, 6, 7, 8 +[35] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, European Conference on Computer Vision, 2016. 1, 2, 3, 6, 7, 8 +[36] C. Whitelam, E. Taborsky, A. Blanton, B. Maze, J. Adams, T. Miller, N. Kalka, A. K. Jain, J. A. Duncan, K. Allen, J. Cheney, and P. Grother. Iarpa janus benchmark-b face dataset. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2017. 5, 6, 7 +[37] L. Wolf, T. Hassner, and I. Maoz. Face recognition in unconstrained videos with matched background similarity. In IEEE Conference on Computer Vision and Pattern Recognition, 2011. 5, 6 +[38] L. Wolf, T. Hassner, and Y. Taigman. Descriptor based methods in the wild. In European Conference on Computer Vision Workshops, 2008. 2 +[39] Weidi Xie, Li Shen, and Andrew Zisserman. Pairwise relational networks for face recognition. In European Conference on Computer Vision, 2018. 8 +[40] Jianwei Yang, Devi Parikh, and Dhruv Batra. Joint unsupervised learning of deep representations and image clusters. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 2 +[41] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z. Li. Learning face representation from scratch. CoRR, 2014. 1, 2 +[42] Qi Yin, Xiaou Tang, and Jian Sun. An associate-predict model for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2011. 2 +[43] X. Zhang, Z. Fang, Y. Wen, Z. Li, and Y. Qiao. Range loss for deep face recognition with long-tailed training data. In IEEE International Conference on Computer Vision, 2017. 2, 6 +[44] Kai Zhao, Jingyi Xu, and Ming-Ming Cheng. Regularface: Deep face recognition via exclusive regularization. In IEEE + +Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 3, 6, 7 +[45] T. Zheng and W. Deng. Cross-posed ffw: A database for studying cross-posed face recognition in unconstrained environments. Technical Report 18-01, Beijing University of Posts and Telecommunications, February 2018. 5, 6 +[46] Tianyue Zheng, Weihong Deng, and Jiani Hu. Cross-age LFW: A database for studying cross-age face recognition in unconstrained environments. CoRR, abs/1708.08197, 2017. 5, 6 +[47] Y. Zheng, D. K. Pal, and M. Savvides. Ring loss: Convex feature normalization for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 \ No newline at end of file diff --git a/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/images.zip b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..92632a37b53f005f664ee8fc0dffe7466a8f3ebf --- /dev/null +++ b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:099ebddf0d0d29c41d31f3c69e82e2bc9b26a7dbe6b0e05f591295aa32444992 +size 613994 diff --git a/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/layout.json b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..73ac6186a07563a818a6c1d6003e8fb8fbd99568 --- /dev/null +++ b/groupfacelearninglatentgroupsandconstructinggroupbasedrepresentationsforfacerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a4f26c98ae982b838b4ec7d1f5f012556376d15de22744832ce013e1f2b768b +size 389372 diff --git a/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_content_list.json b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2b434b67e50356e89a6917c68de499070f58659a --- /dev/null +++ b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:089e3179d1ac616325c2cf5fe3ad025812b2352e77e45cf14840c2758e32b245 +size 84110 diff --git a/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_model.json b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e37c556fa4283801cc7c7b4720a97bb5a17cbf7d --- /dev/null +++ b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b8a4cead5b48815462c9f15bc8b8eb6f8651de4ec9478693c104a4bf4dcae85 +size 106003 diff --git a/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_origin.pdf b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..640b1b9358f6aeba5ffa49f5f0270b4c770b7918 --- /dev/null +++ b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/66d48728-89b8-48e4-9484-66fc6442b719_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cbfabb856468724a3b2220ae6785c116bcf6b0c7be640df10548f981886a737 +size 2298206 diff --git a/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/full.md b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b671b900fed885c595dd661257915af50a5e3147 --- /dev/null +++ b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/full.md @@ -0,0 +1,381 @@ +# Group Sparsity: The Hinge Between Filter Pruning and Decomposition for Network Compression + +Yawei Li $^{1}$ , Shuhang Gu $^{1}$ , Christoph Mayer $^{1}$ , Luc Van Gool $^{1,2}$ , Radu Timofte $^{1}$ $^{1}$ Computer Vision Lab, ETH Zürich, Switzerland, $^{2}$ KU Leuven, Belgium + +{yawei.li, shuhang.qu, chmayer, vangool, radu.timofte}@vision.ee.ethz.ch + +# Abstract + +In this paper, we analyze two popular network compression techniques, i.e. filter pruning and low-rank decomposition, in a unified sense. By simply changing the way the sparsity regularization is enforced, filter pruning and low-rank decomposition can be derived accordingly. This provides another flexible choice for network compression because the techniques complement each other. For example, in popular network architectures with shortcut connections (e.g. ResNet), filter pruning cannot deal with the last convolutional layer in a ResBlock while the low-rank decomposition methods can. In addition, we propose to compress the whole network jointly instead of in a layer-wise manner. Our approach proves its potential as it compares favorably to the state-of-the-art on several benchmarks. Code is available at https://github.com/ofsoundof/group_sparsity. + +# 1. Introduction + +During the past years, convolutional neural networks (CNNs) have reached state-of-the-art performance in a variety of computer vision tasks [22, 12, 17, 32, 6, 39, 53, 28]. However, millions of parameters and heavy computational burdens are indispensable for new advances in this field. This is not practical for the deployment of neural network solutions on edge devices and mobile devices. + +To overcome this problem, neural network compression emerges as a promising solution, aiming at a lightweight and efficient version of the original model. Among the various network compression methods, filter pruning and filter decomposition (also termed low-rank approximation) have been developing steadily. Filter pruning nullifies the weak filter connections that have the least influence on the accuracy of the network while low-rank decomposition converts a heavy convolution to a lightweight one and a linear combination [15, 13, 26]. Despite their success, both the pruning-based and decomposition-based approaches have their re + +spective limitations. Filter pruning can only take effect in pruning output channels of a tensor and equivalently cancelling out inactive filters. This is not feasible under some circumstances. The skip connection in a block is such a case where the output feature map of the block is added to the input. Thus, pruning the output could amount to cancelling a possible important input feature map. This is the reason why many pruning methods fail to deal with the second convolution of the ResNet [12] basic block. As for filter decomposition, it always introduces another $1 \times 1$ convolutional layer, which means additional overhead of calling CUDA kernels. + +Previously, filter pruning and decomposition were developed separately. In this paper, we unveil the fact that filter pruning and decomposition are highly related from the viewpoint of compact tensor approximation. Specifically, both filter pruning and filter decomposition seek a compact approximation of the parameter tensors despite their different operation forms to cope with the application scenarios. Consider a vectorized image patch $\mathbf{x} \in \mathbb{R}^{m \times 1}$ and a group of $n$ filters $\mathbf{W} = \{\mathbf{w}_1, \dots, \mathbf{w}_n\} \in \mathbb{R}^{m \times n}$ . The pruning methods remove output channels and approximate the original output $\mathbf{x}^T \mathbf{W}$ as $\mathbf{x}^T \mathbf{C}$ , where $\mathbf{C} \in \mathbb{R}^{m \times k}$ only has $k$ output channels. Filter decomposition methods approximate $\mathbf{W}$ as two filters $\mathbf{A} \in \mathbb{R}^{m \times k}$ and $\mathbf{B} \in \mathbb{R}^{k \times n}$ and $\mathbf{AB}$ is the rank $k$ approximation of $\mathbf{W}$ . Thus, both the pruning and decomposition based methods seek a compact approximation to the original network parameters, but adopt different strategies for the approximation. + +The above observation shows that filter pruning and decomposition constitute complementary components of each other. This fact encourages us to design a unified framework that is able to incorporate the pruning-based and decomposition-based approaches simultaneously. This simple yet effective measure can endow the devised algorithm with the ability of flexibly switching between the two operation modes, i.e. filter pruning and decomposition, depending on the layer-wise configurations. This makes it possible to leverage the benefits of both methods. + +The hinge point between pruning and decomposition is + +![](images/bf3b28f9d28acf49ebe06a242949c99a6be222c6c276c34470580ec46d8719ab.jpg) +Figure 1: A sparsity-inducing matrix $\mathbf{A}$ is attached to a normal convolution. The matrix acts as the hinge between filter pruning and decomposition. By enforcing group sparsity to the columns and rows of the matrix, equivalent pruning and decomposition operations can be obtained. For pruning, the product of $\mathbf{W}$ and the column-reduced matrix $\mathbf{A}^c$ , i.e. $\mathbf{W}^c$ acts as the new convolutional filter. To save computation after filter decomposition the reduced matrices $\mathbf{W}^r$ and $\mathbf{A}^r$ are used as two convolutional filters. + +group sparsity, see Fig. 1. Consider a 4D convolutional filter, reshaped into a 2D matrix $\mathbf{W} \in \mathbb{R}^{\text{features} \times \text{outputs}}$ . Group sparsity is added by introducing a sparsity-inducing matrix $\mathbf{A}$ . By applying group sparsity constraints on the columns of $\mathbf{A}$ , the output channel of the sparsity-inducing matrix $\mathbf{A}$ and equivalently of the matrix product $\mathbf{W} \times \mathbf{A}$ can be reduced by solving an optimization problem. This is equivalent to filter pruning. On the other hand, if the group sparsity constraints are applied on the rows of $\mathbf{A}$ , then the inner channels of the matrix product $\mathbf{W} \times \mathbf{A}$ , namely, the output channel of $\mathbf{W}$ and the input channel of $\mathbf{A}$ , can be reduced. To save the computation, the single heavyweight convolution $\mathbf{W}$ is converted to a lightweight and a $1 \times 1$ convolution with respect to the already reduced matrices $\mathbf{W}^r$ and $\mathbf{A}^r$ . This breaks down to filter decomposition. + +Thus, the contribution of this paper is four-fold. + +I Starting from the perspective of compact tensor approximation, the connection between filter pruning and decomposition is analyzed. Although this perspective is the core of filter decomposition, it is still novel for network pruning. Actually, both of the methods approximate the weight tensor with compact representation that keeps the accuracy of the network. +II Based on the analysis, we propose to use sparsity-inducing matrices to hinge filter pruning and decomposition and introduce a unified formulation. This square matrix is inspired by filter decomposition and corresponds to a $1 \times 1$ convolution. By changing the way how the sparsity regularizer is applied to the matrix, our algorithm can achieve equivalent effect of either filter pruning or decomposition or both. To the best of our knowledge, this is the first work that analyzes the two methods under the same umbrella. +III The third contribution is the development of binary search, gradient based learning rate adjustment, + +layer balancing, and annealing methods. All are important for the success of the proposed algorithm. These details are obtained by observing the influence of the proximal gradient method on the filter during the optimization. + +IV The proposed method can be applied to various CNNs. We apply this method to VGG [40], ResNet [12], ResNeXt [46], WRN [51], and DenseNet [17]. The proposed network compression method achieves state-of-the-art performance on these networks. + +The rest of the paper is organized as follows. Sec. 2 discusses the related work. Sec. 3 explains the proposed network compression method. Sec. 4 describes the implementation considerations. The experimental results are shown in Sec. 5 and Sec. 6 concludes this paper. + +# 2. Related Work + +In this section, we firstly review the closely related work including pruning-based and decomposition-based compression methods. Then, we list other categories of network compression works. + +# 2.1. Parameter Pruning for Network Compression + +Non-structural pruning. To compress neural networks, network pruning disables the weak connections in a network that have a small influence on its prediction accuracy. Earlier pruning methods explore unstructured network weight pruning by deactivating connections corresponding to small weights or by applying sparsity regularization to the weight parameters [10, 30, 11]. The resulting irregular weight parameters of the network are not implementation-friendly, which hinders the real acceleration rate of the pruned network over the original one. + +Structural pruning. To circumvent the aforementioned problem, structural pruning aims at zeroing out structured + +![](images/9ce945db5807c3d56df0f54b8531e9b11a4ff535d659e9678566fbf06f96dc41.jpg) +Figure 2: The flowchart of the proposed algorithm. + +groups of the convolutional filters [15, 14]. Specifically, group sparsity regularization has been investigated in recent works for the structural pruning of network parameters [56, 45, 1]. Wen et al. [45] and Alvarez et al. [1] proposed to impose group sparsity regularization on network parameters to reduce the number of feature map channels in each layer. The success of this method triggered the studies of group sparsity based network pruning. Subsequent works improved group sparsity based approaches in different ways. One branch of works combined the group sparsity regularizer with other regularizers for network pruning. A low-rank regularizer [2] as well as an exclusive sparsity regularizer [49] were adopted for improving the pruning performance. Another branch of research investigated a better group-sparsity regularizer for parameter pruning including group ordered weighted $\ell_1$ regularizer [52], out-in-channel sparsity regularization [25] and guided attention for sparsity learning [42]. In addition, some works also attempted to achieve group-sparse parameters in an indirect manner. In [31] and [18], scaling factors were introduced to scale the outputs of specific structures or feature map channels to structurally prune network parameters. + +# 2.2. Filter Decomposition for Network Compression + +Another category of works compresses network parameters through tensor decomposition [8, 23, 19, 54, 26]. Specifically, the original filter is decomposed into a lightweight one and a linear projection which contain much fewer parameters than the original, thus resulting in the reduction of parameters and computations. Early works apply matrix decomposition methods such as SVD [8] or CP-decomposition [23] to decompose 2D filters. In [19], Jaderberg et al. proposed to approximate the 2D filter set by a linear combination of a smaller basis set of 2D separable filters. Subsequent filter basis decomposition works polished the approach in [19] by using a shared filter basis [41] or by enabling more flexible filter decomposition. In addition, Zhang et al. [54] took the input channel as the third dimension and directly compress the 3D parameter tensor. + +# 2.3. Other methods + +Other network compression methods include network quantization and knowledge distillation. Network quantization aims at a low-bit representation of network parameters to save storage and to accelerate inference. This method + +does not change the architecture of the fully-fledged network [44, 36]. Knowledge distillation transfers the knowledge of a teacher network to a student network [16]. Current research in this direction focuses on the architectural design of the student network [5, 3] and the loss function [43]. + +# 3. The proposed method + +This section explains the proposed method (Fig. 2). Specifically, it describes how group sparsity can hinge filter pruning and decomposition. The pair $\{\mathbf{x},\mathbf{y}\}$ denotes the input and target of the network. Without loss of clarity, we also use $\mathbf{x}$ to denote the input feature map of a layer. The output feature map of a layer is denoted by $\mathbf{z}$ . The filters of a convolutional layer are denoted by $\mathbf{W}$ while the introduced group sparsity matrix is denoted by $\mathbf{A}$ . The rows and columns of $\mathbf{A}$ are denoted by $\mathbf{A}_i$ , and $\mathbf{A}_j$ , respectively. The general structured groups of $\mathbf{A}$ are denoted by $\mathbf{A}_g$ . + +# 3.1. Group sparsity + +The convolution between the input feature map $\mathbf{x}$ and the filters can be converted to a matrix multiplication, i.e., + +$$ +\mathbf {Z} = \mathbf {X} \times \mathbf {W}, \tag {1} +$$ + +where $\mathbf{X} \in \mathbb{R}^{N \times cwh}$ , $\mathbf{W} \in \mathbb{R}^{cwh \times n}$ , and $\mathbf{Z} \in \mathbb{R}^{N \times n}$ are the reshaped input feature map, output feature map, and convolutional filter, $c$ , $n$ , $w \times h$ , and $N$ denotes the input channel, number of filters, filter size, and number of reshaped features, respectively. For the sake of brevity, the bias term is omitted here. The weight parameters $\mathbf{W}$ are usually trained with some regularization such as weight decay to avoid overfitting the network. To get structured pruning of the filter, structured sparsity regularization is used to constrain the filter, i.e. + +$$ +\min _ {\mathbf {W}} \mathcal {L} (\mathbf {y}, f (\mathbf {x}; \mathbf {W})) + \mu \mathcal {D} (\mathbf {W}) + \lambda \mathcal {R} (\mathbf {W}), \tag {2} +$$ + +where $\mathcal{D}(\cdot)$ and $\mathcal{R}(\cdot)$ are the weight decay and sparsity regularization, $\mu$ and $\lambda$ are the regularization factors. + +Different from other group sparsity methods that directly regularize the matrix $\mathbf{W}$ [49, 25], we enforce group sparsity constraints by incorporating a sparsity-inducing matrix $\mathbf{A} \in \mathbb{R}^{n \times n}$ , which can be converted to the filter of a $1 \times 1$ convolutional layer after the original layer. Then the original convolution in Eqn. (1) becomes $\mathbf{Z} = \mathbf{X} \times (\mathbf{W} \times \mathbf{A})$ . To obtain a structured sparse matrix, group sparsity regularization is enforced on $\mathbf{A}$ . Thus, the loss function becomes + +$$ +\min _ {\mathbf {W}, \mathbf {A}} \mathcal {L} (\mathbf {y}, f (\mathbf {x}; \mathbf {W}, \mathbf {A})) + \mu \mathcal {D} (\mathbf {W}) + \lambda \mathcal {R} (\mathbf {A}). \tag {3} +$$ + +Solving the problem in Eqn. (3) results in structured group sparsity in matrix $\mathbf{A}$ . By considering matrix $\mathbf{W}$ and $\mathbf{A}$ together, the actual effect is that the original convolutional filter is compressed. + +![](images/359dcfb0d3ed972d7738994bbf4876f6bede2a7fdf2d96a0360373ceaa9449e1.jpg) +(a) Group sparsity enforced on column. + +![](images/4fa859c99befcc52787e4919f4a018014b9376218c1f7648c906a8945fc95130.jpg) +(b) Group sparsity enforced on row. +Figure 3: Group-sparsity regularization enforcement: (a) the columns of the sparsity-inducing matrix are regularized. This results in nullified filters and the corresponding output feature maps are removed. (b) the rows are regularized and some are zeroed out. The filters of the previous layer and also the feature maps are removed. + +In comparison with the filter selection method [31, 18], the proposed method not only selects the filters in a layer, but also makes linear combinations of the filters to minimize the error between the original and the compact filter. On the other hand, different from other group sparsity constraints [49, 25], there is no need to change the original filters $\mathbf{W}$ of the network too much during optimization of the sparsity problem. In our experiments, we set a much smaller learning rate for the pretrained weight matrix $\mathbf{W}$ . + +# 3.2. The hinge + +The group sparsity term in Eqn. (3) controls how the network is compressed. This term has the form + +$$ +\mathcal {R} (\mathbf {A}) = \Phi \left(\| \mathbf {A} _ {g} \| _ {2}\right), \tag {4} +$$ + +where $\mathbf{A}_g$ denotes the different groups of $\mathbf{A}$ , $\| \mathbf{A}_g\| _2$ is the $\ell_2$ norm of the group, and $\Phi (\cdot)$ is a function of the group $\ell_2$ norms. + +If group sparsity regularization is added to the columns of $\mathbf{A}$ as in Fig. 3a, i.e., $\mathcal{R}(\mathbf{A}) = \Phi (\| \mathbf{A}_j\| _2)$ , a column pruned version $\mathbf{A}^c$ is obtained and the output channels of the corresponding $1\times 1$ convolution are pruned. In this case, we can multiply $\mathbf{W}$ and $\mathbf{A}^c$ and use the result as the filter of the convolutional layer. This is equivalent to pruning the output channels of the convolutional layer with the filter $\mathbf{W}$ . + +On the other hand, group sparsity can be also applied to the rows of $\mathbf{A}$ , i.e. $\mathcal{R}(\mathbf{A}) = \Phi (\| \mathbf{A}_i\| _2)$ . In this case, a row-sparse matrix $\mathbf{A}^r$ is derived and the input channels of the $1\times 1$ convolution can be pruned (See Fig. 3b). Accordingly, the corresponding output channels of the former convolution with filter $\mathbf{W}$ can be also pruned. However, since the number of output channels of the later convolution is not changed, multiplying out the two compression matrices does not save any computation. So a better choice + +Algorithm 1: The optimization algorithm used to solve the problem defined in Eqn. (3). + +Data: training dataset + +Result: the compressed network + +initialization: the current compression ratio $\gamma_{c} = 1$ + +the target compression ratio $\gamma^{*}$ , the nullifying + +threshold of the group $\ell_2$ norm $\mathcal{T}$ + +while $\gamma_c - \gamma^* < = \alpha$ do + +start a new epoch; + +for batch $\in$ training dataset do + +$$ +\mathbf {W} _ {t + 1} = \mathbf {W} _ {t} - \eta_ {s} \nabla \mathcal {G} (\mathbf {W} _ {t}); +$$ + +$$ +\mathbf {A} _ {t + \Delta} = \mathbf {A} _ {t} - \eta \nabla \mathcal {H} (\mathbf {A} _ {t}); +$$ + +$$ +\mathbf {A} _ {t + 1} = \operatorname {p r o x} _ {\lambda \eta \mathcal {R}} (\mathbf {A} _ {t + \Delta}); +$$ + +end + +compress the network with the threshold $\mathcal{T}$ + +compute the compression ratio $\gamma_{c}$ + +end + +is to leave them as two separate convolutional layers. This tensor manipulation method is equivalent to filter decomposition where a single convolution is decomposed into a lightweight one and a linear combination. In conclusion, by enforcing group sparsity to the columns and rows of the introduced matrix $\mathbf{A}$ , we can derive two tensor manipulation methods that are equivalent to the operation of filter pruning and decomposition, respectively. This provides a degree of freedom to choose the tensor manipulation method depending on the specifics of the underlying network. + +# 3.3. Proximal gradient solver + +To solve the problem defined by Eqn. (3), the parameter $\mathbf{W}$ can be updated with stochastic gradient descent (SGD) but with a small learning rate, i.e. $\mathbf{W}_{t + 1} = \mathbf{W}_t - \eta_s\nabla \mathcal{G}(\mathbf{W}_t)$ , where $\mathcal{G}(\mathbf{W}_t) = \mathcal{L}(\cdot ,f(\cdot ;\mathbf{W}_t,\cdot))+$ + +Result: the nullifying threshold $\mathcal{T}^{*} = g^{-1}(\gamma^{*})$ initialization: the target compression ratio $\gamma^{*}$ , the initial step $s$ , the stop criterion $\mathcal{C}$ , and $\mathcal{T} = \mathcal{T}_0$ ; + +Algorithm 2: Binary search of the threshold $\mathcal{T}$ +while $|\gamma_{n} - \gamma^{*}| > \mathcal{C}$ do compress the network with the threshold $\mathcal{T}$ calculate the current compression ratio $\gamma_{n}$ if $(\gamma_{n - 1} > = \gamma^{*}) = = (\gamma_{n} < \gamma^{*})$ then $s\gets s / 2$ if $\gamma_{n} > \gamma_{t}$ then $\mathcal{T}\gets \mathcal{T} + s;$ else $\mathcal{T}\gets \mathcal{T} - s;$ end + +end + +$\mu \mathcal{D}(\mathbf{W}_t)$ . This is because it is undesirable to modify the pretrained parameters too much during the optimization phase. The focus should be on the sparsity matrix $\mathbf{A}$ . + +The proximal gradient algorithm [37] is used to optimize the matrix $\mathbf{A}$ in Eqn. (3). It consists of two steps, i.e. gradient descent and proximal operator. The parameters in $\mathbf{A}$ are first updated by SGD with the gradient of the loss function $\mathcal{H}(\mathbf{A}) = \mathcal{L}(\mathbf{y}, f(\mathbf{x}; \mathbf{W}, \mathbf{A}))$ , namely, + +$$ +\mathbf {A} _ {t + \Delta} = \mathbf {A} _ {t} - \eta \nabla \mathcal {H} (\mathbf {A} _ {t}), \tag {5} +$$ + +where $\eta$ is the learning rate and $\eta >\eta_{s}$ . Then the proximal operator chooses a neighborhood point of $A_{t + \Delta}$ that minimizes the group sparsity regularization, i.e. + +$$ +\begin{array}{l} \mathbf {A} _ {t + 1} = \operatorname {p r o x} _ {\lambda \eta \mathcal {R}} \left(\mathbf {A} _ {t + \Delta}\right) \tag {6} \\ = \underset {\mathbf {A}} {\arg \min} \left\{\mathcal {R} (\mathbf {A} _ {t + \Delta}) + \frac {1}{2 \lambda \eta} \| \mathbf {A} - \mathbf {A} _ {t + \Delta} \| _ {2} ^ {2} \right\}. \\ \end{array} +$$ + +The sparsity regularizer $\Phi(\cdot)$ can have different forms, e.g., $\ell_1$ norm [37], $\ell_{1/2}$ norm [47], $\ell_{1-2}$ norm [48], or logsum [9]. All of them try to approximate the $\ell_0$ norm. In this paper, we mainly use $\{\ell_p : p = 1, 1/2\}$ regularizers while we also include the $\ell_{1-2}$ and logsum regularizers in the ablation studies. The proximal operators of the four regularizers have a closed-form solution. Briefly, the solution is the soft-thresholding operator [4] for $p = 1$ and the half-thresholding operator for $p = 1/2$ [47]. The solutions are appended in the supplementary material. The gradient step and proximal step are interleaved in the optimization phase of the regularized loss until some predefined stopping criterion is achieved. After each epoch, groups with $\ell_2$ norms smaller than a predefined threshold $\mathcal{T}$ are nullified. And the compression ratio in terms of FLOPs is calculated. When the difference between the current and the target compression ratio $\gamma_c$ and $\gamma^*$ is lower than the stopping criterion $\alpha$ , the compression phase stops. The detailed compression algorithm that utilizes the proximal gradient is shown in Algorithm 1. + +# 3.4. Binary search of the nullifying threshold + +After the compression phase stops, the resulting compression ratio is not exactly the same as the target compression ratio. To fit the target compression ratio, we use a binary search algorithm to determine the nullifying threshold $\mathcal{T}$ . The compression ratio $\gamma$ is actually a monotonous function of the threshold $\mathcal{T}$ , i.e. $\gamma = g(\mathcal{T})$ . However, the explicit expression of the function $g(\cdot)$ is not known. Given a target compression threshold $\gamma^{*}$ , we want to derive the threshold needed to nullify the sparse groups, i.e. $\mathcal{T}^{*} = g^{-1}(\gamma^{*})$ , where $g^{-1}(\cdot)$ is the inverse function of $g(\cdot)$ . The binary search approach shown in Algorithm 2 starts with an initial threshold $\mathcal{T}_0$ and a step $s$ . It adjusts the threshold $\mathcal{T}$ according to the values of the current and target compression ratio. The step $s$ is halved if the target compression ratio sits between the previous one $\gamma_{n-1}$ and the current one $\gamma_n$ . The searching procedure stops as soon as the final compression ratio $\gamma_n$ is close enough to the target, i.e., $|\gamma_n - \gamma^*| \leq \mathcal{C}$ . + +# 3.5. Gradient based adjustment of learning rate + +In the ResNet basic block, both of the two $3 \times 3$ convolutional layers are attached a sparsity-inducing matrix $\mathbf{A}^1$ and $\mathbf{A}^2$ , namely, $1 \times 1$ convolutional layers. We empirically find that the gradient of the first sparsity-inducing matrix is larger than that of the second. Thus, it is easier for the first matrix to jump to a point with larger average group $\ell_2$ norms. This results in unbalanced compression of the two sparsity-inducing matrices since the same nullifying threshold is used for all of the layers. Thus, much more channels of $\mathbf{A}^2$ are compressed than channels of $\mathbf{A}^1$ . This is an undesirable compression approach since both of the two layers are equally important. Hence, a balanced compression between them is preferable. + +To solve this problem, we adjust the learning rate of the first and second sparsity-inducing matrices according to their gradients. Let the ratio of the average group $\ell_2$ norm between the gradients of the matrices be + +$$ +\rho = \sum_ {g} \left(\nabla \mathbf {A} ^ {1}\right) _ {g} / \sum_ {g} \left(\nabla \mathbf {A} ^ {2}\right) _ {g}. \tag {7} +$$ + +Then the learning rate of the first convolution is divided by $\rho^m$ . We empirically set $m = 1.35$ . + +# 3.6. Group $\ell_2$ norm based layer balancing + +The proximal gradient method depends highly on the group sparsity term. That is, if the initial $\ell_2$ norm of a group is small, then it is highly likely that this group will be nullified. The problem is that the distribution of the group $\ell_2$ norm across different layers can be very diverse, which can result in unbalanced compression of the layers. In this case, a narrow bottleneck could appear in the compressed network that would hamper the performance. To solve this + +problem, we use the mean of the group $\ell_2$ norm of a layer to recalibrate the regularization factor of the layer. That is, + +$$ +\lambda^ {l} = \lambda \frac {1}{G} \sum_ {g = 1} ^ {G} \| \mathbf {A} _ {g} \| _ {2}, \tag {8} +$$ + +where $\lambda^l$ is the regularization factor of the $l$ -th layer. In this way, the layers with larger average group $\ell_2$ norm obtain a larger penalty. + +# 3.7. Regularization factor annealing + +The compression procedure starts with a fixed regularization factor. However, towards the end of the compression phase, the fixed regularization factor may be so large that more than the desired groups are nullified in one epoch. Thus, to solve the problem, we anneal the regularization factor when the average group $\ell_2$ norm shrinks below some threshold. The annealing also impacts the proximal step but has less influence while the gradient step plays a more active role in finding the local minimum. + +# 3.8. Distillation loss in the finetuning phase + +In Eqn. (3), the prediction loss and the groups sparsity regularization are used to solve the compression problem. After the compression phase, the derived model is further finetuned. During this phase, a distillation loss is exploited to force similar logit outputs of the original network and the pruned one. The vanilla distillation loss is used, i.e. + +$$ +\begin{array}{l} \mathcal {L} = (1 - \alpha) \mathcal {L} _ {c e} (\mathbf {y}, \sigma (\mathbf {z} _ {c})) \\ + 2 \alpha T ^ {2} \mathcal {L} _ {c e} \left(\sigma \left(\frac {\mathbf {z} _ {c}}{T}\right), \sigma \left(\frac {\mathbf {z} _ {o}}{T}\right)\right), \tag {9} \\ \end{array} +$$ + +where $\mathcal{L}_{ce}(\cdot)$ denotes the cross-entropy loss, $\sigma (\cdot)$ is the softmax function, $\mathbf{z}_c$ and $\mathbf{z}_o$ are the logit outputs of the compressed and the original network. For the sake of simplicity, the network parameters are omitted. We use a fixed balancing factor $\alpha = 0.4$ and temperature $T = 4$ . + +# 4. Implementation Considerations + +# 4.1. Sparsity-inducing matrix in network blocks + +In the analysis of Sec. 3, a $1 \times 1$ convolutional layer with the sparsity-inducing matrix is appended after the uncompressed layer. When it comes to different network blocks, we tweak it a little bit. As stated, both of the $3 \times 3$ convolutions in the ResNet [12] basic block are appended with a $1 \times 1$ convolution. For the first sparsity-inducing matrix, group sparsity regularization can be enforced on either the columns or the rows of the matrix. As for the second matrix, group sparsity is enforced on its rows due to the existence of the skip connection. + +The ResNet [12] and ResNeXt [46] bottleneck block has the structure of $1 \times 1 \rightarrow 3 \times 3 \rightarrow 1 \times 1$ convolutions. + +Here, the natural choice of sparsity-inducing matrices are the leading and the ending convolutions. For the ResNet bottleneck block, the two matrices select the input and output channels of the middle $3 \times 3$ convolution, respectively. Things become a little bit different for the ResNeXt bottleneck since the middle $3 \times 3$ convolution is a group convolution. So the aim becomes enforcing sparsity on the already existing groups of the group convolution. In order to do that, the parameters related to the groups in the two sparsity-inducing matrices are concatenated. Then group sparsity is enforced on the new matrix. After the compression phase, a whole group can be nullified. + +# 4.2. Initialization of W and A + +For the ResNet and ResNeXt bottleneck block, $1 \times 1$ convolutions are already there. So the original network parameters are used directly. However, it is necessary to initialize the newly added sparsity-inducing matrix $\mathbf{A}$ . Two initialization methods are tried. The first one initializes $\mathbf{W}$ and $\mathbf{A}$ with the pretrained parameters and identity matrix, respectively. The second method first calculates the singular value decomposition of $\mathbf{W}$ , i.e. $\mathbf{W} = \mathbf{U}\mathbf{S}\mathbf{V}^T$ . Then the left eigenvector $\mathbf{U}$ and the matrix $\mathbf{S}\mathbf{V}^T$ are used to initialize $\mathbf{W}$ and $\mathbf{A}$ . Note that the singular values are annexed by the right eigenvector. Thus, the columns of $\mathbf{W}$ , i.e. the filters of the convolutional layer lie on the surface of the unit sphere in the high-dimensional space. + +# 5. Experimental Results + +In this section, the proposed method is validated on three image classification datasets including CIFAR10, CIFAR100 [21], and ImageNet2012 [7]. The network compression method is applied to ResNet [12], ResNeXt [46], VGG [40], and DenseNet [17] on CIFAR10 and CIFAR100, WRN [51] on CIFAR100, and ResNet50 on ImageNet2012. For ResNet20 and ResNet56 on CIFAR dataset, the residual block is the basic ResBlock with two $3 \times 3$ convolutional layers. For ResNet164 on CIFAR and ResNet50 on ImageNet, the residual block is a bottleneck block. The investigated models of ResNeXt are ResNeXt20 and ResNeXt164 with carlinality 32, and bottleneck width 1. WRN has 16 convolutional layers with widening factor 10. + +The training protocol of the original network is as follows. The networks are trained for 300 epochs with SGD on CIFAR dataset. The momentum is 0.9 and the weight decay factor is $10^{-4}$ . Batch size is 64. The learning rate starts with 0.1 and decays by 10 at Epoch 150 and 225. The ResNet50 model is loaded from the pretrained PyTorch model [38]. The models are trained with Nvidia Titan Xp GPUs. The proposed network compression method is implemented by PyTorch. We fix the hyper parameters of the proposed method by empirical studies. The stop criterion $\alpha$ in Algorithm 1 is set to 0.1. The threshold $\mathcal{T}$ is set to 0.005. + +![](images/bcd93a55e1ad002daa85d527426a81288d57c34579d90a483b5c822deebdf883.jpg) +(a) FLOP ratio comparison. + +![](images/f3fe108f69a9bd3564c1a2e025c097ff1a04ca6a2ed95fb9bcca222d850bf0ac.jpg) +(b) Parameter ratio comparison. + +![](images/dfdf30916fdb192244deb23fa8b0fa8b408ed2bcf4afc7188e2566561634a2fc.jpg) +Figure 4: (a) FLOP and (b) parameter comparison between KSE [27] and Hinge under different compression ratio. ResNet56 is compressed. Top-1 error rate is reported. +(a) ResNet164 +Figure 5: Comparison between SSS [18] and the proposed method. Top-1 error rate is reported for CIFAR100. + +![](images/8be9497a2ddabac5cb28a30c9d890744ac09943f130a348ce178edd62f6ea6d0.jpg) +(b) ResNeXt164 + +Unless otherwise stated, $\ell_1$ regularizer is used and the regularization factor is set to $2 \cdot 10^{-4}$ . As already mentioned, during the compression step, we set different learning rates for $\mathbf{W}$ and $\mathbf{A}$ . The ratio between $\eta_s$ and $\eta$ is 0.01. + +# 5.1. Results on CIFAR10 + +The experimental results on CIFAR10 are shown in Table. 1. The Top-1 error rate, the percentage of the remaining FLOPs and parameters of the compressed models are listed in the table. For ResNet56, two operating points are reported. The operating point of $50\%$ FLOP compression is investigated by a bunch of state-of-the-art compression methods. Our proposed method achieves the best performance under this constraint. At the compression ratio of $24\%$ , our approach is clearly better than KSE [27]. For ResNet and ResNeXt with 20 and 164 layers, our method shoots a lower error rate than SSS. For VGG and DenseNet, the proposed method reduces the Top-1 error rate by $0.41\%$ and $1.51\%$ compared with [55]. In Fig. 4, we compare the FLOPs and number of parameters of the compressed model by KSE and the proposed method under different compression ratios. As shown in the figure, our compression method outperforms KSE easily. Fig. 6a and 6b show further comparisons between SSS and our method on CIFAR10. Our method establishes a lower bound for SSS. + +The ablation study on ResNet56 is shown in Table 3. Different combinations of the hyper parameters $\mathcal{T}$ and $\alpha$ are investigated. There are only slight changes in the results for different combinations. Anyway, when $\mathcal{T} = 0.005$ + +
ModelMethodTop-1 / BL (%)FLOPs (%)Params (%)
ResNet-56[55]7.74/6.9679.7079.51
GAL-0.6 [29]6.62/7.6463.4088.20
[24]6.94/6.9662.4086.30
NISP [50]6.99/6.9656.3957.40
CaP [34]6.78 / 6.4950.20-
ENC [20]7.00 / 6.9050.00-
AMC [13]8.10 / 7.2050.00-
KSE [27]6.77 / 6.9748.0045.27
FPGM [14]6.74 / 6.4147.70-
Hinge (ours)6.31 / 7.0550.0048.73
KSE [27]8.00 / 6.9724.00-
Hinge (ours)7.35 / 7.0524.0020.80
ResNet-20[55]8.34 / 7.9983.5379.59
SSS [18]9.15 / 7.4745.1683.41
Hinge (ours)8.16 / 7.4645.5044.55
ResNet-164SSS [18]5.78 / 5.1853.5384.75
Hinge (ours)5.4 / 4.9753.6170.34
ResNeXt-20SSS [18]8.49 / 7.0859.2176.57
Hinge (ours)8.04 / 7.4659.0063.95
ResNeXt-164SSS [18]5.42 / 6.4144.3864.38
Hinge (ours)5.13 / 4.8244.4250.53
VGG16[55]6.82 / 6.7560.9026.66
GAL-0.1 [29]6.58 / 6.0454.8017.80
Hinge (ours)6.41 / 5.9860.9319.95
DenseNet-12-40GAL-0.01 [29]5.39 / 5.1964.7064.40
[55]6.84 / 5.8955.2240.33
Hinge (ours)5.33 / 5.2655.6072.46
+ +Table 1: Comparison of CIFAR10 compression results. "FLOPs" and "Params" denote the remaining percentage of FLOP and parameter quantities of the compressed models and the lower the better. The other tables and figures follow the same convention. + +
ModelMethodTop-1 / BL (%)FLOPs (%)Params (%)
WRNCGES [49]21.97 / 21.6275.56-
Hinge-NA23.61 / 21.5875.5984.31
Hinge (ours)21.79 / 21.5875.6183.29
CGES [49]22.75 / 21.6257.31-
Hinge-NA23.13 / 21.5857.4168.72
Hinge (ours)22.06 / 21.5857.3967.80
ResNet20SSS [18]34.42 / 30.9132.9854.42
Hinge (ours)33.66 / 31.1732.9433.64
ResNet164SSS [18]24.42 / 23.3155.3386.75
Hinge (ours)23.12 / 23.2255.3276.57
ResNeXt20SSS [18]30.60 / 28.0053.5176.34
Hinge (ours)28.74 / 28.0553.5965.24
ResNeXt164SSS [18]26.71 / 23.1847.6972.47
Hinge (ours)22.56 / 23.1347.7558.49
+ +Table 2: Comparison of CIFAR100 compression results. For a fair comparison, the model size from different methods is kept to the same level. Hinge-NA stands for our hinge method without regularization factor annealing during the compression phase. + +and $\alpha = 0.01$ , our method achieves the lowest error rate. And we use this combination for the other experiments. As for the different regularizers, $\ell_1$ and $\ell_{1/2}$ regularization are clearly better than $\ell_{1-2}$ and logsum. Due to the simplicity of the $\ell_1$ proximal operator in contrast to the $\ell_{1/2}$ , we use + +![](images/8a49e1292c133c0bcc3f97e14d053f35642086d2c3e15b2fbe693147cc615b2b.jpg) +(a) CIFAR10, ResNet20 + +![](images/a60434f6a2ffac51fcbdfd1f829530ac3cf47fc5687cf2f1ede56e8181291652.jpg) +(b) CIFAR10, ResNeXt20 +Figure 6: Comparison between SSS [18] and the proposed method. Top-1 error rate is reported. (a) and (b) shows the results on CIFAR10 while (c) and (d) shows the results on CIFAR100. + +![](images/ca011a3b808a9a275f3ca5ada3fd1ec98ff58c03048224a76b97f0e17171349f.jpg) +(c) CIFAR100, ResNet20 + +![](images/b17b32cc6f7c7f917e23c2fc31b058d237c2a9f3508076bcfb2e849ac00276a7.jpg) +(d) CIFAR100, ResNeXt20 + +
RegularizerThreshold TαTop-1 error (%)
l10.0010.056.54
l10.0050.16.53
l10.0010.056.66
l10.0050.016.37
logsum0.0050.016.53
l1/20.0050.016.31
l1-20.0050.016.56
+ +$\ell_1$ instead of $\ell_{1 / 2}$ in the other experiments. + +# 5.2. Results on CIFAR100 + +Table 2 shows the compression results on CIFAR100. For the compression of WRN, we analyze the influence of regularization factor annealing during the compression phase. It is clear that with the annealing mechanism, the proposed method achieves much better performance. This is because towards the end of the compression phase, the proximal gradient solver has found quite a good neighbor of the local minimum. In this case, the regularization factor should diminish in order for a better exploration around the local minimum. Compared with the previous group sparsity method CGES [49], our hinge method with the annealing mechanism results in better performance. + +Fig. 5 compares the SSS and our method for the 164-layer networks. Even without the distillation loss, our method is already better than SSS. When the distillation loss is utilized, the proposed method brings the Top-1 error rate to an even lower level. The corresponding results for the 20-layer networks are shown in Fig. 6c and 6d, respectively. + +# 5.3. Results on ImageNet + +The comparison results of compressing ResNet50 on the ImageNet2012 dataset is shown in Table 4. Since different methods compare the compressed models under differ + +Table 3: Ablation study: the proposed compression method is applied to ResNet56 and tested on CIFAR10. The compression ratio is fixed to $50\%$ . Different regularizers and hyper parameters $\mathcal{T}$ and $\alpha$ are examined. + +
MethodTop-1 ErrorFLOPs (%)
SSS [18]25.8268.55
ThinNet-70 [33]27.9663.21
NISP [50]28.0155.99
Taylor-56% [35]25.5055.01
FPGM [14]25.1747.50
Hinge (ours)25.3046.55
RRBP [57]27.0045.45
GAL [29]28.2044.98
+ +Table 4: Results of compressing ResNet50 on ImageNet2012. Entries are sorted according to FLOPs. + +ent FLOP compression rates, it is only possible to compare different methods under roughly comparable compression rates. Compared with those methods, our method achieves state-of-the-art trade-off performance between Top-1 error rate and FLOP compression ratio. + +# 6. Conclusion + +In this paper, we propose to hinge filter pruning and decomposition via group sparsity. By enforcing group sparsity regularization on the different structured groups, i.e., columns and rows of the sparsity-inducing matrix, the manipulation of the tensor breaks down to filter pruning and decomposition, respectively. The unified formulation enables the devised algorithm to flexibly switch between the two modes of network compression, depending on the specific circumstances in the network. Proximal gradient method with gradient based learning rate adjustment, layer balancing, and regularization factor annealing are used to solve the optimization problem. Distillation loss is used in the finetuning phase. The experimental results validate the proposed method. + +Acknowledgments: This work was partly supported by the ETH Zürich Fund (OK), by VSS ASTRA, SBB and Huawei projects, and by Amazon AWS and Nvidia GPU grants. + +# References + +[1] Jose M Alvarez and Mathieu Salzmann. Learning the number of neurons in deep networks. In Proce. NeurIPS, pages 2270-2278, 2016. 4323 +[2] Jose M Alvarez and Mathieu Salzmann. Compression-aware training of deep networks. In Proc. NeurIPS, pages 856-867, 2017. 4323 +[3] Anubhav Ashok, Nicholas Rhinehart, Fares Beainy, and Kris M Kitani. N2N learning: Network to network compression via policy gradient reinforcement learning. In Proc. ICLR, 2018. 4323 +[4] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, Jonathan Eckstein, et al. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine learning, 3(1):1-122, 2011. 4325 +[5] Elliot J Crowley, Gavin Gray, and Amos J Storkey. Moonshine: Distilling with cheap convolutions. In Proc. NeurIPS, pages 2888-2898, 2018. 4323 +[6] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ECO: Efficient convolution operators for tracking. In Proc. CVPR, pages 6638-6646, 2017. 4321 +[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In Proc. CVPR, pages 248-255. IEEE, 2009. 4326 +[8] Emily L Denton, Wojciech Zaremba, Joan Bruna, Yann LeCun, and Rob Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In Proc. NeurIPS, pages 1269-1277, 2014. 4323 +[9] Shuhang Gu, Qi Xie, Deyu Meng, Wangmeng Zuo, Xi-angchu Feng, and Lei Zhang. Weighted nuclear norm minimization and its applications to low level vision. IJCV, 121(2):183-208, 2017. 4325 +[10] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. In Proc. ICLR, 2015. 4322 +[11] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Proc. NeurIPS, pages 1135-1143, 2015. 4322 +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. CVPR, pages 770-778, 2016. 4321, 4322, 4326 +[13] Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. AMC: AutoML for model compression and acceleration on mobile devices. In Proc. ECCV, pages 784-800, 2018. 4321, 4327 +[14] Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Proc. CVPR, pages 4340-4349, 2019. 4323, 4327, 4328 +[15] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In Proc. ICCV, pages 1389-1397, 2017. 4321, 4323 + +[16] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 4323 +[17] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proc. CVPR, pages 2261-2269, 2017. 4321, 4322, 4326 +[18] Zehao Huang and Naiyan Wang. Data-driven sparse structure selection for deep neural networks. In Proc. ECCV, pages 304-320, 2018. 4323, 4324, 4327, 4328 +[19] Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. In Proc. BMVC, 2014. 4323 +[20] Hyeji Kim, Muhammad Umar Karim Khan, and Chong-Min Kyung. Efficient neural network compression. In Proc. CVPR, June 2019. 4327 +[21] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 4326 +[22] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Proc. NeurIPS, pages 1097-1105, 2012. 4321 +[23] Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speeding-up convolutional neural networks using fine-tuned CP-decomposition. In Proc. ICLR, 2015. 4323 +[24] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In Proc. ICLR, 2017. 4327 +[25] Jiashi Li, Qi Qi, Jingyu Wang, Ce Ge, Yujuan Li, Zhangzhang Yue, and Haifeng Sun. OICSR: Out-in-channel sparsity regularization for compact deep neural networks. In Proc. CVPR, pages 7046-7055, 2019. 4323, 4324 +[26] Yawei Li, Shuhang Gu, Luc Van Gool, and Radu Timofte. Learning filter basis for convolutional neural network compression. In Proc. ICCV, pages 5623-5632, 2019. 4321, 4323 +[27] Yuchao Li, Shaohui Lin, Baochang Zhang, Jianzhuang Liu, David Doermann, Yongjian Wu, Feiyue Huang, and Rongrong Ji. Exploiting kernel sparsity and entropy for interpretable CNN compression. In Proc. CVPR, 2019. 4327 +[28] Yawei Li, Vagia Tsiminaki, Radu Timofte, Marc Pollefeys, and Luc Van Gool. 3D appearance super-resolution with deep learning. In Proc. CVPR, 2019. 4321 +[29] Shaohui Lin, Rongrong Ji, Chenqian Yan, Baochang Zhang, Liujuan Cao, Qixiang Ye, Feiyue Huang, and David Doermann. Towards optimal structured cnn pruning via generative adversarial learning. In Proc. CVPR, pages 2790-2799, 2019. 4327, 4328 +[30] Baoyuan Liu, Min Wang, Hassan Foroosh, Marshall Tappen, and Marianna Pensky. Sparse convolutional neural networks. In Proc. CVPR, pages 806-814, 2015. 4322 +[31] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In Proc. ICCV, pages 2736-2744, 2017. 4323, 4324 + +[32] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proc. CVPR, pages 3431-3440, 2015. 4321 +[33] Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. ThiNet: A filter level pruning method for deep neural network compression. In Proc. ICCV, pages 5058-5066, 2017. 4328 +[34] Breton Minnehan and Andreas Savakis. Cascaded projection: End-to-end network compression and acceleration. In Proc. CVPR, June 2019. 4327 +[35] Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In Proc. CVPR, pages 11264-11272, 2019. 4328 +[36] Markus Nagel, Mart van Baalen, Tijmen Blankevoort, and Max Welling. Data-free quantization through weight equalization and bias correction. In Proc. ICCV, 2019. 4323 +[37] Neal Parikh, Stephen Boyd, et al. Proximal algorithms. Foundations and Trends in Optimization, 1(3):127-239, 2014. 4325 +[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. 2017. 4326 +[39] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proc. CVPR, pages 779-788, 2016. 4321 +[40] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 4322, 4326 +[41] Sanghyun Son, Seungjun Nah, and Kyoung Mu Lee. Clustering convolutional kernels to compress deep neural networks. In Proc. ECCV, pages 216-232, 2018. 4323 +[42] Amirsina Torfi, Rouzbeh A Shirvani, Sobhan Soleymani, and Naser M Nasrabadi. GASL: Guided attention for sparsity learning in deep neural networks. arXiv preprint arXiv:1901.01939, 2019. 4323 +[43] Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In Proc. CVPR, pages 1365-1374, 2019. 4323 +[44] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. HAQ: Hardware-aware automated quantization with mixed precision. In Proc. CVPR, pages 8612-8620, 2019. 4323 +[45] Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In Proc. NeurIPS, pages 2074-2082, 2016. 4323 +[46] Saining Xie, Ross Girshick, Piotr Dolkar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proc. CVPR, pages 1492-1500, 2017. 4322, 4326 +[47] Zongben Xu, Xiangyu Chang, Fengmin Xu, and Hai Zhang. $L_{1/2}$ regularization: A thresholding representation theory and a fast solver. TNNLS, 23(7):1013-1027, 2012. 4325 +[48] Quanming Yao, James T Kwok, and Xiawei Guo. Fast learning with nonconvex L1-2 regularization. arXiv preprint arXiv:1610.09461, 2016. 4325 +[49] Jaehong Yoon and Sung Ju Hwang. Combined group and exclusive sparsity for deep neural networks. In Proc. ICML, pages 3958-3966. JMLR.org, 2017. 4323, 4324, 4327, 4328 + +[50] Ruichi Yu, Ang Li, Chun-Fu Chen, Jui-Hsin Lai, Vlad I Morariu, Xintong Han, Mingfei Gao, Ching-Yung Lin, and Larry S Davis. NISP: Pruning networks using neuron importance score propagation. In Proc. CVPR, pages 9194-9203, 2018. 4327, 4328 +[51] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. 2016. 4322, 4326 +[52] Dejiao Zhang, Haozhu Wang, Mario Figueiredo, and Laura Balzano. Learning to share: Simultaneous parameter tying and sparsification in deep learning. In Proc. ICLR, 2018. 4323 +[53] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: residual learning of deep CNN for image denoising. IEEE TIP, 26(7):3142-3155, 2017. 4321 +[54] Xiangyu Zhang, Jianhua Zou, Kaiming He, and Jian Sun. Accelerating very deep convolutional networks for classification and detection. IEEE TPAMI, 38(10):1943-1955, 2015. 4323 +[55] Chenglong Zhao, Bingbing Ni, Jian Zhang, Qiwei Zhao, Wenjun Zhang, and Qi Tian. Variational convolutional neural network pruning. In Proc. CVPR, pages 2780-2789, 2019. 4327 +[56] Hao Zhou, Jose M Alvarez, and Fatih Porikli. Less is more: Towards compact cnns. In Proc. ECCV, pages 662-677. Springer, 2016. 4323 +[57] Yuefu Zhou, Ya Zhang, Yanfeng Wang, and Qi Tian. Accelerate cnn via recursive bayesian pruning. In Proc. CVPR, pages 3306-3315, 2019. 4328 \ No newline at end of file diff --git a/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/images.zip b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8e823ce2f764b954ea18ef3b91a1351d706fb97e --- /dev/null +++ b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:827a9d336decfa1ad85ee81fb46d38c213a1891bd9d767fe177ae72e37ed3589 +size 476953 diff --git a/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/layout.json b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f3db851903af523be24edc17a98862a6eaac99ee --- /dev/null +++ b/groupsparsitythehingebetweenfilterpruninganddecompositionfornetworkcompression/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a134c945f8cc9f5ce12e67d1521846272691786d852c9232eec5e7ab4700025b +size 545593 diff --git a/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_content_list.json b/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dc2ba4dd66529976150efd20b1f4e6a283c0284d --- /dev/null +++ b/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9cde578ac778fbf87b3ebcfcd5b74f1d5b72ad35c8a89000cc54b956e4c79f1 +size 81081 diff --git a/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_model.json b/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_model.json new file mode 100644 index 0000000000000000000000000000000000000000..76858a400b71da0f4289887b1c766117d3207c0e --- /dev/null +++ b/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4caf4ed3a93297403c7b41500e8822d98e4f9485135967480e8c110c79d1f13e +size 102120 diff --git a/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_origin.pdf b/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..542cb264e7786d217e9631be3c8889dffb212396 --- /dev/null +++ b/guidedvariationalautoencoderfordisentanglementlearning/34ebf441-5f63-4cc6-b6f0-2b198887aa23_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de26c526968c2272d42d1d71429281fefec058df9e7e4fd1233eebe225040884 +size 3273021 diff --git a/guidedvariationalautoencoderfordisentanglementlearning/full.md b/guidedvariationalautoencoderfordisentanglementlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3ff130117d4a32a1b6af7a384c0b89d6927ab0ce --- /dev/null +++ b/guidedvariationalautoencoderfordisentanglementlearning/full.md @@ -0,0 +1,360 @@ +# Guided Variational Autoencoder for Disentanglement Learning + +Zheng Ding\*,1,2, Yifan Xu\*,2, Weijian Xu2, Gaurav Parmar2, Yang Yang3, Max Welling3,4, Zhuowen Tu2 1Tsinghua University 2UC San Diego 3Qualcomm, Inc. 4University of Amsterdam + +# Abstract + +We propose an algorithm, guided variational autoencoder (Guided-VAE), that is able to learn a controllable generative model by performing latent representation disentanglement learning. The learning objective is achieved by providing signals to the latent encoding/embedding in VAE without changing its main backbone architecture, hence retaining the desirable properties of the VAE. We design an unsupervised strategy and a supervised strategy in Guided-VAE and observe enhanced modeling and controlling capability over the vanilla VAE. In the unsupervised strategy, we guide the VAE learning by introducing a lightweight decoder that learns latent geometric transformation and principal components; in the supervised strategy, we use an adversarial excitation and inhibition mechanism to encourage the disentanglement of the latent variables. Guided-VAE enjoys its transparency and simplicity for the general representation learning task, as well as disentanglement learning. On a number of experiments for representation learning, improved synthesis/sampling, better disentanglement for classification, and reduced classification errors in meta learning have been observed. + +# 1. Introduction + +The resurgence of autoencoders (AE) [34, 6, 21] is an important component in the rapid development of modern deep learning [17]. Autoencoders have been widely adopted for modeling signals and images [46, 50]. Its statistical counterpart, the variational autoencoder (VAE) [29], has led to a recent wave of development in generative modeling due to its two-in-one capability, both representation and statistical learning in a single framework. Another exploding direction in generative modeling includes generative adversarial networks (GAN) [18], but GANs focus on the generation process and are not aimed at representation learning (without an encoder at least in its vanilla version). + +Compared with classical dimensionality reduction methods like principal component analysis (PCA) [22, 27] and + +Laplacian eigenmaps [4], VAEs have demonstrated their unprecedented power in modeling high dimensional data of real-world complexity. However, there is still a large room to improve for VAEs to achieve a high quality reconstruction/synthesis. Additionally, it is desirable to make the VAE representation learning more transparent, interpretable, and controllable. + +In this paper, we attempt to learn a transparent representation by introducing guidance to the latent variables in a VAE. We design two strategies for our Guided-VAE, an unsupervised version (Fig. 1.a) and a supervised version (Fig. 1.b). The main motivation behind Guided-VAE is to encourage the latent representation to be semantically interpretable, while maintaining the integrity of the basic VAE architecture. Guided-VAE is learned in a multi-task learning fashion. The objective is achieved by taking advantage of the modeling flexibility and the large solution space of the VAE under a lightweight target. Thus the two tasks, learning a good VAE and making the latent variables controllable, become companions rather than conflicts. + +In unsupervised Guided-VAE, in addition to the standard VAE backbone, we also explicitly force the latent variables to go through a lightweight encoder that learns a deformable PCA. As seen in Fig. 1.a, two decoders exist, both trying to reconstruct the input data $\mathbf{x}$ : The main decoder, denoted as $\mathrm{Dec}_{\mathrm{main}}$ , functions regularly as in the standard VAE [29]; the secondary decoder, denoted as $\mathrm{Dec}_{\mathrm{sub}}$ , explicitly learns a geometric deformation together with a linear subspace. In supervised Guided-VAE, we introduce a subtask for the VAE by forcing one latent variable to be discriminative (minimizing the classification error) while making the rest of the latent variable to be adversarially discriminative (maximizing the minimal classification error). This subtask is achieved using an adversarial excitation and inhibition formulation. Similar to the unsupervised Guided-VAE, the training process is carried out in an end-to-end multi-task learning manner. The result is a regular generative model that keeps the original VAE properties intact, while having the specified latent variable semantically meaningful and capable of controlling/synthesizing a specific attribute. We apply Guided-VAE to the data modeling and few-shot learning problems and show favorable results + +on the MNIST, CelebA, CIFAR10 and Omniglot datasets. + +The contributions of our work can be summarized as follows: + +- We propose a new generative model disentanglement learning method by introducing latent variable guidance to variational autoencoders (VAE). Both unsupervised and supervised versions of Guided-VAE have been developed. +- In unsupervised Guided-VAE, we introduce deformable PCA as a subtask to guide the general VAE learning process, making the latent variables interpretable and controllable. +- In supervised Guided-VAE, we use an adversarial excitation and inhibition mechanism to encourage the disentanglement, informativeness, and controllability of the latent variables. + +Guided-VAE can be trained in an end-to-end fashion. It is able to keep the attractive properties of the VAE while significantly improving the controllability of the vanilla VAE. It is applicable to a range of problems for generative modeling and representation learning. + +# 2. Related Work + +Related work can be discussed along several directions. + +Generative model families such as generative adversarial networks (GAN) [18, 2] and variational autoencoder (VAE) [29] have received a tremendous amount of attention lately. Although GAN produces higher quality synthesis than VAE, GAN is missing the encoder part and hence is not directly suited for representation learning. Here, we focus on disentanglement learning by making VAE more controllable and transparent. + +Disentanglement learning [41, 48, 23, 1, 16, 26] recently becomes a popular topic in representation learning. Adversarial training has been adopted in approaches such as [41, 48]. Various methods [44, 28, 37] have imposed constraints/regularizations/supervisions to the latent variables, but these existing approaches often involve an architectural change to the VAE backbone and the additional components in these approaches are not provided as secondary decoder for guiding the main encoder. A closely related work is the $\beta$ -VAE [20] approach in which a balancing term $\beta$ is introduced to control the capacity and the independence prior. $\beta$ -TCVAE [8] further extends $\beta$ -VAE by introducing a total correlation term. + +From a different angle, principal component analysis (PCA) family [22, 27, 7] can also be viewed as representation learning. Connections between robust PCA [7] and VAE [29] have been observed [10]. Although being a widely adopted method, PCA nevertheless has limited modeling capability due to its linear subspace assumption. To + +alleviate the strong requirement for the input data being pre-aligned, RASL [45] deals with unaligned data by estimating a hidden transformation to each input. Here, we take advantage of the transparency of PCA and the modeling power of VAE by developing a sub-encoder (see Fig. 1.a), deformable PCA, that guides the VAE training process in an integrated end-to-end manner. After training, the sub-encoder can be removed by keeping the main VAE backbone only. + +To achieve disentanglement learning in supervised Guided-VAE, we encourage one latent variable to directly correspond to an attribute while making the rest of the variables uncorrelated. This is analogous to the excitation-inhibition mechanism [43, 53] or the explaining-away [52] phenomena. Existing approaches [38, 37] impose supervision as a conditional model for an image translation task, whereas our supervised Guided-VAE model targets the generic generative modeling task by using an adversarial excitation and inhibition formulation. This is achieved by minimizing the discriminative loss for the desired latent variable while maximizing the minimal classification error for the rest of the variables. Our formulation has a connection to the domain-adversarial neural networks (DANN) [15], but the two methods differ in purpose and classification formulation. Supervised Guided-VAE is also related to the adversarial autoencoder approach [40], but the two methods differ in the objective, formulation, network structure, and task domain. In [24], the domain invariant variational autoencoders method (DIVA) differs from ours by enforcing disjoint sectors to explain certain attributes. + +Our model also has connections to the deeply-supervised nets (DSN) [36], where intermediate supervision is added to a standard CNN classifier. There are also approaches [14, 5] in which latent variables constraints are added, but they have different formulations and objectives than GuidedVAE. Recent efforts in fairness disentanglement learning [9, 47] also bear some similarity, but there is still a large difference in formulation. + +# 3. Guided-VAE Model + +In this section, we present the main formulations of our Guided-VAE models. The unsupervised Guided-VAE version is presented first, followed by introduction of the supervised version. + +# 3.1. VAE + +Following the standard definition in variational autoencoder (VAE) [29], a set of input data is denoted as $\mathbf{X} = (\mathbf{x}_1, \dots, \mathbf{x}_n)$ where $n$ denotes the number of total input samples. The latent variables are denoted by vector $\mathbf{z}$ . The encoder network includes network and variational parameters $\phi$ that produces variational probability model $q_{\phi}(\mathbf{z}|\mathbf{x})$ . The decoder network is parameterized by $\theta$ to reconstruct + +![](images/3e44c31afec690ba9be62a318b09bae26b22cd3975000c2abd6c25df53e77b65.jpg) +(a) Unsupervised Guided-VAE +Figure 1. Model architecture for the proposed Guided-VAE algorithms. + +![](images/0491f9be709f4691827364842da1042e7e2889ade6620e7666e688ba358ba732.jpg) +(b) Supervised Guided-VAE + +sample $\tilde{\mathbf{x}} = f_{\boldsymbol{\theta}}(\mathbf{z})$ . The log likelihood $\log p(\mathbf{x})$ estimation is achieved by maximizing the Evidence Lower BOund (ELBO) [29]: + +$$ +\begin{array}{l} E L B O (\boldsymbol {\theta}, \phi ; \mathbf {x}) = \mathbb {E} _ {q _ {\phi} (\mathbf {z} | \mathbf {x})} [ \log (p _ {\boldsymbol {\theta}} (\mathbf {x} | \mathbf {z})) ] \tag {1} \\ - D _ {\mathrm {K L}} (q _ {\phi} (\mathbf {z} | \mathbf {x}) | | p (\mathbf {z})). \\ \end{array} +$$ + +The first term in Eq. (1) corresponds to a reconstruction loss $\int q_{\phi}(\mathbf{z}|\mathbf{x})\times ||\mathbf{x} - f_{\theta}(\mathbf{z})||^2 d\mathbf{z}$ (the first term is the negative of reconstruction loss between input $\mathbf{x}$ and reconstruction $\tilde{\mathbf{x}}$ ) under Gaussian parameterization of the output. The second term in Eq. (1) refers to the KL divergence between the variational distribution $q_{\phi}(\mathbf{z}|\mathbf{x})$ and the prior distribution $p(\mathbf{z})$ . The training process thus tries to optimize: + +$$ +\max _ {\boldsymbol {\theta}, \phi} \left\{\sum_ {i = 1} ^ {n} E L B O (\boldsymbol {\theta}, \phi ; \mathbf {x} _ {i}) \right\}. \tag {2} +$$ + +# 3.2. Unsupervised Guided-VAE + +In our unsupervised Guided-VAE, we introduce a deformable PCA as a secondary decoder to guide the VAE training. An illustration can be seen in Fig. 1.a. This secondary decoder is called $\mathsf{Dec}_{\mathsf{sub}}$ . Without loss of generality, we let $\mathbf{z} = (\mathbf{z}_{\text{def}}, \mathbf{z}_{\text{cont}})$ . $\mathbf{z}_{\text{def}}$ decides a deformation/ transformation field, e.g. an affine transformation denoted as $\tau(\mathbf{z}_{\text{def}})$ . $\mathbf{z}_{\text{cont}}$ determines the content of a sample image for transformation. The PCA model consists of $K$ basis $B = (\mathbf{b}_1, \dots, \mathbf{b}_K)$ . We define a deformable PCA loss as: + +$$ +\begin{array}{l} \mathcal {L} _ {D P C A} (\phi , B) \\ = \sum_ {i = 1} ^ {n} \mathbb {E} _ {q _ {\phi} (\mathbf {z} _ {d e f}, \mathbf {z} _ {c o n t} | \mathbf {x} _ {i})} \left[ | | \mathbf {x} _ {i} - \tau (\mathbf {z} _ {d e f}) \circ (\mathbf {z} _ {c o n t} B ^ {T}) | | ^ {2} \right] \\ + \sum_ {k, j \neq k} \left(\mathbf {b} _ {k} ^ {T} \mathbf {b} _ {j}\right) ^ {2}, \tag {3} \\ \end{array} +$$ + +where $\circ$ defines a transformation (affine in our experiments) operator decided by $\tau (\mathbf{z}_{\text{def}})$ and $\sum_{k,j\neq k}(\mathbf{b}_k^T\mathbf{b}_j)^2$ is regarded as the orthogonal loss. A normalization term $\sum_{k}(\mathbf{b}_{k}^{T}\mathbf{b}_{k} - 1)^{2}$ can be optionally added to force the basis to be unit vectors. We follow the spirit of the PCA optimization and a general formulation for learning PCA can be found in [7]. To keep the simplicity of the method we learn a fixed basis $B$ and one can also adopt a probabilistic PCA model [49]. Thus, learning unsupervised Guided-VAE becomes: + +$$ +\left. \max _ {\boldsymbol {\theta}, \boldsymbol {\phi}, B} \left\{\sum_ {i = 1} ^ {n} E L B O (\boldsymbol {\theta}, \boldsymbol {\phi}; \mathbf {x} _ {i}) - \mathcal {L} _ {D P C A} (\boldsymbol {\phi}, B) \right\}. \right. \tag {4} +$$ + +The affine matrix described in our transformation follows implementation in [25]: + +$$ +A _ {\theta} = \left[ \begin{array}{l l l} \theta_ {1 1} & \theta_ {1 2} & \theta_ {1 3} \\ \theta_ {2 1} & \theta_ {2 2} & \theta_ {2 3} \end{array} \right] \tag {5} +$$ + +The affine transformation includes translation, scale, rotation and shear operation. We use different latent variables to calculate different parameters in the affine matrix according to the operations we need. + +# 3.3. Supervised Guided-VAE + +For training data $\mathbf{X} = (\mathbf{x}_1, \dots, \mathbf{x}_n)$ , suppose there exists a total of $T$ attributes with ground-truth labels. Let $\mathbf{z} = (z_t, \mathbf{z}_t^{rst})$ where $z_t$ defines a scalar variable deciding the $t$ -th attribute and $\mathbf{z}_t^{rst}$ represents remaining latent variables. Let $y_t(\mathbf{x}_i)$ be the ground-truth label for the $t$ -th attribute of sample $\mathbf{x}_i$ ; $y_t(\mathbf{x}_i) \in \{-1, +1\}$ . For each attribute, we use an adversarial excitation and inhibition method with term: + +$$ +\begin{array}{l} \mathcal {L} _ {E x c i t a t i o n} (\phi , t) \\ = \max _ {w _ {t}} \left\{\sum_ {i = 1} ^ {n} \mathbb {E} _ {q _ {\phi} \left(z _ {t} \mid \mathbf {x} _ {i}\right)} [ \log p _ {w _ {t}} \left(y = y _ {t} (\mathbf {x} _ {i}) \mid z _ {t}\right) ] \right\}, \tag {6} \\ \end{array} +$$ + +![](images/79632e7fc421e86d8549d43484bfb2c40d523552c786dd287fd040732b053c41.jpg) +(a)VAE + +![](images/3edb1a1e6bd875cd8b9eedec21a8e443d8374960fb20503fc8be2027c8750cee.jpg) +(b) $\beta$ -VAE + +![](images/633b567f0d739acfbf2e83302e4979eea7657d18d6287a8a0e26c35774578b2c.jpg) +(c) CCβ-VAE +Figure 2. Latent Variables Traversal on MNIST: Comparison of traversal results from vanilla VAE [29], $\beta$ -VAE [20], $\beta$ -VAE with controlled capacity increase (CC $\beta$ -VAE), JointVAE [12] and our Guided-VAE on the MNIST dataset. $z_{1}$ and $z_{2}$ in Guided-VAE are controlled. + +![](images/9646e09def4352b564a661dbac99beaa548cdf7dd60b4b4bcdda641135f49085.jpg) +(d) JointVAE + +![](images/62e97cf6551533a54186782aad360e827e3d3443c78fb6fb7443c6be5d3b8aa2.jpg) +(e) Guided-VAE (Ours) + +where $w_{t}$ refers to classifier making a prediction for the $t$ -th attribute using the latent variable $z_{t}$ . + +This is an excitation process since we want latent variable $z_{t}$ to directly correspond to the attribute label. + +Next is an inhibition term. + +$$ +\begin{array}{l} \mathcal {L} _ {\text {I n h i b i t i o n}} (\phi , t) \\ = \max _ {C _ {t}} \left\{\sum_ {i = 1} ^ {n} \mathbb {E} _ {q _ {\phi} \left(\mathbf {z} _ {t} ^ {r s t} \mid \mathbf {x} _ {i}\right)} [ \log p _ {C _ {t}} (y = y _ {t} (\mathbf {x} _ {i}) | \mathbf {z} _ {t} ^ {r s t}) ] \right\}, \tag {7} \\ \end{array} +$$ + +where $C_t(\mathbf{z}_t^{rst})$ refers to classifier making a prediction for the $t$ -th attribute using the remaining latent variables $\mathbf{z}_t^{rst}$ . $\log p_{C_t}(y = y_t(\mathbf{x})|\mathbf{z}_t^{rst})$ is a cross-entropy term for minimizing the classification error in Eq. (7). This is an inhibition process since we want the remaining variables $\mathbf{z}_t^{rst}$ as independent as possible to the attribute label in Eq. (8) below. + +$$ +\begin{array}{l} \max _ {\boldsymbol {\theta}, \phi} \left\{\sum_ {i = 1} ^ {n} E L B O (\boldsymbol {\theta}, \phi ; \mathbf {x} _ {i}) \right. \tag {8} \\ \left. + \sum_ {t = 1} ^ {T} \left[ \mathcal {L} _ {\text {E x c i t a t i o n}} (\phi , t) - \mathcal {L} _ {\text {I n h i b i t i o n}} (\phi , t) \right] \right\}. \\ \end{array} +$$ + +Notice in Eq. (8) the minus sign in front of the term $\mathcal{L}_{Inhibition}(\phi, t)$ for maximization which is an adversarial term to make $\mathbf{z}_t^{rst}$ as uninformative to attribute $t$ as possible, by pushing the best possible classifier $C_t$ to be the least discriminative. The formulation of Eq. (8) bears certain similarity to that in domain-adversarial neural networks [15] in which the label classification is minimized with the domain classifier being adversarily maximized. Here, however, we respectively encourage and discourage different parts of the features to make the same type of classification. + +# 4. Experiments + +In this section, we first present qualitative and quantitative results demonstrating our proposed unsupervised Guided-VAE (Figure 1a) capable of disentangling latent + +embedding more favorably than previous disentangle methods [20, 12, 28] on MNIST dataset [35] and 2D shape dataset [42]. We also show that our learned latent representation improves classification performance in a representation learning setting. Next, we extend this idea to a supervised guidance approach in an adversarial excitation and inhibition fashion, where a discriminative objective for certain image properties is given (Figure 1b) on the CelebA dataset [39]. Further, we show that our method is architecture agnostic, applicable in a variety of scenarios such as image interpolation task on CIFAR 10 dataset [31] and a few-shot classification task on Omniglot dataset [33]. + +# 4.1. Unsupervised Guided-VAE + +# 4.1.1 Qualitative evaluation + +We present qualitative results on the MNIST dataset first by traversing latent variables received affine transformation guiding signal in Figure 2. Here, we applied the GuidedVAE with the bottleneck size of 10 (i.e. the latent variables $\mathbf{z} \in \mathbb{R}^{10}$ ). The first latent variable $z_{1}$ represents the rotation information, and the second latent variable $z_{2}$ represents the scaling information. The rest of the latent variables $\mathbf{z}_{3:10}$ represent the content information. Thus, we present the latent variables as $\mathbf{z} = (\mathbf{z}_{\text{def}}, \mathbf{z}_{\text{cont}}) = (\mathbf{z}_{1:2}, \mathbf{z}_{3:10})$ . + +We compare traversal results of all latent variables on MNIST dataset for vanilla VAE [29], $\beta$ -VAE [20], JointVAE [12] and our Guided-VAE ( $\beta$ -VAE, JointVAE results are adopted from [12]). While $\beta$ -VAE cannot generate meaningful disentangled representations for this dataset, even with controlled capacity increased, JointVAE can disentangle class type from continuous factors. Our GuidedVAE disentangles geometry properties rotation angle at $z_{1}$ and stroke thickness at $z_{2}$ from the rest content information $\mathbf{z}_{3:10}$ . + +To assess the disentangling ability of Guided-VAE against various baselines, we create a synthetic 2D shape dataset following [42, 20] as a common way to measure the disentanglement properties of unsupervised disentangling methods. The dataset consists 737,280 images of 2D + +![](images/2c159783b3375f9e0786c07eca4f9ac12af51cb5f5a76ea69e973e693fb3ca5e.jpg) + +![](images/a814628c5e52ccf9ed869e6e16a69e09157748db41c7964b9e81a75b80814d0f.jpg) + +![](images/d846969877c85e6538eec661ab3c37751e5bc2877e498e73f5db7c4a35e7669c.jpg) +Figure 3. Comparison of qualitative results on 2D shape. First row: originals. Second row: reconstructions. Remaining rows: reconstructions of latent traversals across each latent dimension. In our results, $z_{1}$ represents the $x$ -position information, $z_{2}$ represents the $y$ -position information, $z_{3}$ represents the scale information and $z_{4}$ represents the rotation information. + +![](images/2b7c5f8c1ef083476d16acde52708edc8c0c718480b03bbcec28581722b4d24c.jpg) + +shapes (heart, oval and square) generated from four ground truth independent latent factors: $x$ -position information (32 values), $y$ -position information (32 values), scale (6 values) and rotation (40 values). This gives us the ability to compare the disentangling performance of different methods with given ground truth factors. We present the latent space traversal results in Figure 3, where the results of $\beta$ -VAE and FactorVAE are taken from [28]. Our Guided-VAE learns the four geometry factors with the first four latent variables where the latent variables $\mathbf{z} \in \mathbb{R}^6 = (\mathbf{z}_{\text{def}}, \mathbf{z}_{\text{cont}}) = (\mathbf{z}_{1:4}, \mathbf{z}_{5:6})$ . We observe that although all models are able to capture basic geometry factors, the traversal results from Guided-VAE are more obvious with fewer factors changing except the target one. + +# 4.1.2 Quantitative evaluation + +We perform two quantitative experiments with strong baselines for disentanglement and representation learning in Table 1 and 2. We observe significant improvement over existing methods in terms of disentanglement measured by Z-Diff score [20], SAP score [32], Factor score [28] in Table 1, and representation transferability based on classification error in Table 2. + +All models are trained in the same setting as the experiment shown in Figure 3, and are assessed by three disentangle metrics shown in Table 1. An improvement in the Z-Diff score and Factor score represents a lower variance of the inferred latent variable for fixed generative factors, whereas our increased SAP score corresponds with a tighter + +![](images/80d60e03296fcd27bb31f47fa9119ff588ecdab166ccd9b851cfce6a7a508c6d.jpg) +Figure 4. Comparison of Traversal Result learned on CelebA: Column 1 shows traversed images from male to female. Column 2 shows traversed images from smiling to no-smiling. The first row is from [20] and we follow its figure generation procedure. + +
Model (dz=6)Z-Diff ↑SAP ↑Factor ↑
VAE [29]78.20.16960.4074
β-VAE (β=2)[20]98.10.17720.5786
FACTORVAE (γ=5) [28]92.40.17700.6134
FACTORVAE (γ=35) [28]98.40.27170.7100
β-TCVAE (α=1,β=5,γ=1) [8]96.80.42870.6968
GUIDED-VAE (OURS)99.20.43200.6660
GUIDED-β-TCVAE (OURS)96.30.44770.7294
+ +Table 1. Disentanglement: Z-Diff score, SAP score, and Factor score over unsupervised disentanglement methods on 2D Shapes dataset. [↑ means higher is better] + +
Modeldz=16↓dz=32↓dz=64↓
VAE [29]2.92%±0.123.05%±0.422.98%±0.14
β-VAE(β=2)[20]4.69%±0.185.26%±0.225.40%±0.33
FACTORVAE(γ=5) [28]6.07%±0.056.18%±0.206.35%±0.48
β-TCVAE (α=1,β=5,γ=1) [8]1.62%±0.071.24%±0.051.32%±0.09
GUIDED-VAE (OURS)1.85%±0.081.60%±0.081.49%±0.06
GUIDED-β-TCVAE (OURS)1.47%±0.121.10%±0.031.31%±0.06
+ +Table 2. Representation Learning: Classification error over unsupervised disentanglement methods on MNIST. [↓ means lower is better]† The 95 % confidence intervals from 5 trials are reported. + +coupling between a single latent dimension and a generative factor. Compare to previous methods, our method is orthogonal (due to using a side objective) to most existing approaches. $\beta$ -TCVAE [8] improves $\beta$ -VAE [20] based on weighted mini-batches to stochastic training. Our Guided- $\beta$ -TCVAE further improves the results in all three disentangle metrics. + +We further study representation transferability by performing classification tasks on the latent embedding of different generative models. Specifically, for each data point $(\mathbf{x},y)$ , we use the pre-trained generative models to obtain the value of latent variable $\mathbf{z}$ given input image $\mathbf{x}$ . Here $\mathbf{z}$ is a $d_{\mathbf{z}}$ -dim vector. We then train a linear classifier $f(\cdot)$ on the embedding-label pairs $\{(\mathbf{z},y)\}$ to predict the class of digits. For the Guided-VAE, we disentangle the latent variables $\mathbf{z}$ into deformation variables $\mathbf{z}_{def}$ and content variables $\mathbf{z}_{cont}$ + +![](images/9dd8d80e501352c266f1a01982622e1df04e0133adbf86153b5e68aa8fbb96d6.jpg) + +![](images/4a1fc531e933f2ff10c6444251ec0766181a1636e0edacdd80f2439a19bba5ef.jpg) + +![](images/2ebdb430ac1e1c2b91cd7aa5c599b1cfb700e5bb69b8f2a79853f20bb2737781.jpg) + +![](images/18c4ad571547062f95a1b05624fa89d66a1caac0b6b6a3406e06401aeb800bb0.jpg) +(a) Bald +(d) Mouth Slightly Open + +![](images/f258ac37faa6f90322c01986e64b8d832e280b8e0b33d6d3d17bd1ab578b76a1.jpg) +(b) Bangs +(e) Receding Hairlines +Figure 5. Latent factors learned by Guided-VAE on CelebA: Each image shows the traversal results of Guided-VAE on a single latent variable which is controlled by the lightweight decoder using the corresponding labels as signal. + +![](images/9587ed89e9c2b001f960ab4aa37ead43f17f4db192f693443eb26271700b31cb.jpg) +(c) Black Hair +(f) Young + +with same dimensions (i.e. $d_{\mathbf{z}_{def}} = d_{\mathbf{z}_{cont}}$ ). We compare the classification errors of different models with multiple choices of dimensions of the latent variables in Table 2. In general, VAE [29], $\beta$ -VAE [20], and FactorVAE [28] do not benefit from the increase of the latent dimensions, and $\beta$ -TCVAE [8] shows evidence that its discovered representation is more useful for classification task than existing methods. Our Guide-VAE achieves competitive results compared to $\beta$ -TCVAE, and our Guided- $\beta$ -TCVAE can further reduce the classification error to $1.1\%$ when $d_{\mathbf{z}} = 32$ , which is $1.95\%$ lower than the baseline VAE. + +Moreover, we study the effectiveness of $\mathbf{z}_{def}$ and $\mathbf{z}_{cont}$ in Guided-VAE separately to reveal the different properties of the latent subspace. We follow the same classification task procedures described above but use different subsets of latent variables as input features for the classifier $f(\cdot)$ . Specifically, we compare results based on the deformation variables $\mathbf{z}_{def}$ , the content variables $\mathbf{z}_{cont}$ , and the whole latent variables $\mathbf{z}$ as the input feature vector. To conduct a fair comparison, we still keep the same dimensions for the deformation variables $\mathbf{z}_{def}$ and the content variables $\mathbf{z}_{cont}$ . Table 3 shows that the classification errors on $\mathbf{z}_{cont}$ are significantly lower than the ones on $\mathbf{z}_{def}$ , which indicates the success of disentanglement as the content variables should determine the class of digits. In contrast, the deformation variables should be invariant to the class. Besides, when the dimensions of latent variables $\mathbf{z}$ are higher, the classification errors on $\mathbf{z}_{def}$ increase while the ones on $\mathbf{z}_{cont}$ decrease, indicating a better disentanglement between deformation and content with increased latent dimensions. + +
Modeld_zdefd_zcontd_zz_def Error↑z_cont Error↓z_Error↓
GUIDED-VAE881627.1%3.69%2.17%
16163242.07%1.79%1.51%
32326462.94%1.55%1.42%
+ +Table 3. Classification on MNIST using different latent variables as features: Classification error over Guided-VAE with different dimensions of latent variables [↑ means higher is better, ↓ means lower is better] + +# 4.2. Supervised Guided-VAE + +# 4.2.1 Qualitative evaluation + +We first present qualitative results on the CelebA dataset [39] by traversing latent variables of attributes shown in Figure 4 and Figure 5. In Figure 4, we compare the traversal results of Guided-VAE with $\beta$ -VAE for two labeled attributes (gender, smile) in the CelebA dataset. The bottleneck size is set to $16(d_{\mathbf{z}} = 16)$ . We use the first two latent variables $z_{1}, z_{2}$ to represent the attribute information, and the rest $\mathbf{z}_{3:16}$ to represent the content information. During evaluation, we choose $z_{t} \in \{z_{1}, z_{2}\}$ while keeping the remaining latent variables $\mathbf{z}_t^{rst}$ fixed. Then we obtain a set of images through traversing $t$ -th attribute (e.g., smiling to non-smiling) and compare them over $\beta$ -VAE. In Figure 5, we present traversing results on another six attributes. + +$\beta$ -VAE performs decently for the controlled attribute change, but the individual $\mathbf{z}$ in $\beta$ -VAE is not fully entangled or disentangled with the attribute. We observe the traversed images contain several attribute changes at the same time. Different from our Guided-VAE, $\beta$ -VAE cannot specify which latent variables to encode specific attribute information. Guided-VAE, however, is designed to allow defined + +latent variables to encode any specific attributes. Guided-VAE outperforms $\beta$ -VAE by only traversing the intended factors (smile, gender) without changing other factors (hair color, baldness). + +# 4.2.2 Quantitative evaluation + +We attempt to interpret whether the disentangled attribute variables can control the generated images from the supervised Guided-VAE. We pre-train an external binary classifier for $t$ -th attribute on the CelebA training set and then use this classifier to test the generated images from Guided-VAE. Each test includes 10,000 generated images randomly sampled on all latent variables except for the particular latent variable $z_{t}$ we decide to control. As Figure 6 shows, we can draw the confidence- $z$ curves of the $t$ -th attribute where $z = z_{t} \in [-3.0, 3.0]$ with 0.1 as the stride length. For the gender and the smile attributes, it can be seen that the corresponding $z_{t}$ is able to enable $(z_{t} < -1)$ and disable $(z_{t} > 1)$ the attribute of the generated image, which shows the controlling ability of the $t$ -th attribute by tuning the corresponding latent variable $z_{t}$ . + +![](images/0f108c7626324d111b3099e82ecb9d2f1afd2729a3e87b9df61b4efb25643fc8.jpg) +Figure 6. Experts (high-performance external classifiers for attribute classification) prediction for being negatives on the generated images. We traverse $z_{1}$ (gender) and $z_{2}$ (smile) separately to generate images for the classification test. + +# 4.2.3 Image Interpolation + +We further show the disentanglement properties of using supervised Guided-VAE on the CIFAR10 dataset. ALI-VAE borrows the architecture that is defined in [11], where we treat $G_{z}$ as the encoder and $G_{x}$ as the decoder. This enables us to optimize an additional reconstruction loss. Based on ALI-VAE, we implement Guided-ALI-VAE (Ours), which adds supervised guidance through excitation and inhibition shown in Figure 1. ALI-VAE and AC-GAN [3] serve as a baseline for this experiment. + +To analyze the disentanglement of the latent space, we train each of these models on a subset of the CIFAR10 dataset [31] (Automobile, Truck, Horses) where the class label corresponds to the attribute to be controlled. We use a bottleneck size of 10 for each of these models. We follow the training procedure mentioned in [3] for training the AC-GAN model and the optimization parameters reported in [11] for ALI-VAE and our model. For our Guided-ALI + +
ModelAutomobile-Horse ↓Truck-Automobile ↓
AC-GAN [3]88.2781.13
ALI-VAE†91.9678.92
GUIDED-ALI-VAE (OURS)85.4372.31
+ +Table 4. Image Interpolation: FID score measured for a subset of CIFAR10 [31] with two classes each. $[\downarrow$ means lower is better] $^\dagger$ ALI-VAE is a modification of the architecture defined in [11] + +![](images/cbfd084606b9aea2b4f8a416f557a53686c5dcea0967c6171f4ba3deac52d53b.jpg) +Figure 7. Interpolation of images in $z$ , $z_{1:3}$ and $z_{1:3}^{rst}$ for AC-GAN, ALI-VAE and Guided-ALI-VAE (Ours). + +VAE model, we add supervision through inhibition and excitation on $z_{1:3}$ . + +To visualize the disentanglement in our model, we interpolate the corresponding $z$ , $z_{t}$ and $z_{t}^{rst}$ of two images sampled from different classes. The interpolation here is computed as a uniformly spaced linear combination of the corresponding vectors. The results in Figure 7 qualitatively show that our model is successfully able to capture complementary features in $z_{1:3}$ and $z_{1:3}^{rst}$ . Interpolation in $z_{1:3}$ corresponds to changing the object type. Whereas, the interpolation in $z_{1:3}^{rst}$ corresponds to complementary features such as color and pose of the object. + +The right column in Figure 7 shows that our model can traverse in $z_{1:3}$ to change the object in the image from an automobile to a truck. Whereas a traversal in $z_{1:3}^{rst}$ changes other features such as background and the orientation of the automobile. We replicate the procedure on ALI-VAE and AC-GAN and show that these models are not able to consistently traverse in $z_{1:3}$ and $z_{1:3}^{rst}$ in a similar manner. Our model also produces interpolated images in higher quality as shown through the FID scores [19] in Table 4. + +# 4.3. Few-Shot Learning + +Previously, we have shown that Guided-VAE can perform images synthesis and interpolation and form better representation for the classification task. Similarly, we can apply our supervised method to VAE-like models in the few-shot classification. Specifically, we apply our adversarial excitation and inhibition formulation to the Neural Statistician [13] by adding a supervised guidance network after the statistic network. The supervised guidance sig + +nal is the label of each input. We also apply the Mixup method [54] in the supervised guidance network. However, we could not reproduce exact reported results in the Neural Statistician, which is also indicated in [30]. For comparison, we mainly consider results from Matching Nets [51] and Bruno [30] shown in Table 5. Yet it cannot outperform Matching Nets, our proposed Guided Neural Statistician reaches comparable performance as Bruno (discriminative), where a discriminative objective is fine-tuned to maximize the likelihood of correct labels. + +
Model5-way20-way
Omniglot1-shot5-shot1-shot5-shot
PIXELS [51]41.7%63.2%26.7%42.6%
BASELINE CLASSIFIER [51]80.0%95.0%69.5%89.1%
MATCHING NETS [51]98.1%98.9%93.8%98.5%
BRUNO [30]86.3%95.6%69.2%87.7%
BRUNO (DISCRIMINATIVE) [30]97.1%99.4%91.3%97.8%
BASELINE97.7%99.4%91.4%96.4%
OURS (DISCRIMINATIVE)97.8%99.4%92.1%96.6%
+ +Table 5. Few-shot classification: Classification accuracy for a few-shot learning task on the Omniglot dataset. + +# 5. Ablation Study + +# 5.1. Deformable PCA + +In Figure 8, we visualize the sampling results from PCA and $Dec_{sub}$ . By applying a deformation layer into the PCA-like layer, we show deformable PCA has a more crispy sampling result than vanilla PCA. + +![](images/32a96ad37ad606d47427431ad0e38687e6fbba7a5b5b9bb45e4ceac6eb14d6ec.jpg) +Figure 8. (Top) Sampling Result Obtained from PCA (Bottom) Sampling Result obtained from learned deformable PCA (Ours) + +# 5.2. Guided Autoencoder + +To further validate our concept of "guidance", we introduce our lightweight decoder to the standard autoencoder (AE) framework. We conduct MNIST classification tasks using the same setting in Figure 2. As Table 6 shows, our lightweight decoder improves the representation learned in autoencoder framework. Yet a VAE-like structure is indeed not needed if the purpose is just reconstruction and representation learning. However, VAE is of great importance in building generative models. The modeling of the latent space of $\mathbf{z}$ with e.g., Gaussian distributions is again important if a probabilistic model is needed to perform novel data synthesis (e.g., the images shown in Figure 4 and Figure 5). + +
Modeldz=16↓dz=32↓dz=64↓
AUTO-ENCODER (AE)1.37%±0.051.06%±0.041.34%±0.04
GUIDED-AE (OURS)1.46%±0.061.00%±0.061.10%±0.08
Table 6. Classification error over AE and Guided-AE on MNIST.
+ +# 5.3. Geometric Transformations + +We conduct an experiment by excluding the geometry-guided part from the unsupervised Guided-VAE. In this way, the lightweight decoder is just a PCA-like decoder but not a deformable PCA. The setting of this experiment is exactly the same as described in Figure 2. The bottleneck size of our model is set to 10 of which the first two latent variables $z_{1}, z_{2}$ represent the rotation and scaling information separately. As a comparison, we drop off the geometric guidance so that all 10 latent variables are controlled by the PCA-like light decoder. As shown in Figure 9 (a) (b), it can be easily seen that geometry information is hardly encoded into the first two latent variables without a geometry-guided part. + +![](images/1ddf6cea6d5b5c74c91b4a1eba3984fd3ae30d431e035d8e5cf6426b30eb2020.jpg) +(a) Unsupervised Guided-VAE without Geometric Guidance + +![](images/1845197eb1c15e4dbba440e9688567c9d17b9d320246f0a2457d291d036e6440.jpg) +(c) Supervised Guided-VAE without Inhibition + +![](images/41702197fab491e8023a7c0cb63b4206de6268de7344bb65bfebe7db0d1badca.jpg) +(b) Unsupervised Guided-VAE with Geometric Guidance + +![](images/7186a63bd8bcc851b0a324ab9397ff7dcd297f80b97732b796fd4d99b8f98fda.jpg) +(d) Supervised Guided-VAE with Inhibition +Figure 9. Ablation study on Unsupervised Guided-VAE and Supervised Guided-VAE + +# 5.4. Adversarial Excitation and Inhibition + +We study the effectiveness of adversarial inhibition using the exact same setting described in the supervised Guided-VAE part. As shown in Figure 9 (c) and (d), Guided-VAE without inhibition changes the smiling and sunglasses while traversing the latent variable controlling the gender information. This problem is alleviated by introducing the excitation-inhibition mechanism into Guided-VAE. + +# 6. Conclusion + +In this paper, we have presented a new representation learning method, guided variational autoencoder (Guided-VAE), for disentanglement learning. Both unsupervised and supervised versions of Guided-VAE utilize lightweight guidance to the latent variables to achieve better controllability and transparency. Improvements in disentanglement, image traversal, and meta-learning over the competing methods are observed. Guided-VAE maintains the backbone of VAE and it can be applied to other generative modeling applications. + +Acknowledgment. This work is funded by NSF IIS-1618477, NSF IIS-1717431, and Qualcomm Inc. ZD is supported by the Tsinghua Academic Fund for Undergraduate Overseas Studies. We thank Kwonjoon Lee, Justin Lazarow, and Jilei Hou for valuable feedbacks. + +# References + +[1] Alessandro Achille and Stefano Soatto. Emergence of invariance and disentanglement in deep representations. The Journal of Machine Learning Research, 19(1):1947-1980, 2018. 2 +[2] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In ICML, 2017. 2 +[3] Jonathon Shlens Augustus Odena, Christopher Olah. Conditional image synthesis with auxiliary classifier gans. In ICML, 2017. 7 +[4] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural computation, 15(6):1373-1396, 2003. 1 +[5] Piotr Bojanowski, Armand Joulin, David Lopez-Paz, and Arthur Szlam. Optimizing the latent space of generative networks. In ICML, 2018. 2 +[6] Hervé Bourlard and Yves Kamp. Auto-association by multilayer perceptrons and singular value decomposition. Biological cybernetics, 59(4-5):291-294, 1988. 1 +[7] Emmanuel J Candès, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM (JACM), 58(3):11, 2011. 2, 3 +[8] Tian Qi Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. Isolating sources of disentanglement in variational autoencoders. In Advances in Neural Information Processing Systems, 2018. 2, 5, 6 +[9] Elliot Creager, David Madras, Joern-Henrik Jacobsen, Marissa Weis, Kevin Swersky, Toniann Pitassi, and Richard Zemel. Flexibly fair representation learning by disentangle-ment. In ICML, 2019. 2 +[10] Bin Dai, Yu Wang, John Aston, Gang Hua, and David Wipf. Connections with robust PCA and the role of emergent sparsity in variational autoencoder models. The Journal of Machine Learning Research, 19(1):1573-1614, 2018. 2 +[11] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Olivier Mastropietro, Alex Lamb, Martin Arjovsky, and Aaron Courville. Adversarily learned inference. In ICLR, 2017. +[12] Emilien Dupont. Learning disentangled joint continuous and discrete representations. In Advances in Neural Information Processing Systems, 2018. 4 +[13] Harrison Edwards and Amos Storkey. Towards a neural statistician. In ICLR, 2017. 7 +[14] Jesse Engel, Matthew Hoffman, and Adam Roberts. Latent constraints: Learning to generate conditionally from unconditional generative models. In ICLR, 2018. 2 +[15] 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. 2, 4 +[16] Abel Gonzalez-Garcia, Joost van de Weijer, and Yoshua Bengio. Image-to-image translation for cross-domain disentanglement. In Advances in Neural Information Processing Systems, 2018. 2 + +[17] Ian Goodfellow, *Yoshua Bengio*, and Aaron Courville. *Deep learning*, volume 1. MIT Press, 2016. 1 +[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 systems, 2014. 1, 2 +[19] 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, 2017. 7 +[20] 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. 2, 4, 5, 6 +[21] Geoffrey E Hinton and Richard S Zemel. Autoencoders, minimum description length and helmholtz free energy. In Advances in neural information processing systems, 1994. 1 +[22] Harold Hotelling. Analysis of a complex of statistical variables into principal components. Journal of educational psychology, 24, 1933. 1, 2 +[23] Qiyang Hu, Attila Szabó, Tiziano Portenier, Paolo Favaro, and Matthias Zwicker. Disentangling factors of variation by mixing them. In CVPR, 2018. 2 +[24] Maximilian Ilse, Jakub M Tomczak, Christos Louizos, and Max Welling. Diva: Domain invariant variational autoencoders. In ICLR Workshop Track, 2019. 2 +[25] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in neural information processing systems, 2015. 3 +[26] Ananya Harsh Jha, Saket Anand, Maneesh Singh, and VSR Veeravasarapu. Disentangling factors of variation with cycle-consistent variational auto-encoders. In ECCV, 2018. 2 +[27] Ian Jolliffe. Principal component analysis. Springer Berlin Heidelberg, 2011. 1, 2 +[28] Hyunjik Kim and Andriy Mnih. Disentangling by factorising. In ICML, 2018. 2, 4, 5, 6 +[29] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In ICLR, 2014. 1, 2, 3, 4, 5, 6 +[30] Iryna Korshunova, Jonas Degrave, Ferenc Huszár, Yarin Gal, Arthur Gretton, and Joni Dambre. Bruno: A deep recurrent model for exchangeable data. In Advances in Neural Information Processing Systems, 2018. 8 +[31] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 4, 7 +[32] Abhishek Kumar, Prasanna Sattigeri, and Avinash Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. In ICLR, 2018. 5 +[33] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332-1338, 2015. 4 +[34] Yann LeCun. Modeles connexionnistes de lapprentissage. PhD thesis, PhD thesis, These de Doctorat, Universite Paris 6, 1987. 1 + +[35] Yann LeCun. The mnist database of handwritten digits. http://yann.lecun.com/exdb/mnist/, 1998. 4 +[36] 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 +[37] Jianxin Lin, Zhibo Chen, Yingce Xia, Sen Liu, Tao Qin, and Jiebo Luo. Exploring explicit domain supervision for latent space disentanglement in unpaired image-to-image translation. IEEE transactions on pattern analysis and machine intelligence, 2019. 2 +[38] Yen-Cheng Liu, Yu-Ying Yeh, Tzu-Chien Fu, Sheng-De Wang, Wei-Chen Chiu, and Yu-Chiang Frank Wang. Detach and adapt: Learning cross-domain disentangled deep representation. In CVPR, 2018. 2 +[39] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, 2015. 4, 6 +[40] Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. In ICLR Workshop Track, 2016. 2 +[41] 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, 2016. 2 +[42] Loic Matthew, Irina Higgins, Demis Hassabis, and Alexander Lerchner. dsprites: Disentanglement testing sprites dataset. https://github.com/deepmind/dSprites-dataset/, 2017. 4 +[43] Brendan K Murphy and Kenneth D Miller. Multiplicative gain changes are induced by excitation or inhibition alone. Journal of Neuroscience, 23(31):10040-10051, 2003. 2 +[44] Xi Peng, Xiang Yu, Kihyuk Sohn, Dimitris N Metaxas, and Manmohan Chandraker. Reconstruction-based disentangle-ment for pose-invariant face recognition. In ICCV, 2017. 2 +[45] Yigang Peng, Arvind Ganesh, John Wright, Wenli Xu, and Yi Ma. Rasl: Robust alignment by sparse and low-rank decomposition for linearly correlated images. IEEE transactions on pattern analysis and machine intelligence, 34(11):2233-2246, 2012. 2 +[46] Christopher Poultney, Sumit Chopra, Yann LeCun, et al. Efficient learning of sparse representations with an energy-based model. In Advances in neural information processing systems, 2007. 1 +[47] Jiaming Song, Pratyusha Kalluri, Aditya Grover, Shengjia Zhao, and Stefano Ermon. Learning controllable fair representations. In The 22nd International Conference on Artificial Intelligence and Statistics, 2019. 2 +[48] Attila Szabó, Qiyang Hu, Tiziano Portenier, Matthias Zwicker, and Paolo Favaro. Challenges in disentangling independent factors of variation. In ICLR Workshop Track, 2018. 2 +[49] Michael E Tipping and Christopher M Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 61(3):611-622, 1999. 3 +[50] Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising + +autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of machine learning research, 11(Dec):3371-3408, 2010. 1 +[51] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, 2016. 8 +[52] Michael P Wellman and Max Henrion. 'Explaining' explaining away'. IEEE Transactions on Pattern Analysis and Machine Intelligence, 15(3):287-292, 1993. 2 +[53] Ofer Yizhar, Lief E Fenno, Matthias Prigge, Franziska Schneider, Thomas J Davidson, Daniel J O'shea, Vikaas S Sohal, Inbal Goshen, Joel Finkelstein, Jeanne T Paz, et al. Neocortical excitation/inhibition balance in information processing and social dysfunction. Nature, 477(7363):171, 2011. 2 +[54] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018. 8 \ No newline at end of file diff --git a/guidedvariationalautoencoderfordisentanglementlearning/images.zip b/guidedvariationalautoencoderfordisentanglementlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b60e56b25d5cec0b7db20354bca2942c763a83e3 --- /dev/null +++ b/guidedvariationalautoencoderfordisentanglementlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f3eb766623d3a3f89b6be8c860b5c67773333b328527af180724113caaaf5f6 +size 711012 diff --git a/guidedvariationalautoencoderfordisentanglementlearning/layout.json b/guidedvariationalautoencoderfordisentanglementlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5ac267145a53ae6f0ba807b754555fb20813d0b3 --- /dev/null +++ b/guidedvariationalautoencoderfordisentanglementlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a94f691aaee0a8f80162532501e3d52f73d516101bbfaf42e6e1540004abbb9 +size 496860 diff --git a/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_content_list.json b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b5c1e91d18b4ac4525616ffc2cb48699ad43762c --- /dev/null +++ b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8a518e69554e47572887b78948649f96eb72969017ab264018b52b480f11f21 +size 93907 diff --git a/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_model.json b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dcbf942e957154ca42cbfe8cceb929edb704a59b --- /dev/null +++ b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bef17052444185f0246eaeb7bfde010b60288a9ac6824dabcd0c8f33002fc9b +size 122045 diff --git a/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_origin.pdf b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..63030657661875745f4ca5056e474d0a17dc1e15 --- /dev/null +++ b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/bdb0e9fe-8afb-4446-b107-317cfd01be90_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36fd2c4919843b18299c2d088266917dabd4db5b1f4575d16b6fed8823805cb6 +size 3690903 diff --git a/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/full.md b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/full.md new file mode 100644 index 0000000000000000000000000000000000000000..12b5cd33265bca146fd65a1b550c37aae18a9634 --- /dev/null +++ b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/full.md @@ -0,0 +1,352 @@ +# Gum-Net: Unsupervised Geometric Matching for Fast and Accurate 3D Subtomogram Image Alignment and Averaging + +Xiangrui Zeng Min $\mathbf{X}\mathbf{u}^{*}$ + +Computational Biology Department + +Carnegie Mellon University + +Pittsburgh, PA 15213, USA. + +xiangruz@andrew.cmu.edu mxul@cs.cmu.edu + +# Abstract + +We propose a Geometric unsupervised matching Network (Gum-Net) for finding the geometric correspondence between two images with application to 3D subtomogram alignment and averaging. Subtomogram alignment is the most important task in cryo-electron tomography (cryo-ET), a revolutionary 3D imaging technique for visualizing the molecular organization of unperturbed cellular landscapes in single cells. However, subtomogram alignment and averaging are very challenging due to severe imaging limits such as noise and missing wedge effects. We introduce an end-to-end trainable architecture with three novel modules specifically designed for preserving feature spatial information and propagating feature matching information. The training is performed in a fully unsupervised fashion to optimize a matching metric. No ground truth transformation information nor category-level or instance-level matching supervision information is needed. After systematic assessments on six real and nine simulated datasets, we demonstrate that Gum-Net reduced the alignment error by 40 to $50\%$ and improved the averaging resolution by $10\%$ . Gum-Net also achieved 70 to 110 times speedup in practice with GPU acceleration compared to state-of-the-art subtomogram alignment methods. Our work is the first 3D unsupervised geometric matching method for images of strong transformation variation and high noise level. The training code, trained model, and datasets are available in our open-source software AITom1. + +# 1. Introduction + +Given a transformation model, geometric matching aims to estimate the geometric correspondence between related images. In two and three dimensions, geometric matching is + +widely applied to fields such as pattern recognition [48, 74], 3D image reconstruction [35, 29], medical image alignment and registration [19, 27], and computational chemistry [86]. Finding the global optimal parameters consistent with a geometric transformation model such as affine or rigid transformation has a fundamental bottleneck. The parametric space needs to be exhaustively searched but the computational cost is infeasible [36]. Many popular methods have been proposed that alleviate the computational cost by detecting and matching hand-crafted local features [50, 15, 73] to estimate the global geometric transformation robustly [23, 67, 47, 51]. + +Recently, end-to-end trainable image alignment attracts attention. There are two major advantages over traditional non-trainable methods: (1) a properly trained convolutional neural network (CNN) model can process a large amount of data in a significantly shorter time and (2) with increasing amount of data collected, the deep learning model performance can be improved progressively by better feature learning [60]. + +In this paper, we focus on an important geometric matching application field, cryo-electron tomography (cryo-ET). In recent years, cryo-ET emerges as a revolutionary in situ 3D structural biology imaging technique for studying macromolecular complexes in single cells, the nano-machines that govern cellular biological processes [44]. Cryo-ET captures the 3D native structure and spatial distribution of all macromolecular complexes together with other subcellular components without disrupting the cell [11]. Nevertheless, cryo-ET data is heavily affected by a low signal-to-noise ratio (SNR) (example input data and mathematical definition in Supplementary Section S3) due to the complex cytoplasm environment and missing wedge effects2. Therefore, the macromolecular structures in the 3D tomogram need to be detected and recovered for further biomedical interpretation. + +A subtomogram from a tomogram is a small cubic sub + +![](images/4074b6a5885eefb9622527a7b85c53b6d50574c27576e2dfb6e6a0427a9bc9df.jpg) +Figure 1. Gum-Net model pipeline. The model is unsupervised and feed-forward. The model inputs two subtomograms $s_a$ and $s_b$ (underlying structures are shown in isosurface representation) and outputs the transformed subtomogram $\hat{s}_b$ to geometrically match $s_a$ , in addition to the transformation model parameters $\phi^{\mathrm{tr}}$ and $\phi^{\mathrm{rot}}$ . The dash-line denotes that the parameters are shared between the two feature extractors. + +volume generally containing one macromolecular complex. Subtomogram alignment is the most critical cryo-ET data processing technique for two reasons: first, high-resolution macromolecular structures can be recovered through subtomogram averaging based on alignment. Second, the spatial distribution of a certain structure can be detected through alignment. To recover the structure, subtomograms containing the same macromolecular structure but in different poses must be iteratively aligned and averaged. Subtomogram averaging improves resolution by reducing noise and missing wedge artifacts [83]. Subtomogram alignment is a considerably more challenging geometric matching task than related tasks such as 3D deformable medical image registration from two aspects: first, there is strong transformation variation because the structure inside a subtomogram is of completely random orientation and displacement. Second, medical images are relatively clean tissue images whereas subtomograms are cellular images with a low SNR (around 0.01 to 0.1) due to the complex cytoplasm environment and the low electron dose used for imaging [16] (example input data in Supplementary Section S3). + +Given the 3D rigid transformation model, subtomogram alignment computes the six parameters (three rotational and three translational). We and others have proposed methods [87, 13] to approximate the constrained correlation objective function [25] as heuristics to limit the computational time to a feasible range. However, it is possible nowadays to collect a set of tomograms in several days containing millions of subtomograms [5]. Existing state-of-the-art subtomogram alignment methods [87, 13] generally align a pair of subtomograms on the scale of several seconds, which is too slow for processing such a large amount of data. Moreover, their accuracy is limited because they are approximation methods. + +We propose Gum-Net (Geometric unsupervised matching Network), a deep architecture for 3D subtomogram alignment and averaging through unsupervised rigid geometric matching. Integrating three novel modules, Gum-Net inputs + +two subtomograms to estimate the transformation parameters by extracting and matching convolutional features. Gum-Net achieved significant improvement in efficiency (70 to 110 times speedup) and accuracy (40 to $50\%$ reduction in alignment error) over two state-of-the-art subtomogram alignment methods [87, 13]. The improvements from proposed modules were demonstrated in three ablation studies. + +Main contributions. Our work is the first 3D unsupervised geometric matching method for images of strong transformation variation and high noise level. We integrated three novel modules (Figure 1): (1) we observe that as the max pooling and averaging pooling operations in the standard deep feature extraction process seek to achieve local transformation invariance, it is not suitable for accurate geometric matching, because the feature spatial locations need to be preserved to a large extent during feature extraction. Therefore, we introduce a feature extraction module with spectral operations including pooling and filtering to preserve the spatial location of extracted features. (2) We propose a novel Siamese matching module that improves spatial correlation information propagation by processing two feature correlation maps in parallel. (3) We incorporate a modified spatial transformer network [37] with a differentiable missing wedge imputation strategy into the alignment module. We achieved fully unsupervised training by feeding into random pairs of subtomograms regardless of their structural class information. Therefore, in contrast to other weakly-supervised geometric matching methods [71, 70, 42, 80, 58], no supervision such as instance-level or category-level matching information is needed. + +# 2. Related Work + +# 2.1. 2D image alignment based on CNN + +2D image alignment usually consists of two steps: (1) obtaining image feature descriptors and (2) matching feature descriptors according to a geometric model. Recently, some + +methods have employed pre-trained [81] or trainable [41, 63] CNN-based feature extractors. Specifically, [22] proposed a hierarchical metric learning strategy to learn better feature descriptors for geometric matching. However, all the networks are combined with traditional matching methods. + +In 2017, Rocco et al. proposed the first end-to-end convolutional neural network for geometric matching of 2D images [69]. This fully supervised model utilizes a pre-trained network [77] to extract features from the two images to be matched. Then a correlation layer matches the features followed by a network to regress to the known transformation parameters for supervised training. Later, they extended this model to be weakly-supervised for finding category-level [70] and instance-level correspondence [71]. Other weakly supervised methods have been proposed for similar tasks including semantic attribute matching [42], simultaneous alignment and segmentation [80], and alignment under large intra-class variations [58]. However, they still require additional training supervision such as matching image pairs on the instance level or category level. + +# 2.2. Unsupervised optical flow estimation + +Optical flow estimation describes the small displacements of pixels in a sequence of 2D images using a dense or sparse vector field. Early unsupervised methods have used the gated restricted Boltzmann machine to learn image transformations [56, 57]. Recent CNN-based methods applied techniques such as frame interpolation [49], occlusion reasoning [38], and unsupervised losses in terms of brightness constancy [39] or bidirectional census [53]. Although these methods are all unsupervised, they require their input images to be highly similar with only small pixel shifts. + +# 2.3. Unsupervised deformable medical image registration + +3D image registration is the 3D analog to the 2D optical flow estimation. Deformable image registration has been extensively applied to 3D medical images such as brain MRI [85, 59], CT [33, 76], and cardiac images [91, 72]. Recent works present unsupervised CNN models based on spatial transformation function [18, 4, 17] or generative adversarial networks [52, 40]. Similar to optical flow estimation, these methods require the input pair of fixed and moving volumes to be similar. The information from the two volumes is integrated by stacking them as one input to the CNN models. However, simply stacking the input image pairs works poorly when there is strong transformation variation because the image similarity comparison is spatially constrained to a local neighborhood [55]. + +# 2.4. Non-learning-based subtomogram alignment + +Early works have used exhaustive grid search of rotations and translations with fixed intervals such as 1 voxel and $5^{\circ}$ + +to align subtomograms [8, 24, 3]. To reduce the computational cost of searching the 6D parametric space exhaustively, high-throughput alignment proposed in [87] applied the fast rotational matching algorithm [43]. Fast and accurate alignment proposed in [13] also used the fast rotational matching algorithm and takes into account more information including amplitude and phase into their procedure. Another approach is to collaboratively align multiple subtomograms together based on nuclear-norm [46]. + +In this paper, we focus on pairwise subtomogram alignment and compared our method against the two most popular subtomogram alignment methods as baselines [87, 13]. + +# 3. Method + +Our model is shown in Figure 1 (detailed architecture in Supplementary Section S2). Two subtomograms (3D grayscale cubic images) $s_a$ and $s_b$ are processed using feature extractors with shared weights to produce two feature maps $v_a$ and $v_b$ . Then a Siamese matching module computes two correlation maps $c_{ab}$ and $c_{ba}$ . At a specific position $(i,j,k)$ , $c_{ab}$ contains the similarity between $v_a$ at that position $(i,j,k)$ and all the features of $v_b$ , whereas $c_{ba}$ is similarly defined. $c_{ab}$ and $c_{ba}$ are processed with the same network architecture and are later concatenated to estimate the transformation parameters. The 6D transformation parameters, which consist of $\phi^{\mathrm{tr}} = \{q_x,q_y,q_z\}$ for 3D translation and $\phi^{\mathrm{rot}} = \{q_\alpha ,q_\beta ,q_\gamma \}$ for 3D rotation in ZYZ convention, are feed into a differentiable spatial transformer network to compute the output, a transformed subtomogram $\hat{s}_b = \mathcal{T}_{\phi}(s_b) = \mathcal{T}_{\phi^{\mathrm{tr}}} \mathcal{T}_{\phi^{\mathrm{rot}}}(s_b)$ with the missing wedge region imputed (Section 3.3). A spectral data imputation technique is integrated into the spatial transformer network to compensate for the missing wedge effects. In the training process, we do not have the ground truth transformation parameters to regress to as in [69]. Therefore, to assess the geometric matching performance, our objective is to find 3D rigid transformation parameters to maximize the cross-correlation between $s_a$ and $\hat{s}_b$ in an unsupervised fashion. The cross-correlation-based loss is back-propagated to update the model weights. + +# 3.1. Feature extraction module + +Feature extraction is a dimensionality reduction process to efficiently learn a compact feature vector representation of interesting parts of raw images. There are various popular feature extraction techniques such as DenseNet [34], InceptionNet [79], and ResNet [32]. Subsampling methods such as max pooling and average pooling are used in these convolutional neural networks to reduce feature map dimensionality and facilitate computation. Compared with max pooling and average pooling, spectral representation for convolutional neural networks preserves considerably more spatial information per parameter and enables flexibility in + +the pooling output dimensionality [68]. 2D spectral pooling layers that perform dimension reduction in the frequency domain have been proposed based on discrete Fourier transform (DFT) [68], discrete cosine transform (DCT) [78], and Hartley transform [92]. However, these methods are designed for 2D images and do not take into account image noise. + +We propose a 3D DCT-based spectral layer with pooling and filtering operations. Since our inputs are 3D noisy images, the novel filtering operation is for feature map high-frequency noise reduction, and pooling operation for feature map dimension reduction. We choose the DCT because it stores only real-valued coefficients and compacts more energy in a smaller portion of the spectra compared to the DFT [84]. + +For an input feature map $v \in \mathbb{R}^{L \times W \times H}$ , its 3D type-II DCT is defined as [2]: + +$$ +\begin{array}{l} \mathbb {C} (v) _ {l h w} = \frac {8}{L W H} \epsilon_ {l} \epsilon_ {h} \epsilon_ {w} \sum_ {i = 0} ^ {L - 1} \sum_ {j = 0} ^ {H - 1} \sum_ {k = 0} ^ {W - 1} v _ {i j k} \cos \left(\frac {l \pi (2 i + 1)}{2 L}\right) \\ \cos \left(\frac {h \pi (2 j + 1)}{2 H}\right) \cos \left(\frac {w \pi (2 k + 1)}{2 W}\right), \tag {1} \\ \end{array} +$$ + +where $\epsilon_{l} = \left\{ \begin{array}{ll}\frac{1}{\sqrt{2}} & \mathrm{for} l = 0\\ 1 & \mathrm{otherwise} \end{array} \right.$ $\forall l\in \{0,\dots ,L - 1\}$ . $\epsilon_{h}$ and $\epsilon_w$ are similarly defined $\forall h\in \{0,\dots ,H - 1\}$ $\forall w\in \{0,\dots ,W - 1\}$ The inverse transform $\mathbb{C}^{-1}$ of 3D type-II DCT is well defined as 3D type-III DCT [2]. Therefore, the pooled and filtered representation in the frequency domain can be transformed back through type-III DCT to the spatial domain as the output of the layer. + +![](images/f17a6d4806c5357df9797c28440edae8126fff0341c9f106aa97d9d64e1e1287.jpg) +Figure 2. Image reconstruction from the max pooling, average pooling, and DCT spectral pooling scheme at different subsampling factors. DCT spectral pooling retains substantially greater spatial information of features from the original image and offers arbitrary output map dimensionality. + +We use the DCT to perform subsampling in which the input is transformed to the frequency domain and cropped there. The output with reduced dimensionality is computed + +by transforming the cropped spectrum back into the spatial domain. The spectral pooling operation has been shown to achieve better spatial information preservation per parameter in terms of the $l_{2}$ norm as compared to the max pooling operation [68]. Figure 2 shows the image reconstruction from max pooling, average pooling, and DCT spectral pooling at different subsampling factors. Compared to other pooling operations, a major advantage of using spectral pooling & filtering layers for geometric matching tasks is that the spatial location of features in two images are significantly better preserved for accurate matching. For example, during max pooling, the maximum from the receptive field is selected to achieve local rotation and translation invariance with the intuition that the exact location of a feature does not matter to the final classification. By contrast, during the feature extraction step for geometric matching, the exact feature spatial location is critical and the information loss will lead to inaccurate downstream matching. + +We implement the 3D DCT spectral pooling & filtering as differentiable layers in the feature extractor. The low-pass filtering is also performed by masking out high-frequency regions dominated by noise. The forward and back-propagation procedure of the 3D DCT spectral pooling & filtering layer is outlined in Algorithm 1 and 2. + +Algorithm 1: DCT spectral pooling & filtering +Input: Feature map $v\in \mathbb{R}^{L\times W\times H}$ Output size $L_{1}\times W_{1}\times H_{1}$ Cropping size $L_{2}\times W_{2}\times H_{2}$ Output: Feature map $\hat{v}\in \mathbb{R}^{L_1\times W_1\times H_1}$ 1 $u\gets \mathbb{C}(v)$ 2 $u\gets$ Crop u to size $L_{2}\times W_{2}\times H_{2}$ 3 $\hat{u}\gets$ ZeroPad u to size $L_{1}\times W_{1}\times H_{1}$ 4 $\hat{v}\gets \mathbb{C}^{-1}(\hat{u})$ + +Algorithm 2: DCT spectral pooling & filtering backpropagation +Input: Gradient w.r.t layer output $\frac{\partial L}{\partial \hat{v}}$ +Output: Gradient w.r.t layer input $\frac{\partial L}{\partial v}$ +1 $y \gets \mathbb{C}(\frac{\partial L}{\partial \hat{v}})$ +2 $y \gets \text{Crop } y \text{ to size } L_2 \times W_2 \times H_2$ +3 $\hat{y} \gets \text{ZeroPad } y \text{ to size } L \times W \times H$ +4 $\frac{\partial L}{\partial v} \gets \mathbb{C}^{-1}(\hat{y})$ + +The arbitrary output size of spectral pooling & filtering layers offers another major advantage for geometric matching tasks. If the output two feature maps are of size $L \times W \times H$ with $C$ channels, the Siamese correlation layer (Section 3.2) will create two correlation maps, each of size $L \times W \times H$ with $(LWH)$ channels. The output feature map size from the feature extraction module to the Siamese matching module needs to be carefully manipulated, especially for 3D images. + +If the output feature map is too small, such as $3 \times 3 \times 3$ , there is too much information loss for matching. If the output feature map is too large, such as $20 \times 20 \times 20$ , the resulting correlation maps will be of size $20 \times 20 \times 20 \times 8000$ , which is too large to be processed. Unlike max pooling or average pooling layers which aggressively reduce each dimension to half of the size and remove $87.5\%$ of the information, spectral pooling & filtering layers can gradually reduce the feature map size to the desired feature extraction module output size. Therefore, no additional spatial cropping or padding layer is needed to control the feature map size. + +# 3.2. Siamese matching module + +The matching of extracted features from images is usually performed as an independent post-processing step [31, 90, 75, 54, 64]. The 2D correlation layer proposed in [69] achieved the state-of-the-art for integrating the matching information from two images. It is essentially a normalized cross-correlation function $G: \mathbb{R}^{H \times W \times C} \times \mathbb{R}^{H \times W \times C} \to \mathbb{R}^{H \times W \times (HW)}$ . One of the input feature maps $v_{a}$ is first flattened into shape $v_{a} \in \mathbb{R}^{N \times C}$ , where $N = HW$ , in order to keep the output correlation map 2D. Then for each feature (pixel) in $v_{a}$ and $v_{b}$ , the dot product is computed over all the channels (as feature descriptors) to obtain the correlation, which is later normalized. Nevertheless, to control the dimension of the output correlation map, all axes of one input feature map are broken and later cast into the channels of the output whereas the other input feature map is preserved. + +We propose a novel Siamese matching module for pairwise 3D feature matching. To better utilize and process the feature correlation information, we design a Siamese correlation layer. Different from the correlation layer in [69] which computes only $c_{ab}$ , the Siamese correlation layer is intuitive and symmetrically designed, which computes two correlation maps $c_{ab}$ and $c_{ba}$ . Each of them preserves the spatial coordinates of one input feature map. The use of two correlation maps propagates more feature spatial correlation information for the transformation parameter estimation. Element at a specific position $lwhc$ is defined as: + +$$ +\left(c _ {a b}\right) _ {l w h c} = \frac {\left\langle v _ {a n :} , v _ {b _ {l w h :}} \right\rangle}{\sqrt {\sum_ {i , j , k} \left\langle v _ {a n :} , v _ {b _ {i j k :}} \right\rangle}}, \tag {2} +$$ + +$$ +\left(c _ {b a}\right) _ {l w h c} = \frac {\left\langle v _ {b n :} , v _ {a _ {l w h :}} \right\rangle}{\sqrt {\sum_ {i , j , k} \left\langle v _ {b n :} , v _ {a _ {i j k :}} \right\rangle}}. +$$ + +The two correlation maps are feed into a pseudo-Siamese network consisting of convolution layers and convolved separately but later concatenated for one fully connected layer. After another fully connected layer, the Siamese matching module outputs the estimated rigid transformation parameters $\phi^{\mathrm{tr}}$ and $\phi^{\mathrm{rot}}$ . Detailed model architecture can be found in Supplementary Section S2. + +# 3.3. Unsupervised geometric alignment module + +Existing subtomogram alignment methods optimize a matching metric [87, 13, 6, 3]. In practice, preparing the subtomogram alignment ground truth for training is extremely time-consuming (need to exhaustively search the 6D parametric space). Therefore, the deep model should be unsupervised for this task. To achieve this goal, we propose an unsupervised geometric alignment module utilizing the spatial transformer network [37] with spectral data imputation designed specifically for subtomogram data. + +In a tomogram with fixed voxel spacing (around $1\mathrm{nm}$ ), a certain type of macromolecular structure does not scale or reflect. Therefore, we restrict ourselves to 3D rigid transformation. Denoting the transformation matrix generated by the 3D rigid transformation parameters as $M_{\theta}$ [21] and the 3D warping as $\mathcal{T}_{\phi}:\mathbb{R}^3\to \mathbb{R}^3$ we have: + +$$ +\begin{array}{l} \left( \begin{array}{c} x _ {i} ^ {s} \\ y _ {i} ^ {s} \\ z _ {i} ^ {s} \\ 1 \end{array} \right) = \mathcal {T} _ {\phi} \left(x _ {i} ^ {t}, y _ {i} ^ {t}, z _ {i} ^ {t}\right) = M _ {\theta} \left( \begin{array}{c} x _ {i} ^ {t} \\ y _ {i} ^ {t} \\ z _ {i} ^ {t} \\ 1 \end{array} \right) \tag {3} \\ = \left[ \begin{array}{c c c c} \theta_ {1 1} & \theta_ {1 2} & \theta_ {1 3} & \theta_ {1 4} \\ \theta_ {2 1} & \theta_ {2 2} & \theta_ {2 3} & \theta_ {2 4} \\ \theta_ {3 1} & \theta_ {3 2} & \theta_ {3 3} & \theta_ {3 4} \\ 0 & 0 & 0 & 1 \end{array} \right] \left( \begin{array}{c} x _ {i} ^ {t} \\ y _ {i} ^ {t} \\ z _ {i} ^ {t} \\ 1 \end{array} \right), \\ \end{array} +$$ + +where $\left(x_i^t,y_i^t,z_i^t\right)$ is the target coordinates on the transformed output 3D image and $(x_{i}^{s},y_{i}^{s},z_{i}^{s})$ is the source coordinates on the input 3D image. $\theta$ is an element of the transformation matrix. The $3\times 3$ orthogonal rotation matrix is from $\theta_{11}$ to $\theta_{33}$ . The displacement along each axis is specified by $\theta_{14}$ , $\theta_{24}$ , and $\theta_{34}$ . The 3D warping is differentiable and therefore able to be trained end-to-end. + +In order to compensate for the missing wedge effects and thus to decrease the bias introduced, we integrate a spectral data imputation strategy from our previous work [88] into the spatial transformer network. For a subtomogram, we use its current estimated transformation to compute the rotated missing wedge mask $m$ , as an indicator function to represent whether the Fourier coefficients are valid or missing in certain regions, and impute the missing ones with those from its transformation target subtomogram $s_a$ . We can form a transformed and imputed subtomogram $\hat{s}_b$ such that: + +$$ +\left(\mathcal {F} \hat {s} _ {b}\right) (\xi) = \left\{ \begin{array}{l l} \left[ \mathcal {F} s _ {a} \right] (\xi) & \text {i f} m (\xi) = 0 \\ \left[ \mathcal {F T} _ {\phi} (s _ {b}) \right] (\xi) & \text {i f} m (\xi) = 1 \end{array} , \right. \tag {4} +$$ + +$$ +m \left(\xi\right) = \left\{ \begin{array}{l l} 0 & \text {i f t h e F o u r i e r c o e f f i c i e n t a t \xi i s m i s s i n g} \\ 1 & \text {i f t h e F o u r i e r c o e f f i c i e n t a t \xi i s v a l i d} \end{array} \right., +$$ + +where $\mathcal{F}$ is the Fourier transform operator, $\xi \in \mathbb{R}^3$ is a Fourier space location, and $m(\xi)$ is the rotated missing wedge mask according to $\phi^{\mathrm{rot}}$ . Since the magnitude of Fourier transform is translation-invariant, we only need to rotate $m(\xi)$ without + +using $\phi^{\mathrm{tr}}$ [25]. The imputation operation facilitates the unsupervised geometric matching task because only when the optimal alignment is obtained, the imputed data results in the highest consistency with the transformed subtomogram. + +We note that since the rotation of the missing wedge mask $m$ is implemented along with the transformation of the input subtomogram in the differentiable spatial transformer network and the inverse discrete Fourier transformation is well defined, this spectral data imputation step is differentiable in a similar manner as Algorithm 2. + +Loss function. Pearson' correlation and its variants are widely used for assessing the alignment between two subtomograms [25, 6, 87, 13, 3] because of its simplicity and effectiveness. We implement it as a loss function to Gum-Net: + +$$ +\mathcal {L} = 1 - \frac {\sum_ {i = 1} ^ {N} \left(s _ {a _ {i}} - \bar {s} _ {a}\right) \left(\hat {s} _ {b _ {i}} - \bar {\hat {s}} _ {b}\right)}{\sqrt {\sum_ {i = 1} ^ {N} \left(s _ {a _ {i}} - \bar {s} _ {a}\right) ^ {2}} \sqrt {\sum_ {i = 1} ^ {N} \left(\hat {s} _ {b _ {i}} - \bar {\hat {s}} _ {b}\right) ^ {2}}}, \tag {5} +$$ + +where $N$ is the total number of voxels in an input subto-mogram. Compared to existing methods [87, 13], which utilize translation-invariant upper bound to approximate the Pearson's correlation objective to reduce the computational cost, Gum-Net optimizes Pearson's correlation directly for more accurate alignment. + +# 3.4. Baseline methods + +We implemented two most popular state-of-the-art subtomogram alignment methods for comparison: H-T align [87] and F&A align [13]. We performed three ablation studies with existing modules: Gum-Net Max Pooling (Gum-Net MP), Gum-Net Average Pooling (Gum-Net AP), and GumNet Single Correlation (Gum-Net SC). Detailed implementation can be found in Supplementary Section S2. + +# 4. Experiments + +Gum-Net was evaluated on six real and nine realistically simulated datasets at different SNR. On the simulated datasets, the accuracy of subtomogram alignment was evaluated by comparing the estimated transformation parameters $\phi^{\mathrm{tr}}$ and $\phi^{\mathrm{rot}}$ to the ground truth. On the real datasets, since the transformation ground truth is not available, in practice, the optimal transformation is usually obtained by parametric space exhaustive grid search to optimize the cross-correlation between $s_a$ and $\hat{s}_b$ . Therefore, we compared the cross-correlation between $s_a$ and $\hat{s}_b$ computed by Gum-Net and baseline methods as an indirect indicator of the alignment accuracy. The visualization of subtomograms in different datasets can be found in Supplementary Section S3. + +# 4.1. Datasets + +# 4.1.1 Real datasets + +GroEL/GroES dataset: this dataset contains 786 experimental subtomograms of purified GroEL and GroEL/GroES + +complexes from 24 tomograms [25]. Each subtomogram is rescaled to size $32^{3}$ with voxel size $0.933\mathrm{nm}$ and $25^{\circ}$ missing wedge. + +Rat neuron culture dataset: this recent dataset is a set of tomograms from rat neuron culture [28]. In total 1095 ribosome subtomograms and 1527 capped proteasome subtomograms were extracted by template matching [8] and biology expert annotation. Each subtomogram is of size $32^3$ with voxel size $1.368\mathrm{nm}$ and $30^{\circ}$ missing wedge. + +S. cerevisiae 80S ribosome dataset: this dataset contains 3120 subtomograms extracted from 7 tomograms of purified S. cerevisiae 80S ribosomes [7]. Each subtomogram is rescaled to size $32^{3}$ with voxel size $1.365\mathrm{nm}$ and $30^{\circ}$ missing wedge. TMV dataset: this dataset contains 2742 Tobacco Mosaic Virus (TMV) subtomograms, a type of helical virus [45]. Each subtomogram is binned to size $32^{3}$ with voxel size $1.080\mathrm{nm}$ and $30^{\circ}$ missing wedge. + +Aldolase dataset: this recent dataset contains 400 purified rabbit muscle aldolase subtomograms [61]. Each subtomogram is rescaled to size $32^3$ with voxel size $0.750\mathrm{nm}$ and $30^{\circ}$ missing wedge. + +Insulin receptor dataset: this recent dataset contains 400 purified human insulin-bounded insulin receptor subtomograms [62]. Each subtomogram is rescaled to size $32^3$ with voxel size $0.876\mathrm{nm}$ and $45^{\circ}$ missing wedge. + +# 4.1.2 Simulated datasets + +The subtomogram dataset simulation utilized a standard procedure in [26, 65] which takes into account the tomographic reconstruction process with missing wedges and contrast transfer function (detailed simulation procedure in Supplementary Section S3). We chose five representative macromolecular complexes: spliceosome (PDB ID: 5LQW), RNA polymerase-rifampicin complex (1I6V), RNA polymerase II elongation complex (6A5L), ribosome (5T2C), and capped proteasome (5MPA). All five structures are asymmetric so that there exists only one alignment ground truth. We simulated five datasets, one relatively clean (SNR 100) and four with SNR close to the experimental conditions (0.1, 0.05, 0.03, and 0.01), each consists of 2100 subtomogram pairs of each structure (in total 10500 subtomogram pairs). 5000 subtomogram pairs from each dataset were used for training and 500 pairs for validation. The rest 5000 subtomogram pairs from each dataset are used for testing. For a pair of subtomograms, one structure is a randomly transformed copy of the other and the two structures were processed independently to obtain its tomographic image distortions. Each subtomogram is of size $32^3$ with voxel size $1.2\mathrm{nm}$ . The $s_b$ in each pair has a typical missing wedge $30^{\circ}$ while $s_a$ has no missing wedge. + +For subtomogram averaging, we simulated four datasets of 500 ribosomes (PDB ID: 5T2C) in the same manner of + +
MethodSNR 100SNR 0.1SNR 0.05SNR 0.03SNR 0.01
H-T align0.30±0.68, 1.82±2.691.22±1.07, 4.76±4.561.93±0.98, 7.26±4.772.22±0.77, 8.86±4.722.38±0.57, 11.33±5.02
F&A align0.33±0.70, 1.93±2.861.34±1.13, 5.39±4.901.95±0.98, 7.54±4.942.22±0.77, 8.99±4.812.38±0.57, 11.32±4.92
Gum-Net MP0.90±0.87, 3.34±3.411.30±0.79, 4.93±3.361.44±0.79, 5.46±3.381.53±0.78, 5.96±3.341.67±0.77, 7.28±3.38
Gum-Net AP0.60±0.71, 2.32±2.711.09±0.73, 4.20±2.961.30±0.77, 5.00±3.151.45±0.77, 5.70±3.251.65±0.78, 7.18±3.35
Gum-Net SC0.70±0.75, 2.63±2.861.16±0.77, 4.41±3.231.36±0.79, 5.13±3.341.48±0.78, 5.75±3.341.67±0.77, 7.24±3.46
Gum-Net0.41±0.70, 1.59±2.630.62±0.69, 2.41±2.610.87±0.74, 3.20±2.781.13±0.75, 4.29±2.751.50±0.78, 6.78±4.22
+ +Table 1. Subtomogram alignment accuracy on five datasets with SNR specified. In each cell, the first term is the mean and standard deviation of the rotation error and the second term, the translation error. We highlighted Gum-Net results that are significantly better $(p < 0.001)$ than all baselines by the paired sample t-test. More detailed results and analysis can be found in Supplementary Section S3. + +SNR 0.1, 0.05, 0.03, and 0.01. + +# 4.2. Implementation + +The deep models were implemented in Keras [14] with custom layers backend by Tensorflow [1]. All inputs have size $32^3$ . We note that due to the flexibility of input and output size of the DCT spectral pooling & filtering layers, the input size can be arbitrary. Higher resolution can be achieved with larger input subtomogram sizes. Detailed implementation of Gum-Net and baselines can be found in Supplementary Section S2. + +For each epoch, we randomly draw 5000 subtomogram pairs $s_a$ and $s_b$ from the training dataset regardless of their structural class information. Therefore, Gum-Net is fully unsupervised without instance-level or category-level matching information for weak supervision as in other geometric matching methods [71, 70, 42, 80, 58]. For a simulated dataset, there are $5000^2$ possible image pairs. As a result, we did not observe any overfitting issue. + +# 4.3. Subtomogram alignment + +Given the transformation ground truth, we measure the alignment accuracy with two metrics: (1) the translation error defined as the Euclidean distance between the translation estimation and the ground truth and (2) the rotation error defined as the Euclidean distance between the flattened rotation matrix of estimation and the ground truth. + +On simulated datasets: Table 3.4 shows the alignment accuracy. Gum-Net achieved similar performance on the clean dataset (SNR 100). As max pooling achieves more local transformation invariance [93], Gum-Net MP performs worse than Gum-Net AP in all settings as expected. When the SNR is close to experimental condition (the real datasets have SNR around 0.01 to 0.1), CNN-based methods generally perform better than traditional methods. Specifically, Gum-Net outperformed all the baseline methods, demonstrating the improvement from the proposed modules. + +In our experiments, the training, validation, and testing datasets are independent, which ensured no overfitting. However, since Gum-Net is fully unsupervised, even if the testing dataset is from a different domain source, such as collected under different imaging conditions, it is possible to fine-tune + +a trained model on the testing dataset (with no ground truth) for adaptation. In terms of speed, with a trained model, GumNet only takes 17.6 seconds to align 1000 subtomograms on a single GPU core. The training takes less than 10 hours. Since there is no available GPU-accelerated version of the traditional algorithms, H-T align and F & A align take 1916.4 seconds and 1251.2 seconds to align 1000 subtomograms on a CPU core, respectively. Therefore, in practice, this results in 70 to 110 times speedup over traditional methods. + +![](images/d5c6fb970bbed8ee152d5feec5a2a974656275243e32a1b258d0a7ad1d983ce4.jpg) +Figure 3. Example alignment inputs and outputs at SNR 100. 2D slices representations are shown in Supplementary Section S3. + +On real datasets: We split the GroEL/GroES dataset into a training dataset of 617 subtomograms, a validation dataset of 69 subtomograms, and a testing dataset of 100 subtomograms. There are 4950 pairs of subtomograms in the testing dataset. We align them pairwise by Gum-Net, H-T align, and F&A align and calculates the cross-correlation. Gum-Net achieved cross-correlations of $0.0908 \pm 0.0204$ , significantly better ( $p < 0.001$ ) than H-T align ( $0.0756 \pm 0.0194$ ) and F&A align ( $0.0838 \pm 0.0204$ ). + +We split the rat neuron culture dataset into a training dataset of 2270 subtomograms, a validation dataset of 252 subtomograms, and a testing dataset of 100 ribosome and 100 capped proteasome subtomograms. There are 19900 pairs of subtomograms in the testing dataset. Gum-Net achieved cross-correlations of $0.0615 \pm 0.0187$ , significantly better $(p < 0.001)$ than H-T align $(0.0541 \pm 0.0235)$ and F&A align $(0.0607 \pm 0.0199)$ . We use the pairwise correlation matrix to cluster the subtomograms by defining the pairwise distance as 1 - pairwise correlation. Applying the complete-linkage hierarchical clustering algorithm with $k = 2$ , Gum-Net achieved an accuracy of $92\%$ , better than F&A align + +Figure 4. Illustration of alignment-based subtomogram averaging using Gum-Net. On the left are five example input subtomograms at SNR 0.1 in our experiment. On the right are subtomogram averages at different iterations and the true structure. The 2D slices representations are shown in Supplementary Section S3. + +$(65\%)$ and H-T align $(53.5\%)$ . + +# 4.4. Non-parametric reference-free subtomogram averaging + +Structures present in multiple noisy copies (usually thousands of) in a tomogram must be averaged through geometric transformation to obtain higher resolution 3D views [83]. To eliminate potential bias, subtomogram averaging is often done without any external structural reference. One major approach of reference-free subtomogram averaging is non-parametric alignment-based averaging in which all subtomograms are iteratively aligned to their average and re-averaged for the next iteration [9]. Figure 4 illustrates such a process in which the initial average is generated by simply averaging all the subtomograms without any transformation. The structural resolution of the subtomogram average is gradually improved through the iterative process. + +
Method0.10.050.030.0180STMVAldolaseInsulin
H-T align2.893.794.924.413.052.232.341.90
F&A align2.784.363.814.532.772.523.132.18
Gum-Net2.782.954.014.222.732.161.971.77
+ +Table 2. Subtomogram averaging results in FSC resolution (nm). '0.1' denotes simulated dataset at SNR 0.1. '80S', 'TMV', 'Aldolase', and 'Insulin' denote the real datasets. The best resolution is highlighted. + +The iterative alignment-based non-parametric reference-free subtomogram averaging was tested using the proposed and baseline methods. The standard resolution measurement for assessing subtomogram averaging is Fourier shell correlation (FSC) [82] (mathematical definition in Supplementary Section S3), which measures the maximal discrepant structural factors between the subtomogram average and the true structure. The smaller the value, the better the results. As shown in Table 4.4, Gum-Net achieved the overall best averaging performance and improved the resolution by around $10\%$ . + +# 5. Conclusion + +Cryo-ET subtomogram alignment and averaging revolutionize the discovery of 3D native macromolecular structure details in single cells. Such information provides critical insights into the precise function/dysfunction of the cellular + +processes. However, with a rapidly increasing amount of cryo-ET data collected, there is an urgent need to drastically improve the efficiency of subtomogram alignment methods. We developed the first unsupervised deep learning approach for 3D subtomogram alignment and averaging. Using the three proposed modules, Gum-Net achieved fast and accurate alignment with end-to-end unsupervised learning. Gum-Net opens up the possibility for continued improvement of subtomogram alignment and averaging efficiency and accuracy with better model design and training. This work serves as an important step toward in situ high-throughput detection and recovery of macromolecular structures for a better understanding of the molecular machinery in cellular processes. + +Gum-Net can be integrated into existing cryo-ET analysis software in several ways. For example, EMAN2 [26] performs exhaustive 3D rotational and translational search followed by local refinement for alignment-based averaging. RELION [7] maximizes the likelihood of a model with Gaussian noise assumption by exhaustively scanning the 3D rigid transformation space for integration. Gum-Net improves the accuracy and efficiency of subtomogram alignment, especially for a large amount of cryo-ET data. Therefore, integrating Gum-Net with existing software can boost the speed of their alignment step or quickly generate initial structural models for averaging refinement. Gum-Net can also be easily extended to related tasks including tomographic tilt series alignment [30] and cryo-electron microscopy single-particle reconstruction [94]. The proposed modules can be adapted to other geometric matching tasks for images of strong transformation variation such as face alignment under pose variations [20, 95], or of high noise level such as synthetic aperture radar imaging [89, 12] and sonar imaging [10, 66]. + +# Acknowledgements + +This work was supported by U.S. National Science Foundation (NSF) grant DBI-1949629 and in part by U.S. National Institutes of Health (NIH) grant P41 GM103712. XZ was supported by a fellowship from Carnegie Mellon University's Center for Machine Learning and Health. We thank Hongyu Zheng, Dr. Benjamin Chidester, and Jennifer Williams at our Department for proof-reading the paper. + +# References + +[1] Martin Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghe-mawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In 12th {USENIX} Symposium on Operating Systems Design and Implementation (\{OSDI\} 16), pages 265-283, 2016. +[2] O Alshibami and Said Boussakta. Fast algorithm for the 3d dct. In 2001 IEEE International Conference on Acoustics, Speech, and Signal Processing. Proceedings (Cat. No. 01CH37221), volume 3, pages 1945-1948. IEEE, 2001. +[3] Fernando Amat, Luis R Comolli, Farshid Moussavi, John Smit, Kenneth H Downing, and Mark Horowitz. Subtomogram alignment by adaptive fourier coefficient thresholding. Journal of structural biology, 171(3):332-344, 2010. +[4] Guha Balakrishnan, Amy Zhao, Mert R Sabuncu, John Guttag, and Adrian V Dalca. An unsupervised learning model for deformable medical image registration. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9252-9260, 2018. +[5] Philip R Baldwin, Yong Zi Tan, Edward T Eng, William J Rice, Alex J Noble, Carl J Negro, Michael A Cianfrocco, Clinton S Potter, and Bridget Carragher. Big data in cryoem: automated collection, processing and accessibility of em data. Current opinion in microbiology, 43:1-8, 2018. +[6] Alberto Bartesaghi, P Sprechmann, J Liu, G Randall, G Sapiro, and Sriram Subramaniam. Classification and 3d averaging with missing wedge correction in biological electron tomography. Journal of structural biology, 162(3):436-450, 2008. +[7] Tanmay AM Bharat and Sjors HW Scheres. Resolving macromolecular structures from electron cryo-tomography data using subtomogram averaging in relation. Nature protocols, 11(11):2054, 2016. +[8] Jochen Böhm, Achilleas S Frangakis, Reiner Hegerl, Stephan Nickell, Dieter Typke, and Wolfgang Baumeister. Toward detecting and identifying macromolecules in a cellular context: template matching applied to electron tomograms. Proceedings of the National Academy of Sciences, 97(26):14245-14250, 2000. +[9] John AG Briggs. Structural biology in situ—the potential of subtomogram averaging. Current opinion in structural biology, 23(2):261-267, 2013. +[10] Cyril Chailloux, Jean-Marc Le Caillec, Didier Gueriot, and Benoit Zerr. Intensity-based block matching algorithm for mosaicing sonar images. IEEE Journal of Oceanic Engineering, 36(4):627-645, 2011. +[11] Juan Chang, Xiangan Liu, Ryan H Rochat, Matthew L Baker, and Wah Chiu. Reconstructing virus structures from nanometer to near-atomic resolutions with cryo-electron microscopy and tomography. In Viral Molecular Machines, pages 49–90. Springer, 2012. +[12] Min Chen, Ayman Habib, Haiqing He, Qing Zhu, and Wei Zhang. Robust feature matching method for sar and optical images by using gaussian-gamma-shaped bi-windows-based descriptor and geometric constraint. Remote Sensing, 9(9):882, 2017. + +[13] Yuxiang Chen, Stefan Pfeffer, Thomas Hrabe, Jan Michael Schuller, and Friedrich Förster. Fast and accurate reference-free alignment of subtomograms. Journal of structural biology, 182(3):235-245, 2013. +[14] François Chollet et al. Keras (2015), 2017. +[15] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In international Conference on computer vision & Pattern Recognition (CVPR'05), volume 1, pages 886-893. IEEE Computer Society, 2005. +[16] Radostin Danev, Shuji Kanamaru, Michael Marko, and Kuniaki Nagayama. Zernike phase contrast cryo-electron tomography. Journal of structural biology, 171(2):174-181, 2010. +[17] Bob D de Vos, Floris F Berendsen, Max A Viergever, Hessam Sokooti, Marius Staring, and Ivana Isgum. A deep learning framework for unsupervised affine and deformable image registration. Medical image analysis, 52:128-143, 2019. +[18] 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 Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support, pages 204-212. Springer, 2017. +[19] Jérôme Declerck, Jacques Feldmar, Fabienne Betting, and Michael L Goris. Automatic registration and alignment on a template of cardiac stress and rest spect images. In Proceedings of the Workshop on Mathematical Methods in Biomedical Image Analysis, pages 212-221. IEEE, 1996. +[20] Hassen Drira, Boulbaba Ben Amor, Anuj Srivastava, Mohamed Daoudi, and Rim Slama. 3d face recognition under expressions, occlusions, and pose variations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(9):2270-2283, 2013. +[21] David W Eggert, Adele Lorusso, and Robert B Fisher. Estimating 3-d rigid body transformations: a comparison of four major algorithms. Machine vision and applications, 9(5-6):272-290, 1997. +[22] Mohammed E Fathy, Quoc-Huy Tran, M Zeeshan Zia, Paul Vernaza, and Manmohan Chandraker. Hierarchical metric learning and matching for 2d and 3d geometric correspondences. In Proceedings of the European Conference on Computer Vision (ECCV), pages 803-819, 2018. +[23] Martin A Fischler and Robert C Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381-395, 1981. +[24] Friedrich Förster and Reiner Hegerl. Structure determination in situ by averaging of tomograms. Methods in cell biology, 79:741-767, 2007. +[25] Friedrich Förster, Sabine Pruggnaller, Anja Seybert, and Achilleas S Frangakis. Classification of cryo-electron subtomograms using constrained correlation. Journal of structural biology, 161(3):276-286, 2008. +[26] Jesús G Galaz-Montoya, John Flanagan, Michael F Schmid, and Steven J Ludtke. Single particle tomography in eman2. Journal of structural biology, 190(3):279-290, 2015. + +[27] André P Guéziec, Xavier Pennec, and Nicholas Ayache. Medical image registration using geometric hashing. IEEE Computational Science and Engineering, 4(4):29-41, 1997. +[28] Qiang Guo, Carina Lehmer, Antonio Martínez-Sánchez, Till Rudack, Florian Beck, Hannelore Hartmann, Manuela Pérez-Berlanga, Frédéric Frottin, Mark S Hipp, F Ulrich Hartl, et al. In situ structure of neuronal c9orf72 poly-ga aggregates reveals proteasome recruitment. Cell, 172(4):696-705, 2018. +[29] Renmin Han, Xiaohua Wan, Zihao Wang, Yu Hao, Jingrong Zhang, Yu Chen, Xin Gao, Zhiyong Liu, Fei Ren, Fei Sun, et al. Autom: a novel automatic platform for electron tomography reconstruction. Journal of structural biology, 199(3):196-208, 2017. +[30] Renmin Han, Liansan Wang, Zhiyong Liu, Fei Sun, and Fa Zhang. A novel fully automatic scheme for fiducial marker-based alignment in electron tomography. Journal of structural biology, 192(3):403-417, 2015. +[31] Xufeng Han, Thomas Leung, Yangqing Jia, Rahul Sukthankar, and Alexander C Berg. Matchnet: Unifying feature and metric learning for patch-based matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3279-3286, 2015. +[32] 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. +[33] Jidong Hou, Mariana Guerrero, Wenjuan Chen, and Warren D D'Souza. Deformable planning ct to cone-beam ct image registration in head-and-neck cancer. Medical physics, 38(4):2088-2094, 2011. +[34] 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. +[35] Qi-Xing Huang, Simon Flóry, Natasha Gelfand, Michael Hofer, and Helmut Pottmann. Reassembling fractured objects by geometric matching. ACM Transactions on Graphics (TOG), 25(3):569-578, 2006. +[36] Piotr Indyk, Rajeev Motwani, and Suresh Venkatasubramanian. Geometric matching under noise: Combinatorial bounds and algorithms. In SODA, pages 457-465, 1999. +[37] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in neural information processing systems, pages 2017-2025, 2015. +[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. +[39] J Yu Jason, Adam W Harley, and Konstantinos G Derpanis. Back to basics: Unsupervised learning of optical flow via brightness constancy and motion smoothness. In European Conference on Computer Vision, pages 3-10. Springer, 2016. +[40] 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 International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 166-174. Springer, 2019. + +[41] Seungryong Kim, Dongbo Min, Bumsub Ham, Sangryul Jeon, Stephen Lin, and Kwanghoon Sohn. Fcss: Fully convolutional self-similarity for dense semantic correspondence. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6560-6569, 2017. +[42] Seungryong Kim, Dongbo Min, Somi Jeong, Sunok Kim, Sangryul Jeon, and Kwanghoon Sohn. Semantic attribute matching networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12339-12348, 2019. +[43] Julio A Kovacs and Willy Wriggers. Fast rotational matching. Acta Crystallographica Section D: Biological Crystallography, 58(8):1282-1286, 2002. +[44] Werner Kuhlbrandt. The resolution revolution. Science, 343(6178):1443-1444, 2014. +[45] Michael Kunz, Zhou Yu, and Achilleas S Frangakis. M-free: Mask-independent scoring of the reference bias. Journal of structural biology, 192(2):307-311, 2015. +[46] Oleg Kuybeda, Gabriel A Frank, Alberto Bartesaghi, Mario Borgnia, Sriram Subramaniam, and Guillermo Sapiro. A collaborative framework for 3d alignment and classification of heterogeneous subvolumes in cryo-electron tomography. Journal of structural biology, 181(2):116-127, 2013. +[47] Svetlana Lazebnik, Cordelia Schmid, and Jean Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06), volume 2, pages 2169-2178. IEEE, 2006. +[48] Xinchao Li, Martha Larson, and Alan Hanjalic. Pairwise geometric matching for large-scale object retrieval. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5153-5161, 2015. +[49] Gucan Long, Laurent Kneip, Jose M Alvarez, Hongdong Li, Xiaohu Zhang, and Qifeng Yu. Learning image matching by simply watching video. In European Conference on Computer Vision, pages 434-450. Springer, 2016. +[50] David G Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2):91-110, 2004. +[51] Jiayi Ma, Huabing Zhou, Ji Zhao, Yuan Gao, Junjun Jiang, and Jinwen Tian. Robust feature matching for remote sensing image registration via locally linear transforming. IEEE Transactions on Geoscience and Remote Sensing, 53(12):6469-6481, 2015. +[52] Dwarikanath Mahapatra, Bhavna Antony, Suman Sedai, and Rahul Garnavi. Deformable medical image registration using generative adversarial networks. In 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), pages 1449-1453. IEEE, 2018. +[53] Simon Meister, Junhwa Hur, and Stefan Roth. Unflow: Unsupervised learning of optical flow with a bidirectional census loss. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. +[54] Iaroslav Melekhov, Juho Kannala, and Esa Rahtu. Image patch matching using convolutional descriptors with euclidean distance. In *Asian Conference on Computer Vision*, pages 638–653. Springer, 2016. + +[55] Iaroslav Melekhov, Aleksei Tiulpin, Torsten Sattler, Marc Pollefeys, Esa Rahtu, and Juho Kannala. Dgc-net: Dense geometric correspondence network. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1034-1042. IEEE, 2019. +[56] Roland Memisevic and Geoffrey Hinton. Unsupervised learning of image transformations. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pages 1-8. IEEE, 2007. +[57] Roland Memisevic and Geoffrey E Hinton. Learning to represent spatial transformations with factored higher-order boltzmann machines. Neural computation, 22(6):1473-1492, 2010. +[58] Juhong Min, Jongmin Lee, Jean Ponce, and Minsu Cho. Hyperpixel flow: Semantic correspondence with multi-layer neural features. In Proceedings of the IEEE International Conference on Computer Vision, pages 3395-3404, 2019. +[59] Ashraf Mohamed, Evangelia I Zacharaki, Dinggang Shen, and Christos Davatzikos. Deformable registration of brain tumor images via a statistical model of tumor-induced deformation. Medical image analysis, 10(5):752-763, 2006. +[60] Maryam M Najafabadi, Flavio Villanustre, Taghi M Khoshgoftaar, Naeem Seliya, Randall Wald, and Edin Muharemagic. Deep learning applications and challenges in big data analytics. Journal of Big Data, 2(1):1, 2015. +[61] Alex J Noble, Venkata P Dandey, Hui Wei, Julia Brasch, Jillian Chase, Priyamvada Acharya, Yong Zi Tan, Zhening Zhang, Laura Y Kim, Giovanna Scapin, et al. Routine single particle cryoem sample and grid characterization by tomography. *Elife*, 7:e34257, 2018. +[62] Alex J Noble, Hui Wei, Venkata P Dandey, Zhening Zhang, Yong Zi Tan, Clinton S Potter, and Bridget Carragher. Reducing effects of particle adsorption to the air-water interface in cryo-em. Nature methods, 15(10):793, 2018. +[63] David Novotny, Diane Larlus, and Andrea Vedaldi. Anchornet: A weakly supervised network to learn geometry-sensitive features for semantic matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5277-5286, 2017. +[64] Hyun Oh Song, Stefanie Jegelka, Vivek Rathod, and Kevin Murphy. Deep metric learning via facility location. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5382-5390, 2017. +[65] Long Pei, Min Xu, Zachary Frazier, and Frank Alber. Simulating cryo electron tomograms of crowded cell cytoplasm for assessment of automated particle picking. BMC bioinformatics, 17(1):405, 2016. +[66] Minh Tan Pham and Didier Gueriot. Guided block-matching for sonar image registration using unsupervised kohonen neural networks. In 2013 OCEANS-San Diego, pages 1-5. IEEE, 2013. +[67] James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Object retrieval with large vocabularies and fast spatial matching. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pages 1-8. IEEE, 2007. +[68] Oren Rippel, Jasper Snoek, and Ryan P Adams. Spectral representations for convolutional neural networks. In Advances + +in neural information processing systems, pages 2449-2457, 2015. +[69] Ignacio Rocco, Relja Arandjelovic, and Josef Sivic. Convolutional neural network architecture for geometric matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6148-6157, 2017. +[70] Ignacio Rocco, Relja Arandjelović, and Josef Sivic. End-to-end weakly-supervised semantic alignment. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6917-6925, 2018. +[71] Ignacio Rocco, Mircea Cimpoi, Relja Arandjelović, Akihiko Torii, Tomas Pajdla, and Josef Sivic. Neighbourhood consensus networks. In Advances in Neural Information Processing Systems, pages 1651-1662, 2018. +[72] Marc-Michel Rohé, Manasi Datar, Tobias Heimann, Maxime Sermesant, and Xavier Pennec. Svf-net: Learning deformable image registration using shape matching. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 266-274. Springer, 2017. +[73] Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary R Bradski. Orb: An efficient alternative to sift or surf. In ICCV, volume 11, page 2. CiteSeer, 2011. +[74] Torsten Sattler, Will Maddern, Carl Toft, Akihiko Torii, Lars Hammarstrand, Erik Stenberg, Daniel Safari, Masatoshi Okutomi, Marc Pollefeys, Josef Sivic, et al. Benchmarking 6dof outdoor visual localization in changing conditions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8601-8610, 2018. +[75] Tanner Schmidt, Richard Newcombe, and Dieter Fox. Self-supervised visual descriptor learning for dense correspondence. IEEE Robotics and Automation Letters, 2(2):420-427, 2016. +[76] Eduard Schreibmann, Jonathon A Nye, David M Schuster, Diego R Martin, John Votaw, and Tim Fox. Mr-based attenuation correction for hybrid pet-mr brain imaging systems using deformable image registration. Medical physics, 37(5):2101-2109, 2010. +[77] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. +[78] James S Smith and Bogdan M Wilamowski. Discrete cosine transform spectral pooling layers for convolutional neural networks. In International Conference on Artificial Intelligence and Soft Computing, pages 235-246. Springer, 2018. +[79] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1-9, 2015. +[80] Nikolai Ufer, Kam To Lui, Katja Schwarz, Paul Warkentin, and Björn Ommer. Weakly supervised learning of dense semantic correspondences and segmentation. In German Conference on Pattern Recognition, pages 456-470. Springer, 2019. + +[81] Nikolai Ufer and Bjorn Ommer. Deep semantic feature matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6914-6923, 2017. +[82] Marin Van Heel and Michael Schatz. Fourier shell correlation threshold criteria. Journal of structural biology, 151(3):250-262, 2005. +[83] W Wan and JAG Briggs. Cryo-electron tomography and subtomogram averaging. In Methods in enzymology, volume 579, pages 329-367. Elsevier, 2016. +[84] Andrew B Watson. Image compression using the discrete cosine transform. Mathematica journal, 4(1):81, 1994. +[85] Adam Wittek, Karol Miller, Ron Kikinis, and Simon K Warfield. Patient-specific model of brain deformation: Application to medical image registration. Journal of biomechanics, 40(4):919-929, 2007. +[86] Gerhard Wolber, Thomas Seidel, Fabian Bendix, and Thierry Langer. Molecule-pharmacophore superpositioning and pattern matching in computational drug design. *Drug discovery today*, 13(1-2):23-29, 2008. +[87] Min Xu, Martin Beck, and Frank Alber. High-throughput subtomogram alignment and classification by fourier space constrained fast volumetric matching. Journal of structural biology, 178(2):152-164, 2012. +[88] Min Xu, Jitin Singla, Elitza I Tocheva, Yi-Wei Chang, Raymond C Stevens, Grant J Jensen, and Frank Alber. De novo structural pattern mining in cellular electron cryotomograms. Structure, 2019. +[89] Yuanxin Ye and Li Shen. Hopc: A novel similarity metric based on geometric structural properties for multi-modal remote sensing image matching. ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 3:9, 2016. +[90] Kwang Moo Yi, Eduard Trulls, Vincent Lepetit, and Pascal Fua. Lift: Learned invariant feature transform. In European Conference on Computer Vision, pages 467-483. Springer, 2016. +[91] Vladimir Zagrodsky, Vivek Walimbe, Carlos R Castro-Pareja, Jian Xin Qin, Jong-Min Song, and Raj Shekhar. Registration-assisted segmentation of real-time 3-d echocardiographic data using deformable models. IEEE Transactions on Medical Imaging, 24(9):1089-1099, 2005. +[92] Hao Zhang and Jianwei Ma. Hartley spectral pooling for deep learning. arXiv preprint arXiv:1810.04028, 2018. +[93] Jiahuan Zhou, Weiqi Xu, and Ryad Chellali. Analysing the effects of pooling combinations on invariance to position and deformation in convolutional neural networks. In 2017 IEEE International Conference on Cyborg and Bionic Systems (CBS), pages 226-230. IEEE, 2017. +[94] Z Hong Zhou. Towards atomic resolution structural determination by single-particle cryo-electron microscopy. Current opinion in structural biology, 18(2):218-228, 2008. +[95] Xiangyu Zhu, Zhen Lei, Xiaoming Liu, Hailin Shi, and Stan Z Li. Face alignment across large poses: A 3d solution. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 146-155, 2016. \ No newline at end of file diff --git a/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/images.zip b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..33d38f26c0c7cdcc0096dbddc25b6cc30b1fedd1 --- /dev/null +++ b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab7a4f34b574eac03a2ebf4f7f43c56fdf0aa324ff6e580c2e107ec61595e3ca +size 284987 diff --git a/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/layout.json b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6fcdc2888f9e150a3181fe0c3ae96c7e6130fdec --- /dev/null +++ b/gumnetunsupervisedgeometricmatchingforfastandaccurate3dsubtomogramimagealignmentandaveraging/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef8cd18292dc1348058d49b235d2931ddaa7d01fa5deae4b8a8c11cd8d27a100 +size 504373 diff --git a/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_content_list.json b/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..065b28ed42ce49fe7e9131a49720f0cd6cccf293 --- /dev/null +++ b/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ea4f513dd2865609cf836e1d79e7226d01ab98ef077b5535ff076c15efbfb3a +size 69715 diff --git a/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_model.json b/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5034beca3730b8265d98bac80f25c5b1f0dfa06c --- /dev/null +++ b/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:795378dae0104cb93df4cb603926ee4bcf6a8750554f0810d75daba591173b6b +size 87732 diff --git a/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_origin.pdf b/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b65d3bda943733f86c225f7b1eaf67e37f0eb2cb --- /dev/null +++ b/hamboxdelvingintomininghighqualityanchorsonfacedetection/8d220a47-465d-4e7c-a5be-3294922c8765_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3e66fec77e6fae2a8d1e53f4279af3224bbeea255a85bfbd959d8471468b6cf +size 9530567 diff --git a/hamboxdelvingintomininghighqualityanchorsonfacedetection/full.md b/hamboxdelvingintomininghighqualityanchorsonfacedetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..24374dc3b0e0622d1942e1957213e066cb90246d --- /dev/null +++ b/hamboxdelvingintomininghighqualityanchorsonfacedetection/full.md @@ -0,0 +1,317 @@ +# HAMBox: Delving into Mining High-quality Anchors on Face Detection + +Yang Liu*† + +NCEPU + +Beijing + +gxly1314@gmail.com + +Xu Tang* Junyu Han + +Jingtuo Liu Dinger Rui + +Baidu Inc. + +Beijing + +{tangxu02,hanjunyu, + +liujingtuo, dengerrui}@baidu.com + +Xiang Wu + +CAS + +Beijing + +alfredxiangwu@gmail.com + +# Abstract + +Current face detectors utilize anchors to frame a multitask learning problem which combines classification and bounding box regression. Effective anchor design and anchor matching strategy enable face detectors to localize faces under large pose and scale variations. However, we observe that more than $80\%$ correctly predicted bounding boxes are regressed from the unmatched anchors (the IoUs between anchors and target faces are lower than a threshold) in the inference phase. It indicates that these unmatched anchors perform excellent regression ability, but the existing methods neglect to learn from them. In this paper, we propose an Online High-quality Anchor Mining Strategy (HAMBox), which explicitly helps outer faces compensate with high-quality anchors. Our proposed HAMBox method could be a general strategy for anchor-based single-stage face detection. Experiments on various datasets, including WIDER FACE, FDDB, AFW and PASCAL Face, demonstrate the superiority of the proposed method. + +# 1. Introduction + +Face detection is a fundamental task for many high-level face-based applications, such as face alignment [28], face recognition [1] and face aging [25]. Deriving from early face detectors with hand-crafted features, modern detectors have been significantly improved owing to the robust features learnt with deep Convolutional Neural Networks (CNNs) [10]. Current state-of-the-art face detectors are usually based on anchor-based deep CNNs, inspired by their successes on the general object detection. + +Different from general object detectors, face detectors often face smaller variations of aspect ratios (from 1:1 to 1:1.5) but much larger scale variations (face area, from several pixels to thousands of pixels). Considering the large + +![](images/76e55930534fa95624a9b239a3949405366613d62f2d477260ed989b5afef126.jpg) +(a) Average Number of Anchors Matched to Each Face + +![](images/144028f0e699e54a5416d008d6201775a6d2a9f258060fa8cc25d8c435c5c5cc.jpg) +(b) Proportion of Faces that can Match with Anchors +Figure 1. Two crucial factors in designing anchor scales on the WIDER FACE dataset. (a) As the scale of anchor increases, the average number of anchors matched to each face also increases. (b) The proportion of faces that can match the anchors decreases significantly outside a specific interval ([0.43, 0.7]). + +variations of scales, Zhang et al. [29] tile anchors on a wide range of layers and design anchor scales according to the effective receptive field. Current state-of-the-art detectors [21, 11] capture the locations of various face scales by utilizing Feature Pyramid Network (FPN) [12]. FPN is an effective way to exploit the inherent multi-scale features for constructing feature pyramids in a top-down manner. It adopts lateral connection from the high-level deeper features to the low-level ones. Then from the perspective of designing anchor setting, anchor-based detectors with FPN continue to resolve this by raising the number of anchors from different aspects (e.g., anchor stride, and ratio anchors [30, 23]). However, increasing the number of anchors remarkably reduces the performance of a face detector, especially when adopting the feature map conv2 or P2 (in Resnet-50) for recalling small faces empirically. + +As far as we know, for an anchor-based detector, effective anchor design strategies are necessary to achieve high performance. $\mathrm{S}^{3}\mathrm{FD}$ [29] adopts single scale and aspect ratio anchors for each detection stage. Nonetheless, choosing the proper anchor scale remains a big challenge, which generally produced by the following misalignment phenomenon. Figure 1 shows 'the average number of anchors matched to each face' and 'the proportion of all faces that can match the anchors' across different anchor scales, which are two in + +![](images/3e0edcc2645b3df79e98681ac841f5f406c638e7d7f47d9c937e5adab1df5080.jpg) +(a) Cumulative Desity Curve of IoU + +![](images/6dda828d0ac62e961b0ccde5d94dfb1435c4edac379fea84d14ab9b334a55dcf.jpg) +(b) Performance of Compensated Anchors + +![](images/2558d1133ba5fb12bcf65b723f3c8469a1f83eb2cdb3f6a00728dfbc08b82277.jpg) +(c) Proportion of unmatched High-quality Anchors + +![](images/00df0b087245ba42dad1f239440a858e5b946edbed553757dceb6267197dbb53.jpg) +(d) Performance of Matched High-quality Anchors +Figure 2. The problem of standard anchor matching strategy during training and inference (on the WIDER FACE dataset). (a) During inference, only $11\%$ of all correctly predicted bounding boxes are regressed by matched anchors. (b) PBB represents 'Predicted Bounding Boxes'. When using our HAMBox strategy, the IoUs between ground-truths and predicted bounding boxes regressed by compensated anchors are much higher than standard anchor matching strategy during training. (c) During training, the average number of unmatched high-quality anchors occupies a surprisingly $65\%$ proportion of all high-quality anchors. (d) CPBB represents 'Correctly Predicted Bounding Boxes'. During inference, the number of matched high-quality anchors dramatically decreases after NMS, representing some unmatched anchors have higher regression ability. All these results demonstrate that the standard anchor matching strategy can not utilize high-quality negative anchors effectively, which play essential roles whatever during training or inference. + +dicative factors to be considered in designing proper anchor scale. With the increase of anchor scales, although the number of anchors matched with each face steadily grows, the proportion of faces which are capable of matching anchors gradually descends. Moreover, this misalignment usually leads to a heuristical anchor scale designation. + +To alleviate the imbalance between 'the average number of anchors matched to each face' and 'the proportion of all faces that can match the anchors' as discussed above, two representative solutions have been proposed: Firstly, $\mathrm{S}^3\mathrm{FD}$ [29] introduces an anchor compensation strategy by offsetting anchors for outer faces; Secondly, Zhu et al. [30] formulate a metric named Expected Maximum Overlap (EMO) to obtain more reasonable anchor stride and receptive field. All these solutions focus on helping outer faces match more anchors during the training phase. However, they also bring + +a large number of redundant or low-quality anchors. (see the olive line of Figure 2(b)). + +In this paper, we conduct an anchor matching statistic experiment on a well-trained face detector [21] and find an intriguing phenomenon. The red line in Figure 2(a) represents the cumulative distribution curve of IoU between the ground-truth and the anchors which can be regressed to correctly predicted bounding boxes. We surprisingly observe that only $11\%$ of all correctly predicted bounding boxes are regressed by matched anchors. So, not only the matched anchors but also some unmatched ones play a critical role in face detection. However, in the phase of training, those unmatched anchors are assigned with background labels, which are unreasonable supervision signals for classification branch consequently. Effectively leveraging these unmatched anchors is expected to improve the detection performance. + +Motivated by this observation, we identify two key issues in current anchor matching strategies as follows: + +- The majority of compensated anchors are of low-quality. Figure 2(b) shows the regression ability of compensated anchors during training when adopting the standard anchor matching strategy [18]. Apparently, compensated anchors have a poor performance on location regression (average IoU between the bounding boxes regressed by compensated anchors and the ground-truth is 0.42). In other words, this method helps those outer faces matching more low-quality anchors, instead of high-quality ones. +- Many unmatched anchors in the training phase actually have strong localization ability. As shown in Figure 2(c), around $65\%$ of all high-quality anchors2 are unmatched anchors during training. Based on the above observations, we argue that the current anchor matching strategy is neither flexible nor sufficient to utilize the anchors in face detection. As illustrated in Figure 2(d), the red, blue and green bars denote the number of faces matched to anchors $(\mathrm{IoU} > 0.35^{3})$ , matched to correctly predicted bounding boxes $(\mathrm{IoU} > 0.5^{4})$ and matched to correctly predicted bounding boxes after Non-Maximum Suppression (NMS). It is obvious that the correctly predicted bounding boxes regressed by unmatched anchors suppress the ones regressed by matched anchors during NMS. Lots of unmatched anchors also have strong abilities for regression. + +![](images/10975ba41a91b1cbf962fbce2aa87d2e4742f8400b8958a70a14ed608303d4f0.jpg) +Figure 3. Visualization of the quality of compensated anchors through two methods. In the early stage of training, our method does not compensate anchors for outer faces. Then with the increasing of training iteration, our method is gradually mining unmatched high-quality anchors for outer ones, which have higher IoU than anchors generated by standard anchor matching strategy. + +To address this issue, we propose an Online High-quality Anchor Mining Strategy (HAMBox) method. The idea is to mine those high-quality anchors consistently to help outer faces compensate more anchors with the ability of precise regression. Figure 2(b) and Figure 3 show that the quality of our compensated anchors has a significant enhancement than standard anchor mathing strategy's. In Figure 3, when using standard anchor matching strategy, the unmatched anchors are assigned with background labels. With the increase of training iteration, our Online High-quality Anchor Compensation Strategy is gradually mining unmatched high-quality anchors for outer faces. Moreover, the unmatched anchors could regress high-quality bounding boxes with higher IoU than anchors generated by standard anchor matching strategy. After mining high-quality anchors, we further propose regression-aware focal loss to effectively weight those new compensated high-quality anchors. Dynamic weights based on IoU are added for new compensated anchors mainly by considering the weak connection between location and classification. Benefiting from online high-quality anchor compensation strategy and regression-aware focal loss, we achieve $91.6\%$ AP on the WIDER FACE [27] validation hard set, with the baseline of RetinaNet [13]. Furthermore, we add some popular modules, including SSH head [17], deep head [13], and pyramid anchors [21], and achieve $93.3\%$ AP, which outperform current state-of-the-art model [11] by a large margin of $2.9\%$ AP. + +In summary, our main contributions can be summarized as: + +- We observe an inspiring phenomenon that some unmatched anchors have strong regression ability, and the current box regression branch neglects to learn unmatched anchors. +- Based on the observations, we propose an Online High-quality Anchor Mining Strategy (HAMBox) to + +sample high-quality anchors for training. Benefiting from HAMBox, we can provide sufficient and effective anchors for outer faces in the training phase; + +- Thanks to the high-quality anchors, a regression-aware focal loss assists in face detector training with a flexible way; +- Our approach outperforms the state-of-the-art methods by $2.9\%$ and $2.3\%$ AP on the WIDER FACE validation and test hard-set, respectively. Moreover, we achieve $57.45\%$ (validation) / $57.13\%$ (test) mAP on the Face Detection track of WIDER Face and Pedestrian Challenge 2019. + +# 2. Related Work + +Face detection is a fundamental yet challenging computer vision task. Viola and Jones [22] first utilizes Haar features and AdaBoost to train a face detector. After that, more following works pay attention to combining multi models to get discriminative features. For example, DPM [3] proposes an extra model to capture human lateral feature and merges it with front and back body features. All the face detectors based on hand-craft features are optimized with each sub-model separately. Due to both weak features and classifiers, the performance of these face detectors is limited in the practical scenario. + +Recently, owing to the rapid development of deep convolutional networks [10, 5, 19, 20] on image classification and object detection, face detection has made significant progress on large variations, including poses, scales, blur and occlusions, etc., in practice. By introducing the core ideas of hand-craft face detector, Cascade CNN and Multi-task CNN (MTCNN) propose a coarse-to-fine framework to capture faces via deep CNNs. With the flourish of general object detectors [18, 14], [9] and SSH [17] introduce anchor-based detectors to face detection. Yang et al. [27] + +collect WIDER FACE dataset, which contains rich annotations, including occlusions, poses, event categories, and face bounding boxes. The WIDER FACE dataset pushes forward to the research of face detection, focusing on the extreme variations, including scale, pose and occlusion. Recently, most state-of-the-art face detectors focus on these extreme variations with three following aspects: image pyramid, feature pyramid and context module. HR [7] designs image pyramids of the low, medium and high resolutions for training and testing, which significantly boosts the performance on extreme scale variations (from several pixels to thousands of pixels). FAN [23] introduces attention modules and feature pyramid network [12] to capture occluded faces. SSH [17] builds a detection module with a rich receptive field. PyramidBox [21] formulates a data-anchor-sampling strategy to increase the proportion of small faces in the training data. Moreover, by designing a scale propose network, SAFD [4] generates a scale histogram and further automatically normalizes face scales prior for optimizing face detectors. DSFD [11] introduces small faces supervision signals on the backbone, which implicitly boosts the performance of pyramid features. + +Considering some works on anchor design and sampling strategies, $\mathrm{S}^3\mathrm{FD}$ [29] proposes a new anchor matching strategy which helps the outer faces match more anchors. SRN [2] introduces a Selective Two-step Classification to ignore training easy sample anchors in the second stage. ZCC [30] introduces Expected Max Score to evaluate the quality of anchor matching, which helps to design anchor stride. Group sampling [16] conducts lots of experiments on the ratio of matched and unmatched anchors, which emphasizes the importance of the ratio for matched and unmatched anchors. In this paper, inspired by the anchor matching strategy in $\mathrm{S}^3\mathrm{FD}$ [29] and the statistical curve discussed in Figure 1 and Figure 2, we propose an Online High-quality Anchor Mining Strategy (HAMBox), as well as a regression aware focal loss. Benefiting from these methods, we achieve a strong face detector, compared with other state-of-the-art face detection methods. + +# 3. Online High-quality Anchor Mining + +This section presents the proposed Online High-quality Anchor Mining Strategy (HAMBox) to compensate outer faces with the most proper anchors. We firstly build our high-recall face detector based on RetinaNet [13]. Then we demonstrate the online high-quality anchor compensation strategy in detail. Finally, we formulate a regression-aware focal loss for the compensated anchors. + +# 3.1. High-recall Anchor-based Face Detector + +Current anchor-based face detectors utilize predefined anchors to frame a multi-task learning problem, which combines classification and bounding box regression branches. + +We start with RetinaNet [13] as the baseline. The backbone is ResNet-50. Following the settings in [29], we employ the feature map of conv2 layer to improve the performance of face detector. The reason is that around $40\%$ faces are matched to conv2 anchors on the WIDER FACE benchmark. Furthermore, it is important to design anchors for training a well-performed detector. Therefore, different from the general object detection with multiple anchor scales and aspect ratios, we set only one anchor scale and one aspect ratio at each prediction layer for our default anchor settings. + +Inspired by statistical results in Figure 1, we change the anchor scale to match more extreme face scales. The advantage and disadvantage of this anchor setting are equally obvious. From the perspective of advantage, our strategy can match over $95\%$ of all the faces on the WIDER FACE benchmark, a small difference comparing to multi-scale and ratio anchors that can match $98.46\%$ of faces. At the same time, our method uses three times or nine times fewer anchors than the latter anchor setting with multi-scale and ratio, leading model to focus more on the regression of useful anchors and further get higher detecting performance. From the perspective of disadvantage, it is harmful to the robustness of the model because decreasing the number of faces matched to anchors. This obstruction will be resolved in the following two sections. + +# 3.2. Online High-quality Anchor Compensation Strategy + +After finishing the design of anchor scale and ratio, we further need to allocate anchors with their nearest adjacent ground-truth or background. As shown in Figure 4, the current anchor matching strategy consists of two steps. A face firstly matches anchors with IoU higher than a threshold. Then faces that do not match with any anchor would be compensated with anchors that have the max IoU with them. Obviously, compensated anchors in the second step may reduce the performance of regression and classification of the network since these anchors initially have lower IoU with faces, as shown in Figure 4(c). + +In Figure 2(b), we surprisingly find that with the increase of iterations, some unmatched anchors have the ability to make correct predictions while those are ignored on regression branch and even assigned as background on classification branch. Inspired by this observation, we propose an Online High-quality Anchor Compensation strategy to resolve current misaligned supervision signal. Firstly, each face matches the anchors with IoU higher than a threshold, but for those remaining outer faces, we do not compensate any anchors. Secondly, at the end of forward propagation during training, each anchor computes regression bounding + +![](images/35f9a4478b561edb2ea55ce19b0f3b81556b72a551e1675eb6166c3ea9fecc98.jpg) +(a) Face Matched to Anchor on the First Step of Standard Anchor Matching Strategy + +![](images/105fb0661f418f651b4708fccfab4cb6ff6ecb5deafa577b182e6509c2ede20c.jpg) +(b) Face Matched to Anchor on the Second Step of Standard Anchor Matching Strategy +Figure 4. (a) Two different stages on standard anchor matching strategy, the blue rectangle represents ground-truth and the red one is an anchor matched with it. (c) Cumulative Density Curve of IoU between ground-truth and its matched anchor on different stages. + +![](images/8ed88f28cb882cc2a8ada92ad1c2acb3ce3ce682a7be43c25db25cb4803b4f66.jpg) +(c) Cumulative Density Curve of IoU + +box through its related regression coordinates. We define this regression bounding box as $B_{reg}$ and $F_{outer}$ represents outer faces. Finally, for each face in $F_{outer}$ , we compute its IoU with $B_{reg}$ and compensate this face with $N$ extra unmatched anchors. We define all IoUs as $IoU_{set}$ . These $N$ compensated anchors are selected according to two rules. 1) The IoUs between their corresponding regression bounding boxes and target faces should be greater than $T$ ( $T$ represents an online positive anchor threshold). 2) These IoUs (calculated in rule 1) should be in the top- $K$ highest IoU in $IoU_{set}$ . $K$ is a hyperparameter that represents the max number of anchors that $F_{outer}$ can be matched with. If $N$ is greater than $K - M$ after filtering out by above two rules, we select top- $(K - M)$ highest IoU anchors in these $N$ unmatched anchors to compensate this face and set $N = K - M$ . $M$ denotes the number of anchors that faces already matched with in the first step. We have done many experiments in ablation study by varying $T$ , $K$ . Details can be seen in Algorithm 1. + +# 3.3. Regression-aware Focal Loss + +After the analysis of two subsections above, we have mined those high-quality anchors and the following problem is to make full use of these anchors effectively. Furthermore, we propose a regression-aware focal loss to give more reasonable weights to those new compensated high-quality anchors, which are newly mined for outer faces by Online High-quality Anchor Compensation Strategy. + +Two improvements have been made on focal loss [13]. (1) Considering the weak connection between location and classification on new compensated anchors, we add dynamic weights based on IoU for these compensated ones. (2) We define anchors satisfying the following three conditions simultaneously as ignored anchors (which are not optimized during training): a) Belong to the high-quality anchors. b) Be assigned as background in the first step of anchor matching strategy. c) Not included in new compen + +sated anchors. We define the loss as: + +$$ +\begin{array}{l} L _ {c l s} (p _ {i}) = \frac {1}{N _ {c o m}} \sum_ {i \in \psi} F _ {i} L _ {f l} (p _ {i}, g _ {i} ^ {*}) \\ + \frac {1}{N _ {\text {n o r m}}} \sum_ {i \in \Omega} \left(1 _ {\left(l _ {i} ^ {*} = 0\right)} 1 _ {\left(F _ {i} < 0. 5\right)} + 1 _ {\left(l _ {i} ^ {*} = 1\right)}\right) L _ {f l} \left(p _ {i}, l _ {i} ^ {*}\right) \tag {1} \\ \end{array} +$$ + +where $i$ is the anchor index in a training-batch, $p_i$ is the predicted probability of the anchor $i$ . $l_i^*$ is the class label of anchor $i$ , which is assigned with the label on the first step of standard anchor matching strategy. $g_i^*$ is the label of our newly compensated anchors, which are revised from backgrounds to foregrounds. $F_i$ is the IoU between the corresponding regression bounding box and its target groundtruth. $\Omega$ represents a set of all matched and unmatched low-quality anchors $^6$ and $\psi$ represents a set of newly compensated anchors. $N_{norm}$ is the number of normally matched anchors in $\Omega$ and $N_{com}$ is the total number of compensated anchors in $\psi$ . $L_{fl}$ is the normal sigmoid focal loss over two classes (face foreground and background). In addition, the supervision for new compensated anchors is added to the location loss and the specific equation is shown as below: + +$$ +\begin{array}{l} L _ {l o c} \left(x _ {i}\right) = \frac {1}{N _ {c o m}} \sum_ {i \in \psi} L _ {S m o o t h L 1} \left(x _ {i}, x _ {i} ^ {*}\right) \\ + \frac {1}{N _ {\text {n o r m}}} \sum_ {i \in \Omega} ^ {\varepsilon \in \varphi} L _ {\text {S m o o t h L 1}} \left(x _ {i}, x _ {i} ^ {*}\right) \tag {2} \\ \end{array} +$$ + +where $x_{i}^{*}$ is the ground-truth location coordinates of anchor $i$ . $L_{SmoothL1}$ is a normal location loss inspired by Faster-RCNN [18]. All other parameters are similar to $L_{cls}$ 's. + +# 4. Experiments + +In this section, we first show the effectiveness of our proposed strategies with comprehensive ablative experiments. Then with the final optimal model, our approach achieves state-of-the-art results on face detection benchmarks. + +Algorithm 1 Online high-quality anchor mining +Input: $B,G,T,K,D,L,R,A$ $B$ is a set of regression bounding boxes, in the form of $(x_0,y_0,x_1,y_1)$ $X$ is a set of ground-truth, in the form of $(x_0,y_0,x_1,$ $y_{1})$ $T$ is an online anchor mining threshold (see details on Subsection 3.2) + $K$ is a hyperparameter and represents the max number of anchors that $F_{outer}$ can be matched with. + $D$ is a Dict, key is ground-truth, item is the number of anchors that ground-truth can match in the first step of our HAMBox method. + $L$ is a Dict, key is anchor index, item is a label that anchor index is assigned with in the final process of our HAMBox method. + $R$ is a Dict, key is anchor index, item is encoded coordinates of the key during standard anchor matching strategy. + $A$ is a Dict, key is anchor index, item is coordinates of the key, in the form of $(x_0,y_0,x_1,y_1)$ +Output: $R$ and $L$ after using our HAMBox method. +1: for $x_{i}$ in $X$ do +2: if $D(x_{i}) > = K$ then +3: continue +4: end if +5: CompensatedNumber $= K - D(g_{i})$ +6: OnlineIoU $\Leftarrow$ IoU $(x_i,B)$ ,AnchorIdx +7: SortedOnlineIoU $=$ sorted(OnlineIoU,key $=$ IoU, reverse $=$ True, Iou $>$ T) +8: if len(SortedOnlineIoU) $= 0$ then +9: continue +10: end if +11: for IoU,AnchorIdx in SortedOnlineIoU do +12: if $L(AncorhIdx) = 1$ then +13: continue +14: end if +15: CompensatedNumber $- = 1$ +16: $L(\text{AnchorIdx}) = 1$ +17: R(AncorhIdx) encode(A(AncorhIdx),ground-truth) +18: if CompensatedNumber $= 0$ then +19: break +20: end if +21: end for +22: end for +23: Return $R,L$ + +# 4.1. Ablation Study + +The WIDER FACE dataset is used in this ablation study. This dataset has 32,203 images with 393,703 labeled faces with huge variability in scales, occlusions and poses. Our + +networks are only trained on the training set and evaluated both on validation and test set. Average Precision (AP) score is used as the evaluation metric. + +Data Augmentation Our models are trained with following data augmentation strategies: + +Color distort: Apply some photometric distortions similar to [6]. +- Data anchor sampling: This method [21] resizes all train images through reshaping a random face in this image to a smaller size. +- Horizontal flip: After data-anchor-sampling, the cropped image patch is resized to $640 \times 640$ and horizontally flipped with a probability of 0.5. + +Baseline. We build an anchor-based detector with ResNet-50 guided by the RetinaNet as our baseline face detector. It differs from the original RetinaNet [13] in the following four aspects: Firstly, we set 6 anchors whose scales are from the set {16, 32, 64, 128, 256, 512}, and all anchors' aspect ratios are set to 1:1. Secondly, we use LFPN [21] instead of FPN [12] for feature fusion since top two high-level features are extracted from regions with little context and may introduce noise for detecting small faces. Thirdly, we do not use deep head owing to two main factors. One is that the time cost of the training process is too high, the other is that our baseline is significantly higher than that of any other SOTA works on the WIDER FACE hard dataset. Finally, the threshold of IoU for matched anchors is changed to 0.35, and ignore-zone is not implemented. + +Optimization Details. All models are initialized with the pre-trained weights of ResNet-50 and fine-tuned on WIDER FACE training set. Each training iteration contains seven images per GPU for a 4 NVIDIA Tesla V100 GPUs server. The initial learning rate is set to 0.01 and decreases to 0.001 after 110k iterations. All the models are trained for 140k iterations by synchronized SGD. The momentum and weight decay are set to 0.9 and $5 \times 10^{-5}$ , respectively. + +The effect of High-recall Anchor-based Detector As discussed above, the difference between our high-recall detector and baseline detector is the pre-defined anchor scale. Inspired by Figure 1, we design our method with anchor scales \{16, 32, 64, 128, 256, 512\} * 0.68 tiled on pyramid feature maps from P2 to P6. + +To better understand the advantage of our method, we conduct four experiments, which are shown in Table 1. First step on standard anchor matching strategy with anchor scale ratio 0.68 (denoted as SMS(ratio=0.68)); Two-step on standard anchor matching strategy with anchor scale ratio 0.68 (denoted as DMS(ratio=0.68)); Two-step on standard anchor matching strategy with anchor scale ratio 0.5 whose scale could help more outer faces match anchor while significantly decreasing the number of anchors matched + +![](images/df15dd1cf3b63cc6dc5d26c72887daaa0893be42858468f00b2b89832aa3a918.jpg) +(a) AFW + +![](images/4b758c63e9a216e1dcb9a775bfbc1a4863b18c6d7f2302e4da577da07910d244.jpg) +(b) PASCAL Face + +![](images/605daca6813894a7b933e47f9987b8ed625277d029cfbc1b69e7dd49b7a25401.jpg) +(c) FDDB +Figure 5. Evaluation on the common face detection datasets. + +with each face (denoted as DMS(ratio=0.50)); New anchor matching strategy introduced by S $^3$ FD [29] with anchor scale ratio 0.68 (denoted as NAMS(ratio=0.68)). Compared to the baseline, SMS(ratio=0.68), DMS(ratio=0.68), NAMS(ratio=0.68) provide a significant improvement on the hard subset (rising by $1.2\%$ , $0.8\%$ , $0.8\%$ AP respectively) and DMS(ratio=0.50) is with no improvements on the hard subset (decreasing by $0.7\%$ ). Through these experimental results, we could draw two conclusions: On the one hand, enhancing the proportion of faces that can be matched with anchors could improve the model performance. However, with the continuously decrease on the scale of anchor to enhance this proportion, the remaining faces are more difficult to match and the number of anchors that each face can match with decreases dramatically, which are the main reasons why the performance of DMS(ratio=0.50) is $1.5\%$ AP lower than DMS(ratio=0.68) on the hard dataset. On the other hand, NAMS(ratio=0.68) and DMS(ratio=0.68) achieve almost same performance with SMS(ratio=0.68), suggesting that these two anchor compensation methods have less influence on the performance of the detector. Thus we use the SMS(ratio=0.68) method in the following experiments. In addition, DMS(ratio=0.68) and NAMS(ratio=0.68) would be regarded as comparisons, respectively. And the anchor ratio of SMS in Table 3 and 4 is set to 0.68. + +Table 1. AP performance on various anchor setting and anchor matching strategy on WIDER FACE validation subset. + +
SubsetratioEasyMediumHard
Baseline1.000.9430.9310.894
+SMS0.680.9490.9450.906
+DMS0.680.9540.9490.902
+DMS0.500.9380.9220.887
+NAMS0.680.9510.9480.902
+ +The Effect of Online High-quality Anchor Mining Next, we look into the effect of our proposed online high-quality anchor mining strategy. In this paragraph, we mainly discuss the effect of two hyper-parameters in our method. The performance under different $K$ , $T$ (defined in Subsection 3.2) is shown in Table 2. It shows that: (1) the performance gets better when $T$ increases and it is eas + +ier to conclude that the higher the quality of compensated anchors, the better the performance of the model. (2) The performance gets better when $K$ is smaller than 5 and gets worse when $K$ is larger than 5, suggesting that it is not good to increase too large numbers of compensated anchors that each outer face can match since the anchors off-limits are redundant for their corresponding faces. After multiple ablative experiments, we find the optimal $\mathrm{K}(3)$ , $\mathrm{T}(8)$ and further increase the performance with $0.7\%$ AP. + +Table 2. Varying $T$ , $K$ for regression-aware focal loss on WIDER FACE validation subset. + +
KTEasyMediumHard
30.50.9450.9390.902
70.50.9410.9370.898
30.70.9470.9430.911
50.70.9520.9410.909
30.80.9570.9510.913
30.90.9620.9430.911
+ +The Effect of Regression-aware Focal Loss This regression-aware focal loss completes our final HAMBox model. As discussed above, this loss gives those new matched anchors a reasonable weight which simultaneously helps model training these anchors more steadily and precisely. Results using our regression-aware focal loss (denoted as RAL) are shown in Table 4, and the performance of our detector continues to increase $0.3\%$ AP. + +Our method vs ZCC and NAMS To further verify the effectiveness of our method, we compare our method with NAMS [29] and ZCC [30]. As shown in Table 3, our method outperforms theirs $6.4\%$ and $5.5\%$ AP respectively on their paper baseline. Moreover, in our baseline, ours also outperforms theirs $2.0\%$ and $3.4\%$ AP, respectively. Note that our method offers more high-quality anchors to help bounding box regression and classification branch optimize well. + +The Effect of Other Tricks As shown in Table 4, we introduce SSH [17], deep head (DH) [13] and pyramid anchor (PA) [21] modules to further improve the performance of detector and achieve best AP among all state-of-the-art face detectors [11, 2, 15, 21, 24, 30, 29, 17, 7]. + +![](images/2450d232246415ed0bce14f8b6a6cdcff61089fd4e79d43751c9402113438211.jpg) +(a) Val: Easy + +![](images/ceb40aee8ca71ee851d139e254abb06855101fcd9fcf2b6fa0b0da177b32bc30.jpg) +(b) Val: Medium + +![](images/e9458c89568a7a639aced177559cd8d8c3e7adaaf183345cfd12ecc21e3693e4.jpg) +(c) Val: Hard + +![](images/dd7d7288457c9da7a2bf81e4910f81eba55ddbaed36595657c3e8b10cb835c2b.jpg) +(d) Test: Easy + +![](images/c4b160c809c78e873975aedf6a08ab71ff2775a10bb94847f90e8c0ba5916a38.jpg) +(e) Test: Medium + +![](images/a7bfc4ef5167cb1c73dd023dc5ed29545622d6fe00e10b74379b0a5a68a3ec5b.jpg) +(f) Test: Hard +Figure 6. Precision-Recall (PR) curves on WIDER FACE validation and testing subsets. + +Table 3. AP performance of our model with various anchor matching strategy on WIDER FACE validation subset. * denotes the reproduced performance by us, and APs in NAMS and ZCC represent the performance presented by their papers. + +
SubsetEasyMediumHard
NAMS0.9370.9240.852
ZCC0.9490.9330.861
Baseline + NAMS*0.9410.9370.896
Baseline + ZCC*0.9430.9420.882
Baseline + SMS + OAM + RAL0.9620.9530.916
+ +Table 4. AP performance of our proposed modules and additional tricks on WIDER FACE validation subset. + +
BaselineSMSOAMRALDHSSHPAEasyMediumHard
✓------0.9430.9310.894
✓✓-----0.9490.9450.906
✓✓✓----0.9570.9510.913
✓✓✓✓---0.9620.9530.916
✓✓✓✓✓--0.9640.9550.922
✓✓✓✓✓✓-0.9680.9590.927
✓✓✓✓✓✓✓0.9700.9640.933
+ +# 4.2. Evaluation on Common Benchmarks + +We evaluate our proposed method on the common face detection benchmarks, including WIDER FACE [27], Annotated Faces in the Wild (AFW) [31], PASCAL Faces [26], FDDB [8]. Our face detector is trained only using WIDER FACE training set and is tested on those benchmarks. + +WIDER FACE Dataset We report the performance of our face detection system on the WIDER FACE [27] testing set with 16,097 images. Detection results are sent to the database server for receiving the precision-recall curves. Figure 6 illustrates the precision-recall curves along with + +AP scores. Our proposed method achieves $97.0\%$ (Easy), $96.4\%$ (Medium), $93.3\%$ (Hard) on validation dataset and $95.9\%$ (Easy), $95.5\%$ (Medium), $92.3\%$ (Hard) on test dataset. + +AFW Dataset This dataset [31] consists of 205 images with 473 annotated faces. Figure 5(a) shows that our detector outperforms others by a considerable margin. + +PASCAL Face Dataset This dataset [26] has 851 images with 1,335 annotated faces. Figure 5(b) demonstrates the superiority of our method. + +FDDB Dataset This dataset [8] has 2,845 images with 5,171 annotated faces. Most of them are with low image resolutions and complicated scenes, such as occlusions, huge poses. Figure 5(c) shows our proposed method outperforms all state-of-the-art models. + +# 5. Conclusion + +In this paper, we first observe an interesting phenomenon that only $11\%$ correctly predicted bounding boxes are regressed from the unmatched anchors in the inference phase. Then we further propose an online high-quality anchor mining strategy that helps outer faces match high-quality anchors. Our method first enhances the proportion of face matched with anchor, and then we propose an online high-quality anchor compensation strategy for outer faces. Finally, we design a regression-aware focal loss for new compensated anchors. We conduct extensive experiments on the AFW, PASCAL Face, FDDB, WIDER FACE datasets and achieve the state-of-the-art detection performance. + +# References + +[1] Grigory Antipov, Moez Baccouche, and Jean-Luc Dugelay. Face aging with conditional generative adversarial networks. In ICIP, pages 2089-2093. IEEE, 2017. +[2] Cheng Chi, Shifeng Zhang, Junliang Xing, Zhen Lei, Stan Z Li, and Xudong Zou. Selective refinement network for high performance face detection. In AAAI, volume 33, pages 8231-8238, 2019. +[3] 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. +[4] Zekun Hao, Yu Liu, Hongwei Qin, Junjie Yan, Xiu Li, and Xiaolin Hu. Scale-aware face detection. In CVPR, pages 6186-6195, 2017. +[5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[6] Andrew G Howard. Some improvements on deep convolutional neural network based image classification. arXiv preprint arXiv:1312.5402, 2013. +[7] Peiyun Hu and Deva Ramanan. Finding tiny faces. In CVPR, pages 951-959, 2017. +[8] Vidit Jain and Erik Learned-Miller. Fddb: A benchmark for face detection in unconstrained settings. 2010. +[9] Huaizu Jiang and Erik Learned-Miller. Face detection with the faster r-cnn. In FG, pages 650-657. IEEE, 2017. +[10] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097-1105, 2012. +[11] Jian Li, Yabiao Wang, Changan Wang, Ying Tai, Jianjun Qian, Jian Yang, Chengjie Wang, Jilin Li, and Feiyue Huang. Dsfd: dual shot face detector. In CVPR, pages 5060-5069, 2019. +[12] Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, pages 2117-2125, 2017. +[13] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. In ICCV, pages 2980-2988, 2017. +[14] 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. +[15] Wei Liu, Shengcai Liao, Weiqiang Ren, Weidong Hu, and Yinan Yu. High-level semantic feature detection: A new perspective for pedestrian detection. In CVPR, pages 5187-5196, 2019. +[16] Xiang Ming, Fangyun Wei, Ting Zhang, Dong Chen, and Fang Wen. Group sampling for scale invariant face detection. In CVPR, pages 3446-3456, 2019. +[17] Mahyar Najibi, Pouya Samangouei, Rama Chellappa, and Larry S Davis. Ssh: Single stage headless face detector. In ICCV, pages 4875-4884, 2017. +[18] 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. + +[19] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[20] 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, pages 1-9, 2015. +[21] Xu Tang, Daniel K Du, Zeqiang He, and Jingtuo Liu. Pyramidbox: A context-assisted single shot face detector. In ECCV, pages 797-813, 2018. +[22] Paul Viola and Michael J Jones. Robust real-time face detection. IJCV, 57(2):137-154, 2004. +[23] Jianfeng Wang, Ye Yuan, and Gang Yu. Face attention network: An effective face detector for the occluded faces. arXiv preprint arXiv:1711.07246, 2017. +[24] Yitong Wang, Xing Ji, Zheng Zhou, Hao Wang, and Zhifeng Li. Detecting faces using region-based fully convolutional networks. arXiv preprint arXiv:1709.05256, 2017. +[25] Zongwei Wang, Xu Tang, Weixin Luo, and Shenghua Gao. Face aging with identity-preserved conditional generative adversarial networks. In CVPR, pages 7939-7947, 2018. +[26] Junjie Yan, Xuzong Zhang, Zhen Lei, and Stan Z Li. Face detection by structural models. Image and Vision Computing, 32(10):790-799, 2014. +[27] Shuo Yang, Ping Luo, Chen-Change Loy, and Xiaou Tang. Wider face: A face detection benchmark. In CVPR, pages 5525-5533, 2016. +[28] Jie Zhang, Shiguang Shan, Meina Kan, and Xilin Chen. Coarse-to-fine auto-encoder networks (cfan) for real-time face alignment. In ECCV, pages 1-16. Springer, 2014. +[29] Shifeng Zhang, Xiangyu Zhu, Zhen Lei, Hailin Shi, Xiaobo Wang, and Stan Z Li. S3fd: Single shot scale-invariant face detector. In ICCV, pages 192-201, 2017. +[30] Chenchen Zhu, Ran Tao, Khoa Luu, and Marios Savvides. Seeing small faces from robust anchor's perspective. In ICCV, pages 5127-5136, 2018. +[31] Xiangxin Zhu and Deva Ramanan. Face detection, pose estimation, and landmark localization in the wild. In CVPR, pages 2879-2886. IEEE, 2012. \ No newline at end of file diff --git a/hamboxdelvingintomininghighqualityanchorsonfacedetection/images.zip b/hamboxdelvingintomininghighqualityanchorsonfacedetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9ee0c1e2ab66bd5165e82ba03a63edbf664bd4d5 --- /dev/null +++ b/hamboxdelvingintomininghighqualityanchorsonfacedetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c61933aec96ccf595e91d53452153f9e44ba0e6e35baced6ed0ee75b9cc41b0 +size 404371 diff --git a/hamboxdelvingintomininghighqualityanchorsonfacedetection/layout.json b/hamboxdelvingintomininghighqualityanchorsonfacedetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e012b879dbb1330d1cb849fa473064d7f0aac513 --- /dev/null +++ b/hamboxdelvingintomininghighqualityanchorsonfacedetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:990933be5789f5eea5261d3b61ac52613a90582d02cff35201fa4e2603e2f27d +size 410126 diff --git a/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_content_list.json b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5d89e9155db37cd4bdd8a155823d70c963592b38 --- /dev/null +++ b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d4e2fde1cbb2381aa1858db02b468b669ac4dd88938b05c3d813436e64a4428 +size 76502 diff --git a/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_model.json b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dfb153b433b32a212a143369167cdadbfcef44fb --- /dev/null +++ b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:476c2e4469d561745e3f6ec5d53f2853fd97c0a91163678e16412134795bf88a +size 93084 diff --git a/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_origin.pdf b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..083cbec2434353be1eea5dcb0fc50ee2062a8cad --- /dev/null +++ b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/1f87388c-3646-4243-b473-83a714b043d7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e40aaab69245a0d6b29aef6df2c128d5345a11f41198af9642f0122a696194a1 +size 583902 diff --git a/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/full.md b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/full.md new file mode 100644 index 0000000000000000000000000000000000000000..415b006e8071c1a91b12ff9fdf6769d496eab5e7 --- /dev/null +++ b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/full.md @@ -0,0 +1,315 @@ +# HandVoxNet: Deep Voxel-Based Network for 3D Hand Shape and Pose Estimation from a Single Depth Map + +Jameel Malik $^{1,2,3}$ + +Sk Aziz Ali $^{1,2}$ + +Ibrahim Abdelaziz $^{1,2}$ + +Vladislav Golyanik5 + +Ahmed Elhayek $^{2,4}$ + +Christian Theobalt5 + +Soshi Shimada + +Didier Stricker1,2 + +$^{1}$ TU Kaiserslautern $^{2}$ DFKI Kaiserslautern $^{3}$ NUST Pakistan $^{4}$ UPM Saudi Arabia $^{5}$ MPII Saarland + +# Abstract + +3D hand shape and pose estimation from a single depth map is a new and challenging computer vision problem with many applications. The state-of-the-art methods directly regress 3D hand meshes from 2D depth images via 2D convolutional neural networks, which leads to artefacts in the estimations due to perspective distortions in the images. + +In contrast, we propose a novel architecture with 3D convolutions trained in a weakly-supervised manner. The input to our method is a 3D voxelized depth map, and we rely on two hand shape representations. The first one is the 3D voxelized grid of the shape which is accurate but does not preserve the mesh topology and the number of mesh vertices. The second representation is the 3D hand surface which is less accurate but does not suffer from the limitations of the first representation. We combine the advantages of these two representations by registering the hand surface to the voxelized hand shape. In the extensive experiments, the proposed approach improves over the state of the art by $47.8\%$ on the SynHand5M dataset. Moreover, our augmentation policy for voxelized depth maps further enhances the accuracy of 3D hand pose estimation on real data. Our method produces visually more reasonable and realistic hand shapes on NYU and BigHand2.2M datasets compared to the existing approaches. + +# 1. Introduction + +The problem of deep learning-based 3D hand pose estimation has been extensively studied in the past few years [33], and recent works achieve high accuracy on public benchmarks [32, 18, 22]. Simultaneous estimation of 3D hand pose and shape from a single depth map is a newly emerging computer vision problem. It is more challenging than the pose estimation because annotating real images for shape is laborious and cumbersome. Other salient challenges include varying hand shapes, occlusions, high number of degrees of freedom (DOF) and self-similarity. + +![](images/f823298260517b5d061d0f0609519facffd45c73f86e8da2c7cd5b3793578d32.jpg) +Figure 1: Hand shape and pose estimation with HandVoxNet. A 3D voxelized depth map and accurately regressed heatmaps of 3D joints (left block) are used to estimate two hand shape representations (middle block). To combine the advantages of these representations, we accurately register the shape surface to the voxelized shape (right block). Our architecture with 3D convolutions establishes a one-to-one mapping between voxelized depth map, voxelized hand shape and heatmaps of 3D joints. + +The dense 3D hand mesh is a richer representation which is more useful than the sparse 3D joints, and it finds many applications in computer vision and graphics [27, 23, 17]. + +With the recent progress in deep learning, a few works [35, 7, 17, 13, 14] have proposed algorithms for simultaneous hand pose and shape estimation. Malik et al. [14] developed a 2D CNN-based approach that estimates shapes directly from 2D depth maps. The recovered shapes suffer from artifacts due to the limited representation capacity of their hand model [7, 17]. The same problem can occur even by embedding a realistic statistical hand model (i.e., MANO) [23] inside a deep network [7, 35]. In contrast to these model-based approaches [35, 14], Ge et al. [7] proposed a more accurate direct regression-based approach using a monocular RGB image. Recently, Malik et al. [17] developed another direct regression-based approach from a single depth image. All of the approaches mentioned above treat and process depth maps with 2D CNNs, even though depth maps are intrinsically a 3D data. Training a 2D CNN to estimate 3D hand pose or shape given 2D representation of a depth map is highly non-linear and results in + +perspective distortions in the estimated outputs [18]. V2V-PoseNet [18] is the first work that uses 3D voxelized grid of depth map to estimate 3D joints heatmaps and, thus, avoids perspective distortions. However, extending this work for shape estimation by directly regressing 3D heatmaps of mesh vertices is not feasible in practice. + +In this work, we propose the first 3D CNN architecture which simultaneously estimates 3D shape and 3D pose given a voxelized depth map (see Fig. 1) To this end, we introduce novel architectures based on 3D convolutions which estimate two different representations of hand shape (Secs. 3-5). The first representation is the hand shape on a voxelized grid. It is estimated from a new voxel-to-voxel network which establishes a one-to-one mapping between the voxelized depth map and the voxelized shape. However, the estimated voxelized shape does not preserve the hand mesh topology and the number of vertices. For this reason, we also estimate hand surface (the second representation) with our voxel-to-surface network. Since this network does not establish a one-to-one mapping, the accuracy of the estimated hand surface is low but the hand topology is preserved. To combine the advantages of both representations, we propose registration methods to fit the hand surface to voxelized shape. Since real hand shape annotations are not available, we employ two 3D CNN-based synthesizers which act as sources of weak supervision by generating voxelized depth maps from our shape representations (see Fig. 2). To increase the robustness and accuracy of the hand pose estimation, we perform 3D data augmentation on the voxelized depth maps (Sec. 4.2). + +We conduct ablation studies and perform extensive evaluations of the proposed method on real and synthetic datasets. Our approach improves the accuracy of hand shape estimation by $47.8\%$ on SynHand5M dataset [14] and outperforms the state-of-the-art. Our method produces visually more reasonable and plausible hand shapes of NYU and BigHand2.2M datasets compared to the state-of-the-art approaches (Sec. 6). To summarise, our contributions are: + +1. The first voxel-based hand shape and pose estimation approach with the following novel components: + +(i) Voxel-to-voxel 3D CNN-based network. +(ii) Voxel-to-surface 3D CNN-based network. +(iii) 3D CNN-based voxelized depth map synthesizers. +(iv) Hand shape registration components. + +2. A new 3D data augmentation policy on voxelized grids of depth maps. + +# 2. Related Work + +We now discuss the existing methods for deep hand pose and shape estimation. Moreover, we briefly report the most related works for depth-based hand pose estimation. + +Deep Hand Pose and Shape Estimation. Malik et al. [14] proposed the first deep neural network for hand pose and shape estimation from a single depth image. To this end, they developed a model-based hand pose and shape layer which is embedded inside their deep network. Their approach suffers from artifacts due to the difficulty in optimizing complex hand shape parameters inside the network. Ge et al. [7] developed a direct regression-based algorithm for hand pose and shape estimation from a single RGB image. They highlight that the representation capacity of the statistical deformable hand model (i.e., MANO [23]) could be limited due to the small amount of training data and the linear bases utilized for the shape recovery. Zhang et al. [35] introduced a similar MANO model based approach using a monocular RGB image. Recently, Malik et al. [17] proposed a structured weakly-supervised deep learning-based approach using a single depth image. All of the above-mentioned methods use 2D CNNs and treat the depth maps as 2D data. Consequently, the deep network is likely to produce perspective distortions in the shape and pose estimations [18]. In contrast, we propose the first 3D convolutions based architecture which establishes a one-to-one mapping between the voxelized depth map and the voxelized hand shape. This one-to-one mapping allows to more accurately reconstruct the hand shapes. + +Hand Pose Estimation from Depth. In general, deep learning-based hand pose estimation methods can be classified into two categories. The first one encompasses the discriminative methods which directly estimate hand joint locations using CNNs [4, 3, 32, 21, 22, 18, 10, 6, 12]. The second category is hybrid methods which explicitly incorporate hand structure inside deep networks [16, 30, 8, 19, 15]. The discriminative methods achieve higher accuracy compared to the hybrid methods. The voxel-to-voxel approach [18] is powerful and highly effective because it uses 3D convolutions to learn a one-to-one mapping between the 3D voxelized depth map and 3D heatmaps of hand joints. Notably, the voxelized representation of depth maps is best suited for 3D data augmentation to improve the robustness and accuracy of the estimations. A few methods perform data augmentation on depth maps [19, 28] or voxelized depth maps [18]. In this work, we integrate the voxel-to-voxel approach with our pipeline and, additionally, perform new 3D data augmentation on voxelized depth maps. Our 3D data augmentation policy helps to achieve a noticeable improvement in the 3D pose estimation accuracy on real datasets. + +# 3. Method Overview + +Given a single input depth image, our goal is to estimate N 3D hand joint locations $\mathcal{J} \in \mathcal{R}^{3 \times N}$ (i.e., 3D pose) and $\mathrm{K} = 1193$ 3D vertex locations $\mathcal{V} \in \mathcal{R}^{3 \times K}$ (i.e., 3D shape). + +![](images/92d2ff762e1479fa43f2b8eacea932cbb428f41fb147ef95d4bda754556e8a71.jpg) +Figure 2: Overview of our approach for 3D hand shape and pose recovery from a 3D voxelized depth map. V2V-PoseNet estimates 3D joints heatmaps (i.e., pose). Hand shape is obtained in two phases. First, V2V-ShapeNet and V2S-Net estimate the voxelized shape and shape surface, respectively. Thereby, V2V-SynNet and S2V-SynNet synthesize the voxelized depth acting as sources of weak-supervision. They are excluded during testing. In the second phase, shape registration accurately fits the shape surface to the voxelized shape. + +Fig. 2 shows an overview of the proposed approach. The input depth image is converted into a voxelized grid (i.e., $\mathrm{V_D}$ ) of size $88 \times 88 \times 88$ , by using intrinsic camera parameters and a fixed cube size. For hand pose estimation, $\mathrm{V_D}$ is provided as an input to the voxel-to-voxel pose regression network (i.e., V2V-PoseNet) that directly estimates 3D joint heatmaps $\{\mathcal{H}_j\}_{j=1}^{\mathrm{N}}$ . Each 3D joint heatmap is represented as $44 \times 44 \times 44$ voxelized grid. We resize $\mathrm{V_D}$ to $44 \times 44 \times 44$ voxel grid size (i.e., $\mathrm{V_D}'$ ) and concatenate it with the estimated $\mathcal{H}_j$ , to provide as an input to our shape estimation network. We call this concatenated input as $\mathcal{I}_S$ . + +The voxelized hand shape (i.e., $64 \times 64 \times 64$ grid size) is directly regressed via 3D CNN-based voxel-to-voxel shape regression network (i.e., V2V-ShapeNet), by using $\mathcal{I}_S$ as an input. Notably, V2V-ShapeNet establishes a one-to-one mapping between the voxelized depth map and the voxelized shape. Therefore, it produces accurate voxelized shape representation but does not preserve the topology of hand mesh and the number of mesh vertices. To regress hand surface, $\mathcal{I}_S$ is fed to the 3D CNN-based voxel-to-surface regression network (i.e., V2S-Net). Since the mapping between $\mathcal{I}_S$ and hand surface is not one-to-one, it is therefore less accurate. Voxel-to-voxel and surface-to-voxel synthesizers (i.e., V2V-SynNet and S2V-SynNet) are connected after V2V-ShapeNet and V2S-Net, respectively. These synthesizers reconstruct $\mathrm{V}_{\mathrm{D}}^{\prime}$ and act as sources of weak supervision during training. They are excluded during testing. To combine the advantages of the two shape representations, we register the estimated hand surface to the estimated voxelized hand shape. We employ 3D CNN-based DispVoxNet [25] for synthetic data, and non-rigid gravitational approach (NRGA) [1] for real data. + +# 4. The Proposed HandVoxNet Approach + +In this section, we explain our proposed HandVoxNet approach by highlighting the function and effectiveness of each of its components. We develop an effective solution that produces reasonable hand shapes via 3D CNN-based deep networks. To this end, our approach fully exploits accurately estimated heatmaps of 3D joints as a strong pose prior, as well as voxelized depth maps. Given that collecting accurate real hand shape ground truth is hard and laborious, we develop a weakly-supervised network for real hand shape estimation by learning from accurately labeled synthetic data. Moreover, our 3D data augmentation on voxelized depth maps allows to further improve the accuracy and robustness of 3D hand pose estimation. + +# 4.1. 3D Hand Shape Estimation + +As aforementioned, estimating 3D hand shape from a 2D depth map by using 2D CNN is a highly non-linear mapping. It compels the network to perform perspective-distortion-invariant estimation which causes difficulty in learning the shapes. To address this limitation, we develop a full voxel-based deep network that effectively utilizes the estimated 3D pose and voxelized depth map to produce reasonable 3D hand shapes. Our proposed approach for 3D shape estimation comprises of two main phases. In the first phase, we estimate the shape surface and the voxelized hand shape. In the second phase, we register the estimated shape surface to the estimated voxelized hand shape by employing a 3D CNN-based registration for synthetic data and NRGA-based fitting process for real data. + +Voxelized Shape Estimation. Our idea is to estimate 3D hand shape in the voxelized form via 3D CNN-based net + +work. It allows the network to estimate the shape in such a way that minimizes the chances for perspective distortion. Inspired by the approach proposed in the recent work [17], we consider sparse 3D joints as the latent representation of dense 3D shape. However, in this work, we combine 3D pose with the depth map which helps to represent the shape of hand more accurately. Furthermore, here we use more accurate and useful representations of 3D pose and 2D depth image which are 3D joints heatmaps and a voxelized depth map, respectively. The V2V-ShapeNet module is shown in Fig. 2. It can be considered as the 3D shape decoder: + +$$ +\hat {\mathcal {V}} _ {S} \sim \operatorname {D e c} \left(\mathcal {H} _ {j} \oplus \mathrm {V} _ {\mathrm {D}} ^ {\prime}\right) = p \left(\mathcal {V} _ {S} \mid \mathcal {I} _ {S}\right) \tag {1} +$$ + +where $p(\mathcal{V}_S|\mathcal{I}_S)$ is the decoded distribution. The decoder learns to reconstruct the voxelized hand shape $\hat{\mathcal{V}}_S$ as close as possible to the ground truth voxelized hand shape $\mathcal{V}_S$ . The V2V-ShapeNet is a 3D CNN-based architecture that directly estimates the probability of each voxel in the voxelized shape indicating whether it is the background (i.e., 0) or the shape voxel (i.e., 1). The per-voxel binary cross entropy loss $\mathcal{L}_{\mathcal{V}_S}$ for voxelized shape reconstruction reads: + +$$ +\mathcal {L} _ {\mathcal {V} _ {S}} = - (\mathcal {V} _ {S} \log (\hat {\mathcal {V}} _ {S}) + (1 - \mathcal {V} _ {S}) \log (1 - \hat {\mathcal {V}} _ {S})) \quad (2) +$$ + +where $\mathcal{V}_S$ and $\hat{\mathcal{V}}_S$ are the ground truth and the estimated voxelized hand shapes, respectively. The architecture of V2V-ShapeNet is provided in the supplement. + +Since the annotations for real hand shapes are not available, weak supervision is therefore essential in order to effectively learn real hand shapes. For this reason, we propose a 3D CNN-based V2V-SynNet (see Fig. 2) which acts as a source of weak supervision during training. This module is removed during testing. V2V-SynNet synthesizes the voxelized depth map from the estimated voxelized shape representation. The per-voxel binary cross entropy loss $\mathcal{L}_{\mathrm{VD}}^{\mathrm{v}}$ for voxelized depth map reconstruction is given by: + +$$ +\mathcal {L} _ {\mathrm {V} _ {\mathrm {D}}} ^ {\mathrm {v}} = - \left(\mathrm {V} _ {\mathrm {D}} \log \left(\hat {\mathrm {V}} _ {\mathrm {D}}\right) + \left(1 - \mathrm {V} _ {\mathrm {D}}\right) \log \left(1 - \log \left(\hat {\mathrm {V}} _ {\mathrm {D}}\right)\right) \right. \tag {3} +$$ + +where $\mathrm{V_D}$ and $\hat{\mathrm{V}}_{\mathrm{D}}$ are the ground truth and the reconstructed voxelized depth maps, respectively. The architecture of V2V-SynNet is provided in the supplement. + +Shape Surface Estimation. The hand poses of the shape surfaces and voxelized shapes need to be similar for an improved shape registration. To facilitate the registration, we employ V2S-Net deep network which directly regresses $\mathcal{V}$ . Based on the similar concept of hand shape decoding (as mentioned before), $\mathcal{I}_S$ is provided as an input to this network while the decoded output is the reconstructed hand mesh (see Fig. 2). The hand shape surface reconstruction loss $\mathcal{L}_{\mathcal{V}_T}$ is given by the standard Euclidean loss as: + +$$ +\mathcal {L} _ {\mathcal {V} _ {T}} = \frac {1}{2} \left\| \hat {\mathcal {V}} _ {T} - \mathcal {V} _ {T} \right\| ^ {2}, \tag {4} +$$ + +where $\mathcal{V}_T$ and $\hat{\mathcal{V}}_T$ are the respective ground truth and reconstructed hand shape surfaces. As explained before, in the case of missing real hand shape ground truth, the weak supervision on mesh vertices is provided by S2V-SynNet. In this case, the input to the S2V-SynNet is $\hat{\mathcal{V}}_T$ which is in 3D coordinates form. The loss function $\mathcal{L}_{\mathrm{V_D}}^s$ for the S2V-SynNet is similar to Eq. (3). Further details on S2V-SynNet and V2S-Net can be found in the supplement. + +CNN-based Shape Registration. Thanks to fully connected (FC) layers, V2S-Net is able to estimate hand shapes while preserving the order and number of points. Losing local spatial information is also known as a drawback of FC layers. In contrast to FC layers, a lot of works show fully convolutional networks (FCN) perform well in geometry regression tasks [24, 9, 18, 31]. However, estimating the voxelized hand shape by 3D convolutional layer results in an inconsistent number of points and loses point order. Hence, the ideal architecture is a network which estimates the hand shape without losing local spatial information while preserving the topology of the hand shape. To achieve this, we register the estimated shape by V2S-Net to the probabilistic shape representation estimated by FCN (V2V-ShapeNet) using DispVoxNets pipeline [25]. + +The original DispVoxNets pipeline is comprised of two stages, i.e., global displacement estimation and refinement stage. The refinement stage is used to remove roughness on the point set surface. In contrast to the original approach, we replace the refinement stage with Laplacian smoothing [29]. This is possible because we assume the mesh topology is already known, and it is preserved by our pipeline. + +In the DispVoxNet pipeline, the hand surface shape $\hat{\mathcal{V}}_T$ is first converted into a voxelized grid $\hat{\mathcal{V}}_T^{\prime}$ (i.e., $64\times 64\times 64$ voxelized grid size). DispVoxNet estimates per-voxel displacements of the dimension $64^{3}\times 3$ between the reference $\hat{\mathcal{V}}_S$ and voxelized hand surface $\hat{\mathcal{V}}_T^{\prime 1}$ . The displacement loss $\mathcal{L}_{\mathrm{Disp}}$ is given by: + +$$ +\mathcal {L} _ {D i s p.} = \frac {1}{Q ^ {3}} \left\| \mathbf {d} - D _ {v n} \left(\hat {\mathcal {V}} _ {S}, \hat {\mathcal {V}} _ {T} ^ {\prime}\right) \right\| ^ {2}, \tag {5} +$$ + +where $Q$ and $\mathbf{d}$ are the voxel grid size and the ground truth displacement, respectively. Since it is difficult to obtain $\mathbf{d}$ between the voxelized shape $\hat{\nu}_{S}$ and hand surface $\hat{\nu}_{T}$ , the displacements are first computed between $\nu_{T}$ and $\hat{\nu}_{T}$ , and are discretized to obtain $\mathbf{d}$ . For more details of ground truth voxelized grid computation, please refer to [25]. + +NRGA-Based Shape Registration. In our voxel-based 3D hand shape and pose estimation pipeline (Fig. 2), the DispVoxNet [25] component requires shape annotations in its source-to-target displacement field learning phase. These annotations are available only for the synthetic dataset + +which leaves a domain gap on the performance of DispVoxNet when tested on real dataset. To bridge this gap, we apply NRGA [1] to improve $\hat{\mathcal{V}}_T$ by registering it with $\hat{\mathcal{V}}_S$ . NRGA is selected for this deformable alignment task over other methods [20, 2], as it supports local topology preservation of input hand surface and is robust at noise handling. Although NRGA is a point cloud alignment method, it provides the option to relax the deformation magnitude in the neighbouring regions of the hand mesh vertices. The original NRGA estimates a rigid transformation for every vertex $v \in \hat{\mathcal{V}}_T$ and diffuses the transformations in a subspace formed by a set of neighbourhood vertices of $v$ . It builds a $k$ -d tree on the template ( $\hat{\mathcal{V}}_T$ in our case) and neighbourhood vertices are selected as the $k$ -nearest neighbours (typically $0.1\% - 0.2\%$ of the total points in the template). We modify NRGA for the surface-to-voxel operation, i.e., instead of $k$ -nearest neighbours, we use connected vertices in a 4-ring for $\hat{\mathcal{V}}_T$ . See more details in our supplementary material. + +# 4.2. Data Augmentation in 3D + +Our method for hand shape estimation relies on the accuracy of the estimated 3D pose. Therefore, the hand pose estimation method has to be accurate and robust. Training data augmentation helps to improve the performance of a deep network [19]. Existing methods for hand pose estimation [19, 28] use data augmentation in 2D. This is mainly because these methods treat depth maps as 2D data. The representation of the depth map in voxelized form makes it convenient to perform data augmentation in all three dimensions. In this paper, we propose a new 3D data augmentation policy which improves the accuracy and robustness of hand pose estimation (see Sec. 6.3). + +During V2V-PoserNet training, we apply simultaneous rotations in all three axes $(\mathbf{x},\mathbf{y},\mathbf{z})$ to each 3D coordinate $(i,j,k)$ of $\mathrm{V_D}$ and $\mathcal{H}_j$ by using Euler transformations: + +$$ +\left[ \hat {i}, \hat {j}, \hat {k} \right] ^ {\mathrm {T}} = \left[ \operatorname {R o t} _ {\mathrm {x}} \left(\theta_ {\mathrm {x}}\right) \right] \times \left[ \operatorname {R o t} _ {\mathrm {y}} \left(\theta_ {\mathrm {y}}\right) \right] \times \left[ \operatorname {R o t} _ {\mathrm {z}} \left(\theta_ {\mathrm {z}}\right) \right] [ i, j, k ] ^ {\mathrm {T}}, \tag {6} +$$ + +where $(\hat{i},\hat{j},\hat{k})$ is the transformed voxel coordinate. $\mathrm{Rot}_{\mathrm{x}}(\theta_{\mathrm{x}}),\mathrm{Rot}_{\mathrm{y}}(\theta_{\mathrm{y}})$ and $\mathrm{Rot_z}(\theta_z)$ are $3\times 3$ rotation matrices around x, y and z axes. The values for $\theta_{\mathrm{x}},\theta_{\mathrm{y}}$ and $\theta_{z}$ are selected randomly in the ranges $[-40^{\circ}, + 40^{\circ}]$ $[-40^{\circ}, + 40^{\circ}]$ and $[-120^{\circ}, + 120^{\circ}]$ , respectively. In addition to rotations in 3D, following [18], we perform scaling and translation in the respective ranges $[+0.8, + 1.2]$ and $[-8, + 8]$ . + +# 5. The Network Training + +$\mathrm{V_D}$ is generated by projecting the raw depth image pixels into 3D space. Hand region points are then extracted by using a cube of size 300 that is centered on hand palm center position. 3D point coordinates of the hand region are discretized in the range [1, 88]. Finally, to obtain $\mathrm{V_D}$ , the voxel + +
Methods3D V Err. (mm)
V2S-Net (w/o Hj)8.78
V2S-Net (w/o V'D)3.54
V2S-Net (with Hj ⊕ V'D)3.36
Methods3D S Err.
V2V-ShapeNet (w/o Hj)0.007
V2V-ShapeNet (w/o V'D)0.016
V2V-ShapeNet (with Hj ⊕ V'D)0.005
+ +Table 1: Ablation study on inputs (i.e., $\mathcal{H}_j$ and $\mathbf{V}_{\mathbf{D}}^{\prime}$ ) to V2S-Net and V2V-ShapeNet. We observe that combining both inputs is useful for these two networks. + +value is set to 1 for the 3D point coordinate of hand region, and 0 otherwise. Following [18], $\mathcal{H}_j$ are generated as 3D Gaussians. Similar to the generating of $\mathrm{V_D}$ , $\mathcal{V}_S$ is obtained by voxelizing the hand mesh. $\mathcal{V}_T$ is created by normalizing the mesh vertices in the range $[-1, +1]$ . We perform this normalization by subtracting the vertices from the palm center and then dividing them by half of the cube size. + +We train V2V-PoseNet [18] on NYU [28], BigHand2.2M [34] and SynHand5M [14] datasets separately with the 3D data augmentation technique mentioned in Sec. 4.2. For SynHand5M dataset, we train V2S-Net and V2V-ShapeNet (including the synthesizers S2V-SynNet and V2V-SynNet) separately using RMSProp as an optimization method with a batch size of 8 and a learning rate $\mathrm{LR} = 2.5\times 10^{-4}$ . After training the pose and shape networks, we put these networks together in the pipeline (see Fig. 2) and fine-tune them in an end-to-end manner with synthetic, as well as combined real and synthetic data. The total loss $\mathcal{L}_{\mathrm{T}}$ read as follows: + +$$ +\mathcal {L} _ {\mathrm {T}} = \mathcal {L} _ {\mathcal {H}} + \mathbb {1} \mathcal {L} _ {\mathcal {V} _ {S}} + \mathbb {1} \mathcal {L} _ {\mathcal {V} _ {T}} + \mathcal {L} _ {\mathrm {V} _ {\mathrm {D}}} ^ {\mathrm {v}} + \mathcal {L} _ {\mathrm {V} _ {\mathrm {D}}} ^ {\mathrm {s}} \tag {7} +$$ + +where $\mathcal{L}_{\mathcal{H}}$ is heatmaps loss [18] and $\mathbb{1}$ represents an indicator function layer. This layer forwards the estimations to the loss layer only for synthetic data using a flag value, which is 1 for synthetic and 0 for real data. It disables the gradients flow during the backward pass in the case of real data. For fine-tunings, we use RMSProp with a batch size of 6 and a learning rate $2.5\times 10^{-5}$ . DispVoxNet is trained only on SynHand5M dataset due to the availability of the ground truth geometry. During the training, Adam optimizer [11] with a learning rate of $3.0\times 10^{-4}$ was employed. The training continues until the convergence of $\mathcal{L}_{\mathrm{Disp}}$ with batch size 12. All models are trained until convergence on a desktop workstation equipped with Nvidia Titan X GPU. + +# 6. Experiments + +We perform qualitative and quantitative evaluations of our complete pipeline including ablation studies on the fully labeled SynHand5M [14] dataset. We qualitatively evaluate + +![](images/78438ad8afd41a7a4a3b98e15a5dcf970c3a97dbda064557333c44d27547919e.jpg) +Figure 3: Qualitative results on SynHand5M [14] dataset. Estimated hand pose overlay (1 $^{\text{st}}$ col), voxelized shape (2 $^{\text{nd}}$ col), hand surface (3 $^{\text{rd}}$ col), final shape (4 $^{\text{th}}$ col), and the overlays of hand surface and final shapes with ground truth (gray color) are illustrated. + +
Methods3D V Err. (mm)
DeepHPS [14]11.8
WHSP-Net [17]5.12
ours (w/o synthesizers)2.92
ours (with synthesizers)2.67
+ +real hand shape recovery on NYU [28] and BigHand2.2M [34] datasets. Furthermore, we study the impact of our 3D data augmentation on V2V-PoseNet [18]. + +# 6.1. Datasets and Evaluation Metrics + +Although there are many depth-based hand pose datasets [34, 5, 26], only a few of them (i.e., BigHand2.2M [34], NYU [28], SynHand5M [14]) provide adequate training data and annotations which resemble the joint locations of a real hand. NYU real benchmark offers joint annotations for 72757 and 8252 RGBD images of the training $(\mathcal{T}_{\mathrm{N}})$ and test sets, respectively. Their hand model contains 42 DOF which makes it possible to combine this dataset with the recent benchmarks (e.g., BigHand2.2M). BigHand2.2M is a million-scale real benchmark. For pose estimation, it provides accurate joint annotations for 956k training $(\mathcal{T}_{\mathrm{B}})$ depth images acquired from 10 subjects. Their hand model contains 21 joint locations which resembles real hand skeleton. The size of the BigHand2.2M's test set is $296\mathrm{k}$ . The annotation of hand palm center is not given in the BigHand2.2M dataset. Hence, we obtain the hand palm center position by taking the average of the metacarpal joints and the wrist joint positions. SynHand5M dataset contains fully annotated 5 million depth images for both the 3D hand pose and shape. The sizes of its training $(\mathcal{T}_{\mathrm{S}})$ and test sets are $4.5\mathrm{M}$ and $500\mathrm{k}$ , respectively. The joint annotations of BigHand2.2M are fully compatible with SynHand5M. + +Table 2: Comparison with the state of the arts on SynHand5M [14]. Our full method, with V2V-SynNet and S2V-SynNet synthesizers, outperforms the WHSP-Net approach [17] by $47.85\%$ . + +
Componentsruntime, sec
V2V-PoseNet0.011
V2V-ShapeNet0.0015
V2S-Net0.0038
DispVoxNet (GPU + CPU)*0.162
NRGA (CPU)59 - 70
+ +Table 3: Runtime: (first four rows) forward-pass of deep networks on GPU. “*” shows that Laplacian smoothing runs on CPU. + +We use three evaluation metrics: (i) the average 3D joint location error over all test frames (3D $\mathcal{J}$ Err.); (ii) mean vertex location error over all test frames (3D $\nu$ Err.); and (iii) mean voxelized shape error (i.e., per-voxel binary cross entropy) over all test data (3D $S$ Err.). + +# 6.2. Evaluation of Hand Shape Estimation + +In this subsection, we evaluate our method on SynHand5M, NYU and BigHand2.2M benchmarks. + +Synthetic Hand Shape Reconstruction. We train our complete pipeline on the fully labeled SynHand5M dataset by following the training methodology explained in Sec. 5. We conduct two ablation studies to show the effectiveness of our design choice. First is the regression of $\mathcal{V}_T$ and $\mathcal{V}_S$ by using input $\mathrm{V}_{\mathrm{D}}^{\prime}$ (i.e., without $\mathcal{H}_j$ ) and the synthesizers. Similar experiments are repeated by using $\mathcal{H}_j$ (i.e., without $\mathrm{V}_{\mathrm{D}}^{\prime}$ ) and $\mathcal{I}_S$ (i.e., with $\mathcal{I}_S \oplus \mathrm{V}_{\mathrm{D}}^{\prime}$ ) as separate inputs to V2V-ShapeNet and V2S-Net. The results are summarized in Table 1 and clearly show the benefit of concatenating voxelized depth map with 3D heatmaps. The second ablation study is to observe the impact of V2V-SynNet and S2V-SynNet, given $\mathcal{I}_S$ as an input to the complete shape estimation network. We train V2S-Net and V2V-ShapeNet with and without using their respective synthesizers (see Fig. 2). The quantitative results and comparisons with the state-of-the-art methods on SynHand5M test set are summarized in Table 2. Our method with synthesizers improves on ours without synthesizers, and achieves $47.8\%$ improvement in the accuracy compared to the recent WHSP-Net [17]. Several synthesized samples of voxelized depth maps are shown in the supplement. The qualitative results of shape representations and poses are shown in Fig. 3. DispVoxNet fits the estimated hand surface to the estimated voxelized hand shape, thereby improving the hand surface reconstruction accuracy by $20.5\%$ (i.e., from $3.36mm$ to $2.67mm$ ). Notably, the accuracy of our hand surface estimation is higher compared to WHSP-Net (cf. Tables 1 and 2), which clearly shows the effectiveness of employing 3D CNN based network for mesh vertex regression. + +Real Hand Shape Reconstruction. To estimate plausible real hand shape representations, the synthesizers are essential (see Fig. 2). For NYU hand surface and voxelized shape + +![](images/9fe8d07ab4a69a49418d74c34b865c4a4dd491db976655df29112520cbca4d46.jpg) + +![](images/78c705d13247449a3a584fd0bd4ea15d9fd893be6fd6bebbaed0284d5509d3e7.jpg) +(a) Voxelized shape + +![](images/7b02161fc1d9457368788e55ead30b2a8bdf25f9d115fb342a3a4b6894d89c40.jpg) + +![](images/d55e0ae1e50421dff210f57f2b9ba185baf6d3d8289ef79b3c46b1536790c06e.jpg) +(b) Shape surface + +![](images/3b42a149521dfeaf44c54a1e7debac9745a2ac5b800dc5e30b62d9975ede99ca.jpg) + +![](images/65ff0490ef7bffb03d594f3e6f08195515b675590cac2dc274baaafa8dcf39d7.jpg) +(c) Ours (final shape) + +![](images/afaae1ae9908dde04108383242249f44d760825396529ce9e808aa783323d66f.jpg) + +![](images/bcb2b0711229304224617182f2eb6ad496ae4ff16e93764077068c42fc2e39aa.jpg) +(d) DeepHPS [14] + +![](images/c54042b3e472f2f4bac170504f35497e6bc8c5fc3e75ff5d1031b5a1d088267c.jpg) + +![](images/b93c79e47634b481fb56671977e6208ee193c41b09ed002de3d6ba036fe2e5e4.jpg) +(e) WHSP-Net [17] + +![](images/78dade4e3f6548b4ebe0e28cdae5f27b3754e90b16e7c42b7dc149f56c45056a.jpg) + +![](images/7d0a824a672200231db5c22b56548cc49e188db56a57460ed7d429bad30cb883.jpg) +(a) +Figure 5: Shape reconstruction of BigHand2.2M [34] dataset: (a) the 2D pose overlay; (b), (c) recovered voxelized shape and shape surface, respectively; (d) the overlays of shape surface and registered shape; (e) the final hand shape. + +![](images/f727b6e28386880596d80117472334053e82efbef0e33d92d77bab13a0a5bac4.jpg) +Figure 6: Failure case: our method is unable to produce plausible shapes in cases of severe occlusion and missing depth information. + +![](images/27c276b17b55b596e4d9a1f3a2cfba9320ad9508e42c4e2f62f4f4b0922f69c3.jpg) +(c) + +(e) + +recovery, we combine the training sets of NYU and SynHand5M (i.e., $\mathbf{T}_{\mathrm{NS}} = \mathcal{T}_{\mathrm{N}} + \mathcal{T}_{\mathrm{S}}$ ) by selecting closely matching 22 common joint positions in both datasets. However, note that the common joint positions are still not exactly similar in both the datasets. V2S-Net and V2V-ShapeNet recover plausible hand shape representations while NRGA-based method performs a successful registration (as shown in Fig. 4(a), (b) and (c)). It is observed that the voxelized shape is more accurately estimated than the hand surface. Thereby, the alignment further refines the hand surface. Using the similar training strategy, we combine BigHand2.2M and SynHand5M datasets and shuffle them (i.e., $\mathbf{T}_{\mathrm{BS}} = \mathcal{T}_{\mathrm{B}} + \mathcal{T}_{\mathrm{S}}$ ). Samples of the estimated hand shape representations for BigHand2.2M are shown in Fig. 5. + +![](images/fee9d9fbe63bea8a1f40ae83f3acf046586438db2a61d4605cb873c01808d51a.jpg) +Figure 4: Shape reconstruction of NYU [28] dataset: (a), (b) and (c) show the 2D overlays and 3D visualizations of estimated voxelized hand shape, shape surface, and the final shape after registration, respectively. (d) and (e) show the corresponding results of hand shapes from DeepHPS [14] and WHSP-Net [17] methods. Our approach produces visually more accurate hand shapes than the existing approaches. +(a) Depth +(b) 3D Pose +(c) DispVoxNet [25] +(d) NRGA [1] + +
Methods3D J Err. (mm)
DeepHPS [14]6.30
WHSP-Net [17]4.32
V2V-PoseNet [18]3.81
our HandVoxNet (full method)3.75
+ +Table 4: 3D hand pose estimation results on SynHand5M [14] dataset. We compare the accuracy of our full method (i.e., HandVoxNet) with state-of-the-art methods. + +We qualitatively compare our reconstructed hand shapes of NYU dataset with the state of the art. For better illustration of the shape reconstruction accuracy, we show the 2D overlay of hand mesh onto the corresponding depth image (as shown in Fig. 4-(d) and (e)). Model-based DeepHPS [14] suffers from artifacts, the regression-based WHSP-Net approach [17] produces perspective distortions and incorrect sizes of shapes. In contrast, HandVoxNet recovers visually more plausible hand shapes (Fig. 4-(c)). Table 3 provides the runtimes of different components of our pipeline. Failure Cases. Our approach fails to estimate plausible hand shapes in cases of severe occlusion of hand parts and + +
DatasetMethod3D J Err. (mm)
NYUV2V-PoseNet [18]9.22
V2V-PoseNet (our 3D augm.)8.72
BigHand2.2MV2V-PoseNet [18]9.95
V2V-PoseNet (our 3D augm.)9.27
+ +Table 5: 3D hand pose estimation results on NYU [28] and BigHand2.2M [34] datasets using our 3D data augmentation. + +![](images/7bdb3891ee550739d85c07a0f25587a0d37c2a2568914dbacd4abd1aa5dd5812.jpg) +Figure 7: Samples of NYU [28] depth images with 2D overlay of the estimated 3D hand pose. Our method produces more accurate results compared to WHSP-Net [17] and DeepHPS [14] methods. + +missing information in the depth map (see Fig. 6). + +# 6.3. Evaluation of Hand Pose Estimation + +In our approach, the accuracy of the estimated hand shape is dependent on the accuracy of estimated 3D pose (see Sec. 4). Therefore, the hand pose estimation needs to be robust and accurate. Therefore, we perform a new 3D data augmentation on voxelized depth maps which further improves the accuracy of 3D hand pose estimation on real datasets. Notably, our focus is to develop an effective approach for simultaneous hand pose and shape estimation. However, for completeness, we show our results and comparisons of hand pose estimation with SynHand5M, NYU and BigHand2.2M datasets. + +SynHand5M dataset: We do not perform training data augmentation on SynHand5M because this dataset originally contains large viewpoint variations [14]. We train our full method and V2V-PoseNet [18] on SynHand5M dataset. The quantitative results on the test set are presented in Table 4. We observe that the backpropagation from the shape regression pipeline is effective and improves the accuracy of the estimated 3D pose. We achieve $13.19\%$ improvement in the accuracy compared to WHSP-Net approach [17]. + +NYU and BigHand2.2M datasets: V2V-PoseNet [18] is a powerful pose estimation method that exploits the 3D data representations of hand pose and depth map. Thanks to our 3D data augmentation strategy (see Sec. 4.2), we improve + +![](images/40ac6bfec03f7e5f0b6e630bdf5337b525992fe19964627db857a6c5e419a469.jpg) +Figure 8: We study the impact of our 3D data augmentation on the pose estimation accuracy of V2V-PoseNet [18] on NYU [28] dataset. The graph shows mean errors for individual hand joints. + +the accuracy by $5.42\%$ and $6.83\%$ compared to the original V2V-PoseNet models on NYU and BigHand2.2M datasets, respectively (see Table 5). Fig. 8 shows the average errors on individual hand joints. We observe a noticeable improvement in the accuracy of the finger tips. The qualitative results and comparisons with the state-of-the-art methods for hand pose estimation are shown in Fig. 7. + +# 7. Conclusion and Future Work + +We develop the first voxel-based pipeline for 3D hand shape and pose recovery from a single depth map, which establishes an effective inter-link between hand pose and shape estimations using 3D convolutions. This inter-link boosts the accuracy of both estimates, which is demonstrated experimentally. We employ 3D voxelized depth map and accurately estimated 3D heatmaps of joints as inputs to reconstruct two hand shape representations, i.e., 3D voxelized shape and 3D shape surface. To combine the advantages of both shape representations, we employ registration methods, i.e., DispVoxNet and NRGA, which accurately fit the shape surface to the voxelized shape. + +The experimental evaluation further shows that our 3D data augmentation policy on voxelized grids enhances the accuracy of 3D hand pose estimation on real data. HandVoxNet produces visually more accurate hand shapes of real images compared to the previous methods. All these results indicate that the one-to-one mapping between voxelized depth map, voxelized shape and 3D heatmaps of joints is essential for an accurate hand shape and pose recovery. + +In future work, generating a realistic synthetic dataset can further enhance the hand shape reconstruction from real images. The runtimes of the used registration methods can be improved by the parallelization on GPUs. + +Acknowledgement: This work was funded by the German Federal Ministry of Education and Research as part of the project VIDETE (grant number 01IW18002) and the ERC Consolidator Grant 770784. + +# References + +[1] Sk Aziz Ali, Vladislav Golyanik, and Didier Stricker. Nrga: Gravitational approach for non-rigid point set registration. In International Conference on 3D Vision (3DV), 2018. +[2] Brian Amberg, Sami Romdhani, and Thomas Vetter. Optimal step nonrigid icp algorithms for surface registration. In Computer Vision and Pattern Recognition (CVPR), 2007. +[3] Yujun Cai, Liuhao Ge, Jun Liu, Jianfei Cai, Tat-Jen Cham, Junsong Yuan, and Nadia Magnenat Thalmann. Exploiting spatial-temporal relationships for 3d pose estimation via graph convolutional networks. In International Conference on Computer Vision (ICCV), 2019. +[4] Yujin Chen, Zhigang Tu, Liuhao Ge, Dejun Zhang, Ruizhi Chen, and Junsong Yuan. So-handnet: Self-organizing network for 3d hand pose estimation with semi-supervised learning. In International Conference on Computer Vision (ICCV), 2019. +[5] 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 Computer Vision and Pattern Recognition (CVPR), 2018. +[6] Liuhao Ge, Hui Liang, Junsong Yuan, and Daniel Thalmann. 3d convolutional neural networks for efficient and robust hand pose estimation from single depth images. In Computer Vision and Pattern Recognition (CVPR), 2017. +[7] 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 Computer Vision and Pattern Recognition (CVPR), 2019. +[8] Liuhao Ge, Zhou Ren, and Junsong Yuan. Point-to-point regression pointnet for 3d hand pose estimation. In European Conference on Computer Vision (ECCV), 2018. +[9] Vladislav Golyanik, Soshi Shimada, Kiran Varanasi, and Didier Stricker. Hdm-net: Monocular non-rigid 3d reconstruction with learned deformation model. In International Conference on Virtual Reality and Augmented Reality (EuroVR), 2018. +[10] Hengkai Guo, Guijin Wang, Xinghao Chen, Cairong Zhang, Fei Qiao, and Huazhong Yang. Region ensemble network: Improving convolutional network for hand pose estimation. In International Conference on Image Processing (ICIP), 2017. +[11] Diederick P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. +[12] Jameel Malik, Ahmed Elhayek, Sheraz Ahmed, Faisal Shafait, Muhammad Malik, and Didier Stricker. 3dairsig: A framework for enabling in-air signatures using a multi-modal depth sensor. Sensors, 18(11):3872, 2018. +[13] Jameel Malik, Ahmed Elhayek, Fabrizio Nunnari, and Didier Stricker. Simple and effective deep hand shape and pose regression from a single depth image. Computers & Graphics, 85:85-91, 2019. +[14] Jameel Malik, Ahmed Elhayek, Fabrizio Nunnari, Kiran Varanasi, Kiarash Tamaddon, Alexis Heloir, and Didier Stricker. Deephps: End-to-end estimation of 3d hand pose + +and shape by learning from synthetic depth. In International Conference on 3D Vision (3DV), 2018. +[15] Jameel Malik, Ahmed Elhayek, and Didier Stricker. Simultaneous hand pose and skeleton bone-lengths estimation from a single depth image. In International Conference on 3D Vision (3DV), 2017. +[16] Jameel Malik, Ahmed Elhayek, and Didier Stricker. Structure-aware 3d hand pose regression from a single depth image. In International Conference on Virtual Reality and Augmented Reality (EuroVR), 2018. +[17] Jameel Malik, Ahmed Elhayek, and Didier Stricker. Whsp-net: A weakly-supervised approach for 3d hand shape and pose recovery from a single depth image. Sensors, 19(17):3784, 2019. +[18] Gyeongsik Moon, Ju Yong Chang, and Kyoung Mu Lee. V2v-posenet: Voxel-to-voxel prediction network for accurate 3d hand and human pose estimation from a single depth map. In Computer Vision and Pattern Recognition (CVPR), 2018. +[19] Markus Oberweger and Vincent Lepetit. Deeprior++: Improving fast and accurate 3d hand pose estimation. In International Conference on Computer Vision Workshops (ICCVW), 2017. +[20] Chavdar Papazov and Darius Burschka. Deformable 3d shape registration based on local similarity transforms. Computer Graphics Forum, pages 1493-1502, 2011. +[21] Georg Poier, Michael Opitz, David Schinagl, and Horst Bischof. Murauer: Mapping unlabeled real data for label austerity. In Winter Conference on Applications of Computer Vision (WACV), 2019. +[22] Mahdi Rad, Markus Oberweger, and Vincent Lepetit. Feature mapping for learning fast and accurate 3d pose inference from synthetic images. In Computer Vision and Pattern Recognition (CVPR), 2018. +[23] Javier Romero, Dimitrios Tzionas, and Michael J Black. Embodied hands: modeling and capturing hands and bodies together. ACM Transactions on Graphics (TOG), 36(6):245, 2017. +[24] Soshi Shimada, Vladislav Golyanik, Christian Theobalt, and Didier Stricker. Ismo-gan: Adversarial learning for monocular non-rigid 3d reconstruction. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2019. +[25] Soshi Shimada, Vladislav Golyanik, Edgar Tretschk, Didier Stricker, and Christian Theobalt. Dispvoxnets: Non-rigid point set alignment with supervised learning proxies. In International Conference on 3D Vision (3DV), 2019. +[26] James S Supancic, Grégory Rogez, Yi Yang, Jamie Shotton, and Deva Ramanan. Depth-based hand pose estimation: data, methods, and challenges. In International Conference on Computer Vision (ICCV), 2015. +[27] Jonathan Taylor, Lucas Bordeaux, Thomas Cashman, Bob Corish, Cem Keskin, Toby Sharp, Eduardo Soto, David Sweeney, Julien Valentin, Benjamin Luff, et al. Efficient and precise interactive hand tracking through joint, continuous optimization of pose and correspondences. ACM Transactions on Graphics (TOG), 35(4):143, 2016. +[28] Jonathan Tompson, Murphy Stein, Yann Lecun, and Ken Perlin. Real-time continuous pose recovery of human hands + +using convolutional networks. ACM Transactions on Graphics (TOG), 33(5):169, 2014. +[29] Jörg Vollmer, Robert Mencl, and Heinrich Mueller. Improved laplacian smoothing of noisy surface meshes. In Computer Graphics Forum, pages 131-138, 1999. +[30] Chengde Wan, Thomas Probst, Luc Van Gool, and Angela Yao. Dense 3d regression for hand pose estimation. In Computer Vision and Pattern Recognition (CVPR), 2018. +[31] Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Neural Information Processing Systems (NeurIPS), 2016. +[32] Fu Xiong, Boshen Zhang, Yang Xiao, Zhiguo Cao, Taidong Yu, Joey Tianyi Zhou, and Junsong Yuan. A2j: Anchor-to-joint regression network for 3d articulated pose estimation from a single depth image. In International Conference on Computer Vision (ICCV), 2019. +[33] Shanxin Yuan, Guillermo Garcia-Hernando, Björn Stenger, Gyeongsik Moon, Ju Yong Chang, Kyoung Mu Lee, Pavlo Molchanov, Jan Kautz, Sina Honari, Liuhao Ge, et al. Depth-based 3d hand pose estimation: From current achievements to future goals. In Computer Vision and Pattern Recognition (CVPR), 2018. +[34] Shanxin Yuan, Qi Ye, Björn Stenger, Siddhant Jain, and Tae-Kyun Kim. Bighand2.2m benchmark: Hand pose dataset and state of the art analysis. In Computer Vision and Pattern Recognition (CVPR), 2017. +[35] Xiong Zhang, Qiang Li, Hong Mo, Wenbo Zhang, and Wen Zheng. End-to-end hand mesh recovery from a monocular rgb image. In International Conference on Computer Vision (ICCV), 2019. \ No newline at end of file diff --git a/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/images.zip b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f8acff811a5046c9bd4f502b859277b75dfb9f0f --- /dev/null +++ b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ec28c4d9ffc338d9e40dd6a6cb7f1d2c50c2cd1d28176645912c0f5cb5665e9 +size 454712 diff --git a/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/layout.json b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..84f02982895b3c8a0701bd9e6306bb1705671d12 --- /dev/null +++ b/handvoxnetdeepvoxelbasednetworkfor3dhandshapeandposeestimationfromasingledepthmap/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6908cab81a668d3cc971e9b0984d3e27989284792c19bb4cfc655bb37574deb8 +size 418284 diff --git a/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_content_list.json b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..990026b2950c5a5f080712253de32dbf9c37ebc1 --- /dev/null +++ b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3d486d59a5d31d0a6bb909aadf3246e56fbfe1460596ff6c38bd8fb1e8de968 +size 75864 diff --git a/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_model.json b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7d55ff0881fcbfaa99be76f8c759be168a887021 --- /dev/null +++ b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3dc27d2bc1daa279d432685a4caefc41c329836c4ab47ecc3888a7359fb6967 +size 96219 diff --git a/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_origin.pdf b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ac2d53891c41a0366450155308ad8debb170d456 --- /dev/null +++ b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/20f8788d-16d4-428a-b539-5553dfe678f9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36d63f91efc4127ade7e7dbaa013f3c1b3564df87d56cda056f45408962768f0 +size 9835352 diff --git a/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/full.md b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a2b81bef5dfd91632cdd28cb29aee18c7c0ecfd1 --- /dev/null +++ b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/full.md @@ -0,0 +1,336 @@ +# Hardware-in-the-loop End-to-end Optimization of Camera Image Processing Pipelines + +Ali Mosleh $^{1}$ +Fahim Mannan $^{1}$ + +Avinash Sharma1 Nicolas Robidoux1 + +Emmanuel Onzon1 +Felix Heide1,2 + +$^{1}$ Algolux $^{2}$ Princeton University + +# Abstract + +Commodity imaging systems rely on hardware image signal processing (ISP) pipelines. These low-level pipelines consist of a sequence of processing blocks that, depending on their hyperparameters, reconstruct a color image from RAW sensor measurements. Hardware ISP hyperparameters have a complex interaction with the output image, and therefore with the downstream application ingesting these images. Traditionally, ISPs are manually tuned in isolation by imaging experts without an end-to-end objective. Very recently, ISPs have been optimized with 1st-order methods that require differentiable approximations of the hardware ISP. Departing from such approximations, we present a hardware-in-the-loop method that directly optimizes hardware image processing pipelines for end-to-end domain-specific losses by solving a nonlinear multi-objective optimization problem with a novel 0th-order stochastic solver directly interfaced with the hardware ISP. We validate the proposed method with recent hardware ISPs and 2D object detection, segmentation, and human viewing as end-to-end downstream tasks. For automotive 2D object detection, the proposed method outperforms manual expert tuning by $30\%$ mean average precision (mAP) and recent methods using ISP approximations by $18\%$ mAP. + +# 1. Introduction + +Hardware ISPs are ubiquitous low-level image processing pipelines present in nearly all commodity cameras and a wide variety of applications like digital still photography, camera phones, video surveillance, robotics, driver-assistance systems, and self-driving vehicles. ISPs transform RAW sensor data into images suitable for human viewing or downstream analytic tasks. This transformation typically includes several processing blocks that operate power-efficiently at real-time rates, which is critical for applications in robotics or self-driving vehicles. Growing sensor resolutions mandate efficient processing pipelines in hardware. For example, the 8MPix Sony IMX324 sensor + +demands processing of about 1.5GB of RAW high dynamic range data per second. + +Existing hardware ISPs typically consist of proprietary black box blocks with little information exposed to users except for a set of registers with their operational ranges. The behavior of an ISP is configurable with a set of user-adjustable hyperparameters. Hyperparameter values not only affect the output image but also the domain-specific application. Traditionally, imaging experts manually tune the hyperparameters of the ISP on a small dataset, using a combination of visual inspection and image quality metrics [9]. The resulting handcrafted hyperparameter settings are consequently biased towards human perception, and do not necessarily benefit analytic higher-level vision tasks [36, 38], see Fig. 1. + +Optimizing a hardware ISP for an end-to-end loss is challenging because the parameter space is formed by tens to hundreds of categorical and continuous parameters that can affect the downstream task in a complex and nonlinear manner via the intermediate ISP image output. For example, a single binary parameter may switch between completely different algorithmic branches. A full grid search is not an alternative due to the large combinatorial space of hyperparameters. Several recent works aim at automating this process by solving ISP hyperparameter optimization problems. However, to tackle this challenging optimization problem, they rely on software approximations of the hardware ISP to allow either block coordinate descent [30], which requires detailed knowledge of ISP block internals, or end-to-end gradient-based methods, which requires the approximation to be differentiable [35]. We demonstrate that such approximations and first-order methods are prone to local minima for a number of recent hardware ISPs. + +In this work, we depart from optimizing software approximations and demonstrate that it is possible to directly optimize low-level hardware ISP pipelines for an end-to-end domain-specific loss. The proposed hardware-in-the-loop optimization method revisits Covariance Matrix Adaptation Evolution Strategy (CMA-ES) [16]. We optimize ISP + +![](images/6c67a35c0d6a3ac383563c0c456db234c37f22574d529df6a271d64768e6be0c.jpg) +(a) Detection with Default ISP Hyperparameters + +![](images/760fba3287c7200a222e737ab610d2d39a2d6d4494683112cb5ea64bca016796.jpg) + +![](images/04ef69ac79d66b81c017e827668f9920a82259fd97359879a81c72712c6cdb56.jpg) +(c) End-to-end ISP Optimization with ISP Approximation from Tseng et al. [35] + +![](images/3331f7c57d333b9796cf5af13aaf256d7038994371ee1ee2ae7d2a830b006725.jpg) +Figure 1: Automotive object detection using [34] on real-world Sony IMX249 sensor captures processed with the ARM Mali-C71 hardware ISP, see text for details. The proposed hardware-in-the-loop end-to-end detection loss optimization approach (d) outperforms default ISP hyperparameters (a), ISP expert-tuned for perceptual image quality (b), and ISP optimized using a differentiable approximation [35] (c). + +![](images/3fbc9773ee4d7b8868c441011a17257c77fda2bffb8a3cba5db2a10c93f9a6b8.jpg) +(b) Expert-tuned ISP Hyperparameters for Perceptual Image Quality + +![](images/4b405f7a85a318b0e26adc3c16be60e565f1a16679130a75a1be895803a9e33b.jpg) + +![](images/a32ccef023e202a215473b3ea95b8b69274919b57f541f58728cc285cae925d3.jpg) +(d) Hardware-in-the-loop ISP End-to-end Optimization (this paper) + +![](images/e39e46135444433dc5cb23d5d06055bcf223fbcc6ad3b422132692144d5a520b.jpg) + +hyperparameters by solving a multi-objective black box optimization problem with a novel CMA-ES variant with max-rank-based multi-objective scalarization and initial search space reduction. The proposed method finds a set of best compromise solutions, i.e. Pareto front, over multiple objectives. We validate the proposed optimization method for a variety of applications including 2D object detection, segmentation and human viewing. For these applications, we demonstrate that the proposed hardware-in-the-loop method produces improved end-to-end losses compared to manual adjustment and existing approximation-based approaches. + +Specifically, we make the following contributions: + +- We propose an end-to-end hyperparameter optimization method for camera ISPs that integrates the hardware directly into the optimization loop. +- We propose a novel CMA-ES strategy for black box single and multi-objective ISP hyperparameter optimization robust with respect to parameter quantization and boundary effects. +- We validate end-to-end camera ISP optimization for 2D object detection, segmentation, and human viewing. For all applications, our approach outperforms existing state-of-the-art methods, including manual expert tuning and optimization via first-order approximations. + +Limitations In this work, when considering scene understanding on ISP-processed images as downstream tasks, we assume that the hyperparameters and parameters of this higher-level block, e.g., SIFT-based [27] or learned detector, have been fine-tuned to ISP outputs manually tuned for human viewing. Although additional fine-tuning of the + +downstream application module following ISP optimization might further improve the end-to-end performance, in this work, we assume the downstream block to be fixed. The challenging problem of joint optimization of hyperparameters and algorithm parameters along the full vision stack, including the image understanding module and potentially including optical and sensor design parameters, is an exciting area of future research that this work makes a first step towards. + +# 2. Related Work + +Optimization of Image Processing Pipelines Recently, several approaches [28, 30, 31, 38, 35] have explored the automatic optimization of image processing module hyperparameters. Note that ISP hyperparameter optimization should not be confused with adaptive capture control [12, 10, 24, 29, 37]. Adaptive capture control algorithms like auto-exposure (AE) extract statistics from the RAW image data to modify the capture process. We keep the camera control algorithms and their hyperparameters fixed. + +Mittal et al. [28] propose to regress the noise standard deviation parameter of the BM3D denoiser using the MultiScale Structural Similarity index (MS-SSIM). Pfister et al. [31] propose to optimize sparsity regularization for denoising. Nishimura et al. [30] recently proposed a $0^{th}$ -order white box ISP optimization method using Nelder-Mead; their approach, however, can only be used to optimize a small number of hyperparameters, optimizes one ISP block at a time, and requires information about the internals of the ISP. Blockwise methods are not suitable for the joint optimization of multiple ISP modules, and white box approaches cannot be used to optimize black box proprietary ISPs. + +![](images/2d7c8005541899d17dab4817f19acdcacf2b25bd8ac31ef09eb78334b7a57a7f.jpg) +Figure 2: Typical hardware ISP architecture (similar to the automotive ARM Mali ISP). The ISP is a function mapping an input RAW measurement $\mathbf{I}$ to an output color image using a sequence of image reconstruction blocks. These blocks process the image depending on hyperparameters $\Theta$ . In this work, we optimize $\Theta$ for an end-to-end objective, such as a detection loss for an object detector applied on the ISP output stream. + +Hyperparameter Optimization of Vision Algorithms Making an image understanding module, such as a 2D object detector, robust with respect to changes in lighting and other environmental conditions is a challenging problem. + +Bayesian optimization methods have been used for the optimization of dozens of hyperparameters for costly loss functions. Such methods have been used to optimize the hyperparameters of computer vision models [39, 1], building on existing hyperparameter optimization algorithms [2, 42, 3, 26]. Evolutionary strategies [8, 40] have also been proposed to optimize fast computer vision algorithms. + +These works ignore the role of the ISP in the image formation process. The impact of ISP components in vision systems has been examined in [6, 35, 38]. For example, Buckler et al. [6] suggested that ISPs switch between a human-viewable mode and computer vision mode in order to produce perceptually lower-quality image-data only suitable for computer vision. + +Manual ISP hyperparameter tuning for an image understanding downstream loss, for example intersection over union, is very challenging. To ease this difficult task, some camera and ISP manufacturers build simulation environments early within the design process [4]. Unfortunately, such simulated environments often have large domain gaps [20]. The proposed hardware-in-the-loop optimization method bridges domain gaps by processing RAW field data images with the actual hardware ISP. + +Optimization Using Differentiable Approximations Recently Tseng et al. [35] proposed an automatic optimization method for black box ISPs based on learning a differentiable proxy that approximates the entire ISP as a RAW-to-output image transfer function. This is similar to the proposed method in that it allows the optimization of black box ISPs. In addition, the authors demonstrated that their approach can be applied to various downstream tasks, for example image processing for human viewing and image understanding. Unlike the proposed hardware-in-the-loop optimization method however, Tseng et al. [35] rely on an approximate model (trained on the hardware) instead of the hardware itself. + +# 3. Image Formation Model + +We present a model representative of the digital camera image formation process, from sensing to post-processing [5]: + +1. Optics and Sensor: A lens or an assembly of lenses (i.e., optical system) focuses the scene radiance onto the sensor, which produces RAW pixel values by converting the photo-current measured in every pixel to discrete numbers using an analog-to-digital converter. +2. White Balance: The black level offset is subtracted. Defect pixels are detected and their pixel values corrected. Lens shading correction is performed. Devignetted pixel values are then gain-adjusted to match an estimated or preset white balance. +3. Demosaicking: RAW pixel values are typically captured using a color filter array sensor with a Bayer mosaic pattern. Trichromatic (e.g., RGB) pixel values are reconstructed from the mosaicked RAW image data. +4. Denoising: Pixel values are filtered to reduce noise, for example with edge-preserving filters or nonlocal patch matching. +5. Sharpening: Image details are boosted using unsharp masking or deconvolution. +6. Color and Tone Correction: Trichromatic pixel values are remapped based on the estimated illuminant. The image is tone mapped for contrast via global or local histogram manipulation and for display using gamma or sigmoid curve remapping. +7. Compression: Pixels values are converted to a specific color space (e.g., sRGB) and then compressed (e.g., JPEG). + +Treating integer values as real numbers for simplicity, we model an ISP that reconstructs trichromatic color images $\mathbf{O}$ from RAW color filter array measurements $\mathbf{I}$ of size $\mathrm{W} \times \mathrm{H}$ as follows: + +$$ +f: \mathbb {R} ^ {\mathrm {W} \times \mathrm {H}} \times \mathbb {R} _ {[ 0, 1 ]} ^ {\mathrm {P}} \rightarrow \mathbb {R} ^ {\mathrm {W} \times \mathrm {H} \times 3}, (\mathbf {I}, \boldsymbol {\Theta}) \mapsto \mathbf {O}. \tag {1} +$$ + +The reconstruction is modulated by the values of P contin + +uous hyperparameters $\Theta$ with range of values normalized to the unit interval $\mathbb{R}_{[0,1]}$ . Hyperparameters are generally discrete, each with its own operational range, for example $\{0,1\}$ for an algorithmic branch toggle and $\{0,\dots ,2^{10} - 1\}$ for a noise threshold [35]. We relax discrete parameters and map them to continuous parameters in the unit interval with an affine mapping (see Supplemental Material for details). + +# 4. End-to-end Loss Functions + +Existing end-to-end evaluation metrics include, for example, Mean-Average-Precision (mAP) and Mean-Average-Recall (mAR) for object detection, Panoptic Quality (PQ) for panoptic segmentation, and PSNR and CIELAB $\Delta C$ for human viewing. We use such metrics directly in the loss functions optimized by the proposed $0^{th}$ -order method. One or more metric might be used to optimize an ISP for a specific downstream task or an ensemble of potentially competing tasks. To this end, we pose ISP hyperparameter optimization as a Multi-Objective Optimization (MOO) [23] problem with optimal solutions + +$$ +\boldsymbol {\Theta} ^ {*} = \underset {\boldsymbol {\Theta} \in \mathbb {R} _ {[ 0, 1 ]} ^ {\mathrm {P}}} {\operatorname {a r g m i n}} \boldsymbol {\mathcal {L}} (\boldsymbol {\Theta}) := \underset {\boldsymbol {\Theta} \in \mathbb {R} _ {[ 0, 1 ]} ^ {\mathrm {P}}} {\operatorname {a r g m i n}} \left(\mathcal {L} _ {1} (\mathbf {s} (\boldsymbol {\Theta})), \dots , \mathcal {L} _ {\mathrm {L}} (\mathbf {s} (\boldsymbol {\Theta}))\right) \tag {2} +$$ + +where + +$$ +\mathbf {s} (\boldsymbol {\Theta}) = \left(f \left(\mathbf {I} _ {1}, \boldsymbol {\Theta}\right), \dots , f \left(\mathbf {I} _ {\mathrm {S}}, \boldsymbol {\Theta}\right)\right) \tag {3} +$$ + +is the output image stack consisting of a collection of images produced by the ISP using the same hyperparameter values but S different RAW image inputs from the input image stack $\mathbf{I}_1, \ldots, \mathbf{I}_{\mathrm{S}}$ . The objective is the vector $\mathcal{L}(\Theta)$ of Eq. (2), where the L end-to-end loss vector components $\mathcal{L}_l(\mathbf{s}(\Theta))$ are real-valued quality metrics measured on the output image stack. Each end-to-end loss component $\mathcal{L}_l(\mathbf{s}(\Theta))$ assigns a score to an hyperparameter setting $\Theta$ by evaluating the loss for images produced by the ISP modulated by $\Theta$ . + +There may be more than one optimal solution $\Theta^{*}$ . First, the mapping between a hyperparameter setting $\Theta$ and the output image stack $s(\Theta)$ may have a nontrivial kernel, meaning that different hyperparameter settings may produce the exact same output images, and consequently the same losses. Such kernels should be distinguished by reducing the number of degrees of freedom of the hyperparameter search space: Ideally, $s$ should be one-to-one, at least near hyperparameter settings that give near-optimal results. Second, MOO problems often have multiple solutions. For example, a first optimal solution may improve the value of $\mathcal{L}_1$ but make the value of $\mathcal{L}_2$ worse than another equally optimal solution. This manifests a different tradeoff between the conflicting loss functions. The set of optimal solutions to the MOO problem is called Pareto front [23]. + +We convert evaluation metrics into losses for which the value 0 means an optimal (or good enough) loss value. For + +![](images/57076df9c25fc58aed6d025fda441b783e7c1725cd3b85acbc86dff76a42b5aa.jpg) +Figure 3: Illustration of the proposed hardware-in-the-loop method for multi-objective end-to-end ISP optimization. + +example, if values of the evaluation metric $\mathcal{P}$ are to be treated as good enough if they fall within the range $[a,b]$ , the corresponding loss can be defined as + +$$ +\mathcal {L} (\mathbf {s} (\boldsymbol {\Theta})) = \left\{ \begin{array}{l} 0 \text {i f} \mathcal {P} (\mathbf {s} (\boldsymbol {\Theta})) \in [ a, b ], \text {a n d o t h e r w i s e} \\ \min (| a - \mathcal {P} (\mathbf {s} (\boldsymbol {\Theta})) |, | \mathcal {P} (\mathbf {s} (\boldsymbol {\Theta})) - b |). \end{array} \right. \tag {4} +$$ + +The proposed method facilitates weighting left distances differently than right distances and the use of other distance metrics than $\ell_1$ . + +ISP hyperparameters typically affect the output image in strongly coupled, nonlinear, even discontinuous ways. As such, block coordinate-descent optimization is unfortunately prone to local minima as we demonstrate in this work. In addition, many important evaluation metrics respond nonlinearly or discontinuously to changes in their image inputs. As a result, $\mathcal{L}_l(\mathbf{s}(\Theta))$ generally fails to have well-defined gradients, and a rugged search landscape, with local optima, outliers, discontinuities etc., is typical [35]. Moreover, ISP internals are often opaque, mandating black box optimization. Consequently, commonly used solvers are not adequate for the solution of MOO problem (2), see Supplemental Material. + +# 5. Hardware-in-the-loop Optimization + +The proposed hardware-in-the-loop ISP optimization method is illustrated in Fig. 3. Objective function evaluation begins by feeding a set of RAW images to the ISP, the output of which is then passed to the downstream task module. The output of the task module is evaluated by domain-specific evaluation metrics which are combined into the overall vectorial loss $\mathcal{L}$ . We propose a nonlinear nonconvex black box optimizer that uses CMA-ES [16] strategies. Although CMA-ES is a $0^{th}$ -order stochastic evolutionary search method, it can be viewed as $2^{nd}$ -order since it + +estimates a covariance matrix closely related to the inverse Hessian [17, 15]. This feature allows CMA-ES to handle non-separable and badly conditioned problems, including (2). Specifically, we use the evolutionary Algorithm 1 with generation size $\lambda$ and total number of iterations $N_{\mathrm{iter}}$ . + +Dynamic Weighted Max-rank Loss Single-objective CMA-ES ranks each generation's trials based on a single loss function. The loss function exposed to CMA-ES, critical when performing MOO, is the weighted max-rank loss, a novel rank-based variant of weighted Chebyshev Scalarization [11]. It is computed as follows. Let a trial be a hyperparameter setting for which losses are known. First, the rank of each trial with respect to each of the corresponding losses among the trials of the current and earlier generations is computed. Then, the weighted max-rank loss associated with $\Theta_{j}^{(t)}$ within generation $t$ is + +$$ +\mathcal {M} _ {j} ^ {(t)} = \max _ {l \in \{1, \dots , \mathrm {L} \}} w _ {l} ^ {(t)} \cdot \operatorname {r a n k} _ {\left\{\mathcal {L} _ {l} (\boldsymbol {\Theta} ^ {(0)}), \dots , \mathcal {L} _ {l} (\boldsymbol {\Theta} _ {\lambda} ^ {(t)}) \right\}} (\mathcal {L} _ {l} (\boldsymbol {\Theta} _ {j} ^ {(t)})). +$$ + +(Losses are assumed known for the initial centroid $\Theta^{(0)}$ .) The nonnegative weight $w_{l}^{(t)}$ , fixed within each generation, is used to modulate the importance of the loss function $\mathcal{L}_l$ . The scalarization is adaptive: $w_{l}^{(t)}$ is adjusted at the end of each generation based on the proportion of trials in recent generations which have attained the target loss value 0. + +Randomly drawn hyperparameter values that fall outside of the $\mathbb{R}_{[0,1]}$ search interval are mapped back in by reflection. In order to prevent an ISP hyperparameter from getting stuck at a fixed discrete value, Gaussian noise is added to each drawn hyperparameter value with a standard deviation chosen so that the proportion of trials without a bit change is approximately the proportion of trials with positive centroid $(\Theta)$ weights. + +We rely on statistics generated by a tracking Monte Carlo simulation to estimate deviations from randomness within the results. CMA-ES parameters like $\sigma$ , that affect the drawing of the trials of the next generation, are updated in this fashion. See Supplementary Material for details. + +Warm-starting using Search Space Reduction Another critical component of the proposed optimization method is warm-starting using a novel search space reduction based on (approximately) Latin Hypercube sampling and the Kolgomorov-Smirnov independence test. The primary function of the search space reduction is to remap $\mathbb{R}_{[0,1]}^{\mathrm{P}}$ in such a way that hyperparameter ranges which impact positively the values of the losses occupy a larger volume within the search hypercube $\mathbb{R}_{[0,1]}^{\mathrm{P}}$ . Search space reduction also provides an improved $\Theta^{(0)}$ to Algorithm 1. + +Search space reduction starts by sampling $\mathbb{R}_{[0,1]}^{\mathrm{P}}$ . Trial coordinates are randomly generated by drawing from a mixture of Gaussian and uniform distributions. The hypercube sampling is consequently approximately Latin. Statistical + +Algorithm 1 ISP Hyperparameter Optimization Method. +Require: $\Theta^{(0)}\in \mathbb{R}_{[0,1]}^{\mathrm{P}},\lambda \in \mathbb{N}^{*},N_{\mathrm{iter}}\in \mathbb{N}^{*}$ +1: initialize CMA-ES, $\Theta \gets \Theta^{(0)},t\gets 1$ +2: while stopping criterion not satisfied & $t\leq N_{\mathrm{iter}}$ do +3: for $j = 1$ to $\lambda$ do +4: $\Theta_j^{(t)}\gets$ randomly draw from Gaussian at $\Theta$ +5: Add random noise to $\Theta_j^{(t)}$ +6: Reflect $\Theta_j^{(t)}$ back to $\mathbb{R}_{[0,1]}^{\mathrm{P}}$ +7: s( $\Theta_j^{(t)})\gets$ run the ISP on I1,...,IS +8: $(\mathcal{L}_l(\mathbf{s}(\Theta_j^{(t)})),\dots ,\mathcal{L}_L(\mathbf{s}(\Theta_j^{(t)})))\gets$ losses +9: end for +10: $\Theta \gets$ update CMA-ES, $t\gets t + 1$ +11: end while +12: return $\Theta$ + +analysis is then performed on the loss components of the trials, one hyperparameter at a time. The dependence between each parameter and loss component is quantified with the $p$ -value of a Kolgomorov-Smirnov independence test with number of observations set to a small value. For each trial, the max-rank loss, over loss components impacted by the hyperparameter, is computed. The target interval for this hyperparameter is then taken to be the smallest interval that contains all the values of the hyperparameter for the $q\%$ trials with the best corresponding max-ranks. This is repeated multiple times, restricting the sampling of each hyperparameter to the previous stage's interval and centering its Gaussian component at the minimizer of the max-rank over the affected loss components. Before passing the result to CMA-ES, we construct a cubic spline for each hyperparameter so that the final interval occupies a large percentage of $\mathbb{R}_{[0,1]}$ . This spline is used to remap the values of the hyperparameter. This separable procedure yields a bijective mapping of $\mathbb{R}_{[0,1]}^{\mathrm{P}}$ onto itself. Because the entire hypercube is still reachable, the proposed CMA-ES variant can recover from a tainted statistical analysis. + +Max-rank Loss Initialization Following search space reduction, we compute the max-rank loss (over all loss components) of all trials with known losses, and we use the minimizer as initial hyperparameter setting $\Theta^{(0)}$ for Algorithm 1. + +Pareto Front Selection The very last $\Theta$ may not be the very best one. At the end of Algorithm 1, a Pareto sort of all of the trials for which losses are known is performed, and the one encountered last is chosen as champion. + +# 6. Assessment + +In this section, three ISP-sensor combinations are used to validate the proposed end-to-end hardware-in-the-loop op + +![](images/5857673da5acac9337644206d1860d45d3f213715578f17f79d56d367766acf5.jpg) +Figure 4: Image understanding evaluation: From left to right, eighty-class object detection on COCO using [33], automotive object detection on KITTI using [34], and instance segmentation on COCO using [18]; from top to bottom, default ISP settings, ISPs expert-tuned for perceptual image quality, and task-specific-optimized ISPs, respectively. While the task-specific-optimized ISPs do not achieve the same perceptual quality as the expert-tuned ones, they substantially improve downstream image understanding tasks. + +timization method for various downstream tasks: + +- ARM Mali-C71 ISP and SONY IMX249 CMOS sensor, with 28 ISP hyperparameters, +- OnSemi AP0202AT ISP and AR0231AT CMOS sensor, with 12 ISP hyperparameters, +- A synthetic (simulated) ISP processing simulated RAW, with processing blocks shown in Fig. 2, with 14 ISP hyperparameters. + +See the Supplemental Material for details. The performance of the proposed ISP optimization method is assessed for the following downstream tasks: + +- Automotive 2D object detection using [34] with Resnet101 [19] backbone. +Eighty-class 2D object detection using [33]. +- Instance segmentation using [18]. +- Panoptic segmentation with [18] for instance segmentation and [7] for semantic segmentation. +- Perceptual image quality for human viewing. + +The training and evaluation of an image understanding algorithm generally require a large number of annotated images. Annotated RAW data is split into separate optimization and test sets. When using an existing dataset, e.g., KITTI [13], the optimization set is taken from the training dataset and we leave the test set untouched. We have found that relatively small but representative optimization datasets, with + +Table 1: Downstream applications and corresponding end-to-end evaluation metrics optimized in this assessment. + +
TaskEnd-to-end Loss Component
Object DetectionmAP and mAR [25]
Instance SegmentationmAP [25]
Panoptic SegmentationPQ [22]
Perceptual Image Quality5LPCERC + ℓ1 [35]
+ +about $S = 100$ images, are sufficient for ISP hyperparameter optimization. This is unsurprising given that ISPs have orders of magnitudes fewer parameters than higher-level neural networks. + +Evaluation metrics are listed in Table 1: mean average precision with IoU 0.5 (mAP) [25], mean average recall for 10 detections per image (mAR) [25], Panoptic-Quality (PQ) [22] and, for human viewing Image Quality (IQ), the $\ell_1$ -norm of the difference between the ISP output and a reference image combined with the Perceptual image difference metric introduced in [41] and denoted by $\hat{\mathcal{L}}_{\mathrm{PERC}}$ . + +# 6.1. ISP Optimization for Object Detection + +Synthetic Evaluation Assessing methods using RAW data for an image understanding task requires a large amount of annotated training and test data. We first evaluate our approach with simulated RAW data using existing large sRGB datasets and a synthetic ISP. To this end, we processed sRGB images with RAW data simulation [21] and used a synthetic ISP that processes the RAW images, see Supplemental Material. We optimize the ISP for two different ob + +Table 2: Synthetic ISP optimization for domain-specific tasks. +Task: Eighty-class Object Detection using [33] and COCO [25] + +
Optimization MethodmAPmAR
Default Parameters0.150.13
Expert-tuned for Perceptual Image Quality0.350.32
Proposed for Object Detection Loss0.390.36
blockwise for Object Detection [30]0.200.17
+ +Task: Automotive Object Detection using [34] and KITTI [13] + +
Optimization MethodmAPmAR
Default Parameters0.140.10
Expert-tuned for Perceptual Image Quality0.610.57
Proposed for Object Detection Loss0.750.71
+ +ject detection tasks as shown in Fig. 4: eighty-class object detection with the MS COCO dataset [25] using [33]; and two-class pedestrian-vehicle detection with the KITTI [13] dataset using [34]. Although expert-tuned ISP hyperparameters produce less noisy and perceptually better images (see Fig. 4), contrast around object boundaries is significantly higher with the proposed end-to-end optimization method, which leads to better performance for the downstream task. Table 2 shows a margin of 0.04 in both mAP and mAR for eighty-class object detection, and 0.14 in both mAP and mAR for automotive object detection, thus validating the proposed method. + +Experimental Evaluation We next validate the proposed hardware-in-the-loop end-to-end optimization method with the ARM Mali-C71 ISP. We capture a set of RAW images of street scenes with a SONY IMX249 sensor. The experimental data contains annotated day and night scenes suitable for the evaluation of object detection models designed for automotive 2D object detection with [34] (see Supplemental Material). Quantitative evaluation results are shown in Table 3. The proposed method outperforms the ISP expert-tuned for perceptual image quality by margins of $0.30\mathrm{mAP}$ and $0.25\mathrm{mAR}$ . The ISP task-specific optimized using the proposed hardware-in-the-loop approach boosts local image gradients based on semantics, which results in improved detection, even though the image is more noise-contaminated (Fig. 1). This insight led us to manually boost local gradients to improve detection within a month-long manual tuning campaign led by an ISP expert. The resulting hyperparameters achieved a better performance than other methods but still fell short of the proposed optimization method by $0.12\mathrm{mAP}$ and $0.10\mathrm{mAR}$ . + +# 6.2. ISP Optimization for Image Segmentation + +Next, we demonstrate end-to-end ISP optimization for instance segmentation and panoptic segmentation [22] tasks. The evaluation is performed using the synthetic ISP and existing image segmentation datasets. We optimize the synthetic ISP using the simulated RAW COCO dataset to + +Table 3: ARM Mali-C71 ISP optimization for automotive object detection using [34]. + +
Optimization MethodmAPmAR
Default Parameters0.130.12
Expert-tuned for Perceptual Image Quality0.140.13
Expert-tuned for Object Detection Loss0.320.28
Tseng et al. [35] for IoU loss0.260.23
Proposed for Object Detection Loss0.440.38
+ +Table 4: Evaluation for segmentation tasks on images generated using default ISP, ISP expert-tuned for perceptual image quality, and ISP optimized using the proposed method. + +
Optimization MethodmAP Instance [18]PQ Panoptic [7]
Default Parameters0.120.15
Expert-tuned for Perceptual Image Quality0.260.28
Proposed for Segmentation Loss0.320.35
+ +maximize mAP using [18] for instance segmentation. Fig. 4 shows examples of instance segmentation using three different ISP hyperparameter sets. For instance segmentation, the proposed end-to-end optimization achieves an improvement of 0.06 in mAP compared to the ISP expert-tuned for perceptual image quality. We perform a separate ISP optimization to minimize the PQ loss for panoptic segmentation. The proposed optimization for PQ loss achieves an improvement of 0.07 compared to the expert-tuned ISP for perceptual image quality (see Table 4). + +# 6.3. ISP Optimization for Human Viewing + +Perceptual image quality attributes [32], like sharpness, noise, detail, tone reproduction, contrast, and artifacts like zippering and staircasing impact human viewing applications. Like Tseng et al. [35], we optimize ISP hyperparameters for human viewing by minimizing the distance between the ISP output and a reference image, namely the central region of an aligned and resampled variant of the rainbow chart of [35]. Precise alignment of the reference and the ISP output is required. The reference is enhanced so that the optimized ISP reproduce the corresponding perceptual image quality attributes: It is tone mapped with a sigmoid-like curve to boost contrast and, at low gain, it is sharpened by unsharp masking to raise artificial acutance. The distance is computed with the perceptual loss $\mathcal{L}_{\mathrm{PERC}} = 5\hat{\mathcal{L}}_{\mathrm{PERC}} + \ell_1$ where $\hat{\mathcal{L}}_{\mathrm{PERC}}$ is the AlexNet variant of the Perceptual metric [41] and the $\ell_1$ -norm of the difference is measured in normalized sRGB. + +Captures of the rainbow chart were taken at two gains, high and low, and each corresponding $\mathcal{L}_{\mathrm{PERC}}$ was fed to the optimizer (see Supplemental Material). Table 5 shows the values of three standard perceptual image quality metrics as measured on camera outputs of the rainbow chart using an expert-tuned ISP for perceptual image quality and an ISP optimized using the proposed method. Fig. 5 shows light + +Table 5: Expert tuning and optimization of ARM Mali-C71 and OnSemi AP0202AT ISPs for perceptual image quality using Tseng et al. [35] and the proposed methods. + +
ARM Mali-C71OnSemi AP0202AT
Expert Tseng et al. [35]ProposedExpert Tseng et al. [35]Proposed
SSIM0.770.850.890.840.850.86
PSNR16.5019.5321.5217.9717.6718.41
CIELAB ΔE13.8110.549.9410.5810.409.88
+ +![](images/53edf5854e2b24df79ad14566081700072ecf6ab3c1f124f23dad895b0115241.jpg) + +![](images/46de4c5c8d3ee470c2c1f0ffc8725639aed8415f08acb3e297dec0636d1c0312.jpg) + +![](images/6cea416f217a5d0470b86deda6257ca4290d78c8395de9627fe88eeac0490b0b.jpg) +ARM Mali-C71 Optimized for Perceptual Quality using ISP Approximation Approach + +![](images/fbe1762fabb4b0a0f8e2443bacf14b2127dc58365f887503c9dcd111d23303ce.jpg) +OnSemi AP0202AT Optimized for Perceptual Quality using ISP Approximation Approach + +![](images/1ab3c854460b8f5e8454807c50c8223cbaa9442ee2a41f1e6835caff8844f0b1.jpg) +ARM Mali-C71 Optimized for Perceptual Quality using Hardware-in-the-loop Approach (proposed) +Figure 5: Optimization of ARM Mali-C71 and OnSemi AP0202AT ISPs for perceptual image quality. + +![](images/78147b98444160b0516c5937869904b3373267ec841548caae5ac27f22984431.jpg) +OnSemi AP0202AT Optimized for Perceptual Quality using Hardware-in-the-loop Approach (proposed) + +booth captures taken with the same hyperparameters. The results show that the proposed optimization method produces ISP hyperparameter settings with more detail, less noise, and better colors. + +# 6.4. Blockwise ISP Optimization + +Next, we compare the proposed method to the blockwise ISP optimization method of Nishimura et al. [30]. The authors optimize the blocks of an ISP sequentially, one group of hyperparameters at a time, a process that assumes ISP blocks to be functionally independent and separately accessible. Blockwise optimization is evaluated with the synthetic ISP and eighty-class object detection. For experiment details, see Supplemental Material. Table 2 shows that mAP and mAR scores are substantially lower with block- + +wise optimization than with the proposed joint hardware-in-the-loop optimization method. While blockwise ISP optimization [30] mitigates combinatorial explosion, this experiment demonstrates that ISP processing blocks are not necessarily independent and validates the proposed simultaneous optimization of all hyperparameters. + +# 6.5. Optimization using ISP Approximations + +We also compare the proposed method to the first-order ISP approximation method of Tseng et al. [35]. Fig. 5 shows images processed with the ARM Mali-C71 and On-Semi AP0202AT ISPs using hyperparameters tuned for perceptual image quality by an expert, optimized with the ISP approximation-based method, and optimized with the proposed hardware-in-the-loop method. We use the same end-to-end loss for the proposed method and Tseng et al. (Table 1). Table 5 shows that the proposed method outperforms Tseng et al. [35] in perceptual image quality. Next, we compare the two methods for the automotive 2D object detection task with the differentiable bounding-box regression and classification loss from [14]. As shown in Table 3, hardware-in-the-loop outperforms ISP-approximation by $0.18\mathrm{mAP}$ and $0.15\mathrm{mAR}$ . Qualitatively, the method of Tseng et al. [35] achieves this by finding a hyperparameter set that boosts local gradients (Fig. 1); the proposed method finds a hyperparameter set that further increases them. + +# 7. Conclusions + +We present a hardware-in-the-loop approach for optimizing black box ISPs. Specifically, we formulate hardware ISP hyperparameter tuning as a multi-objective nonlinear optimization problem which we solve using CMA-ES strategies with a max-rank-based scalarization and initial search space reduction. We validate the proposed method for end-to-end camera ISP optimization on 2D object detection, segmentation, and human viewing as task domains. For all applications, the proposed method outperforms existing state-of-the-art approaches, including expert manual tuning and first-order approximations. The proposed method optimizes the hyperparameters of ISP blocks not in isolation but within the full image processing stack, with the hardware in the loop. Exciting directions for future research include design parameters of the optics and sensor in the end-to-end optimization, or searching the design space of the ISP algorithms and downstream network architecture themselves, potentially allowing for joint image processing, sensor, optics and downstream network architecture design. + +# 8. Acknowledgments + +The authors thank Amrit Krishnan, Dong-eun Seo, Federico Ariza, Karl St-Arnaud and Luis Garcia for many fruitful discussions and assistance with the experiments. + +# References + +[1] Rémi Bardenet, Mátyás Brendel, Balázs Kégl, and Michele Sebag. Collaborative hyperparameter tuning. In International Conference on Machine Learning (ICML), pages 199-207, 2013. 3 +[2] James Bergstra, Daniel Yamins, and David Daniel Cox. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures. In International Conference on Machine Learning (ICML), 2013. 3 +[3] James S. Bergstra, Rémi Bardenet, Yoshua Bengio, and Balázs Kégl. Algorithms for hyper-parameter optimization. In Advances in Neural Information Processing Systems, pages 2546-2554, 2011. 3 +[4] Henryk Blasinski, Joyce Farrell, Trisha Lian, Zhenyi Liu, and Brian Wandell. Optimizing image acquisition systems for autonomous driving. *Electronic Imaging*, 2018(5):1-7, 2018. 3 +[5] Michael S. Brown. Understanding the in-camera image processing pipeline for computer vision. IEEE International Conference on Computer Vision (ICCV) - Tutorial, 2019. 3 +[6] Mark Buckler, Suren Jayasuriya, and Adrian Sampson. Reconfiguring the imaging pipeline for computer vision. In IEEE International Conference on Computer Vision (ICCV), pages 975-984, 2017. 3 +[7] 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. 6, 7 +[8] Ernest C. H. Cheung, Jiali Wong, Joceyln Chan, and Jia Pan. Optimization-based automatic parameter tuning for stereo vision. In IEEE International Conference on Automation Science and Engineering (CASE), pages 855-861, 2015. 3 +[9] IEEE standard for camera phone image quality. IEEE Std 1858-2016 (Incorporating IEEE Std 1858-2016/Cor 1-2017), pages 1-146, May 2017. 1 +[10] Jingming Dong, Iuri Frosio, and Jan Kautz. Learning adaptive parameter tuning for image processing. *Electronic Imaging*, 2018(13):1-8, 2018. 2 +[11] Michael T. Emmerich and André H. Deutz. A tutorial on multiobjective optimization: Fundamentals and evolutionary methods. 17(3):585-609, Sept. 2018. 5 +[12] Eduardo S. L. Gastal and Manuel M. Oliveira. Adaptive manifolds for real-time high-dimensional filtering. ACM Transactions on Graphics (SIGGRAPH), 31(4):33, 2012. 2 +[13] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the KITTI vision benchmark suite. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3354-3361, 2012. 6, 7 +[14] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 580-587, 2014. 8 + +[15] Nikolaus Hansen. Benchmarking a BI-population CMA-ES on the BBOB-2009 function testbed. In Workshop Proceedings of the GECCO Genetic and Evolutionary Computation Conference, pages 2389-2395, July 2009. 5 +[16] Nikolaus Hansen and Andreas Ostermeier. Adapting arbitrary normal mutation distributions in evolution strategies: The covariance matrix adaptation. In IEEE International Conference on Evolutionary Computation, pages 312-317, 1996. 1, 4 +[17] Nikolaus Hansen and Andreas Ostermeier. Completely derandomized self-adaptation in evolution strategies. Evolutionary Computation, 9(2):159-195, 2001. 5 +[18] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask R-CNN. In IEEE International Conference on Computer Vision (CVPR), pages 2961-2969, 2017. 6, 7 +[19] 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. 6 +[20] 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 +[21] Seon Joo Kim, Hai Ting Lin, Zheng Lu, Sabine Süssstrunk, Stephen Lin, and Michael S Brown. A new in-camera imaging model for color computer vision and its application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(12):2289-2302, 2012. 6 +[22] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dólar. Panoptic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9404-9413, 2019. 6, 7 +[23] Marco Laumanns, Lothar Thiele, Kalyanmoy Deb, and Eckart Zitzler. Combining convergence and diversity in evolutionary multiobjective optimization. Evolutionary Computation, 10(3):263-282, 2002. 4 +[24] Anat Levin, Boaz Nadler, Fredo Durand, and William T Freeman. Patch complexity, finite pixel correlations and ooptimal denoising. In European Conference on Computer Vision (ECCV), pages 73-86, 2012. 2 +[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 European Conference on Computer Vision (ECCV), pages 740-755, 2014. 6, 7 +[26] Ilya Loshchilov and Frank Hutter. CMA-ES for hyperparameter optimization of deep neural networks. arXiv preprint arXiv:1604.07269, 2016. 3 +[27] David G. Lowe. Object recognition from local scale-invariant features. In IEEE International Conference on Computer Vision (ICCV), volume 2, pages 1150-1157, 1999. 2 +[28] Anish Mittal, Anush K Moorthy, and Alan C Bovik. Automatic parameter prediction for image denoising algorithms using perceptual quality features. In Human Vision and Electronic Imaging XVII, volume 8291, page 82910G, 2012. 2 +[29] Shree K. Nayar and Vlad Branzoi. Adaptive dynamic range imaging: Optical control of pixel exposures over space and + +time. In IEEE International Conference on Computer Vision (ICCV), page 1168, 2003. 2 +[30] Jun Nishimura, Timo Gerasimow, Rao Sushma, Aleksandar Sutic, Chyuan-Tyng Wu, and Gilad Michael. Automatic ISP image quality tuning using nonlinear optimization. In IEEE International Conference on Image Processing (ICIP), pages 2471-2475, 2018. 1, 2, 7, 8 +[31] Luke Pfister and Yoram Bresler. Learning filter bank sparsifying transforms. IEEE Transactions on Signal Processing, 67(2):504-519, 2018. 2 +[32] Jonathan B. Phillips and Henrik Eliasson. Camera Image Quality Benchmarking. Wiley Publishing, 1st edition, 2018. 7 +[33] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. 6, 7 +[34] 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. 2, 6, 7 +[35] Ethan Tseng, Felix Yu, Yuting Yang, Fahim Mannan, Karl ST Arnaud, Derek Nowrouzezahrai, Jean-François Lalonde, and Felix Heide. Hyperparameter optimization in black-box image processing using differentiable proxies. ACM Transactions on Graphics (SIGGRAPH), 38(4):27, 2019. 1, 2, 3, 4, 6, 7, 8 +[36] Chyuan-Tyng Wu, Leo F Isikdogan, Sushma Rao, Bhavin Nayak, Timo Gerasimow, Aleksandar Sutic, Liron Ainkedem, and Gilad Michael. VisionISP: Repurposing the image signal processor for computer vision applications. In + +IEEE International Conference on Image Processing (ICIP), pages 4624-4628, 2019. 1 +[37] Qi Xie, Qian Zhao, Deyu Meng, Zongben Xu, Shuhang Gu, Wangmeng Zuo, and Lei Zhang. Multispectral images denoising by intrinsic tensor sparsity regularization. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1692-1700, 2016. 2 +[38] Lucie Yahiaoui, Ciarán Hughes, Jonathan Horgan, Brian Deegan, Patrick Denny, and Senthil Yogamani. Optimization of ISP parameters for object detection algorithms. *Electronic Imaging*, 2019(15):44–1, 2019. 1, 2, 3 +[39] Dani Yogatama and Gideon Mann. Efficient transfer learning method for automatic hyperparameter tuning. In International Conference on Artificial Intelligence and Statistics, pages 1077-1085, 2014. 3 +[40] Steven R. Young, Derek C. Rose, Thomas P. Karnowski, Seung-Hwan Lim, and Robert M. Patton. Optimizing deep learning hyper-parameters through an evolutionary algorithm. In Workshop on Machine Learning in High-Performance Computing Environments, pages 1-5, 2015. 3 +[41] Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 586-595, 2018. 6, 7 +[42] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8697-8710, 2018. 3 \ No newline at end of file diff --git a/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/images.zip b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..76ab5c6d1e86bf9bf80bcac9dc0d5697bb9b3ab7 --- /dev/null +++ b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fe31da6e0f4670754ae3304400c664b8c12c2951ff8f48ce953afa9672cf3d6 +size 671658 diff --git a/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/layout.json b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9728f71797e490ab6fc5460b3de46f0924eefc09 --- /dev/null +++ b/hardwareintheloopendtoendoptimizationofcameraimageprocessingpipelines/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9512762b26802789e7b5f48b5eb27eda6294a9e9061234958f32d2a4f1edf028 +size 399082 diff --git a/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_content_list.json b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4f788b8b56e9263faeda57064cbb65fa86c58ccc --- /dev/null +++ b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e5040182c73816b527d263a8a1408b1b2b9d619c28bccc87c5457f3bc283d43 +size 83219 diff --git a/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_model.json b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fa24821b118bd385b08a73990ca7d36ca73f584f --- /dev/null +++ b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3da6f671b49f810f36b52683a943d297b7cc2426c50308bc2b071fcda09f705e +size 102630 diff --git a/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_origin.pdf b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a122e74183ae097bf692b9dac0da9a11c45964f8 --- /dev/null +++ b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/c16c6338-e76a-4201-b908-7a2bc85c09b6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4c7f4778005ab47bddb8bd2d3f3a70af5300fd9930943af0c2f0787cb408f48 +size 4683127 diff --git a/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/full.md b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1a7c2b5a4eeb3079969258955cb4bbbd8e6358c3 --- /dev/null +++ b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/full.md @@ -0,0 +1,346 @@ +# Harmonizing Transferability and Discriminability for Adapting Object Detectors + +Chaoqi Chen1, Zebiao Zheng1, Xinghao Ding1, Yue Huang1*, Qi Dou2 + +$^{1}$ Fujian Key Laboratory of Sensing and Computing for Smart City, School of Informatics, Xiamen University, China + +$^{2}$ Department of Computer Science and Engineering, The Chinese University of Hong Kong + +cqchen94@stu.xmu.edu.cn, zbzheng@stu.xmu.edu.cn +dxh@xmu.edu.cn, huangyue05@gmail.com, qdou@cse.cuhk.edu.hk + +# Abstract + +Recent advances in adaptive object detection have achieved compelling results in virtue of adversarial feature adaptation to mitigate the distributional shifts along the detection pipeline. Whilst adversarial adaptation significantly enhances the transferability of feature representations, the feature discriminability of object detectors remains less investigated. Moreover, transferability and discriminability may come at a contradiction in adversarial adaptation given the complex combinations of objects and the differentiated scene layouts between domains. In this paper, we propose a Hierarchical Transferability Calibration Network (HTCN) that hierarchically (local-region/image/instance) calibrates the transferability of feature representations for harmonizing transferability and discriminability. The proposed model consists of three components: (1) Importance Weighted Adversarial Training with input Interpolation (IWAT-I), which strengthens the global discriminability by re-weighting the interpolated image-level features; (2) Context-aware Instance-Level Alignment (CILA) module, which enhances the local discriminability by capturing the underlying complementary effect between the instance-level feature and the global context information for the instance-level feature alignment; (3) local feature masks that calibrate the local transferability to provide semantic guidance for the following discriminative pattern alignment. Experimental results show that HTCN significantly outperforms the state-of-the-art methods on benchmark datasets. + +# 1. Introduction + +Object detection has shown great success in the deep learning era, relying on representative features learned from + +large amount of labeled training data. Nevertheless, the object detectors trained on the source domain do not generalize well to a new target domain, due to the presence of domain shift [50]. This hinders the deployment of models in real-world situations where data distributions typically vary from one domain to another. Unsupervised Domain Adaptation (UDA) [36] serves as a promising solution to solve this problem by transferring knowledge from a labeled source domain to a fully unlabeled target domain. + +A general practice in UDA is to bridge the domain gap by explicitly learning invariant representations between domains and achieving small error on the source domain, which have achieved compelling performance on image classification [15, 55, 13, 49, 54, 45, 23, 5] and semantic segmentation [52, 19, 64, 63, 28, 29]. These UDA methods can fall into two main categories. The first category is statistics matching, which aims to match features across domains with statistical distribution divergence [15, 12, 33, 35, 60, 40]. The second category is adversarial learning, which aims to learn domain-invariant representations via domain adversarial training [13, 54, 47, 34, 58, 5] or GAN-based pixel-level adaptation [3, 31, 43, 20, 19]. + +Regarding UDA for cross-domain object detection, several works [7, 44, 62, 4, 26, 18] have recently attempted to incorporate adversarial learning within de facto detection frameworks, e.g., Faster R-CNN [42]. With the local nature of detection tasks, current methods typically minimize the domain disparity at multiple levels via adversarial feature adaptation, such as image and instance levels alignment [7], strong-local and weak-global alignment [44], local-region alignment based on region proposal [62], multi-level feature alignment with prediction-guided instance-level constraint [18]. They hold a common belief that harnessing adversarial adaptation helps yield appealing transferability. + +However, transferability comes at a cost, i.e., adversarial adaptation would potentially impair the discriminability + +of target features since not all features are equally transferable. Note that, in this paper, the transferability refers to the invariance of the learned representations across domains, and discriminability refers to the ability of the detector to localize and distinguish different instances. Some recent studies [6, 53] have also implied similar finding, but how to identify and calibrate the feature transferability still remains unclear. This phenomenon would be more severe in cross-domain detection, given the complex combinations of various objects and the differentiated scene layouts between domains. In other words, strictly aligning the entire feature distributions between domains by adversarial learning is prone to result in negative transfer, because the transferability of different levels (i.e., local-region, instance and image) is not explicitly elaborated in the object detector. + +In this work, we propose to harmonize transferability and discriminability for cross-domain object detection by developing a novel Hierarchical Transferability Calibration Network (HTCN), which regularizes the adversarial adaptation by hierarchically calibrating the transferability of representations with improved discriminability. Specifically, we first propose an Importance Weighted Adversarial Training with input Interpolation (IWAT-I) strategy, which aims to strengthen the global discriminability by re-weighting the interpolated feature space based on the motivation that not all samples are equally transferable especially after interpolation. Secondly, considering the structured scene layouts and the local nature of the detection task, we design a Context-aware Instance-Level Alignment (CILA) module to enhance the local discriminability by capturing the complementary effect between the instance-level feature and the global context information. In particular, instead of simply concatenating these two terms, our approach resorts to the tensor product for more informative fusion. Finally, upon observing that some local regions of the whole image are more descriptive and dominant than others, we further enhance the local discriminability by proposing to compute local feature masks in both domains based on the shallow layer features for approximately guiding the semantic consistency in the following alignment, which can be seen as an attention-like module that capture the transferable regions in an unsupervised manner. + +The proposed HTCN significantly extends the ability of previous adversarial-based adaptive detection methods by harmonizing the potential contradiction between transferability and discriminability. Extensive experiments show that the proposed method exceeds the state-of-the-art performance on several benchmark datasets for cross-domain detection. For example, we achieve $39.8\%$ mAP on adaptation from Cityscapes to Foggy-Cityscapes, outperforming the latest state-of-the-art adversarial-based adaptation methods [44, 62, 26, 18] by a large margin (5.6% on average) and approaching the upper bound (40.3%). Our code is avail- + +able at https://github.com/chaojichen/HTCN. + +# 2. Related Work + +Unsupervised Domain Adaptation Unsupervised domain adaptation (UDA) attempts to transfer knowledge from one domain to another by mitigating the distributional variations. Recently, UDA has achieved extensive success, especially for image classification and semantic segmentation. Typically, UDA methods propose to bridge different domains by matching the high-order statistics of source and target feature distributions in the latent space, such as Maximum Mean Discrepancy (MMD) [55, 33], second-order moment [49], Central Moment Discrepancy (CMD) [60], and Wasserstein distance [46]. With insights from the practice of Generative Adversarial Nets (GAN) [16], tremendous works [14, 54, 38, 45, 56, 5] have been done by leveraging the two-player game to achieve domain confusion with Gradient Reversal Layer (GRL) for feature alignment. In addition, other GAN-based works [3, 31, 43, 20, 19, 51] aim to achieve pixel-level adaptation in virtue of image-to-image translation techniques, e.g., CycleGAN [61]. + +UDA for Object Detection By contrast, there is relatively limited study on domain adaptation for object detection task, despite the impressive performance on single domain detection [42, 32, 41, 30, 39]. Following the practice of conventional wisdom, Chen et al. [7] pioneer this line of research, which propose a domain adaptive Faster R-CNN to reduce the distribution divergence in both image-level and instance-level by embedding adversarial feature adaptation into the two-stage detection pipeline. Saito et al. [44] propose to align local receptive fields on shallow layers and image-level feature on deep layers, namely, strong local and weak global alignments. Similarly, He et al. [18] propose a hierarchical domain feature alignment module and a weighted GRL to re-weight training samples. Zhu et al. and Cai et al. [62, 4] propose to exploit object proposal mining or object relations to achieve detailed local-region alignment in deep layers. Kim et al. [26] solve the adaptation problem from the perspective of domain diversification by randomly augmenting source and target domains into multiple domains, and then learning the invariant representations among domains. Nevertheless, all these UDA methods do not properly handle the potential contradiction between transferability and discriminability when adapting object detectors in the context of adversarial adaptation. + +# 3. Hierarchical Transferability Calibration Network (HTCN) + +In this section, we present the technical details of the proposed method. The overall architecture of the proposed HTCN is shown in Fig. 1, which consists of three modules, IWAT-I, CILA, and the local feature masks for se + +![](images/0422aaa1b55b1e50e037a20a5dc5dfbf80fe8f53f51a1851c945b4e699a0c304.jpg) +Figure 1: The overall structure of the proposed HTCN. $D_{1}$ is pixel-wise domain discriminator, while $D_{2}$ and $D_{3}$ are image-wise domain discriminator. $G_{1}, G_{2}$ , and $G_{3}$ denote the different level feature extractors. + +mantic consistency. IWAT-I regularizes the image-level adversarial adaptation to calibrate the global transferability by re-weighting the interpolated feature space in image-wise. CILA regularizes the instance-level adversarial adaptation to calibrate the local transferability in virtue of tensor product to enable the informative interactions between the instance-level feature and the aggregated context vector. + +# 3.1. Problem Formulation + +For cross-domain object detection, it is required to simultaneously predict the bounding box locations and object categories. Formally, we have access to a labeled source dataset $\mathcal{D}_s = \{(x_i^s,y_i^s,b_i^s)\}_{i = 1}^{N_s}(y_i^s\in \mathcal{R}^{k\times 1},b_i^s\in \mathcal{R}^{k\times 4})$ of $N_{s}$ samples, and a target dataset $\mathcal{D}_t = \{x_j^t\}_{j = 1}^{N_t}$ of $N_{t}$ unlabeled samples. The source and target domains share an identical label space, but violate the i.i.d. assumption as they are sampled from different data distributions. The goal of this paper is to learn an adaptive object detector, with the labeled $\mathcal{D}_s$ and unlabeled $\mathcal{D}_t$ , which can perform well on the target domain. Following the mainstream cross-domain detection methods [7, 44, 62, 4, 18], the proposed HTCN is based on the Faster-RCNN [42] framework. + +As demonstrated in Section 1, transferability and discriminability may come at a contradiction in cross-domain detection tasks when using adversarial adaptation. Motivated by this, our cross-domain detection approach resolves this problem from two perspectives: 1) calibrating the transferability by hierarchically identifying and matching the transferable local region features (Sec. 3.4), holistic image-level features (Sec. 3.2), and ROI-based instance-level features (Sec. 3.3), and 2) the hierarchical transferability-based cross-domain feature alignments, in turn, will improve the feature discriminability at multiple levels. + +![](images/857c2d686e6f2fa679afd1a3dd41a3e571b6c30b28e1d60534f59cedea4883fa.jpg) +Figure 2: Motivation of the interpolation operation for improving the source-biased decision boundary through generating synthetic samples from its counterpart domain to fill in the distributional gap between domains. + +# 3.2. Importance Weighted Adversarial Training with Input Interpolation + +Domain adversarial training [13] serves as a typical and powerful domain alignment approach to align feature distributions via a two-player game. Nevertheless, pure domain alignment may potentially deteriorate the semantic consistency and result in negative transfer, which has been extensively explored by numerous prior works [58, 64, 34, 27, 5, 57, 10] in image classification and semantic segmentation tasks. By contrast, it is difficult or even impossible to explicitly encourage the cross-domain semantic consistency in object detection due to the distinct scene layouts, object co-occurrence, and background between domains. The representative semantic alignment strategies (e.g., prototype alignment [58, 5, 37, 10] or entropy regularization [64, 47, 8]) would be no longer applicable. + +To overcome the negative transfer in the context of cross-domain detection, the proposed IWAT-I adapts the source-biased decision boundary to target data through generating interpolation samples between domains, which implicitly induces the adversarial training to converge to a better saddle point and explicitly calibrate the global transferability + +to promote positive transfer. The motivation of the interpolation based adversarial training is illustrated in Fig. 2. Without interpolation, the decision boundary learned by the adversarial training is prone to be source-biased, which will deteriorate its discriminability in the target domain. + +The interpolation is implemented with CycleGAN [61] by generating synthetic samples from its counterpart domain to fill in the distributional gap between domains. Next, we aim to re-weight the interpolated data space based on their importance. The importance is associated with the cross-domain similarity, i.e., the higher the similarity is, the greater importance the sample is. Our key insight is that not all images are created equally in terms of transferability especially after interpolation. We aim to up-weight the most desirable samples while down-weight the irrelevant samples to calibrate the image-level transferability. + +Specifically, we leverage the uncertainty of the domain discriminator with respect to an input sample to discover transferable samples. The output of the discriminator $D_{2}$ w.r.t. an input $x_{i}$ is $d_{i} = D_{2}(G_{1} \circ G_{2}(x_{i}))$ . Then, the uncertainty $v_{i}$ of each $x_{i}$ is measured by the information entropy w.r.t. the output of the domain discriminator, + +$$ +v _ {i} = H (d _ {i}) = - d _ {i} \cdot \log (d _ {i}) - (1 - d _ {i}) \cdot \log (1 - d _ {i}) \tag {1} +$$ + +where $H(\cdot)$ is the entropy function. The weight of each image $x_{i}$ can then be computed as $1 + v_{i}$ . Images with high uncertainty (hard-to-distinguish by $D_{2}$ ) should be up-weighted, vice versa. The obtained uncertainty is then used to re-weight the feature representation as follows, + +$$ +g _ {i} = f _ {i} \times (1 + v _ {i}) \tag {2} +$$ + +where $f_{i}$ is the feature before feeding into $D_{2}$ . The input of $D_{3}$ is $G_{3}(g_{i})$ and its adversarial loss is defined as, + +$$ +\mathcal {L} _ {g a} = \mathbb {E} \left[ \log \left(D _ {3} \left(G _ {3} \left(g _ {i} ^ {s}\right)\right)\right) + \mathbb {E} \left[ 1 - \log \left(D _ {3} \left(G _ {3} \left(g _ {i} ^ {t}\right)\right)\right) \right] \right. \tag {3} +$$ + +# 3.3. Context-Aware Instance-Level Alignment + +Instance-level alignment refers to the ROI-Pooling based feature alignment, which has been explored by some prior efforts [7, 62, 18]. While these approaches are capable of alleviating the local instance deviations across domains (e.g., object scale, viewpoint, deformation, and appearance) to some extent, they may face a critical limitation that each feature vector of ROI layer represents the local object independently without considering the holistic context information, which is an informative and decisive factor to the following detection and is prerequisite to induce accurate local instance alignment between domains. On the other hand, Yosinski et al. [59] reveal that deep features must eventually transition from domain-agnostic to domain-specific along the network. Hence, the instance-level features obtained from deep layers may be distinct (discriminability) + +between domains. By contrast, the context vector is aggregated from the lower layer, which is relatively invariant (transferability) across domains. Thus, these two features can be complementary if we reasonably fuse them. + +Motivated by the aforementioned findings, we propose a Context-aware Instance-Level Alignment (CILA) loss that explicitly aligns the instance-level representations between domains based on the fusion of context vector and instance-wise representations. Formally, we denote the different levels of context vector as $f_c^1$ , $f_c^2$ , and $f_c^3$ respectively. The instance-level features w.r.t. the $j$ -th region in the $i$ -th image is denoted as $f_{ins}^{i,j}$ and we omit the superscript for simplicity, $f_{ins}$ . A simple approach for this fusion is concatenation, i.e., concatenating $f_c^1$ , $f_c^2$ , $f_c^3$ , and $f_{ins}$ as a single vector $[f_c^1, f_c^2, f_c^3, f_{ins}]$ . This aggregation strategy is extensively adopted by recent works [7, 44, 18] for regularizing the domain discriminator to achieve better adaptation. However, these approaches face critical limitation. When using the concatenation strategy, the context features and the instance-level features are independent of each other, and thus they ignore the underlying complementary effect, which is crucial for a good domain adaptation. Moreover, these two features are asymmetric in our case, which impedes the using of some commonly used fusion methods, such as, element-wise product or averaging. + +To overcome the aforementioned problems, we propose a non-linear fusion strategy with the following formulation, + +$$ +\boldsymbol {f} _ {f u s} = \left[ \boldsymbol {f} _ {c} ^ {1}, \boldsymbol {f} _ {c} ^ {2}, \boldsymbol {f} _ {c} ^ {3} \right] \otimes \boldsymbol {f} _ {i n s} \tag {4} +$$ + +where $\otimes$ denotes the tensor product operation and $f_{fus}$ is the fused feature vector. By doing so, we are capable of producing informative interactions between the context feature and the instance-level feature. Such a non-linear strategy is beneficial for modeling some complex problems. However, this strategy still faces a dilemma of dimension explosion. Let us denote the aggregated context vector $[f_c^1, f_c^2, f_c^3]$ as $f_c$ and its dimension as $d_c$ . Similarly, the dimension of $f_{ins}$ is denoted as $d_{ins}$ , and thus the dimension of $f_{fus}$ will be $d_c \times d_{ins}$ . In order to tackle the dimension explosion issue, we propose to leverage the randomized methods [34, 24] as an unbiased estimator of the tensor product. The final formulation is defined as follows, + +$$ +\boldsymbol {f} _ {f u s} = \frac {1}{\sqrt {d}} \left(\boldsymbol {R} _ {1} \boldsymbol {f} _ {c}\right) \odot \left(\boldsymbol {R} _ {2} \boldsymbol {f} _ {i n s}\right) \tag {5} +$$ + +where $\odot$ stands for the Hadamard product. $R_{1}$ and $R_{2}$ are random matrices and each of their element follows a symmetric distribution (e.g., Gaussian distribution and uniform distribution) with unvariance. In our experiments, we follow the previous work [34] by adopting the uniform distribution. $R_{1}$ and $R_{2}$ are sampled from uniform distribution only once and not updated during training. More details regarding Eq. (5) are shown in our supplemental material. + +Formally, the CA-ILA loss is defined as follows, + +$$ +\begin{array}{l} \mathcal {L} _ {i n s} = - \frac {1}{N _ {s}} \sum_ {i = 1} ^ {N _ {s}} \sum_ {i, j} \log \left(D _ {i n s} \left(\boldsymbol {f} _ {f u s} ^ {i, j}\right) _ {s}\right) \tag {6} \\ = - \frac {1}{N _ {t}} \sum_ {i = 1} ^ {N _ {t}} \sum_ {i, j} \log \left(1 - D _ {i n s} \left(\boldsymbol {f} _ {f u s} ^ {i, j}\right) _ {t}\right) \\ \end{array} +$$ + +# 3.4. Local Feature Mask for Semantic Consistency + +Although the scene layouts, object co-occurrence, and background may be distinct between domains, the description of the same object in different domains should be semantically invariant and can be matched, e.g., cars in different urban scenes should have similar sketch. Therefore, we assume that some local regions of the whole image are more descriptive and dominant than others. Motivated by this, we propose to compute local feature masks in both domains based on the shallow layer features for approximately guiding the semantic consistency in the following adaptation, which can be seen as an attention-like module that capture the transferable regions in an unsupervised manner. + +Technically, the feature masks $m_f^s$ and $m_f^t$ are computed by utilizing the uncertainty of the local domain discriminator $D_1$ . $D_1$ is a pixel-wise discriminator. Suppose that the feature maps from $G_1$ have width of $W$ and height of $H$ . Therefore, the pixel-wise adversarial training loss $\mathcal{L}_{la}$ is formulated as follows, + +$$ +\begin{array}{l} \mathcal {L} _ {l a} = \frac {1}{N _ {s} \cdot H W} \sum_ {i = 1} ^ {N _ {s}} \sum_ {k = 1} ^ {H W} \log \left(D _ {1} \left(G _ {1} \left(x _ {i} ^ {s}\right) _ {k}\right)\right) ^ {2} \tag {7} \\ + \frac {1}{N _ {t} \cdot H W} \sum_ {i = 1} ^ {N _ {t}} \sum_ {k = 1} ^ {H W} \log (1 - D _ {1} (G _ {1} (x _ {i} ^ {t}) _ {k})) ^ {2}, \\ \end{array} +$$ + +where $(G_{1}(x_{i}))_{k}$ denotes the feature vector of the $k$ th location in the feature map obtained from $G_{1}(x_{i})$ . For ease of denotation, we omit the superscript from $x_{i}^{s}$ and $x_{i}^{t}$ as $x_{i}$ , when it applies. Hereafter, $(G_{1}(x_{i}))_{k}$ is denoted as $r_i^k$ . Note that a location in the abstracted feature map corresponds to a region in the original image with a certain receptive field. For each region, the output of discriminator $D_{1}$ is represented by $d_i^k = D_1(r_i^k)$ . Similar to Eq. (1), the uncertainty from $D_{1}$ at each region is computed as $v(r_i^k) = H(d_i^k)$ . Based on the computed uncertainty map, the feature mask of each region $m_f^k$ is further defined as $m_f^k = 2 - v(r_i^k)$ , i.e., the less uncertainty regions are more transferable. To this end, to incorporate the local feature masks into the detection pipeline, we re-weight the local features by $\tilde{r}_i^k\gets r_i^k\cdot m_i^k$ . In that way, the informative regions will be assigned a higher weight, while other less informative regions will be suppressed. The source and target feature masks are computed respectively to semantically guide the following high-level feature adaptation. To this end, the adversarial loss of $D_{2}$ is defined as follows, + +$$ +\mathcal {L} _ {m a} = \mathbb {E} \left[ \right. \log \left( \right.D _ {2} \left(G _ {2} \left(\hat {f} _ {i} ^ {s}\right)\right)\left. \right] + \mathbb {E} \left[ \right. 1 - \log \left( \right.D _ {2} \left(G _ {2} \left(\hat {f} _ {i} ^ {t}\right)\right)\left. \right]\left. \right. \tag {8} +$$ + +where $\hat{f}_i^s$ and $\hat{f}_i^t$ denote the whole pixel-wise re-weighted feature maps. + +# 3.5. Training Loss + +The detection loss includes $\mathcal{L}_{\mathrm{cls}}$ and $\mathcal{L}_{\mathrm{reg}}$ which measure how accurate of the classification, and the overlap of the predicted and ground-truth bounding boxes. Combining all the presented parts, the overall objective function for the proposed model is, + +$$ +\max _ {D _ {1}, D _ {2}, D _ {3}} \min _ {G _ {1}, G _ {2}, G _ {3}} \mathcal {L} _ {\mathrm {c l s}} + \mathcal {L} _ {\mathrm {r e g}} - \lambda \left(\mathcal {L} _ {l a} + \mathcal {L} _ {m a} + \mathcal {L} _ {g a} + \mathcal {L} _ {i n s}\right), \tag {9} +$$ + +where $\lambda$ is parameters balancing loss components. + +# 3.6. Theoretical Insights + +We provide theoretical insights of our approach w.r.t. the domain adaptation theory. We assume that the cross-domain detection by unconstrained adversarial training can be seen as a non-conservative domain adaptation [2, 47] problem due to the potential contradiction between transferability and discriminability. Conservative domain adaptation [2] refers to a scenario that a learner only need to find the optimal hypothesis regarding the labeled source samples and evaluate the performance of this hypothesis on the target domain by using the unlabeled target samples. + +Definition 1. Let $\mathcal{H}$ be the hypothesis class. Given two different domains $S, T$ , in non-conservative domain adaptation, we have the following inequality, + +$$ +\begin{array}{l} R _ {\mathcal {T}} \left(h ^ {t}\right) < R _ {\mathcal {T}} \left(h ^ {*}\right), \text {w h e r e} \\ h ^ {*} = \arg \min _ {h \in \mathcal {H}} R _ {\mathcal {S}} (h) + R _ {\mathcal {T}} (h), \tag {10} \\ h ^ {t} = \arg \min _ {h \in \mathcal {H}} R _ {\mathcal {T}} (h) \\ \end{array} +$$ + +where $R_{\mathcal{S}}(\cdot)$ and $R_{\mathcal{T}}(\cdot)$ denote the expected risk on source and target domains. + +Def. 1 shows that there exists an optimality gap between the optimal source detector and the optimal target detector in non-conservative domain adaptation, which results from the contradiction between transferability and discriminability. Strictly matching the whole feature distributions between domains (i.e., aiming to find a hypothesis that simultaneously minimizes the source and target expected errors) inevitably results in sub-optimal solution according to Def. 1. Hence, we are required to design a model that promotes the parts of transferable features and alleviates those non-transferable features. Theoretically, our work is not to explicitly seek $h^t$ in the target domain due to the absence of ground-truth labels, but to solve the non-conservative domain adaptation problem and minimize the upper bound of the expected target error, i.e., $R_{\mathcal{T}}(h)$ . + +The theory of domain adaptation [1] bounds the expected error on the target domain as follows, + +$$ +\forall h \in \mathcal {H}, R _ {\mathcal {T}} (h) \leq R _ {\mathcal {S}} (h) + \frac {1}{2} d _ {\mathcal {H} \Delta \mathcal {H}} (\mathcal {S}, \mathcal {T}) + C \tag {11} +$$ + +where $R_{S}$ denotes the expected error on the source domain, $d_{\mathcal{H}\Delta \mathcal{H}}(S,\mathcal{T})$ stands for the the domain divergence and associated with the feature transferability, and $C$ is the error of the ideal joint hypothesis (i.e., $h^*$ in Eq. (10)) and associated with the feature discriminability. In Inequality (11), $R_{S}$ can be easily minimized by a deep network since we have source labels. More importantly, our approach hierarchically identify the transferable region/image/instance and enhance their transferability to minimize $d_{\mathcal{H}\Delta \mathcal{H}}(S,\mathcal{T})$ by the local feature masks, IWAT-I, and CILA. And we improve the discriminability to minimize $C$ by the hierarchical transferability-based cross-domain feature alignments. By doing so, we are able to mitigate the contradiction between transferability and discriminability. + +# 4. Experiments + +# 4.1. Datasets + +Cityscapes $\rightarrow$ Foggy-Cityscapes. Cityscapes [9] is collected from the street scenarios of different cities. It includes 2, 975 images in the training set and 500 images in the testing set. We used the training set during training and evaluated on the testing set by following [44]. The images are captured by a car-mounted video camera in normal weather conditions. Joining previous practices [7, 44], we utilize the rectangle of instance mask to obtain bounding boxes for our experiments. Foggy-Cityscapes [9] are rendered from Cityscape by using depth information to simulate the foggy scenes. The bounding box annotations are inherited from the Cityscapes dataset. Note that we utilize the training set of Foggy-Cityscapes as the target domain. + +PASCAL $\rightarrow$ Clipart. We use the combination of the training and validation set in PASCAL [11] as the source domain by following [44]. Clipart is from the Watercolor datasets [21] and used as the target domain, which contains 1K images and have the same 20 categories as PASCAL. + +Sim10K $\rightarrow$ Cityscapes. Sim10K [22] is a dataset produced based on the computer game Grand Theft Auto V (GTA V). It contains 10,000 images of the synthetic driving scene with 58,071 bounding boxes of the car. All images of Sim10K are utilized as the source domain. + +# 4.2. Implementation Details + +The detection model follows the setting in [7, 62, 44] that adopt Faster-RCNN [42] with VGG-16 [48] or ResNet-101 [17] architectures. The parameters of VGG-16 and ResNet-101 are fine-tuned from the model pre-trained on ImageNet. In all experiments, the shorter side of each input image is resized to 600. At each iteration, we input one source image and one target-like source image as the source domain, while the target domain includes one target image and one source-like target image. In the testing phase, we evaluate the adaptation performance by reporting + +mean average precision (mAP) with a IoU threshold of 0.5. We utilize stochastic gradient descent (SGD) for the training procedure with a momentum of 0.9 and the initial learning rate is set to 0.001, which is decreased to 0.0001 after 50K iterations. For Cityscapes $\rightarrow$ Foggy-Cityscapes and PASCAL $\rightarrow$ Clipart, we set $\lambda = 1$ in Eq. (9). For Sim10K $\rightarrow$ Cityscapes, we set $\lambda = 0.1$ . The hyper-parameters of the detection model are set by following [42]. All experiments are implemented by the PyTorch framework. + +# 4.3. Comparisons with State-of-the-Arts + +State-of-the-arts. In this section, we compare the proposed HTCN with state-of-the-art cross-domain detection methods: Domain adaptive Faster-RCNN (DA-Faster) [7], Selective Cross-Domain Alignment (SCDA) [62], MultiAdversarial Faster-RCNN (MAF) [18], Strong-Weak Distribution Alignment (SWDA) [44], Domain Diversification and Multi-domain-invariant Representation Learning (DD-MRL) [26], and Mean Teacher with Object Relations (MTOR) [4]. For all the aforementioned methods, we cite the quantitative results from their original papers. + +Table 1 shows the results of adaptation from Cityscapes to Foggy-Cityscapes. Source only stands for the model that is trained only using source images without adaptation. The proposed HTCN significantly outperforms all comparison methods and improves over state-of-the-art results by $+4.7\%$ on average (from $35.1\%$ to $39.8\%$ ), which is very close to the upper bound of this adaptation task (only $0.5\%$ apart). The compelling results clearly demonstrate that HTCN can learn more discriminative representation in the target domain by calibrating the transferability of the feature representations. + +The adaptation results of PASCAL $\rightarrow$ Clipart are shown in Table 2. HTCN achieves state-of-the-art mAP on adaptation between two dissimilar domains (from real images to artistic images) [44], which clearly verifies the robustness of HTCN on the challenging scenario. + +Table 3 shows the results of adaptation from SIM10K (synthetic) to Cityscapes (real). Our HTCN outperforms all comparison methods, which further verifies the effectiveness of our hierarchical transferability calibration insights. + +# 4.4. Further Empirical Analysis + +Ablation Study. We conduct the ablation study by evaluating variants of HTCN. The results are reported in Table 4. As can be seen, when any one of the proposed modules is removed, the performance drops accordingly. All the proposed modules are designed reasonably. Note that HTCN-w/o Context Information denotes that we remove the context information from the CILA module but the instance-level alignment is preserved. HTCN-w/o Tensor Product denotes that we utilize the vanilla concatenation to replace the tensor product for fusing context and instance-level features. HTCN (full) denotes the full model. + +Table 1: Results on adaptation from Cityscapes to Foggy-Cityscapes. Average precision $(\%)$ is reported on the target domain. Note that the backbone of MTOR is ResNet-50, while the others are VGG-16. + +
MethodsPersonRiderCarTruckBusTrainMotorbikeBicyclemAP
Source Only [42]24.133.134.34.122.33.015.326.520.3
DA-Faster (CVPR'18) [7]25.031.040.522.135.320.220.027.127.6
SCDA (CVPR'19) [62]33.538.048.526.539.023.328.033.633.8
MAF (ICCV'19) [18]28.239.543.923.839.933.329.233.934.0
SWDA (CVPR'19) [44]29.942.343.524.536.232.630.035.334.3
DD-MRL (CVPR'19) [26]30.840.544.327.238.434.528.432.234.6
MTOR* (CVPR'19) [4]30.641.444.021.938.640.628.335.635.1
HTCN33.247.547.931.647.440.932.337.139.8
Upper Bound33.245.949.735.650.037.434.736.240.3
+ +Table 2: Results on adaptation from PASCAL VOC to Clipart Dataset (\%). The results of SWDA* (only G) are cited from [44], which only uses the global alignment. The backbone network is ResNet-101. + +
MethodsaerobicyclebirdboatbottlebuscarcatchaircowtabledoghrsbikeprsnplntsheepsofatraintvmAP
Source Only [42]35.652.524.323.020.043.932.810.730.611.713.86.036.845.948.741.916.57.322.932.027.8
DA-Faster [7]15.034.612.411.919.821.123.23.122.126.310.610.019.639.434.629.31.017.119.724.819.8
WST-BSR [25]28.064.523.919.021.964.343.516.442.225.930.57.925.567.654.536.410.331.257.443.535.7
SWDA* (only G) [44]30.548.533.624.841.248.932.417.234.555.019.013.635.166.263.045.312.522.645.038.936.4
SWDA [44]26.248.532.633.738.554.337.118.634.858.317.012.533.865.561.652.09.324.954.149.138.1
HTCN33.658.934.023.445.657.039.812.039.751.321.120.139.172.863.043.119.330.150.251.840.3
+ +Table 3: Results on Sim10K $\rightarrow$ Cityscapes (\%). L, G, LFM, CI indicate local region alignment, global image alignment, local feature mask, and context-vector based instance-level alignment. The backbone network is VGG-16. + +
MethodsLGLFMCIAP on car
Source Only [42]XXXX34.6
DA-Faster [7]✓✓XX38.9
SWDA [44]✓✓XX40.1
MAF [18]✓✓XX41.1
HTCN✓✓✓✓42.5
+ +Influence of IOU threshold. Figure 3 shows the performance of different models (i.e., Source Only, SWDA [44], and HTCN) with the variation of IOU thresholds. We found that the mAP continuously drops with the increasing of the IOU threshold and close to zero in the end. It is noteworthy that the proposed HTCN significantly outperforms the comparison methods on the IOU range 0.5-0.9, which implies that our HTCN can provide more accurate and robust bounding boxes regression. + +Visualization of Local Feature Masks. Figure 4 visualizes the proposed local feature masks on source and target domains. The brighter the color is, the larger the weight value is. We can observe that the source and target feature masks demonstrate an edge-aware pattern, which focuses on the edge of different instances (e.g., car and person) and some other descriptive regions (e.g., building and traffic sign). Due to the presence of the large distributional variations between domains, forcefully matching the two domains is prone to result in negative transfer since not + +![](images/502cac131d97b7f0415993dc6cd6025c87d89f1e128d1c340e7985cf14484362.jpg) +Figure 3: The performance with the variation of IOU thresholds on transfer task Cityscapes $\rightarrow$ Foggy-Cityscapes. + +all regions are informative and transferable. By contrast, the local feature masks make the adaptation network upweight the semantically descriptive and informative regions to yield better discriminability by transferability calibration. + +Detection Examples. Figure 5 illustrates the example of detection results on transfer tasks Cityscapes $\rightarrow$ Foggy-Cityscapes and Sim10K $\rightarrow$ Cityscapes, respectively. The proposed HTCN consistently outperforms both Source Only [42] and SWDA [44] models in different tasks. For example, in the detection results of Foggy-Cityscapes, HTCN is capable of detecting those obscured instances with accurate bounding box predictions. + +# 5. Conclusion + +This paper presented a novel framework called Hierarchical Transferability Calibration Network to harmonize + +Table 4: Ablation of HTCN on Cityscapes $\rightarrow$ Foggy-Cityscapes. + +
MethodsPersonRiderCarTruckBusTrainMotorbikeBicyclemAP
Source Only24.133.134.34.122.33.015.326.520.3
HTCN-w/o IWAT-I30.542.044.321.639.434.132.333.034.7
HTCN-w/o CILA32.945.948.527.644.622.134.137.636.6
HTCN-w/o Local Feature Masks32.946.248.231.147.333.333.039.038.9
HTCN-w/o Interpolation32.845.644.826.544.336.932.037.137.5
HTCN-w/o Context Information30.043.044.428.243.132.328.733.735.4
HTCN-w/o Tensor Product33.346.747.628.646.136.432.637.238.6
HTCN (full)33.247.547.931.647.440.932.337.139.8
+ +![](images/3cec936f161d3a41476a560ff0a973abda19480774cf26f7fdb00e1ac1c41164.jpg) + +![](images/ffea05eea478cac150daecef4984eea248352799d31130b7627995a55e80b6c9.jpg) +Figure 4: Illustration of the local feature masks on adaptation task Cityscapes (Top) $\rightarrow$ Foggy-Cityscapes (Bottom). + +![](images/39d7ac86584493ab0e13d6a2c09c77ebb5ea641038c9d475f33d13cb8f6b451d.jpg) + +![](images/eec356a9680c909551c8db49dec62d254d07ba37228ec3b58a60fa3b22863638.jpg) + +![](images/311611112f3b9d2a8f2200ce44ed73aaf890c6788c284205246e997c70afe179.jpg) + +![](images/63dce4a7c72a952229da92bdcd56055c9a7ce9401518fb2e36b42bb8b870aeff.jpg) + +![](images/282a6107c34e23350fc670918a3a8e3e976768be8851527c0ae4195691c05061.jpg) + +![](images/8c5bd57f9135377be948451fbb3ca47cdf9523436c5c6ec91f1a15086e558950.jpg) + +![](images/f6ea64252cd991836db81ee0b1fd4233371122bf2609ecd83b73e98676a5b1cd.jpg) + +![](images/5837a888c1a063e440bc8f2a2f83d5ce677c5e8317724c57d1efdfebc1634ee6.jpg) + +![](images/e7e177b273fa69c320024e02a723215b56ec72d05bcdc0fd0c5a6e43c1764bbd.jpg) + +![](images/e0f1ae0739f4218209079e870dd391a7971d2d91816e60bd31b7cc173a7df35a.jpg) + +![](images/5e51998481719b275580a2052838953042edfc037151f8531af13238deba0f7b.jpg) + +![](images/a4be482b425ce4915b868253996f77e559b9c350d10e6772b5a7f776ebb0e9bd.jpg) + +![](images/c48dc6a97bad20d7c719ddffe855f523efc280e438a581283626d7640de395bc.jpg) + +![](images/cf40675e4dd57994b58393970f29f51a1832379fa841261b982a76e1d0a0ec89.jpg) +(a) Source Only +Figure 5: Illustration of the detection results on the target domain. First and second rows: Cityscapes $\rightarrow$ Foggy-Cityscapes. Third and fourth rows: Sim10K $\rightarrow$ Cityscapes. Best view in color. + +![](images/c8ae7c181c0f61d4f13c58b0d48d4f68b76c482753d4f1cac999f32f3b2e611e.jpg) + +![](images/67409dc323bce0e96e907f66a0a844ae72d41e080318ebd3ea6f9e1ea3251d97.jpg) +(b) SWDA (CVPR 2019) + +![](images/7a48f515cdaa20b2e4c0f8105d33362ad806074df525033520ef7ea000beae11.jpg) + +![](images/3ec76aa3b03d16c8582c45122cb4c6afbb3f50c46d506c8c23de556a625da1f1.jpg) +(c) HTCN (Ours) + +transferability and discriminability in the context of adversarial adaptation for adapting object detectors by exploring the transferability of different local-regions, images, and instances. The extensive experiments demonstrate that our approach yields state-of-the-art performance for adapting object detectors on several benchmark datasets. + +Acknowledgements. The work is supported in part by National Natural Science Foundation of China under Grants 81671766, 61571382, U19B2031, 61971369, U1605252, 81671674, in part of Fundamental Research Funds for the Central Universities 20720180059 and 20720190116 and in part of CCF-Tencent open fund. + +# References + +[1] Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine learning, 79(1-2):151-175, 2010. +[2] Shai Ben-David, Tyler Lu, Teresa Luu, and David Pál. Imppossibility theorems for domain adaptation. In International Conference on Artificial Intelligence and Statistics, pages 129-136, 2010. +[3] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR, 2017. +[4] 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, pages 11457-11466, 2019. +[5] Chaoqi Chen, Weiping Xie, Wenbing Huang, Yu Rong, Xinghao Ding, Yue Huang, Tingyang Xu, and Junzhou Huang. Progressive feature alignment for unsupervised domain adaptation. In CVPR, pages 627-636, 2019. +[6] Xinyang Chen, Sinan Wang, Mingsheng Long, and Jianmin Wang. Transferability vs. discriminability: Batch spectral penalization for adversarial domain adaptation. In ICML, pages 1081-1090, 2019. +[7] 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, pages 3339-3348, 2018. +[8] Safa Cicek and Stefano Soatto. Unsupervised domain adaptation via regularized conditional alignment. In ICCV, 2019. +[9] 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, pages 3213-3223, 2016. +[10] Zhijie Deng, Yucen Luo, and Jun Zhu. Cluster alignment with a teacher for unsupervised domain adaptation. In ICCV, 2019. +[11] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. *IJCV*, pages 303–338, 2010. +[12] Basura Fernando, Amaury Habrard, Marc Sebban, and Tinne Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In ICCV, pages 2960-2967, 2013. +[13] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, pages 1180-1189, 2015. +[14] 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. +[15] Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In CVPR, pages 2066-2073, 2012. +[16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and + +Yoshua Bengio. Generative adversarial nets. In NIPS, pages 2672-2680, 2014. +[17] 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. +[18] Zhenwei He and Lei Zhang. Multi-adversarial faster-rcnn for unrestricted object detection. In ICCV, 2019. +[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, pages 1994-2003, 2018. +[20] Lanqing Hu, Meina Kan, Shiguang Shan, and Xilin Chen. Duplex generative adversarial network for unsupervised domain adaptation. In CVPR, pages 1498-1507, 2018. +[21] Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-domain weakly-supervised object detection through progressive domain adaptation. In CVPR, pages 5001-5009, 2018. +[22] Matthew Johnson-Roberson, Charles Barto, Rounak Mehta, Sharath Nittur Sridhar, Karl Rosaen, and Ram Vasudevan. Driving in the matrix: Can virtual worlds replace human-generated annotations for real world tasks? In ICRA, pages 746-753, 2017. +[23] Guoliang Kang, Lu Jiang, Yi Yang, and Alexander G. Hauptmann. Contrastive adaptation network for unsupervised domain adaptation. In CVPR, 2019. +[24] Purushottam Kar and Harish Karnick. Random feature maps for dot product kernels. In Artificial Intelligence and Statistics, pages 583-591, 2012. +[25] Seunghyeon Kim, Jaehoon Choi, Taekyung Kim, and Chang-ick Kim. Self-training and adversarial background regularization for unsupervised domain adaptive one-stage object detection. In ICCV, pages 6092–6101, 2019. +[26] 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, pages 12456-12465, 2019. +[27] Abhishek Kumar, Prasanna Sattigeri, Kahini Wadhawan, Leonid Karlinsky, Rogerio Feris, Bill Freeman, and Gregory Wornell. Co-regularized alignment for unsupervised domain adaptation. In NIPS, pages 9345–9356, 2018. +[28] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In CVPR, 2019. +[29] 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. +[30] 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. +[31] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In NIPS, pages 700-708, 2017. +[32] 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, 2016. +[33] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In ICML, pages 97-105, 2015. +[34] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In NIPS, pages 1640-1650, 2018. +[35] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I. Jordan. Deep transfer learning with joint adaptation networks. In ICML, pages 2208-2217, 2017. +[36] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345-1359, 2010. +[37] Yingwei Pan, Ting Yao, Yehao Li, Yu Wang, Chong-Wah Ngo, and Tao Mei. Transferrable prototypical networks for unsupervised domain adaptation. In CVPR, 2019. +[38] Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adaptation. In AAAI, 2018. +[39] Chao Peng, Tete Xiao, Zeming Li, Yuning Jiang, Xiangyu Zhang, Kai Jia, Gang Yu, and Jian Sun. Megdet: A large mini-batch object detector. In CVPR, pages 6181-6189, 2018. +[40] Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In ICCV, 2019. +[41] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In CVPR, pages 7263-7271, 2017. +[42] 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. +[43] Paolo Russo, Fabio M Carlucci, Tatiana Tommasi, and Barbara Caputo. From source to target and back: symmetric bidirectional adaptive gan. In CVPR, pages 8099-8108, 2018. +[44] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In CVPR, pages 6956–6965, 2019. +[45] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, pages 3723-3732, 2018. +[46] Jian Shen, Yanru Qu, Weinan Zhang, and Yong Yu. Wasserstein distance guided representation learning for domain adaptation. In AAAI, 2018. +[47] Rui Shu, Hung H Bui, Hirokazu Narui, and Stefano Ermon. A dirt-t approach to unsupervised domain adaptation. In I-CLR, 2018. +[48] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[49] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In ECCV, pages 443-450. Springer, 2016. +[50] Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 1521-1528. IEEE, 2011. + +[51] Luan Tran, Kihyuk Sohn, Xiang Yu, Xiaoming Liu, and Manmohan Chandraker. Gotta adapt 'em all: Joint pixel and feature-level domain adaptation for recognition in the wild. In CVPR, 2019. +[52] 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. +[53] Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. In ICLR, 2019. +[54] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In CVPR, 2017. +[55] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. +[56] Ximei Wang, Liang Li, Weirui Ye, Mingsheng Long, and Jianmin Wang. Transferable attention for domain adaptation. In AAAI, pages 5345-5352, 2019. +[57] Zirui Wang, Zihang Dai, Barnabas Poczos, and Jaime Carbonell. Characterizing and avoiding negative transfer. In CVPR, 2019. +[58] Shaoan Xie, Zibin Zheng, Liang Chen, and Chuan Chen. Learning semantic representations for unsupervised domain adaptation. In ICML, pages 5419-5428, 2018. +[59] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In NIPS, pages 3320-3328, 2014. +[60] Werner Zellinger, Thomas Grubinger, Edwin Lughofer, Thomas Natschlager, and Susanne Saminger-Platz. Central moment discrepancy (cmd) for domain-invariant representation learning. In ICLR, 2017. +[61] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, pages 2223-2232, 2017. +[62] Xinge Zhu, Jiangmiao Pang, Ceyuan Yang, Jianping Shi, and Dahua Lin. Adapting object detectors via selective cross-domain alignment. In CVPR, pages 687-696, 2019. +[63] Xinge Zhu, Hui Zhou, Ceyuan Yang, Jianping Shi, and Dahua Lin. Penalizing top performers: Conservative loss for semantic segmentation adaptation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 568-583, 2018. +[64] 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. \ No newline at end of file diff --git a/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/images.zip b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b9aebe570c1f93d5dfd3a5800b878323b1b8e3ba --- /dev/null +++ b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf11fa72657642f9dd0d6b59e1a6f35ed07249b0cb8d4f4d422eacecb35c13c9 +size 589315 diff --git a/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/layout.json b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7202bc8398beddff3f2948384342c660836d8293 --- /dev/null +++ b/harmonizingtransferabilityanddiscriminabilityforadaptingobjectdetectors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8f19b35a133eafdbc0dcf2d68e2d72a8d7ff56b20f565c3492bf535f48d7d1a +size 438242 diff --git a/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_content_list.json b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0257af34df597e0c5cc8e401dac7fc38c62112ab --- /dev/null +++ b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abe708556295619e01017213453c31f39b4a661c2059d467a9a209505fda2aa4 +size 74635 diff --git a/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_model.json b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..47c36191ad88d61f19a76c0b5afd37708ddf0148 --- /dev/null +++ b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2edba93bf051981cf56498c636d6f852efce3cf66cc8d1ddfc762b93138eb85 +size 90330 diff --git a/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_origin.pdf b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5e457c896f159af5c2b1d40b38a8c80c2d31cd35 --- /dev/null +++ b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/2914001b-c709-4c8e-a4c3-ff0ba65d1a7e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9fecd1ada092da06b157c8a0642b482d6928ea7e9b3d0bb751260a52a1da0b5 +size 746440 diff --git a/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/full.md b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/full.md new file mode 100644 index 0000000000000000000000000000000000000000..92a08e1cbd57c98017fba577f44eeb34d3703ab4 --- /dev/null +++ b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/full.md @@ -0,0 +1,332 @@ +# HCNAF: Hyper-Conditioned Neural Autoregressive Flow and its Application for Probabilistic Occupancy Map Forecasting + +Geunseob (GS) Oh University of Michigan + +gsoh@umich.edu + +Jean-Sébastien Valois +Uber ATG + +jsvalois@uber.com + +# Abstract + +We introduce Hyper-Conditioned Neural Autoregressive Flow (HCNAF); a powerful universal distribution approximator designed to model arbitrarily complex conditional probability density functions. HCNAF consists of a neural-net based conditional autoregressive flow (AF) and a hyper-network that can take large conditions in nonautoregressive fashion and outputs the network parameters of the AF. Like other flow models, HCNAF performs exact likelihood inference. We conduct a number of density estimation tasks on toy experiments and MNIST to demonstrate the effectiveness and attributes of HCNAF, including its generalization capability over unseen conditions and expressivity. Finally, we show that HCNAF scales up to complex high-dimensional prediction problems of the magnitude of self-driving and that HCNAF yields a state-of-the-art performance in a public self-driving dataset. + +# 1. Introduction + +Recent autoregressive flow (AF) models [1-4] have achieved state-of-the-art performances in density estimation tasks. They offer compelling properties such as exact likelihood inference and expressivity. Of those, [3, 4] successfully unified AF models and neural networks, and demonstrated an ability to capture complex multi-modal data distributions while universally approximating continuous probability distributions. + +However, due to scalability limitation, existing neural AF models are ineffective at tackling problems with arbitrarily high-dimensional conditional terms. Scene prediction for autonomous driving is such a task where the benefits of AF models can be leveraged but where the contextual information (conditional terms) is too large (i.e. $C > \mathbb{R}^{1,000,000}$ due to using many multi-channel spatio-temporal maps). In contrast, the biggest experiment neural AF models reported is BSDS300 ( $\mathbb{R}^{63}$ ) [5]. This may explain their limited use in common problems despite demonstrating excellent performance in density estimations. + +![](images/bd28646365f05bca1b885c10143b92437888b35c0f0f4933452e079c8be82f5e.jpg) + +![](images/d0ab8fa13f07fe363d158d3344bb40c9e26901564a6f361a2600ee3a391fcb0a.jpg) + +![](images/5125a83c6f1f33f797c22037a78272971d5931d432df22e7587993b4636d17f4.jpg) +(b) HCNAF +Figure 1: HCNAF used for probabilistic occupancy map (POM) forecasting, demonstrating the network's use of high-dimensional conditions ( $C = \mathbb{R}^{>1mil}$ ). a) Inputs (conditions) are the spatio-temporal scene data. b) HCNAF consists of two neural-net based modules: a hyper-network $f_{H}$ and a conditional AF $f$ . $f_{H}$ can take arbitrarily large inputs and produces the network parameters for $f$ , which produces the conditional probability $p(X|C)$ precisely. c) Resulting POMs for agent vehicle centers at $t = 2$ and $t = 4$ secs. + +We propose a novel conditional density approximator called Hyper-Conditioned Neural Autoregressive Flow (HCNAF) to address the aforementioned limitation. HCNAF performs an exact likelihood inference by precisely computing probability of complex target distributions $p_{model}(X|C) \approx p(X|C)$ with arbitrarily large $C$ . By taking advantage of the design, HCNAF grants neural AFs the ability to tackle wider range of scientific problems; which is demonstrated by the autonomous driving prediction tasks. + +Prediction tasks in autonomous driving involve transforming the history of high dimensional perception data up to the current time into a representation of how the environment will evolve [6-15]. To be effective, advanced predic + +tions models should exhibit the following properties: + +1. probabilistic: reflecting future state uncertainties, +2. multimodal: reproducing the rich diversity of states, +3. context driven: interactive & contextual reasoning, and +4. general: capable of reasoning unseen inputs. + +To incorporate the above requirements, we leverage HC-NAF's powerful attributes such as the expressivity to model arbitrarily complex distributions and the generalization capability over unseen data. Furthermore, we opted for probabilistic occupancy maps (POMs) (see figure 1) over a more widely used trajectory-based prediction approach [6-14]. As POM naturally encodes uncertainty, a POM represents all possible trajectories; thus removes the need to exhaustively sample trajectories like in trajectory-based methods. + +Before presenting results on self-driving scenarios, we first introduce HCNAF and report results from a number of density estimation tasks to investigate HCNAF's expressivity and generalization capability over diverse conditions. + +# 2. Background + +Flow, or normalizing flow, is a type of deep generative models which are designed to learn data distribution via the principle of maximum likelihood [16] so as to generate new data and/or estimate likelihood of a target distribution. + +Flow-based models construct an invertible function $f(z) = x$ between a latent variable $z$ and a random variable $x$ , which allows the computation of exact likelihood of an unknown data distribution $p(x)$ using a known pdf $\pi (z)$ (e.g. normal distribution), via the change of variable theorem: + +$$ +p (x) = \pi \left(f ^ {- 1} (x)\right) \left| \det \frac {d f ^ {- 1} (x)}{d x} \right|. \tag {1} +$$ + +In addition, flow offers data generation capability by sampling latent variables $z \sim \pi(\cdot)$ and passing it through $f$ . As the accuracy of the approximation $f(z) = x$ increases, the modeled pdf $p_{model}(x)$ converges to the true $p(x)$ and the quality of the generated samples also improves. + +In contrast to other classes of deep generative models (namely VAE [17] and GAN [18]), flow is an explicit density model and offers unique properties: + +1. Computation of an exact probability, which is essential in the POM forecasting task. VAE infers $p(x)$ using a computable term; Evidence Lower BOund (ELBO). However, since the upper bound is unknown, it is unclear how well ELBO actually approximates $p(x)$ and how ELBO can be utilized for tasks that require exact inference. While GAN proved its power in generating high-quality samples for image generation and translation tasks [19, 20], obtaining the density estimation and/or probability computation for the generated samples is non-trivial. + +2. The expressivity of flow-based models allows the models to capture complex data distributions. A recently published AF model called Neural Autoregressive Flow (NAF) [3] unified earlier AF models including [1, 2] by generalizing their affine transformations to arbitrarily complex non-linear monotonic transformations. Conversely, the default VAE uses unimodal Gaussians for the prior and the posterior distributions. In order to increase the expressivity of VAE, some have introduced more expressive priors [21] and posteriors [22, 23] that leverage flow techniques. + +The class of invertible neural-net based autoregressive flows, including $NAF$ and $BNAF$ [4], can approximate rich families of distributions, and was shown to universally approximate continuous pdfs. However, $NAF$ and $BNAF$ do not handle external conditions (e.g. classes in the context of GAN vs cGAN [24]). That is, those models are designed to compute $p(x_{t})$ conditioned on previous inputs $x_{1:t-1}$ autoregressively to formulate $p(x_{t}|x_{1:t-1})$ . This formulation is not suitable for taking arbitrary conditions other than the autoregressive ones. This limits the extension of $NAF$ to applications that work with conditional probabilities $p(X|C)$ , such as the POM forecasting. + +$MAF$ and $cMAF$ were proposed in [2] to model affine flow transformations with and without additional external conditions. As shown in Equation 2, the transformation between $z_{d}$ and $x_{d}$ is affine and the influence of $C$ over the transformation relies on $\mu$ , $\sigma$ , and stacking multiple flows. These may limit the contributions of $C$ to the transformation. This explains the needs for a conditional autoregressive flow that does not have such expressivity bottleneck. + +$$ +c M A F: x _ {d} = \mu \left(x _ {1: d - 1}, C\right) + \sigma \left(x _ {1: d - 1}, C\right) z _ {d}. \tag {2} +$$ + +Other flavor of normalizing flow methods builds upon invertible convolutions such as $1 \times 1$ in (Glow) [25] and $d \times d$ in [26]. The work in [27] modified Glow to work with external conditions for structured output learning, yielding a non-autoregressive normalizing flow model. + +# 3. HCNAF + +We propose Hyper-Conditioned Neural Autoregressive Flow (HCNAF), a novel autoregressive flow where a transformation between $X = [x_{1}, x_{2}, \dots, x_{D}] \in \mathbb{R}^{D}$ and $Z = [z_{1}, z_{2}, \dots, z_{D}] \in \mathbb{R}^{D}$ is modeled using a non-linear neural network $f(X; \theta) = Z$ whose parameters $\theta$ are determined by arbitrarily complex conditions $C \in \mathbb{R}^{D_c}$ in non-autoregressive fashion, via a separate neural network $f_{H}(C) = \theta$ . $f_{H}(C)$ is designed to compute the parameters for $f()$ , thus being classified as an hyper-network [28]. HCNAF models a conditional joint distribution $p(x_{1}, x_{2}, \dots, x_{D}|C)$ autoregressively on $x_{1:D}$ , by factorizing it over $D$ conditional distributions $\prod_{d=1}^{D} p(x_{d}|x_{1:d-1}, C)$ . + +NAF [3] and HCNAF both use neural networks but those are different in probability modeling, conditioner network structure, and flow transformation as specified below: + +$$ +\left. \begin{array}{c} p \left(x _ {1}, x _ {2}, \dots , x _ {D}\right) = \prod_ {d = 1} ^ {D} p \left(x _ {d} \mid x _ {1: d - 1}\right), \\ f _ {c} \left(x _ {1: d - 1}\right) = \theta_ {d}, \\ f \left(x _ {d}; \theta_ {d}\right) = z _ {d}, \end{array} \right\} \quad \text {N A F} \tag {3} +$$ + +$$ +\left. \begin{array}{c} p \left(x _ {1}, x _ {2}, \dots , x _ {D} \mid C\right) = \prod_ {d = 1} ^ {D} p \left(x _ {d} \mid x _ {1: d - 1}, C\right), \\ f _ {H} (C) = \theta , \theta_ {d} \in \theta , \\ f \left(x _ {d}; x _ {1: d - 1}, \theta_ {d}\right) = z _ {d}. \end{array} \right\} \quad \text {H C N A F} \tag {4} +$$ + +In Equations 3, $NAF$ uses a conditioner network $f_{c}$ to obtain the parameters $\theta_{d}$ for the transformation between $x_{d}$ and $z_{d}$ , which is parameterized by autoregressive conditions $x_{1:d-1}$ . In contrast, in Equations 4, HCNAF models the transformation to be parameterized on both $x_{1:d-1}$ , and an arbitrarily large external conditions $C$ in non-autoregressive fashion via the hyper-network $f_{H}$ . For probability modeling, the difference between the two is analogous to the difference between VAE [17] and conditional VAE [29], and that between GAN [18] and conditional GAN [24]. + +As illustrated in Figure 1, HCNAF consists of two modules: 1) a neural-net based conditional autoregressive flow, and 2) a hyper-network which computes the parameters of 1). The modules are detailed in the following sub-sections. + +# 3.1. NN-based Conditional Autoregressive Flow + +The proposed conditional AF is a bijective neural network $f(X; \theta) = Z$ , which models transformation between random variables $X$ and latent variables $Z$ . The network parameters $\theta := [\mathbf{W}, \mathbf{B}]$ are determined by the hypernetwork $f_{H}(C) = \theta$ . The main difference between regular neural nets and flow models is the invertibility of $f^{-1}(Z) = X$ as regular networks are not typically invertible. + +The conditional AF is shown in Figure 2. In each dimension $d$ of the flow, the bijective transformation between $x_{d}$ and $z_{d}$ are modeled with a multi-layer perceptron (MLP) with $n$ hidden layers as follows: + +$$ +x _ {d} \leftrightarrow h _ {d} ^ {l _ {1}} \leftrightarrow h _ {d} ^ {l _ {2}} \leftrightarrow \dots \leftrightarrow h _ {d} ^ {l _ {n}} \leftrightarrow z _ {d} (= h _ {d} ^ {l _ {n + 1}}). \tag {5} +$$ + +The connection between two adjacent hidden layers $h_d^{l_k}$ and $h_d^{l_{k-1}}$ is defined as: + +$$ +h _ {d} ^ {l _ {k}} = \phi \left(W _ {d d} ^ {l _ {k}} h _ {d} ^ {l _ {k - 1}} + \sum_ {r = 1} ^ {d - 1} \left(W _ {d r} ^ {l _ {k}} h _ {r} ^ {l _ {k - 1}}\right) + B _ {d} ^ {l _ {k}}\right), \tag {6} +$$ + +where subscript and superscript each denotes flow number and layer number. Specifically, $h_d^{l_k}$ is the hidden layer $l_{k}$ + +![](images/b24ab2230ebf6e361fcaf88a084468768f9140d95e59445d64ecb5bd49835a60.jpg) +Figure 2: HCNAF's conditional AF model $f$ is a neural-net whose parameters are determined by a hyper-network $f_{H}$ . The figure describes a $D$ dimensional conditional AF with $n$ hidden layers with 3 nodes. The dash lines refer to connections from $f_{H}$ to parameters of $f$ . Red lines between adjacent hidden layers $h_{d}^{l_{k-1}}$ , $h_{d}^{l_{k}}$ ( $\forall d, 1 \leq k \leq n+1$ ) indicate that $W_{dd}^{l_{k}}$ is strictly positive. Green lines between layers $h_{a}^{l_{k-1}}$ , $h_{b}^{l_{k}}$ in different flow dimensions ( $1 \leq a < b \leq D, 1 \leq k \leq n+1$ ) have no such constraint (i.e., $W_{ba}^{l_{k}}$ is unconstrained.) + +of the $d$ -th flow. $W_{dr}^{l_k}$ and $B_d^{l_k}$ denote the weight matrix which defines contributions to the hidden layer $l_k$ of the $d$ -th flow from the hidden layer $l_{k-1}$ of the $r$ -th flow, and the bias matrix which defines the contributions to the hidden layer $l_k$ of the $r$ -th flow. Finally, $\phi()$ is an activation function. + +The connection between $x_{d}$ and the first hidden layer, and between the last hidden layer and $z_{d}$ are defined as: + +$$ +h _ {d} ^ {l _ {1}} = \phi \left(W _ {d d} ^ {l _ {1}} x _ {d} + \sum_ {r = 1} ^ {d - 1} \left(W _ {d r} ^ {l _ {1}} x _ {r}\right) + B _ {d} ^ {l _ {1}}\right), \tag {7} +$$ + +$$ +z _ {d} = W _ {d d} ^ {l _ {n + 1}} h _ {d} ^ {l _ {n}} + \sum_ {r = 1} ^ {d - 1} \left(W _ {d r} ^ {l _ {n + 1}} h _ {r} ^ {l _ {n}}\right) + B _ {d} ^ {l _ {n + 1}}. +$$ + +$h^{l_k}$ are the hidden units at the hidden layer $l_{k}$ across all flow dimensions $d = 1:D$ and are expressed as: + +$$ +h ^ {l _ {k}} = \phi \left(W ^ {l _ {k}} h ^ {l _ {k - 1}} + B ^ {l _ {k}}\right), \tag {8} +$$ + +where $W^{l_k}$ and $B^{l_k}$ are the weights and biases matrices at the hidden layer $l_k$ across all flow dimensions: + +$$ +W ^ {l _ {k}} = \left[ \begin{array}{c c c c} W _ {1 1} ^ {l _ {k}} & \mathbf {0} & \dots & \mathbf {0} \\ W _ {2 1} ^ {l _ {k}} & W _ {2 2} ^ {l _ {k}} & \dots & \mathbf {0} \\ \vdots & \vdots & \ddots & \vdots \\ W _ {D 1} ^ {l _ {k}} & W _ {D 2} ^ {l _ {k}} & \dots & W _ {D D} ^ {l _ {k}} \end{array} \right], \quad B ^ {l _ {k}} = \left[ \begin{array}{c} B _ {1} ^ {l _ {k}} \\ B _ {2} ^ {l _ {k}} \\ \vdots \\ B _ {D} ^ {l _ {k}} \end{array} \right]. \tag {9} +$$ + +Likewise, $\mathbf{W}$ and $\mathbf{B}$ denote the weights and biases matrices for all flow dimensions across all the layers. Specifically, $\mathbf{W} := \{\forall k: W^{l_k}\}$ and $\mathbf{B} := \{\forall k: B^{l_k}\}$ . + +Finally, $Z = f(X)$ is obtained by computing the terms from Equation 8 for all the network layers, from the first $X = h^{l_0}$ to the last layer, $Z = h^{l_{n+1}}$ . + +We designed HCNAF so that the hidden layer units $h_{1:D}^{l_k}$ are connected to the hidden units of previous layers $h_{1:D}^{l_{k-1}}$ , inspired by BNAF, as opposed to taking $h_d^{l_{0:n+1}}$ as inputs to a separate hyper-network to produce $h_{d+1}^{l_{0:n+1}}$ over $d = 1: D$ , such as presented in NAF. This approach avoids running the hyper-network $D$ times; an expensive operation for large hyper-networks. By designing the hyper-network to output $h_{1:D}^{l_{0:n+1}}$ all at once, we reduce the computation load, while allowing the hidden states across all layers and all dimensions to contribute to the flow transformation, as $x_d$ is conditioned not only on $x_{1:d-1}$ , but also on all the hidden layers $h_{1:d-1}^{l_{0:n+1}}$ . + +All Flow models must satisfy the following two properties: 1) monotonicity of $f(X) = Z$ to ensure its invertibility, and 2) tractable computation of the jacobian matrix determinant $\left| \det \frac{dZ}{dX} \right|$ . + +# 3.1.1 Invertibility of the Autoregressive Flow + +The monotonicity requirement is equivalent to having $\forall d:\frac{dz_d}{dx_d} >0$ , which is further factorized as: + +$$ +\frac {d z _ {d}}{d x _ {d}} = \frac {d z _ {d}}{d h _ {d} ^ {l _ {n}}} \prod_ {k = 1} ^ {n - 1} \frac {d h _ {d} ^ {l _ {k + 1}}}{d h _ {d} ^ {l _ {k}}} \frac {d h _ {d} ^ {l _ {1}}}{d x _ {d}} = W _ {d d} ^ {l _ {n + 1}} \prod_ {k = 0} ^ {n - 1} \frac {d h _ {d} ^ {l _ {k + 1}}}{d h _ {d} ^ {l _ {k}}}, \tag {10} +$$ + +where $\frac{dh_d^{l_k + 1}}{dh_d^{l_k}}\forall k\in \{0,\dots,n - 1\}$ is expressed as: + +$$ +\frac {d h _ {d} ^ {l _ {k + 1}}}{d h _ {d} ^ {l _ {k}}} = \frac {d \phi \left(A _ {d} ^ {l _ {k + 1}}\right)}{d A _ {d} ^ {l _ {k + 1}}} \frac {d A _ {d} ^ {l _ {k + 1}}}{d h _ {d} ^ {l _ {k}}} = \frac {d \phi \left(A _ {d} ^ {l _ {k + 1}}\right)}{d A _ {d} ^ {l _ {k + 1}}} W _ {d d} ^ {l _ {k + 1}}. \tag {11} +$$ + +$A_{d}^{l_{k}}$ denotes the pre-activation of $h_d^{l_k}$ . The invertibility is satisfied by choosing a strictly increasing activation function $\phi$ (e.g. tanh or sigmoid) and a strictly positive $W_{dd}^{l_k}$ . $W_{dd}^{l_k}$ is made strictly positive by applying an element-wise exponential to all entries in $\forall d,k:W_{dd}^{l_k}$ at the end of the hypernetwork, inspired by [4]. Note that the operation is omitted for the non-diagonal elements of $W_{ij}^{l_k},i\neq j$ . + +# 3.1.2 Tractable Computation of Jacobian Determinant + +The second requirement for flow models is to efficiently compute the jacobian matrix determinant $\left|det\frac{dZ}{dX}\right|$ , where: + +$$ +\frac {d Z}{d X} = \frac {d Z}{d h ^ {l _ {n}}} \prod_ {k = 0} ^ {n - 1} \frac {d h ^ {l _ {k + 1}}}{d h ^ {l _ {k}}} = W ^ {l _ {n + 1}} \prod_ {k = 0} ^ {n - 1} \frac {d \phi (A ^ {l _ {k + 1}})}{d A ^ {l _ {k + 1}}} W ^ {l _ {k + 1}}. \tag {12} +$$ + +Since we designed $W^{l_{k+1}}$ to be lower-triangular, the product of lower-triangular matrices, $\frac{dZ}{dX}$ , is also lower-triangular, whose log determinant is then simply the product of the diagonal entries: $\log \left| \det \frac{dZ}{dX} \right| = \log \left| \prod_{d=1}^{D} \frac{dz_d}{dx_d} \right| = \sum_{d=1}^{D} \log \left( \frac{dz_d}{dx_d} \right)$ , as our formulation states $\forall d : \frac{dz_d}{dx_d} > 0$ . Finally, $\log \left( \frac{dz_d}{dx_d} \right)$ is expressed via Equations 10 and 11. + +$$ +\log \left(\frac {d z _ {d}}{d x _ {d}}\right) = \log \left(W _ {d d} ^ {l _ {n + 1}} \prod_ {k = 0} ^ {n - 1} \frac {d \phi \left(A _ {d} ^ {l _ {k + 1}}\right)}{d A _ {d} ^ {l _ {k + 1}}} W _ {d d} ^ {l _ {k + 1}}\right). \tag {13} +$$ + +Equation 13 involves the multiplication of matrices in different sizes; thus cannot be broken down to a regular log summation. To resolve this issue, we utilize log-sum-exp operation on logs of the matrices in Equation 13 as it is commonly utilized in the flow community (e.g. $NAF$ [3] and $BNAF$ [4]) for numerical stability and efficiency of the computation. This approach to computing the jacobian determinant is similar to the one presented in $BNAF$ , as our conditional AF resembles its flow model. + +As HCNAF is a member of the monotonic neural-net based autoregressive flow family like $NAF$ and $BNAF$ , we rely on the proofs presented $NAF$ and $BNAF$ to claim that HCNAF is also a universal distribution approximator. + +# 3.2. Hyper-conditioning and Training + +The key point from Equation 5 - 13 and Figure 2 is that HCNAF is constraint-free when it comes to the design of the hyper-network. The flow requirements from Sections 3.1.1 and 3.1.2 do not apply to the hyper-network. This enables the hyper-network to grow arbitrarily large and thus to scale up with respect to the size of conditions. The hyper-network $f_{H}(C)$ can therefore be an arbitrarily complex neural network with respect to the conditions $C$ . + +We seek to learn the target distribution $p(X|C)$ using HC-NAF by minimizing the negative log-likelihood (NLL) of $p_{model}(X|C)$ , i.e. the cross entropy between the two distributions, as in: + +$$ +L := - E _ {X \sim p (X | C)} [ \log p _ {\text {m o d e l}} (X | C) ] = H (p, p _ {\text {m o d e l}}). \tag {14} +$$ + +Note that minimizing the NLL is equivalent to minimizing the (forward) KL divergence between the data and the model distributions $D_{KL}(p(X|C)||p_{model}(X|C))$ , as $H(p,q) = H(p) + D_{KL}(p||q)$ where $H(p)$ is bounded. + +# 4. Probabilistic Occupancy Map Forecasting + +In Section 3, we showed that HCNAF can accommodate high-dimensional condition inputs for conditional probability density estimation problems. We leverage this capability to tackle the probabilistic occupancy map (POM) of actors in self-driving tasks. This problem operates on over one million dimensions, as spatio-temporal multi-actor images are part of the conditions. This section describes the design of HCNAF to support POM forecasting. We formulate the problem as follows: + +$$ +p \left(X _ {t} ^ {A _ {i}} \mid C\right) \quad \text {w i t h} \quad C := \left\{X _ {- \tau : 0} ^ {A _ {i}}, X _ {- \tau : 0} ^ {A _ {\forall j \neq i}}, \Omega \right\}, \tag {15} +$$ + +where $X_{-\tau:0}^{A_i} \in \mathbb{R}^{\tau \times d_i}$ is the past states, with $d_i$ as the dimension of the observed state, over a time span $\tau$ . $X_{-\tau:0}^{A_{\forall j \neq i}} \in \mathbb{R}^{\tau \times N_A}$ denotes the past states for all $N_A$ neighboring actors over the same time span. $\Omega \in \mathbb{R}^{N_C \times H \times W}$ encodes contextual static and dynamic scene information extracted from map priors (e.g. lanes and stop signs) and/or perception modules (e.g. bounding boxes for actors) onto a rasterized image of size $H$ by $W$ with $N_C$ channels. However comprehensive, the list of conditions in $C$ is not meant to be limiting; as additional cues are introduced to better define actors or enhance context, those are appended to the conditions. We denote $X_t^{A_i} := [x_t^{A_i}, y_t^{A_i}]$ as the location of an actor $A_i$ over the 2D bird's-eye view (bev) map at time $t$ , by adapting our conditional AF to operate on 2 dimensions. As a result, the joint probability is obtained via autoregressive factorization given by $p(x_t, y_t | C) = p(y_t | x_t, C) p(x_t | C)$ . + +It's possible to compute $p(x_{t_{1:T}}, y_{t_{1:T}}|C)$ , a joint probability over multiple time steps via Equation 4, but we instead chose to compute $p(x_t, y_t|C)$ (i.e. a marginal probability distribution over a single time step) for the following reasons: + +1. Computing $p(x_{t_1:T}, y_{t_1:T} | C)$ implies the computation of $p(x_t, y_t | x_{1:t-1}, y_{1:t-1}, C)$ autoregressively. While this formulation reasons about the temporal dependencies between the history and the future, it is forced to make predictions on $x_t, y_t$ dependent on unobserved variables $x_{1:t-1}$ and $y_{1:t-1}$ . The uncertainties of the unobserved variables have the potential to push the forecast $x_t, y_t$ in the wrong direction. +2. The computation of $p(x_{t_{1:T}}, y_{t_{1:T}}|C)$ is intractable in nature since it requires a marginalization over all variables $t = [0, t - 1]$ . We note that $p(x_t, y_t|C) = \int_{-\infty}^{\infty} \dots \int_{-\infty}^{\infty} p(x_1, y_1, \dots, x_t, y_t) dx_1 \dots dy_{t-1}$ is practically impossible to integrate over. + +In order to predictions predictions all time $t = 0:T$ , we simply incorporate a time variable as part of the conditions. + +In addition to POMs, HCNAF can be used to sample trajectories using the inverse transformation $f^{-1}: Z \sim N(\mathbf{0}_D, \mathbf{I}_{DxD}) \to X$ . The exact probabilities of the generated + +trajectories can be computed via Equation 1. However, it is not trivial to obtain the inverse flow since a closed form solution is not available. A solution is to use a numerical approximation or to modify the conditional AF of HCNAF; which is not discussed in this work. + +# 5. Experiments + +In this paper, five experiments (including three experiments on publicly available datasets) of various tasks and complexities are presented to evaluate HCNAF. For all, we provide quantitative (NLL, $D_{KL}$ ) and qualitative measures (visualizations; except MNIST as the dimension is large). We start the section by demonstrating the effectiveness of HCNAF on density estimation tasks for two Toy Gaussians. We then verify the scalability of HCNAF by tackling more challenging, high dimensional $(C > \mathbb{R}^{1,000,000})$ POM forecasting problems for autonomous driving. For POM forecasting, we rely on two datasets: 1) Virtual Simulator: a simulated driving dataset with diverse road geometries, including multiple road actors designed to mimic human drivers. The scenarios are based on real driving logs collected over North-American cities. 2) PRECOG-Carla: a publicly available dataset created using the open-source Carla simulator for autonomous driving research [10]. Lastly, we run a conditional density estimation task on MNIST which is detailed in the supplementary material. + +# 5.1. Toy Gaussians + +We conducted two experiments to demonstrate the performance of HCNAF for density estimations. The first is an experiment from $NAF$ paper [3], and aims to show the model's learning ability for three distinct probability distributions over a 2D grid map, $p(x,y)$ . The non-linear distributions are spatially distinct groups of gaussians. In the second experiment, we demonstrate how HCNAF can generalize its outputs over previously unseen conditions. + +# 5.1.1 Toy Gaussians: Experiment 1 + +Table 1: NLL for the experiment depicted in Figure 3. Lower values are better. + +
AAFNAFHCNAF (ours)
2 by 26.0563.7753.896
5 by 55.2893.8653.966
10 by 105.0874.1764.278
+ +Results from Figure 3 and Table 1 show that HCNAF is able to reproduce the three nonlinear target distributions, and to achieve comparable results as those using $NAF$ , albeit + +![](images/fdb1e823a080543f27ab26ebb99f19062bc86f0d0ace6a393608a24c2fa9f1f8.jpg) +Figure 3: Density estimation tasks using three gaussian distributions. In order to reproduce the probability distributions $p(x,y)$ , HCNAF uses a single model and three conditions, whereas NAF requires three different models, i.e. trained separately. In the figure, M: model and C: condition. + +with a small increase in NLL. We emphasise that HCNAF uses a single model (with a 1-dimensional condition variable) to produce the 3 distinct pdfs, whereas AAF (Affine AF) and $NAF$ used 3 distinctly trained models. The autoregressive conditioning applied in HCNAF is the same as for the other two models. The hyper-network of HCNAF uses $C \in \{0,1,2\}$ where each value represents a class of 2-by-2, 5-by-5, and 10-by-10 gaussians. + +# 5.1.2 Toy Gaussians: Experiment 2 + +From the density estimation experiment shown in Figure 4, we observed that HCNAF is capable of generalization over unseen conditions, i.e. values in the condition terms that were intentionally omitted during training. The experiment was designed to verify that the model would interpolate and/or extrapolate probability distributions beyond the set of conditions it was trained with, and to show how effective HCNAF is at reproducing both the target distribution $p(x,y|C_i)$ for $C_i \in C_{train}$ . As before, we trained a single HCNAF model to learn 5 distinct pdfs, where each pdf represents a gaussian distribution with its mean (center of the 2D gaussian) used as conditions $C \coloneqq (x_c, y_c) \in \mathbb{R}^2$ and with an isotropic standard deviation $\sigma$ of 0.5. + +For this task, the objective function is the maximization of log-likelihood, which is equivalent to the maximization of the KL divergence $-E_{(x,y)\sim N(C_i,0.25\cdot I)}[\log p_{model}(x,y|C_i)]$ where $C_i$ is uniformly sampled from the set of conditions $C_{train} := \{C_1,C_2,\dots,C_5\}$ . Table 2 provides quantitative results from the cross entropy + +![](images/1dc51184e6fe8c883fef3a948cf588dd042be1471554b90dc8e4533f294e1d3c.jpg) +Figure 4: HCNAF model trained with 5 different discrete conditions $C_{train} = \{C_1, \dots, C_5\}$ , where $C_i$ represents the mean of an isotropic bivariate gaussian pdf. a) $p(x, y | C_{train})$ , b) $p_{model}(x, y | C_{train})$ c) predictions on previously unseen conditions $p_{model}(x, y | C_{unseen})$ , $C_{unseen} := \{C_6, \dots, C_9\}$ . + +Table 2: Differences between the target and predicted distributions in terms of cross entropy and KL divergence for Figure 4. + +
p(x,y)pHCNAF(x,y|Ci)
C-Ci∈CtrainCi∈Cunseen
H(p)1.452--
H(p, pmodel)-1.4891.552
DKL(p||pmodel)-0.0370.100
+ +$H(p,p_{model})$ and a KL divergence $D_{KL}(p||p_{model})$ . Note that $H(p,p_{model})$ is lower-bounded by $H(p)$ since $H(p,p_{model}) = H(p) + D_{KL}(p||p_{model})$ . The differential entropy $H(p)$ of an isotropic bi-variate Gaussian distribution $p(x,y)$ and is computed using: $H(p) = 0.5 \cdot \ln (2\pi e(\sigma)^2)^2$ . The results show that HCNAF is able to generalize its predictions for unseen conditions as shown by the small deviation of $H(p,p_{model})$ from its lower bound $H(p)$ . + +# 5.2. Forecasting POM for Autonomous Driving + +Through changes in the hyper-network, we show how HCNAF can be scaled up to tackle the POM forecasting problems for autonomous driving. The condition $C$ is now significantly larger when compared to that from the experiments in Section 5.1, as shown in Equation 15. $C$ now includes information extracted from various sensors (lidar, camera), maps (lanes, stop-signs), and perception object detections (expressed as bounding boxes for actors), with a total dimension is in the millions of parameters. As per its design, HCNAF's AF network is unaffected by the increase in conditional dimensions. + +Figure 5 depicts the customized hyper-network used for the POM forecasting task. The hyper-network takes perception inputs as the condition $C$ , and outputs a set of network parameters $\mathbf{W}$ and $\mathbf{B}$ for the subsequent HCNAF's conditional AF $f(\cdot; \mathbf{W}, \mathbf{B}) : X \leftrightarrow Z \sim N(0, I_{2x2})$ . The inputs come + +![](images/2e82faea5f350e0ab1780277948d21d8da4287911a6be7765d4cad1a8370eb5a.jpg) +Figure 5: Design for the Hyper-network of HCNAF used in the POM forecasting problem. + +from various sensors (lidar or camera) through a perception module and also from prior map information. Specifically, $C$ is formed with 1) the bev images which include lanes, stop-signs, lidar data, and actor bounding boxes in a 2D grid map (see figures presented in the supplementary material and Figure 6), and 2) the states of actors in actor-centric pixel coordinates. The perception module used reflects other standard approaches for processing multi-sensor data, such as [30]. The hyper-network consists of three main components: 1) LSTM modules, 2) an encoder module, and 3) a time module. The outputs of the three modules $h_t^{REF}, h_t^{Actors}, h_t^{\Omega}, h_t^{\Delta t}$ are concatenated and fed into an MLP, which outputs $\mathbf{W}$ and $\mathbf{B}$ , as shown in Figure 5. + +The LSTM module takes the states of an actor $A_{i}$ in the scene $X_{t - \tau ;t}^{A_i}$ where $X_{t}^{A_{i}}\coloneqq [x_{t}^{A_{i}},y_{t}^{A_{i}},\sin (\theta_{t}^{A_{i}}),\cos (\theta_{t}^{A_{i}}),\nu^{A_{i}}]$ to encode temporal dependencies and trends among the state parameters. A total of $N + 1$ LSTM modules are used to model the $N$ actors and the reference car for which we produce the POM forecasts. The resulting outputs are $h_t^{REF}\in \mathbb{R}^{d_{REF} = 20}$ , and $h_t^{Actors}\in \mathbb{R}^{d_{Actors} = 18}$ . + +The encoder module takes in the bev images denoted as $\Omega$ . The role of this module is to transform the scene contexts into a one-dimensional tensor that is concatenated with other parameters of our conditional AF flow module. We use residual connections to enhance the performance of our encoder as in [30]. Since our hyper-network works with Cartesian (x,y) space and pixel (image) space, we use coordinate convolution (coordconv) layers as in [31] to strengthen the association between the two data. Overall, the encoder network consists of 4 encoder blocks, and each encoder block consists of 5 coordconv layers with residual connections, max-pooling layers, and batch-normalization + +layers. The resulting output is $h_t^\Omega \in \mathbb{R}^{d_\Omega = 64}$ . + +Lastly, the time layer adds the forecasting time $\Delta t\in \mathbb{R}^1$ i.e. time span of the future $t$ away from the reference (or present) time $t = 0$ . In order to increase the contribution of the time condition, we apply an MLP which outputs a hidden variable for the time condition $h_t^{\Delta t}\in \mathbb{R}^{d_t = 10}$ . + +# Forecasting POM with a Virtual Simulator Dataset + +Using the POM hyper-network, HCNAF was trained on an internal dataset that we call Virtual Simulator. The dataset is comprised of bev images of size $N \times 256 \times 256$ , where $N$ may include all, or a subset of the following channels: stop signs, street lanes, reference car locations, and a number of actors. We also add the history of actor states in pixel coordinates, as discussed in the previous sub-section. For each of the vehicles/actors, we apply a coordinate transformation to obtain actor-centric labels and images for training. The vehicle dataset includes parked vehicles and non-compliant road actors to introduce common and rare events (e.g. sudden lane changes or sudden stopping in the middle of the roads). We produce POM for all visible vehicles, including parked vehicles, and non-compliant actors, even if those are not labeled as such. Note that the dataset was created out of several million examples, cut into snippets of 5 seconds in duration. We present a figure which depicts POM forecasts for three scenarios sampled from the test set and a table for an ablation study to show the impact of different hyper-networks inputs on the POM forecasting accuracy in the supplementary material. + +As discussed in Section 4, HCNAF produces not only POM, but also trajectory samples via the inverse transformation of the conditional AF $f^{-1}$ . As we advocate the POM approach, we do not elaborate further on the trajectory based approach using HCNAF. + +# Forecasting POM with PRECOG-Carla Dataset + +We trained HCNAF for POM forecasting on the PRECOG-Carla Town01-train dataset and validated the progress over Town01-val dataset [10]. The hyper-network used for this experiment was identical to the one used for the Virtual Simulator dataset, except that we substituted the bev images with two overhead lidar channels; the above ground and ground level inputs. The encoder module input layer was updated to process the lidar image size (200x200) of the PRECOG-Carla dataset. In summary, $C$ included the lidar data, and the history of the reference car and other actors. + +To evaluate the performance of the trained models, [10] used the extra nats $\hat{e}$ metric for the likelihood estimation instead of NLL. $\hat{e}$ is a normalized, bounded likelihood metric defined as $\hat{e} \coloneqq [H(p', p_{model}) - H(\eta)] / (T \cdot A \cdot D) \geq 0$ , where $H(p', p_{model}), T, A, D$ each represents the cross-entropy between $p'$ (perturbed with an isotropic gaussian + +![](images/16c3b5ef1ec8c8aac9a6914b2a08f5b36a03dc7413db698ae51870b7b9495264.jpg) +Figure 6: Visualized POM forecasts on PRECOG-Carla dataset using the HCNAF model described in Table 3 (with lidar). Left: 2 seconds history of cars. Center and right: probabilistic occupancy predictions for Car 1 at $t = 2$ and 4 secs depicted as red heatmaps, with actor ground truth (blue square) overlayed. Note that we only forecast POMs for the car 1 as the lidar data is only available for the car 1. In the examples 1, the car 1 enters a 3-way intersection, HCNAF uses the road geometry coming from the lidar data and correctly forecasts that there are two natural modes (left-turn & right-turn) and depict the probabilities of positions as heatmaps. In example 2, HCNAF uses the curved road geometry and successfully forecasts the occupancy probabilities of the car 1. More results on POM visualizations are presented in the supplementary material. + +noise) and $P_{model}$ [10], prediction horizon, number of actors, and dimension of the actor position. We used the same $\eta = N(\mathbf{0}, 0.01^2 \cdot \mathbf{I})$ as cited, whose differential entropy is analytically obtained using $H(\eta) = 0.5 \cdot T \cdot A \cdot D \cdot \ln(2\pi e|\Sigma|)$ . We computed $p(x_t, y_t | C)$ over all time-steps available in the dataset. The results are presented in Table 3 and Figure 6. + +It is worth mentioning that there exists works including [8], [32] that used the PRECOG-Carla dataset. However, most reported trajectory-based predictions metrics (MSE, MinMSD, etc). To the best of our knowledge, the only available benchmark for $NLL$ on the PRECOG dataset is what is presented in this paper (PRECOG-ESP). Since we take the occupancy-based approach, trajectory-based metrics are not applicable to our approach. + +Table 3: PRECOG-CARLA Town01 Test, 1 agent, mean $\widehat{e}$ + +
MethodTest (ˆ): Lower is better
PRECOG-ESP, no lidar0.699
PRECOG-ESP0.634
HCNAF, no lidar (ours)0.184
HCNAF (ours)0.114 (5+ times lower)
+ +We believe that HCNAF performed better than PRE- + +COG-ESP, which is a state-of-the-arts prediction model in autonomous driving, by taking advantage of HCNAF's expressivity comes from non-linear flow transformations and having condition terms affecting the hidden states of all layers of HCNAF's conditional AF. Note, PRECOG utilizes bijective transformations $f: X \leftrightarrow Z$ that is rooted in affine AF, similar to cMAF (See Equation 2). We also believe that the HCNAF's generalization capability is a contributing factor that explains how HCNAF is able to estimate probability densities conditioned on previously unseen contexts. + +# 6. Conclusion + +We present HCNAF, a novel universal distribution approximator tailored to model conditional probability density functions. HCNAF extends neural autoregressive flow [3] to take arbitrarily large conditions, not limited to autoregressive conditions, via a hyper-network which determines the network parameters of HCNAF's AF. By modeling the hyper-network constraint-free, HCNAF enables it to grow arbitrarily large and thus to scale up with respect to the size of non-autoregressive conditions. We demonstrate its effectiveness and capability to generalize over unseen conditions on density estimation tasks. We also scaled HCNAF's hyper-network to handle larger conditional terms as part of a prediction problem in autonomous driving. + +# References + +[1] Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in neural information processing systems, pages 4743-4751, 2016. 1, 2 +[2] George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pages 2338-2347, 2017. 1, 2 +[3] Chin-Wei Huang, David Krueger, Alexandre Lacoste, and Aaron Courville. Neural autoregressive flows. In International Conference on Machine Learning, pages 2083–2092, 2018. 1, 2, 3, 4, 5, 8 +[4] Nicola De Cao, Ivan Titov, and Wilker Aziz. Block neural autoregressive flow. arXiv preprint arXiv:1904.04676, 2019. 1, 2, 4 +[5] David Martin, Charless Fowlkes, Doron Tal, and Jitendra Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, volume 2, pages 416-423. IEEE, 2001. 1 +[6] Wenjie Luo, Bin Yang, and Raquel Urtasun. Fast and furious: Real time end-to-end 3d detection, tracking and motion forecasting with a single convolutional net. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1, 2 +[7] Sergio Casas, Wenjie Luo, and Raquel Urtasun. Intentnet: Learning to predict intention from raw sensor data. In Aude Billard, Anca Dragan, Jan Peters, and Jun Morimoto, editors, Proceedings of The 2nd Conference on Robot Learning, volume 87 of Proceedings of Machine Learning Research, pages 947-956. PMLR, 29-31 Oct 2018. 1, 2 +[8] Yichuan Charlie Tang and Ruslan Salakhutdinov. Multiple futures prediction. arXiv preprint arXiv:1911.00997, 2019. 1, 2, 8 +[9] Namhoon Lee, Wongun Choi, Paul Vernaza, Christopher B Choy, Philip HS Torr, and Manmohan Chandraker. Desire: Distant future prediction in dynamic scenes with interacting agents. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 336-345, 2017. 1, 2 +[10] Nicholas Rhinehart, Rowan McAllister, Kris Kitani, and Sergey Levine. Precog: Prediction conditioned on goals in visual multi-agent settings. arXiv preprint arXiv:1905.01296, 2019. 1, 2, 5, 7, 8 +[11] Amir Sadeghian, Vineet Kosaraju, Ali Sadeghian, Noriaki Hirose, Hamid Rezatofighi, and Silvio Savarese. Sophie: An attentive gan for predicting paths compliant to social and physical constraints. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1349–1358, 2019. 1, 2 + +[12] Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social gan: Socially acceptable trajectories with generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2255–2264, 2018. 1, 2 +[13] Rohan Chandra, Uttaran Bhattacharya, Aniket Bera, and Dinesh Manocha. Traphic: Trajectory prediction in dense and heterogeneous traffic using weighted interactions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8483-8492, 2019. 1, 2 +[14] Jiachen Li, Hengbo Ma, and Masayoshi Tomizuka. Interaction-aware multi-agent tracking and probabilistic behavior prediction via adversarial learning. arXiv preprint arXiv:1904.02390, 2019. 1, 2 +[15] Ajay Jain, Sergio Casas, Renjie Liao, Yuwen Xiong, Song Feng, Sean Segal, and Raquel Urtasun. Discrete residual flow for probabilistic pedestrian behavior prediction. arXiv preprint arXiv:1910.08041, 2019. 1 +[16] Ian Goodfellow. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016. 2 +[17] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 2, 3 +[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 systems, pages 2672–2680, 2014. 2, 3 +[19] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1125-1134, 2017. 2 +[20] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8789-8797, 2018. 2 +[21] Aaron van den Oord, Oriol Vinyals, et al. Neural discrete representation learning. In Advances in Neural Information Processing Systems, pages 6306-6315, 2017. 2 +[22] Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in neural information processing systems, pages 4743-4751, 2016. 2 +[23] Rianne van den Berg, Leonard Hasenclever, Jakub M Tomczak, and Max Welling. Sylvester normalizing flows for variational inference. arXiv preprint arXiv:1803.05649, 2018. 2 +[24] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. 2, 3 +[25] Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, pages 10215-10224, 2018. 2 + +[26] Emiel Hoogeboom, Rianne van den Berg, and Max Welling. Emerging convolutions for generative normalizing flows. arXiv preprint arXiv:1901.11137, 2019. 2 +[27] You Lu and Bert Huang. Structured output learning with conditional generative flows. arXiv preprint arXiv:1905.13288, 2019.2 +[28] David Ha, Andrew Dai, and Quoc V Le. Hypernetworks. arXiv preprint arXiv:1609.09106, 2016. 2 +[29] 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. 3 +[30] 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 +[31] Rosanne Liu, Joel Lehman, Piero Molino, Felipe Petroski Such, Eric Frank, Alex Sergeev, and Jason Yosinski. An intriguing failing of convolutional neural networks and the coordconv solution. In Advances in Neural Information Processing Systems, pages 9605–9616, 2018. 7 +[32] Yuning Chai, Benjamin Sapp, Mayank Bansal, and Dragomir Anguelov. Multipath: Multiple probabilistic anchor trajectory hypotheses for behavior prediction. arXiv preprint arXiv:1910.05449, 2019. 8 \ No newline at end of file diff --git a/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/images.zip b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8e923e1a7419b800cd229d9f4dbc6d23345cafb9 --- /dev/null +++ b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:320dcc8a9d8f03a61f234fc62e4de8dad80c8a16955a10ab9ae5bbd6cf8ce4ea +size 442687 diff --git a/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/layout.json b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..cad7ec5fe54e17d4e17415ad9abc62138b7c9cb3 --- /dev/null +++ b/hcnafhyperconditionedneuralautoregressiveflowanditsapplicationforprobabilisticoccupancymapforecasting/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:597f783e34adb09031d45a1a325d1b0e1a9ebc6c45dfb4d01ddc622157a61741 +size 508661 diff --git a/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_content_list.json b/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..76e940b7b617bdc6de5c6289182291d3699a8529 --- /dev/null +++ b/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfe3661d7b26d8f563e7831f85ed4bace1808db7c337f2e978520257aa55f862 +size 64161 diff --git a/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_model.json b/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b20b875ed8cb942dcad2b24b81e5301a5bf8fb09 --- /dev/null +++ b/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a908099f7605d150fc6c15102834809ddbd5e42a372264a5cb926281cd20d102 +size 80198 diff --git a/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_origin.pdf b/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1a37b3a398c41be6d5d842943bce31710b9e284b --- /dev/null +++ b/heightanduprightnessinvariancefor3dpredictionfromasingleview/16083b42-b775-4001-b6ee-35542fc26819_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dabf9eb489577a178216784bf52aceeabd4def541ce3f226f3c29cbafcb6e9a +size 9212420 diff --git a/heightanduprightnessinvariancefor3dpredictionfromasingleview/full.md b/heightanduprightnessinvariancefor3dpredictionfromasingleview/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b94d88f672380402d68284c1f18d559a797f0850 --- /dev/null +++ b/heightanduprightnessinvariancefor3dpredictionfromasingleview/full.md @@ -0,0 +1,284 @@ +# Height and Uprightness Invariance for 3D Prediction from a Single View + +Manel Baradad + +Massachusetts Institute of Technology + +mbaradam@mit.edu + +torralba@csail.mit.edu + +# Abstract + +Current state-of-the-art methods that predict 3D from single images ignore the fact that the height of objects and their upright orientation is invariant to the camera pose and intrinsic parameters. To account for this, we propose a system that directly regresses 3D world coordinates for each pixel. First, our system predicts the camera position with respect to the ground plane and its intrinsic parameters. Followed by that, it predicts the 3D position for each pixel along the rays spanned by the camera. The predicted 3D coordinates and normals are invariant to a change in the camera position or its model, and we can directly impose a regression loss on these world coordinates. + +Our approach yields competitive results for depth and camera pose estimation (while not being explicitly trained to predict any of these) and improves across-dataset generalization performance over existing state-of-the-art methods. + +# 1. Introduction + +Scene understanding from single images has greatly improved in the last decade, with major successes in a wide variety of dense prediction tasks such as depth regression [11, 18, 26], intrinsic image decomposition [24, 29] and semantic segmentation [39, 43, 47], between others [41]. Though state-of-the-art methods for all these tasks use similar architectures and training techniques, there is an inherent difference between these tasks that is usually disregarded: whether the prediction for each pixel is invariant or not to projective transformations. + +If we had access to an algorithm that could derender an image and produce novel views of the scene from different positions, some of these tasks would behave differently. For example, if a point on some element of the scene appeared in both views, it would have the same values for the semantics and the albedo, but it would have different values for the depth. That is, semantics and albedo are invariant to projective transformations, but depth is not. + +Convolutional neural networks are somewhat invariant to + +![](images/c501dfc47ca60fa79ec8661efaae29a4b6875b7687b9cf641a2a97382158dfbc.jpg) +Figure 1. Given a single image, we predict 3D world coordinates (where $y = 0$ corresponds to the floor) for each pixel. To this end, we predict the camera intrinsics, the extrinsics and the depth per pixel, and use these to recover world coordinates. We note that, with this representation, $n_y$ and $y$ per pixel are invariant to a change in the position of the camera or its model. + +this type of transformations and there are known techniques that can make them generalize better [2, 31, 42]. Additionally, augmenting the training data with random transformations of carefully chosen classes (such as affine transformations) has shown to improve generalization of CNN's at test time [8]. + +To exploit this robustness when predicting 3D structure from a single image, we propose using a neural network that predicts 3D coordinates in an appropriate reference frame (which we call world frame). Using this reference frame, one spatial dimension $(y^{w}$ , the height relative to a reference plane) and one normal dimension $(n_{y}^{w}$ , the upright normal) become invariant to projective transformations. + +As seen in Figure 1, our model does not produce three independent coordinate maps. Instead, we propose predicting the camera model and the depth per pixel, which define the 3D coordinates for each pixel. This technique allows reducing the possible configurations for the point cloud of an image to those that are possible under the predicted camera + +model. + +Furthermore, a simple regression loss over both coordinates and normals has non-local effects that regressing other representations (such as depth) does not capture, as we illustrate in Section 3.2. Non-local losses and models, which exploit relations between distant pixels, have been shown to increase robustness and generalization for a wide set of inference problems [3, 35] and, particularly, for 3D regression problems [40]. + +When the testing distribution matches that of training, our method performs robustly on depth and extrinsics regression, leveraging both depth and extrinsic information already available in datasets such as Scannet [9]. Furthermore, when testing on different datasets than those used for training, our method outperforms state of the art methods that are trained with the same sources of data. + +Finally, we show that the output of our system is particularly amenable to be used for downstream task. In particular, we show how to use its output to place 3D objects in arbitrary images in the wild with minimal user intervention. + +# 2. Related work + +Depth and extrinsic parameter prediction. State-of-the-art methods for regressing metric depth based on CNNs have made major progress by combining better losses [11, 40], better architectures [6, 21] or by factorizing the problem [22, 26]. However, these design choices are usually informed by train/test performance and ignore two challenges that appear when using these systems in images in the wild: (a) the distribution of the elements in the scene may change, and (b) the distribution of the camera intrinsics and extrinsics may change. + +The first has attracted a lot of attention, particularly for the case where the objects are semantically the same but have different visual appearance (e.g. simulation vs real objects [1, 44]). In this work, we particularly address the latter, which has received less attention, although recent studies [14, 34] point out that this is an unresolved issue limiting generalization of these methods in practice. + +Other methods avoid some of these two challenges by regressing non-metric depth, for which supervision is easier to acquire. These produce metric depth maps up to an unknown scale factor [23, 25], or up to an unknown nonlinear transformation [5, 20]. By design, these methods are not able to regress metric depth, and their loss and their performance evaluation (without using groundtruth) is non-metric. + +Learning to estimate camera intrinsics and extrinsics has also been studied [13, 36]. Though end-to-end approaches have shown promising results outperforming geometric based methods, [37] shows that leveraging dense predictions per pixel in both camera and world frames improves the performance compared to approaches that di + +rectly regress these parameters. They show that this is specially useful when testing on a different data distribution than the one used for training. + +Additionally, unsupervised methods based on photometric consistency have been proposed to estimate both depth and camera poses when the focal length is either known [12] or not [46]. Despite this, methods based on photometric consistency are inherently limited to predict depth up to an unknown scale factor. + +Semantic priors for 3D structure prediction Some of the most successful methods to obtain metric 3D from a single image use simple hand-crafted priors for the size and spatial extent of typical elements in natural scenes. These, methods, usually referred to as Single View Metrology [7], exploit such priors to derive the camera model and the structure for other elements. + +One of the priors that these methods often use is constructed over the height and the upright normal. Certain semantic classes (such as people) can be modeled as standing planes whose height is distributed according to a Gaussian distribution. Works such as [19] and [32] use this fact to reconstruct the 3D structure of a scene from its semantic map. To do this, they start by manually constructing a prior for the heights of restricted set of classes (usually only people), and then refine this prior using a database of semantically annotated images. Once they have refined this prior, they are able to infer the 3D structure for a new image using its semantic annotations. + +While some CNN learning based approaches have incorporated semantic knowledge into their pipeline [15], it has been pointed out [34] that CNNs can fail to learn these simple priors. With this, though [19] and [32] are prone to fail when their assumptions do not hold, they generalize better to scenarios that were not seen during training, such as novel viewpoints or different layouts of the scene. + +Non-local losses Natural scenes often contain simple 3D structures which extend through large regions of an image. Consequently, the depth values for pixels across large regions of the image are closely related. Therefore, a loss that treats all pixels as independent entities does not properly capture the structure of the problem. The Virtual Normal method [40] uses this idea to derive a non-local loss that penalizes inconsistencies between distant pixels, by comparing estimated and ground truth planes formed by randomly sampled triplets of pixels. While these planes do not have to correspond to physical planes in the world, they capture the non-local structure of the depth map and achieved better results than methods using only local losses. + +Similarly, PlaneRCNN [26] forces the prediction to be consistent in planar regions in the image. To this end, it first detects and estimates the parameters of planar regions, + +and then composes them into a unified depth map for the whole image. Though PlaneRCNN relies on two independent stages, they show that reasoning explicitly about the planar structure of the scene improves test time performance. + +# 3. Method + +To obtain a 3D point cloud in world frame, our system first predicts the intrinsics and extrinsics of a pinhole camera and the depth per pixel, and then computes the 3D pointcloud from these. The losses we use at training time then only operate on the 3D point cloud, which allows us to impose priors on the structure of the world which are independent of the camera pose and parameters. + +# 3.1. 3D Structure regressor + +As depicted schematically in Figure 1, our network predicts the intrinsic and extrinsic camera parameters, where the camera pose is parameterized via the pitch, roll, and height of the camera to the ground plane, and the depth per pixel $z_{i}^{c}$ . + +To predict dense depth values per pixel, we use an encoder-decoder CNN with the same Hourglass architecture as [25]. We augment this CNN by substituting all its convolutional layers by CoordConv layers [28]. These layers add coordinate maps as an additional input to the convolutional layers in order to easily compute translationally variant functions. The reasoning behind this is that the function that our system should predict is not translation invariant in the image plane. For example, the extrinsics are tightly coupled with the position of the horizon line in the image plane. + +To predict the camera parameters, we use the features from the second-to-last layer, average pooled and followed by three linear layers with ReLU activations after the first two layers. We then use a sigmoid to normalize the output values, and scale and bias them to known ranges. Assuming a pinhole camera and using the depth $z_{i}^{c}$ and the intrinsic matrix $\mathbf{K}$ estimated by the network, we obtain the 3D coordinates for a pixel with coordinates $(x_{i}^{im}, y_{i}^{im})$ in the camera reference frame as + +$$ +\mathbf {c} _ {i} ^ {c} = z _ {i} ^ {c} \mathbf {K} ^ {- 1} \left( \begin{array}{l} x _ {i} ^ {i m} \\ y _ {i} ^ {t m} \\ 1 \end{array} \right) \tag {1} +$$ + +Once we have obtained the 3D coordinates in the camera reference frame, we transform them into a reference frame where $n_y$ (upright normal) and $y$ (height) are invariant to the camera parameters. We refer to 3D coordinates in this reference frame as world coordinates $\mathbf{c}^w$ . This reference frame compensates for camera height $(h^c)$ , roll rotation $(\mathbf{R}_{roll})$ and pitch rotation $(\mathbf{R}_{pitch})$ with respect to the floor plane + +that lies below the camera, and can be obtained from the camera coordinates simply as: + +$$ +\mathbf {c} _ {i} ^ {w} = \mathbf {R} _ {\text {r o l l}} ^ {- 1} \mathbf {R} _ {\text {p i t c h}} ^ {- 1} \mathbf {c} _ {i} ^ {c} - \left( \begin{array}{l} 0 \\ h ^ {c} \\ 0 \end{array} \right) \tag {2} +$$ + +# 3.2. Loss + +To account for the ambiguity between the camera parameters and depth, we use the following regression loss directly on the predicted world coordinates + +$$ +\mathbf {L} _ {\mathbf {3 D}} = \sqrt {\frac {1}{N} \sum_ {i = 0} ^ {N} \left\| \mathbf {c} _ {i} ^ {w} - \mathbf {c} _ {i} ^ {w *} \right\| ^ {2}} \tag {3} +$$ + +where $\mathbf{c}_i^{w*}$ are the ground truth 3D coordinates of the point corresponding to pixel $(x_i^{im}, y_i^{im})$ . This is in contrast to independently regressing the depth and the camera parameters, as this enforces both to be consistent, and at the same time it does not penalize ambiguous cases, since the 3D coordinates are still computed using the camera parameters. We note that other losses that are usually used to regress depth such as ordinal regression loss [11] could be adapted to regress our output representation. However, this simple RMSE loss we use tends to perform good for indoor scenes, where the depth range is limited. + +From the depth values, we predict the world normals using the cross-product between the 3D coordinates of adjacent pixels in the image plane, + +$$ +\mathbf {n} _ {k, l} ^ {w} = \left(\mathbf {c} _ {k, l} ^ {w} - \mathbf {c} _ {k + 1, l} ^ {w}\right) \times \left(\mathbf {c} _ {k, l + 1} ^ {w} - \mathbf {c} _ {k, l} ^ {w}\right) \tag {4} +$$ + +where $k, l$ are the row and column indices corresponding to index $i$ . We then use a cosine similarity loss between the ground truth and predicted world normals. + +This loss serves two purposes: first, it acts as a regularizer, following similar strategies as previous work [10], where the difference between the predicted and ground-truth depth gradients in the image plane are penalized. The second purpose is forcing distant pixels to be consistent for large planar regions through the predicted camera parameters: the predicted normal for a pixel corresponding to the ground plane has to be consistent with the predicted camera, as all the normals for these regions are connected through the predicted camera parameters. This loss is simply computed as + +$$ +\mathbf {L} _ {\text {N o r m a l}} = \frac {1}{2 N} \sum_ {i = 0} ^ {N} \left(1 - \mathbf {n} _ {i} ^ {w} \cdot \mathbf {n} _ {i} ^ {w *}\right) ^ {2} \tag {5} +$$ + +Finally, the loss we use for training the system is simply the weighted sum of both terms, + +$$ +\mathbf {L} = \mathbf {L} _ {\mathbf {3 D}} + \lambda \mathbf {L} _ {\text {N o r m a l}} \tag {6} +$$ + +In all our experiments, we use a weight of $\lambda = 1$ . + +Loss Non-locality. To illustrate that this loss has nonlocal effects we show that, for some particular cases, the 3D coordinates are constrained by the combination of the model and the priors that the network is biased to learn on $y^{w}$ and $n_{y}^{w}$ . + +For all pixels in the horizon line, their $y^{w}$ coordinate is defined by the camera height and, consequently, by three single predicted parameters in our model (the camera height, the roll and the pitch). For some predicted $\mathbf{c}^w$ for an image, perturbing any $y^{w}$ in the horizon line can only be accomplished by perturbing the camera height, which would cause a perturbation in all the $y^{w}$ on this line of the image plane. + +Similarly, for planar regions such as the floor, the model may be able to learn a strong prior for $y^w \approx 0$ and $n_y^w \approx 1$ , enforced by our loss. If this is the case, the depth values that the network should predict to be consistent with this prior are controlled by the camera intrinsics and extrinsics. Consequently, a perturbation that causes these parameters to change can potentially affect all the points corresponding to floor pixels. + +# 4. Experiments + +We train the model on center crops of $256 \times 192$ , after resizing the smallest dimension of the original image appropriately. We train the model for 200k iterations with a batch size of 48, using Adam [16] with a starting learning rate of $10^{-3}$ and decreasing it to $10^{-4}$ after 100k iterations. Our trained models are available at: https://github.com/mbaradad/im2pcl. + +# 4.1.Data + +Our method relies on having ground-truth world coordinates $\mathbf{c}^{w*}$ for images taken with a diverse set of poses and intrinsics. These can be easily acquired from datasets containing video sequences with depth (such as Scannet [9]) or from datasets containing panoramic depth images (such as Matterport3D [4]). In the first case, the ground plane can be estimated by automatically fusing the videos into a single mesh and annotating it once per scene. In the second case, it can be robustly estimated if the images are captured with a tripod, by considering the region that lies below the camera. + +In this paper, we only use Scannet, as it contains a more diverse set of extrinsics than Matterport3D (particularly, a more diverse range of camera heights). To generate ground truth poses, we use annotated floor pixels when there are more than 100 visible, fitting a plane to them and using this to estimate the extrinsics. When there are no floor points, we rely on the precomputed poses available on the dataset. We have empirically found our ground-plane based method to yield more accurate extrinsics than those already available in the dataset, which are computed by fusing all the + +
ParameterRange
Pitch(−58.73°, 11.46°)
Roll(−9.56°, 9.15°)
Camera height(1.10 m, 2.77 m)
Scannet FoV(57.54°, 59.02°)
Full FoV(30.00°, 59.02°)
+ +Table 1. Valid ranges for the camera parameters used to train the system, which are derived from those found in Scannet (for pitch, roll, camera height and Scannet FoV). The Full FoV range corresponds to the maximum FoV found in Scannet and a smaller minimum Field of View, to simulate images taken with cameras with a diverse set of focal lengths. + +images in a video sequence, and are prone to drift errors that make floor points not lie on a plane. + +Finally, to compute the ground truth normals $(\mathbf{n}_i^{w*})$ for each image we first back-project each point into 3D using the ground truth depth. We then fit a plane to each point using k-nearest neighbors [33], where we use a maximum number of 300 neighbors and maximum search radius of $1\mathrm{m}$ . This differs from the way in which we compute estimated normals $(\mathbf{n}_i^w)$ , as we require this computation to be fast and differentiable during training. We have empirically found this to yield better estimates of the normals than just considering the two closest neighbors in the image plane. + +# 4.2. Camera model and priors + +We assume a pinhole camera model with center projection and known ranges for the extrinsic and intrinsic parameters, shown in Table 1. These correspond to the $1^{\mathrm{st}}$ and $99^{\mathrm{th}}$ percentile of the empirical distribution of the Scannet dataset. As our method naturally handles images taken with different fields of view (FoV), we propose augmenting the dataset with random crops to simulate images taken with longer focal lengths. This allows the system to work on images in the wild and under a less restrictive setting. Since the camera FoV of the images in the Scannet dataset is wide (roughly $60^{\circ}$ ), we can generate images of arbitrary smaller FoV simply by cropping. + +For a fair comparison against previous methods, we train two systems: one with a reduced FoV matching the range found in Scannet (which we call Scannet FoV) and one with an extended range of FoV's (which we call Full FoV). The first one allows a fair comparison against previous systems (that are implicitly trained with this field of view) while the second allows testing the system on images in the wild, which may have a smaller field of view. + +# 4.3. In-dataset performance + +Results for both depth and camera parameter estimation are reported in Tables 2 and 3. Though our system is unable to outperform previous methods on all the metrics when testing in the validation set of Scannet, we note that our + +![](images/f88eb0cd4f8f69e1998d343e015efebf39e9105b29bbdcdb2e26eff7df51090a.jpg) +Figure 2. Results on random samples of the Scannet validation dataset for our method. Each pair of rows shows a top-down and right orthographic view of the reconstructed pointcloud. We note that our reconstructions properly capture planar regions such as floors and walls. As expected, the Full FoV model performs better than the Scannet FoV model on cropped images, as the last row depicts. + +![](images/57b6049f29db1c53fcd3ab30528a796d1357ae91ad682f697451a2327c32d04c.jpg) + +
MethodRMSsq. rel.log RMS
APMoE [17]0.380.100.22
DORN[11]0.290.060.17
Ours (Full FoV)0.380.110.21
Ours (Scannet FoV)0.330.080.18
+ +method does not explicitly regress to either of these, and is solving a problem that handles a different type of uncertainty. For example, the $y$ for each point on a wall may be hard to estimate if the floor is not visible, but the depth may be easier to estimate for fixed focal length if there is some object in contact with the wall with a size that is easy to estimate. + +Figures 2 and 3 show qualitative results for samples in the validation set of Scannet for both systems. As expected, the qualitative performance of the Scannet FoV system is better when tested on an appropriate field of view, but the + +Table 2. Depth performance of our method on the validation set of Scannet, when fixing the field of view to that of the dataset (Scannet FoV) and for variable field of view (Full FoV) as in Table 1. + +
MethodPitch error (°)Roll error (°)
avg.med.avg.med.
DeepHorizon [36]3.812.562.511.82
Hold-Geoffroy et al. [13]3.532.332.151.50
UprightNet [37]2.882.042.121.48
Ours (Full FoV)4.292.942.612.00
Ours (Scannet FoV)3.252.091.981.46
+ +Table 3. Camera parameter performance on Scannet test set. Performance metrics for [36] and [13] correspond to those reported in [37]. + +Full FoV is able to produce reasonably good results for a wider set of FoV's. This outperforms the Scannet FoV when tested on the Full FoV data distribution, as depicted in the last rows of Figures 2 and 3. + +# 4.4. Cross-dataset performance + +To assess how our method performs on new datasets, we test it on the NYU [30] and SUN360 [38] datasets, which the system is not trained on. This evaluation method fol + +![](images/37581deedbe5897e3c1fbde31e7ed11560faf8d1a43a00adefd862451e2df62e.jpg) +Figure 3. Predicted extrinsics, world normals $(n_y^w)$ and depth for the Scannet FoV model (three top rows) and Full FoV model (three bottom rows). From left to right: the input image with the ground truth (green) and predicted (red) horizon lines; ground truth normals; estimated normals; ground truth depth; estimated depth. We note that the Full FoV system solves a problem with more uncertainty, and may have access to less information about the scene (because of the reduced FoV), as illustrated in the last row for each system. + +
MethodRMSrellog10
PlaneNet [27]0.8580.2200.114
PlaneRCNN [26]0.6440.1640.077
Ours (Full FoV)0.6460.1870.107
Ours (Scannet FoV)0.5660.1580.082
+ +Table 4. NYU cross-dataset depth performance, using Scannet data for training. + +ows the same cross-dataset evaluation methods from [26] and [37], where authors report results for systems trained and validated using Scannet data, but tested on NYU and SUN360 respectively. Performance metrics for depth and extrinsic prediction can be found in Tables 4 and 5. In terms of performance, our method is better than both methods in both depth and camera parameter regression. + +For visual comparison, we show qualitative results for state of the art methods compared to ours when predicting the structure for indoor images of the ADE20k dataset [45]. This dataset consists of images in the wild, annotated with semantics), but without ground truth depth. In Figure 4 we + +
MethodPitch error (°)Roll error (°)
avg.med.avg.med.
DeepHorizon [36]8.685.502.981.89
Hold-Geoffroy et al. [13]9.576.093.112.20
UprightNet [37]7.594.942.301.53
Ours (Full FoV)8.186.072.732.11
Ours (Scannet FoV)7.455.392.181.65
+ +Table 5. Generalization performance of camera parameter estimation on SUN360 dataset. We follow the evaluation method proposed in [37], which consists of sampling 6 different examples for each panoramic image using Scannet statistics. + +show several examples, illustrating the advantages of our method and its shortcomings compared to other state of the art methods. + +To visually compare state of the art methods against ours, we postprocess their output using the available semantic groundtruth, fitting a plane to the floor pixels, and compute the point cloud using the focal length corresponding to the dataset the methods are trained on. Our results correspond directly to the output of our system, without any further postprocessing. + +The qualitative results show that, whereas state of the art methods produce plausible depth results, our method correctly estimates the point cloud in world reference frame. Qualitatively, our results match those computed by combining estimated depth and ground truth semantics, while giving a more consistent structure of the whole scene. For example, our method is able to recover better orthogonality between the floor, walls and other elements (such as the pool table in the first row) while, other methods are not able to recover orthogonality. This can be seen in either right-side views, where walls can be seen as not being orthogonal to the floor, or on top views, where walls do not project into a line. + +Failure cases. Though we have shown our system to be more robust than state-of-the-art methods, it still fails if the testing time distribution is too different than that of training. In particular, it does not properly generalize to objects not present in the training dataset such as people. In Figure 5 we illustrate the behavior of our method when there is a person occupying a large portion of the image, together with the behavior of another state of the art method for the same image. + +In the bottom row of the same figure, we display another failure case that is particular of our method. When it produces a bad estimate for some regions that account for large planar regions (such as floors having table like heights or the converse), this causes a shift on all the predicted coordinates. For this cases, we have qualitatively found depth prediction methods to recover a more plausible solution. + +![](images/26de4a3dfb58f26cee9dc179143566fa6693cb7a1e3915594b495a3640e4f8d1.jpg) +Figure 4. Pointcloud results on indoor images of ADE20k for 3 state of the art methods and ours. The methods are trained using NYU data (DORN [11] and Virtual Normal [40]) or Scannet (PlaneRCNN [26] and our two proposed systems). For each image, we display a top-down ortographic view and a right-side ortographic view. The depth region used to estimate the ground plane for the methods other than ours is highlighted in red in the images. + +![](images/cb9e25de2fe53981a1e79d4b3fc1620bf389dd180b7d99149e1fe3f08f854725.jpg) +Figure 5. Failure cases on ADE20k. The result on top shows a failure case that is also present for other models predicting depth: these models are usually unable to generalize to objects not present in the training dataset, such as humans. The bottom row shows a failure case characteristic of our model. + +# 4.5. Use in downstream tasks + +Since the representation we obtain provides a point cloud in a canonical world frame, it can be more amenable to use for downstream tasks that require estimating the 3D structure of a scene. + +To illustrate this with a simple example, in Figure 6 we show how the intrinsics and extrinsics predicted by our method can be of use for placing 3D objects in images in the wild. To obtain the results shown there, we only require a single user click on a valid ground point of the image. When placed there, the object has to be unoccluded for our method to produce plausible results, as our pointcloud representation does not allow to trivially test whether occlusions occur. Given this point, we place the object by rendering it according to the predicted camera intrinsics and extrinsics, and then we blend it with the original image. + +# 5. Conclusion + +In this paper, we have proposed a method to regress 3D coordinates from a single image in an upright and ground plane centered reference frame. To this end, we use a CNN + +![](images/1279d9d6c25aeac6f9ac420323c76d6127e3b4e938f7914e44246cbcf6731bf7.jpg) +Figure 6. Metric 3D object placement. Given an image (top row, from the ADE20k dataset) and three image positions where a chair can be placed, we automatically place it on the ground plane position that projects to that point, using the predicted camera parameters of our method. + +that predicts the 3D coordinates for all pixels, but does so in the subspace of scenes defined by a set of plausible camera models. We show that this empirically leads to better generalization to unseen datasets. + +We argue that the reasons for these are that our representation of 3D structure is invariant to the camera pose, and can thus pick up more general structure during training, and non-local effects of our loss, that penalizes inconsistencies across large and distant regions of the image. + +Furthermore, we have shown that the representation obtained by our model is amenable to downstream tasks such as 3D object placement, which can benefit from predicted metric 3D structure in a canonical reference frame. + +Acknowledgements Funding for this research was partially supported by the Obra Social la Caixa Fellowship for Post-Graduate Studies to AR. + +# References + +[1] A. Atapour-Abarghouei and T. P. Breckon. Real-time monocular depth estimation using synthetic data with domain adaptation via image style transfer. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2800–2810, June 2018. 2 +[2] A. Azulay and Y. Weiss. Why do deep convolutional networks generalize so poorly to small image transformations?, 2019. 1 + +[3] A. Buades, B. Coll, and J. . Morel. A non-local algorithm for image denoising. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), volume 2, pages 60-65 vol. 2, June 2005. 2 +[4] A. Chang, A. Dai, T. Funkhouser, M. Halber, M. Niessner, M. Savva, S. Song, A. Zeng, and Y. Zhang. Matterport3d: Learning from rgb-d data in indoor environments. International Conference on 3D Vision (3DV), 2017. 4 +[5] W. Chen, Z. Fu, D. Yang, and J. Deng. Single-image depth perception in the wild. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS'16, pages 730-738, USA, 2016. Curran Associates Inc. 2 +[6] X. Chen, X. Chen, and Z.-J. Zha. Structure-aware residual pyramid network for monocular depth estimation. Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, Aug 2019. 2 +[7] A. Criminisi, I. Reid, and A. Zisserman. Single view metrology. International Journal of Computer Vision, 40(2):123-148, Nov 2000. 2 +[8] E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le. Autoaugment: Learning augmentation policies from data. 2019. 1 +[9] 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, 4 +[10] D. Eigen, C. Puhrsch, and R. Fergus. Depth map prediction from a single image using a multi-scale deep network. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2366-2374. Curran Associates, Inc., 2014. 3 +[11] H. Fu, M. Gong, C. Wang, K. Batmanghelich, and D. Tao. Deep ordinal regression network for monocular depth estimation. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2002–2011, 2018. 1, 2, 3, 5, 7 +[12] A. Gordon, H. Li, R. Jonschkowski, and A. Angelova. Depth from videos in the wild: Unsupervised monocular depth learning from unknown cameras. 2019. 2 +[13] Y. Hold-Geoffroy, K. Sunkavalli, J. Eisenmann, M. Fisher, E. Gambaretto, S. Hadap, and J.-F. Lalonde. A perceptual measure for deep single image camera calibration. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Jun 2018. 2, 5, 6 +[14] J. Hu, Y. Zhang, and T. Okatani. Visualization of convolutional neural networks for monocular depth estimation, 2019. 2 +[15] O. H. Jafari, O. Groth, A. Kirillov, M. Y. Yang, and C. Rother. Analyzing modular cnn architectures for joint depth prediction and semantic segmentation. 2017 IEEE International Conference on Robotics and Automation (ICRA), May 2017. 2 +[16] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. 4 +[17] S. Kong and C. Fowlkes. Pixel-wise attentional gating for parsimonious pixel labeling, 2018. 5 + +[18] I. Laina, C. Rupprecht, V. Belagiannis, F. Tombari, and N. Navab. Deeper depth prediction with fully convolutional residual networks. 2016 Fourth International Conference on 3D Vision (3DV), Oct 2016. 1 +[19] J.-F. Lalonde, D. Hoiem, A. A. Efros, C. Rother, J. Winn, and A. Criminisi. Photo clip art. ACM Transactions on Graphics / SIGGRAPH, 26(3), Aug. 2007. 2 +[20] K. Lasinger, R. Ranftl, K. Schindler, and V. Koltun. Towards robust monocular depth estimation: Mixing datasets for zero-shot cross-dataset transfer, 2019. 2 +[21] J. H. Lee, M.-K. Han, D. W. Ko, and I. H. Suh. From big to small: Multi-scale local planar guidance for monocular depth estimation, 2019. 2 +[22] J.-H. Lee and C.-S. Kim. Monocular depth estimation using relative depth maps. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[23] Z. Li, T. Dekel, F. Cole, R. Tucker, N. Snavely, C. Liu, and W. T. Freeman. Learning the depths of moving people by watching frozen people. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[24] Z. Li and N. Snavely. Learning intrinsic image decomposition from watching the world. In Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[25] Z. Li and N. Snavely. Megadepth: Learning single-view depth prediction from internet photos. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2041-2050, 2018. 2, 3 +[26] C. Liu, K. Kim, J. Gu, Y. Furukawa, and J. Kautz. Planercnn: 3d plane detection and reconstruction from a single image. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2, 6, 7 +[27] C. Liu, J. Yang, D. Ceylan, E. Yumer, and Y. Furukawa. Planenet: Piece-wise planar reconstruction from a single rgb image. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Jun 2018. 6 +[28] R. Liu, J. Lehman, P. Molino, F. P. Such, E. Frank, A. Sergeev, and J. Yosinski. An intriguing failing of convolutional neural networks and the coordconv solution. In NeurIPS, 2018. 3 +[29] W.-C. Ma, H. Chu, B. Zhou, R. Urtasun, and A. Torralba. Single image intrinsic decomposition without a single intrinsic image. In The European Conference on Computer Vision (ECCV), September 2018. 1 +[30] P. K. Nathan Silberman, Derek Hoiem and R. Fergus. Indoor segmentation and support inference from rgbd images. In ECCV, 2012. 5 +[31] A. Ruderman, N. C. Rabinowitz, A. S. Morcos, and D. Zoran. Pooling is neither necessary nor sufficient for appropriate deformation stability in cnns, 2018. 1 +[32] B. C. Russell and A. Torralba. Building a database of 3d scenes from user annotations. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 2711-2718, June 2009. 2 +[33] R. B. Rusu. Semantic 3D Object Maps for Everyday Manipulation in Human Living Environments. PhD thesis, Computer Science department, Technische Universitaet Muenchen, Germany, October 2009. 4 + +[34] T. van Dijk and G. C. H. E. de Croon. How do neural networks see depth in single images?, 2019. 2 +[35] X. Wang, R. Girshick, A. Gupta, and K. He. Non-local neural networks. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Jun 2018. 2 +[36] S. Workman, M. Zhai, and N. Jacobs. Horizon lines in the wild. Proceedings of the British Machine Vision Conference 2016, 2016. 2, 5, 6 +[37] W. Xian, Z. Li, M. Fisher, J. Eisenmann, E. Shechtman, and N. Snavely. Uprightnet: Geometry-aware camera orientation estimation from single images, 2019. 2, 5, 6 +[38] J. Xiao, K. A. Ehinger, A. Oliva, and A. Torralba. Recognizing scene viewpoint using panoramic place representation. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 2695-2702, June 2012. 5 +[39] T. Xiao, Y. Liu, B. Zhou, Y. Jiang, and J. Sun. Unified perceptual parsing for scene understanding. Lecture Notes in Computer Science, page 432-448, 2018. 1 +[40] W. Yin, Y. Liu, B. D. Schaefer, and Y. Yan. Enforcing geometric constraints of virtual normal for depth prediction. ArXiv, abs/1907.12209, 2019. 2, 7 +[41] A. R. Zamir, A. Sax, W. B. Shen, L. J. Guibas, J. Malik, and S. Savarese. Taskonomy: Disentangling task transfer learning. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3712-3722, 2018. 1 +[42] R. Zhang. Making convolutional networks shift-invariant again. In ICML, 2019. 1 +[43] H. Zhao, J. Shi, X. Qi, X. Wang, and J. Jia. Pyramid scene parsing network. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jul 2017. 1 +[44] S. Zhao, H. Fu, M. Gong, and D. Tao. Geometry-aware symmetric domain adaptation for monocular depth estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9788-9798, 2019. 2 +[45] B. Zhou, H. Zhao, X. Puig, S. Fidler, A. Barriuso, and A. Torralba. Scene parsing through ade20k dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 6 +[46] T. Zhou, M. Brown, N. Snavely, and D. G. Lowe. Unsupervised learning of depth and ego-motion from video. In CVPR, 2017. 2 +[47] Y. Zhu, K. Sapra, F. A. Reda, K. J. Shih, S. Newsam, A. Tao, and B. Catanzaro. Improving semantic segmentation via video propagation and label relaxation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1 \ No newline at end of file diff --git a/heightanduprightnessinvariancefor3dpredictionfromasingleview/images.zip b/heightanduprightnessinvariancefor3dpredictionfromasingleview/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..78daf487121d0f0b54fb2db7b7fb15fdf4549168 --- /dev/null +++ b/heightanduprightnessinvariancefor3dpredictionfromasingleview/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad252427ec4c5de51b5a523b5df77e4ad0d41511e16982d63a9732c09de95b15 +size 996591 diff --git a/heightanduprightnessinvariancefor3dpredictionfromasingleview/layout.json b/heightanduprightnessinvariancefor3dpredictionfromasingleview/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7af29a202b4c8045f4cc086e2900aac4badfd7d7 --- /dev/null +++ b/heightanduprightnessinvariancefor3dpredictionfromasingleview/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:878589d38e47ab109e66ebe1d4c3f0b12c6cac3b24da144da3a36cad662aa9c0 +size 298329 diff --git a/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_content_list.json b/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d7679ea3e6d35b1cda1a5f48a301ea77876eb444 --- /dev/null +++ b/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0959a16f31ff765b47ca2a8780da17e72ca56ed0ba93880587980c7f1d20067 +size 75769 diff --git a/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_model.json b/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_model.json new file mode 100644 index 0000000000000000000000000000000000000000..43cd9e1bb3f71d5126688237bef85d2efd763c3a --- /dev/null +++ b/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc1056d7a9ec8e26ec6b5871bad817f4accc5715a4c3ac78e60148e051841365 +size 88219 diff --git a/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_origin.pdf b/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bf8eb22b63aea9ca0bd85a9683f3ab6331be7d35 --- /dev/null +++ b/heterogeneousknowledgedistillationusinginformationflowmodeling/9e811cf4-5cb2-43c2-bade-2a3ee0bf7f40_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4562f800f0c6f52b579141dd69ea3a19bb3cb7270cd520e5cd1fe75c2972ecb +size 586356 diff --git a/heterogeneousknowledgedistillationusinginformationflowmodeling/full.md b/heterogeneousknowledgedistillationusinginformationflowmodeling/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c79281d7c002ef29d5936ca6882877a42f62201d --- /dev/null +++ b/heterogeneousknowledgedistillationusinginformationflowmodeling/full.md @@ -0,0 +1,251 @@ +# Heterogeneous Knowledge Distillation using Information Flow Modeling + +N. Passalis, M. Tzelepi and A. Tefas +Department of Informatics, Aristotle University of Thessaloniki, Greece +{passalis, mtzelepi, tefas}@csd.auth.gr + +# Abstract + +Knowledge Distillation (KD) methods are capable of transferring the knowledge encoded in a large and complex teacher into a smaller and faster student. Early methods were usually limited to transferring the knowledge only between the last layers of the networks, while latter approaches were capable of performing multi-layer KD, further increasing the accuracy of the student. However, despite their improved performance, these methods still suffer from several limitations that restrict both their efficiency and flexibility. First, existing KD methods typically ignore that neural networks undergo through different learning phases during the training process, which often requires different types of supervision for each one. Furthermore, existing multi-layer KD methods are usually unable to effectively handle networks with significantly different architectures (heterogeneous KD). In this paper we propose a novel KD method that works by modeling the information flow through the various layers of the teacher model and then train a student model to mimic this information flow. The proposed method is capable of overcoming the aforementioned limitations by using an appropriate supervision scheme during the different phases of the training process, as well as by designing and training an appropriate auxiliary teacher model that acts as a proxy model capable of "explaining" the way the teacher works to the student. The effectiveness of the proposed method is demonstrated using four image datasets and several different evaluation setups. + +# 1. Introduction + +Despite the tremendous success of Deep Learning (DL) in a wide range of domain [12], most DL methods suffer from a significant drawback: powerful hardware is needed for training and deploying DL models. This significantly hinders DL applications on resource-scarce environments, such as embedded and mobile devices, leading to the development of various methods for overcoming these limitations. Among the most prominent methods for this task + +![](images/694b2dc6360836a6d16efcfd01bfdad24a8125ea35d619e92b9820e0093ed586.jpg) +Figure 1. Existing knowledge distillation approaches ignore the existence of critical learning periods when transferring the knowledge, even when multi-layer transfer approaches are used. However, as argued in [1], the information plasticity rapidly declines after the first few training epochs, reducing the effectiveness of knowledge distillation. On the other hand, the proposed method models the information flow in the teacher network and provides the appropriate supervision during the first few critical learning epochs in order to ensure that the necessary connections between successive layers of the networks will be formed. Note that even though this process initially slows down the convergence of the network slightly (epochs 1-8), it allows for rapidly increasing the rate of convergence after the critical learning period ends (epochs 10-25). The parameter $\alpha$ controls the relative importance of transferring the knowledge from the intermediate layers during the various learning phases, as described in detail in Section 3. + +is knowledge distillation (KD) [9], which is also known as knowledge transfer (KT) [30]. These approaches aim to transfer the knowledge encoded in a large and complex neural network into a smaller and faster one. In this way, it is possible to increase the accuracy of the smaller model, compared to the same model trained without employing KD. Typically, the smaller model is called student model, while the larger model is called teacher model. + +Early KD approaches focused on transferring the knowledge between the last layer of the teacher and student mod- + +els [4, 9, 19, 26, 28, 31]. This allowed for providing richer training targets to the student model, which capture more information regarding the similarities between different samples, reducing overfitting and increasing the student's accuracy. Later methods further increased the efficiency of KD by modeling and transferring the knowledge encoded in the intermediate layers of the teacher [22, 30, 32]. These approaches usually attempt to implicitly model the way information gets transformed through the various layers of a network, providing additional hints to the student model regarding the way that the teacher model process the information. + +Even though these methods were indeed able to further increase the accuracy of models trained with KD, they also suffer from several limitations that restrict both their efficiency and flexibility. First, note that neural networks exhibit an evolving behavior, undergoing several different and distinct phases during the training process. For example, during the first few epochs critical connections are formed [1], defining almost permanently the future information flow paths on a network. After fixing these paths, the training process can only fine-tune them, while forming new paths is significantly less probable after the critical learning period ends [1]. After forming these critical connections, the fitting and compression (when applicable) phases follow [24, 23]. Despite this dynamic time-dependent behavior of neural networks, virtually all existing KD approaches ignore the phases that neural networks undergo during the training. This observation leads us to the first research question of this paper: Is a different type of supervision needed during the different learning phases of the student and is it possible to use a stronger teacher to provide this supervision? + +To this end, we propose a simple, yet effective way to exploit KD to train a student that mimics the information flow paths of the teacher, while also providing further evidence confirming the existence of critical learning periods during the training phase of a neural network, as originally described in [1]. Indeed, as also demonstrated in the ablation study shown in Fig. 1, providing the correct supervision during the critical learning period of a neural network can have a significant effect on the overall training process, increasing the accuracy of the student model. More information regarding this ablation study are provided in Section 4. It is worth noting that the additional supervision, which is employed to ensure that the student will form similar information paths to the teacher, actually slows down the learning process until the critical learning period is completed. However, after the information flow paths are formed, the rate of convergence is significantly accelerated compared to the student networks that do not take into account the existence of critical learning periods. + +Another limitation of existing KD approaches that em + +![](images/daeb5e84a968e8770d2e67d65bc7ce8d148d6c878e5ba7351602e0ea0fc2ff68.jpg) +Figure 2. Examining the effect of transferring the knowledge from different layers of a teacher model into the third layer of the student model. Two different teachers are used, a strong teacher (ResNet-18, where each layer refers to each layer block) and an auxiliary teacher (CNN-1-A). The nearest centroid classifier accuracy (NCC) is reported for the representations extracted from each layer (in order to provide an intuitive measure of how each layer transforms the representations extracted from the input data). The final precision is reported for a student model trained by either not using intermediate layer supervision (upper black values) or by using different layers of the teacher (4 subsequent precision values). Several different phenomena are observed when the knowledge is transferred from different layers, while the proposed auxiliary teacher allows for achieving the highest precision and provides a straightforward way to match the layers between the models (the auxiliary teacher transforms the data representations in a way that is closer to the student model, as measure through the NCC accuracy). + +ploy multiple intermediate layers is their ability to handle heterogeneous multi-layer knowledge distillation, i.e., transfer the knowledge between teachers and students with vastly different architectures. Existing methods almost exclusively use network architectures that provide a trivial one-to-one matching between the layers of the student and teacher, e.g., ResNets with the same number of blocks are often used, altering only the number of layers inside of each residual block [30, 32]. Many of these approaches, such as [30], are even more restrictive, also requiring the layers of the teacher and student to have the same dimensionality. As a result, it is especially difficult to perform multi-layer KD between networks with vastly different architectures, since even if just one layer of the teacher model is incorrectly matched to a layer of the student model, then the accuracy of the student can be significantly reduced, either due to over-regularizing the network or by forcing to early compress the representations of the student. This be + +havior is demonstrated in Fig. 2, where the knowledge is transferred from the 3rd layer of two different teachers to various layers of the student. These findings lead us to the second research question of this paper: Is it possible to handle heterogeneous $KD$ in a structured way to avoid such phenomena? + +To this end, in this work, we propose a simple, yet effective approach for training an auxiliary teacher model, which is closer to the architecture of the student model. This auxiliary teacher is responsible for explaining the way the larger teacher works to the student model. Indeed, this approach can significantly increase the accuracy of the teacher, as demonstrated both in Fig 2, as well as on the rest of the experiments conducted in this paper. It is worth noting that during our initial experiments it was almost impossible to find a layer matching that would actually help us to improve the accuracy of the student model without first designing an appropriate auxiliary teacher model, highlighting the importance of using auxiliary teachers in heterogeneous KD scenarios, as also highlighted in [16]. + +The main contribution of this paper is proposing a KD method that works by modeling the information flow through the teacher model and then training a student model to mimic this information flow. However, as it was explained previously and experimentally demonstrated in this paper, this process is often very difficult, especially when there is no obvious layer matching between the teacher and student models, which can often process the information in vastly different ways. In fact, even a single layer mismatch, i.e., overly regularizing the network or forcing for an early compression of the representation, can significantly reduce the accuracy of the student model. To overcome these limitations the proposed method works by a) designing and training an appropriate auxiliary teacher model that allows for a direct and effective one-to-one matching between the layers of the student and teacher models, as well as b) employing a critical-learning aware KD scheme that ensures that critical connections will be formed allowing for effectively mimicking the teacher's information flow instead of just learning a student that mimics the output of the student. + +The effectiveness of the proposed method is demonstrated using several different tasks, ranging from metric learning and classification to mimicking handcrafted feature extractors for providing fast neural network-based implementations for low power embedded hardware. The experimental evaluation also includes an extensive representation learning evaluation, given its increasing importance in many embedded DL and robotic applications and following the evaluation protocol of recently proposed KD methods [19, 31]. An open-source implementation of the proposed method is provided in https://github.com/passalis/pkth. + +The rest of the paper is structured as follows. First, the + +related work is briefly discussed and compared to the proposed method in Section 2. Then, the proposed method is presented in Section 3, while the experimental evaluation is provided in Section 4. Finally, conclusions are drawn in Section 5. + +# 2. Related Work + +A large number of knowledge transfer methods which build upon the neural network distillation approach have been proposed [2, 4, 9, 26, 28]. These methods typically use a teacher model to generate soft-labels and then use these soft-labels for training a smaller student network. It is worth noting that several extensions to this approach have been proposed. For example, soft-labels can be used for pretraining a large network [25] and performing domain adaptation [28], while an embedding-based approach for transferring the knowledge was proposed in [20]. Also, online distillation methods, such as [3, 33], employ a co-training strategy, training both the student and teacher models simultaneously. However, none of these approaches take into account that deep neural networks transition through several learning phases, each one with different characteristics, which requires handling them in different ways. On the other hand, the proposed method models the information flow in the teacher model and then employs a weighting scheme that provides the appropriate supervision during the initial critical learning period of the student, ensuring that the critical connections and information paths formed in the teacher model will be transferred to the student. + +Furthermore, several methods that support multi-layer KD have been proposed, such as using hints [22], the flow of solution procedure matrix (FSP) [30], attention transfer [32], or singular value decomposition to extract major features from each layer [13]. However, these approaches usually only target networks with compatible architecture, e.g., residual networks with the same number of residual blocks, both for the teacher and student models. Also, it is not straightforward to use them to successfully transfer the knowledge between heterogeneous models, since even a slight layer mismatch can have a devastating effect on the student's accuracy, as demonstrated in Fig. 2. It is also worth noting that we were actually unable to effectively apply most of these methods for heterogenous KD, since either they do not support transferring the knowledge between layers of different dimensionality, e.g., [30], or they are prone to over-regularization or representation collapse (as demonstrated in Fig. 2) reducing the overall performance of the student. + +In contrast with the aforementioned approaches, the proposed method provides a way to perform heterogeneous multi-layer KD by appropriately designing and training an auxiliary network and exploiting the knowledge encoded by the earlier layers of this network. In this way, the proposed + +method provides an efficient way for handling any possible network architecture by employing an auxiliary network that is close to the architecture of the student model regardless the architecture of the teacher model. Using the proposed auxiliary network strategy ensures that the teacher model will transform the representations extracted from the data in a way compatible with the student model, allowing for providing a one-to-one matching between the intermediate layers of the networks. It is also worth noting that the use of a similar auxiliary network, which is used as an intermediate step for KD, was also proposed in [16]. However in contrast with the proposed method, the auxiliary network used in [16] was employed for merely improving the performance of KD between the final classification layers, instead of designing an auxiliary network that can facilitate efficient multi-layer KD, as proposed in this paper. Finally, to the best of our knowledge, in this work we propose the first architecture-agnostic probabilistic KD approach that works by modeling the information flow through the various layers of the teacher model using a hybrid kernel formulation, can support heterogeneous network architectures and can effectively supervise the student model during its critical learning period. + +# 3. Proposed Method + +Let $\mathcal{T} = \{\mathbf{t}_1,\mathbf{t}_2,\dots ,\mathbf{t}_N\}$ denote the transfer set that contains $N$ transfer samples and it is used to transfer the knowledge from the teacher model to the student model. Note that the proposed method can also work in a purely unsupervised fashion and, as a result, unlabeled data samples can be also used for transferring the knowledge. Also, let $\mathbf{x}_i^{(l)} = f(\mathbf{t}_i,l)$ denote the representation extracted from the $l$ -th layer of the teacher model $f(\cdot)$ and $\mathbf{y}_i^{(l)} = g(\mathbf{t}_i,l,\mathbf{W})$ denote the representation extracted from the $l$ -th layer of the student model $g(\cdot)$ . Note that the trainable parameters of the student model are denoted by $\mathbf{W}$ . The proposed method aims to train the student model $g(\cdot)$ , i.e., learn the appropriate parameters $\mathbf{W}$ , in order to "mimic" the behavior of $f(\cdot)$ as close as possible. + +Furthermore, let $\mathcal{X}^{(l)}$ denote the random variable that describes the representation extracted from the $l$ -th layer of the teacher model and $\mathcal{Y}^{(l)}$ the corresponding random variable for the student model. Also, let $\mathcal{Z}$ denote the random variable that describes the training targets for the teacher model. In this work, the information flow of the teacher network is defined as progression of mutual information between every layer representation of the network and the training targets, i.e., $I(\mathcal{X}^{(l)},\mathcal{Z})\forall l$ . Note that even though the training targets are required for modeling the information flow, they are not actually needed during the KD process, as we will demonstrate later. Then, we can define the information flow vector that characterizes the way the network process infor + +mation as: + +$$ +\boldsymbol {\omega} _ {t} := \left[ I \left(\mathcal {X} ^ {(1)}, \mathcal {Z}\right), \dots , I \left(\mathcal {X} ^ {\left(N _ {L _ {t}}\right)}, \mathcal {Z}\right) \right] ^ {T} \in \mathbb {R} ^ {N _ {L _ {t}}}, \tag {1} +$$ + +where $N_{L_t}$ is the number of layers of the teacher model. Similarly, the information flow vector for the student model is defined as: + +$$ +\omega_ {s} := \left[ I \left(\mathcal {Y} ^ {(1)}, \mathcal {Z}\right), \dots , I \left(\mathcal {Y} ^ {\left(N _ {L _ {s}}\right)}, \mathcal {Z}\right) \right] ^ {T} \in \mathbb {R} ^ {N _ {L _ {s}}}, \tag {2} +$$ + +where again $N_{L_s}$ is the number of layers of the student model. The proposed method works by minimizing the divergence between the information flow in the teacher and student models, i.e., $D_F(\omega_s,\omega_t)$ , where $D_F(\cdot)$ is a metric used to measure the divergence between two, possibly heterogeneous, networks. To this end, the information flow divergence is defined as the sum of squared differences between each paired element of the information flow vectors: + +$$ +D _ {F} \left(\boldsymbol {\omega} _ {s}, \boldsymbol {\omega} _ {t}\right) = \sum_ {i = 1} ^ {N _ {L s}} \left(\left[ \boldsymbol {\omega} _ {s} \right] _ {i} - \left[ \boldsymbol {\omega} _ {t} \right] _ {\kappa (i)}\right) ^ {2}, \tag {3} +$$ + +where the layer of the teacher $\kappa(i)$ is chosen in order to minimize the divergence with the corresponding layer of the teacher: + +$$ +\kappa (i) = \left\{ \begin{array}{l l} N _ {L _ {t}} & \text {i f} i = N _ {L _ {s}} \\ \arg \min _ {j} \left(\left[ \boldsymbol {\omega} _ {s} \right] _ {i} - \left[ \boldsymbol {\omega} _ {t} \right] _ {j}\right) ^ {2}, & \text {o t h e r w i s e} \end{array} \right. \tag {4} +$$ + +and the notation $[\mathbf{x}]_i$ is used to refer to the $i$ -th element of vector $\mathbf{x}$ . This definition employs the optimal matching between the layers (considering the discriminative power of each layer), except from the final one, which corresponds to the task hand. In this way, it allows for measuring the flow divergence between networks with different architectures. At the same time it is also expected to minimize the impact of over-regularization and/or representation collapse phenomena, such as those demonstrated in Fig. 2, which often occur when there is large divergence between the layers used for transferring the knowledge. However, this also implies that for networks with vastly different architectures or for networks not yet trained for the task at hand, the same layer of the teacher may be used for transferring the knowledge to multiple layers of the student model, leading to a significant loss of granularity during the KD and leading to stability issues. In Subsection 3.2 we provide a simple, yet effective way to overcome this issue by using auxiliary teacher models. Note that more advanced methods, such as employing fuzzy assignments between different sets of layers can be also used. + +# 3.1. Tractable Information Flow Divergence Measures using Quadratic Mutual Information + +In order to effectively transfer the knowledge between two different networks, we have to provide an efficient way + +to calculate the mutual information, as well as to train the student model to match the mutual information between two layers of different networks. Recently, it has been demonstrated that when the Quadratic Mutual Information (QMI) [27] is used, it is possible to efficiently minimize the difference between the mutual information of a specific layer of the teacher and student by appropriately relaxing the optimization problem [19]. More specifically, the problem of matching the mutual information between two layers can be reduced into a simpler probability matching problem that involves only the pairwise interactions between the transfer samples. Therefore, to transfer the knowledge between a specific layer of the student and an another layer of the teacher, it is adequate to minimize the divergence between the teacher's and student's conditional probability distributions, which can be estimated as [19]: + +$$ +p _ {i | j} ^ {(t, l _ {t})} = \frac {K \left(\mathbf {x} _ {i} ^ {(l _ {t})} , \mathbf {x} _ {j} ^ {(l _ {t})}\right)}{\sum_ {i = 1 , i \neq j} ^ {N} K \left(\mathbf {x} _ {i} ^ {(l _ {t})} , \mathbf {x} _ {j} ^ {(l _ {t})}\right)} \in [ 0, 1 ], \tag {5} +$$ + +and + +$$ +p _ {i | j} ^ {(s, l _ {s})} = \frac {K \left(\mathbf {y} _ {i} ^ {(l _ {s})} , \mathbf {y} _ {j} ^ {(l _ {s})}\right)}{\sum_ {i = 1 , i \neq j} ^ {N} K \left(\mathbf {y} _ {i} ^ {(l _ {s})} , \mathbf {y} _ {j} ^ {(l _ {s})}\right)} \in [ 0, 1 ], \tag {6} +$$ + +where $K(\cdot)$ is a kernel function and $l_{t}$ and $l_{s}$ refer to the student and teacher layers used for the transfer. These probabilities also express how probable is for each sample to select each of its neighbors [14], modeling in this way the geometry of the feature space, while matching these two distributions also ensures that the mutual information between the models and a set of (possibly unknown) classes is maintained [19]. Note that the actual training labels are not required during this process, and, as a result, the proposed method can work in a purely unsupervised fashion. + +The kernel choice can have a significant effect on the quality of the KD, since it alters how the mutual information is estimated [19]. Apart from the well known Gaussian kernel, which is however often hard to tune, other kernel choices include cosine-based kernels [19], e.g., $K_{c}(\mathbf{a},\mathbf{b}) = \frac{1}{2} (\frac{\mathbf{a}^{T}\mathbf{b}}{||\mathbf{a}||_{2}||\mathbf{b}||_{2}} + 1)$ , where $\mathbf{a}$ and $\mathbf{b}$ are two vectors, and the T-student kernel, i.e., $K_{T}(\mathbf{a},\mathbf{b}) = \frac{1}{1 + ||\mathbf{a} - \mathbf{b}||_{2}^{d}}$ , where $d$ is typically set to 1. Selecting the most appropriate kernel for the task at hand can lead to significant performance improvements, e.g., cosine-based kernels perform better for retrieval tasks, while using kernel ensembles, i.e., estimating the probability distribution using multiple kernels, can also improve the robustness of mutual information estimation. Therefore, in this paper a hybrid objective that aims at minimizing the divergence calculated using both the cosine kernel, which ensures the good performance of the learned representation for retrieval tasks, and the T-student kernel, which experimentally demonstrated good performance for classification tasks, is used: + +$$ +\mathcal {L} ^ {\left(l _ {t}, l _ {s}\right)} = \mathcal {D} \left(\mathcal {P} _ {c} ^ {\left(t, l _ {t}\right)} \mid \mid \mathcal {P} _ {c} ^ {\left(s, l _ {s}\right)}\right) + \mathcal {D} \left(\mathcal {P} _ {T} ^ {\left(t, l _ {t}\right)} \mid \mid \mathcal {P} _ {T} ^ {\left(s, l _ {s}\right)}\right), \tag {7} +$$ + +where $\mathcal{D}(\cdot)$ is a probability divergence metric and the notation $\mathcal{P}_c^{(t,l_t)}$ and $\mathcal{P}_T^{(t,l_t)}$ is used to denote the conditional probabilities of the teacher calculated using the cosine and T-student kernels respectively. Again, the representations used for KD were extracted from the $l_{t}$ -th/l $_s$ -th layer. The student probability distribution is denoted similarly by $\mathcal{P}_c^{(s,l_s)}$ and $\mathcal{P}_T^{(s,l_s)}$ . The divergence between these distributions can be calculated using a symmetric version of the Kullback-Leibler (KL) divergence, the Jeffreys divergence [10]: + +$$ +\mathcal {D} \left(\mathcal {P} ^ {(t, l _ {t})} \| \mathcal {P} ^ {(s, l _ {s})}\right) = \tag {8} +$$ + +$$ +\sum_ {i = 1} ^ {N} \sum_ {j = 1, i \neq j} ^ {N} \left(p _ {j | i} ^ {(t, l _ {t})} - p _ {j | i} ^ {(s, l _ {s})}\right) \cdot \left(\log p _ {j | i} ^ {(t, l _ {t})} - \log p _ {j | i} ^ {(s, l _ {s})}\right), +$$ + +which can be sampled at a finite number of points during the optimization, e.g., using batches of 64-128 samples. This batch-based strategy has been successfully employed in a number of different works [19, 31], without any significant effect on the optimization process. + +# 3.2. Auxiliary Networks and Information Flow + +Even though the flow divergence metric defined in (3) takes into account the way different networks process the information, it suffers from a significant drawback: if the teacher process the information in a significantly different way compared to the student, then the same layer of the teacher model might be used for transferring the knowledge to multiple layers of the student model, leading to a significant loss in the granularity of information flow used for KD. Furthermore, this problem can also arise even when the student model is capable of processing the information in a way compatible with the teacher, but it has not been yet appropriately trained for the task at hand. To better understand this, note that the information flow divergence in (3) is calculated based on the estimated mutual information and not the actual learning capacity of each model. Therefore, directly using the flow divergence definition presented in (3) is not optimal for KD. It is worth noting that this issue is especially critical for every KD method that employs multiple layer, since as we demonstrate in Section 4, if the layer pairs are not carefully selected, the accuracy of the student model is often lower compared to a model trained without using multi-layer transfer at all. + +Unfortunately, due to the poor understanding of the way that neural networks transform the probability distribution of the input data, there is currently no way to select the most appropriate layers for transferring the knowledge a priori. This process can be especially difficult and tedious, especially when the architectures of the student and teacher differ a lot. To overcome this critical limitation in this work we propose constructing an appropriate auxiliary proxy for the teacher model, that will allow for directly matching between all the layers of the auxiliary model and the student model, + +![](images/3a2b279bec8f5f6f3f91083f0006a49e96af6e6c7ddda53c3680500a6eb09f22.jpg) +Figure 3. First, the knowledge is transferred to an appropriate auxiliary teacher, which will better facilitate the process of KD. Then, the proposed method minimizes the information flow divergence between the two models, taking into account the existence of critical learning periods. + +as shown in Fig. 3. In this way, the proposed method employs an auxiliary network, that has a compatible architecture with the student model, to better facilitate the process of KD. A simple, yet effective approach for designing the auxiliary network is employed in this work: the auxiliary network follows the same architecture as the student model, but using twice the neurons/convolutional filters per layer. Thus, the greater learning capacity of the auxiliary network ensures that enough knowledge will be always available to the auxiliary network (when compared to the student model), leading to better results compared to directly transferring the knowledge from the teacher model. Designing the most appropriate auxiliary network is an open research area and significantly better ways than the proposed one might exist. However, even this simple approach was adequate to significantly enhance the performance of KD and demonstrate the potential of information flow modeling, as further demonstrated in the ablation studies provided in Section 4. Also, note that a hierarchy of auxiliary teachers can be trained in this fashion, as also proposed in [16]. + +The final loss used be optimize the student model, when an auxiliary network is employed, is calculated as: + +$$ +\mathcal {L} = \sum_ {i = 1} ^ {N _ {L s}} \alpha_ {i} \mathcal {L} ^ {(i, i)}, \tag {9} +$$ + +where $\alpha_{i}$ is a hyper-parameter that controls the relative weight of transferring the knowledge from the $i$ -th layer of the teacher to the $i$ -th layer of the student and the loss $\mathcal{L}^{(i,i)}$ defined in (7) is calculated using the auxiliary teacher, instead of the initial teacher. The value of $\alpha_{i}$ can be dynamically selected during the training process, to ensure that the applied KD scheme takes into account the current learning state of the network, as further discussed in Subsection 3.3. Finally, stochastic gradient descent is employed to train the student model: $\Delta \mathbf{W} = -\eta \frac{\partial\mathcal{L}}{\partial\mathbf{W}}$ , where $\mathbf{W}$ is the matrix + +with the parameters of the student model and $\eta$ is the employed learning rate. + +# 3.3. Critical Period-aware Divergence Minimization + +Neural networks transition through different learning phases during the training process, with the first few epochs being especially critical for the later behavior of the network [1]. Using a stronger teacher model provides the opportunity of guiding the student model during the initial critical learning period in order to form the appropriate connectivity between the layers, before the information plasticity declines. However, just minimizing the information flow divergence does not ensure that the appropriate connections will be formed. To better understand this, we have to consider that the gradients back-propagated through the network depend both on the training target, as well as on the initialization of the network. Therefore, for a randomly initialized student, the task of forming the appropriate connections between the intermediate layers might not facilitate the final task at hand (until reaching a certain critical point). This was clearly demonstrated in Fig 1, where the convergence of the network was initially slower, when the proposed method was used, until reaching the point at which the critical learning period ends and the convergence of the network is accelerated. + +Therefore, in this work we propose using an appropriate weighting scheme for calculating the value of the hyperparameter $\alpha_{i}$ during the training process. More specifically, during the critical learning period a significantly higher weight is given to match the information flow for the earlier layers, ignoring the task at hand dictated by the final layer of the teacher, while this weight gradually decays to 0, as the training process progresses. Therefore, the parameter $\alpha_{i}$ is calculated as: + +$$ +\alpha_ {i} = \left\{ \begin{array}{l l} 1, & \text {i f} i = N _ {L S} \\ \alpha_ {\text {i n i t}} \cdot \gamma^ {k} & \text {o t h e r w i s e} \end{array} , \right. \tag {10} +$$ + +where $k$ is the current training epoch, $\gamma$ is a decay factor and $\alpha_{init}$ is the initial weight used for matching the information flow in the intermediate layers. The parameter $\gamma$ was set to 0.7, while $\alpha_{init}$ was set to 100 for all the experiments conducted in this paper (unless otherwise stated). Therefore, during the first few epochs (1-10) the final task at hand has a minimal impact on the optimization objective. However, as the training process progresses the importance of matching the information flow for the intermediate layers gradually diminishes and the optimization switches to fine-tuning the network for the task at hand. + +# 4. Experimental Evaluation + +The experimental evaluation of the proposed method is provided in this Section. The proposed method was eval + +Table 1. Metric Learning Evaluation: CIFAR-10 + +
MethodmAP (e)mAP (c)top-100 (e)top-100 (c)
Baseline Models
Teacher (ResNet-18)87.1890.4792.1592.26
Aux. (CNN1-A)62.1266.7873.7275.91
With Constrasive Supervision
Student (CNN1)47.6948.7257.4658.50
Hint.43.5648.7360.4462.43
MKT45.3446.8455.8957.10
PKT48.8749.9558.4459.48
Hint-H43.2447.4658.9761.07
MKT-H44.8347.1256.2857.90
PKT-H48.6950.0958.7160.20
Proposed49.5550.8259.5060.79
Without Constrasive Supervision
Student (CNN1)35.3039.0055.8758.77
Distill.37.3940.5356.1758.56
Hint.43.9948.9960.6962.42
MKT36.2638.2050.5552.72
PKT48.0751.5660.0262.50
Hint-H42.6546.4658.5160.59
MKT-H41.1643.9955.1057.63
PKT-H48.0551.7360.3963.01
Proposed49.2053.0661.5464.24
+ +Table 2. Classification Evaluation: CIFAR-10 + +
MethodTrain AccuracyTest Accuracy
Distill72.5070.68
Hint.71.2970.59
MKT69.7369.13
PKT72.7070.44
Hint-H70.9369.52
MKT-H69.6768.82
PKT-H73.4371.44
Proposed73.2471.97
+ +uated using four different datasets (CIFAR-10 [11], STL-10 [6], CUB-200 [29] and SUN Attribute [21] datasets) and compared to four competitive KD methods: neural network distillation [9], hint-based transfer [22], probabilistic knowledge transfer (PKT) [19] and metric knowledge transfer (abbreviated as MKT) [31]. A variety of different evaluation setups were used to evaluate various aspects of the proposed method. Please refer to the supplementary material for a detailed description of the employed networks and evaluation setups. + +First, the proposed method was evaluated in a metric learning setup using the CIFAR-10 dataset (Table 1). The methods were evaluated under two different settings: a) using contrastive supervision (by adding a contrastive loss term in the loss function [8]), as well as b) using a purely unsupervised setting (cloning the responses of the powerful teacher model). The simple variants (Hint, MKT, PKT) refer to transferring the knowledge only from the penultimate layer of the teacher, while the “-H” variants refer to transferring the knowledge simultaneously from all the layers of the auxiliary model. The abbreviation “e” is used to refer to retrieval using the Euclidean similarity metric, while “c” is used to refer to retrieval using the cosine similarity. + +First, note that using all the layers for distilling the + +Table 3. Metric Learning Evaluation: STL Distribution Shift + +
MethodmAP (e)mAP (c)top-100 (e)top-100 (c)
Teacher (ResNet-18)57.4061.2066.7569.70
Aux. (CNN1-A)44.8948.4853.5456.26
Student (CNN1)30.6033.0439.0841.69
Distill33.5636.2343.3246.01
Hint.37.1140.3346.6049.46
MKT33.4635.9140.6543.23
PKT37.2240.2644.7347.98
Hint-H35.5637.8543.8346.13
MKT-H33.5735.2340.2042.11
PKT-H37.5639.7744.7647.17
Proposed38.1140.3548.4450.57
+ +knowledge provides small to no improvements in the retrieval precision, with the exception of the MKT method (when applied without any form of supervision). Actually, in some cases (e.g., when hint-based transfer is employed) the performance when multiple layers are used is worse. This behavior further confirms and highlights the difficulty in applying multi-layer KD methods between heterogeneous architectures. Also, using contrastive supervision seems to provide more consistent results for the competitive methods, especially for the MKT method. Using the proposed method leads to a significant increase in the mAP, as well as in the top-K precision. For example, mAP (c) increases by over $2.5\%$ (relative increase) over the next best performing method (PKT-H). At the same time, note that the proposed method seems to lead to overall better results when there is no additional supervision. This is again linked to the existence of critical learning periods. As explained before, forming the appropriate information flow paths requires little to no supervision from the final layers, when the network is randomly initialized (since forming these paths usually change the way the network process information, increasing temporarily the loss related to the final task at hand). Similar conclusions can be also drawn from the classification evaluation using the CIFAR-10 dataset. The results are reported in Table 2. Again, the proposed method leads to a relative increase of about $0.7\%$ over the next best-performing method. + +Next, the proposed method was evaluated under a distribution shift setup using the STL-10 dataset (Table 3). For these experiments, the teacher model was trained using the CIFAR-10 dataset, but the KD was conducted using the unlabeled split of the STL dataset. Again, similar results as with the CIFAR-10 dataset are observed, with the proposed method outperforming the rest of the evaluated methods over all the evaluated metrics. Again, it is worth noting that directly transferring the knowledge between all the layers of the network often harms the retrieval precision for the competitive approaches. This behavior is also confirmed using the more challenging CUB-200 data set (Table 4), where the proposed method again outperforms the rest of the evaluated approaches both for the retrieval evaluation, as well as for the classification evaluation. For the latter, a quite large + +Table 4. Metric Learning and Classification Evaluation: CUB-200 + +
MethodmAP (e)mAP (c)top-10 (e)top-10 (c)Acc.
Teacher63.1778.1776.0281.6472.16
Aux.17.0118.9825.7727.0732.33
Student15.6017.2423.4024.8934.08
Distill16.4018.5524.8226.5735.21
Hint.14.3415.9822.3123.4128.71
MDS12.9913.3920.6020.5930.46
PKT16.3618.5724.6826.7034.96
Hint-H13.9415.3721.7522.6128.34
MDS-H13.8315.3921.2722.7632.08
PKT-H15.5817.7723.5025.3933.83
Proposed16.7019.0125.4127.6736.95
+ +Table 5. HoG Cloning Network: SUN Dataset + +
MethodmAP (c)top-1 (e)top-10 (c)
HoG32.06 ± 1.2062.55 ± 1.1047.93 ± 1.73
Aux.29.69 ± 2.0955.26 ± 3.0342.34 ± 3.71
Hint20.87 ± 2.1344.14 ± 4.1131.15 ± 4.48
MDS21.65 ± 2.7943.43 ± 4.8731.29 ± 4.24
PKT27.22 ± 2.6049.90 ± 3.6736.92 ± 2.64
Proposed27.63 ± 0.6251.18 ± 1.7438.59 ± 1.00
+ +improvement is observed, since the accuracy increases by over $1.5\%$ over the next best performing method. + +Furthermore, we also conducted a HoG [7] cloning experiment, in which the knowledge was transferred from a handcrafted feature extractor to demonstrate the flexibility of the proposed approach. The same strategy as in the previous experiments were used, i.e., the knowledge was first transferred to an auxiliary model and then further distilled to the student model. It is worth noting that this setup has several emerging applications, as discussed in a variety of recent works [19, 5], since it allows for pre-training deep neural networks for domains for which it is difficult to acquire large annotated datasets, as well as providing a straightforward way to exploit the highly optimized deep learning libraries for embedded devices to provide neural network-based implementations of hand-crafted features. The evaluation results for this setup are reported in Table 5, confirming again that the proposed method outperforms the rest of the evaluated methods. + +Finally, several ablation studies have been conducted. First, in Fig. 1 we evaluated the effect of using the proposed weighting scheme that takes into account the existence of critical learning periods. The proposed scheme indeed leads to faster convergence over both single layer KD using the PKT method, as well as over the multi-layer PKT-H method. To validate that the improved results arise from the higher weight given to the intermediate layers over the critical learning period, we used the same decaying scheme for the PKT-H method, but with the initial $\alpha_{init}$ set to 1 instead of 100. Next, we also demonstrated the impact of matching the correct layers in Fig. 2. Several interesting conclusions can be drawn from the results reported in Fig. 2. For example, note that over-regularization occurs when transferring the knowledge from a teacher layer that + +Table 6. Effect of using auxiliary networks of different sizes (CNN order in term of parameters: CNN-1-H > CNN-1-A > CNN-1 > CNN-1-L) + +
MethodmAP (e)mAP (c)top-100 (e)top-100 (c)
CNN1-L → CNN135.0337.8946.3149.27
CNN1-A → CNN149.2053.0661.5464.24
CNN1-H → CNN148.8252.7761.2563.99
CNN1 → CNN1-L36.4939.2548.2150.88
CNN-1-A → CNN-1-L35.7238.6147.2550.13
CNN-1-H → CNN-1-L34.9037.5145.8348.50
+ +has lower MI with the targets (lower NCC accuracy). On the other hand, using a layer with slightly lower discriminative power (Layer 1 of ResNet-18) can have a slightly positive regularization effect. At the same time, using too discriminative layers (Layer 3 and 4 of ResNet-18) can lead to an early collapse of the representation, harming the precision of the student. The accuracy of the student increases only when the correct layers of the auxiliary teacher are matched to the student (Layers 2 and 3 of CNN-1-A). + +Furthermore, we also evaluated the effect of using auxiliary models of different sizes on the precision of the student model trained with the proposed method. The evaluation results are provided in Table 6. Two different student models are used: CNN-1 (15k parameters) and CNN-1-L (6k parameters). As expected, the auxiliary models that are closer to the complexity of the student lead to improved performance compared both to the more complex and the less complex teachers. That is, when the CNN-1 model is used as student, the CNN-1-A teacher achieves the best results, while when the CNN-1-L is used as student, the weaker CNN-1 teacher achieves the highest precision. Note that as the complexity of the student increases, the efficiency of the KD process declines. + +# 5. Conclusions + +In this paper we presented a novel KD method that that works by modeling the information flow through the various layers of the teacher model. The proposed method was able to overcome several limitations of existing KD approaches, especially when used for training very lightweight deep learning models with architectures that differ significantly from the teacher, by a) designing and training an appropriate auxiliary teacher model, and b) employing a critical-learning aware KD scheme that ensures that critical connections will be formed to effectively mimic the information flow paths of the auxiliary teacher. + +# Acknowledgment + +This work was supported by the European Union's Horizon 2020 Research and Innovation Program (OpenDR) under Grant 871449. This publication reflects the authors' views only. The European Commission is not responsible for any use that may be made of the information it contains. + +# References + +[1] Alessandro Achille, Matteo Rovere, and Stefano Soatto. Critical learning periods in deep neural networks. arXiv preprint arXiv:1711.08856, 2017. 1, 2, 6 +[2] Sungsoo Ahn, Shell Xu Hu, Andreas Damianou, Neil D Lawrence, and Zhenwen Dai. Variational information distillation for knowledge transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9163-9171, 2019. 3 +[3] Rohan Anil, Gabriel Pereyra, Alexandre Passos, Robert Ormandi, George E Dahl, and Geoffrey E Hinton. Large scale distributed neural network training through online distillation. arXiv preprint arXiv:1804.03235, 2018. 3 +[4] Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data mining, pages 535-541, 2006. 2, 3 +[5] Zhenghua Chen, Le Zhang, Zhiguang Cao, and Jing Guo. Distilling the knowledge from handcrafted features for human activity recognition. IEEE Transactions on Industrial Informatics, 14(10):4334-4342, 2018. 8 +[6] Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the Conference on Artificial Intelligence and Statistics, pages 215-223, 2011. 7 +[7] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In Proceedings of the Computer Society Conference on Computer Vision and Pattern Recognition, pages 886-893, 2005. 8 +[8] Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 2, pages 1735-1742, 2006. 7 +[9] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. In Proceedings of the Neural Information Processing Systems Deep Learning Workshop, 2014. 1, 2, 3, 7 +[10] Harold Jeffreys. An invariant form for the prior probability in estimation problems. Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences, 186(1007):453-461, 1946. 5 +[11] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report, 2009. 7 +[12] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436-444, 2015. 1 +[13] Seung Hyun Lee, Dae Ha Kim, and Byung Cheol Song. Self-supervised knowledge distillation using singular value decomposition. In European Conference on Computer Vision, pages 339-354. Springer, 2018. 3 +[14] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9:2579-2605, 2008. 5 +[15] Chris McCool, Tristan Perez, and Ben Upcroft. Mixtures of lightweight deep convolutional neural networks: Applied to agricultural robotics. IEEE Robotics and Automation Letters, 2(3):1344-1351, 2017. + +[16] Seyed-Iman Mirzadeh, Mehrdad Farajtabar, Ang Li, and Hassan Ghasemzadeh. Improved knowledge distillation via teacher assistant: Bridging the gap between student and teacher. arXiv preprint: 1902.03393, 2019. 3, 4, 6 +[17] Daniele Palossi, Francesco Conti, and Luca Benini. An open source and open hardware deep learning-powered visual navigation engine for autonomous nano-uavs. In Proceedings of the International Conference on Distributed Computing in Sensor Systems, pages 604-611, 2019. +[18] Daniele Palossi, Antonio Loquercio, Francesco Conti, Eric Flamand, Davide Scaramuzza, and Luca Benini. Ultra low power deep-learning-powered autonomous nano drones. In Proceedings of th IEEE/RSJ International Conference on Intelligent Robots and Systems, 2018. +[19] Nikolaos Passalis and Anastasios Tefas. Learning deep representations with probabilistic knowledge transfer. In Proceedings of the European Conference on Computer Vision, pages 268-284, 2018. 2, 3, 5, 7, 8 +[20] Nikolaos Passalis and Anastasios Tefas. Unsupervised knowledge transfer using similarity embeddings. IEEE Transactions on Neural Networks and Learning Systems, 30(3):946-950, 2018. 3 +[21] Genevieve Patterson and James Hays. Sun attribute database: Discovering, annotating, and recognizing scene attributes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2751-2758, 2012. 7 +[22] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. In Proceedings of the International Conference on Learning Representations, 2015. 2, 3, 7 +[23] Andrew Michael Saxe, Yamini Bansal, Joel Dapello, Madhu Advani, Artemy Kolchinsky, Brendan Daniel Tracey, and David Daniel Cox. On the information bottleneck theory of deep learning. In Proceedings of the International Conference on Learning Representations. 2 +[24] Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017. 2 +[25] Zhiyuan Tang, Dong Wang, Yiqiao Pan, and Zhiyong Zhang. Knowledge transfer pre-training. arXiv preprint: 1506.02256, 2015.3 +[26] Zhiyuan Tang, Dong Wang, and Zhiyong Zhang. Recurrent neural network training with dark knowledge transfer. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing, pages 5900-5904, 2016. 2, 3 +[27] Kari Torkkola. Feature extraction by non-parametric mutual information maximization. Journal of Machine Learning Research, 3(Mar):1415-1438, 2003. 5 +[28] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In Proceedings of the IEEE International Conference on Computer Vision, pages 4068-4076, 2015. 2, 3 +[29] Peter Welinder, Steve Branson, Takeshi Mita, Catherine Wah, Florian Schroff, Serge Belongie, and Pietro Perona. Caltech-ucsd birds 200. 2010. 7 +[30] Junho Yim, Donggyu Joo, Jihoon Bae, and Junmo Kim. A gift from knowledge distillation: Fast optimization, network + +minimization and transfer learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7130-7138, 2017. 1, 2, 3 +[31] Lu Yu, Vacit Oguz Yazici, Xialei Liu, Joost van de Weijer, Yongmei Cheng, and Arnau Ramisa. Learning metrics from teachers: Compact networks for image embedding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2907-2916, 2019. 2, 3, 5, 7 +[32] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016. 2, 3 +[33] Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4320-4328, 2018. 3 \ No newline at end of file diff --git a/heterogeneousknowledgedistillationusinginformationflowmodeling/images.zip b/heterogeneousknowledgedistillationusinginformationflowmodeling/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bfd36ec8f0f31f44cb885915d6813fe4914c8730 --- /dev/null +++ b/heterogeneousknowledgedistillationusinginformationflowmodeling/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:923b5cfb54bd51db680763a29d28d6b13e560c17d1d5fdebf5f28aaa385c6193 +size 414631 diff --git a/heterogeneousknowledgedistillationusinginformationflowmodeling/layout.json b/heterogeneousknowledgedistillationusinginformationflowmodeling/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..72f169ed6a6bf47eeab02281ab7bb91c3a9dc379 --- /dev/null +++ b/heterogeneousknowledgedistillationusinginformationflowmodeling/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edb78c4cff55ac2430497eae946825807a3e038dc7cb6bbd9dbe425c1bc521eb +size 292079 diff --git a/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_content_list.json b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0658e825539844736887ba1d1117300ef761f48a --- /dev/null +++ b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91b409bb7fae5c17313756660bf4443b44458bb7e2299d9ce11b9bb003470976 +size 79365 diff --git a/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_model.json b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_model.json new file mode 100644 index 0000000000000000000000000000000000000000..22875f1072ffe6358dd797801dd7c662045726ee --- /dev/null +++ b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e75dd1bd75af2f99e99312c33af5f1db174df0cf49420de60833ba92571ca8a +size 96372 diff --git a/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_origin.pdf b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a57c638aad9d923f406fa8969b008030cb944896 --- /dev/null +++ b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/159051f9-be39-47c7-93fc-c7872d59e333_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:585446c06f491146673934a8c76dc17114f146775d299f80efb10c433dfc5346 +size 2765834 diff --git a/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/full.md b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..181733ff75154d3c749df9b78b46c7f3c9fcd4b0 --- /dev/null +++ b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/full.md @@ -0,0 +1,290 @@ +# Hi-CMD: Hierarchical Cross-Modality Disentanglement for Visible-Infrared Person Re-Identification + +Seokeon Choi Sumin Lee Youngeun Kim Taekyung Kim Changick Kim Korea Advanced Institute of Science and Technology, Daejeon, Korea + +{seokeon, suminlee94, youngeunkim, tkkim93, changick}@kaist.ac.kr + +# Abstract + +Visible-infrared person re-identification (VI-ReID) is an important task in night-time surveillance applications, since visible cameras are difficult to capture valid appearance information under poor illumination conditions. Compared to traditional person re-identification that handles only the intra-modality discrepancy, VI-ReID suffers from additional cross-modality discrepancy caused by different types of imaging systems. To reduce both intra- and cross-modality discrepancies, we propose a Hierarchical CrossModality Disentanglement (Hi-CMD) method, which automatically disentangles ID-discriminative factors and ID-excluded factors from visible-thermal images. We only use ID-discriminative factors for robust cross-modality matching without ID-excluded factors such as pose or illumination. To implement our approach, we introduce an ID-preserving person image generation network and a hierarchical feature learning module. Our generation network learns the disentangled representation by generating a new cross-modality image with different poses and illuminations while preserving a person's identity. At the same time, the feature learning module enables our model to explicitly extract the common ID-discriminative characteristic between visible-infrared images. Extensive experimental results demonstrate that our method outperforms the state-of-the-art methods on two VI-ReID datasets. The source code is available at: https://github.com/bismex/HiCMD. + +# 1. Introduction + +Person re-identification (ReID) aims to match a specific person across multiple non-overlapping camera views. Due to its usefulness in security and surveillance systems, person ReID has been of great research interest in recent years. Existing ReID methods mainly treat visible images captured by single-modality cameras, and depend on human appearance for RGB-RGB matching [35, 42, 45, 25, 36, 26]. However, visible light cameras can not capture all the ap + +![](images/3bc8d858c61f1af597597588817ac1005df0173b3b2ed8305f22714fb743ff95.jpg) +(a) +Figure 1. (a) Illustration of our Hierarchical Cross-Modality Disentanglement (Hi-CMD) concept. Our Hi-CMD method aims to hierarchically disentangle ID-discriminative factors (e.g. body shape and clothes pattern) and ID-excluded factors (e.g. pose and illumination) from RGB-IR images. (b) Examples of ID-preserving Person Image Generation (ID-PIG). The images in each row show that pose and illumination attributes can be changed while maintaining the identity information. Best viewed in color. + +![](images/41346dc1e79595986a533a06c5d71c730abc812d9ba3fbb7266ee7f0d37373ce.jpg) +(b) + +pearance characteristics of a person under poor illumination conditions. For these conditions, most surveillance cameras automatically switch from visible to the infrared mode in dark environments [33, 34]. After all, it becomes essential to consider visible-infrared person re-identification (VI-ReID). The goal of VI-ReID is to match pedestrians observed from visible and infrared cameras with different spectra. + +Compared to the traditional ReID task that only has the intra-modality discrepancy problem, VI-ReID encounters the additional cross-modality discrepancy problem resulting from the natural difference between the reflectivity of + +the visible spectrum and the emissivity of the thermal spectrum [23]. Eventually, the coexistence of intra- and cross-modality discrepancies leads to a critical situation where the intra-class distance is larger than the inter-class distance in VI-ReID [38, 31]. In this situation, most studies [33, 37, 39, 2, 38, 9] have attempted to reduce both discrepancies with feature-level constraints like the traditional ReID methods [28, 27]. It is difficult to eliminate the intractable discrepancies successfully using only feature-level constraints, since the illumination and pose attributes are entangled in a single image. More recent research [31] has attempted to bridge the cross-modality gap using an image-level constraint. However, they only translate an infrared (or visible) image into its visible (or infrared) counterpart without considering intra-modality discrepancy, despite the insufficient amount of cross-view paired training data. + +To mitigate the coexisting intra- and cross-modality discrepancies at the same time, we propose a novel Hierarchical Cross-Modality Disentanglement (Hi-CMD) method, as shown in Fig. 1 (a). The goal of our approach is to hierarchically disentangle ID-excluded factors (i.e. pose and illumination) and ID-discriminative factors (i.e. body shape and clothes pattern) from cross-modality images using image-level constraints. To this end, we introduce the ID-preserving Person Image Generation (ID-PIG) network. The ID-PIG network focuses on learning the ID-excluded feature representation by replacing some latent vectors in a pair of cross-modality images. As a result, ID-PIG can transform pose and illumination attributes while preserving the identity information of a person as visualized in Fig. 1 (b). The visualization results of the ID-PIG network show that unnecessary information (i.e. pose or illumination attribute) can be separated from entangled representations. + +Besides, we introduce the Hierarchical Feature Learning (HFL) module coupled with the ID-PIG network. This module enables the encoders in the generator to extract the common ID-discriminative factors explicitly, which is robust to pose and illumination variations. It also implicitly helps our model separate pose and illumination from RGB-IR images, which improves image generation quality. Finally, the ID-discriminative feature is used for solving the cross-modality image retrieval problem in VI-ReID. Note that we train a whole network in an end-to-end manner without pose-related supervision (e.g. 3D skeletal pose, keypoint heatmaps, and pose-guided parsing) compared to the existing pose generation methods [18, 22, 6, 45, 26]. + +Our main contributions can be summarized as follows: + +- We propose a Hierarchical Cross-Modality Disentanglement (Hi-CMD) method. It is an efficient learning structure that extracts pose- and illumination-invariant features for cross-modality matching. To the best of our knowledge, this is the first work to disentangle ID-discriminative factors and ID-excluded factors simul + +taneously from cross-modality images in VI-ReID. + +- The proposed ID-preserving Person Image Generation (ID-PIG) network makes it possible to change the pose and illumination attributes while maintaining the identity characteristic of a specific person. Exploring person attributes through ID-PIG demonstrates the effectiveness of our disentanglement approach. +- Extensive experimental results show that our novel framework outperforms the state-of-the-art methods on two VI-ReID datasets. The visualization results of the ID-PIG network demonstrate the overwhelming performance of our proposed method. + +# 2. Related Work + +Visible-infrared person re-identification. The visible-infrared person re-identification (VI-ReID) is about matching cross-modality images under different illumination conditions. The VI-ReID task is challenging due to cross-modality variation in addition to intra-modality variation. At the beginning of the study, most of the work has focused on how to design a feature embedding network such as a deep zero-padding network [33] and a two-stream CNN network [37]. Recently, adversarial learning [2] or metric learning methods [39, 9, 38] are applied to learn the feature representation of heterogeneous person images involving intra-modality and cross-modality variations. However, it is difficult to overcome pixel-level differences resulting from illumination or pose variations by feature-level constraints alone because of the insufficient data. In contrast to most existing feature-level approaches, our Hi-CMD method focuses on an image-level approach by combining an image generation technique with the VI-ReID task to effectively bridge both cross-modality and intra-modality gaps. + +Person re-identification based on image generation. Recently, image generation methods by Generative Adversarial Networks (GANs) [8] have drawn a lot of attention in person ReID. Most of the existing work is categorized in two ways as follows: pose transfer [18, 22, 6] and style transfer [32, 19, 5, 31]. The work of the former approach points out that the existing datasets do not provide sufficient pose coverage to learn a pose-invariant representation. Accordingly, it addresses this issue by using pose-rich data augmentation. However, since this work is designed for a single-modality environment, it is difficult to apply the pose-guided methods directly to the VI-ReID task. + +Another image generation approach in ReID is to reduce the domain gap between different camera domains based on unsupervised domain adaptation [32, 19, 5]. Most methods focus on transforming styles while maintaining the structural information of the person. In a similar approach, Wang et al. [31] translate an infrared (or visible) image into its visible (or infrared) counterpart to reduce the cross-modality + +![](images/7b806b8fdf3c26b7da4518753bacd95a8529b4c12f0fbd2ca0d42306f85cfca9.jpg) +ID-preserving Person Image Generation (ID-PIG) + +![](images/477bbe36f845936c5cd3709aea8c82024c25fecc30a51f17731142191697b936.jpg) + +![](images/de8ca445d59e24651632384fc6f484136ca499f62f229c9ec9e7b369b6e9fdda.jpg) +Figure 2. The framework of our Hi-CMD method. The entire framework includes two important components: the ID-preserving Person Image Generation (ID-PIG) network and the Hierarchical Feature Learning (HFL) module. Our goal is to disentangle ID-discriminative factors and ID-excluded factors from cross-modality images. Reconstruction losses are shown in Fig. 3. Best viewed in color. + +discrepancy in the VI-ReID task. However, since most style transfer methods in ReID do not care about the lack of cross-view paired training data, view-invariant representations are hardly exploited. + +In short, the above image generation methods in ReID handle only structural information or only convert the image style at the image-level. Unlike single-modality person re-identification, it is more important to consider intramodality and cross-modality characteristics simultaneously in VI-ReID. To this end, we attempt to alleviate the cross-modality and intra-modality discrepancies at the same time by applying a novel hierarchical disentanglement approach even without pose supervision. + +Disentangled representation learning for recognition. The goal of disentangled representation learning is to extract explanatory factors from diverse data variation for generating a meaningful representation. Recently, considerable attention has been focused on learning disentangled representations in various fields [12, 7, 13, 24]. Also in the recognition task, several studies have tried to disentangle the identity-related information and the identity-irrelevant information from an image (e.g. pose, viewpoint, age, and other attributes) [41, 29, 1, 30]. Among them, some previous works in the single-modality person re-identification task have been conducted with a purpose of disentangling foreground, background, and pose factors [20], or extracting illumination-invariant features [40]. Note that the VI + +ReID task is particularly challenging to disentangle the common identity information and the remaining attributes from RGB-ID images due to the coexistence of cross-modality and intra-modality discrepancies. To deal with both pose and illumination attributes simultaneously, we introduce a novel hierarchical disentanglement approach. To the best of our knowledge, this is the first work to disentangle ID-discriminative factors and ID-excluding factors (i.e. pose and illumination attributes) from RGB-IR images in the VI-ReID task. + +# 3. Proposed Method + +# 3.1. Problem Definition and Overview + +Problem definition. We denote the visible image and the infrared image as $\pmb{x}_1 \in \mathbb{R}^{H \times W \times 3}$ and $\pmb{x}_2 \in \mathbb{R}^{H \times W \times 3}$ respectively, where $H$ and $W$ are the height and the width of images. Each of images $\pmb{x}_1$ and $\pmb{x}_2$ corresponds to an identity label $y \in \{1, 2, \dots, N\}$ , where $N$ is the number of person identities. In the training stage, a feature extraction network $\phi(\cdot)$ is trained with the cross-modality image sets $\mathcal{X}_1$ and $\mathcal{X}_2$ . In the testing stage, given a query image with one modality, a ranking list within the gallery set of the other modality is calculated. The distance between two feature vectors $\phi(\pmb{x}_1)$ and $\phi(\pmb{x}_2)$ is computed by the Euclidean distance. + +**Framework overview.** In the VI-ReID task, the most challenging issue is that both cross- and intra-modality discrepancies coexist between visible and infrared images. To address this issue effectively, we propose a novel Hierarchical Cross-Modality Disentanglement (Hi-CMD) method. Our Hi-CMD method aims to disentangle ID-discriminative factors and ID-excluded factors from cross-modality images to reduce the cross-modality and intra-modality discrepancies at the same time. To achieve this goal, we introduce two key components, the ID-preserving Person Image Generation (ID-PIG) network and the Hierarchical Feature Learning (HFL) module, as shown in Fig. 2. + +# 3.2. Identity Preserving Person Image Generation + +Hierarchical representation. We present the hierarchical representation of person images for VI-ReID. As illustrated in Fig. 2, our ID-PIG network consists of two disentanglement stages. In the first stage, we design a prototype encoder $E_{i}^{p}$ and an attribute encoder $E_{i}^{a}$ for each modality ( $i = 1$ for visible images and $i = 2$ for infrared images). These encoders $E_{i}^{p}$ and $E_{i}^{a}$ map $\boldsymbol{x}_{i}$ to the corresponding prototype code $p_{i}$ and attribute code $\boldsymbol{a}_{i}$ , respectively. The prototype code $p_{i}$ is a tensor containing the underlying form of a person appearance such as clothes pattern and body shape. On the other hand, the attribute code $\boldsymbol{a}_{i}$ is a vector including clothes style and changeable attributes depending on the situation such as pose and illumination. In the second stage, the attribute code is divided into three types of codes once more as $\boldsymbol{a}_{i} = [a_{i}^{s}; a_{i}^{c}; a_{i}^{p}]$ , which includes a style attribute code $a_{i}^{s}$ , an illumination attribute code $a_{i}^{c}$ , and a pose attribute code $a_{i}^{p}$ . The illumination and pose attribute codes $a_{i}^{c}$ and $a_{i}^{p}$ correspond to the cross-modality variation and the intra-modality variation, respectively. Note that we refer to the visual difference caused by different RGB and IR cameras as the illumination attribute. For clarity, both codes $a_{i}^{c}$ and $a_{i}^{p}$ can be integrated into an ID-excluded attribute code as $a_{i}^{ex} = [a_{i}^{c}; a_{i}^{p}]$ . In summary, ID-excluded factors involves the illumination attribute code $a_{i}^{c}$ and the pose attribute code $a_{i}^{p}$ , while ID-discriminative factors corresponds to the style attribute code $a_{i}^{s}$ and the prototype code $p_{i}$ . This assumption is different from the case of single-modality re-identification where color information is the key clue as discussed in [43]. + +Disentangling ID-excluded factors. In the image generation process, our primary strategy is to synthesize a pair of cross-modality images by swapping the ID-excluded factors of two images with the same ID. Since two cross-modality images share the same ID characteristic, we can apply the image reconstruction loss between the translated image and the cross-modality image. Formally, this cross-modality reconstruction loss is formulated as follows: + +$$ +\mathcal {L} _ {r e c o n 1} ^ {c r o s s} = \underset {\boldsymbol {x} _ {2} \sim p _ {d a t a} (\boldsymbol {x} _ {1})} {\mathbb {E}} [ \| \boldsymbol {x} _ {1} - G (\boldsymbol {p} _ {2}, \boldsymbol {a} _ {2} ^ {s}, \boldsymbol {a} _ {1} ^ {e x}) \| _ {1} ], \quad (1) +$$ + +![](images/9062ce0b4c0b02ddee3ddf41ecf0574393c229d11f9550bc8800b285c5540dd6.jpg) +Figure 3. Illustration of the proposed reconstruction losses. + +where $\pmb{p}_i = E_i^p(\pmb{x}_i), [a_i^s; a_i^{ex}] = E_i^a(\pmb{x}_i)$ , and $G$ denotes a decoder. The $l_1$ loss encourages the generator to create sharp images. From this cross-modality reconstruction loss, the generator learns how to encode and decode the ID-excluded factors. To be clear, we only represent the loss for one modality as $\mathcal{L}_{recon1}^{cross}$ . Another loss $\mathcal{L}_{recon2}^{cross}$ is defined by changing the index of modalities. + +Reconstruction loss. We propose three additional reconstruction losses to improve the generation quality further, as expressed in Fig. 3. In addition to the loss of reconstructing images of different modalities, we apply a loss to reconstruct images of the same modality. This samemodality reconstruction loss plays a key role in regularization in the generation network, which is formulated as + +$$ +\mathcal {L} _ {\text {r e c o n 1}} ^ {\text {s a m e}} = \mathbb {E} _ {\boldsymbol {x} _ {1} \sim p _ {\text {d a t a}} (\boldsymbol {x} _ {1})} \left[ \| \boldsymbol {x} _ {1} - G \left(\boldsymbol {p} _ {1}, \boldsymbol {a} _ {1} ^ {s}, \boldsymbol {a} _ {1} ^ {e x}\right) \| _ {1} \right], \tag {2} +$$ + +where $\pmb{p}_i = E_i^p (\pmb{x}_i)$ and $[\pmb{a}_i^s; \pmb{a}_i^{ex}] = E_i^a (\pmb{x}_i)$ . + +We also apply the cycle consistency to regularize the ill-posed unsupervised image-to-image translation problem [44]. The cycle reconstruction loss is formulated as follows: + +$$ +\mathcal {L} _ {r e c o n 1} ^ {c y c l e} = \underset {\boldsymbol {x} _ {2} \sim p _ {d a t a} (\boldsymbol {x} _ {1})} {\mathbb {E}} [ \| \boldsymbol {x} _ {1} - G (\hat {\boldsymbol {p}} _ {1}, \hat {\boldsymbol {a}} _ {1} ^ {s}, \hat {\boldsymbol {a}} _ {1} ^ {e x}) \| _ {1} ], \tag {3} +$$ + +where $\hat{p}_1$ , $\hat{a}_1^s$ , and $\hat{a}_1^{ex}$ denote the reconstructed prototype code, the reconstructed style attribute code, and the reconstructed ID-excluded attribute code, respectively. $\hat{p}_1$ , $\hat{a}_1^s$ , and $\hat{a}_1^{ex}$ are obtained from $E_2^p (G(\pmb {p}_1,\pmb {a}_1^s,\pmb {a}_2^{ex}))$ , $E_2^a (G(\pmb {p}_1,\pmb {a}_1^s,\pmb {a}_2^{ex}))$ , and $E_1^a (G(\pmb {p}_2,\pmb {a}_2^s,\pmb {a}_1^{ex}))$ respectively, where $\pmb {p}_i = E_i^p (\pmb {x}_i)$ and $[\pmb {a}_i^s;\pmb {a}_i^{ex}] = E_i^a (\pmb {x}_i)$ . + +Besides, we apply a code reconstruction loss as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {r e c o n 1}} ^ {\text {c o d e}} = \underset {\substack {\boldsymbol {x} _ {1} \sim p _ {\text {d a t a}} (\boldsymbol {x} _ {1}), \\ \boldsymbol {x} _ {2} \sim p _ {\text {d a t a}} (\boldsymbol {x} _ {2})}} {\mathbb {E} _ {\boldsymbol {x} _ {1} \sim p _ {\text {d a t a}} (\boldsymbol {x} _ {1})}} \left[ \| \boldsymbol {a} _ {1} ^ {s} - \hat {\boldsymbol {a}} _ {1} ^ {s} \| _ {1} \right] \tag{4} \\ + \mathbb {E} _ {\substack {\boldsymbol {x} _ {1} \sim p _ {d a t a} (\boldsymbol {x} _ {1}), \\ \boldsymbol {x} _ {2} \sim p _ {d a t a} (\boldsymbol {x} _ {2})}} \left[ \| \boldsymbol {a} _ {1} ^ {e x} - \hat {\boldsymbol {a}} _ {1} ^ {e x} \| _ {1} \right]. \\ \end{array} +$$ + +$\hat{\pmb{a}}_1^s$ and $\hat{\pmb{a}}_1^{ex}$ are obtained from $E_2^a (G(\pmb {p}_1,\pmb {a}_1^s,\pmb {a}_2^{ex}))$ and $E_{1}^{a}(G(\pmb {p}_{2},\pmb{a}_{2}^{s},\pmb{a}_{1}^{ex}))$ , where $\pmb {p}_i = E_i^p (\pmb {x}_i)$ and $[a_i^s;a_i^{ex}] =$ + +$E_{i}^{a}(\pmb{x}_{i})$ . This loss includes both assumptions that ID-discriminative factors should be preserved during the cross-modality reconstruction process as well as ID-excluded factors should be maintained during the same modality reconstruction process. The overall losses for reconstruction are expressed as follows: + +$$ +\mathcal {L} ^ {\text {r e c o n}} = \lambda_ {1} \mathcal {L} _ {\text {r e c o n}} ^ {\text {c r o s s}} + \lambda_ {2} \mathcal {L} _ {\text {r e c o n}} ^ {\text {s a m e}} + \lambda_ {3} \mathcal {L} _ {\text {r e c o n}} ^ {\text {c y c l e}} + \lambda_ {4} \mathcal {L} _ {\text {r e c o n}} ^ {\text {c o d e}}, \tag {5} +$$ + +where $\lambda_t, t \in \{1, 2, 3, 4\}$ controls the relative importance of four losses. $\mathcal{L}_{recon}^{cross}$ indicates the sum of $\mathcal{L}_{recon1}^{cross}$ and $\mathcal{L}_{recon2}^{cross}$ . Other losses $\mathcal{L}_{recon}^{same}$ , $\mathcal{L}_{recon}^{cycle}$ , $\mathcal{L}_{recon}^{code}$ are calculated in the same manner. + +KL divergence loss. To help the attribute encoder $E_{a}$ learn more informative representations, we utilize the Kullback-Leibler (KL) divergence loss. This loss encourages the ID-excluded attribute representation to be as close to a prior Gaussian distribution as follows: + +$$ +\mathcal {L} _ {1} ^ {k l} = \mathbb {E} _ {\boldsymbol {x} _ {1} \sim p (\boldsymbol {x} _ {1})} \left[ \mathcal {D} _ {K L} \left(\boldsymbol {a} _ {1} ^ {e x} \| N (0, 1)\right) \right], \tag {6} +$$ + +where $\mathcal{D}_{KL}(p\| q) = -\int p(z)\log \frac{p(z)}{q(z)} dz$ and $[a_1^s;a_1^{ex}] = E_1^a (\pmb {x}_1)$ . By limiting the distribution range of the cross-modality and intra-modality characteristics, this KL divergence loss enables ID-excluded attribute codes to change continuously in the latent space. $\mathcal{L}_2^{kl}$ is defined in a similar manner and $\mathcal{L}^{kl} = \mathcal{L}_1^{kl} + \mathcal{L}_2^{kl}$ . + +Adversarial loss. Since generating realistic images is crucial for image-to-image translation, we apply an adversarial loss [8] by using the cross-reconstructed images with different modalities. Two discriminators $D_{1}, D_{2}$ corresponding visible and infrared domains are employed for adversarial training. In the case of modality 1, the RGB discriminator $D_{1}$ distinguishes the real image $x_{1}$ and the fake image $G(\pmb{p}_{2}, \pmb{a}_{2}^{s}, \pmb{a}_{1}^{ex})$ used for cross-modality reconstruction. The generator tries to synthesize a more realistic RGB image to fool the discriminator. Accordingly, the ID-excluded attribute code $a_{1}^{ex}$ is encouraged to include the modality characteristic of RGB. + +Furthermore, we introduce a new strategy to distinguish the cross-modality characteristic (i.e. illumination) and the intra-modality characteristic (i.e. pose). As mentioned above, the ID-excluded attribute code can be divided into two attribute codes as $\pmb{a}_1^{ex} = [a_1^c; a_1^p]$ . Our idea is to swap only the illumination attribute leaving the pose attribute unchanged as $G(\pmb{p}_2, \pmb{a}_2^s, \pmb{a}_1^c, \pmb{a}_2^p)$ . By feeding this image to the RGB discriminator, the modality characteristic is concentrated only on the illumination attribute code $\pmb{a}_1^c$ . The remaining intra-modality characteristic across RGB-IR images is collected in the pose attribute code $\pmb{a}_2^p$ . Adversarial losses are employed to play the minimax game, which is formulated as follows: + +$$ +\begin{array}{l} \mathcal{L}_{1}^{adv} = \underset { \begin{array}{c}\boldsymbol{x}_{1}\sim p_{data}(\boldsymbol{x}_{1})\\ \boldsymbol{x}_{2}\sim p_{data}(\boldsymbol{x}_{2}) \end{array} }{\mathbb{E}}[\log \big(1 - D_{1}(G(\boldsymbol{p}_{2},\boldsymbol{a}_{2}^{s},\boldsymbol{a}_{1}^{c},\boldsymbol{a}_{1}^{p}))\big)] \\ + \mathbb {E} _ {\substack {\boldsymbol {x} _ {1} \sim p _ {d a t a} (\boldsymbol {x} _ {1}), \\ \boldsymbol {x} _ {2} \sim p _ {d a t a} (\boldsymbol {x} _ {2})}} \left[ \log \left(1 - D _ {1} \left(G \left(\boldsymbol {p} _ {2}, \boldsymbol {a} _ {2} ^ {s}, \boldsymbol {a} _ {1} ^ {c}, \boldsymbol {a} _ {2} ^ {p}\right)\right)\right) \right] \tag{7} \\ + \mathbb {E} _ {\boldsymbol {x} _ {1} \sim p (\boldsymbol {x} _ {1})} \left[ \log D _ {1} (\boldsymbol {x} _ {1}) \right], \\ \end{array} +$$ + +where $\pmb{p}_i = E_i^p (\pmb{x}_i)$ and $[a_i^s;a_i^c;a_i^p ] = E_i^a (x_i)$ . The generator is trained to minimize (7) while the discriminator attempts to maximize it. Especially, the parameters of the discriminator are updated when the parameters of the generator are fixed. $\mathcal{L}_2^{adv}$ is defined in a similar way and $\mathcal{L}^{adv} = \mathcal{L}_1^{adv} + \mathcal{L}_2^{adv}$ . + +# 3.3. Hierarchical Feature Learning + +As illustrated in Fig. 2, our Hierarchical Feature Learning (HFL) module is coupled with ID-PIG by sharing the prototype and attribute encoders. This module enables both encoders to extract the common ID-discriminative factors between RGB-IR images. At the same time, this feature learning process implicitly assists in separating intra- and cross-modality characteristics from cross-modality images and enhances the quality of image generation. + +Re-entangling ID-discriminative factors. We introduce the ID-discriminative feature by concatenating the style attribute code and the prototype code to distinguish person identities. Compared to using one of the two codes, the combination of both codes with different characteristics encourages the network to learn rich representations of a person's identity. Given the prototype tensor $\pmb{p}_i$ from the prototype encoder $E_i^p$ , the feature embedding network $H$ projects it to the ID-discriminative prototype code $\pmb{p}_i^d$ , where $\pmb{p}_i^d = H(\pmb{p}_i)$ . We then concatenate the ID-discriminative prototype code $\pmb{p}_i^d$ and the style attribute code $\pmb{a}_i^s$ with a learnable parameter $\alpha \in [0,1]$ , which is expressed as $d_i^{comb} = [\alpha \cdot p_i^d; (1 - \alpha) \cdot a_i^s]$ . Then, the combined code $d_i^{comb}$ is feed into a fully connected layer. In the testing phase, we use the output $f$ of the fully connected layer for cross-modality retrieval with the Euclidean distance. + +Alternate sampling strategy. We form a set of training feature vectors $\pmb{f} \in \mathcal{F}$ by selecting various types of style attribute codes and prototype codes alternately. This alternate sampling strategy improves the discrimination ability by overcoming the lack of diversity in the training dataset. We alternately combine style attribute codes $\pmb{a}^s$ and prototype codes $\pmb{p}^d$ extracted from the original images $\pmb{x}_1, \pmb{x}_2$ and the cross-reconstructed images $\pmb{x}_{1\rightarrow 2} = G(\pmb{p}_1, \pmb{a}_1^s, \pmb{a}_2^c, \pmb{a}_2^p)$ , $\pmb{x}_{2\rightarrow 1} = G(\pmb{p}_2, \pmb{a}_2^s, \pmb{a}_1^c, \pmb{a}_1^p)$ . Note that the attribute and prototype codes for combination must be of the same person. + +Cross-entropy loss. Given a set of training feature vectors with the identity annotation $\{f_i, y_i\}$ , we use the cross-entropy loss for ID-discriminative learning, which is expressed as follows: + +$$ +\mathcal {L} ^ {c e} = \mathbb {E} _ {\boldsymbol {f} \in \mathcal {F}, y \sim \mathcal {Y}} \left[ - \log (p (y | \boldsymbol {f})) \right], \tag {8} +$$ + +where $p(y|\pmb{f})$ indicates the predicted probability of a sampled feature vector $\pmb{f}$ belonging to the identity $y$ . + +Triplet loss. For similarity learning, we also employ the triplet loss. The triplet loss is expressed as follows: + +$$ +\mathcal {L} ^ {t r i p} = \sum_ {\boldsymbol {f} ^ {a}, \boldsymbol {f} ^ {p}, \boldsymbol {f} ^ {n} \in \mathcal {F}} \left[ d \left(\boldsymbol {f} ^ {a}, \boldsymbol {f} ^ {p}\right) - d \left(\boldsymbol {f} ^ {a}, \boldsymbol {f} ^ {n}\right) + m \right] _ {+}, \tag {9} +$$ + +where $f^a$ , $f^p$ , and $f^n$ indicate anchor, positive, and negative samples. $d(\cdot, \cdot)$ is the Euclidean distance, $m$ is a margin parameter, and $[z]_+ = \max(z, 0)$ . For each sample $f^a$ in the set $\mathcal{F}$ , we select the hardest positive sample $f^p$ and the hardest negative samples $f^n$ within the batch in the same way as [11]. The triplet loss forces intra-class samples closer and inter-class samples farther. As a result, the cross-entropy and triplet losses help the encoder to clearly disentangle ID-discriminative factors and ID-excluded factors from RGB-IR images. + +End-to-end training. As a summary, the overall loss for our Hi-CMD method is expressed as follows: + +$$ +\mathcal {L} = \mathcal {L} ^ {\text {r e c o n}} + \lambda_ {k l} \mathcal {L} ^ {k l} + \lambda_ {a d v} \mathcal {L} ^ {a d v} + \lambda_ {c e} \mathcal {L} ^ {c e} + \lambda_ {\text {t r i p}} \mathcal {L} ^ {\text {t r i p}}, \tag {10} +$$ + +where $\lambda_{kl},\lambda_{adv},\lambda_{ce}$ , and $\lambda_{trip}$ are hyperparameters to control the relative importance of loss terms. We train the whole network to optimize the total loss in an end-to-end manner. For adversarial learning, we alternatively train the parameters of discriminators and the remaining parameters. + +# 3.4. Discussion + +We compare Hi-CMD with the most related disentanglement approach DG-Net [43]. DG-Net is similar to our proposed Hi-CMD in that both methods combine an image generation network with a discriminative learning module in an end-to-end manner. However, the disentangled elements and the feature vectors used for person ReID are entirely different. While DG-Net decomposes each RGB image into appearance and structure codes, our Hi-CMD hierarchically disentangles ID-discriminative factors and ID-excluded factors including pose and illumination attributes from RGB-IR images. In addition, DG-Net only uses an appearance code where color information is vital to distinguish people. However, since this factor is not feasible in the VI-ReID task, we manage the ID-discriminative information between RGB-IR images by hierarchical disentanglement. This hierarchical approach is more useful for extracting the common ID-discriminative feature. + +# 4. Experiments + +# 4.1. Datasets and Settings + +Datasets. Extensive experiments were conducted on two widely used VI-ReID datasets, RegDB [21] and SYSUMM01 [33]. We followed the RegDB evaluation protocol in [37, 39] and the SYSU-MM01 evaluation protocol + +
DatasetsRegDB [21]SYSU-MM01 [33]
MethodsR=1R=10mAPR=1R=10mAP
HOG [3]13.4933.2210.312.7618.254.24
LOMO [15]0.852.472.281.7514.143.48
MLBP [16]2.027.336.772.1216.233.86
GSM [17]17.2834.4715.065.2933.718.00
SVDNet [27]17.2434.1219.0414.6453.2815.17
PCB [28]18.3236.4220.1316.4354.0616.26
One stream [33]13.1132.9814.0212.0449.6813.67
Two stream [33]12.4330.3613.4211.6547.9912.85
Zero padding [33]17.7534.2118.9014.8054.1215.95
TONE [37]16.8734.0314.9212.5250.7214.42
TONE+HCML [37]24.4447.5320.8014.3253.1616.16
BCTR [39]32.6757.6430.9916.1254.9019.15
BDTR [39]33.4758.4231.8317.0155.4319.66
eBDTR alex) [38]34.6258.9633.4622.4264.6124.11
eBDTR(resnet) [38]31.8356.1233.1827.8267.3428.42
cmGAN [2]---26.9767.5127.80
D2RL [31]43.4066.1044.1028.9070.6029.20
HSME [9]41.3465.2138.8218.0358.3119.98
D-HSME [9]50.8573.3647.0020.6862.7423.12
Ours (Hi-CMD)70.9386.3966.0434.9477.5835.94
+ +Table 1. Comparison with the state-of-the-arts on RegDB and SYSU-MM01 datasets. Re-identification rates $(\%)$ at rank $R$ and mAP $(\%)$ . $1^{st}$ and $2^{nd}$ best results are indicated by red and blue color, respectively. + +in [33]. The RegDB dataset consists of 2,060 visible images and 2,060 far-infrared images with 206 identities for training. The testing set contains 206 identities with 2,060 visible images for the query and 2,060 far-infrared images for the gallery. We repeated 10 trials with a random split to achieve statistically stable results. The SYSU dataset contains 22,258 visible images and 11,909 near-infrared images of 395 identities for training. The testing set includes 96 identities with 3,803 near-infrared images for the query and 301 visible images as the gallery set. The SYSU dataset is collected by six cameras (four visible and two near-infrared), including indoor and outdoor environments. We adopted the most challenging single-shot all-search mode and repeated the above evaluation 10 trials with a random split of the gallery and probe set. + +Evaluation metrics. Two popular evaluation metrics are adopted: Cumulative Matching Characteristic (CMC) and mean Average Precision (mAP). The rank- $k$ identification rate in the CMC curve indicates the cumulative rate of true matches in the top- $k$ position. The other evaluation metric is the mean average precision (mAP), considering person re-identification as a retrieval task. + +Implementation details. Our method is implemented with the Pytorch framework on an NVIDIA Titan Xp GPU. Visible and infrared images are resized to $256 \times 128 \times 3$ . Each mini-batch contains 4 pairs of visible and infrared images with different identities. The reconstruction parameters $\lambda_1, \lambda_2, \lambda_3, \lambda_4$ in (5) were set to 50, 50, 50, 10, respectively. The parameters $\lambda_{kl}, \lambda_{adv}, \lambda_{ce}, \lambda_{trip}$ in (10) were set to 1, 20, 1, 1, respectively. We used Stochastic Gradient + +![](images/7f839b1b2899e74013f1b0b030969ddf31df1ee01578793051dfba85580c1513.jpg) +Figure 4. Qualitative comparison between image generation networks for various loss combinations on RegDB and SYSU-MM01. Zoom in for best view. + +Descent with the learning rate 0.001 and momentum 0.9 to optimize the HFL module. We adopted the Adam optimizer [14] with the learning rate 0.0001 for the ID-PIG network. The ID-PIG framework is modified based on MUNIT [12] and the feature embedding network $H$ is based on ResNet50 [10] pretrained on ImageNet [4]. For more details, please refer to the supplementary material. + +# 4.2. Comparison with State-of-the-art Methods + +Comparison with conventional methods. We compare our method with conventional methods, which are not designed for VI-ReID. Feature extraction (HOG [3], LOMO [15], MLBP [16]), cross-domain matching (GSM [17]), and RGB-based person ReID (SVDNET [27], PCB [28]) methods are included for comparison. Table 1 shows that all methods have relatively poor performance. Although the PCB method achieves high performance in single-modality person ReID, a significant performance drop is inevitable in the VI-ReID task. Note that a pixel-level difference between visible and infrared images is challenging to deal with at the feature-level representation. + +Comparison with state-of-the-arts. We compare our method with the state-of-the-art methods in VI-ReID. The competing methods include feature learning frameworks (one-stream, two-stream, zero-padding [33], and TONE [37]), ranking losses (BCTR [39], BDTR [39], eBDTR [38]), metric learning (HCML [37], HSME [9], D-HSME [9]), reducing distribution divergence (cmGAN [2]), and image generation (D2RL [31]) methods. Our model achieves $70.93\%$ rank-1 identification rate and $66.04\%$ mAP score on the RegDB dataset [21], and $34.94\%$ rank-1 identification rate and $35.94\%$ mAP score on the SYSUMM01 dataset [33]. Our method significantly outperforms the state-of-the-art VI-ReID methods on both the RegDB and SYSU-MM01 datasets. This comparison indicates the effectiveness of our disentanglement approach for bridging the cross-modality and intra-modality gaps. Moreover, this improvement in performance can be analyzed by the visualization of ID-discriminative factors, which is discussed in Section 4.4. + +![](images/60b809d855de5858e565b0fee97c7041e10697edfb06515536c55c15efa65d3d.jpg) +Figure 5. The distribution of the Euclidean distance between cross-modality (RGB-IR) features. The intra-class and inter-class distances are indicated by red and green color, respectively. + +
MethodsRegDBSYSU-MM01
Input setLossFeatureR=1mAPR=1mAP
OriginalCEA+P36.3633.4718.6519.49
OriginalCE+TRIPA15.3315.376.057.74
OriginalCE+TRIPP49.0245.7522.5123.73
OriginalCE+TRIPA+P53.2549.5329.1930.53
AlternateCE+TRIPA+P70.9366.0434.9435.94
+ +Table 2. Component analysis of our HFL module on RegDB and SYSU-MM01 datasets. $A$ and $P$ represent the style attribute code and the prototype code respectively, which are used to train HFL. + +# 4.3. Further Evaluations and Analysis + +Impact of image generation losses. We performed an ablation study of our ID-preserving Person Image Generation (ID-PIG) network. To evaluate image generation losses qualitatively, we compare four variations of ID-PIG: 1) our best model with all components; 2) removing the reconstruction loss $\mathcal{L}_{\text{recon}}^{\text{same}}$ ; 3) removing the disentanglement loss $\mathcal{L}_{\text{recon}}^{\text{cross}}$ ; 4) removing the adversarial loss $\mathcal{L}^{\text{adv}}$ . The network structure and training strategy remain the same for all settings. Figure 4 shows the results of this image translation experiment. The samples are randomly selected from the testing set. We observe that the generated images can contain unpleasant artifacts such as blurriness or color shifts if one kind of loss is excluded from the training process. On the other hand, the results generated by our ID-PIG network with all components show more a realistic and sharp appearance regardless of the modalities are changed or not. + +Effectiveness of hierarchical feature learning. We study the several variants of the Hierarchical Feature Learning (HFL) module on both datasets to demonstrate the effectiveness of our hierarchical disentanglement approach. Figure 5 shows the distribution of the Euclidean distances between RGB-IR images from the testing set. Compared to the initial state, the HFL module based on an alternate sampling strategy minimizes the intra-class distance and maximizes the inter-class distance simultaneously. Moreover, as shown in Table 2, the use of the alternate sampling strategy + +![](images/89ca6073ef64d5c4974dfb31a44b5c0be72bda7ae1b9af9c35f341250374872f.jpg) +Figure 6. Examples of person image generation across two different swapping manners: (a) swapping ID-excluded factors; (b) swapping ID-discriminative factors. + +significantly improves performance compared to learning with the original image set. Our HFL method also achieves much higher performance than learning the style attribute code or the prototype code alone. These results prove that diverse code combinations by an alternate sampling strategy improve the discrimination ability and reduce the cross-modality gap significantly. + +# 4.4. Person Attribute Exploration + +Disentangling ID-discriminative and ID-excluded factors. In this section, we present image generation results by our ID-PIG network. To demonstrate that ID-discriminative factors and ID-excluded factors are clearly disentangled from RGB-IR images, we conducted two experiments: 1) swapping the ID-excluded factors of $x_{1}$ and $x_{2}$ with preserving ID-discriminative factors; 2) swapping the ID-discriminative factors of $x_{1}$ and $x_{2}$ with maintaining ID-excluded factors. The images in Fig. 6 (a) are changed to the pose and illumination attributes of the reference images, while the clothes and patterns of the input image are retained. The images in Fig. 6 (b) are synthesized with the clothes of the reference images, while maintaining the pose and illumination attributes of the input image. The visualization of ID-PIG proves that the shapes, patterns, and styles of clothes are important factors for cross-modality matching, which means that our novel hierarchical disentangle-ment approach can extract the common ID-discriminative feature effectively. + +Disentangling illumination and pose attributes. To demonstrate that our proposed system can manipulate pose and illumination attributes in ID-excluded factors independently, we conducted an experiment that changes illumination attribute codes while maintaining pose attribute codes, as shown in Fig. 7. Note that our adversarial loss enables the network to distinguish pose and illumination attributes + +![](images/933945a677a0ec24d2c520c245456ba9936b0184dcbc3ee554b458618de62b6e.jpg) +Figure 7. Examples of ID-excluded factor manipulation. + +![](images/d19c07405cb2fcb510c83fc208dd6fd9adc9c15be16dca37d5297184c97d0c22.jpg) +Figure 8. Examples of person image generation by linear interpolation of ID-excluded factors. + +in (7). This experiment shows that the pose can be transformed into other poses without any supervision of human pose estimation, unlike conventional pose generation methods [18, 22]. + +Interpolation of ID-excluded attributes. In this part, we validate that ID-excluded attributes of the generated images continuously change in the latent space. We extracted the ID-excluded attribute codes from a pair of images and obtained a series of attribute codes by linear interpolation. As shown in Fig. 8, the pose and illumination are changed smoothly from left to right. This experiment ensures that our ID-PIG can synthesize a lot of unseen poses or illuminations. + +# 5. Conclusion + +In this work, we have proposed a novel hierarchical cross-modality disentanglement method for VI-ReID. In contrast to previous studies, the proposed model reduces both cross- and intra-modality discrepancies at the same time by disentangling ID-discriminative factors and ID-excluded factors from visible-infrared images. Furthermore, our novel ID-preserving person image generation network provides resources to analyze cross-modality matching results and alleviates the problem of the insufficient data. Quantitative and qualitative evaluation on VI-ReID datasets demonstrates the superiority of our proposed method over the state-of-the-art methods. + +# References + +[1] Jianmin Bao, Dong Chen, Fang Wen, Houqiang Li, and Gang Hua. Towards open-set identity preserving face synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6713-6722, 2018. 3 +[2] Pingyang Dai, Rongrong Ji, Haibin Wang, Qiong Wu, and Yuyu Huang. Cross-modality person re-identification with generative adversarial training. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pages 677–683, 2018. 2, 6, 7 +[3] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. 2005. 6, 7 +[4] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 248-255. IEEE, 2009. 7 +[5] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 994–1003, 2018. 2 +[6] Yixiao Ge, Zhuowan Li, Haiyu Zhao, Guojun Yin, Shuai Yi, Xiaogang Wang, et al. Fd-gan: Pose-guided feature distilling gan for robust person re-identification. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), pages 1222–1233, 2018. 2 +[7] Abel Gonzalez-Garcia, Joost van de Weijer, and Yoshua Bengio. Image-to-image translation for cross-domain disentanglement. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), pages 1287-1298, 2018. 3 +[8] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), pages 2672–2680, 2014. 2, 5 +[9] Yi Hao, Nannan Wang, Jie Li, and Xinbo Gao. Hsme: Hypersphere manifold embedding for visible thermal person re-identification. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), volume 33, pages 8385–8392, 2019. 2, 6, 7 +[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 (CVPR), pages 770-778, 2016. 7 +[11] Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. 6 +[12] 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. 3, 7 +[13] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4401-4410, 2019. 3 + +[14] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 7 +[15] Shengcai Liao, Yang Hu, Xiangyu Zhu, and Stan Z Li. Person re-identification by local maximal occurrence representation and metric learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2197–2206, 2015. 6, 7 +[16] Shengcai Liao and Stan Z Li. Efficient psd constrained asymmetric metric learning for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 3685–3693, 2015. 6, 7 +[17] Liang Lin, Guangrun Wang, Wangmeng Zuo, Xiangchu Feng, and Lei Zhang. Cross-domain visual matching via generalized similarity measure and feature learning. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 39(6):1089-1102, 2016. 6, 7 +[18] Jinxian Liu, Bingbing Ni, Yichao Yan, Peng Zhou, Shuo Cheng, and Jianguo Hu. Pose transferrable person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4099–4108, 2018. 2, 8 +[19] Jiawei Liu, Zheng-Jun Zha, Di Chen, Richang Hong, and Meng Wang. Adaptive transfer network for cross-domain person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7202–7211, 2019. 2 +[20] Liqian Ma, Qianru Sun, Stamatios Georgoulis, Luc Van Gool, Bernt Schiele, and Mario Fritz. Disentangled person image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 99-108, 2018. 3 +[21] Dat Nguyen, Hyung Hong, Ki Kim, and Kang Park. Person recognition system based on a combination of body images from visible light and thermal cameras. Sensors, 17(3):605, 2017. 6, 7 +[22] 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 Proceedings of the European Conference on Computer Vision (ECCV), pages 650–667, 2018. 2, 8 +[23] M Saquib Sarfraz and Rainer Stiefelhagen. Deep perceptual mapping for cross-modal face recognition. International Journal of Computer Vision (IJCV), 122(3):426-438, 2017. 2 +[24] Krishna Kumar Singh, Utkarsh Ojha, and Yong Jae Lee. Finegan: Unsupervised hierarchical disentanglement for fine-grained object generation and discovery. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6490-6499, 2019. 3 +[25] Jifei Song, Yongxin Yang, Yi-Zhe Song, Tao Xiang, and Timothy M Hospedales. Generalizable person re-identification by domain-invariant mapping network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 719–728, 2019. 1 +[26] Sijie Song, Wei Zhang, Jiaying Liu, and Tao Mei. Unsupervised person image generation with semantic parsing trans + +formation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2357-2366, 2019. 1, 2 +[27] Yifan Sun, Liang Zheng, Weijian Deng, and Shengjin Wang. Svdnet for pedestrian retrieval. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 3800-3808, 2017. 2, 6, 7 +[28] 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 Proceedings of the European Conference on Computer Vision (ECCV), pages 480-496, 2018. 2, 6, 7 +[29] Luan Tran, Xi Yin, and Xiaoming Liu. Disentangled representation learning gan for pose-invariant face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1415-1424, 2017. 3 +[30] Hao Wang, Dihong Gong, Zhifeng Li, and Wei Liu. Decorated adversarial learning for age-invariant face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3527-3536, 2019. 3 +[31] Zhixiang Wang, Zheng Wang, Yinqiang Zheng, Yung-Yu Chuang, and Shin'ichi Satoh. Learning to reduce dual-level discrepancy for infrared-visible person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 618–626, 2019. 2, 6, 7 +[32] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 79–88, 2018. 2 +[33] Ancong Wu, Wei-Shi Zheng, Hong-Xing Yu, Shaogang Gong, and Jianhuang Lai. Rgb-infrared cross-modality person re-identification. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 5380-5389, 2017. 1, 2, 6, 7 +[34] Xuezhi Xiang, Ning Lv, Zeting Yu, Mingliang Zhai, and Abdulmotaleb El Saddik. Cross-modality person re-identification based on dual-path multi-branch network. IEEE Sensors Journal, 2019. 1 +[35] Qize Yang, Hong-Xing Yu, Ancong Wu, and Wei-Shi Zheng. Patch-based discriminative feature learning for unsupervised person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3633–3642, 2019. 1 +[36] Wenjie Yang, Houjing Huang, Zhang Zhang, Xiaotang Chen, Kaiqi Huang, and Shu Zhang. Towards rich feature discovery with class activation maps augmentation for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1389–1398, 2019. 1 +[37] Mang Ye, Xiangyuan Lan, Jiawei Li, and Pong C Yuen. Hierarchical discriminative learning for visible thermal person re-identification. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2018. 2, 6, 7 +[38] Mang Ye, Xiangyuan Lan, Zheng Wang, and Pong C Yuen. Bi-directional center-constrained top-ranking for vis- + +ible thermal person re-identification. IEEE Transactions on Information Forensics and Security, 2019. 2, 6, 7 +[39] Mang Ye, Zheng Wang, Xiangyuan Lan, and Pong C Yuen. Visible thermal person re-identification via dual-constrained top-ranking. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pages 1092–1099, 2018. 2, 6, 7 +[40] Zelong Zeng, Zhixiang Wang, Zheng Wang, Yung-Yu Chuang, and Shin'ichi Satoh. Illumination-adaptive person re-identification. arXiv preprint arXiv:1905.04525, 2019. 3 +[41] Ziyuan Zhang, Luan Tran, Xi Yin, Yousef Atoum, Xiaoming Liu, Jian Wan, and Nanxin Wang. Gait recognition via disentangled representation learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4710-4719, 2019. 3 +[42] Meng Zheng, Srikrishna Karanam, Ziyan Wu, and Richard J Radke. Re-identification with consistent attentive siamese networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5735–5744, 2019. 1 +[43] Zhedong Zheng, Xiaodong Yang, Zhiding Yu, Liang Zheng, Yi Yang, and Jan Kautz. Joint discriminative and generative learning for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2138-2147, 2019. 4, 6 +[44] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 2223-2232, 2017. 4 +[45] Zhen Zhu, Tengteng Huang, Baoguang Shi, Miao Yu, Bofei Wang, and Xiang Bai. Progressive pose attention transfer for person image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2347-2356, 2019. 1, 2 \ No newline at end of file diff --git a/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/images.zip b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ba977acc961006edb35dc32737f101b81546666f --- /dev/null +++ b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af2e492f3907531a476aac902de336a3553f7169ceb72a2be166e1a4020187ef +size 682130 diff --git a/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/layout.json b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..748aab73c92c59c0448e4a146878f62ba476945d --- /dev/null +++ b/hicmdhierarchicalcrossmodalitydisentanglementforvisibleinfraredpersonreidentification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0638faa57a95ae43da69c2425a65cc33f4c768939ac22e98de3ac52ce50bfa5c +size 409209 diff --git a/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_content_list.json b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..53a5a31c12fae00c9fdf74a04d1d21b99b57d403 --- /dev/null +++ b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abc904621a76029a1c75da57840670c3e2b6812b9cb5021d8f498d341e363bc8 +size 62662 diff --git a/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_model.json b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fe1d81b0fb072d392e2753c2372ee30293651503 --- /dev/null +++ b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e3a5a800eb5e61c2b532d3ee5de3457391f6f88afb7a41bd97e0b5d3b711449 +size 80062 diff --git a/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_origin.pdf b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9b0b0955041a7470264fa101e4bae7ea857bc78a --- /dev/null +++ b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/4445902c-0781-4029-a2a5-ae0891b685f6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:531d299ad00b596793546ff56a349032b74af6b1620acb77f93d61b194c7442a +size 606802 diff --git a/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/full.md b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..68656f692957d78b07283df374f3cdbe15a9988d --- /dev/null +++ b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/full.md @@ -0,0 +1,249 @@ +# Hierarchical Clustering with Hard-batch Triplet Loss for Person Re-identification + +Kaiwei Zeng $^{1}$ , Munan Ning $^{2}$ , Yaohua Wang $^{3*}$ , Yang Guo $^{4*}$ +National University of Defense Technology Changsha, China + +1zengkaiwei1997@gmail.com, 2munanning@gmail.com, 3nudthy@gmail.com, 4guoyang@nudt.edu.cn + +# Abstract + +For clustering-guided fully unsupervised person re-identification (re-ID) methods, the quality of pseudo labels generated by clustering directly decides the model performance. In order to improve the quality of pseudo labels in existing methods, we propose the HCT method which combines Hierarchical Clustering with hard-batch Triplet loss. The key idea of HCT is to make full use of the similarity among samples in the target dataset through hierarchical clustering, reduce the influence of hard examples through hard-batch triplet loss, so as to generate high quality pseudo labels and improve model performance. Specifically, (1) we use hierarchical clustering to generate pseudo labels, (2) we use PK sampling in each iteration to generate a new dataset for training, (3) we conduct training with hard-batch triplet loss and evaluate model performance in each iteration. We evaluate our model on Market-1501 and DukeMTMC-reID. Results show that HCT achieves $56.4\%$ mAP on Market-1501 and $50.7\%$ mAP on DukeMTMC-reID which surpasses state-of-the-arts a lot in fully unsupervised re-ID and even better than most unsupervised domain adaptation (UDA) methods which use the labeled source dataset. Code will be released soon on https://github.com/zengkaiwei/HCT + +# 1. Introduction + +Person re-identification (re-ID) is mainly used to match pictures of the same person that appears in different cameras, which is usually used as an auxiliary method of face recognition to identify pedestrian information. Currently, re-ID has been widely used in the field of security and has been the focus of academic research. With the development of convolutional neural networks (CNN), supervised re-ID [9, 11, 21, 25, 30, 2, 31, 23] has achieved excellent performance. However, due to the data deviation in different + +![](images/b1c1b4de5cfbc0414f004ac77279068b37289fc5356e70ae5ba1faa665a15b2c.jpg) +Figure 1. Hierarchical clustering. Each circle represents a sample, and the step represents the current merging stage. We use a bottom-up method to merge clusters step by step according to the distance between clusters in the current step. + +datasets, the performance of the model trained on the source domain will significantly decline when it is directly transferred to the target domain. Besides, supervised learning requires a large amount of manually annotated data, which is costly in real life. Therefore, supervised re-ID is difficult to meet the requirement of practical application and people tend to focus on unsupervised re-ID. + +Recently, people pay more attention on unsupervised reID and achieve good progress. Some works focus on unsupervised domain adaptation (UDA). UDA usually needs manually annotated source data and unlabeled target data. + +In UDA, some people use GAN to transform the style of images in the source domain to the style of the target domain [4, 27, 38, 15]. They keep labels unchanged, then they conduct training on generated labeled images. Others focus on the change of images between different cameras and datasets. They identify images by learning differences between the source domain and the target domain [36]. Although the expansion of the dataset will generate many reliable data, it is highly dependent on the quality of generated images. Besides, it will also generate some awful images, which will mislead the training and affect model performance. More importantly, these UDA methods only try to reduce differences between the target domain and source domain. However, similarities of images within the target domain are ignored. Besides, UDA methods need a labeled source dataset which still cost a lot. + +In recent studies, a fully unsupervised method BUC is proposed [14] and it does not use any manually labeled dataset. BUC only compares the similarity of images in the target dataset and directly use the bottom-up hierarchical clustering to merge samples. BUC merges a fixed number of clusters, updates pseudo labels, and fine-tunes the model step by step until convergence. Finally, it achieves good performance and even surpasses some methods of UDA [4, 6, 26]. However, the performance of BUC has a significant drop in later merging steps. Because BUC just relies on similarities among samples in merging, it makes BUC difficult to distinguish hard examples, especially in early merging steps when the model is poor. Hard examples mean those similar samples but have different identities. Their features are close to each other in high dimensional space so it is difficult to distinguish them by clustering and they will lead to wrong merging. In the later, these wrong merging will generate lots of false pseudo labels which mislead training and result in a decline in performance. + +In order to solve these problems and make full use of the similarity of images in the target dataset, we propose HCT, which also a fully unsupervised method just uses the target dataset without any manually annotated labels. The process of hierarchical clustering is shown in Figure 1. In the beginning, we regard each sample as a cluster which has different identities, and then we select a fixed number of clusters for merging in each step according to the distance between clusters. Finally, all clusters will be merged gradually and we set pseudo labels according to clustering results. After clustering, we use hard-batch triplet loss [9] to optimize the model. Hard-batch triplet loss can reduce the distance between similar samples and increase the distance between different samples. It can effectively reduce the influence of hard examples. Specifically, (1) we use hierarchical clustering to merge samples and generate pseudo-labels according to clustering results, (2) we randomly select K instances from P identities (PK sampling) to generate a new + +dataset for training to meet the need of hard-batch triplet loss, (3) we fine-tune the model and evaluate model performance. We repeat the process of clustering, PK sampling, fine-tuning training, evaluation until the model reaches convergence. + +To summarize, our contributions are: + +- We propose a fully unsupervised re-ID method HCT. Based on pre-trained ResNet-50[8] on ImageNet, we directly use pseudo labels generated by hierarchical clustering as supervision to conduct model training on the target dataset without any manually annotated labels. +- We use PK sampling to generate a new dataset for training after hierarchical clustering in each iteration. Compared to using the whole datasets, PK sampling meets the need of hard-batch triplet loss[9] which can reduce the influence of hard examples and improve model performance. +- To correct false pseudo labels, we initialize all pseudo labels at the beginning of each iteration until the quality of pseudo labels stabilizes and the model performance no longer improves. +- We evaluate our method on Market-1501 and DukeMTMC-reID. Extensive experiments show that our method surpass state-of-the-arts a lot in fully unsupervised re-ID, even better than most UDA methods. + +# 2. Related Work + +# 2.1. Unsupervised Domain Adaptation Re-ID + +In the past, people tend to use traditional manual features [1, 13] to conduct unsupervised domain adaptation, but the performance on large datasets is usually poor. With the popular of CNN, people begin to apply deep learning to unsupervised domain adaptation. + +Deng et al. put forward SPGAN [4]. They believe that the main reason for the poor performance of direct transfer is the different camera styles of different datasets. They use CycleGAN [38] to translate images styles from the source domain to the target domain while keeping image labels unchanged. Finally, they perform supervised learning on generated images. Zhong et al. propose ECN [37], ECN focuses on exemplar-invariance [28, 29], camera-invariance [36], and neighborhood-invariance [3]. Based on these, ECN separately sets triplet loss to increase the distance between different samples and reduce the distance between similar samples. ECN stores samples in the exemplar memory model [18, 24] and sets pseudo labels according to it. + +![](images/3e947050c5466589f2c9b087ed8640a179e26a545064f38039007b776fc1c7bb.jpg) +Figure 2. The structure of our HCT. Different colors represents different pseudo labels. We use pre-trained ResNet-50 [8] on ImageNet as our backbone. The input of HCT are unlabeled target images. + +Finally, ECN also conducts training according to pseudo labels and get good performance. + +In addition to set pseudo labels as supervision, people also try to use models to learn some auxiliary information to improve generalization ability. Zhong et al. propose HHL [36]. HHL improves model performance through camera-invariance and domain connectivity. Xiao et al. propose EANet [10]. EANet proposes Part Aligned Pooling (PAP) and Part Segmentation Constraint (PSC). PAP cuts and aligns images according to the key points of the body posture. PSC enables the model to predict labels of different part about feature map and locate the corresponding position of each part accurately. EANet combines PAP with PSC to make full use of pedestrians pose segmentation information to improve performance. + +Although these methods have achieved some improvements, most of them only focus on the difference between the source domain and the target domain. However, they do not fully explore the similarity of images in the target domain. + +# 2.2. Clustering-guided Re-ID + +Clustering-guided re-ID is usually trained with pseudo labels generated by clustering, which can be divided into clustering-guided domain adaptation and clustering-guided fully unsupervised re-ID. + +For clustering-guided domain adaptation, Hehe et al. [6] propose PUL. PUL gets the pre-trained model through training on the labeled source dataset, then uses CNN to fine-tune the model and uses K-means to cluster samples. At the + +beginning of training, PUL only selects a part of reliable samples which close to the clustering centroid for training to avoid falling into local optimum. As the model becomes better, more samples will be selected. This strategy effectively promotes the convergence of the model and improves performance. However, K-means is very sensitive to the k value. Besides, as a partition based clustering method, clustering centroids are easily dragged by outliers, it will generate lots of false pseudo labels which seriously affect the optimization of the model and ultimately limit model performance. + +For clustering-guided fully unsupervised re-ID, Lin et al. propose BUC [14]. BUC does not use any labeled source data, only use unlabeled target data and pre-trained model on ImageNet instead of other re-ID dataset. BUC extracts image features with CNN, then merges a fixed number of clusters according to the distance between clusters in each step. After merging, BUC fine-tunes the model with generated pseudo labels, repeats the progress of merging and fine-tuning until the model performance no longer improves. However, the performance of BUC has a significant drop in later merging steps. That is due to the poor pre-trained model in the beginning and some hard examples in the target dataset. BUC cannot solve the problem of false pseudo labels, which will affect the optimization of the model. These false pseudo labels have a superposition effect in later merging steps and result in a significant performance drop in the end. In this paper, we aim to further improve the quality of pseudo labels and get better performance than these methods. + +# 3. Our Method + +# 3.1. Hierarchical Clustering with Hard-batch Triplet Loss + +Our network structure is shown in Figure 2. The model is mainly divided into three stages: hierarchical clustering, PK sampling, and fine-tuning training. We extract image features to form a sample space and cluster samples step by step according to the bottom-up hierarchical clustering in Figure 1. After hierarchical clustering, we label samples in the same cluster with the same pseudo label. Finally, we use PK sampling to generate a new dataset for training according to clustering results. Our goal is to explore similarities among images in the target dataset through hierarchical clustering, distinguish hard examples through hard-batch triplet loss, and generate pseudo labels to guide model training in the end. Compared to other methods, our HCT can further improve the quality of pseudo labels and finally get better model performance. + +For a dataset $X = \{x_{1}, x_{2}, \dots, x_{N}\}$ , we will have manually annotated labels $Y = \{y_{1}, y_{2}, \dots, y_{n}\}$ in supervised learning, so we can directly use cross-entropy loss to optimize the model. However, we do not have any manually annotated labels in fully unsupervised re-ID, so we need to generate pseudo labels as supervision instead of using manually annotated labels. Although hierarchical clustering can fully explore the similarity of samples, build the underlying structure through a bottom-up clustering and generate some good pseudo labels. But due to the deficiency of hierarchical clustering, this strategy cannot effectively distinguish hard examples and will generate lots of false pseudo labels in merging. These false pseudo labels will mislead the optimization of model and limit model performance. + +In order to solve this problem, HCT uses hard-batch triplet loss with PK sampling to reduce the distance between similar samples and increase the distance between different samples, which can better distinguish hard examples. Besides, we will initialize all pseudo labels at the beginning of each iteration so that we are able to correct all false pseudo labels generated in the previous iteration. Theoretically, as pseudo labels of hierarchical clustering are approaching manually annotated labels step by step, the model performance is approaching the baseline. Baseline represents the supervised learning method of hard-batch triplet loss. + +# 3.2. Distance Measurement + +For all clustering-guided re-ID [14, 6, 20], the quality of pseudo labels generated by clusters directly determines the performance of the model. For hierarchical clustering, the distance measurement method used in the merging stage decide how we choose clusters to merge and finally affects the clustering result and pseudo labels. + +BUC [14] uses the minimum distance as the distance + +measurement in the merging stage. Minimum distance only calculates one pair of the nearest pairwise distance in two clusters. That is not a good method because it ignores other samples in clusters. Especially when there are lots of samples in a cluster, minimum distance is easily influenced by outliers and finally results in wrong merging and false pseudo labels. To improve the distance measurement and finally get a better result, we should consider the pairwise distance of all the samples in two clusters. + +In HCT, we use euclidean distance to measure the distance between each sample. Then, according to the unweighted average linkage clustering (unweighted pair-group method with arithmetic means, UPGMA) [19], we define the distance between clusters as: + +$$ +D _ {a b} = \frac {1}{n _ {a} n _ {b}} \sum_ {i \in C _ {a}, j \in C _ {b}} D \left(C _ {a _ {i}}, C _ {b _ {j}}\right) \tag {1} +$$ + +where $C_{a_i}, C_{b_j}$ are two samples in the cluster $C_a, C_b$ respectively. $n_a, n_b$ represent the number of samples in $C_a, C_b$ , $D(\cdot)$ means the euclidean distance. UPGMA takes into account all the pairwise distance between two clusters and each pairwise distance has the same weight. It effectively reduces the influence of outliers in sample space, promote more rational merging and finally get better results compared to other distance measurement according to discussion in [5]. + +# 3.3. Loss Function + +Hard-batch triplet loss [9] is proposed to mine the relationship between anchor with positive sample and negative sample, which can reduce the distance between similar samples and increase the distance between different samples. In order to use hard-batch triplet loss in HCT, we use PK sampling to generate a new dataset for training. Specifically, We randomly select K instances from P identities for each mini-batch (batchsize $= \mathrm{P}\times \mathrm{K}$ ). So our loss is defined as: + +$$ +\begin{array}{l} L _ {t r i p l e t} = \sum_ {i = 1} ^ {P} \sum_ {a = 1} ^ {K} \left[ m + \overbrace {\max _ {p = 1 \dots K} D \left(x _ {a} ^ {i} , x _ {p} ^ {j}\right)} ^ {\text {h a r d e s t p o s i t i v e}} \right. \\ \left. - \underbrace {\min _ {\substack {j = 1 \dots P \\ n = 1 \dots N}} D \left(x _ {a} ^ {i} , x _ {n} ^ {j}\right)} _ {\text {hardest negative}} \right] \tag{2} \\ \end{array} +$$ + +where $x_{a}^{i}$ is the anchor, $x_{p}^{j}$ is the positive sample which has the same identity as $x_{a}^{i}$ , $x_{n}^{j}$ is the negative sample which identity is different from $x_{a}^{i}$ . $D(\cdot)$ means the euclidean distance and $m$ is the hyperparameter margin in hard-batch triplet loss. Hard-batch triplet loss makes sure that give an anchor $x_{a}^{i}$ , $x_{p}^{j}$ is closer to $x_{a}^{i}$ than $x_{n}^{j}$ . As a result, samples which have the same identity will be closer to + +each other than other samples which have different identities. In other words, these samples will form a cluster gradually in high dimensional space. So we can use hard-batch triplet loss to distinguish hard examples, promote better clustering, and improve model performance. + +# 3.4. Model Update + +As shown in the algorithm, we use pre-trained ResNet-50 [8] on ImageNet for training. For each iteration, at the beginning of hierarchical clustering, we regard $N$ samples as $N$ different identities and initialize all pseudo labels. We set a hyperparameter $mp$ to control the speed of the merging and a hyperparameter $s$ represents total merging steps of hierarchical clustering, $m = n \times mp$ represents the number of clusters merged in each step. We calculate all pairwise distance between samples in the target dataset and generate a $n \times n$ distance matrix $dist$ . According to $dist$ and UMPGA distance measurement in Eq.(1), we generate a $c \times c$ distance matrix $D$ , $D$ represents the distance between clusters in each step, $c$ represents the current number of clusters. We will merge $m$ pairs of nearest clusters in each step until the $s-th$ step and generate pseudo labels according to the clustering result. Specifically, we regard samples in the same cluster have the same pseudo labels. Then we use PK sampling to generate a new dataset as the input of CNN, we conduct fine-tuning training with the new dataset and evaluate model performance in the end. We regard hierarchical clustering, PK sampling, fine-tuning training and evaluation as one iteration. We iterate the model until the performance no longer improves. + +# 4. Experiment + +# 4.1. Datasets + +Market-1501 Market1501 [33] includes 32,668 images of 1501 pedestrians captured by 6 cameras. Each pedestrian is captured by at least two cameras. Market1501 can be divided into a training set which contains 12,936 images of 751 people and a test set which contains 19,732 images of 750 people. + +DukeMTMC-reID DukeMTMC-reID [34] is a subset of pedestrian re-identification dataset DukeMTMC [17]. DukeMTMC contains a 85 minutes high-resolution video, which is collected from eight different cameras. DukeMTMC-reID consists of 36411 labelled images belonging to 1404 identities which contains 16,522 images for training, 2,228 images for query, and 17,661 images for gallery. + +# 4.2. Implementation Details + +HCT Training Setting We directly use pre-trained ResNet [8] on ImageNet as our backbone. After clustering, we randomly selected $P = 16$ identities and $K = 4$ images + +Algorithm 1 HCT Algorithm +Require: Input $X = \{x_{1},x_{2},\dots ,x_{N}\}$ Merging percent $mp\in (0,1)$ Merging step s; Iteration t. + +Ensure: Best model $f(\pmb {w},x_i)$ +1: Initialize: sample number $n = N$ cluster number $c = n$ merging number $m = n\times mp$ iteration iter $= 0$ merging step step $= 0$ + +2: while iter $< t$ do +5: while step $< s$ do +3: Initialize pseudo labels: $Y = \{y_{i} = i\}_{i = 1}^{N}$ +4: Extract features, calculate the pairwise distance between each sample, and generate a $n \times n$ distance matrix dist; + +6: Calculate distance between each cluster according to Eq.(1), generate a $c \times c$ distance matrix $D$ ; + +7: Select clusters to merge according to $\pmb{D}$ and start to merge clusters: + +$$ +c = c - m; +$$ + +8: Update $Y$ with new pseudo labels: +9: end while +$Y = \{y_{i} = j,\quad \forall x_{i}\in C_{j}\}_{i = 1}^{N};$ +step $= \text{step} +1$ + +11: Fine-tuning model with the new dataset according to hard-batch triplet loss; +12: Evaluate model performance; +13: if $mAP_{i} > mAP_{best}$ then +14: $mAP_{best} = mAP_{i}$ +15: Best model $f(\pmb {w},x_i)$ +16: end if +17: iter = iter + 1; +18: end while +10: Generate a new dataset with PK sampling according to $Y$ ; + +to generate a new train dataset, so batchsize $= P \times K = 64$ . During the training, we adjust the size of the input image to $256 \times 128$ , we also use random cropping, flipping and random erasing for data augmentation [35]. We use SGD to optimize the model and set a momentum [22] of 0.9 without dampening. The learning rate is $6 \times 10^{-5}$ , the weight decay is 0.0005, iteration is 20, and margin is 0.5 in hard-batch triplet loss. In Market-1501, merging percent $mp$ is 0.07, merging step $s$ is 13, epoch is 60. Note that the model is easily to overfit and will have a significant drop in the later iteration, we adopt an early stop strategy to get best perfor + +
MethodsLabelsMarket-1501DukeMTMC-reID
rank-1rank-5rank-10mAPrank-1rank-5rank-10mAP
Baseline[20]Supervised91.6--78.280.8--65.4
Direct transferNone11.122.128.63.58.616.421.03.0
HCTNone80.091.695.256.469.683.487.450.7
+ +Table 1. Comparison with baseline and direct transfer on Market-1501 and DukeMTMC-reID. "Baseline" means supervised learning method about hard-batch triplet loss. "Direct transfer" means directly use pre-trained ResNet-50 on ImageNet to evaluate without any fine-tuning. The label column lists the type of supervision used by the method. "Supervised" means supervised learning, "None" denotes no any manually annotated labels are used, which is fully unsupervised learning. + +
MethodsLabelsMarket-1501DukeMTMC-reID
rank-1rank-5rank-10mAPrank-1rank-5rank-10mAP
UMDL[16]Transfer34.552.659.612.418.531.437.47.3
OIM[29]*None38.058.066.414.024.538.846.011.3
PUL[6]Transfer45.560.766.720.530.043.448.516.4
SPGAN[4]Transfer51.570.076.822.841.156.663.022.3
TJ-AIDL[26]Transfer58.274.881.126.544.359.665.023.0
HHL[36]Transfer62.278.884.031.446.961.066.727.2
BUC[14]None66.279.684.538.347.462.668.427.5
ARN[12]Transfer70.380.486.339.460.273.979.533.4
MAR[32]Transfer67.781.9-40.067.179.8-48.0
ECN[37]Transfer75.187.691.643.063.375.880.440.4
EANet[10]Transfer78.0--51.667.7--48.0
Theory[20]Transfer75.885.993.253.768.480.183.549.0
HCTNone80.091.695.256.469.683.487.450.7
+ +Table 2. Comparison with other unsupervised methods. The label column lists the type of supervision used by the method. "Transfer" means uses an manually annotated source dataset, which is UDA method. * means results are reported by [14]. Results that surpass all competing methods are bold. + +# mance. + +Evaluating Setting We use the single-shot setting [21] in all experiments. In evaluation, for an image in query, we calculate cosine distance with all gallery images and then sort it as the result. We use the mean average precision (mAP) [33] and the rank- $k$ accuracy to evaluate the performance of the model. Rank- $k$ emphasizes the accuracy, it means the query picture has the match in the top- $k$ list. Beside, mAP is computed from the Cumulated Matching Characteristics (CMC) [7]. CMC curve shows the probability that a query has the match in different size of lists. Given a single query, the Average Precision (AP) is computed according to its precision-recall curve, the mAP is the mean of AP. + +# 4.3. Ablation Study + +Comparison with Baseline and Direct Transfer In order to reflect the effect of our HCT, we compare HCT with a supervised learning method about hard-batch triplet loss and direct transfer from pre-trained ResNet-50 on ImageNet. Our results are reported in Table 1. The results for direct transfer and baseline represent the floor and upper + +limit of model performance. Theoretically, when the quality of our pseudo labels approach to manually annotated labels, HCT will gradually approach the baseline. + +We can see that the performance of direct transfer is very poor, only get $3.5\%$ mAP on Market-1501 and $3.0\%$ mAP on DukeMTMC-reID. That is because the model is pre-trained on ImageNet for a classification task which is completely different from re-ID task. HCT outperforms the direct transfer method by $52.9\%$ mAP on Market-1501 and $47.7\%$ mAP on DukeMTMC-reID. That is only less than supervised method baseline $21.8\%$ mAP and $14.7\%$ mAP respectively, which indicates that the quality of pseudo labels generated by HCT is very high, so our model performance is good. + +Effectiveness of HCT As shown in Table 2, we compare our HCT with other unsupervised methods. On Market-1501, we obtain rank-1 =80.9%, mAP =56.4%. On DukeMTMC-reID, we obtain rank-1 =69.6%, mAP =50.7%. HCT not only surpasses other fully unsupervised methods a lot, but also better than many UDA methods. Note that we do not use any manually labeled data for training, we just use unlabeled target data. Results indicate the + +
Merge stepMarket-1501
IDsepochrank-1mAP
s = 1220691572.246.2
s = 1311716080.056.4
s = 14258300××
+ +Table 3. Performance comparison with different merging steps on Market-1501. "IDs" means identities number, it also represent the number of clusters after hierarchical clustering. "Epoch" means the training epoch in each iteration. $\times$ " means the model is difficult to converge. + +
Merge percentMarket-1501
rank-1rank-5rank-10mAP
mp = 0.0479.690.994.655.3
mp = 0.0578.791.194.655.0
mp = 0.0678.191.194.254.3
mp = 0.0780.091.695.256.4
mp = 0.0877.090.494.153.0
mp = 0.0977.990.894.254.6
mp = 0.177.490.994.653.7
+ +Table 4. Performance comparison with different merging percents on Market-1501. + +importance of fully exploring the similarity of the samples in the target domain. Besides, it also proves that hard-batch triplet loss can effectively reduce the influence of hard examples, further improve the quality of pseudo labels, and get better performance. + +Comparison with Different Merging Steps In hierarchical clustering, merging step $s$ controls the termination of merging, determines clusters number, and finally affects the quality of pseudo labels. In order to get the best performance, we set $mp = 0.07$ and evaluate the impact of different $s$ on Market-1501. Our results are reported in Table 3. When we set $s = 14$ , we find the model is difficult to converge even if we set the training epoch very high. Market-1501 have 751 IDs in the training set, but now HCT only have 258 IDs. We believe that in the final merge step, hierarchical clustering will generate lots of awful clusters and false pseudo labels that cannot be optimized. So we should adopt an early stop strategy in hierarchical clustering. However, too small $s$ means too many IDs number of pseudo labels which will also cause problems. When we set $s = 12$ , we can see a significant decline on performance. So too early stop will reduce the performance of the model. Besides, we have to decrease the training epoch to 15, because we find a large epoch easily leads to overfitting when $s$ is too small. Finally, we get the best performance when we set $s = 13$ . + +Comparison with Different Merging Percents In hierarchical clustering, merging percent $mp$ controls the speed + +of merging. It decides the number of clusters merged in each step and finally affects generated pseudo labels. In order to get the best performance and evaluate the influence of $mp$ , we evaluate different $mp$ values on Market-1501. Based on discussion above, we adopt an early stop strategy in our experiments for the setting of $s$ in all experiments. In Table 4, we can see that when we set $mp = 0.07$ , we get the best performance. We believe that both too many and too few merging in each step will result in a decline of cluster quality. Besides, compared to change merging step $s$ , changing merging percent $mp$ only causes a slight change in performance. + +Qualitative Analysis of T-SNE Visualization As shown in Figure 3, we can see that BUC cannot effectively distinguish hard examples, so there are lots of False Positive samples in clusters. These False Positive samples are close to each other in high dimensional space and easily result in wrong merging in hierarchical clustering. Besides, the distribution of clustering results is dispersing and will generate many False Negative samples. Different from hard examples, these False Negative samples belong to the same identity. But they are not very close to each other in high dimensional space, so we cannot effectively use hierarchical clustering to merge them into one cluster. Our method HCT solves these problems and get better performance. We can see that HCT can promote more compact clustering, so the number of False Negative samples is greatly reduced. Besides, HCT can effectively distinguish hard examples, so the number of False Positive samples is also greatly reduced. These results illustrate the effectiveness of hard-batch triplet loss and the high quality of pseudo labels generated by HCT. In general, due to the significant improvement of clustering result, HCT surpasses a lot than other unsupervised methods. + +# 5. Conclusion + +In this paper, we propose a fully unsupervised re-ID method HCT. HCT directly use unlabeled dataset without using any manually annotated labels for training. We make full use of similarities between images in the target dataset through hierarchical clustering. We also effectively reduced the influence of hard examples in training by PK sampling and hard-batch triplet loss. Besides, we further improve the quality of generated pseudo labels through initializing pseudo labels and training alternately. Finally, as the quality of pseudo labels gradually improving, our model performance are improving step by step. Extensive experiments prove that HCT surpasses state-of-the-arts in fully unsupervised methods by a large margin, even better than most UDA methods. + +![](images/56becfc7210bbde0b08c0da8be11f3ce1a1983637027da9b168bb7524155389c.jpg) +Figure 3. T-SNE visualization of the feature representation on a subset of Market-1501 about BUC (100 identities and 1747images) and HCT (100 identities and 1656 images). Samples with the same color represent them have same real labels. True Positive means correct pseudo labels generated by model. False Positive means model generate the same pseudo label for images that belong to different identities in fact. False Negative means model generate different pseudo labels for images that belong to the same identity in fact. Both False Positive and False Negative will generate false pseudo labels which reduce the model performance. + +# 6. Acknowledgements + +We thank the reviewers for their feedback. We thank our group members for feedback and the stimulating intellectual environment they provide. This research was supported by The Science and Technology Planning Project of Hunan Province (No.2019RS2027) and National Key Research and Development Program of China (No.2018YFB0204301). + +# References + +[1] Loris Bazzani, Marco Cristani, and Vittorio Murino. Symmetry-driven accumulation of local features for human characterization and re-identification. Computer Vision and Image Understanding, 2013. +[2] Xiaobin Chang, Timothy M Hospedales, and Tao Xiang. Multi-level factorisation net for person re-identification. In CVPR, 2018. +[3] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In CVPR, 2018. +[4] 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. +[5] Guodong Ding, Salman Khan, Zhenmin Tang, Jian Zhang, and Fatih Porikli. Towards better validity: Dispersion based clustering for unsupervised person re-identification. arXiv preprint arXiv:1906.01308, 2019. +[6] Hehe Fan, Liang Zheng, Chenggang Yan, and Yi Yang. Unsupervised person re-identification: Clustering and finetuning. TOMM, 2018. +[7] Douglas Gray, Shane Brennan, and Hai Tao. Evaluating appearance models for recognition, reacquisition, and tracking. In Proc. IEEE International Workshop on Performance Evaluation for Tracking and Surveillance (PETS). CiteSeer, 2007. +[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] Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. +[10] Houjing Huang, Wenjie Yang, Xiaotang Chen, Xin Zhao, Kaiqi Huang, Jinbin Lin, Guan Huang, and Dalong Du. Eanet: Enhancing alignment for cross-domain person re-identification. arXiv preprint arXiv:1812.11369, 2018. + +[11] Wei Li, Rui Zhao, Tong Xiao, and Xiaogang Wang. Deepreid: Deep filter pairing neural network for person re-identification. In CVPR, 2014. +[12] Yu-Jhe Li, Fu-En Yang, Yen-Cheng Liu, Yu-Ying Yeh, Xiaofei Du, and Yu-Chiang Frank Wang. Adaptation and re-identification network: An unsupervised deep transfer learning approach to person re-identification. In CVPR, 2018. +[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 Proceedings of the AAAI Conference on Artificial Intelligence, 2019. +[15] 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. +[16] 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. +[17] 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. Springer, 2016. +[18] Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Meta-learning with memory-augmented neural networks. In ICML, 2016. +[19] R.R. Sokal, C.D. Michener, and University of Kansas. A Statistical Method for Evaluating Systematic Relationships. University of Kansas science bulletin. University of Kansas, 1958. +[20] Liangchen Song, Cheng Wang, Lefei Zhang, Bo Du, Qian Zhang, Chang Huang, and Xinggang Wang. Unsupervised domain adaptive re-identification: Theory and practice. arXiv preprint arXiv:1807.11334, 2018. +[21] 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. +[22] Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In ICML, 2013. +[23] Hui Tian, Xiang Zhang, Long Lan, and Zhigang Luo. Person re-identification via adaptive verification loss. Neurocomputing, 359:93–101, 2019. +[24] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NIPS, 2016. +[25] Guanshuo Wang, Yufeng Yuan, Xiong Chen, Jiwei Li, and Xi Zhou. Learning discriminative features with multiple granularities for person re-identification. In 2018 ACM Multimedia Conference on Multimedia Conference, 2018. +[26] Jingya Wang, Xiatian Zhu, Shaogang Gong, and Wei Li. Transferable joint attribute-identity deep learning for unsupervised person re-identification. In CVPR, 2018. + +[27] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In CVPR, 2018. +[28] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018. +[29] Tong Xiao, Shuang Li, Bochao Wang, Liang Lin, and Xiaogang Wang. Joint detection and identification feature learning for person search. In CVPR, 2017. +[30] Jing Xu, Rui Zhao, Feng Zhu, Huaming Wang, and Wanli Ouyang. Attention-aware compositional network for person re-identification. In CVPR, 2018. +[31] Jiaming Xu and En Zhu. Learning bias-free representation for large-scale person re-identification. IEEE Access, 7:143331-143346, 2019. +[32] 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. +[33] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In CVPR, 2015. +[34] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In Proceedings of the IEEE International Conference on Computer Vision, pages 3754–3762, 2017. +[35] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. arXiv preprint arXiv:1708.04896, 2017. +[36] Zhun Zhong, Liang Zheng, Shaozi Li, and Yi Yang. Generalizing a person retrieval model hetero-and homogeneously. In ECCV, 2018. +[37] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Invariance matters: Exemplar memory for domain adaptive person re-identification. In CVPR, 2019. +[38] 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/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/images.zip b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..13526766010ef4f6d9b10d511e8804761ce0682d --- /dev/null +++ b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ebd16f3e84f4a5f84398323969e97cf9d32b05aee873cb1c676ae03a80885ca +size 382390 diff --git a/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/layout.json b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..45ff0f6ba24d36c35cafaf48938a7bcd43ded489 --- /dev/null +++ b/hierarchicalclusteringwithhardbatchtripletlossforpersonreidentification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6d727b82021b1712d9d5ae19160c98e6cf634fb1320bcd826963f54063218e0 +size 334763 diff --git a/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_content_list.json b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a78e8753ba88614576ec39c2f88771001103aae7 --- /dev/null +++ b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52fc0389801bb3459726d85c8653e9b38a4f15152ce51ae29a212675046dd304 +size 80198 diff --git a/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_model.json b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_model.json new file mode 100644 index 0000000000000000000000000000000000000000..61f7ed572c8b95f70a54d2e3f8bdcdc17a111bc7 --- /dev/null +++ b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbf57602c5f0dad04455256150f4e7ace8f92dabe16794b9035b3453d5858599 +size 99742 diff --git a/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_origin.pdf b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cb18f6b7db9a2e8dfc8289e4afb189047b66727b --- /dev/null +++ b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/85bc205c-cdd5-4de1-8db0-c7280a546e80_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5012c99e318220d7d75d8a0dc53698d98c61325aa8604f9c9601ef139013ec8a +size 467090 diff --git a/hierarchicalconditionalrelationnetworksforvideoquestionanswering/full.md b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/full.md new file mode 100644 index 0000000000000000000000000000000000000000..797397b4336e2b0d8f6e067dcdbbc95b864e13aa --- /dev/null +++ b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/full.md @@ -0,0 +1,338 @@ +# Hierarchical Conditional Relation Networks for Video Question Answering + +Thao Minh Le, Vuong Le, Svetha Venkatesh, and Truyen Tran +Applied Artificial Intelligence Institute, Deakin University, Australia + +{lethao, vuong.le, svetha.venkatesh, truyen.tran}@deakin.edu.au + +# Abstract + +Video question answering (VideoQA) is challenging as it requires modeling capacity to distill dynamic visual artifacts and distant relations and to associate them with linguistic concepts. We introduce a general-purpose reusable neural unit called Conditional Relation Network (CRN) that serves as a building block to construct more sophisticated structures for representation and reasoning over video. CRN takes as input an array of tensorial objects and a conditioning feature, and computes an array of encoded output objects. Model building becomes a simple exercise of replication, rearrangement and stacking of these reusable units for diverse modalities and contextual information. This design thus supports high-order relational and multi-step reasoning. The resulting architecture for VideoQA is a CRN hierarchy whose branches represent sub-videos or clips, all sharing the same question as the contextual condition. Our evaluations on well-known datasets achieved new SoTA results, demonstrating the impact of building a general-purpose reasoning unit on complex domains such as VideoQA. + +# 1. Introduction + +Answering natural questions about a video is a powerful demonstration of cognitive capability. The task involves acquisition and manipulation of spatio-temporal visual representations guided by the compositional semantics of the linguistic cues [7, 17, 20, 30, 33, 36]. As questions are potentially unconstrained, VideoQA requires deep modeling capacity to encode and represent crucial video properties such as object permanence, motion profiles, prolonged actions, and varying-length temporal relations in a hierarchical manner. For VideoQA, the visual representations should ideally be question-specific and answer-ready. + +The current approach toward modeling videos for QA is to build neural architectures in which each sub-system is either designed for a specific tailor-made purpose or for a particular data modality. Because of this specificity, such hand crafted architectures tend to be non-optimal for changes in data modality [17], varying video length [24] or question + +types (such as frame QA [20] versus action count [6]). This has resulted in proliferation of heterogeneous networks. + +In this work we propose a general-purpose reusable neural unit called Conditional Relation Network (CRN) that encapsulates and transforms an array of objects into a new array conditioned on a contextual feature. The unit computes sparse high-order relations between the input objects, and then modulates the encoding through a specified context (See Fig. 2). The flexibility of CRN and its encapsulating design allow it to be replicated and layered to form deep hierarchical conditional relation networks (HCRN) in a straightforward manner. The stacked units thus provide contextualized refinement of relational knowledge from video objects – in a stage-wise manner it combines appearance features with clip activity flow and linguistic context, and follows it by integrating in context from the whole video motion and linguistic features. The resulting HCRN is homogeneous, agreeing with the design philosophy of networks such as InceptionNet [31], ResNet [9] and FiLM [27]. + +The hierarchy of the CRNs are as follows – at the lowest level, the CRNs encode the relations between frame appearance in a clip and integrate the clip motion as context; this output is processed at the next stage by CRNs that now integrate in the linguistic context; in the following stage, the CRNs capture the relation between the clip encodings, and integrate in video motion as context; in the final stage the CRN integrates the video encoding with the linguistic feature as context (See Fig. 3). By allowing the CRNs to be stacked hierarchically, the model naturally supports modeling hierarchical structures in video and relational reasoning; by allowing appropriate context to be introduced in stages, the model handles multimodal fusion and multi-step reasoning. For long videos further levels of hierarchy can be added enabling encoding of relations between distant frames. + +We demonstrate the capability of HCRN in answering questions in major VideoQA datasets. The hierarchical architecture with four-layers of CRN units achieves favorable answer accuracy across all VideoQA tasks. Notably, it performs consistently well on questions involving either appearance, motion, state transition, temporal relations, or action repetition demonstrating that the model can analyze and + +(a) Question: What does the girl do 9 times? +![](images/7d7f2ccb5c061153daf134e3b6fe6478d9cdb182da23f28ab8e67c98dd22e02c.jpg) +Baseline: walk +HCRN: blocks a person's punch +Ground truth: blocks a person's punch + +(b) Question: What does the man do before turning body to left? +Figure 1. Example questions for which frame relations are key toward correct answers. (a) Near-term frame relations are required for counting of fast actions. (b) Far-term frame relations connect the actions in long transition. HCRN with the ability to model hierarchical conditional relations handles successfully, while baseline struggles. See more examples in supplemental materials. +![](images/113203fa099cc2d1321887a1b9810d45df7e3f0c836d8cc234d5576ff2766e79.jpg) +Baseline: pick up the man's hand +HCRN: breath +Ground truth: breath + +combine information in all of these channels. Furthermore HCRN scales well on longer length videos simply with the addition of an extra layer. Fig. 1 demonstrates several representative cases those were difficult for the baseline of flat visual-question interaction but can be handled by our model. + +Our model and results demonstrate the impact of building general-purpose neural reasoning units that support native multimodality interaction in improving robustness and generalization capacities of VideoQA models. + +# 2. Related Work + +Our proposed HCRN model advances the development of VideoQA by addressing two key challenges: (1) Efficiently representing videos as amalgam of complementing factors including appearance, motion and relations, and (2) Effectively allows the interaction of such visual features with the linguistic query. + +Spatio-temporal video representation is traditionally done by variations of recurrent networks (RNNs) among which many were used for VideoQA such as recurrent encoder-decoder [49, 47], bidirectional LSTM [15] and two-staged LSTM [44]. To increase the memorizing ability, external memory can be added to these networks [7, 44]. This technique is more useful for videos that are longer [40] and with more complex structures such as movies [33] and TV programs [17] with extra accompanying channels such as speech or subtitles. On these cases, memory networks [15, 24, 35] were used to store multimodal features [36] for later retrieval. Memory augmented RNNs can also compress video into heterogenous sets [6] of dual appearance/motion features. While in RNNs, appearance and motion are modeled separately, 3D and 2D/3D hybrid convolutional operators [34, 28] intrinsically integrates spatio-temporal visual information and are also used for VideoQA [10, 20]. Multiscale temporal structure can be modeled by either mixing short and long term convolutional filters [37] or combining pre-extracted frame features non-local operators [32, 18]. Within the second approach, the TRN network [48] demonstrates the role of temporal frame relations as an another important visual feature for video reasoning and VideoQA [16]. Relations of predetermined objects were also considered + +in a separate processing stream [11] and combined with other modalities in late-fusion [29]. Our HCRN model emerges on top of these trends by allowing all three channels of video information namely appearance, motion and relations to iteratively interact and complement each other in every step of a hierarchical multi-scale framework. + +Earlier attempts for generic multimodal fusion for visual reasoning includes bilinear operators, either applied directly [13] or through attention [13, 43]. While these approaches treat the input tensors equally in a costly joint multiplicative operation, HCRN separates conditioning factors from refined information, hence it is more efficient and also more flexible on adapting operators to conditioning types. + +Temporal hierarchy has been explored for video analysis [22], most recently with recurrent networks [25, 1] and graph networks [23]. However, we believe we are the first to consider hierarchical interaction of multi-modalities including linguistic cues for VideoQA. + +Linguistic query-visual feature interaction in VideoQA has traditionally been formed as a visual information retrieval task in a common representation space of independently transformed question and referred video [44]. The retrieval is more convenient with heterogeneous memory slots [6]. On top of information retrieval, co-attention between the two modalities provides a more interactive combination [10]. Developments along this direction include attribute-based attention [42], hierarchical attention [21, 45, 46], multi-head attention [14, 19], multi-step progressive attention memory [12] or combining self-attention with co-attention [20]. For higher order reasoning, question can interact iteratively with video features via episodic memory or through switching mechanism [41]. Multi-step reasoning for VideoQA is also approached by [39] and [30] with refined attention. + +Unlike these techniques, our HCRN model supports conditioning video features with linguistic clues as a context factor in every stage of the multi-level refinement process. This allows linguistic cue to involve earlier and deeper into video presentation construction than any available methods. + +Neural building blocks - Beyond the VideoQA domain, CRN unit shares the idealism of uniformity in neural architecture with other general purpose neural building blocks + +![](images/cfdf983fba158452e635c91007e640ed9b853adc08eae60470030314bb3c2c7d.jpg) +Figure 2. Conditional Relation Network. a) Input array $S$ of $n$ objects are first processed to model $k$ -tuple relations from $t$ sub-sampled size- $k$ subsets by sub-network $g^{k}(.)$ . The outputs are further conditioned with the context $c$ via sub-network $h^{k}(.,.)$ and finally aggregated by $p^{k}(.)$ to obtain a result vector $r^{k}$ which represents $k$ -tuple conditional relations. Tuple sizes can range from 2 to $(n - 1)$ , which outputs an $(n - 2)$ -dimensional output array. + +such as the block in InceptionNet [31], Residual Block in ResNet [9], Recurrent Block in RNN, conditional linear layer in FiLM [27], and matrix-matrix-block in neural matrix net [5]. Our CRN departs significantly from these designs by assuming an array-to-array block that supports conditional relational reasoning and can be reused to build networks of other purposes in vision and language processing. + +# 3. Method + +The goal of VideoQA is to deduce an answer $\tilde{a}$ from a video $\mathcal{V}$ in response to a natural question $q$ . The answer $\tilde{a}$ can be found in an answer space $\mathcal{A}$ which is a pre-defined set of possible answers for open-ended questions or a list of answer candidates in case of multi-choice questions. Formally, VideoQA can be formulated as follows: + +$$ +\tilde {a} = \underset {a \in \mathcal {A}} {\operatorname {a r g m a x}} \mathcal {F} _ {\theta} (a \mid q, \mathcal {V}), \tag {1} +$$ + +where $\theta$ is the model parameters of scoring function $\mathcal{F}$ . + +Visual representation We begin by dividing the video $\mathcal{V}$ of $L$ frames into $N$ equal length clips $C = (C_1, \dots, C_N)$ . Each clip $C_i$ of length $T = \lfloor L / N \rfloor$ is represented by two sources of information: frame-wise appearance feature vectors $V_i = \{v_{i,j} | v_{i,j} \in \mathbb{R}^{2048}\}_{j=1}^T$ , and the motion feature vector at clip level $f_i \in \mathbb{R}^{2048}$ . In our experiments, $v_{i,j}$ are the pool5 output of ResNet [9] features and $f_i$ are derived by ResNeXt-101 [38, 8]. + +
NotationRole
SInput array of n objects (e.g. frames, clips)
cConditioning feature (e.g. query, motion feat.)
kmaxMaximum subset (also tuple) size considered
kEach subset size from 2 to kmax
QkSet of all size-k subsets of S
tNumber of subsets randomly selected from Qk
QkselectedSet of t selected subsets from Qk
gk(.)Sub-network processing each size-k subset
hk(.,.)Conditioning sub-network
pk(.)Aggregating sub-network
RResult array of CRN unit on S given c
rkMember result vector of k-tuple relations
+ +Table 1. Notations of CRN unit operations + +Algorithm 1: CRN Unit +Input :Array $S = \{s_i\}_{i = 1}^n$ conditioning feature c Output :Array $R$ Metaparams: $\{k_{\mathrm{max}},t\mid k_{\mathrm{max}} < n\}$ +1 Build all sets of subsets $\{Q^k\mid k = 2,3,\dots,k_{\mathrm{max}}\}$ where $Q^{k}$ is set of all size- $k$ subsets of S +2 Initialize $R\gets \{\}$ +3 for $k\gets 2$ to $k_{\mathrm{max}}$ do +4 $Q^{k}_{\mathrm{selected}} =$ randomly select t subsets from $Q^{k}$ +5 for each subset $q_{i}\in Q^{k}_{\mathrm{selected}}$ do +6 $g_{i} = g^{k}(q_{i})$ +7 $h_i = h^k (g_i,c)$ +8 end +9 $r^k = p^k (\{h_i\})$ +10 add $r^k$ to $R$ +11 end + +Subsequently, linear feature transformations are applied to project $\{v_{ij}\}$ and $f_{i}$ into a standard $d$ -dimensions feature space to obtain $\{\hat{v}_{ij}|\hat{v}_{ij}\in \mathbb{R}^{\mathrm{d}}\}$ and $\hat{f}_i\in \mathbb{R}^{\mathrm{d}}$ , respectively. + +Linguistic representation All words in the question and answer candidates in case of multi-choice questions are first embedded into vectors of 300 dimensions, which are initialized with pre-trained GloVe word embeddings [26]. We further pass these context-independent embedding vectors through a biLSTM. Output hidden states of the forward and backward LSTM passes are finally concatenated to form the question representation $q \in \mathbb{R}^d$ . + +With these representations, we now describe our new hierarchical architecture for VideoQA (see Fig. 3). We first present the core compositional computation unit that serves as building blocks for the architecture in Section 3.1. In the following sub-section, we propose to design $\mathcal{F}$ as a layer-by-layer network architecture that can be built by simply stacking the core units in a particular manner. + +![](images/73490d6e8aa6cbedd88c4473c3582cbfd763aaad9237e9b9f166d107270cb3c5.jpg) +Figure 3. Hierarchical Conditional Relation Networks (HCRN) Architecture for VideoQA. The CRNs are stacked in a hierarchy, embedding the video input at different granularities including frame, short clip and entire video levels. The video feature embedding is conditioned on the linguistic cue at each level of granularity. The visual-question joint representation is fed into an output classifier for prediction. + +# 3.1. Conditional Relation Network Unit + +We introduce a reusable computation unit, termed Conditional Relation Network (CRN), which takes as input an array of $n$ objects $S = \{s_i\}_{i=1}^n$ and a conditioning feature $c$ - both in the same vector space $\mathbb{R}^d$ or tensor space $\mathbb{R}^{W \times H \times d}$ . CRN generates an output array of objects of the same dimensions containing high-order object relations of input features given the global context. The operation of CRN unit is presented algorithmically in Alg. 1 and visually in Fig. 2. Table 1 summarizes the notations used across these presentations. + +When in use for VideoQA, CRN's input array is composed of features at either frame or short-clip levels. The objects $\{s_i\}_{i=1}^n$ greatly share mutual information and it is redundant to consider all possible combinations of given objects. Therefore, applying a sampling scheme on the set of subsets (line 4 of Alg. 1) is crucial for redundancy reduction and computational efficiency. We borrow the sampling trick in [48] to build sets of $t$ selected subsets $Q_{\mathrm{selected}}^k$ . Regarding the choice of $k_{\mathrm{max}}$ , we choose $k_{\mathrm{max}} = n - 1$ in later experiments, resulting in the output array of size $n - 2$ if $n > 2$ and array of size 1 if $n = 2$ . + +As a choice in implementation, the functions $g^{k}(.)$ , $p^k (.)$ are simple average-pooling. In generic form, they can be any aggregation sub-networks that join a random set into a + +single representation. Meanwhile, $h^k (.,.)$ is a MLP running on top of feature concatenation that models the non-linear relationships between multiple input modalities. We tie parameters of the conditioning sub-network $h^k (.,.)$ across the subsets of the same size $k$ . In our implementation, $h^k (.,.)$ consists of a single linear transformation followed by an ELU [3] activation. + +It may be of concern that the relation formed by a particular subset may be unnecessary to model $k$ -tuple relations, we optionally design a self-gating mechanism similar to [4] to regulate the feature flow to go through each CRN module. Formally, the conditioning function $h^k (.,.)$ in that case is given by: + +$$ +h ^ {k} (x, y) = \operatorname {E L U} \left(W _ {h _ {1}} [ x, y ]\right) * \sigma \left(W _ {h _ {2}} [ x, y ]\right), \tag {2} +$$ + +where $[.,.]$ denotes the tensor concatenation, $\sigma$ is sigmoid function, and $W_{h_1}, W_{h_2}$ are linear weights. + +# 3.2. Hierarchical Conditional Relation Networks + +We use CRN blocks to build a deep network architecture to exploit inherent characteristics of a video sequence namely temporal relations, motion, and the hierarchy of video structure, and to support reasoning guided by linguistic questions. We term the proposed network architecture + +Hierarchical Conditional Relation Networks (HCRN) (see Fig. 3). The design of the HCRN by stacking reusable core units is partly inspired by modern CNN network architectures, of which InceptionNet [31] and ResNet [9] are the most well-known examples. + +A model for VideoQA should distill the visual content in the context of the question, given the fact that much of the visual information is usually not relevant to the question. Drawing inspiration from the hierarchy of video structure, we boil down the problem of VideoQA into a process of video representation in which a given video is encoded progressively at different granularities, including short clip (consecutive frames) and entire video levels. It is crucial that the whole process conditions on linguistic cue. In particular, at each hierarchy level, we use two stacked CRN units, one conditioned on motion features followed by one conditioned on linguistic cues. Intuitively, the motion feature serves as a dynamic context shaping the temporal relations found among frames (at the clip level) or clips (at the video level). As the shaping effect is applied to all relations, self-gating is not needed, and thus a simple MLP suffices. On the other hand, the linguistic cues are by nature selective, that is, not all relations are equally relevant to the question. Thus we utilize the self-gating mechanism in Eq. (2) for the CRN units which condition on question representation. + +With this particular design of network architecture, the input array at clip level consists of frame-wise appearance feature vectors $\{\hat{v}_{ij}\}$ , while that at a video level is the output at the clip level. Meanwhile, the motion conditioning feature at clip level CRNs are corresponding clip motion feature vector $\hat{f}_i$ . They are further passed to an LSTM, whose final state is used as video-level motion features. Note that this particular implementation is not the only option. We believe we are the first to progressively incorporate multiple modalities of input in such a hierarchical manner in contrast to the typical approach of treating appearance features and motion features as a two-stream network. + +To handle a long video of thousand frames, which is equivalent to dozens of short-term clips, there are two options to reduce the computational cost of CRN in handling large sets of subsets $\{Q^k | k = 2,3,\dots,k_{\max}\}$ given an input array $S$ : limit the maximum subset size $k_{\max}$ or extend the HCRN to deeper hierarchy. For the former option, this choice of sparse sampling may have potential to lose critical relation information of specific subsets. The latter, on the other hand, is able to densely sample subsets for relation modeling. Specifically, we can group $N$ short-term clips into $N_1 \times N_2$ hyper-clips, of which $N_1$ is the number of the hyper-clips and $N_2$ is the number of short-term clips in one hyper-clip. By doing this, our HCRN now becomes a 3-level of hierarchical network architecture. + +At the end of the HCRN, we compute the average visual feature based on conditioning to the question representation + +$q$ . Assume outputs of the last CRN unit at video level are an array $O = \{o_i \mid o_i \in \mathbb{R}^{H \times d}\}_{i=1}^{N-4}$ , we first stack them together, resulting in an output tensor $o \in \mathbb{R}^{(N-4) \times H \times d}$ , and further vectorize this output tensor to obtain the final output $o' \in \mathbb{R}^{H' \times d}$ , $H' = (N-4) \times H$ . The weighted average information is given by: + +$$ +I = \left[ W _ {o ^ {\prime}} o ^ {\prime}, W _ {o ^ {\prime}} o ^ {\prime} \odot W _ {q} q \right], \tag {3} +$$ + +$$ +I ^ {\prime} = \operatorname {E L U} \left(W _ {I} I + b\right), \tag {4} +$$ + +$$ +\gamma = \operatorname {s o f t m a x} \left(W _ {I ^ {\prime}} I ^ {\prime} + b\right), \tag {5} +$$ + +$$ +\tilde {o} = \sum_ {h = 1} ^ {H ^ {\prime}} \gamma_ {h} o _ {h} ^ {\prime}; \tilde {o} \in \mathbb {R} ^ {d}, \tag {6} +$$ + +where, $[.,.]$ denotes concatenation operation, and $\odot$ is the Hadamard product. + +# 3.3. Answer Decoders and Loss Functions + +Following [10, 30, 6], we adopt different answer decoders depending on the task. Open-ended questions are treated as multi-label classification problems. For these, we employ a classifier which takes as input the combination of the retrieved information from visual cue $\tilde{o}$ and the question representation $q$ , and computes label probabilities $p \in \mathbb{R}^{|\mathcal{A}|}$ : + +$$ +y = \operatorname {E L U} \left(W _ {o} [ \bar {o}, W _ {q} q + b ] + b\right), \tag {7} +$$ + +$$ +y ^ {\prime} = \operatorname {E L U} \left(W _ {y} y + b\right), \tag {8} +$$ + +$$ +p = \operatorname {s o f t m a x} \left(W _ {y ^ {\prime}} y ^ {\prime} + b\right). \tag {9} +$$ + +The cross-entropy is used as the loss function. + +For repetition count task, we use a linear regression function taking $y'$ in Eq. (8) as input, followed by a rounding function for integer count results. The loss for this task is Mean Squared Error (MSE). + +For multi-choice question types (such as repeating action and state transition in TGIF-QA), each answer candidate is processed in the same way with the question. In detail, we use the shared parameter HCRNs with either question or each answer candidate as language cues. As a result, we have a set of HCRN outputs, one conditioned on question $(\tilde{o}_q)$ , and the others conditioned on answer candidates $(\tilde{o}_a)$ . Subsequently, $\tilde{o}_q$ , $\{\tilde{o}_a\}$ , question representation $q$ and answer candidates $a$ are fed into a final classifier with a linear regression to output an answer index, as follows: + +$$ +y = \left[ \tilde {o} _ {q}, \tilde {o} _ {a}, W _ {q} q + b, W _ {a} a + b \right], \tag {10} +$$ + +$$ +y ^ {\prime} = \operatorname {E L U} \left(W _ {y} y + b\right), \tag {11} +$$ + +$$ +s = W _ {y ^ {\prime}} y ^ {\prime} + b. \tag {12} +$$ + +We use the popular hinge loss [10] of pairwise comparisons, $\max (0,1 + s^n -s^p)$ , between scores for incorrect $s^n$ and correct answers $s^p$ to train the network. + +# 3.4. Complexity Analysis + +We provide a brief analysis here, leaving detailed derivations in Supplement. For a fixed sampling resolution $t$ , a single forward pass of CRN would take quadratic time in $k_{\mathrm{max}}$ . For an input array of length $n$ , feature size $F$ , the unit produces an output array of size $k_{\mathrm{max}} - 1$ of the same feature dimensions. The overall complexity of HCRN depends on design choice for each CRN unit and specific arrangement of CRN units. For clarity, let $t = 2$ and $k_{\mathrm{max}} = n - 1$ , which are found to work well in later experiments. Suppose there are $N$ clips of length $T$ , making a video of length $L = NT$ . A 2-level architecture of Fig. 3 needs 2TLF time to compute the CRNs at the lowest level, and 2NLF time to compute the second level, totaling $2(T + N)LF$ time. + +Let us now analyze a 3-level architecture that generalizes the one in Fig. 3. The $N$ clips are organized into $M$ sub-videos, each has $Q$ clips, i.e., $N = MQ$ . The clip-level CRNs remain the same. At the next level, each sub-video CRN takes as input an array of length $Q$ , whose elements have size $(T - 4)F$ . Using the same logic as before, the set of sub-video-level CRNs cost $2\frac{N}{M}LF$ time. A stack of two sub-video CRNs now produces an output array of size $(Q - 4)(T - 4)F$ , serving as an input object in an array of length $M$ for the video-level CRNs. Thus the video-level CRNs cost $2MLF$ . Thus the total cost for 3-level HCRN is in the order of $2(T + \frac{N}{M} + M)LF$ . + +Compared to the 2-level HCRN, the a 3-level HCRN reduces computation time by $2(N - \frac{N}{M} - M)LF \approx 2NLF$ assuming $N \gg \max \left\{M, \frac{N}{M}\right\}$ . As $N = \frac{L}{T}$ , this reduces to $2NLF = 2\frac{L^2}{T}F$ . In practice $T$ is often fixed, thus the saving scales quadratically with video length $L$ , suggesting that hierarchy is computational efficient for long videos. + +# 4. Experiments + +# 4.1. Datasets + +TGIF-QA [10] This is currently the most prominent dataset for VideoQA, containing 165K QA pairs and 72K animated GIFs. The dataset covers four tasks addressing unique properties of video. Of which, the first three require strong spatio-temporal reasoning abilities: Repetition Count - to retrieve number of occurrences of an action, Repeating Action- multi-choice task to identify the action repeated for a given number of times, State Transition - multi-choice tasks regarding temporal order of events. The last task - Frame QA - is akin to image QA where a particular frame in a video is sufficient to answer the questions. + +MSVD-QA [39] This is a small dataset of 50,505 question answer pairs annotated from 1,970 short clips. Questions are of five types, including what, who, how, when and where. + +MSRVTT-QA [40] The dataset contains 10K videos and 243K question answer pairs. Similar to MSVD-QA, ques + +
ModelActionTrans.FrameCount
ST-TP [10]62.969.449.54.32
Co-mem [7]68.274.351.54.10
PSAC [20]70.476.955.74.27
HME [6]73.977.853.84.02
HCRN75.081.455.93.82
+ +Table 2. Comparison with the state-of-the-art methods on TGIF-QA dataset. For count, the lower the better. + +![](images/ed7e3ccfa0c2be79bfec0a960504eb457559df8f81a9b5c699dc2c7bcbd8c20a.jpg) +Figure 4. Performance comparison on MSVD-QA and MSRVTT-QA dataset with state-of-the-art methods: Co-mem [7], HME [6], HRA [2], and AMU [39]. + +tions are of five types. Compared to the other two datasets, videos in MSRVTT-QA contain more complex scenes. They are also much longer, ranging from 10 to 30 seconds long, equivalent to 300 to 900 frames per video. + +We use accuracy to be the evaluation metric for all experiments, except those for repetition count on TGIF-QA dataset where Mean Square Error (MSE) is applied. + +# 4.2. Implementation Details + +Videos are segmented into 8 clips, each clip contains 16 frames by default. Long videos in MSRVTT-QA are additionally segmented into 24 clips for evaluating the ability of handling very long sequences. Unless otherwise stated, the default setting is with a 2-level HCRN as depicted in Fig. 3, and $d = 512$ , $t = 1$ . We train the model initially at learning rate of $10^{-4}$ and decay by half after every 10 epochs. All experiments are terminated after 25 epochs and reported results are at the epoch giving the best validation accuracy. Pytorch implementation of the model is available online1. + +# 4.3. Results + +# 4.3.1 Benchmarking against SoTAs + +We compare our proposed model with state-of-the-art methods (SoTAs) on aforementioned datasets. For TGIF-QA, we compare with most recent SoTAs, including [6, 7, 10, 20], + +
ModelAppear.MotionHiera.Relation
ST-TP [10]✓✓
Co-mem [7]✓✓
PSAC [20]✓
HME [6]✓✓
HCRN✓✓✓✓
+ +over four tasks. These works, except for [20], make use of motion features extracted from optical flow or 3D CNNs. + +The results are summarized in Table 2 for TGIF-QA, and in Fig. 4 for MSVD-QA and MSRVTT-QA. Reported numbers of the competitors are taken from the original papers and [6]. It is clear that our model consistently outperforms or is competitive with SoTA models on all tasks across all datasets. The improvements are particularly noticeable when strong temporal reasoning is required, i.e., for the questions involving actions and transitions in TGIF-QA. These results confirm the significance of considering both near-term and far-term temporal relations toward finding correct answers. + +The MSVD-QA and MSRVTT-QA datasets represent highly challenging benchmarks for machine compared to the TGIF-QA, thanks to their open-ended nature. Our model HCRN outperforms existing methods on both datasets, achieving $36.1\%$ and $35.6\%$ accuracy which are 1.7 points and 0.6 points improvement on MSVD-QA and MSRVTT-QA, respectively. This suggests that the model can handle both small and large datasets better than existing methods. + +Finally, we provide a justification for the competitive performance of our HCRN against existing rivals by comparing model features in Table 3. Whilst it is not straightforward to compare head-to-head on internal model designs, it is evident that effective video modeling necessitates handling of motion, temporal relation and hierarchy at the same time. We will back this hypothesis by further detailed studies in Section 4.3.2 (for motion, temporal relations, shallow hierarchy) and Section 4.3.3 (deep hierarchy). + +# 4.3.2 Ablation Studies + +To provide more insight about our model, we conduct extensive ablation studies on TGIF-QA with a wide range of configurations. The results are reported in Table 4. Full 2-level HCRN denotes the full model of Fig. 3 with $k_{max} = n - 1$ , $t = 2$ . Overall we find that ablating any of design components or CRN units would degrade the performance for temporal reasoning tasks (actions, transition and action counting). The effects are detailed as follows. + +Effect of relation order $k_{max}$ and resolution $t$ Without relations ( $k_{max} = 1$ ) the performance drops significantly on actions and events reasoning. This is expected since those questions often require putting actions and events in relation + +Table 3. Model design choices and input modalities in comparison. See Table 2 for corresponding performance on TGIF-QA dataset. + +
ModelAct.Trans.F.QACount
Relations (kmax, t)
kmax = 1, t = 165.275.554.93.97
kmax = 1, t = 366.276.255.73.95
kmax = 1, t = 565.476.756.03.91
kmax = 1, t = 965.675.656.33.92
kmax = 1, t = 1165.475.156.33.91
kmax = 2, t = 267.276.656.73.94
kmax = 2, t = 966.376.756.53.92
kmax = 4, t = 264.075.956.23.87
kmax = 4, t = 966.375.655.84.00
kmax = [n/2], t = 273.381.756.13.89
kmax = [n/2], t = 972.581.156.63.82
kmax = n - 1, t = 175.081.455.93.82
kmax = n - 1, t = 375.181.555.53.91
kmax = n - 1, t = 573.682.054.73.84
kmax = n - 1, t = 775.481.455.63.86
kmax = n - 1, t = 974.181.954.73.87
Hierarchy
1-level, video CRN only66.278.456.63.94
1.5-level, clips→pool70.480.556.63.94
Motion conditioning
w/o motion70.879.856.44.38
w/o short-term motion74.982.156.54.03
w/o long-term motion75.181.356.73.92
Linguistic conditioning
w/o linguistic condition66.575.756.23.97
w/o quest.@clip level74.381.155.83.95
w/o quest.@video level74.080.555.93.92
Gating
w/o gate74.182.055.83.93
w/ gate quest. & motion73.380.955.33.90
Full 2-level HCRN75.181.255.73.88
+ +Table 4. Ablation studies on TGIF-QA dataset. For count, the lower the better. Act.: Action; Trans.: Transition; F.QA: Frame QA. When not explicitly specified, we use $k_{max} = n - 1$ , $t = 2$ for relation order and sampling resolution. + +with a larger context (e.g., what happens before something else). In this case, the frame QA benefits more from increasing sampling resolution $t$ because of better chance to find a relevant frame. However, when taking relations into account $(k_{max} > 1)$ , we find that HCRN is robust against sampling resolution $t$ but depends critically on the maximum relation order $k_{max}$ . The relative independence w.r.t. $t$ can be due to visual redundancy between frames, so that resampling may capture almost the same information. On the other hand, when considering only low-order object relations, the performance is significantly dropped in all tasks, except frame QA. These results confirm that high-order relations are required for temporal reasoning. As the frame QA task requires only reasoning on a single frame, incorporating temporal information might confuse the model. + +
Depth of hierarchyOverall Acc.
2-level, 24 clips → 1 vid35.6
3-level, 24 clips → 4 sub-vids → 1 vid35.6
+ +Table 5. Results for going deeper hierarchy on MSRVTT-QA dataset. Run time is reduced by factor of 4 for going from 2-level to 3-level hierarchy. + +Effect of hierarchy We design two simpler models with only one CRN layer: $\triangleright$ 1-level, 1 CRN video on key frames only: Using only one CRN at the video-level whose input array consists of key frames of the clips. Note that video-level motion features are still maintained. $\triangleright$ 1.5-level, clip CRNs $\rightarrow$ pooling: Only the clip-level CRNs are used, and their outputs are mean-pooled to represent video. The pooling operation represents a simplistic relational operation across clips. The results confirm that a hierarchy is needed for high performance on temporal reasoning tasks. + +Effect of motion conditioning We evaluate the following settings: $\triangleright w / o$ short-term motions: Remove all CRN units that condition on the short-term motion features (clip level) in the HCRN. $\triangleright w / o$ long-term motions: Remove the CRN unit that conditions on the long-term motion features (video level) in the HCRN. $\triangleright w / o$ motions: Remove motion feature from being used by HCRN. We find that motion, in agreeing with prior arts, is critical to detect actions, hence computing action count. Long-term motion is particularly significant for counting task, as this task requires maintaining global temporal context during the entire process. For other tasks, short-term motion is usually sufficient. E.g. in action task, wherein one action is repeatedly performed during the entire video, long-term context contributes little. Not surprisingly, motion does not play the positive role in answering questions on single frames as only appearance information needed. + +Effect of linguistic conditioning and gating Linguistic cues represent a crucial context for selecting relevant visual artifacts. For that we test the following ablations: $\triangleright$ w/o quest.@clip level: Remove the CRN unit that conditions on question representation at clip level. $\triangleright$ w/o quest.@video level: Remove the CRN unit that conditions on question representation at video level. $\triangleright$ w/o linguistic condition: Exclude all CRN units conditioning on linguistic cue while the linguistic cue is still in the answer decoder. Likewise, gating offers a selection mechanism. Thus we study its effect as follows: $\triangleright$ wo/gate: Turn off the self-gating mechanism in all CRN units. $\triangleright$ w/gate quest. & motion: Turn on the self-gating mechanism in all CRN units. + +We find that the conditioning question provides an important context for encoding video. Conditioning features (motion and language), through the gating mechanism in Eq. (2), offers further performance gain in action and counting tasks, possibly by selectively passing question-relevant information up the inference chain. + +# 4.3.3 Deepening model hierarchy + +We test the scalability of the HCRN on long videos in the MSRVTT-QA dataset, which are organized into 24 clips (3 times longer than other two datasets). We consider two settings: $\triangleright$ 2-level hierarchy, 24 clips $\rightarrow$ 1 vid: The model is as illustrated in Fig. 3, where 24 clip-level CRNs are followed by a video-level CRN. $\triangleright$ 3-level hierarchy, 24 clips $\rightarrow$ 4 sub-vids $\rightarrow$ 1 vid: Starting from the 24 clips as in the 2-level hierarchy, we group 24 clips into 4 sub-videos, each is a group of 6 consecutive clips, resulting in a 3-level hierarchy. These two models are designed to have similar number of parameters, approx. $50\mathrm{M}$ + +The results are reported in Table 5. Unlike existing methods which usually struggle with handling long videos, our method is scalable for them by offering deeper hierarchy, as analyzed theoretically in Section 3.4. Using a deeper hierarchy is expected to significantly reduce the training time and inference time for HCRN, especially when the video is long. In our experiments, we achieve 4 times reduction in training and inference time by going from 2-level HCRN to 3-level counterpart whilst maintaining the same performance. + +# 5. Discussion + +We introduced a general-purpose neural unit called Conditional Relational Networks (CRNs) and a method to construct hierarchical networks for VideoQA using CRNs as building blocks. A CRN is a relational transformer that encapsulates and maps an array of tensorial objects into a new array of the same kind, conditioned on a contextual feature. In the process, high-order relations among input objects are encoded and modulated by the conditioning feature. This design allows flexible construction of sophisticated structure such as stack and hierarchy, and supports iterative reasoning, making it suitable for QA over multimodal and structured domains like video. The HCRN was evaluated on multiple VideoQA datasets (TGIF-QA, MSVD-QA, MSRVTT-QA) demonstrating competitive reasoning capability. + +Different to temporal attention based approaches which put effort into selecting objects, HCRN concentrates on modeling relations and hierarchy in video. This difference in methodology and design choices leads to distinctive benefits. CRN units can be further augmented with attention mechanisms to cover better object selection ability, so that related tasks such as frame QA can be further improved. + +The examination of CRN in VideoQA highlights the importance of building generic neural reasoning unit that supports native multimodal interaction in improving robustness of visual reasoning. We wish to emphasize that the unit is general-purpose, and hence is applicable for other reasoning tasks, which we will explore. These include an extension to consider the accompanying linguistic channels which are crucial for TVQA [17] and MovieQA [33] tasks. + +# References + +[1] Lorenzo Baraldi, Costantino Grana, and Rita Cucchiara. Hierarchical boundary-aware neural encoder for video captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1657-1666, 2017. 2 +[2] Muhammad Iqbal Hasan Chowdhury, Kien Nguyen, Sridha Sridharan, and Clinton Fookes. Hierarchical relational attention for video question answering. In 2018 25th IEEE International Conference on Image Processing (ICIP), pages 599-603. IEEE, 2018. 4 +[3] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs). arXiv preprint arXiv:1511.07289, 2015. 3.1 +[4] 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, pages 933–941. JMLR.org, 2017. 3.1 +[5] Kien Do, Truyen Tran, and Svetha Venkatesh. Learning deep matrix representations. arXiv preprint arXiv:1703.01454, 2018. 2 +[6] Chenyou Fan, Xiaofan Zhang, Shu Zhang, Wensheng Wang, Chi Zhang, and Heng Huang. Heterogeneous memory enhanced multimodal attention model for video question answering. In CVPR, pages 1999-2007, 2019. 1, 2, 3.3, 4.2, 4, 4.3.1 +[7] Jiyang Gao, Runzhou Ge, Kan Chen, and Ram Nevatia. Motion-appearance co-memory networks for video question answering. CVPR, 2018. 1, 2, 4.2, 4, 4.3.1 +[8] Kensho Hara, Hirokatsu Kataoka, and Yutaka Satoh. Can spatiotemporal 3d cnns retrace the history of 2d cnns and imageNet? In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 6546-6555, 2018. 3 +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, 2016. 1, 2, 3, 3.2 +[10] Yunseok Jang, Yale Song, Youngjae Yu, Youngjin Kim, and Gunhee Kim. Tgif-qa: Toward spatio-temporal reasoning in visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2758–2766, 2017. 2, 3.3, 3.3, 4.1, 4.2, 4.3.1 +[11] Weike Jin, Zhou Zhao, Mao Gu, Jun Yu, Jun Xiao, and Yueting Zhuang. Multi-interaction network with object relation for video question answering. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1193–1201. ACM, 2019. 2 +[12] Junyeong Kim, Minuk Ma, Kyungsu Kim, Sungjin Kim, and Chang D Yoo. Progressive attention memory network for movie story question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8337-8346, 2019. 2 +[13] Jin-Hwa Kim, Jaehyun Jun, and Byoung-Tak Zhang. Bilinear attention networks. In Advances in Neural Information Processing Systems, pages 1564-1574, 2018. 2 +[14] Kyung-Min Kim, Seong-Ho Choi, Jin-Hwa Kim, and Byoung-Tak Zhang. Multimodal dual attention memory for video + +story question answering. In Proceedings of the European Conference on Computer Vision (ECCV), pages 673-688, 2018. 2 +[15] Kyung-Min Kim, Min-Oh Heo, Seong-Ho Choi, and Byoung-Tak Zhang. DeepStory: video story QA by deep embedded memory networks. In IJCAI, pages 2016–2022. AAAI Press, 2017. 2 +[16] Thao Minh Le, Vuong Le, Svetha Venkatesh, and Truyen Tran. Learning to reason with relational video representation for question answering. arXiv preprint arXiv:1907.04553, 2019.2 +[17] Jie Lei, Licheng Yu, Mohit Bansal, and Tamara L Berg. Tvqa: Localized, compositional video question answering. Conference on Empirical Methods in Natural Language Processing, 2018. 1, 2, 5 +[18] Fu Li, Chuang Gan, Xiao Liu, Yunlong Bian, Xiang Long, Yandong Li, Zhichao Li, Jie Zhou, and Shilei Wen. Temporal modeling approaches for large-scale youtube-8m video understanding. CVPR workshop, 2017. 2 +[19] Xiangpeng Li, Lianli Gao, Xuanhan Wang, Wu Liu, Xing Xu, Heng Tao Shen, and Jingkuan Song. Learnable aggregating net with diversity learning for video question answering. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1166-1174. ACM, 2019. 2 +[20] Xiangpeng Li, Jingkuan Song, Lianli Gao, Xianglong Liu, Wenbing Huang, Xiangnan He, and Chuang Gan. Beyond RNNs: Positional Self-Attention with Co-Attention for Video Question Answering. In AAAI, 2019. 1, 2, 4.2, 4.3.1 +[21] Junwei Liang, Lu Jiang, Liangliang Cao, Li-Jia Li, and Alexander G Hauptmann. Focal visual-text attention for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6135-6143, 2018. 2 +[22] Rainer Lienhart. Abstracting home video automatically. In Proceedings of the seventh ACM international conference on Multimedia (Part 2), pages 37-40. ACM, 1999. 2 +[23] Feng Mao, Xiang Wu, Hui Xue, and Rong Zhang. Hierarchical video frame sequence representation with deep convolutional graph network. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0-0, 2018. 2 +[24] Seil Na, Sangho Lee, Jisung Kim, and Gunhee Kim. A read-write memory network for movie story understanding. In International Conference on Computer Vision (ICCV 2017). Venice, Italy, 2017. 1, 2 +[25] Pingbo Pan, Zhongwen Xu, Yi Yang, Fei Wu, and Yueting Zhuang. Hierarchical recurrent neural encoder for video representation with application to captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1029-1038, 2016. 2 +[26] Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In EMNLP, volume 14, pages 1532-1543, 2014. 11 +[27] Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. In AAAI, 2018. 1, 2 +[28] Zhaofan Qiu, Ting Yao, and Tao Mei. Learning spatiotemporal representation with pseudo-3d residual networks. In + +Proceedings of the IEEE International Conference on Computer Vision, pages 5533-5541, 2017. 2 +[29] Gursimran Singh, Leonid Signal, and James J Little. Spatiotemporal relational reasoning for video question answering. In BMVC, 2019. 2 +[30] Xiaomeng Song, Yucheng Shi, Xin Chen, and Yahong Han. Explore multi-step reasoning in video question answering. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 239-247. ACM, 2018. 1, 2, 3.3 +[31] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1-9, 2015. 1, 2, 3, 2 +[32] Yongyi Tang, Xing Zhang, Lin Ma, Jingwen Wang, Shaoxiang Chen, and Yu-Gang Jiang. Non-local netvlad encoding for video classification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0-0, 2018. 2 +[33] Makarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Movieqa: Understanding stories in movies through question-answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4631–4640, 2016. 1, 2, 5 +[34] 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. 2 +[35] Anran Wang, Anh Tuan Luu, Chuan-Sheng Foo, Hongyuan Zhu, Yi Tay, and Vijay Chandrasekhar. Holistic multi-modal memory network for movie question answering. IEEE Transactions on Image Processing, 29:489-499, 2019. 2 +[36] Bo Wang, Youjiang Xu, Yahong Han, and Richang Hong. Movie question answering: Remembering the textual cues for layered visual contents. AAAI'18, 2018. 1, 2 +[37] Chao-Yuan Wu, Christoph Feichtenhofer, Haoqi Fan, Kaiming He, Philipp Krahenbuhl, and Ross Girshick. Long-term feature banks for detailed video understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 284–293, 2019. 2 +[38] Saining Xie, Ross Girshick, Piotr Dólar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492-1500, 2017. 3 +[39] Dejing Xu, Zhou Zhao, Jun Xiao, Fei Wu, Hanwang Zhang, Xiangnan He, and Yueting Zhuang. Video question answering via gradually refined attention over appearance and motion. + +In Proceedings of the 25th ACM international conference on Multimedia, pages 1645-1653. ACM, 2017. 2, 4.1, 4 +[40] Jun Xu, Tao Mei, Ting Yao, and Yong Rui. Msr-vtt: A large video description dataset for bridging video and language. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5288-5296, 2016. 2, 4.1 +[41] Tianhao Yang, Zheng-Jun Zha, Hongtao Xie, Meng Wang, and Hanwang Zhang. Question-aware tube-switch network for video question answering. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1184–1192. ACM, 2019. 2 +[42] Yunan Ye, Zhou Zhao, Yimeng Li, Long Chen, Jun Xiao, and Yueting Zhuang. Video question answering via attribute-augmented attention network learning. In Proceedings of the 40th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 829-832. ACM, 2017. 2 +[43] 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. 2 +[44] Kuo-Hao Zeng, Tseng-Hung Chen, Ching-Yao Chuang, Yuan-Hong Liao, Juan Carlos Niebles, and Min Sun. Leveraging video descriptions to learn video question answering. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. 2 +[45] Zhou Zhao, Xinghua Jiang, Deng Cai, Jun Xiao, Xiaofei He, and Shiliang Pu. Multi-turn video question answering via multi-stream hierarchical attention context network. In IJCAI, pages 3690-3696, 2018. 2 +[46] Zhou Zhao, Qifan Yang, Deng Cai, Xiaofei He, and Yueting Zhuang. Video question answering via hierarchical spatiotemporal attention networks. In *IJCAI*, pages 3518–3524, 2017. 2 +[47] Zhou Zhao, Zhu Zhang, Shuwen Xiao, Zhenxin Xiao, Xiaohui Yan, Jun Yu, Deng Cai, and Fei Wu. Long-form video question answering via dynamic hierarchical reinforced networks. IEEE Transactions on Image Processing, 28(12):5939-5952, 2019. 2 +[48] 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. 2, 3.1 +[49] Linchao Zhu, Zhongwen Xu, Yi Yang, and Alexander G Hauptmann. Uncovering the temporal context for video question answering. International Journal of Computer Vision, 124(3):409-421, 2017. 2 \ No newline at end of file diff --git a/hierarchicalconditionalrelationnetworksforvideoquestionanswering/images.zip b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a0bfc83cde7a3f47b4db7d679ec30ce191106db3 --- /dev/null +++ b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1226de5acb24d42a64a440a0a10f1a8a7c63f9ef48b631b75947433ac7b4708 +size 429895 diff --git a/hierarchicalconditionalrelationnetworksforvideoquestionanswering/layout.json b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..722dd3d9430cc7699ad14eb911bc31d575bf59e0 --- /dev/null +++ b/hierarchicalconditionalrelationnetworksforvideoquestionanswering/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c0e5a0c268f07da08ea64ac8ccbd870e814127d81436968474e9bf72daea676 +size 455945 diff --git a/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_content_list.json b/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9bfbb247a2ad5fe37eac920ba9b7ecfb6d29e0d4 --- /dev/null +++ b/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60ab5dd3d25fa6bdfb62dd5e573f3076075b3d8d18c3fdc756fc07a402490ffc +size 79449 diff --git a/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_model.json b/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9579ad9cc86f39c712f247f42fb2d6d4abcf78f5 --- /dev/null +++ b/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8e3fc4f77d7bd9faeb1b703009af2dd3a4b77a233c0327f5f316ce169877527 +size 99271 diff --git a/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_origin.pdf b/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..163832e3272844f9faa7d983b508bea7681d0edb --- /dev/null +++ b/hierarchicalfeatureembeddingforattributerecognition/8567faea-dcfc-4483-908a-19fe9648e2c7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe6b36dd25dae013cc6368333c81c3a0facdd4c9eeb50015aad03622c32803ee +size 525881 diff --git a/hierarchicalfeatureembeddingforattributerecognition/full.md b/hierarchicalfeatureembeddingforattributerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ef7b40e2c3e2013e64118d8666493699064be7d3 --- /dev/null +++ b/hierarchicalfeatureembeddingforattributerecognition/full.md @@ -0,0 +1,314 @@ +# Hierarchical Feature Embedding for Attribute Recognition + +Jie Yang $^{1,2}$ , Jiarou Fan $^{1}$ , Yiru Wang $^{1}$ , Yige Wang $^{1}$ , Weihao Gan $^{1*}$ , Lin Liu $^{2}$ , Wei Wu $^{1}$ $^{1}$ SenseTime Group Limited, $^{2}$ Tsinghua University + +takanashiyj@gmail.com,{fanjiarou, wangyiru, ganweihao, wuwei}@sensetime.com, yige.wang@tum.de, linliu@tsinghua.edu.cn + +# Abstract + +Attribute recognition is a crucial but challenging task due to viewpoint changes, illumination variations and appearance diversities, etc. Most of previous work only consider the attribute-level feature embedding, which might perform poorly in complicated heterogeneous conditions. To address this problem, we propose a hierarchical feature embedding (HFE) framework, which learns a fine-grained feature embedding by combining attribute and ID information. In HFE, we maintain the inter-class and intra-class feature embedding simultaneously. Not only samples with the same attribute but also samples with the same ID are gathered more closely, which could restrict the feature embedding of visually hard samples with regard to attributes and improve the robustness to variant conditions. We establish this hierarchical structure by utilizing HFE loss consisted of attribute-level and ID-level constraints. We also introduce an absolute boundary regularization and a dynamic loss weight as supplementary components to help build up the feature embedding. Experiments show that our method achieves the state-of-the-art results on two pedestrian attribute datasets and a facial attribute dataset. + +# 1. Introduction + +Attributes, such as gender, hair length, clothing style, are discriminative semantic descriptors that can be used as soft-biometrics in visual surveillance. Attribute recognition concentrates on discerning these attributes of the target human in a given image. It includes pedestrian attribute recognition (PAR), face attribute recognition (FAR), etc. Recently, attribute recognition has received extraordinary attention owing to the potential applications in person re-identification (Re-ID) [22, 26, 36], face verification [21, 6, 46, 34, 45], and human identification [15]. Being a classification problem by nature, it still faces great challenges in real-world scenarios for these reasons: (1) Images + +![](images/f7a8601e9b04ddb5789ba5a1f19082ed3aea6f3ac9d86527c40def41ce4e32ad.jpg) +Figure 1. Hierarchical feature embedding on 'backpack' attribute. Images with the same IDs are represented with the same color borders. (a) represents the Cross Entropy feature space, where most of samples can be classified correctly while the hard sample with pink dotted border (whose backpack is totally occluded by the body) is misclassified. (b) With the help of ID constraint, features with the same IDs form fine-grained clusters can pull the hard example back. + +might be low-resolution or blurry because of the shot distance or the movements of pedestrians. (2) Different scenes, time slots, angles and poses lead to illumination alterations, viewpoint changes, and appearance variations. (3) Some parts of an object might be occluded by others, resulting in invisibility or ambiguity. + +Recently, some methods are introduced to solve these problems and achieve admirable performance. A-AOG [35] explicitly represents the decomposition and articulation of body parts, and accounts for the correlations between poses and attributes. LGNet [28] assigns attribute-specific weights to local features based on the affinity between preextracted proposals and attribute locations. These methods aim at applying pivotal parts of images or an attention module to reduce the impact of irrelevant factors to some extent, still they do not cope with the visual appearance variations of attributes as well as occlusion directly. Only attribute-level optimization is focused on in these methods, however the information from attribute recognition related fields, such as person Re-ID, could assist to alleviate vari- + +ation and occlusion issues through imposing stronger constraints. + +From the perspective of data, current attribute datasets are all labelled on ID or tracking granularity [25, 32] to reduce workloads. Thus we assume that images captured from the same identity should have the same attributes, but not vise versa. For each attribute, labels are usually coarse-grained owing to the expensive annotation cost. Different persons may get the same attribute labels but with subtle differences in appearance. For example, backpacks with different colors and textures are all tagged as 'backpack'. Therefore, fine-grained feature embeddings are needed for attributes to represent the variety within a class. With identity information, we could set up a two-level feature embedding, i.e., inter-class and intra-class (Fig. 1). For each attribute, samples with identical attribute form coarse-grained classes, while in each attribute class, samples from the same person (with the same attribute definitely) construct the fine-grained ID clusters. We introduce this hierarchical feature embedding model by the following motivations: (1) ID clusters restrict the images with the same ID but variant viewpoints, illumination and appearance to gather more closely, which embed the attribute features with scene invariance and improve robustness. (2) Hard cases for attributes may be easily handled and pulled back by other easy samples of the same ID by the ID constraint, which is difficult to learn only in the attribute level. (3) Like the attribute tags, the ID tags are also utilized in the attribute semantics by holding the assumption above, avoiding integrating different semantic features directly in the same feature space as previous work [25]. + +Motivated by the above observation, we propose a hierarchical feature embedding (HFE) framework, maintaining the inter-class as well as the intra-class feature embedding by combining attribute and ID information. HFE loss is introduced for fine-grained feature embedding, which consists of two triplet losses and an absolute boundary regularization with the selected quintuplets. With HFE loss constraints, each class could gather more compactly, leading to a more distinct boundary between classes. We propose the absolute boundary regularization for additional absolute constraints because the triplet loss only considers the difference between two distances but ignores the absolute values, and the intra-class triplet loss may interact indirectly with the inter-class boundary. Besides, the quintuplet selection is relevant to the current feature space. However, in the early stage of training, feature spaces are not confident enough for the quintuplet selection, so we design a dynamic loss weight, making the HFE loss weight increasing gradually along with the learning process. In summary, the contributions of this paper are: + +- We propose HFE framework to integrate ID information on attribute semantics for fine-grained feature em + +bedding. A novel HFE loss is introduced for both inter-class and intra-class level constraints. + +- We construct an absolute boundary regularization by strengthening the original triplet loss with an absolute constraint. +- We introduce a dynamic loss weight, which forces the feature space to transit from origin to the improved HFE-restricted space by degrees. +- The proposed method is evaluated on two pedestrian attribute datasets and one face attribute dataset. Experiments show our method achieves the state-of-the-art results on all three datasets. + +# 2. Related Work + +# 2.1. Attribute Recognition + +Recently, deep learning based attribute recognition methods achieve impressive performance. In PAR, these methods include global based [23, 41, 1, 7], local parts based [28], visual attention based [31], sequential prediction based [55] methods, etc. Among them, DeepMar [23] is an early global based PAR work. Considering the imbalanced data distribution, it proposes cost-sensitive cross entropy (CE) loss for classification. It also proposes a new loss to handle imbalanced data as well as a new attention mechanism. LGNet [28] assigns attribute-specific weights to local features based on the affinity between pre-extracted proposals and attribute locations. Hydraplus-Net [31] proposes an attention based model and exploits the global and local contents with multi-level feature fusion of a single pedestrian image. ALM [47] aims at learning attribute-aware representation through attribute localization. Attribute-aware attention model [11] exploits the correlation between global features and attribute-specific features and utilize it to generate attention mask in a reciprocal manner. Localizing by describing [30] learns the bounding boxes related to the location of attributes explicitly using REINFORCE algorithm with a designed reward function in a weakly supervised manner. [39] designs an attention mechanism for aggregating multi-scale features as well as a loss function similar to focal loss [24] in order to tackle the imbalanced data problem. GRL [55] proposes a RNN based grouping recurrent learning method that exploits the intra-group mutual exclusion and inter-group correlation. FAR can be also divided into part-based and holistic approaches [38, 12]. + +ReID aims at matching a target person in a set of query pedestrian images. A great amount of deep learning based ReID works provide promising solutions [48, 8, 4, 2, 9, 37]. A bunch number of existing methods rely on exploiting discriminative features, which is in the same spirit as fine-grained recognition. Attributes and ReID are highly correlated pedestrian visual appearance representations, but vary + +![](images/4649877b0fd0850533c271cfbb3e434be0a24a6e7199f7aa30a75bc45b390112.jpg) +(a) HFE Framework + +![](images/81d8f79bbc98d7343863d69e74b254b697e6783de8d3ad4dac9b6c7e202fd7e7.jpg) +(b) Triplet Selection + +![](images/53d9e36dcef4c78e24f309e9180e9d2cf9cd0c51811749af6d9dd93128cfbf15.jpg) +(c) Quintuplet Selection +Figure 2. (a) Overview of the proposed hierarchical feature embedding (HFE) framework, it consists of a backbone model, attached by $M$ branches for $M$ attributes. We calculate the CE loss and HFE loss based on the quintuplet selection in each branch. (b) and (c) are triplet and quintuplet selection respectively, where orange and blue represent the different attribute classes. + +in semantics and granularities. Even though they are different tasks, the common characteristic can be beneficial to both of them, which is exploiting discriminative features. And therefore they are reasonable to be dealt with jointly. Some works utilize both information for multi-task learning [42] or assisting the main task [25, 27]. The methods can be summarized in two categories: (1) shared backbone and task-independent branches (2) task-independent models and combining high level features in some way (e.g., concatenated FC). For example, APR [25] learns ReID embedding and pedestrian attributes simultaneously, sharing the same backbone and owning classification FC layers respectively. UF [42] trains two different models for two tasks and concatenates branches to one identity vector for ReID. These methods combine these two kinds of features to some extent. However incorporating them into the coefficient feature representation indiscriminately is less powerful since attribute recognition and ReID are essentially divergent. Persons with similar attributes can also be different identities. Therefore a more rational way of combining both information is required. + +# 2.2. Metric Learning + +The objective of metric learning [54, 17] is to learn a proper metric feature space so that the distances between similar samples reduce and that of dissimilar samples enlarge. While traditional metric learning algorithms [19] are based on linear transformation, nonlinear models, etc, due to the recent advances in deep learning, Convolutional Neural Networks have been a powerful tool to learn a task-specific metric and achieved impressive results in a wide range of tasks. Many metric learning algorithms have been proposed in image retrieval [50], ReID [5], face recognition [40, 44, 29, 53], etc. Representative methods are contrastive loss and triplet loss. Contrastive loss [10] restricts + +pair inputs and results in distances between similar pairs as close as possible and that of dissimilar pairs to be larger than margin. Triplet loss [40] applies triplet as input and ensures the difference between the distance of (anchor, negative) feature and (anchor, positive) feature is larger than margin. Beyond triplet loss, quadruplet loss [5] and quintuple loss [13] are also introduced to improve performance. Center loss [52] is designed for face recognition strives to push samples to their respective clusters centers. We propose HFE loss by applying inter-class and intra-class triplet losses for fine-grained constraints. + +# 3. Proposed Method + +Problem Definition. Given $N$ images $\{I_1, I_2, \dots, I_N\}$ and each image $I_j$ has $M$ visual attribute tags $y_j = \{y_{j1}, y_{j2}, \dots, y_{jM}\}$ together with ReID label $l_j$ . The images from the same person are labelled with identical attributes, i.e., $\forall_{l_i = l_j} y_i = y_j$ . ReID auxiliary attribute recognition aims at training a model containing the attribute and ID information to predict the attributes $y_k$ for the characteristic of the person in an unseen image $I_k$ . + +Network Architecture. As shown in Fig. 2 (a), the proposed hierarchical feature embedding (HFE) network consists of a backbone model, to which $M$ branches for $M$ attributes are attached. In the shared backbone, the model learns a common feature embedding for all attributes. For each attribute, we construct branches respectively for two reasons: (1) Different attributes, such as age and gender, should own their specific feature embeddings. (2) We construct metric loss for each attribute in their own feature spaces, which can not be applied on a shared feature space. For example, there are two images $I_{1}, I_{2}$ from different IDs, and the attributes are (long hair, carrying backpack) and (long hair, no backpack). We should pull them closer for hair length feature while push them away for backpack + +feature. Each attribute branch contains Conv-BN-ReLU-Pooling-FC sequential layers. We calculate the Cross Entropy (CE) loss and metric loss on each branch. + +Loss Computation. We apply CE loss for attribute classification (Eq. 1) as most works do. Besides, an HFE loss is utilized for auxiliary metric learning with weight $w$ (Eq. 2). HFE loss consists of inter-triplet loss, intra-triplet loss and Absolute Boundary Regularization, which will be introduced in the next section. + +$$ +L _ {C E} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {M} y _ {i j} \log \left(p _ {i j}\right) + \left(1 - y _ {i j}\right) \log \left(1 - p _ {i j}\right) \tag {1} +$$ + +$$ +L o s s = L _ {C E} + w L _ {H F E} \tag {2} +$$ + +# 3.1. Hierarchical Feature Embedding + +Triplet Loss. Triplet loss has been widely used for metric learning. As shown in Fig. 2 (b), it trains on a series of triplets $\{x_i^a, x_i^p, x_i^n\}$ , where $x_i^a$ and $x_i^p$ are image features from the same label, and $x_i^n$ from a different label. $a, p$ and $n$ are abbreviations of anchor, positive and negative sample respectively. The formulation is as follows: + +$$ +L _ {t r p} = \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ d \left(x _ {i} ^ {a}, x _ {i} ^ {p}\right) - d \left(x _ {i} ^ {a}, x _ {i} ^ {n}\right) + \alpha \right] _ {+} \tag {3} +$$ + +Here, $d(.)$ represents the Euclidean distance, and $\alpha$ is the margin which forces the gap of $d(x_i^a,x_i^n)$ and $d(x_i^a,x_i^p)$ larger than $\alpha$ . $[z]_{+}$ means $max(z,0)$ . When the gap is larger than $\alpha$ , the triplet loss would be zero. + +Inter-class Triplet Loss. We can extend triplet loss to attribute classification scenario. As shown in Eq. 4, $x_{ij}^{a}$ is the feature of anchor sample $I_{i}$ of $j$ -th attribute, associated with the feature of a positive and negative sample in regard to $x_{ij}^{a}$ , i.e., $x_{ij}^{p3}, x_{ij}^{n1}$ . Here we define the triplet on the attribute level, and $\alpha_{1}$ is the inter-class margin. + +$$ +\begin{array}{l} L _ {i n t e r} = \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {M} \left[ d \left(x _ {i j} ^ {a}, x _ {i j} ^ {p _ {3}}\right) - d \left(x _ {i j} ^ {a}, x _ {i j} ^ {n _ {1}}\right) + \alpha_ {1} \right] _ {+} \\ y _ {i j} ^ {p _ {3}} = y _ {i j} ^ {a}, y _ {i j} ^ {n _ {1}} \neq y _ {i j} ^ {a}, l _ {i j} ^ {p _ {3}} \neq l _ {i j} ^ {a}, l _ {i j} ^ {n _ {1}} \neq l _ {i j} ^ {a} \tag {4} \\ \end{array} +$$ + +We use batch hard mode [40] for triplet selection. In each batch, we take the closest negative sample to anchor as the hard negative sample $x_{ij}^{n_1} = \arg\min_{x_{ij}^n} d(x_{ij}^a, x_{ij}^n)$ , and the farthest positive as the hard positive sample $x_{ij}^{p_3} = \arg\max_{x_{ij}^p} d(x_{ij}^a, x_{ij}^p)$ , which is called as the hard inter-class triplet loss. + +
itemattributeIDdistance
xP1ijthe samethe samefarthest
xP2ijthe samedifferentnearest
xP3ijthe samedifferentfarthest
xNijdifferentdifferentnearest
+ +Table 1. The summary of quintuplet. $x_{ij}^{a}$ is the anchor and not listed above. + +Intra-class Triplet Loss. With the attribute inter-class triplet loss, we could separate the feature embedding between classes. However, the feature embeddings in each class are still mixed up. Intuitively, the features of samples with similar appearance or the same ID should be closer than others. However, it is not easy to get such a perfect feature embedding without extra constraint on the intra-class level. To form ordered and fine-grained intra-class feature embeddings, we utilize ID information to enforce the features that belong to the same person gathered more closely. We construct the intra-class feature embedding for these two reasons: (1) The intra-class triplet loss restricts the features from the same person to gather more closely, making the embedding more robust to scene variance. (2) The hard cases for attributes but not for ID can be easily handled by ID clusters in the attribute feature embedding. Here we introduce a hard intra-class triplet loss, similar to the hard inter-class triplet loss, while the hard negative sample is replaced by the closest positive sample to the anchor with different ID but the same attribute, $x_{ij}^{p_2} = \arg\min_{x_{ij}^p} d(x_{ij}^a, x_{ij}^p)$ for $y_{ij}^p = y_{ij}^a$ , $l_{ij}^p \neq l_{ij}^a$ , and the hard positive sample is turned into the farthest positive sample with the same ID (with the same attribute definitely), $x_{ij}^{p_1} = \arg\max_{x_{ij}^p} d(x_{ij}^a, x_{ij}^p)$ for $y_{ij}^p = y_{ij}^a$ , $l_{ij}^p = l_{ij}^a$ . The intra-class triplet loss is shown in Eq. 5, and $\alpha_2$ is the intra-class margin. + +$$ +\begin{array}{l} L _ {i n t r a} = \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {M} \left[ d \left(x _ {i j} ^ {a}, x _ {i j} ^ {p _ {1}}\right) - d \left(x _ {i j} ^ {a}, x _ {i j} ^ {p _ {2}}\right) + \alpha_ {2} \right] _ {+} \\ y _ {i j} ^ {p _ {1}} = y _ {i j} ^ {a}, y _ {i j} ^ {p _ {2}} = y _ {i j} ^ {a}, l _ {i j} ^ {p _ {1}} = l _ {i j} ^ {a}, l _ {i j} ^ {p _ {2}} \neq l _ {i j} ^ {a} \tag {5} \\ \end{array} +$$ + +To maintain the structures of inter-class and intra-class feature embedding simultaneously, we incorporate the inter-class and intra-class triplet loss. As shown in Fig. 2 (c), HFE loss takes quintuplet samples $\{x_{ij}^{a}, x_{ij}^{p_{1}}, x_{ij}^{p_{2}}, x_{ij}^{p_{3}}, x_{ij}^{n_{1}}\}$ as input and manage to maintain the multiple relative relationships, $d(x_{ij}^{a}, x_{ij}^{p_{1}}) < d(x_{ij}^{a}, x_{ij}^{p_{2}}) < d(x_{ij}^{a}, x_{ij}^{p_{3}}) < d(x_{ij}^{a}, x_{ij}^{n})$ . The quintuplet is summarized in Table 1. With the constraints on both inter-class and intra-class level, we can construct a hierarchical feature embedding to incorporate attribute information as well as ID information in the attribute feature space. + +# 3.2. Absolute Boundary Regularization + +Triplet loss only restricts the difference between $d(x_{ij}^a, x_{ij}^p)$ and $d(x_{ij}^a, x_{ij}^n)$ while ignores the absolute value. The difference is dependent on the selected triplet in batch, which is hard to ensure $d(x_{ij}^a, x_{ij}^p) < d(x_{ij}^a, x_{ij}^n)$ in the whole training dataset. + +In our constraints, to guarantee attributes owing discriminative intra-class feature embeddings, we pull away $x_{ij}^{p_2}$ from $x_{ij}^{a}$ relative to $x_{ij}^{p_1}$ . Although margin $\alpha_2 < \alpha_1$ , $L_{intra}$ may interact indirectly with inter-class boundary. + +Considering these two factors, we force $d(x_{ij}^a,x_{ij}^n)$ to be larger than an absolute distance $\alpha_{3}$ , named as Absolute Boundary Regularization (ABR). + +$$ +L _ {A B R} = \frac {1}{N} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {M} \left[ \alpha_ {3} - d \left(x _ {i j} ^ {a}, x _ {i j} ^ {n}\right) \right] _ {+} \tag {6} +$$ + +We compose these three parts in Eq. 7 as HFE loss, which aims at a hierarchical feature embedding, considering not only inter-class features but also inner-class, not only relative distance but also absolute to ensure the boundary more discriminative. + +$$ +L _ {H F E} = L _ {\text {i n t e r}} + L _ {\text {i n t r a}} + L _ {A B R} \tag {7} +$$ + +# 3.3. Dynamic Loss Weight + +In the early stage of training, the feature space is not good enough for quintuplet selection. Therefore, applying a large weight for HFE loss at the beginning may amplify the noise caused by the initial model. To solve this problem, we set a small weight for HFE loss at the beginning, making the original CE loss play a major role in optimization and produce an elementary feature space. Then we enlarge the weight afterwards to refine the original feature space to be more fine-grained. So we introduce a dynamic loss weight, modifying the composite function proposed by [51] to control the weight increasing from small to large nonlinearly. In Eq. 8, $T$ means the total training iterations, and iter means the current iteration. $w_{0}$ is a given value. + +$$ +w = \left[ \frac {1}{2} \cos \left(\frac {T - i t e r}{T} \pi\right) + \frac {1}{2} \right] w _ {0} \tag {8} +$$ + +In the training process, we increase the HFE loss weight from zero to the given value, forcing the feature space to transit from origin to the improved HFE-restricted space by degrees. + +# 4. Experiment + +# 4.1. Datasets + +Market 1501 attribute dataset [25] is an extension of Market-1501 dataset [56] with person attribute annotations. + +It contains 32,668 annotated bounding boxes of 1,501 identities and 12 different types of attribute annotations for each identity. Attributes include 10 binary attribute (such as gender, hair length and sleeve length) and 3 multi-class attributes (i.e., age, upper clothing color and lower clothing color). Images are captured from six cameras and each annotated identity is present in at least two cameras. + +Duke attribute dataset [25] is an extension of DukeMTMC-ReID dataset [57] with person attribute annotations. It contains 36,411 bounding boxes of 1,404 identities and 10 different types of attribute annotations for each identity. Attributes include 8 binary attribute (such as gender, length of upper-body clothing and wearing boots) and 2 multi-class color attributes for upper clothing and lower clothing. Images are captured from eight cameras and each annotated identity is present in at least two cameras. + +CelebA [32] is a large-scale face attribute dataset with annotations of 40 binary classifications (such as eyeglasses, bangs and pointly nose). The dataset contains 202,599 images from 10,177 identities and covers large pose variations and background clutter. + +# 4.2. Evaluation + +For the first two PAR datasets, we evaluate attribute recognition performance on both class-based and instance-based level. (1) Class-based: We calculate the classification accuracy for each attribute class and report the mean accuracy of all attributes [25]. (2) Instance-based: We measure the accuracy, precision, recall and F1 score for all test samples. For accuracy, precision and recall, we first compute the scores of predicted attributes against the ground truth for each test sample image and then get the average scores over all test cases. The F1 score is computed based on precision and recall [23]. The gallery images are used as test set and we transform the multi-class attributes into binary classes [25]. + +For face attribute dataset, we evaluate class-based mean accuracy. [12] + +# 4.3. Implementation Details + +The common settings for PAR and FAR: We use Adam [18] as an optimization algorithm. The weight decay is 5e-4, batch size is 256. We random sample 64 identities with 4 images for each to form a batch. Horizontal flip is applied during the training process. We set $\alpha 1$ , $\alpha 2$ , $\alpha 3$ and $w_0$ with 0.3, 0.1, 5, and 1 respectively. + +For PAR, we exploit ResNet 50 as the backbone. The base learning rate is 2e-4 and decays exponentially after epoch 50. We train 130 epochs in total. + +For FAR, we exploit DeepID2 [43] as the backbone. To accommodate with backbone, in each attribute branch, we replace the convolutional layers with linear layers. The base learning rate is 1e-2 and we use cosine annealing schedule + +
MethodgenderhairL.slvL.lowS.clthhatB.packbagH.bagageC.upC.lowavg.
CE84.8684.5193.4990.6490.2496.0179.5874.1686.6792.6292.9992.8688.22
DeepMAR85.2485.4892.7991.3789.3795.9384.5671.5786.5394.5693.7892.9288.68
APR85.6485.6292.8792.8089.9197.1378.1275.4190.5393.1893.1892.7788.93
UF88.9478.2693.5392.1184.7997.0685.4667.2888.484.7687.587.2186.28
JCM89.782.593.793.389.297.285.286.986.287.492.493.189.73
HP Net94.7489.1193.1492.4792.0696.9487.3379.6589.2293.2893.2192.3991.13
DIAC93.3290.4393.2492.8295.6396.9886.1877.5688.8492.8894.5592.8491.27
HFE (Ours)94.8890.5194.0393.2594.1897.8890.4185.3591.4594.3794.4394.0092.90
+ +Table 2. Class-based evaluation on Market 1501 attribute dataset with the best results in bold and the second best results underlined. 'L.slv', 'L.low', 'S.clth', 'B.pack', 'H.bag', 'C.up', 'C.low' denote length of sleeve, length of lower-body clothing, style of clothing, backpack, handbag, color of upper-body clothing and color of lower-body clothing, respectively. + +
MethodgenderL.upbootshatB.packbagH.bagC.shoesC.upC.lowavg.
CE82.3386.6388.3682.9873.3180.6591.6090.9295.4091.4586.36
DeepMAR82.2687.1488.4982.1575.8482.5491.5391.3895.1892.5286.90
APR83.4787.4488.0286.9875.7982.1692.6190.6794.2397.4387.88
UF88.9493.680.1382.9787.0291.6089.6083.6593.9491.8488.33
JCM87.488.389.683.389.087.992.487.192.992.189.00
HP Net83.9187.5886.7278.9177.5483.3793.4088.9196.8197.1987.43
DIAC85.8789.7489.6390.7982.9087.8893.4790.2195.9297.1190.35
HFE (Ours)87.0289.8890.7088.6988.5091.8193.6493.8295.8597.8091.77
+ +Table 3. Class-based evaluation on Duke attribute dataset with the best results in bold and the second best results underlined. 'L.up', 'B.pack', 'H.bag', 'C.soes', 'C.up', 'C.low' denote length of sleeve, backpack, handbag, color of shoes, color of upper-body clothing and color of lower-body clothing, respectively. + +# [33]. We train 300 epochs in total. + +# 4.4. Experiments on Pedestrian Attribute Dataset + +We list the results of state-of-the-art methods on these two pedestrian attribute datasets, i.e., Market 1501 attribute dataset and Duke attribute dataset. Table 2 and Table 3 show class-based metrics and Table 4 indicate instance-based evaluations. Among the compared methods, CE means applying CE loss for attribute classification with the same backbone as ours. DeepMAR[23] applies weighted CE loss function. APR[25], UF [42] and JCM[27] are three methods combining attribute and ID information. HP Net[31] and DIAC [39] are attribute-focused methods that achieve competitive performance recently. + +With 8 Titan XP GPUs, our method costs 73.6 seconds per epoch on average for Duke dataset while the CE loss costs 61.2 seconds. Extra time consumption is only on training phase, and no additional computation is needed for inferring. + +With regard to attribute and ID joint methods, performances are improved to some extent, but are still inferior to CE for some attributes, such as 'backpack', 'boots' for APR as well as 'hair', 'color of shoes' for UF and JCM. It shows that combining attribute recognition and ReID in a shared feature space directly is harmful for some attributes. These attributes may not contribute to ReID, resulting in fewer attention by combining ReID directly. However, our + +method utilizes the ID tags in the semantics of attributes to build up a better feature embedding for attributes, therefore surpassing previous joint methods significantly. Compared with attribute-focused methods, our method achieves better results on highly identity-related attributes, such as 'gender' and 'age', as well as variant and subtle attributes, such as 'bag' and 'boots', with the extra ID information. + +Overall, Our method achieves the best performance on both datasets in five evaluation metrics, outperforming the second best results by $1.63\%$ , $2.98\%$ , $1.77\%$ , $2.34\%$ , $2.13\%$ on Market 1501 attribute dataset, and $1.42\%$ , $2.66\%$ , $1.52\%$ , $0.96\%$ , $2.23\%$ on Duke attribute dataset in average accuracy, accuracy, precision, recall and F1 respectively. + +For a more intuitive analysis, we demonstrate the recognition results for two IDs with three images each in Fig. 3. HFE achieves better performance for most attributes, especially for accessories such as bag and backpack, which are sensitive to angle and pose variations. When the attribute object is clearly visible, all three methods achieve good performance. However, when occlusion happens, HFE still predicts correctly thanks to the ID constraint, while the other two methods perform rather poorly. + +# 4.5. Ablation Study + +The advantage of HFE is its capability of learning a fine-grained comprehensive attribute feature representation involving identity information. To better illustrate this, we + +
Metric MethodMarket 1501 attribute datasetDuke attribute dataset
acc.prec.recallF1acc.prec.recallF1
CE69.2182.5578.4380.4469.0081.3977.2479.26
DeepMAR69.6582.6080.2481.4070.6781.8282.2482.03
APR70.2583.5278.9681.1870.1082.7479.0280.83
HP Net74.8285.2683.3184.2767.6382.7775.1979.79
DIAC75.0385.6483.1884.3974.0284.8583.4483.14
HFE78.0187.4185.6586.5276.6886.3784.4085.37
+ +![](images/2832994a6d70452a1793b3e406e3776d5f220285dd781d3b85ec07f9e760ff15.jpg) +Figure 3. Visualization of recognition results. Correct predictions are bounded by green box and red box otherwise. (a) and (b) are prediction results of two IDs on bag and backpack respectively, each compared by three methods. + +Table 4. Instance-based evaluation on Market 1501 attribute dataset and Duke attribute dataset with the best results in bold and the second best results underlined. + +
Metric Lossavg.acc.prec.recallF1
None88.8270.0383.1579.2781.12
Linter90.8371.8385.3580.6382.93
Lintra91.2774.6185.4383.5684.48
Linter + Lintra92.4477.0886.7384.8885.99
Linter + Lintra + ABR92.7377.5787.0085.4586.22
Linter + Lintra + ABR*92.9078.0187.4185.6586.52
Linter + Lpairwise.intra92.3076.4986.2184.5385.36
+ +Table 5. Ablation study on Market 1501 attribute dataset. * means replacing the fixed loss weight with dynamic setting. + +analyze the effectiveness of each component with quantitative comparisons and qualitative visualization. The ablation study is done on market 1501 attribute dataset. + +Quantitative Evaluation. Table 5 quantifies the benefits of our hierarchical feature embedding, absolute boundary regularization (ABR), and dynamic loss weight respectively. Based on the CE method, the performance improves distinctly with only $L_{inter}$ . While for $L_{intra}$ , the improvement is more significant than $L_{inter}$ , indicating the extra ID clusters assist attribute classification indeed. Com- + +bining $L_{inter}$ and $L_{intra}$ achieves better performance than each of them separately, demonstrating the complementarity of $L_{inter}$ and $L_{intra}$ . The combination achieves $3.62\%$ , $7.05\%$ and $4.87\%$ compared with the CE loss method for avg., acc. and F1 respectively. The improvements of ABR and the dynamic loss weight are also demonstrated in table 5. Finally, with combining all the components, HFE achieves $4.08\%$ , $7.98\%$ and $5.40\%$ improvements for avg., acc. and F1 respectively in total. + +In order to verify the necessity of setting up intra-class discriminative embedding by the triplet loss, we replace $L_{inter}$ with a simple pairwise loss which only considers IDs' intra-class compactness but no separability with different IDs. As a result, the triplet loss achieves slightly better performance, which means the inter-class separability of ID is helpful for a fined-grained feature embedding and maintaining detailed attribute information. + +Qualitative Evaluation. We proceed with qualitative evaluation in both inter-class and intra-class level. Fig. 4 demonstrates the learnt feature embedding visualization of attribute 'gender' for different loss function. The CE + +![](images/0459579fdba1192d758f4c18f91631bb0276c422594f1a48969d19dcf605abd7.jpg) +(a) $L_{CE}$ + +![](images/3712de53c52c377f81df2fded6b4e3aad56deab8ad39ee1429261b21c2743ade.jpg) +(b) $L_{CE} + L_{inter}$ + +![](images/486ff21e55ea7196d92307520b8ba14b16e86ce1790fe2f6a9499769f2a5aa34.jpg) +(c) $L_{CE} + L_{inter} + L_{ABR}$ + +![](images/989370dead21c1a2ac64a0f6642d237553312c1cf899f35621846f05fad0b174.jpg) +(d) $L_{CE} + L_{inter} + L_{intra} + L_{ABR}$ + +![](images/ac4cb02a1c38f6c158a952012eddbfbfd0dbff7298839b528795388cc5d0e637.jpg) +Figure 4. Feature embedding visualization of attribute 'gender'. Blue points represent 'female' and yellow points represent 'male'. Figures are in the same scale for fair comparison. +(a) $L_{CE}$ +Figure 5. ID clusters are visualized for two methods. Four IDs are shown. $+$ and $x$ markers with the same colors come from the identical ID. + +![](images/cbbfa8e18bef277d0459b6767f2972128fe4ad39945bcdf13c5577ab0a8382ac.jpg) +(b) $L_{CE} + L_{inter} + L_{intra} + L_{ABR}$ + +loss produces two attribute clusters but the boundary is still in mess. Obviously, applying $L_{inter}$ makes the clusters more compact and the margin between classes more distinct. Besides, adding the constraint of $L_{ABR}$ , the effect is more prominent. Furthermore, with adding $L_{intra}$ , the two classes are restricted by both inter-class and intra-class constraints, leading to tighter clusters and the most discriminating boundary. + +Besides, we evaluate the ID clustering ability and effect. As Fig. 5 shows, CE does not control the intra-class arrangements so the IDs are disorganized, whereas HFE can form fine-grained intra-class clusters by the constraint of $L_{intra}$ . We can see that from introducing the intra-class constraint, each class gathers more closely and the margin between them is much more distinct, so hierarchical feature embedding does help to classify attributes. + +
Methodacc.
FaceTracer81.12
PANDA-l85.00
LNets+ANet87.30
Walk-and-Learn88.00
Rudd et al. Moon90.94
CLMLE91.13
SSP + SSG91.80
HSAI91.81
HFE92.17
+ +Table 6. Class-based accuracy on CelebA. + +# 4.6. Experiments on Face Attribute Dataset + +To evaluate the generalization ability of our framework, we conduct the experiment on a face attribute dataset CelebA. Other state-of-the-art methods are FaceTracer [20], PANDA-1 [3], LNets+ANet [32], Walk-and-Learn [49], Rudd et al. Moon [38], CLMLE [14], SSP + SSG [16] and HSAI [12] respectively. Table 6 shows HFE achieves $92.1\%$ accuracy and outperforms all other methods. With the help of face ID information, HFE could also build up a fine-grained feature embedding for face attributes, indicating our HFE framework can be easily generalized to similar scenarios, providing a general framework for fine-grained recognition. + +# 5. Conclusion + +In this paper, we present a novel end-to-end Hierarchical Feature Embedding (HFE) framework to explore the combination of attribute and ID information in attribute semantics for attribute recognition. In HFE, each attribute-class is discriminative by the inter-class constraint. Moreover, with the supplementary ID information, we maintain the ID clusters in each attribute class by the intra-class constraint for a fine-grained feature embedding. We apply ID information in attribute semantics and refrain from combining attribute and ID information in the same feature space directly. Furthermore, our mechanism introduces a coarse-to-fine process for discriminative fine-grained feature learning. In addition, we introduce an Absolute Boundary Regularization for combining relative and absolute distance constraint. We also design a dynamic loss weight to force the feature space transiting from the origin to the improved HFE-restricted space by degrees, facilitating the performance of our model and the stability of training. Extensive ablation studies and experimental evaluations justify effectiveness of our proposed method. + +# 6. Acknowledgements + +Partial financial support by Tsinghua-Baidu collaborative project and Mercari are gratefully acknowledged. + +# References + +[1] Abrar H Abdulnabi, Gang Wang, Jiwen Lu, and Kui Jia. Multi-task cnn model for attribute prediction. IEEE Transactions on Multimedia, 17(11):1949-1959, 2015. 2 +[2] Ejaz Ahmed, Michael Jones, and Tim K Marks. An improved deep learning architecture for person re-identification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3908–3916, 2015. 2 +[3] Lubomir Dimitrov Bourdev. Pose-aligned networks for deep attribute modeling, July 26 2016. US Patent 9,400,925. 8 +[4] Tianlong Chen, Shaojin Ding, Jingyi Xie, Ye Yuan, Wuyang Chen, Yang Yang, Zhou Ren, and Zhangyang Wang. Abdnet: Attentive but diverse person re-identification. arXiv preprint arXiv:1908.01114, 2019. 2 +[5] Weihua Chen, Xiaotang Chen, Jianguo Zhang, and Kaiqi Huang. Beyond triplet loss: a deep quadruplet network for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 403–412, 2017. 3 +[6] Sumit Chopra, Raia Hadsell, Yann LeCun, et al. Learning a similarity metric discriminatively, with application to face verification. In CVPR (1), pages 539-546, 2005. 1 +[7] Yubin Deng, Ping Luo, Chen Change Loy, and Xiaou Tang. Pedestrian attribute recognition at far distance. In Proceedings of the 22nd ACM international conference on Multimedia, pages 789-792. ACM, 2014. 2 +[8] Yang Fu, Yunchao Wei, Yuqian Zhou, Honghui Shi, Gao Huang, Xinchao Wang, Zhiqiang Yao, and Thomas Huang. Horizontal pyramid matching for person re-identification. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8295–8302, 2019. 2 +[9] Ruihao Gong, Xianglong Liu, Shenghu Jiang, Tianxiang Li, Peng Hu, Jiazhen Lin, Fengwei Yu, and Junjie Yan. Differentiable soft quantization: Bridging full-precision and low-bit neural networks. In IEEE ICCV, 2019. 2 +[10] Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06), volume 2, pages 1735-1742. IEEE, 2006. 3 +[11] Kai Han, Jianyuan Guo, Chao Zhang, and Mingjian Zhu. Attribute-aware attention model for fine-grained representation learning. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 2040-2048. ACM, 2018. 2 +[12] Keke He, Yanwei Fu, Wuhao Zhang, Chengjie Wang, YuGang Jiang, Feiyue Huang, and Xiangyang Xue. Harnessing synthesized abstraction images to improve facial attribute recognition. In IJCAI, pages 733-740, 2018. 2, 5, 8 +[13] Chen Huang, Yining Li, Chen Change Loy, and Xiaou Tang. Learning deep representation for imbalanced classification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5375-5384, 2016. 3 +[14] Chen Huang, Yining Li, Change Loy Chen, and Xiaou Tang. Deep imbalanced learning for face recognition and attribute prediction. IEEE transactions on pattern analysis and machine intelligence, 2019. 8 + +[15] Emad Sami Jaha and Mark S Nixon. Soft biometrics for subject identification using clothing attributes. In IEEE International Joint Conference on Biometrics, pages 1-6. IEEE, 2014. 1 +[16] Mahdi M Kalayeh, Boqing Gong, and Mubarak Shah. Improving facial attribute prediction using semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6942-6950, 2017. 8 +[17] Furqan M Khan and Francois Bremond. Unsupervised data association for metric learning in the context of multi-shot person re-identification. In 2016 13th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), pages 256–262. IEEE, 2016. 3 +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[19] Brian Kulis et al. Metric learning: A survey. Foundations and Trends® in Machine Learning, 5(4):287-364, 2013. 3 +[20] Neeraj Kumar, Peter Belhumeur, and Shree Nayar. Facetracer: A search engine for large collections of images with faces. In European conference on computer vision, pages 340-353. Springer, 2008. 8 +[21] Neeraj Kumar, Alexander C Berg, Peter N Belhumeur, and Shree K Nayar. Attribute and simile classifiers for face verification. In 2009 IEEE 12th International Conference on Computer Vision, pages 365-372. IEEE, 2009. 1 +[22] Ryan Layne, Timothy M Hospedales, Shaogang Gong, and Q Mary. Person re-identification by attributes. In *Bmvc*, volume 2, page 8, 2012. 1 +[23] Dangwei Li, Xiaotang Chen, and Kaiqi Huang. Multi-attribute learning for pedestrian attribute recognition in surveillance scenarios. In ACPR, pages 111–115, 2015. 2, 5, 6 +[24] 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. 2 +[25] 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. 2, 3, 5, 6 +[26] Chunxiao Liu, Shaogang Gong, Chen Change Loy, and Xinggang Lin. Person re-identification: What features are important? In European Conference on Computer Vision, pages 391–401. Springer, 2012. 1 +[27] Hao Liu, Jingjing Wu, Jianguo Jiang, Meibin Qi, and Ren Bo. Sequence-based person attribute recognition with joint ctc-attention model. arXiv preprint arXiv:1811.08115, 2018. 3, 6 +[28] Pengze Liu, Xihui Liu, Junjie Yan, and Jing Shao. Localization guided learning for pedestrian attribute recognition. arXiv preprint arXiv:1808.09102, 2018. 1, 2 +[29] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherface: Deep hypersphere embedding for face recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 212-220, 2017. 3 + +[30] Xiao Liu, Jiang Wang, Shilei Wen, Errui Ding, and Yuanqing Lin. Localizing by describing: Attribute-guided attention localization for fine-grained recognition. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. 2 +[31] Xihui Liu, Haiyu Zhao, Maoqing Tian, Lu Sheng, Jing Shao, Shuai Yi, Junjie Yan, and Xiaogang Wang. Hydraplus-net: Attentive deep features for pedestrian analysis. In Proceedings of the IEEE international conference on computer vision, pages 350-359, 2017. 2, 6 +[32] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE international conference on computer vision, pages 3730-3738, 2015. 2, 5, 8 +[33] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016. 6 +[34] Hieu V Nguyen and Li Bai. Cosine similarity metric learning for face verification. In Asian conference on computer vision, pages 709-720. Springer, 2010. 1 +[35] Seyoung Park, Bruce Xiaohan Nie, and Song-Chun Zhu. Attribute and-or grammar for joint parsing of human pose, parts and attributes. IEEE transactions on pattern analysis and machine intelligence, 40(7):1555-1569, 2017. 1 +[36] Peixi Peng, Yonghong Tian, Tao Xiang, Yaowei Wang, and Tiejun Huang. Joint learning of semantic and latent attributes. In European Conference on Computer Vision, pages 336-353. Springer, 2016. 1 +[37] Haotong Qin, Ruihao Gong, Xianglong Liu, Mingzhu Shen, Ziran Wei, Fengwei Yu, and Jingkuan Song. Ir-net: Forward and backward information retention for highly accurate binary neural networks. In IEEE CVPR, June 2020. 2 +[38] Ethan M Rudd, Manuel Günther, and Terrance E Boult. Moon: A mixed objective optimization network for the recognition of facial attributes. In European Conference on Computer Vision, pages 19-35. Springer, 2016. 2, 8 +[39] Nikolaos Sarafianos, Xiang Xu, and Ioannis A Kakadiaris. Deep imbalanced attribute classification using visual attention aggregation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 680-697, 2018. 2, 6 +[40] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 815-823, 2015. 3, 4 +[41] Patrick Sudowe, Hannah Spitzer, and Bastian Leibe. Person attribute recognition with a jointly-trained holistic cnn model. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 87-95, 2015. 2 +[42] Chenxin Sun, Na Jiang, Lei Zhang, Yuehua Wang, Wei Wu, and Zhong Zhou. Unified framework for joint attribute classification and person re-identification. In International Conference on Artificial Neural Networks, pages 637–647. Springer, 2018. 3, 6 +[43] Yi Sun, Yuheng Chen, Xiaogang Wang, and Xiaou Tang. Deep learning face representation by joint identification-verification. In Advances in neural information processing systems, pages 1988–1996, 2014. 5 + +[44] Yi Sun, Ding Liang, Xiaogang Wang, and Xiaou Tang. Deepid3: Face recognition with very deep neural networks. arXiv preprint arXiv:1502.00873, 2015. 3 +[45] Yi Sun, Xiaogang Wang, and Xiaou Tang. Hybrid deep learning for face verification. In Proceedings of the IEEE international conference on computer vision, pages 1489-1496, 2013. 1 +[46] Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1701-1708, 2014. 1 +[47] Chufeng Tang, Lu Sheng, Zhaoxiang Zhang, and Xiaolin Hu. Improving pedestrian attribute recognition with weakly-supervised multi-scale attribute-specific localization. In Proceedings of the IEEE International Conference on Computer Vision, pages 4997-5006, 2019. 2 +[48] Guangcong Wang, Jianhuang Lai, Peigen Huang, and Xiaohua Xie. Spatial-temporal person re-identification. pages 8933–8940, 2019. 2 +[49] Jing Wang, Yu Cheng, and Rogerio Schmidt Feris. Walk and learn: Facial attribute representation learning from egocentric video and contextual data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2295-2304, 2016. 8 +[50] Jiang Wang, Yang Song, Thomas Leung, Chuck Rosenberg, Jingbin Wang, James Philbin, Bo Chen, and Ying Wu. Learning fine-grained image similarity with deep ranking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1386-1393, 2014. 3 +[51] Yiru Wang, Weihao Gan, Wei Wu, and Junjie Yan. Dynamic curriculum learning for imbalanced data classification. Proceedings of the IEEE international conference on computer vision, 2019. 5 +[52] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In European conference on computer vision, pages 499-515. Springer, 2016. 3 +[53] Yudong Wu, Yichao Wu, Ruihao Gong, Yuanhao Lv, Ken Chen, Ding Liang, Xiaolin Hu, Xianglong Liu, and Junjie Yan. Rotation consistent margin loss for efficient low-bit face recognition. In IEEE CVPR, June 2020. 3 +[54] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z Li. Deep metric learning for person re-identification. In 2014 22nd International Conference on Pattern Recognition, pages 34–39. IEEE, 2014. 3 +[55] Xin Zhao, Liufang Sang, Guiguang Ding, Yuchen Guo, and Xiaoming Jin. Grouping attribute recognition for pedestrian with joint recurrent learning. In IJCAI, pages 3177-3183, 2018. 2 +[56] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Proceedings of the IEEE international conference on computer vision, pages 1116–1124, 2015. 5 +[57] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In Proceedings of the IEEE International Conference on Computer Vision, pages 3754–3762, 2017. 5 \ No newline at end of file diff --git a/hierarchicalfeatureembeddingforattributerecognition/images.zip b/hierarchicalfeatureembeddingforattributerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..70640582e3619a6c36365b53e7af9aa2cf56f005 --- /dev/null +++ b/hierarchicalfeatureembeddingforattributerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98017741343508788681e327c29deed522f896b24cf96e489ab0d296f3bbc8f1 +size 525789 diff --git a/hierarchicalfeatureembeddingforattributerecognition/layout.json b/hierarchicalfeatureembeddingforattributerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..eba0bc7ddb5c01b49e62e27a39b978381d0644ff --- /dev/null +++ b/hierarchicalfeatureembeddingforattributerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a2cdac6977b6147cd5a338b2fb16fc4a8cb5773f8fd6ed87f3dc08698bb60d6 +size 405843 diff --git a/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_content_list.json b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c146cdb30ff418bc58a074a802de1075c608c0c9 --- /dev/null +++ b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b37cb0c05a1d6f509867543543c4c5f23f77358b98036ab7b3d1ba62fa416d7b +size 75754 diff --git a/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_model.json b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_model.json new file mode 100644 index 0000000000000000000000000000000000000000..86271afd0cdbf1a18399ffcebdcb0fda748deaab --- /dev/null +++ b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba91735ef0ae54f633171e0955d0c3ce697227c2975e01fe65d8db817ffe3dc3 +size 92737 diff --git a/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_origin.pdf b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2d4b116d3673a641a361e54e8a42c3bad05e865d --- /dev/null +++ b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/de21c2af-5184-4a93-beeb-0f070cdd4a54_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:973912e14930b3c7acbae6ddaf52a54f74ab00c87adbfccf76be3236d94f2feb +size 830704 diff --git a/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/full.md b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..412b250f9070c165761b5a2e7f8bf8b5d8ce4d4d --- /dev/null +++ b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/full.md @@ -0,0 +1,377 @@ +# Hierarchical Graph Attention Network for Visual Relationship Detection + +Li Mi, Zhenzhong Chen* +School of Remote Sensing and Information Engineering, Wuhan University, China +{milirs,zzchen}@whu.edu.cn + +# Abstract + +Visual Relationship Detection (VRD) aims to describe the relationship between two objects by providing a structural triplet shown as $<$ subject-predicate-object>. Existing graph-based methods mainly represent the relationships by an object-level graph, which ignores to model the triplet-level dependencies. In this work, a Hierarchical Graph Attention Network (HGAT) is proposed to capture the dependencies on both object-level and triplet-level. Object-level graph aims to capture the interactions between objects, while the triplet-level graph models the dependencies among relation triplets. In addition, prior knowledge and attention mechanism are introduced to fix the redundant or missing edges on graphs that are constructed according to spatial correlation. With these approaches, nodes are allowed to attend over their spatial and semantic neighborhoods' features based on the visual or semantic feature correlation. Experimental results on the well-known VG and VRD datasets demonstrate that our model significantly outperforms the state-of-the-art methods. + +# 1. Introduction + +Visual relationship detection serves as a middle-level task to bridge the gap between low-level image recognition task, such as object detection [24, 9], and high level image understanding tasks, such as image captioning[1], visual question answering[45, 15], visual reasoning [27] and scene graph generation [19, 43]. Based on single object detection, visual relationship detection aims to accurately localize a pair of objects and determine the predicate between them by providing several structural, comprehensive triplets, shown as . + +Previous methods on VRD focus on modelling the relationship between a pair of objects independently, which ignore the global context information of an image scene. Recently, graph structures [2, 10] are introduced to capture the context information by an object-level graph where the + +![](images/c7935b37aa55f489966a5523ffd47b7281c57e24182e1795b660063829338646.jpg) +Figure 1. The illustration of the proposed Hierarchical Graph Attention Network (HGAT). The object-level graph captures the interactions among objects while the triplet-level graph models the interactions among relation triplets explicitly. + +nodes denote objects and edges represent predicates. However, long-dependencies on triplet-level are excluded. The long dependencies among triplets serve as important context information for VRD. For example, some triplets are more likely to co-occur with each other even if they do not contain the same objects: $\langle \text{person-ride-bike} \rangle$ is more likely to be associated with $\langle \text{car-on-street} \rangle$ than $\langle \text{elephant-on-grass} \rangle$ . Such dependencies among triplets cannot be modeled explicitly by object-level graph. To address this problem, a Hierarchical Graph Attention Network (HGAT) is proposed to model the dependencies on both object-level and triplet-level. As is shown in Figure 1, the task of predicting relation triplets is divided into two stages: object-level reasoning and triplet-level reasoning. The model joints the information to give a final prediction. + +In addition, constructing the graph only based on spatial correlation brings some inappropriate edges, such as redundant edges or missing edges. For example, the two people in Figure 2 (a) are next to each other, resulting in a redundant edge (e.g. ) when establishing the graph. Another example in Figure 2 (b) shows a missing edge between pairwise objects (e.g. ). Because the distance between the two bounding boxes exceeds the threshold, the edge between these two bounding boxes will be considered non-existent. Furthermore, since the graph structure is fixed in the existing method, the errors in the original graph structure will be + +![](images/27ad524a148ceb02fb0fe230413b61bcf5d376f949a2b688a9494393015fb1ed.jpg) + +![](images/997ba127e0aaa30524b19ffd5485602eeb60015990fda2e41291712c18908235.jpg) + +![](images/c0c779f91818dc94bda75582df90e496acc47990f0f0583c0d12f187010b1d74.jpg) +(a) +Figure 2. Problems of graph built on spatial correlation. (a) and (b) shows the redundant edge and the missing edge of object-level graph constructed based on spatial correlation, respectively. + +accumulated during reasoning. To address these problems, prior knowledge and attention mechanism are introduced to the graph. Firstly, the graph is constructed based on the spatial correlation and semantic correlation which will connect some of the missing edges based on the prior knowledge. Then, with graph attention mechanism, the nodes are allowed to attend over their spatial and semantic neighbors' features by assigning learnable weights to different nodes based on the visual or semantic feature correlation. The detrimental effects of redundant edges can be alleviated by reducing the attention weights. + +The main contribution of the paper can be summarized as: + +- A Hierarchical Graph Attention Network (HGAT) is proposed to explore the relationship triplet on both object-level and triplet-level. By explicitly modeling the dependencies among triplets, more context information can be incorporated in the relationship reasoning. +- Prior knowledge and attention mechanism are introduced to the graph to alleviate the detrimental effects of inaccurate initial graph. With the attention mechanism, the nodes are allowed to attend over their spatial and semantic neighbors' feature by assigning learnable weights to these nodes based on the visual or semantic feature correlation. + +# 2. Related Work + +# 2.1. Visual Relationships Detection + +Visual relationship detection offers a comprehensive scene understanding of an image by providing several + +triplets of . Early work assigned a unique class to each relationship triplet [6, 26, 22], however, the search space is explosive. Assume that there are $N$ object categories and $K$ predicate categories. Then the search space of object detection is $N$ and there will be $N^2 K$ relationship categories when representing relationship as . Previous work [16, 13, 44, 14, 42] tackled this problem by separating the prediction process or applying multiple features. Unlike directly taking the triplet as a whole learning task, the separate method predicts the objects and predicates separately. In that way, different relationships (e.g. , ) are merged into the same category if they share the same predicate, reducing the search space to $N + K$ . The cost of separating prediction is that samples within the same predicate category are highly diverse. To better distinguish the predicates, researchers represented objects in visual, spatial and semantic cues which greatly improve the model performance [16, 13, 38]. In these methods, interactions between a pair of objects can be captured but global context information cannot be modeled explicitly. To tackle this problem, graph structures are utilized to explore the connections and constraints between objects [2, 15, 10]. + +# 2.2. Graph Structure in VRD + +Graph Neural Networks (GNNs) were introduced in Gori et al. [8] and Scarselli et al. [28] as a generalization of recursive neural networks that can directly deal with a more general class of graphs [30]. Typical graph structures such as Graph Convolutional Network (GCN) [11] were used to learn representations for nodes. Nodes are able to attend over their semantic or spatial neighborhoods features in a pre-defined graph structure, which achieved significant success in various fields, such as link prediction [31], scene graph generation [34, 33] and human object interaction [21]. However, the graph convolution operation is restricted in the pre-defined graph structure [30, 18]. Velickovic et. al [30] proposed a Graph Attention Network (GAT) to specify arbitrary weights to the neighbors following self-attention strategy, which gets rid of the limitations of the fixed graph structure. + +Graph structures have received an increasing amount of attention in VRD. Specifically, Cui et al. [2] proposed a context-dependent diffusion network to capture the interactions between different object instances through word semantic graph and visual scene graph. Yao et al. [36] explored the semantic and spatial relationship between objects by GCN for image captioning. Hu et al. [10] introduced a message-passing-style algorithm to propagate the contextual information. Object-level graph models the interactions among objects. However, the triplet-level dependencies are not fully exploited. In this work, a Hier- + +![](images/d380bf32d6a2d3d5cf8212d198cba85135d290b29c74e827e4b73ad38513b65a.jpg) +Figure 3. The framework of the Hierarchical Graph Attention Network (HGAT). The proposed method can be divided into three submodules: Feature Representation Module, Hierarchical Graph Attention Network and Predicate Prediction Module. In the feature representation module (Section 3.2), multi-cues are utilized to represent objects in an image. The proposed HGAT(Section 3.3) conducts object-level reasoning and triplet-level reasoning through the object-level graph and the triplet-level graph, respectively. The predicate prediction module (Section 3.4) in charge of predicting relationships. + +archical Graph Attention Network (HGAT) is proposed to deeply exploit the dependencies on both object-level and triplet-level. With explicitly model the dependencies among triplets, more context information and global constraint can be incorporated in the relationship reasoning. In addition, graphs in previous work are constructed based on the spatial correlation of objects, which can be improved by taking semantic correlation into consideration. + +# 2.3. Prior Knowledge in VRD + +Prior knowledge has been widely utilized as background information to assist the tasks in computer vision [5, 41, 45] and natural language processing [39, 4, 29, 32]. Rohrbach et al. [25] showed that external knowledge of attributes contributed to zero-shot learning by associating classes to attributes and recognizing instances of unseen classes. In VRD, Lu et al. [16] first leveraged language prior from semantic embeddings to finetune the likelihood of a predicted relationship. Yu et al. [40] proposed a teacher-student framework to incorporate predicate-object pair co-occurrences which are collected from both external and internal data. Plesse et al. [20] designed a framework to estimate the relevance if object pairs by incorporating prior knowledge. Unlike the previous methods that utilized prior knowledge to restrict the probability or adjust the prediction, prior knowledge contributes to the graph construction process and participates the relationship inference directly. + +# 3. Hierarchical Graph Attention Network for VRD + +# 3.1. Method Overview + +# 3.1.1 Problem Formulation + +For a given image $I$ , visual relationship detection aims to provide several relation triplets shown as $<$ subject-predicate-object>. Let $O$ and $P$ denote the object set and predicate set, respectively, then the relationship set can be defined as $R = \{r(s,p,o)|s,o\in O,p\in P\}$ , where $s,p$ and $o$ are respectively the subject, predicate and object in a relationship triplet $(s,p,o)$ . The probabilistic model of visual relationship detection can be formulated as: + +$$ +P (r) = P (p \mid s, o) P (s \mid b _ {s}) P (o \mid b _ {o}). \tag {1} +$$ + +Here $b_{s}$ and $b_{o}$ are two individual bounding boxes for subject and object, which compose an object pair. $P(s|b_{s})$ and $P(o|b_{o})$ represent the subject confidence score and object confidence score with bounding boxes. + +# 3.1.2 Framework + +As is shown in Figure. 3, the proposed method can be divided into three sub-modules: Feature Representation Module (FRM), Hierarchical Graph Attention Network (HGAT) and Predicate Prediction Module (PPM). In the Fea + +ture Representation Module (Section 3.2), an object detector generates object proposals with bounding boxes and labels, then the visual, spatial and semantic cues of each object and the corresponding relative feature of pairwise objects are provided. Next, the proposed HGAT(Section 3.3) conducts object-level reasoning and triplet-level reasoning by a hierarchical graph structure. For each node, the graph attention mechanism assigns reasonable weights to its neighbors and obtains the final node representation. The predicate prediction module (Section 3.4) takes charge of predicting relationships based on the existing graph. + +# 3.2. Feature Representation + +The Feature Representation Module takes an image as input and outputs are bounding boxes with visual, spatial and semantic features. + +# 3.2.1 Proposal Generation + +Inspired by previous work in VRD [16, 13, 37], the Faster R-CNN [24] with VGG-16 backbone is utilized to locate and detect objects. Specifically, we first sample 300 proposal regions generated by the RPN with IoU $>0.7$ . Then we perform the NMS with IoU $>0.4$ on the 300 proposals. The retained proposals with confidence score higher than 0.05 are kept as the detected objects in the image. After that, the locations and labels for all possible objects are collected. Note that, we choose Faster R-CNN with VGG-16 to compare our method with the previous methods fairly, however, the proposed method can be applied to any object detector such as Fast RCNN [7] and YOLO [23]. + +# 3.2.2 Feature Extraction + +Single feature cannot represent the complex relationship between pairwise objects. Take the prediction of spatial interactions, such as 'near', 'under', and 'on', as an example. If we only use visual appearance to represent objects, the prediction will be challenging due to the lack of spatial information. In this paper, visual appearance, spatial feature and semantic embedding are considered in the feature extraction. + +Visual Feature. Visual appearance plays an important role in distinguishing objects and understanding relations. For a relationship instance $(s, p, o)$ , $b_{s}$ , $b_{so}$ and $b_{o}$ denote the bounding box of its corresponding subject, predicate and object. Note that $b_{so}$ refers to the union of $b_{s}$ and $b_{o}$ with a small margin to capture the surrounding context. Following the previous work [16, 13], we adopt VGG-16 as a backbone and extract the RoI Pooling features of $b_{s}$ , $b_{so}$ and $b_{o}$ from two fully connected layers. The visual feature can be denoted as $v$ . + +Spatial Feature. To complement the visual information, the spatial feature is regarded as an indispensable feature for visual relationship detection. To get the relative spatial feature of bounding boxes, we adopt the idea of box regression [10]. Assume $\Delta (b_i,b_j)$ denote the box delta that regresses the bounding box $b_{i}$ to $b_{j}$ . Then $\mathrm{dis}(b_i,b_j)$ and iou $(b_{i},b_{j})$ denote the normalized distance and IoU between $b_{i}$ and $b_{j}$ . The union region of $b_{i}$ and $b_{j}$ is denoted as $b_{ij}$ . The relative spatial location of the subject and object can be defined as: + +$$ +l _ {i j} = \left[ \Delta \left(b _ {i}, b _ {j}\right); \Delta \left(b _ {i}, b _ {i j}\right); \Delta \left(b _ {j}, b _ {i j}\right) \right. \tag {2} +$$ + +$$ +\left. \operatorname {i o u} \left(b _ {i}, b _ {j}\right); \operatorname {d i s} \left(b _ {i}, b _ {j}\right) \right]. +$$ + +Semantic Feature. Different relationships may exist between the same pair of objects (e.g. , ), meanwhile, the same predicate may be used to describe different types of object pairs (e.g. , ). Language priors serve as a distinguishing feature to exploit the semantic context of an image. We adopt a semantic embedding layer to map the object category $C$ into word embedding $S$ . Then the embedding vectors of subject and object are jointed to learn the representation of object pair through a fully connected layer. Note that the parameters of object categories are initialized with the pre-trained word representations such as word2vec [17]. The semantic feature can be represented as $s$ . + +# 3.2.3 Prior Knowledge Distillation + +To represent semantic consistency, an immediate approach is to utilize the cumulative number of co-occurrences for each pair of concepts from the prior knowledge data. Assume that there are $N$ instances in the prior knowledge data in total. Let $n(c_i, c_j)$ denote the frequency of co-occurrences for concepts $c_i$ and $c_j$ , and $n(c_i)$ denote the frequency of $c_i$ . Then, we define semantic consistency based on point-wise mutual information. Specifically, when $c_i$ and $c_j$ occur independently, or they co-occur less frequently than if they were to occur independently, the value would be zero; otherwise, the value is positive. Bounded by $\log N$ from the above, if the two concepts are more likely to occur together than appear independently, the value will get larger. This definition can be formulated as: + +$$ +S _ {c _ {i}, c _ {j}} = \max \left(\log \frac {n (c _ {i} , c _ {j}) N}{n (c _ {i}) n (c _ {j})}, 0\right). \tag {3} +$$ + +The semantic consistency among triplets denoted as $S_{r_k,r_l}$ is calculated as the same way. The prior knowledge in our experiments is from relationship detection datasets. + +# 3.3. Hierarchical Graph Attention Network + +To model the dependencies on both object-level and triplet-level in an image, two types of the graph are consid- + +![](images/9deaf926cbd3ec3410349e5aef17504988ee61e241439f770195e8f2a87774ea.jpg) +Figure 4. The structure of attention mechanism. With attention mechanism, nodes are allowed to attend over their spatial and semantic neighbors' feature by assigning learnable weights to these nodes based on the visual or semantic feature correlation. + +ered. One is the object-level graph, which models the interactions among objects and conducts object-level reasoning. The other is triplet-level graph, which is constructed based on the interactions among triplets and conducts triplet-level reasoning. There are two types of attention according to these two graphs. + +# 3.3.1 Object-level Reasoning + +Object-level Graph Construction. Object-level graph is constructed to capture the interactions between pairwise objects. The object-level graph $\mathcal{G}_o = \{\mathcal{V}_o, \mathcal{E}_o\}$ contains a node set $\mathcal{V}_o$ and an edge set $\mathcal{E}_o$ . Each node $n_i \in \mathcal{V}_o$ represents an object, which is composed of a bounding box $b_i$ and a corresponding attribute embedding. Each edge $e_{ij}^o \in \mathcal{E}_o$ denotes the predicate between node $n_i$ and $n_j$ . The relationship triplet $(n_i, e_{ij}^o, n_j)$ and $(n_j, e_{ji}^o, n_i)$ represent two different instances, which are distinguished by a directed object-level graph. + +Two factors are considered in establishing the graph: spatial correlation and semantic correlation. We use $\mathrm{dis}(b_i, b_j)$ and $\mathrm{iou}(b_i, b_j)$ to evaluate the spatial correlation of two object proposals. The spatial graph can be defined as: + +$$ +e _ {i j} ^ {s p} = \left\{ \begin{array}{l l} 1, & \operatorname {d i s} \left(b _ {i}, b _ {j}\right) < t _ {1} \text {o r} \operatorname {i o u} \left(b _ {i}, b _ {j}\right) > t _ {2} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {4} +$$ + +where $t_1$ and $t_2$ are two thresholds which we set as 0.5 in our experiments. On the other hand, to evaluate the semantic correlation of pairwise objects, the semantic graph is established based on semantic consistency. + +$$ +e _ {i j} ^ {s e} = \left\{ \begin{array}{l l} 1, & S _ {c _ {i}, c _ {j}} > t _ {3} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {5} +$$ + +where $t_3$ is set as 0 in our experiments. Finally, the object-level graph is constructed as: + +$$ +e _ {i j} ^ {o} = e _ {i j} ^ {s p} \oplus e _ {i j} ^ {s e}, \tag {6} +$$ + +where $\oplus$ denotes OR operation. + +Object-level Attention. If we regard the joint feature of visual and semantic as the attribute of the node, the attribute vector $m_i$ can be represented as $m_i = \operatorname{concat}(v_i, s_i)$ . Graph attention mechanism then can be formulated as: + +$$ +\boldsymbol {m} _ {i} ^ {\star} = \sigma \left(\sum_ {j \in \mathcal {N} _ {i}} \alpha_ {i j} \cdot \left(\mathbf {W} _ {d i r (i, j)} ^ {o} \boldsymbol {m} _ {j} + \boldsymbol {b}\right)\right), \tag {7} +$$ + +where $m_i^\star$ represents the generated hidden features. The definition of the attention coefficient $\alpha_{ij}$ is defined as: + +$$ +\alpha_ {i j} = \frac {\exp \left(\left(\mathbf {U} ^ {o} \boldsymbol {m} _ {i}\right) ^ {\top} \cdot \mathbf {V} _ {d i r (i , j)} ^ {o} \boldsymbol {m} _ {j} + \boldsymbol {c}\right)}{\sum_ {j = 1} ^ {K} \exp \left(\left(\mathbf {U} ^ {o} \boldsymbol {m} _ {i}\right) ^ {\top} \cdot \mathbf {V} _ {d i r (i , j)} ^ {o} \boldsymbol {m} _ {j} + \boldsymbol {c}\right)}, \tag {8} +$$ + +where $\mathbf{U}^o, \mathbf{V}^o \in \mathbb{R}^{d_m \times (d_v + d_s)}$ are projection matrices and $b, c$ are bias terms. $dir(i,j)$ selects the transformation matrix based on the directionality of each edge. + +# 3.3.2 Triplet-level Reasoning + +Triplet-level Graph Construction. Some relationship is more likely to co-occur with each other. The other graph is constructed to capture such dependencies between relationship instances. Suppose there are node set $\mathcal{V}_t$ for possible relationship triplets and edge set $\mathcal{E}_t$ for the interactions between triplets. The triplet-level graph $\mathcal{G}_t = \{\mathcal{V}_t, \mathcal{E}_t\}$ can be defined as: + +$$ +e _ {k l} ^ {t} = \left\{ \begin{array}{l l} 1, & S _ {r _ {k}, r _ {l}} > t _ {4} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {9} +$$ + +where $t_4$ is set to 0 in our experiments. Note that the triplet-level graph is an undirected graph. + +Triplet-level Attention. Triplet graph is constructed to capture the interactions among triplets. The attribute feature of node $k$ is the visual feature of triplet $k$ denoted as $h_k$ . The generated hidden feature can be formulated as: + +$$ +\boldsymbol {h} _ {k} ^ {\star} = \sigma \left(\sum_ {l \in \mathcal {N} _ {k}} \alpha_ {k l} \cdot \mathbf {W} ^ {t} \boldsymbol {h} _ {l}\right), \tag {10} +$$ + +where $h_k^*$ denotes the hidden state representation of triplet $k$ . + +$$ +\alpha_ {k l} = \frac {\exp \left(\left(\mathbf {U} ^ {t} \boldsymbol {h} _ {k}\right) ^ {\top} \cdot \mathbf {V} ^ {t} \boldsymbol {h} _ {l}\right)}{\sum_ {l \in \mathcal {N} _ {k}} \exp \left(\left(\mathbf {U} ^ {t} \boldsymbol {h} _ {k}\right) ^ {\top} \cdot \mathbf {V} ^ {t} \boldsymbol {h} _ {l}\right)}, \tag {11} +$$ + +where $\mathbf{U}^t, \mathbf{V}^t \in \mathbb{R}^{d_h \times (d_v + d_v)}$ are projection matrices. + +# 3.4. Predicate Prediction + +The inputs of Predicate Prediction Module are features from both object-level reasoning and triplet-level reasoning, while the outputs are several relationship triplets shown + +![](images/57e23d8ad4e3a45411d05803c4351f538016f69dcfa5ae4621c68b1fa4787820.jpg) + +![](images/ed56e581b8d61f35453c920277b9527ef0d0edc4f133db7553760532d4315739.jpg) + +# HGAT + +person wear jacket person has phone person near person plant behind person bag on bench + +![](images/f899952fc398fa092da20c207f265f97610de8dfaf6ac1aabf31717d3266ab39.jpg) + +![](images/594d6193f984d41d580073d1313b63ca5685d7c80cbb44decf8a05fffdc7bb0b.jpg) + +![](images/befa03dc7041d9d6faad82f663a76431c3f6a6abca3017825e974aa6262f4309.jpg) +Figure 5. The comparison results of baseline model and HGAT. Green, yellow and red color denotes the correct triples, correct but unannotated triples and failed triples. + +![](images/7e4a625a870b32829b34570e08f0dcdf772661a188017e4a2431d716e6037bef.jpg) + +![](images/d402e77bd905a27d61bae737807d7ac1194e310e478e7389d15727b6df257a3f.jpg) + +![](images/54b80cff8e52898b74cba1f0ea054492fe7fb3c7e778fb7480b6e49e70222e2a.jpg) + +
FeaturePredicate DetRelationship Det
k=1k=70k=1k=70
R@50R@100R@50R@100R@50R@100R@50R@100
Baseline48.8648.8686.2194.3217.9021.5419.2725.15
Base+SC50.2150.2187.5595.4319.1522.8221.4126.10
Base+ATT52.1652.1688.3695.6819.7723.2621.5626.80
Base+TL52.4452.4488.6995.8819.9923.4621.6626.90
Base+SC+ATT54.5554.5588.7695.8920.2123.6521.7426.98
Base+SC+TL54.8954.8989.0496.2120.5623.4522.1227.00
Base+ATT+TL58.4258.4289.4496.3720.9223.9222.2327.16
HGAT (Base+SC+ATT+TL)59.5459.5490.9197.0222.5224.6322.9027.23
+ +Table 1. Ablation study (%) on VRD dataset. The Baseline model is object-level reasoning without attention mechanism and semantic consistency. SC, ATT and TL represents with semantic consistency, with attention mechanism and with triplet-level reasoning, respectively. + +as $<$ subject-predicate-object>. The final representation of interactions between the $i$ -th object and the $j$ -th object is the concatenation of the aforementioned features: $x_{ij} = [v_i; s_i; m_i^\star; v_j; s_j; m_j^\star; h_{ij}^\star; l_{ij}]$ . Then, the confidence of the predicate category between the $i$ -th and the $j$ -th objects is $y_{ij} = \text{softmax}(\mathbf{W}^f x_{ij})$ , where $\mathbf{W}^f$ is the embedding matrix that maps interaction embeddings to match the predicate categories. Multi-class cross entropy loss is used in our experiment. + +# 4. Experiment + +# 4.1. Experimental Details + +We train and evaluate our models on the well-known Visual Relationship Detection (VRD) [16] and Visual Genome (VG) [12]. VRD dataset contains 5000 images with 100 + +object categories and 70 predicate categories. VG dataset provides human-annotated relationships for 100k images, which consists of over 1M instances of objects and 600k relations. In our experiments, we consider a simplified version named VG100K [44] which consists of 99658 images with 200 object categories and 100 predicate categories. + +We use two standard evaluation modes: (1) Predicate Detection (Predicate Det): given a ground truth object location and categories, the network predicts relationships among objects. (2) Relationship Detection (Relationship Det): the network predicts object location (bound- ing boxes), categories and relationships among objects at the same time. Following the standard evaluation in [16], $\mathbf{R}@\boldsymbol{n}$ is used as the evaluation metric. $\mathbf{R}@\boldsymbol{n}$ computes the fraction of true positive predicted relationships over the total annotated relationships among the top $n$ confident pre + +
kMethodsPredicate DetRelationship Det
R@50R@100R@50R@100
k=1VR-LP [16]47.8747.8713.8614.70
VTransE [44]44.7644.7614.0715.20
STA [35]48.0348.03--
CAI [46]53.5953.5915.6317.39
VRL [14]--18.1920.79
Zoom-Net [38]50.6950.6918.9221.41
NMP [10]57.6957.6920.1923.98
HGAT (Ours)59.5459.5422.5224.63
k=70DR-Net [3]80.7881.9017.7320.88
Zoom-Net [38]84.2590.5921.3727.30
VRD-DSR [13]86.0193.1819.0323.29
CDDN [2]87.5793.7621.4626.14
NMP [10]90.6196.6121.5027.50
HGAT (Ours)90.9197.0222.9027.73
+ +Table 2. Predicate and relationship detection results(%) on VRD Dataset. _ denotes the results are not reported in the original paper. $k$ denotes the number of predicates associated with each object. + +dictions. Let $k$ be the number of predicates associated with each object. In our experiments, $n \in \{50, 100\}$ and $k \in \{1, 70, 100\}$ . + +In the experiments, we set the batch size as 32. The initial learning rate is set to 0.005 and the learning rate decay factor is 0.5. The dropout rate of the model is 0.5 and the hidden state dim is 512. + +# 4.2. Ablation Study + +We conduct ablation studies on VRD dataset to understand the importance of each component of our model. Specifically, the semantic consistency, attention mechanism and triplet-level reasoning are removed, respectively. The results are presented in Table 1. The Baseline model is object-level reasoning without attention mechanism and semantic consistency. SC, ATT and TL represents with semantic consistency, with attention mechanism and with triplet-level reasoning, respectively. + +# 4.2.1 Semantic Consistency + +Experiments show that semantic consistency promotes model performance by around $1.29\%$ and $1.41\%$ on the two tasks, respectively. Because the semantic consistency brings prior knowledge to fix the missing edges in the graph only based on spatial correlation. + +# 4.2.2 Attention Mechanism + +As is shown in the first row and the third row of Table 1, attention mechanism improves the performance of the model by around $2.53\%$ and $1.77\%$ on predicate detection and relationship detection, respectively, which indicates that the attention mechanism plays an important role in capturing + +
kMethodsPredicate Det
R@50R@100
k=1VTransE [44]62.6362.87
STA [35]62.7162.94
NMP [10]67.0367.29
HGAT (Ours)68.1168.32
k=100VRD-DSR [13]69.0674.37
CDDN [2]70.4274.92
DR-Net [3]88.2691.26
NMP [10]89.6995.54
HGAT (Ours)90.0596.65
+ +Table 3. Predicate detection results (\%) on VG dataset. The number of predicate categories is 100. + +
kMethodsPredicateDet(ZS)
R@50R@100
k=1VR-LP [16]8.458.45
NMP [10]27.5027.50
HGAT (Ours)29.1229.12
k=70VRD-DSR [13]60.9079.81
CDDN [2]67.6684.00
NMP [10]72.9588.44
HGAT (Ours)75.0189.59
+ +Table 4. Zero-shot predicate detection results $(\%)$ in VRD dataset. The comparison only includes methods that reported the results on zero-shot setting. + +the interactions among objects. It is worth noting that attention mechanism contributes more to the model performance than the semantic consistency, because the utilization of semantic consistency increases the redundant edges which can be adjusted by attention mechanism. Therefore, the combination of semantic consistency and attention mechanism improves the model performance by $3.88\%$ and $2.18\%$ on predicate detection and relationship detection, respectively. + +# 4.2.3 Triplet-level Reasoning + +Triplet-level reasoning significantly improves the model performance by providing triplet-level interactions. Furthermore, the combination of attention mechanism and triplet-level reasoning improves the recall stably by around $6.10\%$ on predicate detection and around $2.59\%$ on relationship detection, which indicates that incorporating attention mechanism to triplet-level reasoning reduces the influence of unrelated triplets. + +# 4.3. Comparison with State-of-the-art Methods + +To demonstrate the efficiency of the proposed model, we compare our methods to the state-of-the-art on VRD and + +![](images/3187cc7189127c0ef35b7a0472af8c29e1705eaf12d197aae03570b0b72a227c.jpg) +girl has hair +girl wearing swimsuit +girl holds kite +girl on beach +ocean behind beach + +![](images/cc73bf2d8792e4309fcaf8942f1115d754ff76c4654be183638a9ba9fb8b20af.jpg) +girl has hair +girl wearing swimsuit +hair near kite +ocean on beach +ocean behind girl + +![](images/cc705092590942bdbabac3955564298472d134589cd857d22f8afd8546bd9bfb.jpg) +girl has hair +girl wearing swimsuit +girl under kite +ocean on beach +ocean near beach +Figure 6. The visualization results of graphs. Spatial graph is constructed according to spatial correlation, semantic graph is based on semantic consistency. The attention weights in object-level graph are graph attention weights related to girl while the attention weights in triplet-level graph are related to girl - swimsuit. + +![](images/1916e5b0a3e9f349bd6909d799495e14ec8b8963f8079175d4092fc6fb381078.jpg) +girl has hair +girl wearing swimsuit +girl holds kite +girl near beach +ocean near beach + +![](images/2d3ceb7d2c8846ce4a36be552be5a53642a7bc41ecd85a29c0a98c2336f9fb64.jpg) +girl has hair +girl wearing swimsuit +girl holds kite +girl on beach +ocean near beach + +VG dataset. We list all the reported results and compare our method with two graph-based baselines: 1) CDDN [2]: CDDN designed a diffusion network to aggregate context information from both semantic graph and spatial graph. 2) NMP [10]: NMP modeled objects and interactions by an interaction graph and proposed a message-passing-style algorithm to propagate the contextual information. + +# 4.3.1 VRD Dataset + +As is shown in Table 2, the proposed method establishes a new state-of-the-art which is $97.02\%$ on predicate detection and $27.73\%$ on relationship detection, respectively. Different from NMP which models the interactions by message passing among edges and nodes, our method explicitly models the interactions on triplet-level. The experimental results demonstrate the effectiveness of triplet-level reasoning. Our model also outperforms CDDN which conducts a reasoning process based on the diffusion network. The improvements mainly come from the attention mechanism which takes the feature correlation into consideration. + +# 4.3.2 VG Dataset + +Similar to the previous work, we report the results on the predicate detection task for VG dataset in Table 3. We improve the state-of-the-art by $1.08\%$ for R@50 and $1.03\%$ R@100 compared to the previous best performance. The gain on VG dataset is smaller than VRD dataset because + +there are more annotation noises which weakened the effectiveness of attention mechanism and triplet-level reasoning. + +# 4.3.3 Zero-shot Settings + +The comparison results on zero-shot predicate detection are reported in Table 4. Those methods without reporting the results on zero-shot settings are excluded from the comparison. Our model achieves considerably superior performance compared with the previous work with the improvement of around $1.62\%$ for $k = 1$ and $1.61\%$ for $k = 70$ . + +# 5. Conclusion + +In this paper, a novel framework named Hierarchical Graph Attention Network (HGAT) is proposed for visual relationship detection to exploit the dependencies on both object-level and triplet-level. With explicitly model the dependencies among triplets, more context information can be incorporated into the relationship reasoning process. In addition, prior knowledge and attention mechanism are introduced to alleviate the detrimental effects of the inappropriate edges of the graph. With the attention mechanism, the nodes are allowed to attend over their spatial and semantic neighbors' feature based on the visual or semantic feature correlation. + +# Acknowledgments + +This work was supported by National Key R&D Program of China under contract No. 2017YFB1002202. + +# 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] Zhen Cui, Chunyan Xu, Wenming Zheng, and Jian Yang. Context-dependent diffusion network for visual relationship detection. In ACM MM, pages 1475-1482, 2018. +[3] Bo Dai, Yuqi Zhang, and Dahua Lin. Detecting visual relationships with deep relational networks. In CVPR, pages 3298-3308, 2017. +[4] Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. Convolutional 2d knowledge graph embeddings. In AAAI, pages 1811-1818, 2018. +[5] Yuan Fang, Kingsley Kuan, Jie Lin, Cheston Tan, and Vijay Chandrasekhar. Object detection meets knowledge graphs. In IJCAI, pages 1661-1667, 2017. +[6] Carolina Galleguillos, Andrew Rabinovich, and Serge Belongie. Object categorization using co-occurrence, location and appearance. In CVPR, pages 1-8, 2008. +[7] Ross Girshick. Fast r-cnn. In ICCV, pages 1440-1448, 2015. +[8] Marco Gori, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In IJCNN, pages 729-734, 2005. +[9] Han Hu, Jiayuan Gu, Zheng Zhang, Jifeng Dai, and Yichen Wei. Relation networks for object detection. In CVPR, pages 3588-3597, 2018. +[10] Yue Hu, Siheng Chen, Xu Chen, Ya Zhang, and Xiao Gu. Neural message passing for visual relationship detection. In ICML Workshop on Learning and Reasoning with Graph-Structured Representations, 2019. +[11] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. +[12] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li Jia Li, and David A. Shamma. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 123(1):32-73, 2017. +[13] Kongming Liang, Yuhong Guo, Hong Chang, and Xilin Chen. Visual relationship detection with deep structural ranking. In AAAI, pages 7098-7105, 2018. +[14] Xiaodan Liang, Lisa Lee, and Eric P Xing. Deep variation-structured reinforcement learning for visual relationship and attribute detection. In CVPR, pages 4408–4417, 2017. +[15] Li Linjie, Gan Zhe, Cheng Yu, and Liu Jingjing. Relation-aware graph attention network for visual question answering. In ICCV, pages 10312-10321, 2019. +[16] Cewu Lu, Ranjay Krishna, Michael Bernstein, and Fei Fei Li. Visual relationship detection with language priors. In ECCV, pages 852-869, 2016. +[17] Tomas Mikolov, Kai Chen, Greg S Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. In ICLR, 2013. + +[18] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In CVPR, pages 5425-5434, 2017. +[19] Alejandro Newell and Jia Deng. Pixels to graphs by associative embedding. In NIPS, pages 2171-2180, 2017. +[20] François Plesse, Alexandru Ginsca, Bertr Delezoide, and Françoise Préteux. Visual relationship detection based on guided proposals and semantic knowledge distillation. In ICME, pages 1-6, 2018. +[21] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Songchun Zhu. Learning human-object interactions by graph parsing neural networks. In ECCV, pages 407-423, 2018. +[22] Vignesh Ramanathan, Congcong Li, Jia Deng, Wei Han, Zhen Li, Kunlong Gu, Yang Song, Samy Bengio, Chuck Rossenberg, and Li Feifei. Learning semantic relationships for better action retrieval in images. In CVPR, pages 1100-1109, 2015. +[23] Joseph Redmon, Santosh Kumar Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, pages 779-788, 2016. +[24] 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. +[25] Marcus Rohrbach, Michael Stark, Gyorgy Szarvas, Iryna Gurevych, and Bernt Schiele. What helps where and why? semantic relatedness for knowledge transfer. In CVPR, pages 910-917, 2010. +[26] Mohammad Amin Sadeghi and Ali Farhadi. Recognition using visual phrases. In CVPR, pages 1745-1752, 2011. +[27] Adam Santoro, David Raposo, David G. T Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. In NIPS, pages 4967-4976, 2017. +[28] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61-80, 2009. +[29] Cunchao Tu, Zhengyan Zhang, Zhiyuan Liu, and Maosong Sun. Transnet: Translation-based network representation learning for social relation extraction. In *IJCAI*, pages 2864–2870, 2017. +[30] Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In ICLR, 2018. +[31] Hao Wang, Xingjian Shi, and Dityan Yeung. Relational deep learning: A deep latent variable model for link prediction. In AAAI, pages 2688-2694, 2017. +[32] Zhouxia Wang, Tianshui Chen, Jimmy Ren, Weihao Yu, Hui Cheng, and Liang Lin. Deep reasoning with knowledge graph for social relationship understanding. In *IJCAI*, pages 1021–1028, 2018. +[33] Sanghyun Woo, Dahun Kim, Donghyeon Cho, and In So Kweon. Linknet: Relational embedding for scene graph. In NIPS, pages 560-570, 2018. + +[34] Jianwei Yang, Jiasen Lu, Stefan Lee, Dhruv Batra, and Devi Parikh. Graph r-cnn for scene graph generation. In ECCV, pages 690-706, 2018. +[35] Xu Yang, Hanwang Zhang, and Jianfei Cai. Shuffle-then-assemble: Learning object-agnostic visual relationship features. In CVPR, pages 36-52, 2018. +[36] Ting Yao, Yingwei Pan, Yehao Li, and Tao Mei. Exploring visual relationship for image captioning. In ECCV, pages 684-699, 2018. +[37] Zhan Yibing, Yu Jun, Yu Ting, and Tao Dacheng. On exploring undetermined relationships for visual relationship detection. In CVPR, pages 5128-5137, 2019. +[38] Guojun Yin, Lu Sheng, Bin Liu, Nenghai Yu, Xiaogang Wang, Jing Shao, and Change Loy Chen. Zoom-net: Mining deep feature interactions for visual relationship recognition. In ECCV, pages 322-338, 2018. +[39] Mo Yu, Wenpeng Yin, Kazi Saidul Hasan, Cicero dos Santos, Bing Xiang, and Bowen Zhou. Improved neural relation detection for knowledge base question answering. In ACL, pages 571-581, 2017. +[40] Ruichi Yu, Ang Li, Vlad I Morariu, and Larry S Davis. Visual relationship detection with internal and external linguistic knowledge distillation. In ICCV, pages 1068-1076, 2017. +[41] Fang Yuan, Zhe Wang, Jie Lin, Luis Fernando D'Haro, Kim Jung Jae, Zeng Zeng, and Vijay Chandrasekhar. End-to-end video classification with knowledge graphs. arXiv preprint arXiv: 1711.01714, 2017. +[42] Vinicius Zambaldi, David Raposo, Adam Santoro, Victor Bapat, Yujia Li, Igor Babuschkin, Karl Tuyls, David Reichert, Timothy Lillicrap, and Edward Lockhart. Relational deep reinforcement learning. arXiv preprint arXiv: 1806.01830, 2018. +[43] Rowan Zellers, Mark Yatskar, Sam Thomson, and Yejin Choi. Neural motifs: Scene graph parsing with global context. In CVPR, pages 5831-5840, 2018. +[44] Hanwang Zhang, Zawlin Kyaw, Shih Fu Chang, and Tat Seng Chua. Visual translation embedding network for visual relation detection. In CVPR, pages 3107-3115, 2017. +[45] Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander J Smola, and Le Song. Variational reasoning for question answering with knowledge graph. In AAAI, pages 6069-6076, 2017. +[46] Bohan Zhuang, Lingqiao Liu, Chunhua Shen, and Ian Reid. Towards context-aware interaction recognition for visual relationship detection. In ICCV, pages 589-598, 2017. \ No newline at end of file diff --git a/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/images.zip b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..83e129ebd98283842413670c53614e19051f228d --- /dev/null +++ b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f902a3546a1bd82bc7ec5a4061d06211b1e5a84bc1275dea652e5a703efd9840 +size 689116 diff --git a/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/layout.json b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5bb91f4d50ffaa4c9f725d9a12ffdf2c69f8c5d9 --- /dev/null +++ b/hierarchicalgraphattentionnetworkforvisualrelationshipdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ce060fa4aba0bed6f71e2b798afb183ac94b12d16c0f0977d7f8805018d7197 +size 422810 diff --git a/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_content_list.json b/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8202cf72a9f8cf9c255cd3e725a44b10251ca1b5 --- /dev/null +++ b/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:565f95243a19739f8d64893faf5286f73e2e06060829d0d869b1d2184523e578 +size 99511 diff --git a/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_model.json b/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..890494794d3f29be3f3858670469a1140d00fff6 --- /dev/null +++ b/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50f8315b4109d6b035c36b9bc3298cd0be2af05580b4e422fbc6ed13875cbdb7 +size 125052 diff --git a/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_origin.pdf b/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0b84b797d1894f6906a5761d66772a3330a6f8bf --- /dev/null +++ b/hierarchicalhumanparsingwithtypedpartrelationreasoning/a1c73b3e-2930-49c5-9060-82ad98267ce7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be0a9f064b3d83e11261f2cb4a784dba1d6f5406fb4d694a63b37c4d1cb6348f +size 2970320 diff --git a/hierarchicalhumanparsingwithtypedpartrelationreasoning/full.md b/hierarchicalhumanparsingwithtypedpartrelationreasoning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..43634632daa3b34851dd36dacc678af925d77c3b --- /dev/null +++ b/hierarchicalhumanparsingwithtypedpartrelationreasoning/full.md @@ -0,0 +1,410 @@ +# Hierarchical Human Parsing withTyped Part-Relation Reasoning + +Wenguan Wang $^{1,2*}$ , Hailong Zhu $^{3*}$ , Jifeng Dai $^{4}$ , Yanwei Pang $^{3\dagger}$ , Jianbing Shen $^{2}$ , Ling Shao $^{2}$ + +$^{1}$ ETH Zurich, Switzerland $^{2}$ Inception Institute of Artificial Intelligence, UAE + +$^{3}$ Tianjin Key Laboratory of Brain-inspired Intelligence Technology, School of Electrical and Information Engineering, Tianjin University, China + +4 SenseTime Research + +wenguanwang.ai@gmail.com, hlzhu2009@gmail.com + +https://github.com/hlzhu09/Hierarchical-Human-Parsing + +# Abstract + +Human parsing is for pixel-wise human semantic understanding. As human bodies are underlying hierarchically structured, how to model human structures is the central theme in this task. Focusing on this, we seek to simultaneously exploit the representational capacity of deep graph networks and the hierarchical human structures. In particular, we provide following two contributions. First, three kinds of part relations, i.e., decomposition, composition, and dependency, are, for the first time, completely and precisely described by three distinct relation networks. This is in stark contrast to previous parsers, which only focus on a portion of the relations and adopt a type-agnostic relation modeling strategy. More expressive relation information can be captured by explicitly imposing the parameters in the relation networks to satisfy the specific characteristics of different relations. Second, previous parsers largely ignore the need for an approximation algorithm over the loopy human hierarchy, while we instead address an iterative reasoning process, by assimilating generic message-passing networks with their edge-typed, convolutional counterparts. With these efforts, our parser lays the foundation for more sophisticated and flexible human relation patterns of reasoning. Comprehensive experiments on five datasets demonstrate that our parser sets a new state-of-the-art on each. + +# 1. Introduction + +Human parsing involves segmenting human bodies into semantic parts, e.g., head, arm, leg, etc. It has attracted tremendous attention in the literature, as it enables fine-grained human understanding and finds a wide spectrum of human-centric applications, such as human behavior analysis [50, 58, 14], human-robot interaction [16], etc. + +Human bodies present a highly structured hierarchy and body parts inherently interact with each other. As + +![](images/f954894312ebf987dfd9e091f0c5d798a7049685b77d82fda2db4e16cb84fee9.jpg) +(b) + +![](images/8c67da700a9233ee1367be84eb3a0a2987a3bfa66524aba610eed9e2d25bc8da.jpg) +(c) + +![](images/c4b48bde040a6118592dfffe5a21bd29b30dda650a668646abed2de5d80c472c.jpg) +(d) +Figure 1: Illustration of our hierarchical human parser. (a) Input image. (b) The human hierarchy in (a), where -- indicates dependency relations and / is de-/compositional relations. (c) In our parser, three distinct relation networks are designed for addressing the specific characteristics of different part relations, i.e., $\rightarrow$ , $\rightarrow$ , and $\rightarrow$ stand for decompositional, compositional, and dependency relation networks, respectively. Iterative inference ( $\mathcal{C}$ ) is performed for better approximation. For visual clarity, some nodes are omitted. (d) Our hierarchical parsing results. + +shown in Fig. 1(b), there are different relations between parts [42, 60, 49]: decompositional and compositional relations (full line:/) between constituent and entire parts (e.g., {upper body, lower body} and full body), and dependency relations (dashed line:--) between kinematically connected parts (e.g., hand and arm). Thus the central problem in human parsing is how to model such relations. Recently, numerous structured human parsers have been proposed [65, 15, 22, 64, 47, 74, 61, 20]. Their notable successes indeed demonstrate the benefit of exploiting the structure in this problem. However, three major limitations in human structure modeling are still observed. (1) The structural information utilized is typically weak and relation types studied are incomplete. Most efforts [65, 15, 22, 64, 47] directly encode human pose information into the parsing model, causing them to suffer from trivial structural information, not to mention the need of extra pose annotations. In addition, previous structured parsers focus on only one or two of the aforementioned part relations, not all of them. For example, [20] only considers + +dependency relations, and [74] relies on decompositional relations. (2) Only a single relation model is learnt to reason different kinds of relations, without considering their essential and distinct geometric constraints. Such a relation modeling strategy is over-general and simple; do not seem to characterize well the diverse part relations. (3) According to graph theory, as the human body yields a complex, cyclic topology, an iterative inference is desirable for optimal result approximation. However, current arts [22, 64, 47, 74, 61] are primarily built upon an immediate, feed-forward prediction scheme. + +To respond to the above challenges and enable a deeper understanding of human structures, we develop a unified, structured human parser that precisely describes a more complete set of part relations, and efficiently reasons structures with the prism of a message-passing, feed-back inference scheme. To address the first two issues, we start with an in-depth and comprehensive analysis on three essential relations, namely decomposition, composition, and dependency. Three distinct relation networks $(\rightarrow ,\rightarrow ,$ and $\rightarrow$ in Fig. 1(c)) are elaborately designed and imposed to explicitly satisfy the specific, intrinsic relation constraints. Then, we construct our parser as a tree-like, end-to-end trainable graph model, where the nodes represent the human parts, and edges are built upon the relation networks. For the third issue, a modified, relation-typed convolutional message passing procedure (G in Fig. 1(c)) is performed over the human hierarchy, enabling our method to obtain better parsing results from a global view. All components, i.e., the part nodes, edge (relation) functions, and message passing modules, are fully differentiable, enabling our whole framework to be end-to-end trainable and, in turn, facilitating learning about parts, relations, and inference algorithms. + +More crucially, our structured human parser can be viewed as an essential variant of message passing neural networks (MPNNs) [19, 56], yet significantly differentiated in two aspects. (1) Most previous MPNNs are edge-type-agnostic, while ours addresses relation-typed structure reasoning with a higher expressive capability. (2) By replacing the Multilayer Perceptron (MLP) based MPNN units with convolutional counterparts, our parser gains a spatial information preserving property, which is desirable for such a pixel-wise prediction task. + +We extensively evaluate our approach on five standard human parsing datasets [22, 64, 44, 31, 45], achieving state-of-the-art performance on all of them (§4.2). In addition, with ablation studies for each essential component in our parser (§4.3), three key insights are found: (1) Exploring different relations reside on human bodies is valuable for human parsing. (2) Distinctly and explicitly modeling different types of relations can better support human structure reasoning. (3) Message passing based feed-back inference is able to reinforce parsing results. + +# 2. Related Work + +Human parsing: Over the past decade, active research has been devoted towards pixel-level human semantic understanding. Early approaches tended to leverage image regions [35, 68, 69], hand-crafted features [57, 7], part templates [2, 11, 10] and human keypoints [67, 35, 68, 69], and typically explored certain heuristics over human body configurations [3, 11, 10] in a CRF [67, 28], structured model [68, 11], grammar model [3, 42, 10], or generative model [13, 51] framework. Recent advance has been driven by the streamlined designs of deep learning architectures. Some pioneering efforts revisit classic template matching strategy [31, 36], address local and global cues [34], or use tree-LSTMs to gather structure information [32, 33]. However, due to the use of superpixel [34, 32, 33] or HOG feature [44], they are fragmentary and time-consuming. Consequent attempts thus follow a more elegant FCN architecture, addressing multi-level cues [5, 63], feature aggregation [45, 72, 38], adversarial learning [71, 46, 37], or cross-domain knowledge [37, 66, 20]. To further explore inherent structures, numerous approaches [65, 72, 22, 64, 15, 47] choose to straightforward encode pose information into the parsers, however, relying on off-the-shelf pose estimators [18, 17] or additional annotations. Some others consider top-down [74] or multi-source semantic [61] information over hierarchical human layouts. Though impressive, they ignore iterative inference and seldom address explicit relation modeling, easily suffering from weak expressive ability and risk of sub-optimal results. + +With the general success of these works, we make a further step towards more precisely describing the different relations residing on human bodies, i.e., decomposition, composition, and dependency, and addressing iterative, spatial-information preserving inference over human hierarchy. + +Graph neural networks (GNNs): GNNs have a rich history (dating back to [53]) and became a veritable explosion in research community over the last few years [23]. GNNs effectively learn graph representations in an end-to-end manner, and can generally be divided into two broad classes: Graph Convolutional Networks (GCNs) and Message Passing Graph Networks (MPGNs). The former [12, 48, 27] directly extend classical CNNs to non-Euclidean data. Their simple architecture promotes their popularity, while limits their modeling capability for complex structures [23]. MPGNs [19, 73, 56, 59] parameterize all the nodes, edges, and information fusion steps in graph learning, leading to more complicated yet flexible architectures. + +Our structured human parser, which falls in the second category, can be viewed as an early attempt to explore GNNs in the area of human parsing. In contrast to conventional MPGNs, which are mainly MLP-based and edge-type-agnostic, we provide a spatial information preserving and relation-type aware graph learning scheme. + +![](images/5bdfbb008bf80a5c68ba461f323c2f7d3ef3ca6cee1478727ad149cb8d36cb1a.jpg) +Figure 2: Illustration of our structured human parser for hierarchical human parsing during the training phase. The main components in the flowchart are marked by (a)-(h). Please refer to §3 for more details. Best viewed in color. + +# 3. Our Approach + +# 3.1. Problem Definition + +Formally, we represent the human semantic structure as a directed, hierarchical graph $\mathcal{G} = (\mathcal{V},\mathcal{E},\mathcal{Y})$ . As show in Fig. 2(a), the node set $\mathcal{V} = \cup_{l=1}^{3}\mathcal{V}_l$ represents human parts in three different semantic levels, including the leaf nodes $\mathcal{V}_1$ (i.e., the most fine-grained parts: head, arm, hand, etc.) which are typically considered in common human parsers, two middle-level nodes $\mathcal{V}_2 = \{\text{upper-body, lower-body}\}$ and one root $\mathcal{V}_3 = \{\text{full-body}\}$ . The edge set $\mathcal{E} \in \binom{\mathcal{V}}{2}$ represents the relations between human parts (nodes), i.e., the directed edge $e = (u,v) \in \mathcal{E}$ links node $u$ to $v$ : $u \to v$ . Each node $v$ and each edge $(u,v)$ are associated with feature vectors: $\pmb{h}_v$ and $\pmb{h}_{u,v}$ , respectively. $y_v \in \mathcal{V}$ indicates the groundtruth segmentation map of part (node) $v$ and the groundtruth maps $\mathcal{V}$ are also organized in a hierarchical manner: $\mathcal{V} = \cup_{l=1}^{3}\mathcal{V}_l$ . + +Our human parser is trained in a graph learning scheme, using the full supervision from existing human parsing datasets. For a test sample, it is able to effectively infer the node and edge representations by reasoning human structures at the levels of individual parts and their relations, and iteratively fusing the information over the human structures. + +# 3.2. Structured Human Parsing Network + +Node embedding: As an initial step, a learnable projection function is used to map the input image representation into node (part) features, in order to obtain sufficient expressive power. Formally, let us denote the input image feature as $\mathbf{x} \in \mathbb{R}^{W \times H \times C}$ , which comes from a DeepLabV3 [6]-like backbone network (in Fig.2(b)), and the projection function as $P: \mathbb{R}^{W \times H \times C} \mapsto \mathbb{R}^{W \times H \times c \times |\mathcal{V}|}$ , where $|\mathcal{V}|$ indicates the number of nodes. The node embeddings $\{h_v \in \mathbb{R}^{W \times H \times c}\}_{v \in \mathcal{V}}$ are initialized by (Fig.2(d)): + +$$ +\left\{\boldsymbol {h} _ {v} \right\} _ {v \in \mathcal {V}} = P (\boldsymbol {x}), \tag {1} +$$ + +where each node embedding $\pmb{h}_v$ is a $(W, H, c)$ -dimensional tenor that encodes full spatial details (in Fig. 2(c)). + +Typed human part relation modeling: Basically, an edge embedding $\pmb{h}_{u,v}$ captures the relations between nodes $u$ and + +$v$ . Most previous structured human parsers [74, 61] work in an edge-type-agnostic manner, i.e., a unified, shared relation network $R\colon \mathbb{R}^{W\times H\times c}\times \mathbb{R}^{W\times H\times c}\mapsto \mathbb{R}^{W\times H\times c}$ is used to capture all the relations: $\pmb{h}_{u,v} = R(\pmb{h}_u,\pmb{h}_v)$ . Such a strategy may lose the discriminability of individual relation types and does not have an explicit bias towards modeling geometric and anatomical constraints. In contrast, we formulate $\pmb{h}_{u,v}$ in a relation-typed manner $R^r$ : + +$$ +\boldsymbol {h} _ {u, v} = R ^ {r} \left(F ^ {r} \left(\boldsymbol {h} _ {u}\right), \boldsymbol {h} _ {v}\right), \tag {2} +$$ + +where $r \in \{\mathrm{dec}, \mathrm{com}, \mathrm{dep}\}$ . $F^r(\cdot)$ is an attention-based relation-adaption operation, which is used to enhance the original node embedding $\pmb{h}_u$ by addressing geometric characteristics in relation $r$ . The attention mechanism is favored here as it allows trainable and flexible feature enhancement and explicitly encodes specific relation constraints. From the view of information diffusion mechanism in the graph theory [53], if there exists an edge $(u, v)$ that links a starting node $u$ to a destination $v$ , this indicates $v$ should receive incoming information (i.e., $\pmb{h}_{u,v}$ ) from $u$ . Thus, we use $F^r(\cdot)$ to make $\pmb{h}_u$ better accommodate the target $v$ . $R^r$ is edge-type specific, employing the more tractable feature $F^r(\pmb{h}_u)$ in place of $\pmb{h}_u$ , so more expressive relation feature $\pmb{h}_{u,v}$ for $v$ can be obtained and further benefit the final parsing results. In this way, we learn more sophisticated and impressive relation patterns within human bodies. + +1) Decompositional relation modeling: Decompositional relations (full line:/ in Fig. 2(a)) are represented by those vertical edges starting from parent nodes to corresponding child nodes in the human hierarchy $\mathcal{G}$ . For example, a parent node full-body can be separated into {upper-body, lower-body}, and upper-body can be decomposed into {head, torso, upper-arm, lower-arm}. Formally, for a node $u$ , let us denote its child node set as $\mathcal{C}_u$ . Our decompositional relation network $R^{\mathrm{dec}}$ aims to learn the rule for 'breaking down' $u$ into its constituent parts $\mathcal{C}_u$ (Fig.3): + +$$ +\boldsymbol {h} _ {u, v} = R ^ {\mathrm {d e c}} \left(F ^ {\mathrm {d e c}} \left(\boldsymbol {h} _ {u}\right), \boldsymbol {h} _ {v}\right), \quad v \in \mathcal {C} _ {u}, \tag {3} +$$ + +$$ +F ^ {\operatorname {d e c}} \left(\boldsymbol {h} _ {u}\right) = \boldsymbol {h} _ {u} \odot \operatorname {a t t} _ {u, v} ^ {\operatorname {d e c}} \left(\boldsymbol {h} _ {u}\right). +$$ + +$\odot$ indicates the attention-based feature enhancement operation, and $\operatorname{att}_{u,v}^{\mathrm{dec}}(\pmb{h}_u) \in [0,1]^{W \times H}$ produces an attention map. For each sub-node $v \in \mathcal{C}_u$ of $u$ , $\operatorname{att}_{u,v}^{\mathrm{dec}}(\pmb{h}_u)$ is defined as: + +![](images/877c205c751b8f6e5e9642c370eb93aa03c4b18a5ca1a1abfb2ce9c5e8d0d013.jpg) +Figure 3: Illustration of our decompositional relation modeling. (a) Decompositional relations between the upper-body node $(u)$ and its constituents $(\mathcal{C}_u)$ . (b) With the decompositional attentions $\{\mathrm{att}_{u,v}^{\mathrm{dec}}(\pmb{h}_u)\}_{v\in \mathcal{C}_u}$ , $F^{\mathrm{dec}}$ learns how to 'break down' the upper-body node and generates more tractable features for its constituents. In the relation adapted feature $F^{\mathrm{dec}}(\pmb{h}_u)$ , the responses from the background and other irrelevant parts are suppressed. + +![](images/b79522002c030c75aa849ad0cdbb1667d1f932c161a307de3b063fb9b0d79eb6.jpg) + +$$ +\operatorname {a t t} _ {u, v} ^ {\mathrm {d e c}} \left(\boldsymbol {h} _ {u}\right) = \operatorname {P S M} \left(\left[ \phi_ {v} ^ {\mathrm {d e c}} \left(\boldsymbol {h} _ {u}\right) \right] _ {v \in \mathcal {C} _ {u}}\right) = \frac {\exp \left(\phi_ {v} ^ {\mathrm {d e c}} \left(\boldsymbol {h} _ {u}\right)\right)}{\Sigma_ {v ^ {\prime} \in \mathcal {C} _ {u}} \exp \left(\phi_ {v ^ {\prime}} ^ {\mathrm {d e c}} \left(\boldsymbol {h} _ {u}\right)\right)}, \tag {4} +$$ + +where $\mathrm{PSM}(\cdot)$ stands for pixel-wise soft-max, $[\cdot ]$ represents the channel-wise concatenation, and $\phi_v^{\mathrm{dec}}(\pmb {h}_u)\in \mathbb{R}^{W\times H}$ computes a specific significance map for $v$ . By making $\sum_{v\in \mathcal{C}_u}\mathrm{att}_{u,v}^{\mathrm{dec}} = 1$ , $\{\mathrm{att}_{u,v}^{\mathrm{dec}}(\pmb {h}_u)\}_{v\in \mathcal{C}_u}$ forms a decompositional attention mechanism, i.e., allocates disparate attentions over $\pmb{h}_u$ . To recap, the decompositional attention, conditioned on $\pmb{h}_u$ , lets $u$ pass separate high-level information to different child nodes $\mathcal{C}_u$ (see Fig.3(b)). Here $\mathrm{att}_{u,v}^{\mathrm{dec}}(\cdot)$ is node-specific and separately learnt for the three entire nodes in $\mathcal{V}_2\cup \mathcal{V}_3$ , namely full-body, upper-body and lower-body. A subscript $u,v$ is added to address this point. In addition, for each parent node $u$ , the groundtruth maps $\mathcal{Y}_{\mathcal{C}_u} = \{y_v\}_{v\in \mathcal{C}_u}\in \{0,1\}^{W\times H\times |\mathcal{C}_u|}$ of all the child nodes $\mathcal{C}_u$ can be used as supervision signals to train its decompositional attention $\{\mathrm{att}_{u,v}^{\mathrm{dec}}(\pmb {h}_u)\}_{v\in \mathcal{C}_u}\in [0,1]^{W\times H\times |\mathcal{C}_u|}$ : + +$$ +\mathcal {L} _ {\mathrm {d e c}} = \sum_ {u \in \mathcal {V} _ {2} \cup \mathcal {V} _ {3}} \mathcal {L} _ {\mathrm {C E}} \left(\left\{\operatorname {a t t} _ {u, v} ^ {\mathrm {d e c}} \left(\boldsymbol {h} _ {u}\right) \right\} _ {v \in \mathcal {C} _ {u}}, \mathcal {Y} _ {\mathcal {C} _ {u}}\right), \tag {5} +$$ + +where $\mathcal{L}_{\mathrm{CE}}$ represents the standard cross-entropy loss. + +2) Compositional relation modeling: In the human hierarchy $\mathcal{G}$ , compositional relations are represented by vertical, downward edges. To address this type of relations, we design a compositional relation network $R^{\mathrm{com}}$ as (Fig.4): + +$$ +\begin{array}{l} \boldsymbol {h} _ {u, v} = R ^ {\operatorname {c o m}} \left(F ^ {\operatorname {c o m}} \left(\boldsymbol {h} _ {u}\right), \boldsymbol {h} _ {v}\right), \quad u \in \mathcal {C} _ {v}, \\ F ^ {\operatorname {c o m}} \left(\boldsymbol {h} _ {u}\right) = \boldsymbol {h} _ {u} \odot \operatorname {a t t} _ {v} ^ {\operatorname {c o m}} \left(\left[ \boldsymbol {h} _ {u ^ {\prime}} \right] _ {u ^ {\prime} \in \mathcal {C} _ {v}}\right). \tag {6} \\ \end{array} +$$ + +Here $\mathsf{att}_v^{\mathrm{com}} \colon \mathbb{R}^{W \times H \times C \times |\mathcal{C}_v|} \mapsto [0,1]^{W \times H}$ is a compositional attention, implemented by a $1 \times 1$ convolutional layer. The rationale behind such a design is that, for a parent node $v$ , $\mathsf{att}_v^{\mathrm{com}}$ gathers statistics of all the child nodes $\mathcal{C}_v$ and is used to enhance each sub-node feature $\pmb{h}_u$ . As $\mathsf{att}_v^{\mathrm{com}}$ is compositional in nature, its enhanced feature $F^{\mathrm{com}}(\pmb{h}_u)$ is more 'friendly' to the parent node $v$ , compared to $\pmb{h}_u$ . Thus, $R^{\mathrm{com}}$ is able to generate more expressive relation features by considering compositional structures (see Fig.4(b)). + +![](images/1f5a8e7faf162d2557af807eecc34935dbd3e38b1610722e010bcf25385fa3c4.jpg) +Figure 4: Illustration of our compositional relation modeling. (a) Compositional relations between the lower-body node $(v)$ and its constituents $(\mathcal{C}_v)$ . (b) The compositional attention att $_v^{\mathrm{com}}([h_{u'}, h_u])$ gathers information from all the constituents $\mathcal{C}_v$ and lets $F^{\mathrm{com}}$ enhance all the lower-body related features of $\mathcal{C}_v$ . + +For each parent node $v \in \mathcal{V}_2 \cup \mathcal{V}_3$ , with its groundtruth map $y_v \in \{0,1\}^{W \times H}$ , the compositional attention for all its child nodes $\mathcal{C}_v$ is trained by minimizing the following loss: + +$$ +\mathcal {L} _ {\mathrm {c o m}} = \sum_ {v \in \mathcal {V} _ {2} \cup \mathcal {V} _ {3}} \mathcal {L} _ {\mathrm {C E}} \left(\operatorname {a t t} _ {v} ^ {\mathrm {c o m}} \left([ \boldsymbol {h} _ {u ^ {\prime}} ] _ {u ^ {\prime} \in \mathcal {C} _ {v}}\right), y _ {v}\right). \tag {7} +$$ + +3) Dependency relation modeling: In $\mathcal{G}$ , dependency relations are represented as horizontal edges (dashed line:-- in Fig. 2(a)), describing pairwise, kinematic connections between human parts, such as (head, torso), (upper-leg, lower-leg), etc. Two kinematically connected human parts are spatially adjacent, and their dependency relation essentially addresses the context information. For a node $u$ , with its kinematically connected siblings $\kappa_u$ , a dependency relation network $R^{\mathrm{dep}}$ is designed as (Fig. 5): + +$$ +\boldsymbol {h} _ {u, v} = R ^ {\text {d e p}} \left(F ^ {\text {d e p}} \left(\boldsymbol {h} _ {u}\right), \boldsymbol {h} _ {v}\right), \quad v \in \mathcal {K} _ {u}, \tag {8} +$$ + +$$ +F ^ {d e p} (\boldsymbol {h} _ {u}) = F ^ {\text {c o n t}} (\boldsymbol {h} _ {u}) \odot \operatorname {a t t} _ {u, v} ^ {\text {d e p}} \big (F ^ {\text {c o n t}} (\boldsymbol {h} _ {u}) \big), +$$ + +where $F^{\mathrm{cont}}(\pmb{h}_u) \in \mathbb{R}^{W \times H \times c}$ is used to extract the context of $u$ , and $\operatorname{att}_{u,v}^{\mathrm{dep}}(F^{\mathrm{cont}}(\pmb{h}_u)) \in [0,1]^{W \times H}$ is a dependency attention that produces an attention for each sibling node $v$ , conditioned on $u$ 's context $F^{\mathrm{cont}}(\pmb{h}_u)$ . Specifically, inspired by the non-local self-attention [55, 62], the context extraction module $F^{\mathrm{cont}}$ is designed as: + +$$ +F ^ {\text {c o n t}} \left(\boldsymbol {h} _ {u}\right) = \rho \left(\boldsymbol {x} \boldsymbol {A} ^ {\top}\right) \in \mathbb {R} ^ {W \times H \times c}, \tag {9} +$$ + +$$ +\boldsymbol {A} = \boldsymbol {h} _ {u} ^ {\top} \boldsymbol {W} \boldsymbol {x} ^ {\prime} \in \mathbb {R} ^ {(W H) \times (W H)}, +$$ + +where $\pmb{h}_u' \in \mathbb{R}^{(c + 8) \times (WH)}$ and $\pmb{x}' \in \mathbb{R}^{(C + 8) \times (WH)}$ are node (part) and image representations augmented with spatial information, respectively, flattened into matrix formats. The last eight channels of $\pmb{h}_u'$ and $\pmb{x}'$ encode spatial coordinate information [25], where the first six dimensions are the normalized horizontal and vertical positions, and the last two dimensions are the normalized width and height information of the feature, $1 / W$ and $1 / H$ . $W \in \mathbb{R}^{(c + 8) \times (C + 8)}$ is learned as a linear transformation based node-to-context projection function. The node feature $\pmb{h}_u'$ , used as a query term, retrieves the reference image feature $\pmb{x}'$ for its context information. As a result, the affinity matrix $A$ stores the attention + +![](images/31ea9342ddfd11194e830e9e338fc1eb7278297d947bb69caa2cbc82e5006013.jpg) +Figure 5: Illustration of our dependency relation modeling. (a) Dependency relations between the upper-body node $(u)$ and its siblings $(\mathcal{K}_u)$ . (b) The dependency attention $\{\operatorname{att}_{u,v}^{\operatorname{dep}}(F^{\operatorname{cont}}(\boldsymbol{h}_u))\}_{v \in \mathcal{K}_u}$ , derived from $u$ 's contextual information $F^{\operatorname{cont}}(\boldsymbol{h}_u)$ , gives separate importance for different siblings $\mathcal{K}_u$ . + +weight between the query and reference at a certain spatial location, accounting for both visual and spatial information. Then, $u$ 's context is collected as a weighted sum of the original image feature $\pmb{x}$ with column-wise normalized weight matrix $\pmb{A}^{\top} \colon \pmb{x}\pmb{A}^{\top} \in \mathbb{R}^{C \times (WH)}$ . A $1 \times 1$ convolution based linear embedding function $\rho: \mathbb{R}^{W \times H \times C} \mapsto \mathbb{R}^{W \times H \times c}$ is applied for feature dimension compression, i.e., to make the channel dimensions of different edge embeddings consistent. + +For each sibling node $v \in \mathcal{K}_u$ of $u$ , $\operatorname{att}_{u,v}^{\mathrm{dep}}$ is defined as: + +$$ +\operatorname {a t t} _ {u, v} ^ {\mathrm {d e p}} \left(F ^ {\text {c o n t}} \left(\boldsymbol {h} _ {u}\right)\right) = \operatorname {P S M} \left(\left[ \phi_ {v} ^ {\mathrm {d e p}} \left(\boldsymbol {h} _ {u}\right) \right] _ {v \in \mathcal {K} _ {u}}\right). \tag {10} +$$ + +Here $\phi_v^{\mathrm{dep}}(\cdot) \in \mathbb{R}^{W \times H}$ gives an importance map for $v$ , using a $1 \times 1$ convolutional layer. Through the pixel-wise soft-max operation $\mathrm{PSM}(\cdot)$ , we enforce $\sum_{v \in \mathcal{K}_u} \operatorname{att}_{u,v}^{\mathrm{dep}} = 1$ , leading to a dependency attention mechanism which assigns exclusive attentions over $F^{\mathrm{cont}}(h_u)$ , for the corresponding sibling nodes $\mathcal{K}_u$ . Such a dependency attention is learned via: + +$$ +\mathcal {L} _ {\mathrm {d e p}} = \sum_ {u \in \mathcal {V} _ {1} \cup \mathcal {V} _ {2}} \mathcal {L} _ {\mathrm {C E}} \left(\left\{\operatorname {a t t} _ {u, v} ^ {\mathrm {d e p}} \left(\boldsymbol {h} _ {u}\right) \right\} _ {v \in \mathcal {K} _ {u}}, \mathcal {Y} _ {\mathcal {K} _ {u}}\right), \tag {11} +$$ + +where $\mathcal{V}_{\mathcal{K}_u} \in [0,1]^{W \times H \times |\mathcal{K}_u|}$ stands for the groundtruth maps $\{y_v\}_{v \in \mathcal{K}_u}$ of all the sibling nodes $\mathcal{K}_u$ of $u$ . + +Iterative inference over human hierarchy: Human bodies present a hierarchical structure. According to graph theory, approximate inference algorithms should be used for such a loopy structure $\mathcal{G}$ . However, previous structured human parsers directly produce the final node representation $\pmb{h}_v$ by either simply accounting for the information from the parent node $u$ [74]: $\pmb{h}_v \gets R(\pmb{h}_u, \pmb{h}_v)$ , where $v \in \mathcal{C}_u$ ; or from its neighbors $\mathcal{N}_v$ [61]: $\pmb{h}_v \gets \sum_{u \in \mathcal{N}_v} R(\pmb{h}_u, \pmb{h}_v)$ . They ignore the fact that, in such a structured setting, information is organized in a complex system. Iterative algorithms offer a more favorable solution, i.e., the node representation should be updated iteratively by aggregating the messages from its neighbors; after several iterations, the representation can approximate the optimal results [53]. In graph theory parlance, the iterative algorithm can be achieved by a parametric message passing process, which is defined in terms of a message function $M$ and node update function $U$ , and runs $T$ steps. For each node $v$ , the message pass + +ing process recursively collects information (messages) $\pmb{m}_v$ from the neighbors $\mathcal{N}_v$ to enrich the node embedding $\pmb{h}_v$ : + +$$ +\boldsymbol {m} _ {v} ^ {(t)} = \sum_ {u \in \mathcal {N} _ {v}} M \left(\boldsymbol {h} _ {u} ^ {(t - 1)}, \boldsymbol {h} _ {v} ^ {(t - 1)}\right), \tag {12} +$$ + +$$ +\boldsymbol {h} _ {v} ^ {(t)} = U (\boldsymbol {h} _ {v} ^ {(t - 1)}, \boldsymbol {m} _ {v} ^ {(t)}), +$$ + +where $\pmb{h}_v^{(t)}$ stands for $v$ 's state in the $t$ -th iteration. Recurrent neural networks are typically used to address the iterative nature of the update function $U$ . + +Inspired by previous message passing algorithms, our iterative algorithm is designed as (Fig.2(e)-(f)): + +$$ +\boldsymbol {m} _ {v} ^ {(t)} = \underbrace {\sum_ {u \in \mathcal {P} _ {v}} \boldsymbol {h} _ {u , v} ^ {(t - 1)}} _ {\text {d e c o m p o s i t i o n}} + \underbrace {\sum_ {u \in \mathcal {C} _ {v}} \boldsymbol {h} _ {u , v} ^ {(t - 1)}} _ {\text {c o m p o s i t i o n}} + \underbrace {\sum_ {u \in \mathcal {K} _ {v}} \boldsymbol {h} _ {u , v} ^ {(t - 1)}} _ {\text {d e p e n d e n c y}}, \tag {13} +$$ + +$$ +\boldsymbol {h} _ {v} ^ {(t)} = U _ {\text {c o n v G R U}} \left(\boldsymbol {h} _ {v} ^ {(t - 1)}, \boldsymbol {m} _ {v} ^ {(t)}\right), \tag {14} +$$ + +where the initial state $\pmb{h}_v^{(0)}$ is obtained by Eq. 1. Here, the message aggregation step (Eq. 13) is achieved by per-edge relation function terms, i.e., node $v$ updates its state $\pmb{h}_v$ by absorbing all the incoming information along different relations. As for the update function $U$ in Eq. 14, we use a convGRU [54], which replaces the fully-connected units in the original MLP-based GRU with convolution operations, to describe its repeated activation behavior and address the pixel-wise nature of human parsing, simultaneously. Compared to previous parsers, which are typically based on feed-forward architectures, our massage-passing inference essentially provides a feed-back mechanism, encouraging effective reasoning over the cyclic human hierarchy $\mathcal{G}$ . + +Loss function: In each step $t$ , to obtain the predictions $\hat{\mathcal{V}}_l^{(t)} = \{\hat{y}_v^{(t)}\in [0,1]^{W\times H}\}_{v\in \mathcal{V}_l}$ of the $l$ -th layer nodes $\mathcal{V}_l$ , we apply a convolutional readout function $O:\mathbb{R}^{W\times H\times c}\mapsto \mathbb{R}^{W\times H}$ over $\{\pmb {h}_v^{(t)}\}_{v\in \mathcal{V}}$ (in Fig. 2(g)), and pixel-wise soft-max (PSM) for normalization: + +$$ +\hat {\mathcal {Y}} _ {l} ^ {(t)} = \left\{\hat {y} _ {v} ^ {(t)} \right\} _ {v \in \nu_ {l}} = \operatorname {P S M} \left(\left[ O \left(\boldsymbol {h} _ {v} ^ {(t)}\right) \right] _ {v \in \nu_ {l}}\right). \tag {15} +$$ + +Given the hierarchical human parsing results $\{\hat{Y}_l^{(t)}\}_{l = 1}^3$ and corresponding groundtruths $\{\mathcal{V}_l\}_{l = 1}^3$ , the learning task in the iterative inference can be posed as the minimization of the following loss (Fig.2(h)): + +$$ +\mathcal {L} _ {\text {p a r s i n g}} ^ {(t)} = \sum_ {l = 1} ^ {3} \mathcal {L} _ {\mathrm {C E}} ^ {(t)} \left(\hat {\mathcal {Y}} _ {l} ^ {(t)}, \mathcal {Y} _ {l}\right). \tag {16} +$$ + +Considering Eqs.5,7,11,and 16,the overall loss is defined as: + +$$ +\mathcal {L} = \sum_ {t = 1} ^ {T} \left(\mathcal {L} _ {\text {p a r s i n g}} ^ {(t)} + \alpha \left(\mathcal {L} _ {\mathrm {c o m}} ^ {(t)} + \mathcal {L} _ {\mathrm {d e c}} ^ {(t)} + \mathcal {L} _ {\mathrm {d e p}} ^ {(t)}\right)\right), \tag {17} +$$ + +where the coefficient $\alpha$ is empirically set as 0.1. We set the total inference time $T = 2$ and study how the performance changes with the number of inference iterations in §4.3. + +# 3.3. Implementation Details + +Node embedding: A DeepLabV3 network [6] serves as the backbone architecture, resulting in a 256-channel image representation whose spatial dimensions are $1/8$ of the input image. The projection function $P \colon \mathbb{R}^{W \times H \times C} \mapsto \mathbb{R}^{W \times H \times c \times |\mathcal{V}|}$ in Eq. 1 is implemented by a $3 \times 3$ convolutional layer with + +ReLU nonlinearity, where $C = 256$ and $|\mathcal{V}|$ (i.e., the number of nodes) is set according to the settings in different human parsing datasets. We set the channel size of node features $c = 64$ to maintain high computational efficiency. + +Relation networks: Each typed relation network $R^r$ in Eq.2 concatenates the relation-adapted feature $F^r(\boldsymbol{h}_u)$ from the source node $u$ and the destination node $v$ 's feature $\boldsymbol{h}_v$ as the input, and outputs the relation representations: $\boldsymbol{h}_{u,v} = R^r([F^r(\boldsymbol{h}_u), \boldsymbol{h}_v])$ . $R^r: \mathbb{R}^{W \times H \times 2c} \mapsto \mathbb{R}^{W \times H \times c}$ is implemented by a $3 \times 3$ convolutional layer with ReLU nonlinearity. + +Iterative inference: In Eq.14, the update function $U_{\mathrm{convGRU}}$ is implemented by a convolutional GRU with $3 \times 3$ convolution kernels. The readout function $O$ in Eq.15 applies a $1 \times 1$ convolution operation on the feature-prediction projection. In addition, before sending a node feature $\pmb{h}_v^{(t)}$ into $O$ , we use a light-weight decoder (built using a principle of upsampling the node feature and merging it with the low-level feature of the backbone network) that outputs the segmentation mask with $1/4$ the spatial resolution of the input image. + +As seen, all the units of our parser are built on convolution operations, leading to spatial information preservation. + +# 4. Experiments + +# 4.1. Experimental Settings + +Datasets: Five standard benchmark datasets [22, 64, 44, 31, 45] are used for performance evaluation. LIP [22] contains 50,462 single-person images, which are collected from realistic scenarios and divided into 30,462 images for training, 10,000 for validation and 10,000 for test. The pixelwise annotations cover 19 human part categories (e.g., face, left-/right-arms, left-/right-legs, etc.). PASCAL-PersonPart [64] includes 3,533 multi-person images with challenging poses and viewpoints. Each image is pixel-wise annotated with six classes (i.e., head, torso, upper-/lower-arms, and upper-/lower-legs). It is split into 1,716 and 1,817 images for training and test. ATR [31] is a challenging human parsing dataset, which has 7,700 single-person images with dense annotations over 17 categories (e.g., face, upper-clothes, left-/right-arms, left-/right-legs, etc.). There are 6,000, 700 and 1,000 images for training, validation, and test, respectively. PPSS [44] is a collection of 3,673 single-pedestrian images from 171 surveillance videos and provides pixel-wise annotations for hair, face, upper-/lower-clothes, arm, and leg. It presents diverse real-word challenges, e.g., pose variations, illumination changes, and occlusions. There are 1,781 and 1,892 images for training and testing, respectively. Fashion Clothing [45] has 4,371 images gathered from Colorful Fashion Parsing [35], Fashionista [68], and Clothing Co-Parsing [69]. It has 17 clothing + +
MethodpixAcc.Mean Acc.Mean IoU
SegNet [1]69.0424.0018.17
FCN-8s [41]76.0636.7528.29
DeepLabV2 [4]82.6651.6441.64
Attention [5]83.4354.3942.92
†Attention+SSL [22]84.3654.9444.73
DeepLabV3+ [6]84.0955.6244.80
ASN [43]--45.41
†SSL [22]--46.19
MMAN [46]85.2457.6046.93
†SS-NAN [72]87.5956.0347.92
HSP-PRI [26]85.0760.5448.16
†MuLA [47]88.560.549.3
PSPNet [70]86.2361.3350.56
CE2P [39]87.3763.2053.10
BraidNet [40]87.6066.0954.42
CNIF [61]88.0368.8057.74
Ours89.0570.5859.25
+ +Table 1: Comparison of pixel accuracy, mean accuracy and mIoU on LIP va1 [22]. $\dagger$ indicates extra pose information used. + +categories (e.g., hair, pants, shoes, upper-clothes, etc.) and the data split follows 3,934 for training and 437 for test. + +Training: ResNet101 [24], pre-trained on ImageNet [52], is used to initialize our DeepLabV3 [6] backbone. The remaining layers are randomly initialized. We train our model on the five aforementioned datasets with their respective training samples, separately. Following the common practice [39, 21, 61], we randomly augment each training sample with a scaling factor in [0.5, 2.0], crop size of $473 \times 473$ , and horizontal flip. For optimization, we use the standard SGD solver, with a momentum of 0.9 and weight Decay of 0.0005. To schedule the learning rate, we employ the polynomial annealing procedure [4, 70], where the learning rate is multiplied by $(1 - \frac{\text{iter}}{\text{total\_iter}})^{\text{power}}$ with power as 0.9. + +Testing: For each test sample, we set the long side of the image to 473 pixels and maintain the original aspect ratio. As in [70, 47], we average the parsing results over five-scale image pyramids of different scales with flipping, i.e., the scaling factor is 0.5 to 1.5 (with intervals of 0.25). + +Reproducibility: Our method is implemented on PyTorch and trained on four NVIDIA Tesla V100 GPUs (32GB memory per-card). All the experiments are performed on one NVIDIA Titan Xp 12GB GPU. To provide full details of our approach, our code will be made publicly available. + +Evaluation: For fair comparison, we follow the official evaluation protocols of each dataset. For LIP, following [72], we report pixel accuracy, mean accuracy and mean Intersection-over-Union (mIoU). For PASCAL-Person-Part and PPSS, following [63, 64, 46], the performance is evaluated in terms of mIoU. For ATR and Fashion Clothing, as in [45, 61], we report pixel accuracy, foreground accuracy, average precision, average recall, and average F1-score. + +# 4.2. Quantitative and Qualitative Results + +LIP [22]: LIP is a gold standard benchmark for human parsing. Table 1 reports the comparison results with 16 state-of + +
MethodHeadTorsoU-ArmL-ArmU-LegL-LegB.G.Ave.
HAZN [63]80.7959.1143.0542.7638.9934.4693.5956.11
Attention [5]81.4759.0644.1542.5038.2835.6293.6556.39
LG-LSTM [33]82.7260.9945.4047.7642.3337.9688.6357.97
Attention+SSL [22]83.2662.4047.8045.5842.3239.4894.6859.36
Attention+MMAN [46]82.5862.8348.4947.3742.8040.4094.9259.91
Graph LSTM [32]82.6962.6846.8847.7145.6640.9394.5960.16
SS-NAN [72]86.4367.2851.0948.0744.8242.1597.2362.44
Structure LSTM [30]82.8967.1551.4248.7251.7245.9197.1863.57
Joint [64]85.5067.8754.7254.3048.2544.7695.3264.39
DeepLabV2 [4]-------64.94
MuLA [47]84.668.357.554.149.646.495.665.1
PCNet [74]86.8169.0655.3555.2750.2148.5496.0765.90
Holistic [29]86.0069.8556.6355.9251.4648.8295.7366.34
WSHP [15]87.1572.2857.0756.2152.4350.3697.7267.60
DeepLabV3+ [6]87.0272.0260.3757.3653.5448.5296.0767.84
SPGNet [8]87.6771.4161.6960.3552.6248.8095.9868.36
PGN [21]90.8975.1255.8364.6155.4241.5795.3368.40
CNIF [61]88.0272.9164.3163.5255.6154.9696.0270.76
Ours89.7375.2266.8766.2158.6958.1796.9473.12
+ +Table 2: Per-class comparison of mIoU on PASCAL-Person-Part test [64]. + +
MethodpixAcc.F.G. Acc.Prec.RecallF-1
Yamaguchi [68]84.3855.5937.5451.0541.80
Paperdoll [67]88.9662.1852.7549.4344.76
M-CNN [36]89.5773.9864.5665.1762.81
ATR [31]91.1171.0471.6960.2564.38
DeepLabV2 [4]94.4282.9378.4869.2473.53
PSPNet [70]95.2080.2379.6673.7975.84
Attention [5]95.4185.7181.3073.5577.23
DeepLabV3+ [6]95.9683.0480.4178.7979.49
Co-CNN [34]96.0283.5784.9577.6680.14
LG-LSTM [33]96.1884.7984.6479.4380.97
TGPNet [45]96.4587.9183.3680.2281.76
CNIF [61]96.2687.9184.6286.4185.51
Ours96.8489.2386.1788.3587.25
+ +the-arts on LIP val. We first find that general semantic segmentation methods [1, 41, 4, 6] tend to perform worse than human parsers. This indicates the importance of reasoning human structures in this problem. In addition, though recent human parsers gain impressive results, our model still outperforms all the competitors by a large margin. For instance, in terms of pixAcc., mean Acc., and mean IoU, our parser dramatically surpasses the best performing method, CNIF [61], by $1.02\%$ , $1.78\%$ and $1.51\%$ , respectively. We would also like to mention that our parser does not use additional pose [22, 72, 47] or edge [39] information. + +PASCAL-Person-Part [64]: In Table 2, we compare our method against 18 recent methods on PASCAL-Person-Part test using IoU score. From the results, we can again see that our approach achieves better performance compared to all other methods; specially, $73.12\%$ vs $70.76\%$ of CNIF [61] and $68.40\%$ of PGN [21], in terms of mIoU. Such a performance gain is particularly impressive considering that improvement on this dataset is very challenging. + +ATR [31]: Table 3 presents comparisons with 14 previous methods on ATR test. Our approach sets new state-of-the-arts for all five metrics, outperforming all other meth + +Table 3: Comparison of accuracy, foreground accuracy, average precision, recall and F1-score on ATR test [31]. + +
MethodpixAcc.F.G. Acc.Prec.RecallF-1
Yamaguchi [68]81.3232.2423.7423.6822.67
Paperdoll [67]87.1750.5945.8034.2035.13
DeepLabV2 [4]87.6856.0835.3539.0037.09
Attention [5]90.5864.4747.1150.3548.68
TGPNet [45]91.2566.3750.7153.1851.92
CNIF [61]92.2068.5956.8459.4758.12
Ours93.1270.5758.7361.7260.19
+ +Table 4: Comparison of pixel accuracy, foreground pixel accuracy, average precision, average recall and average f1-score on Fashion Clothing test [45]. + +
MethodHeadFaceU-ClothArmsL-ClothLegsB.G.Ave.
DL [44]22.029.157.310.646.112.968.635.2
DDN [44]35.544.168.417.061.723.880.047.2
ASN [43]51.751.065.929.552.820.383.850.7
MMAN [46]53.150.269.029.455.921.485.752.1
LCPC [9]55.646.671.930.958.824.686.253.5
CNIF [61]67.660.880.846.869.528.790.660.5
Ours68.863.281.749.370.832.091.465.3
+ +Table 5: Comparison of mIoU on PPSS test [44]. + +ods by a large margin. For example, our parser provides a considerable performance gain in F-1 score, i.e., $1.74\%$ and $5.49\%$ higher than the current top-two performing methods, CNIF [61] and TGPNet [45], respectively. + +Fashion Clothing [45]: The quantitative comparison results with six competitors on Fashion Clothing test are summarized in Table 4. Our model yields an F-1 score of $60.19\%$ , while those for Attention [5], TGPNet [45], and CNIF [61] are $48.68\%$ , $51.92\%$ , and $58.12\%$ , respectively. This again demonstrates our superior performance. + +PPSS [44]: Table 5 compares our method against six famous methods on PPSS test set. The evaluation results demonstrate that our human parser achieves $65.3\%$ mIoU, with substantial gains over the second best, CNIF [61], and third best, LCPC [9], of $4.8\%$ and $11.8\%$ , respectively. + +Runtime comparison: As our parser does not require extra pre-/post-processing steps (e.g., human pose used in [64], over-segmentation in [32, 30], and CRF in [64]), it achieves a high speed of 12fps (on PASCAL-Person-Part), faster than most of the counterparts, such as Joint [64] (0.1fps), Attention+SSL [22] (2.0fps), MMAN [46] (3.5fps), SS-NAN [72] (2.0fps), and LG-LSTM [33] (3.0fps). + +Qualitative results: Some qualitative comparison results on PASCAL-Person-Part test are depicted in Fig. 6. We can see that our approach outputs more precise parsing results than other competitors [6, 21, 72, 61], despite the existence of rare pose $(2_{nd}$ row) and occlusion $(3_{rd}$ row). In addition, with its better understanding of human structures, our parser gets more robust results and eliminates the interference from the background $(1_{st}$ row). The last row gives a challenging case, where our parser still correctly recognizes the confusing parts of the person in the middle. + +![](images/6443a3556bf745277c2b65d71b5616ba693d325b23d4b95831b934b8aa5ab15d.jpg) +(a) Image + +![](images/a349a92cc500bad8be8de948d975e3dfc8761f1fb22d63c19eaba05788f91998.jpg) +(b) Ground-truth + +![](images/443e379cebeddc56ea8c53da9274df7e17e388acf39394969a4a0e4900f4c182.jpg) +(c) Ours + +![](images/0ce9ce51fd7903df27dc83688e18b7dcc762d7ad82caa26cac13daf25b79d7eb.jpg) +(d) DeepLabV3+ [6] +Figure 6: Visual comparison on PASCAL-Person-Part test. Our model (c) generates more accurate predictions, compared to other famous methods [6, 21, 72, 61] (d-g). The improved labeled results by our parser are denoted in red boxes. Best viewed in color. + +![](images/7bc55464b11e84b315ca810fba3c6a4cdeb0efeb0617b17352edb6e0d144afe7.jpg) +(e) PGN [21] + +![](images/ae2a6c0d52aee4c9de55a5f75cece6ff2d6011602337c37a42365506129abad3.jpg) +(f) SS-NAN [72] + +![](images/144fff38506e101366424d6ebf20612e18a605eb77f27c7cf16471b2987106fe.jpg) +(g) CNIF [61] + +# 4.3. Diagnostic Experiments + +To demonstrate how each component in our parser contributes to the performance, a series of ablation experiments are conducted on PASCAL-Person-Part test. + +Type-specific relation modeling: We first investigate the necessity of comprehensively exploring different relations, and discuss the effective of our type-specific relation modeling strategy. Concretely, we studied six variant models, as listed in Table 6: (1) 'Baseline' denotes the approach only using the initial node embeddings $\{h_v^{(0)}\}_{v\in \mathcal{V}}$ without any relation information; (2) 'Type-agnostic' shows the performance when modeling different human part relations in a type-agnostic manner: $h_{u,v} = R([h_u,h_v])$ ; (3) 'Type-specific $w / oF^r$ ' gives the performance without the relation-adaption operation $F^r$ in Eq. 2: $h_{u,v} = R^{r}([h_{u},h_{v}])$ ; (4-6) 'Decomposition relation', 'Composition relation' and 'Dependency relation' are three variants that only consider the corresponding single one of the three kinds of relation categories, using our type-specific relation modeling strategy (Eq.2). Four main conclusions can be drawn: (1) Structural information is essential for human parsing, as all the structured models outperforms 'Baseline'. (2)Typed relation modeling leads to more effective human structure learning, as 'Type-specific $w / oF^r$ ' improves 'Type-agnostic' by $1.28\%$ . (3) Exploring different kinds of relations are meaningful, as the variants using individual relation types outperform 'Baseline' and our full model considering all the three kinds of relations achieves the best performance. (4) Encoding relation-specific constrains helps with relation pattern learning as our full model is better than the one without relation-adaption, 'Type-specific $w / oF^r$ ' + +Iterative inference: Table 6 shows the performance of our parser with regard to the iteration step $t$ as denoted in Eq.13 and Eq.14. Note that, when $t = 0$ , only the initial node feature is used. It can be observed that setting $T = 2$ or $T = 3$ provided a consistent boost in accuracy of $4\sim 5\%$ , on average, compared to $T = 0$ ; however, increasing $T$ beyond 3 gave marginal returns in performance (around $0.1\%$ ). Ac + +
ComponentModulemIoU△time (ms)
ReferenceFull model (2 iterations)73.12-81
Relation modelingBaseline68.84-4.2846
Type-agnostic70.37-2.7555
Type-specific w/o F\( ^r \)71.65-1.4755
Decomposition relation71.38-1.7450
Composition relation69.35-3.7749
Dependency relation69.43-3.6952
Iterative Inference T0 iteration68.84-4.2846
1 iterations72.17-0.9559
3 iterations73.19+0.0793
4 iterations73.22+0.10105
5 iterations73.23+0.11116
+ +Table 6: Ablation study (§4.3) on PASCAL-Person-Part test. + +cordingly, we choose $T = 2$ for a better trade-off between accuracy and computation time. + +# 5. Conclusion + +In the human semantic parsing task, structure modeling is an essential, albeit inherently difficult, avenue to explore. This work proposed a hierarchical human parser that addresses this issue in two aspects. First, three distinct relation networks are designed to precisely describe the compositional/decompositional relations between constituent and entire parts and help with the dependency learning over kinetically connected parts. Second, to address the inference over the loopy human structure, our parser relies on a convolutional, message passing based approximation algorithm, which enjoys the advantages of iterative optimization and spatial information preservation. The above designs enable strong performance across five widely adopted benchmark datasets, at times outperforming all other competitors. Acknowledgements This work was partially sponsored by Zhejiang Lab's Open Fund (No. 2019KD0AB04), Zhejiang Lab's International Talent Fund for Young Professionals, and CCF-Tencent Open Fund. This work was also partially supported by DARPA XAI grant N66001-17-2-4029, ARO grant W911NF-18-1-0296, the National Key R&D Program of China (Grant Nos. 2018AAA0102800 and 2018AAA0102802) and National Natural Science Foundation of China (Grant No. 61632018). + +# References + +[1] Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE TPAMI, 39(12):2481-2495, 2017. 6, 7 +[2] Yihang Bo and Charless C Fowlkes. Shape-based pedestrian parsing. In CVPR, 2011. 2 +[3] Hong Chen, Zi Jian Xu, Zi Qiang Liu, and Song Chun Zhu. Composite templates for cloth modeling and sketching. In CVPR, 2006. 2 +[4] 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 TPAMI, 40(4):834-848, 2018. 6, 7 +[5] Liang-Chieh Chen, Yi Yang, Jiang Wang, Wei Xu, and Alan L Yuille. Attention to scale: Scale-aware semantic image segmentation. In CVPR, 2016. 2, 6, 7 +[6] 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. 3, 5, 6, 7, 8 +[7] Xianjie Chen, Roozbeh Mottaghi, Xiaobai Liu, Sanja Fidler, Raquel Urtasun, and Alan Yuille. Detect what you can: Detecting and representing objects using holistic models and body parts. In CVPR, 2014. 2 +[8] Bowen Cheng, Liang-Chieh Chen, Yunchao Wei, Yukun Zhu, Zilong Huang, Jinjun Xiong, Thomas Huang, Wen-Mei Hwu, and Honghui Shi. Spgnet: Semantic prediction guidance for scene parsing. In ICCV, 2019. 7 +[9] Kang Dang and Junsong Yuan. Location constrained pixel classifiers for image parsing with regular spatial layout. In BMVC, 2014. 7 +[10] Jian Dong, Qiang Chen, Xiaohui Shen, Jianchao Yang, and Shuicheng Yan. Towards unified human parsing and pose estimation. In CVPR, 2014. 2 +[11] Jian Dong, Qiang Chen, Wei Xia, Zhongyang Huang, and Shuicheng Yan. A deformable mixture parsing model with parselets. In ICCV, 2013. 2 +[12] David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In NIPS, 2015. 2 +[13] S Eslami and Christopher Williams. A generative model for parts-based object segmentation. In NIPS, 2012. 2 +[14] Lifeng Fan, Wenguan Wang, Siyuan Huang, Xinyu Tang, and Song-Chun Zhu. Understanding human gaze communication by spatio-temporal graph reasoning. In ICCV, 2019. 1 +[15] Hao-Shu Fang, Guansong Lu, Xiaolin Fang, Jianwen Xie, Yu-Wing Tai, and Cewu Lu. Weakly and semi supervised human body part parsing via pose-guided knowledge transfer. In CVPR, 2018. 1, 2, 7 +[16] Hao-Shu Fang, Chenxi Wang, Minghao Gou, and Cewu Lu. Graspnet: A large-scale clustered and densely annotated dataset for object grasping. arXiv preprint arXiv:1912.13470, 2019. 1 +[17] Hao-Shu Fang, Shuqin Xie, Yu-Wing Tai, and Cewu Lu. Rumpe: Regional multi-person pose estimation. In ICCV, + +2017. 2 +[18] 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 AAAI, 2018. 2 +[19] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In ICML, 2017. 2 +[20] Ke Gong, Yiming Gao, Xiaodan Liang, Xiaohui Shen, Meng Wang, and Liang Lin. Graphonomy: Universal human parsing via graph transfer learning. In CVPR, 2019. 1, 2 +[21] Ke Gong, Xiaodan Liang, Yicheng Li, Yimin Chen, Ming Yang, and Liang Lin. Instance-level human parsing via part grouping network. In ECCV, 2018. 6, 7, 8 +[22] Ke Gong, Xiaodan Liang, Dongyu Zhang, Xiaohui Shen, and Liang Lin. Look into person: Self-supervised structure-sensitive learning and a new benchmark for human parsing. In CVPR, 2017. 1, 2, 6, 7 +[23] William L Hamilton, Rex Ying, and Jure Leskovec. Representation learning on graphs: Methods and applications. arXiv preprint arXiv:1709.05584, 2017. 2 +[24] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 6 +[25] Ronghang Hu, Marcus Rohrbach, and Trevor Darrell. Segmentation from natural language expressions. In ECCV, 2016. 4 +[26] Mahdi M. Kalayeh, Emrah Basaran, Muhittin Gokmen, Mustafa E. Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In CVPR, 2018. 6 +[27] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. 2 +[28] Lubor Ladicky, Philip HS Torr, and Andrew Zisserman. Human pose estimation using a joint pixel-wise and part-wise formulation. In CVPR, 2013. 2 +[29] Qizhu Li, Anurag Arnab, and Philip HS Torr. Holistic, instance-level human parsing. In BMVC, 2017. 7 +[30] Xiaodan Liang, Liang Lin, Xiaohui Shen, Jiashi Feng, Shuicheng Yan, and Eric P Xing. Interpretable structure-evolving lstm. In CVPR, 2017. 7 +[31] Xiaodan Liang, Si Liu, Xiaohui Shen, Jianchao Yang, Luoqi Liu, Jian Dong, Liang Lin, and Shuicheng Yan. Deep human parsing with active template regression. IEEE TPAMI, 37(12):2402-2414, 2015. 2, 6, 7 +[32] Xiaodan Liang, Xiaohui Shen, Jiashi Feng, Liang Lin, and Shuicheng Yan. Semantic object parsing with graph lstm. In ECCV, 2016. 2, 7 +[33] Xiaodan Liang, Xiaohui Shen, Donglai Xiang, Jiashi Feng, Liang Lin, and Shuicheng Yan. Semantic object parsing with local-global long short-term memory. In CVPR, 2016. 2, 7 +[34] Xiaodan Liang, Chunyan Xu, Xiaohui Shen, Jianchao Yang, Si Liu, Jinhui Tang, Liang Lin, and Shuicheng Yan. Human parsing with contextualized convolutional neural network. In ICCV, 2015. 2, 7 +[35] Si Liu, Jiashi Feng, Csaba Domokos, Hui Xu, Junshi Huang, Zhenzhen Hu, and Shuicheng Yan. Fashion parsing with weak color-category labels. TMM, 16(1):253-265, 2014. 2, 6 +[36] Si Liu, Xiaodan Liang, Luoqi Liu, Xiaohui Shen, Jian- + +chao Yang, Changsheng Xu, Liang Lin, Xiaochun Cao, and Shuicheng Yan. Matching-cnn meets knn: Quasi-parametric human parsing. In CVPR, 2015. 2, 7 +[37] Si Liu, Yao Sun, Defa Zhu, Guanghui Ren, Yu Chen, Jiashi Feng, and Jizhong Han. Cross-domain human parsing via adversarial feature and label adaptation. In AAAI, 2018. 2 +[38] Si Liu, Changhu Wang, Ruihe Qian, Han Yu, Renda Bao, and Yao Sun. Surveillance video parsing with single frame supervision. In CVPR, 2017. 2 +[39] Ting Liu, Tao Ruan, Zilong Huang, Yunchao Wei, Shikui Wei, Yao Zhao, and Thomas Huang. Devil in the details: Towards accurate single and multiple human parsing. arXiv preprint arXiv:1809.05996, 2018. 6, 7 +[40] Xinchen Liu, Meng Zhang, Wu Liu, Jingkuan Song, and Tao Mei. Braidnet: Braiding semantics and details for accurate human parsing. In ACMMM, 2019. 6 +[41] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. 6, 7 +[42] Long Zhu, Yuanhao Chen, Yifei Lu, Chenxi Lin, and A. Yuille. Max margin and/or graph learning for parsing the human body. In CVPR, 2008. 1, 2 +[43] Pauline Luc, Camille Couprie, Soumith Chintala, and Jakob Verbeek. Semantic segmentation using adversarial networks. In NIPS-workshop, 2016. 6, 7 +[44] Ping Luo, Xiaogang Wang, and Xiaou Tang. Pedestrian parsing via deep decompositional network. In ICCV, 2013. 2, 6, 7 +[45] Xianghui Luo, Zhuo Su, Jiaming Guo, Gengwei Zhang, and Xiangjian He. Trusted guidance pyramid network for human parsing. In ACMMM, 2018. 2, 6, 7 +[46] Yawei Luo, Zhedong Zheng, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Macro-micro adversarial network for human parsing. In ECCV, 2018. 2, 6, 7 +[47] Xuecheng Nie, Jiashi Feng, and Shuicheng Yan. Mutual learning to adapt for joint human parsing and pose estimation. In ECCV, 2018. 1, 2, 6, 7 +[48] Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In ICML, 2016. 2 +[49] Seyoung Park, Bruce Xiaohan Nie, and Song-Chun Zhu. Attribute and-or grammar for joint parsing of human pose, parts and attributes. IEEE TPAMI, 40(7):1555-1569, 2018. 1 +[50] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Song-Chun Zhu. Learning human-object interactions by graph parsing neural networks. In ECCV, 2018. 1 +[51] Ingmar Rauschert and Robert T Collins. A generative model for simultaneous estimation of human body shape and pixel-level segmentation. In ECCV, 2012. 2 +[52] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and Fei-Fei Li. Imagenet large scale visual recognition challenge. IJCV, 115(3):211–252, 2015. 6 +[53] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61-80, 2008. 2, 3, 5 +[54] Xingjian Shi, 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 NIPS, 2015. 5 +[55] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, 2017. 4 +[56] Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In ICLR, 2018. 2 +[57] Nan Wang and Haizhou Ai. Who blocks who: Simultaneous clothing segmentation for grouping images. In ICCV, 2011. 2 +[58] Tiancai Wang, Tong Yang, Martin Danelljan, Fahad Shahbaz Khan, Xiangyu Zhang, and Jian Sun. Learning human-object interaction detection using interaction points. In CVPR, 2020. 1 +[59] Wenguan Wang, Xiankai Lu, Jianbing Shen, David J Crandall, and Ling Shao. Zero-shot video object segmentation via attentive graph neural networks. In ICCV, 2019. 2 +[60] Wenguan Wang, Yuanlu Xu, Jianbing Shen, and Song-Chun Zhu. Attentive fashion grammar network for fashion landmark detection and clothing category classification. In CVPR, 2018. 1 +[61] Wenguan Wang, Zhijie Zhang, Siyuan Qi, Jianbing Shen, Yanwei Pang, and Ling Shao. Learning compositional neural information fusion for human parsing. In ICCV, 2019. 1, 2, 3, 5, 6, 7, 8 +[62] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. 4 +[63] Fangting Xia, Peng Wang, Liang-Chieh Chen, and Alan L Yuille. Zoom better to see clearer: Human and object parsing with hierarchical auto-zoom net. In ECCV, 2016. 2, 6, 7 +[64] Fangting Xia, Peng Wang, Xianjie Chen, and Alan L Yuille. Joint multi-person pose estimation and semantic part segmentation. In CVPR, 2017. 1, 2, 6, 7 +[65] Fangting Xia, Jun Zhu, Peng Wang, and Alan L Yuille. Pose-guided human parsing by an and/or graph using pose-context features. In AAAI, 2016. 1, 2 +[66] Wenqiang Xu, Yonglu Li, and Cewu Lu. Srda: Generating instance segmentation annotation via scanning, reasoning and domain adaptation. In ECCV, 2018. 2 +[67] Kota Yamaguchi, M Hadi Kiapour, and Tamara L Berg. Paper doll parsing: Retrieving similar styles to parse clothing items. In ICCV, 2013. 2, 7 +[68] Kota Yamaguchi, M Hadi Kiapour, Luis E Ortiz, and Tamara L Berg. Parsing clothing in fashion photographs. In CVPR, 2012. 2, 6, 7 +[69] Wei Yang, Ping Luo, and Liang Lin. Clothing co-parsing by joint image segmentation and labeling. In CVPR, 2014. 2, 6 +[70] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. 6, 7 +[71] Jian Zhao, Jianshu Li, Yu Cheng, Terence Sim, Shuicheng Yan, and Jiashi Feng. Understanding humans in crowded scenes: Deep nested adversarial learning and a new benchmark for multi-human parsing. In ACMMM, 2018. 2 +[72] Jian Zhao, Jianshu Li, Xuecheng Nie, Fang Zhao, Yunpeng Chen, Zhecan Wang, Jiashi Feng, and Shuicheng Yan. Self-supervised neural aggregation networks for human parsing. In CVPR-workshop, 2017. 2, 6, 7, 8 +[73] Zilong Zheng, Wenguan Wang, Siyuan Qi, and Song-Chun + +Zhu. Reasoning visual dialogs with structural and partial observations. In CVPR, 2019. 2 +[74] Bingke Zhu, Yingying Chen, Ming Tang, and Jinqiao Wang. Progressive cognitive human parsing. In AAAI, 2018. 1, 2, 3, 5, 7 \ No newline at end of file diff --git a/hierarchicalhumanparsingwithtypedpartrelationreasoning/images.zip b/hierarchicalhumanparsingwithtypedpartrelationreasoning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..66038be4fc3ce701536b7c4734ecb924c9f73d11 --- /dev/null +++ b/hierarchicalhumanparsingwithtypedpartrelationreasoning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53e4818d89da54012b72a2545956fe0514787e6f7cc56c4bceb1b0d6fae4468c +size 780690 diff --git a/hierarchicalhumanparsingwithtypedpartrelationreasoning/layout.json b/hierarchicalhumanparsingwithtypedpartrelationreasoning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1c77326150a8f3acf07bf96b45a08308553f01db --- /dev/null +++ b/hierarchicalhumanparsingwithtypedpartrelationreasoning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1494eeef00ce0e45088c4b38536b1881edcc922c9becbd7fdfe16a147131036b +size 619892 diff --git a/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_content_list.json b/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1b98750c089cdb9cc7606cb13fcf42be67d563a5 --- /dev/null +++ b/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:055c2405f8941675856e692566ea2a8ba0f46b15afe153b63abf7ca7fcdc3ef9 +size 80357 diff --git a/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_model.json b/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_model.json new file mode 100644 index 0000000000000000000000000000000000000000..db80ff0269d3837f463e2ea91981b7f227083ebf --- /dev/null +++ b/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97b5123f5e512d12a445626d78d0ef4c55cfe818814b5af5afc163dee3f612fb +size 95454 diff --git a/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_origin.pdf b/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..98253a44b5e0faa69dc396c8efda6b787d414c0d --- /dev/null +++ b/hierarchicallyrobustrepresentationlearning/0a022565-6ae7-4b0f-b270-33cee2685c90_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09283ea4f0217ae5e8da34bdf82820a7105bd1270e92f3e58cdb0704f7d5a057 +size 1590895 diff --git a/hierarchicallyrobustrepresentationlearning/full.md b/hierarchicallyrobustrepresentationlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..36ba70e13d53372cfb843520e77706f6a0489c30 --- /dev/null +++ b/hierarchicallyrobustrepresentationlearning/full.md @@ -0,0 +1,419 @@ +# Hierarchically Robust Representation Learning + +Qi Qian $^{1}$ Juhua Hu $^{2}$ Hao Li $^{1}$ + +1Alibaba Group + +$^{2}$ School of Engineering and Technology + +University of Washington, Tacoma, USA + +{qi.qian, lihao.lh}@alibaba-inc.com juhuah@uw.edu + +# Abstract + +With the tremendous success of deep learning in visual tasks, the representations extracted from intermediate layers of learned models, that is, deep features, attract much attention of researchers. Previous empirical analysis shows that those features can contain appropriate semantic information. Therefore, with a model trained on a large-scale benchmark data set (e.g., ImageNet), the extracted features can work well on other tasks. In this work, we investigate this phenomenon and demonstrate that deep features can be suboptimal due to the fact that they are learned by minimizing the empirical risk. When the data distribution of the target task is different from that of the benchmark data set, the performance of deep features can degrade. Hence, we propose a hierarchically robust optimization method to learn more generic features. Considering the example-level and concept-level robustness simultaneously, we formulate the problem as a distributionally robust optimization problem with Wasserstein ambiguity set constraints, and an efficient algorithm with the conventional training pipeline is proposed. Experiments on benchmark data sets demonstrate the effectiveness of the robust deep representations. + +# 1. Introduction + +Extracting appropriate representations is essential for visual recognition. In the past decades, various hand-crafted features have been developed to capture semantics of images, e.g., SIFT [16], HOG [7], etc. The conventional pipeline works in two phases. In the first phase, representations are extracted from each image with a given schema. Thereafter, a specific model (e.g., SVM [6]) is learned with these features for a target task. Since the hand-crafted features are task-independent, the performance of this pipeline can be suboptimal. + +Deep learning proposes to incorporate these phases by training end-to-end convolutional neural networks. Without an explicit feature design like SIFT [16], a task-dependent + +![](images/25b01a5de0f35244c18dedfba45b874e02b5ca2f20ff7304355cd07626872cd0.jpg) + +![](images/2656eaa24ebcd58e83df732440f962a4ea73ece60d820911ffcb8d09f096496d.jpg) + +![](images/439f52e5a981a5254996b75e7e653da155e56d87610e0fe779e00be10bb295ee.jpg) +Figure 1. Examples from ImageNet, CIFAR-10 and SOP. Example-level distribution difference within a class can be observed from the 7th image of ImageNet and 2nd image of CIFAR-10 for the car class in various aspects, e.g., resolution and pose. Concept-level distribution difference is significant between ImageNet and SOP. ImageNet includes many classes from the concept "animal" while SOP only contains classes from "artifact". + +representation will be learned through multiple layers and a fully connected layer is attached at the end as a linear classifier for recognition. Benefited from this coherent structure, deep learning promotes the performance on visual tasks dramatically, e.g., categorization [15], detection [21], etc. Despite the success of deep learning on large-scale data sets, deep neural networks (DNNs) are easy to overfit small data sets due to the large number of parameters. Besides, DNNs require GPU for efficient training, which is expensive. + +Researchers attempt to leverage pre-trained DNNs to improve the feature design mechanism. Surprisingly, it is observed that the features extracted from the last few layers perform well on the generic tasks when the model is pre-trained on a large-scale benchmark data set, e.g., ImageNet [22]. Deep features, which are outputs from intermediate layers of a deep model, become popular as the substitute of training deep models for light computation. Systematic comparison shows that these deep features outperform the existing hand-crafted features with a large margin [8, 17, 20]. + +The objective of learning deep models for specific tasks and deep features for generic tasks can be different, but little efforts have been devoted to further investigating deep fea + +tures. When learning deep models, it focuses on optimizing the performance on the current training data set. In contrast, deep features should be learned for generic tasks rather than a single data set. In the applications of deep features, it is also noticed that the deep features can fail when the data distribution in a generic task is different from the benchmark data set [28]. By studying the objective of learning models for a given task, we find that it is a standard empirical risk minimization (ERM) problem that is optimized on the uniform distribution over examples. It is well known that the models obtained by ERM can generalize well on the data from the same distribution as training [3]. + +However, the data distribution from real applications can be significantly different from a benchmark data set, which can result in the performance degeneration when adopting the representations learned from ERM. The differences can come from at least two aspects. First, the distribution of examples in each class can be different between the generic task and the benchmark data set, which is referred as example-level distribution difference in this paper. Taking the 7th image of ImageNet and 2nd of CIFAR-10 in Fig. 1 as an example, they are of different resolutions and poses while they are both from the car class. This problem attracts much attention recently and some approaches to optimize the worst-case performance are developed to handle this issue [5, 18, 24]. Second, the distribution of concepts in an application is also different from that in the benchmark data set. It should be noted that each concept here can contain multiple classes, e.g., bulldog, beagle and so on under the concept "dog". This concept-level distribution difference has been less investigated but more crucial for deploying deep features due to the fact that the concepts in real applications may be only a subset of or partially overlapped by those in the benchmark data set. For instance, the concepts in SOP is quite different from those covered in ImageNet as shown in Fig. 1. + +In this work, we propose to consider the difference in examples and that in concepts simultaneously and learn hierarchically robust representations from DNNs. Compared with ERM, our algorithm is more consistent with the objective of learning generic deep features. For the example-level robustness, we adopt Wasserstein ambiguity set [24] to encode the uncertainty from examples for the efficient optimization. Our theoretical analysis also illustrates that an appropriate augmentation can be better than the regularization in training DNNs, since the former one provides a tighter approximation for the optimization problem. For the concept-level robustness, we formulate it as a game between the deep model and the distribution over different concepts to optimize the worst-case performance over concepts. By learning deep features with the adversarial distribution, the worst-case performance over concepts can be improved. Finally, to keep the simplicity of the train + +ing pipeline, we develop an algorithm that leverages the standard random sampling strategy at each iteration and reweights the obtained gradient for an unbiased estimation. This step may increase the variance of the gradient and we reduce the variance by setting the learning rate elaborately. We show that the adversarial distribution can converge at the rate of $\mathcal{O}(\log (T) / T)$ , where $T$ denotes the total number of iterations. We employ ImageNet as a benchmark data set for learning deep features and the empirical study on real-world data sets confirms the effectiveness of our method. + +The rest of this paper is organized as follows. Section 2 reviews the related work. Section 3 introduces the proposed method. Section 4 conducts the experiments on the benchmark data sets and Section 5 concludes this work with future directions. + +# 2. Related Work + +Deep Features: Deep learning becomes popular since ImageNet ILSVRC12 and various architectures of DNNs have been proposed, e.g., AlexNet [15], VGG [23], GoogLeNet [27], and ResNet [12]. Besides the success on image categorization, features extracted from the last few layers are applied for generic tasks. [8] adopts the deep features from the last two layers in AlexNet and shows the impressive performance on visual recognition with different applications. After that, [20] applies deep features for distance metric learning and achieves the overwhelming performance to the hand-crafted features on fine-grained visual categorization. [17] compares deep features from different neural networks and ResNet shows the best results. Besides the model pre-trained on ImageNet, [28] proposes to learn deep features with a large-scale scene data set to improve the performance on the scene recognition task. All of these work directly extract features from the model learned with ERM as the objective. In contrast, we develop an algorithm that is tailored to learn robust deep representations. Note that deep features can be extracted from multiple layers of deep models and we focus on the layer before the final fully-connected layer in this work. + +Robust Optimization: Recently, distributionally robust optimization that aims to optimize the worst-case performance has attracted much attention [5, 18, 24]. [18] proposes to optimize the performance with worst-case distribution over examples that is derived from the empirical distribution. [5] extends the problem to a non-convex loss function, but they require a near-optimal oracle for the nonconvex problem to learn the robust model. [24] introduces the adversarial perturbation on each example for robustness. Most of these algorithms only consider the example-level robustness. In contrast, we propose the hierarchically robust optimization that considers the example-level and concept-level robustness simultaneously, to learn the generic deep representations for real applications. + +# 3. Hierarchical Robustness + +# 3.1. Problem Formulation + +Let $\mathbf{x}_i$ denote an image and $y_i \in \{1, \dots, C\}$ be its corresponding label for a $C$ -class classification problem. Given a benchmark data set $\{\mathbf{x}_i, y_i\}$ where $i = 1, \dots, N$ , the parameter $\theta$ in a deep neural network can be learned by solving the optimization problem as + +$$ +\min _ {\theta} \frac {1}{N} \sum_ {i} \ell \left(\mathbf {x} _ {i}, y _ {i}; \theta\right) \tag {1} +$$ + +where $\ell(\cdot)$ is a non-negative loss function (e.g., cross entropy loss). By decomposing the parameter $\theta$ as $\theta = \{\delta, \omega\}$ , where $\omega$ denotes the parameter of the final fully-connected layer and $\delta$ denotes the parameter from other layers and can be considered as for a feature extraction function $f(\cdot)$ , we can rewrite the original problem as + +$$ +\min _ {\theta} \frac {1}{N} \sum_ {i} \ell (f (\mathbf {x} _ {i}), y _ {i}; \omega) +$$ + +Considering that $\omega$ is for a linear classifier, which is consistent to the classifiers applied in real-world applications (e.g., SVM), the decomposition shows that the problem of learning generic deep features $f(\mathbf{x})$ can be addressed by learning a robust deep model on the benchmark data set. + +The original problem in Eqn. 1 is an empirical risk minimization (ERM) problem that can be inappropriate for learning generic representations. In the following, we explore the hierarchical robustness to obtain robust deep representations for generic tasks. + +First, we consider the example-level robustness. Unlike ERM, a robust model is to minimize the loss with the worst-case distribution derived from the empirical distribution. The optimization problem can be cast as a game between the prediction model and the adversarial distribution + +$$ +\min _ {\theta} \max _ {i} \{\ell (\mathbf {x} _ {i}, y _ {i}; \theta) \} +$$ + +which is equivalent to + +$$ +\min _ {\theta} \max _ {{\bf p} \in \mathbb {R} ^ {N}; {\bf p} \in \Delta} \sum_ {i} p _ {i} \ell ({\bf x} _ {i}, y _ {i}; \theta) +$$ + +where $\mathbf{p}$ is the adversarial distribution over training examples and $\Delta$ is the simplex as $\Delta = \{\mathbf{p}|\sum_{i}p_{i} = 1,\forall i,p_{i}\geq 0\}$ . When $\mathbf{p}$ is a uniform distribution, the distributionally robust optimization becomes ERM. + +Without any constraints, the adversarial distribution is sensitive to the outlier and can be arbitrarily far away from the empirical distribution, which has large variance from the selected examples. Therefore, we introduce a regularizer to constrain the space of the adversarial distribution, which provides a trade-off between the bias (i.e., to the empirical + +distribution) and variance for the adversarial distribution. The problem can be written as + +$$ +\min _ {\theta} \max _ {\mathbf {p} \in \mathbb {R} ^ {N}; \mathbf {p} \in \Delta} \sum_ {i} p _ {i} \ell (\mathbf {x} _ {i}, y _ {i}; \theta) - \lambda_ {e} \mathcal {D} (\mathbf {p} | | \mathbf {p} _ {0}) \tag {2} +$$ + +where $\mathbf{p}_0$ is the empirical distribution. $\mathcal{D}(\cdot)$ measures the distance between the learned adversarial distribution and the empirical distribution. We apply squared $L_{2}$ distance in this work as $\mathcal{D}(\mathbf{p}||\mathbf{p}_0) = \| \mathbf{p} - \mathbf{p}_0\| _2^2$ . The regularizer is to guarantee that the generated adversarial distribution is not too far away from the empirical distribution. It implies that the adversarial distribution is from an ambiguity set as + +$$ +\mathbf {p} \in \left\{\mathbf {p}: \mathcal {D} (\mathbf {p} | | \mathbf {p} _ {0}) \leq \epsilon \right\} +$$ + +where $\epsilon$ is determined by $\lambda_{e}$ + +Besides the example-level robustness, concept-level robustness is more important for learning the generic features. A desired model should perform consistently well over different concepts. Assuming that there are $K$ concepts in the training set and each concept consists of $N_{k}$ examples, the concept-robust optimization problem is + +$$ +\min _ {\theta} \max _ {k} \{\frac {1}{N _ {k}} \sum_ {i} ^ {N _ {k}} \ell (\mathbf {x} _ {i} ^ {k}, y _ {i} ^ {k}; \theta) \} +$$ + +With the similar analysis as the example-level robustness and adopting the appropriate regularizer, the problem becomes + +$$ +\min _ {\theta} \max _ {\mathbf {q} \in \mathbb {R} ^ {K}; \mathbf {q} \in \Delta} \sum_ {k} \frac {q _ {k}}{N _ {k}} \sum_ {i} ^ {N _ {k}} \ell \left(\mathbf {x} _ {i} ^ {k}, y _ {i} ^ {k}; \theta\right) - \lambda_ {c} \mathcal {D} (\mathbf {q} | | \mathbf {q} _ {0}) \tag {3} +$$ + +where $\mathbf{q}_0$ can be set as $q_0^k = N_k / N$ . + +Combined with the example-level robustness, the hierarchically robust optimization problem becomes + +$$ +\begin{array}{l} \min_{\theta}\max_{\substack{\mathbf{p}\in \mathbb{R}^{N};\mathbf{p}\in \Delta \\ \mathbf{q}\in \mathbb{R}^{K};\mathbf{q}\in \Delta}}\qquad \sum_{k}\frac{q_{k}}{N_{k}}\sum_{i}^{N_{k}}p_{i}\ell (\mathbf{x}_{i}^{k},y_{i}^{k};\theta) \\ - \lambda_ {e} \mathcal {D} (\mathbf {p} | | \mathbf {p} _ {0}) - \lambda_ {c} \mathcal {D} (\mathbf {q} | | \mathbf {q} _ {0}) \\ \end{array} +$$ + +In this formulation, each example is associated with a parameter $p_i$ and $q_k$ . Therefore, a high dimensionality with this coupling structure makes an efficient optimization challenging. Due to the fact that $K \ll N$ , we decouple the hierarchical robustness with an alternative formulation for the example-level robustness as follows. + +# 3.2. Wasserstein Ambiguity Set + +In Eqn. 2, the ambiguity set is defined with the distance to the uniform distribution over the training set. It introduces the adversarial distribution by re-weighting each + +example, which couples the parameter with that of the concept-level problem. To simplify the optimization, we generate the ambiguity set for the adversarial distribution with Wasserstein distance [24]. The property of Wasserstein distance can help to decouple the example-level robustness from concept-level robustness. + +Assume that $P$ is a data-generating distribution over the data space and $P_0$ is the empirical distribution from where the training set is generated as $\mathbf{x} \sim P_0$ . The ambiguity set for the distribution $P$ can be defined as + +$$ +\left\{P: W \left(P, P _ {0}\right) \leq \epsilon \right\} +$$ + +$W(P, P_0) = \inf_{M \in \Pi(P, P_0)} E_M[d(\hat{\mathbf{x}}, \mathbf{x})]$ is the Wasserstein distance between distributions [24] and we denote the example generated from $P$ as $\hat{\mathbf{x}}$ . $d(\cdot, \cdot)$ is the transportation cost between examples. + +The problem of example-level robustness can be written as + +$$ +\min _ {\theta} \max _ {P} E _ {P} [ \ell (\hat {\mathbf {x}}, y; \theta) ] - \frac {\lambda_ {w}}{2} W (P, P _ {0}) +$$ + +According to the definition of Wasserstein distance [24] and let the cost function be the squared Euclidean distance, the problem is equivalent to + +$$ +\min _ {\theta} \max _ {\hat {\mathbf {x}} \in \mathbf {X}} \sum_ {i} \ell (\hat {\mathbf {x}} _ {i}, y _ {i}; \theta) - \frac {\lambda_ {w}}{2} \sum_ {i} \| \hat {\mathbf {x}} _ {i} - \mathbf {x} _ {i} \| _ {F} ^ {2} +$$ + +where $\mathbf{X}$ is the data space. In [24], they obtain the optimal $\hat{\mathbf{x}}_i$ by solving the subproblem for each example at each iteration. To accelerate the optimization, we propose to minimize the upper bound of the subproblem, which also provides an insight for the comparison between regularization and augmentation. + +The main theoretical results are stated in the following theorems and their proofs can be found in the supplementary. First, we give the definition of smoothness as + +Definition 1. A function $f$ is called $L_{z}$ -smoothness in $z$ w.r.t. a norm $\| \cdot \|$ if there is a constant $L_{z}$ such that for any values of $z$ as $z'$ and $z''$ , it holds that + +$$ +f \left(z ^ {\prime \prime}\right) \leq f \left(z ^ {\prime}\right) + \langle \nabla f \left(z ^ {\prime}\right), z ^ {\prime \prime} - z ^ {\prime} \rangle + \frac {L _ {z}}{2} \| z ^ {\prime \prime} - z ^ {\prime} \| ^ {2} +$$ + +Theorem 1. Assuming $\ell(\cdot)$ is $L_{\mathbf{x}}$ -smoothness in $\mathbf{x}$ and $\nabla_{\mathbf{x}}\ell$ is $L_{\theta}$ -Lipschitz continuous for $\theta$ , we have + +$$ +\max _ {\hat {\mathbf {x}} _ {i} \in \mathbf {X}} \ell (\hat {\mathbf {x}} _ {i}, y _ {i}; \theta) - \frac {\lambda_ {w}}{2} \| \hat {\mathbf {x}} _ {i} - \mathbf {x} _ {i} \| _ {F} ^ {2} \leq \ell (\mathbf {x} _ {i}, y _ {i}; \theta) + \frac {\gamma}{2} \| \theta \| _ {F} ^ {2} +$$ + +where $\lambda_w$ is sufficiently large such that $\lambda_w > L_{\mathbf{x}}$ and $\gamma = \frac{L_{\theta}^2}{\lambda_w - L_{\mathbf{x}}}$ . + +Theorem 2. With the same assumption in Theorem 1 and considering an additive augmentation with $\mathbf{z}$ for the original image + +$$ +\tilde {\mathbf {x}} _ {i} = \mathbf {x} _ {i} + \tau \mathbf {z} _ {i} +$$ + +we have + +$$ +\max _ {\tilde {\mathbf {x}} _ {i} \in \mathbf {X}} \ell (\hat {\mathbf {x}} _ {i}, y _ {i}; \theta) - \frac {\lambda_ {w}}{2} \| \hat {\mathbf {x}} _ {i} - \mathbf {x} _ {i} \| _ {F} ^ {2} \leq \ell (\tilde {\mathbf {x}} _ {i}, y _ {i}; \theta) + \frac {\gamma}{2} \| \theta \| _ {F} ^ {2} - \alpha +$$ + +where + +$$ +\tau = \frac {\left\langle \nabla_ {\mathbf {x} _ {i}} \ell , \mathbf {z} _ {i} \right\rangle}{3 L _ {\mathbf {x}} \| \mathbf {z} _ {i} \| _ {F} ^ {2}} +$$ + +and $\alpha$ is a non-negative constant as + +$$ +\alpha = \frac {\lambda_ {w}}{\lambda_ {w} - L _ {\mathbf {x}}} \frac {\left\langle \nabla_ {\mathbf {x} _ {i}} \ell , \mathbf {z} _ {i} \right\rangle^ {2}}{6 L _ {\mathbf {x}} \| \mathbf {z} _ {i} \| _ {F} ^ {2}} +$$ + +Theorem 1 shows that learning the model using the original examples with a regularization on the complexity of the model, e.g., weight decay with $\gamma$ , can make the learned model robust for examples from the ambiguity set. A similar result has been observed in the conventional robust optimization [1]. However, the regularization is not sufficient to train good enough DNNs and many optimization algorithms have to rely on augmented examples to obtain models with better generalization performance. + +Theorem 2 interprets the phenomenon by analyzing a specific augmentation that adds a patch $\mathbf{z}$ to the original image and shows that augmented examples can provide a tighter bound for the loss of the examples in the ambiguity set. Besides, the augmented patch $\mathbf{z}_i$ is corresponding to the gradient of the original example $\mathbf{x}_i$ . To make the approximation tight, it should be identical to the direction of the gradient. So we set $\mathbf{z}_i = \frac{\nabla_{\mathbf{x}_i} \ell}{\|\nabla_{\mathbf{x}_i} \ell\|_F}$ , which is similar to that in adversarial training [11]. + +Combining with the concept-level robustness in Eqn. 3, we have the final objective for learning the hierarchically robust representations as + +$$ +\begin{array}{l} \min _ {\theta} \max _ {\mathbf {q} \in \mathbb {R} ^ {K}; \mathbf {q} \in \Delta} \quad \mathcal {L} (\mathbf {q}, \theta) = \sum_ {k} \frac {q _ {k}}{N _ {k}} \sum_ {i} \ell \left(\tilde {\mathbf {x}} _ {i} ^ {k}, y _ {i} ^ {k}; \theta\right) \\ + \frac {\gamma}{2} \| \theta \| _ {F} ^ {2} - \frac {\lambda}{2} \| \mathbf {q} - \mathbf {q} _ {0} \| _ {2} ^ {2} \tag {4} \\ \end{array} +$$ + +# 3.3. Efficient Optimization + +The problem in Eqn. 4 can be solved efficiently by stochastic gradient descent (SGD). In the standard training pipeline for ERM in Eqn. 1, a mini-batch of examples are randomly sampled at each iteration and the model is updated with gradient descent as + +$$ +\theta_ {t + 1} = \theta_ {t} - \eta_ {\theta} \frac {1}{m} \sum_ {i} ^ {m} \nabla_ {\theta} \ell (\mathbf {x} _ {i}, y _ {i}; \theta_ {t}) +$$ + +where $m$ is the size of a mini-batch. + +For the problem in Eqn. 4, each example has a weight as $q_{k} / N_{k}$ and the gradient has to be weighted for an unbiased estimation as + +$$ +\theta_ {t + 1} = \theta_ {t} - \eta_ {\theta} \left(\frac {1}{m} \sum_ {i} ^ {m} \frac {N}{N _ {k}} q _ {k} \nabla_ {\theta} \ell \left(\tilde {\mathbf {x}} _ {i} ^ {k}, y _ {i} ^ {k}; \theta_ {t}\right) + \gamma \theta_ {t}\right) \tag {5} +$$ + +For the adversarial distribution $\mathbf{q}$ , each concept has a weight $q_{k}$ and the straightforward way is to sample a minibatch of examples from each concept to estimate the gradient of the distribution. However, the number of concepts varies and it can be larger than the size of a mini-batch. Besides, it results in the different sampling strategies for computing the gradient of deep models and the adversarial distribution, which increases the complexity of the training system. To address the issue, we take the same random sampling pipeline and update the distribution with weighted gradient ascent as + +$$ +\tilde {q} _ {k} ^ {t + 1} = q _ {k} ^ {t} + \eta_ {q} ^ {t} \left(\frac {1}{m} \sum_ {j} ^ {m _ {k}} \frac {N}{N _ {k}} \ell \left(\tilde {\mathbf {x}} _ {j} ^ {k}, y _ {j} ^ {k}; \theta_ {t}\right) - \lambda \left(q _ {k} ^ {t} - q _ {0} ^ {k}\right)\right) +$$ + +$$ +\mathbf {q} _ {t + 1} = \mathcal {P} _ {\Delta} \left(\hat {\mathbf {q}} _ {t + 1}\right) \tag {6} +$$ + +where $m_{k}$ is the number of examples from the $k$ -th concept in the mini-batch and $\sum_{k} m_{k} = m$ . $\mathcal{P}_{\Delta}(\cdot)$ projects the vector onto the simplex as in [9]. + +The re-weighting strategy makes the gradient unbiased but introduces the additional variance. Since batch-normalization [13] is inapplicable for the parameters of the adversarial distribution that is from the simplex, we develop a learning strategy to reduce the variance from gradients. + +First, to illustrate the issue, let $\delta_{1}$ and $\delta_{2}$ be two binary random variables as + +$$ +\Pr \{\delta_ {1} = 1 \} = \frac {1}{N _ {k}}; \quad \Pr \{\delta_ {2} = 1 \} = \frac {1}{N} +$$ + +Obviously, we have $E[\delta_1] = \frac{1}{N_k}$ ; $E[\frac{N\delta_2}{N_k}] = \frac{1}{N_k}$ . It demonstrates that the gradient after re-weighting is unbiased. However, the variance can be different as + +$$ +\mathrm {V a r} [ \delta_ {1} ] = \frac {1}{N _ {k}} - \frac {1}{N _ {k} ^ {2}}; \quad \mathrm {V a r} [ \frac {N \delta_ {2}}{N _ {k}} ] = \frac {N}{N _ {k} ^ {2}} - \frac {1}{N _ {k} ^ {2}} +$$ + +where the variance is roughly increased by a factor of $N / N_{k}$ . + +By investigating the updating criterion in Eqn. 6, we find that the gradient is rescaled by the learning rate $\eta_q^t$ . If we let $\eta_q^t = \mathcal{O}\left(\frac{1}{t}\right)$ , the norm of the gradient will be limited after a sufficient number of iterations. Besides, for any distribution $\mathbf{q}'$ , the norm of $\| \mathbf{q} - \mathbf{q}'\|_2^2$ is bounded by a small value of 2 since the distribution is from the simplex. It inspires us to deal with the first several iterations by adopting a small learning rate. The algorithm is summarized in Alg. 1. In short, we use the learning rate as $\eta_t = \frac{1}{c\lambda t}$ where $c > 1$ for the first $s$ iterations and then the conventional learning rate $\eta_t = \frac{1}{\lambda t}$ is applied. + +The convergence about the adversarial distribution is stated as follows. + +Theorem 3. Assume the gradient of the adversarial distribution $\mathbf{q}$ is bounded as $\forall t, \| g_q^t\| _2\leq \mu$ and set the learning + +Algorithm 1 Hierarchically Robust Representation Learning (HRRL) +1: Input: Dataset $\{\mathbf{x}_i, y_i\}$ , iterations $T$ , mini-batch size $m$ , $\lambda$ , $\gamma$ , $\tau$ , $s$ , $c$ +2: for $t = 1, \dots, T$ do +3: if $t <= s$ then +4: $\eta_q^t = \frac{1}{c\lambda t}$ +5: else +6: $\eta_q^t = \frac{1}{\lambda t}$ +7: end if +8: Sample a mini-batch of examples $\{\mathbf{x}_i, y_i\}_{i=1,\dots,m}$ +9: Generate the augmented data as $\tilde{\mathbf{x}}_i = \mathbf{x}_i + \tau \mathbf{z}_i$ +10: Update model with gradient descent as in Eqn. 5 +11: Update distribution with gradient ascent as in Eqn. 6 +12: end for +13: return A feature extraction function $f(\cdot)$ from $\theta_T$ + +rate as + +$$ +\eta_ {q} ^ {t} = \left\{ \begin{array}{l l} \frac {1}{c \lambda t} & t \leq s \\ \frac {1}{\lambda t} & o. w. \end{array} \right. +$$ + +We have + +$$ +\begin{array}{l} \max _ {\mathbf {q} ^ {*} \in \Delta} \frac {1}{T} \sum_ {t} ^ {T} E [ \mathcal {L} (\mathbf {q} ^ {*}, \theta_ {t}) - \mathcal {L} (\mathbf {q} _ {t}, \theta_ {t}) ] \\ \leq \frac {1}{T} \left(\frac {\mu^ {2}}{2 \lambda} (\log (T) + 1) - \beta\right) \\ \end{array} +$$ + +where $\beta$ is a non-negative constant as $\beta = (\mu \sqrt{\frac{\log(s)}{2\lambda}} - \sqrt{s\lambda})^2$ and $c = \frac{\mu}{\lambda}\sqrt{\frac{\log(s)}{2s}}$ should be larger than 1. + +Theorem 3 shows a $\mathcal{O}(\log (T) / T)$ convergence rate for the adversarial distribution. The gain of the adaptive learning rate is indicated in $\beta$ , that is, a larger $\beta$ provides a better convergence. When applying the conventional learning rate i.e. $c = 1$ , it is easy to show $\beta = 0$ . To further investigate the properties of $\beta$ , we let $h(s) = \mu \sqrt{\log(s) / (2\lambda)} - \sqrt{s\lambda}$ , i.e., $\beta = h(s)^2$ , and study its behavior. + +Proposition 1. $h(s)$ is non-negative. + +Proof. Since $c = \frac{\mu}{\lambda} \sqrt{\frac{\log(s)}{2s}} > 1$ , we have $\mu > \lambda \sqrt{\frac{2s}{\log(s)}}$ . Therefore + +$$ +h (s) = \mu \sqrt {\frac {\log (s)}{2 \lambda}} - \sqrt {s \lambda} > \sqrt {s \lambda} - \sqrt {s \lambda} = 0 +$$ + +![](images/e5f8211a39b3f5b6f4fcf282f45d3599145ae8d026eb05e4ab52bb475d6fdf0a.jpg) + +It implies that we can benefit from the variance reduction as long as the variance $\mu$ is sufficiently large. Then, we fix $\lambda = 1$ and plot the curve of $h(s)$ when varying $\mu$ in Fig. 2. We can find that $h(s)$ achieves its maximum after + +thousands of iterations, which suggests that $s$ should not be too large. It is consistent with our claim that the gradient will be shrunk by the learning rate and the additional variance has little influence when $t$ is large. + +![](images/b4375f58a2c22a1f1fea694779a3883328ab714a1d812338a109f15ca35cf0e8.jpg) +Figure 2. Curves of $h(s)$ with different $\mu$ 's. + +# 4. Experiments + +We adopt ImageNet ILSVRC12 [22] as the benchmark data set to learn models for generic feature extraction in the experiments. ImageNet includes 1,000 classes, where each class has about 1,200 images in training and 50 images in test. We summarize these 1,000 classes into 11 concepts according to the structure of WordNet [10] that is the default class structure of ImageNet. The statistics of the concepts and classes are summarized in Table 1. Apparently, ImageNet is biased to specific animals. For example, it contains 59 classes of birds and more than 100 classes of dogs. This bias can result in the performance degeneration when applying the model learned by ERM to generate representations for different tasks. + +
ConceptAnArBCDeDo
#Classes1211075956129118
ConceptsIMSVO
#Classes106100576780
+ +Table 1. Concepts in ImageNet. The initials “An”, “Ar”, “B”, “C”, “De”, “Do”, “I”, “M”, “S”, “V”, “O” denote “Animal”, “Artifact”, “Bird”, “Container”, “Device”, “Dog”, “Instrumentality”, “Mammal”, “Structure”, “Vehicle”, “Others”, respectively. + +We apply ResNet-18 [12], which is a popular network as the feature extractor [17], to learn the representations. We train the model with stochastic gradient descent (SGD) on 2 GPUs. Following the common practice [12], we learn the model with 90 epochs and set the size of mini-batch as 256. The initial learning rate is set to 0.1, and then it is decayed by a factor of 10 at $\{30,60\}$ . The weight decay is $10^{-4}$ and the momentum in SGD is 0.9. All model training includes random crop and horizontal flipping as the data augmentation. We set $s = 1000$ as suggested by Fig. 2 for the proposed algorithm. For the setting of $c$ , we calculate the vari + +ance for $\mu$ from several mini-batches and set $c = 10$ according to Theorem 3. After obtaining deep models, we extract deep features from the layer before the last fully-connected layer, which generates a 512-dimensional feature for a single image. Given the features, we learn a linear SVM [4] to categorize examples. $\tau$ , $\lambda$ and the parameter of SVM are searched in $\{10^i\} (i = -3,\dots ,1)$ . Four different deep features with SVM as follows are compared in the experiments, where $\mathrm{SVM}_{\mathrm{ERM}}$ is the conventional way to extract features with models trained by ERM and the others are our proposals. + +- $\mathrm{SVM}_{\mathrm{ERM}}$ : deep features learned with ERM. +- $\mathrm{SVM}_{\mathrm{EL}}$ : deep features learned with example-level robustness only. +- $\mathrm{SVM}_{\mathrm{CL}}$ : deep features learned with concept-level robustness only. +- $\mathrm{SVM}_{\mathrm{HRRL}}$ : deep features learned with both example-level and concept-level robustness. + +Experiments are repeated 3 times and the average results with standard deviation are reported. + +# 4.1.CIFAR-10 + +First, we study the scenario when example-level distribution difference exists between the target task and the benchmark data set. We conduct experiments on CIFAR-10 [14], which contains 10 classes and 60,000 images. 50,000 of them are for training and the rest are for test. CIFAR-10 has the similar concepts as those in ImageNet, e.g., "bird", "dog", and the difference in concepts is negligible. On the contrary, each image in CIFAR-10 has a size of $32 \times 32$ , which is significantly smaller than that of images in ImageNet. As shown in Fig. 1, the example-level distribution changes dramatically and the example-level robustness is important for this task. + +Table 2 summarizes the comparison. First, we observe that the accuracy of $\mathrm{SVM}_{\mathrm{ERM}}$ can achieve $85.77\%$ , which surpasses the performance of SIFT features [2], i.e., $65.6\%$ , by more than $20\%$ . It confirms that representations extracted from a DNN model trained on the benchmark data set can be applicable for generic tasks. Compared with representations from the model learned with ERM, $\mathrm{SVM}_{\mathrm{EL}}$ outperforms it by a margin about $1\%$ . It shows that optimizing with Wasserstein ambiguity set can learn the example-level robust features and handle the difference in examples better than ERM. $\mathrm{SVM}_{\mathrm{CL}}$ has the similar performance as $\mathrm{SVM}_{\mathrm{ERM}}$ . It is consistent with the fact that the difference of concepts between CIFAR-10 and ImageNet is small. Finally, the performance of $\mathrm{SVM}_{\mathrm{HRRL}}$ is comparable to that of $\mathrm{SVM}_{\mathrm{EL}}$ due to negligible concept-level distribution difference but it is significantly better than $\mathrm{SVM}_{\mathrm{ERM}}$ , which demonstrates the effectiveness of the proposed algorithm. + +
MethodsAcc(mean±std)
SVMERM85.77±0.12
SVMEL86.62±0.18
SVMCL85.64±0.26
SVMHRRL86.49±0.19
+ +Table 2. Comparison of accuracy (%) on CIFAR-10. + +# 4.2. Stanford Online Products (SOP) + +In this subsection, we demonstrate the importance of concept-level robustness. We have Stanford Online Products (SOP) [25] as the target task to evaluate the learned representations. SOP collects product images from eBay.com and consists of 59,551 images for training and 60,502 images for test. We adopt the super class label for each image, which leads to a 12-class classification problem. As shown in Fig. 1, we can find that the example-level distribution difference is not significant (e.g., resolution), while the distribution of concepts (i.e., concept-level distribution) is relatively different. ImageNet includes many natural objects, e.g., animals, while SOP only contains artificial ones. Handling the difference in concepts is challenging for this task. + +Table 3 shows the performance comparison. Apparently, $\mathrm{SVM}_{\mathrm{EL}}$ has the similar performance as $\mathrm{SVM}_{\mathrm{ERM}}$ due to the minor changes in the example-level distribution. However, $\mathrm{SVM}_{\mathrm{CL}}$ demonstrates a better accuracy, which is about $1\%$ better than $\mathrm{SVM}_{\mathrm{ERM}}$ . It demonstrates that the deep features learned with the proposed algorithm is more robust than those from ERM when the distribution of concepts varies. Besides, the performances of $\mathrm{SVM}_{\mathrm{HRRL}}$ and $\mathrm{SVM}_{\mathrm{CL}}$ are comparable, which confirms that deep features obtained with hierarchical robustness work well consistently in different scenarios. + +
MethodsAcc(mean±std)
SVMERM73.47±0.09
SVMEL73.48±0.08
SVMCL74.34±0.05
SVMHRRL74.23±0.08
+ +Table 3. Comparison of accuracy $(\%)$ on SOP. + +# 4.3. Street View House Numbers (SVHN) + +Finally, we deal with a task when both example-level and concept-level distribution differences exist. We evaluate the robustness of deep features on Street View House Numbers (SVHN) [19] data set. It consists of 73,257 images for training and 26,032 for test. The target is to identify one of 10 digits from each $32 \times 32$ image. The image has the same size as CIFAR-10, which is very different from ImageNet. Moreover, SVHN has the concepts of digits, which is also different from ImageNet. + +We compare the different deep features in Table 4. First, as observed in CIFAR-10, $\mathrm{SVM}_{\mathrm{EL}}$ outperforms $\mathrm{SVM}_{\mathrm{ERM}}$ by a large margin. It is because features learned with example-level robustness is more applicable than those from ERM when examples are from a different distribution. Second, $\mathrm{SVM}_{\mathrm{CL}}$ improves the performance by more than $2\%$ . It is consistent with the observation in SOP, where features learned with concept-level robustness perform better when concepts vary. Besides, we can observe that the performance of $\mathrm{SVM}_{\mathrm{CL}}$ surpasses that of $\mathrm{SVM}_{\mathrm{EL}}$ . It implies that controlling concept-level robustness, which has not been investigated sufficiently, may be more important than example-level robustness for representation learning. Finally, by combining example-level and concept-level robustness, $\mathrm{SVM}_{\mathrm{HRRL}}$ shows an improvement of more than $4\%$ . It demonstrates that example-level and concept-level robustness are complementary. Incorporating both of them can further improve the performance of deep features, when the example-level and concept-level distributions are different from these of the benchmark data set. + +
MethodsAcc(mean±std)
SVMERM63.23±0.35
SVMEL65.01±0.37
SVMCL65.47±0.27
SVMHRRL67.33±0.39
+ +Table 4. Comparison of accuracy (%) on SVHN. + +# 4.4. Fine-tuning + +Besides extracting features, a pre-trained model is often applied as an initialization for training DNNs on the target task when GPUs are available. Since initialization is crucial for the final performance of DNNs [26], we conduct the experiments that initialize the model with parameters trained on ImageNet and then fine-tune the model on CIFAR-10, SOP and SVHN. After initialization, the model is fine-tuned with 100 epochs, where ERM is adopted as the objective for each task. The learning rate is set as 0.01 and decayed once by a factor of 10 after 50 epochs. Fig. 3 illustrates the curve of test error. We let "ERM" denote the model initialized with that pre-trained with ERM and "Robust" denote the one initialized with the model pre-trained with the proposed algorithm. Surprisingly, we observe that the models initialized with the proposed algorithm still surpass those with ERM. It implies that the learned robust models can be used for initialization besides feature extraction. + +# 4.5. Effect of Robustness + +Finally, we investigate the effect of the proposed method on ImageNet task itself to further illustrate the impact of robustness. First, we demonstrate the results of example-level robustness. We generate the augmented examples for vali + +![](images/7b9ff312a6ee43f2cb767eb0d19337f2a724ecc097dd8f204d10b0c7a6df6863.jpg) +(a) CIFAR-10 + +![](images/4dcca2829c91469d8289f2b30d6b1b788253f8aedfddd897cc50f128ee42fc57.jpg) +(b) SOP +Figure 3. Comparison of fine-tuning with different initializations. + +![](images/705001aab048709d416a0603eeebd818d04e5a4178512e157293452f88744a31.jpg) +(c) SVHN + +dation set as in Theorem 2 and report the accuracy of different models in Fig. 4. The horizontal axis shows the step size for generating the augmented examples. When step size is 0, the original validation set is used for evaluation. Otherwise, each image in the validation set is modified with the corresponding step size, and only modified images are used for evaluation. Intuitively, larger step size implies larger example-level distribution change compared to the original ImageNet data set. + +![](images/4373f5b673f62ae7e122b16f746c2a010101ab009b3f238b1aa324d5aae984c4.jpg) +Figure 4. Comparison of accuracy on augmented examples. + +Besides ERM, four different models are included in the comparison. Each model is trained with the example-level robustness and the corresponding parameter $\tau$ is denoted in the legend, where larger $\tau$ should theoretically provide a more robust model. + +We can observe that ERM performs well when there is no augmentation but its performance degrades significantly when the augmentation step size increases. It confirms that ERM cannot generalize well when the example-level distribution changes. Fortunately, we can observe that more robust models (i.e., $\tau$ increases) can provide better generalization performance as expected. It is because that the proposed algorithm focuses on optimizing the worst-case performance among different distributions derived from the original distribution. + +Second, we show the influence of concept-level robustness. We train models with different $\lambda$ for regularization and summarize the accuracy of concepts in Fig. 5. We sort the accuracy in ascending order to make the comparison clear. As illustrated, ERM aims to optimize the uniform + +distribution of examples and ignores the distribution of concepts. Consequently, certain concept, e.g., "bird", has much higher accuracy than others. When decreasing $\lambda$ in our proposed method, the freedom of adversarial distribution increases. With more freedom, the proposed method will focus on the concepts with bad performance. By optimizing the adversarial distribution, the model will balance the performance between different concepts as illustrated in Fig. 5. + +![](images/cc3e5e58cd3aeb5171a93be1af43ef9750d7cf41a11893da764736fcd1cd11ff.jpg) +Figure 5. Comparison of accuracy on concepts in ImageNet. + +In summary, Figs. 4 and 5 demonstrate the different influences of example-level and concept-level robustness. Evidently, our method can deal with the perturbation from different aspects. It further confirms that improving the hierarchical robustness is important for applying deep features or initializing models in real-world applications. + +# 5. Conclusion + +In this work, we study the problem of learning deep features using a benchmark data set for generic tasks. We propose a hierarchically robust optimization algorithm to learn robust representations from a large-scale benchmark data set. The theoretical analysis also demonstrates the importance of augmentation when training DNNs. The experiments on real-world data sets demonstrate the effectiveness of the learned features from the proposed method. The framework can be further improved when side information is available. For example, given the concepts of the target domain, we can obtain the specific reference distribution $\mathbf{q}_0$ accordingly, and then learn the features for the desired task. This direction can be our future work. + +# References + +[1] Aharon Ben-Tal, Laurent El Ghaoui, and Arkadi Nemirovski. Robust optimization, volume 28. Princeton University Press, 2009. +[2] Liefeng Bo, Xiaofeng Ren, and Dieter Fox. Kernel descriptors for visual recognition. In NeurIPS, pages 244-252, 2010. +[3] Olivier Bousquet and André Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2:499-526, 2002. +[4] Chih-Chung Chang and Chih-Jen Lin. LIBSVM: A library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1-27:27, 2011. +[5] Robert S. Chen, Brendan Lucier, Yaron Singer, and Vasilis Syrgkanis. Robust optimization for nonconvex objectives. In NeurIPS, pages 4708-4717, 2017. +[6] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine Learning, 20(3):273-297, 1995. +[7] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In CVPR, pages 886-893, 2005. +[8] Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In ICML, pages 647-655, 2014. +[9] John C. Duchi, Shai Shalev-Shwartz, Yoram Singer, and Tushar Chandra. Efficient projections onto the $l_{1}$ -ball for learning in high dimensions. In ICML, pages 272-279, 2008. +[10] Christine Fellbaum. 1998, wordnet: An electronic lexical database, 1998. +[11] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[13] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448-456, 2015. +[14] Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009. +[15] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, pages 1106-1114, 2012. + +[16] David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91-110, 2004. +[17] Romain Mormont, Pierre Geurts, and Raphaël Marée. Comparison of deep transfer learning strategies for digital pathology. In CVPR Workshops, pages 2262-2271, 2018. +[18] Hongseok Namkoong and John C. Duchi. Stochastic gradient methods for distributionally robust optimization with f-divergences. In NeurIPS, pages 2208-2216, 2016. +[19] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011. +[20] Qi Qian, Rong Jin, Shenghuo Zhu, and Yuanqing Lin. Fine-grained visual categorization via multi-stage metric learning. In CVPR, pages 3716-3724, 2015. +[21] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell., 39(6):1137-1149, 2017. +[22] 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. International Journal of Computer Vision, 115(3):211-252, 2015. +[23] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. +[24] Aman Sinha, Hongseok Namkoong, and John Duchi. Certifiable distributional robustness with principled adversarial training. In ICLR, 2018. +[25] Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, 2016. +[26] Ilya Sutskever, James Martens, George E. Dahl, and Geoffrey E. Hinton. On the importance of initialization and momentum in deep learning. In ICML, pages 1139-1147, 2013. +[27] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pages 1-9, 2015. +[28] Bolei Zhou, Ágata Lapedriza, Jianxiong Xiao, Antonio Torralba, and Aude Oliva. Learning deep features for scene recognition using places database. In NeurIPS, pages 487-495, 2014. \ No newline at end of file diff --git a/hierarchicallyrobustrepresentationlearning/images.zip b/hierarchicallyrobustrepresentationlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9f9b4debe3497bf738232b5a9e2fb8f8f91124c3 --- /dev/null +++ b/hierarchicallyrobustrepresentationlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:808b84cb286029be5d3dc334b1ab0f0cf0ce95fe063fa640523808fa3a2d6d53 +size 340582 diff --git a/hierarchicallyrobustrepresentationlearning/layout.json b/hierarchicallyrobustrepresentationlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..688436235d9779dac4fd0e194d0aeae53341e406 --- /dev/null +++ b/hierarchicallyrobustrepresentationlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09bf81f0d6e99d008811069ad80a5663997de68bd5fd8e96eb5b0ee4925cad4a +size 470917 diff --git a/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_content_list.json b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..60c4244e52d2c65b21fdba18274ece4e60427d25 --- /dev/null +++ b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77a79d2173b0be35bd0c22d82149a2a47f14bdae7f5784678db6db26953ef5bb +size 78179 diff --git a/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_model.json b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_model.json new file mode 100644 index 0000000000000000000000000000000000000000..be78bbcf125f78603538cbc4caa8b46eeda16837 --- /dev/null +++ b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0ee9234740317991cc98b878c17771631b140fdfd367ded318677ebfa464d7c +size 96052 diff --git a/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_origin.pdf b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e94768265da88883c7774468b82d1fc83129cbb0 --- /dev/null +++ b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/8902564d-7d01-4b66-b42c-c6149a548a40_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:236b80b3ba6f266e46657090409187a8d311b3c3ea4232450842ed0c3f3a6d4f +size 959289 diff --git a/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/full.md b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c991e5aa3fe39f42b7b658d1daa3a7a4cffc7503 --- /dev/null +++ b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/full.md @@ -0,0 +1,311 @@ +# Hierarchical Pyramid Diverse Attention Networks for Face Recognition + +Qiangchang Wang $^{1}$ , Tianyi Wu $^{2,3}$ , He Zheng $^{2,3}$ , Guodong Guo $^{1,2,3,*}$ + +1West Virginia University, Morgantown, USA, 2Institute of Deep Learning, Baidu Research, Beijing, China + +$^{3}$ National Engineering Laboratory for Deep Learning Technology and Application, Beijing, China + +qiangchang.wang666@gmail.com, {wutianyi01, zhenghe01}@baidu.com, guodong.quo@mail.wvu.edu + +# Abstract + +Deep learning has achieved a great success in face recognition (FR), however, few existing models take hierarchical multi-scale local features into consideration. In this work, we propose a hierarchical pyramid diverse attention (HPDA) network. First, it is observed that local patches would play important roles in FR when the global face appearance changes dramatically. Some recent works apply attention modules to locate local patches automatically without relying on face landmarks. Unfortunately, without considering diversity, some learned attentions tend to have redundant responses around some similar local patches, while neglecting other potential discriminative facial parts. Meanwhile, local patches may appear at different scales due to pose variations or large expression changes. To alleviate these challenges, we propose a pyramid diverse attention (PDA) to learn multi-scale diverse local representations automatically and adaptively. More specifically, a pyramid attention is developed to capture multi-scale features. Meanwhile, a diverse learning is developed to encourage models to focus on different local patches and generate diverse local features. Second, almost all existing models focus on extracting features from the last convolutional layer, lacking of local details or small-scale face parts in lower layers. Instead of simple concatenation or addition, we propose to use a hierarchical bilinear pooling (HBP) to fuse information from multiple layers effectively. Thus, the HPDA is developed by integrating the PDA into the HBP. Experimental results on several datasets show the effectiveness of the HPDA, compared to the state-of-the-art methods. + +# 1. Introduction + +CNN representations achieve the state-of-the-art in face recognition (FR). However, most existing models learn + +![](images/fcd81e1463d1e7354c2c7d355ae093a52f1cff1ce149ca915b36adcf787f456e.jpg) +Figure 1. Illustration on the effects of local CNNs, the diverse learning and global CNN. Local CNNs learn diverse local representations using multiple local branches at various scales from different hierarchical layers. For good illustration, only one scale and the last convolutional layer are used. The number of local branches is 3. The diverse learning guides multiple local branches to locate diverse local patches. Global CNN extracts holistic representations. Column 1: faces with varying challenging factors (e.g. resolution, pose, occlusion, aging and expression). Column 2: a model which has a single local branch. Columns 3, 4 and 5: $1^{\mathrm{st}}$ , $2^{\mathrm{nd}}$ and $3^{\mathrm{rd}}$ local branch of local CNNs, which are guided by the diverse learning. Column 6: local CNNs. Column 7: global CNN. Column 8: fused global and local CNNs. + +global representations where whole faces are regarded as CNN inputs [22, 34, 19, 3]. Few works take hierarchical multi-scale local representations into account. + +It is observed that global face geometry and appearances may change dramatically under pose, age, or large quality variations. In contrast, some facial parts remain similar in these cases, which would play important roles in FR. For instance, as shown in Fig. 1, it is difficult to consider the global face representation to match the frontal face (Row 1) with the profile (Row 2) which is influenced by blur, pose and background distraction. However, we notice that similar eyes in these two faces can contribute to verification. + +![](images/2fbd908e5e6b244155592ffa72e0cab08be01d3ad2223ab401b1e8d4ea09d460.jpg) +Figure 2. Qualitative comparison between prior local methods and the proposed HPDA model. Landmark-based methods suffer from landmark detection failure (Row 1) and attention-based methods locate uninformative or even noisy regions (Row 2). The proposed HPDA can emphasize discriminative information and inhibit less important (Row 3). + +Similar observations about pointy noses (Rows 3, 4) and big lips (Rows 5, 6) can be made. Thus, representing similar facial parts become especially important. Previous works mainly depend on face landmarks to incorporate local information [23, 18, 4, 14, 38, 13, 12]. However, landmark detection may be inaccurate or even fail due to occlusions, large head poses, extreme illuminations, or dramatic expression changes. As shown in Fig. 2, Row 1, MTCNN [42] failes to detect landmarks for faces which are influenced by occlusions (Columns 1, 2), expressions (Columns 3, 4), illumination (Columns 5, 6), and poses (Columns 7, 8). + +Without relying on face landmarks, discriminative local patches are located automatically in [30, 12]. As shown in Fig. 1, compared to the model without an attention module (Column 7), important facial parts are enhanced and some useless ones are suppressed when the attention is applied (Column 2). However, it is observed that only specific facial regions are located, while neglecting some potential discriminative regions. For instance, the attention map has strong responses around eyes (Column 2), but ignores some discriminative regions, such as similar big lips (Column 2, Rows 5, 6). From the above analysis, we expect that emphasized facial parts should be well distributed over face images to extract more useful features. To achieve this goal, a diverse learning is developed to guide multiple attention modules to accurately locate diverse discriminative facial parts as well as reduce the background distraction. + +Learning multi-scale representations is beneficial to various tasks [25, 43, 26, 31, 35]. As for FR, local patches may have various sizes or shapes under pose or expression changes, making it necessary to learn multi-scale features. Take faces in Fig. 2 as examples, eyes with different expressions in Columns 3, 4 and 5 appear at varying sizes and shapes; due to pose variations, mouths have different sizes in Columns 6, 7 and 8. [23] fuses multi-scale features from the last two layers. [30] extracts rich multi-scale features from two harmonious perspectives: different convolutional sizes in a single layer and hierarchical concatenation of feature maps from varying layers. However, both + +approaches ignore the fact that features in a layer may cover a large range of scales. This is especially important for layers which concatenate feature maps from prior layers and generate feature maps by multi-scale convolution kernels. To address this challenge, we propose a pyramid attention which scales feature maps within a layer under different scales, exploring multi-grained information. + +Most previous works only use the last convolutional layer, lacking of low-level information. This is because units in high layers have large receptive fields, and hence respond around large-scale facial parts and represent high-level semantic information, but inevitably lack of locally detailed information or small-scale face parts in low layers. [30] can alleviate the above problem by combining hierarchical information from different layers within a block. [13] incorporates low-level features with high-level features to capture discriminative representations. Both methods combine hierarchical information simply by concatenation, which leads to sub-optimal cross-layer information fusion. + +In this work, we propose a hierarchical pyramid diverse attention (HPDA) network which can describe diverse local patches at various scales adaptively and automatically from varying hierarchical layers. Fig. 3 illustrates the framework. First, we propose a pyramid diverse attention, as shown in Fig. 4. Specifically, feature maps are pooled to various scales, allowing for exploiting features at different scales. Meanwhile, since attention modules tend to have redundant responses around some similar face regions, a diverse learning is proposed to guide multiple local branches in each pyramid scale to focus on diverse facial regions automatically, instead of relying on face landmarks. As shown in Fig. 1, the diverse learning leads to localization of different discriminative local patches in Columns 3, 4 and 5. Second, a hierarchical bilinear pooling is proposed to combine complementary information from different hierarchical layers. Exactly, it uses different cross-layer bilinear modules to integrate both the high-level abstraction and the low-level detained information. The major contributions of our work are three-fold: + +1. The proposed pyramid diverse attention introduces multiple attention-based local branches at different scales to emphasize different discriminative facial regions at various scales automatically, avoiding the need of face landmark detection. To our knowledge, this is the first attempt of automatic locating multiple complementary facial regions in general face recognition. +2. Instead of simple concatenation or addition, a hierarchical bilinear pooling is presented to combine features from different hierarchical layers, covering both local details or small-scale face regions in low layers to high-level abstraction and large-scale parts in high layers. +3. The proposed model achieves the state-of-the-art performance on several challenging face recognition tasks. + +![](images/7f95357e4da2a8692de18a637ce0934f13ac23b8f896020f2f84a824c9cdfa2d.jpg) +Figure 3. Framework of the proposed hierarchical pyramid diverse attention (HPDA) model. GAP and FC layers mean global average pooling and fully connected layers. Local CNNs learn rich local representations which mainly consist of a pyramid diverse attention (PDA) and a hierarchical bilinear pooling (HBP). The PDA aims at learning multi-scale diverse local features. The HBP fuses complementary local information from hierarchical layers. + +![](images/ccb6c63e34b04585e2021bf4298ed617f43994f348ce038cb9b8c06a54e7a9bd.jpg) +Figure 4. Framework of the proposed pyramid diverse attention (PDA). We set the number of local branches to 3 as an example. It consists of a pyramid attention and a diverse learning. The former allows the network to weigh face parts at various scales automatically. The latter guides multiple local branches to extract diverse local representations. + +![](images/aaf81217ca0ec3e3da40acf700f9eb88473313c278cbba0f9e8cb347bad3867b.jpg) +Figure 5. Framework of the LANet, where $h$ , $w$ and $c$ represent height, width and number of feature maps, respectively. $r$ is the reduction ratio. + +# 2. Related Work + +Related face recognition and attention modules are reviewed. + +# 2.1. Face Recognition + +Deep learning learns representations from global faces or local patches for face recognition. For the latter, there are landmark-based and attention-based methods. + +Global faces based models usually accept whole faces as inputs [22, 34, 19, 28, 3]. However, local patches are not taken into consideration, resulting in sub-optimal per + +formances when global face appearances change dramatically. To address this problem, several works train multiple CNNs separately on different local patches cropped around face landmarks [23, 18]. Since networks are not trained jointly, correlations of multiple face regions are not well explored. To overcome this issue, some methods are proposed to jointly train models [4, 14, 38, 13]. However, these landmark-based methods rely on face landmarks which may not be reliable in some cases. Besides, different facial parts should have different discriminative abilities [30], which are not considered in most existing works. + +Attention-based works use attention mechanisms to weigh local patches automatically without using face landmarks. [30] is an early attempt to achieve this for the general face recognition, where a spatial attention (i.e. LANet) is proposed to capture important local regions and weigh adaptively on different local regions. In [12], importance of each local pair is modeled by a low-rank bilinear pooling. However, only the last convolutional layer is used, resulting in loss of local details or small-scale objects in low layers because of information loss in CNN propagation. + +# 2.2. Attention Modules + +Attention modules have been widely used in computer vision [9, 6, 27, 37]. [5, 16, 17] localize flexible parts by spatial transformer networks with localization constraints. [40] generates local features on feature space by the ROI pooling. [44, 39] locate parts with prior knowledge about their approximate locations. [20, 36] use RNN or LSTM models for sequentially selecting attention regions and learning features for each part. To our knowledge, our work is the first effort to automatically learn diverse local representations for general face recognition without prior spatial constraints. Besides, compared with many approaches which learn local features from original images, our proposed model extracts features from feature maps, which is computationally cheap. + +Orthogonality can guide the diverse feature learning. The singular value decomposition (SVD) is applied in [21, 24] to constrain the solution on a Stiefel manifold. [11] uses SVD on weights of the last layer to reduce feature correlations. However, SVD-based constraints are computationally expensive, limiting the learning flexibility. In contrast, our approach encourages diverse feature learning by a simple yet effective divergence loss on feature maps with very limited additional computation overhead. + +# 3. Proposed Method + +# 3.1. Overall Framework + +As shown in Fig. 3, our framework consists of four parts: stem CNN, local CNNs, global CNN and classification. + +Due to its good performance, HSNet-61 model [30] is used. SENet [9] can enhance important feature maps and inhibit less informative. Since layers in HSNet model contain feature maps captured at various sizes, we fuse SENet with HSNet model to improve the model capacity, namely SENet-HSNet. There are three blocks. The first two blocks are used as the stem CNN, as illustrated in Fig. 3. In the third block, every two layers of five layers are used as inputs of local CNNs which are designed to extract hierarchical multi-scale diverse local features. More details are discussed in Sec. 3.2. SENet-HSNet model is the default model if not specified. We also consider LS-CNN model [30] as the stem CNN due to its powerful generalization ability. In theory, our proposed hierarchical pyramid diverse attention module can be applied to any networks. Here, we investigate the above two networks as representatives. + +Finally, the learned global and local information is combined to further boost the accuracy. Global CNN extracts the holistic face representation by consecutive global average pooling (GAP) and fully connected (FC) layers with 512 units. Local CNNs output 512 units. We can obtain joint local and global representations with 1024 units, followed by a FC layer with 512 units and a classification layer. + +# 3.2. Local CNNs + +Local CNNs are developed to extract multi-scale diverse local features hierarchically, which consist of a pyramid attention and a diverse learning. Specifically, due to pose variations or large expression changes, facial parts may have varying sizes. Therefore, it is necessary to represent local patches at various sizes. To this aim, a pyramid attention is proposed to locate multi-scale discriminative facial regions adaptively. However, it is possible that multiple local branches have redundant responses around the similar regions, like similar eye responses in Fig. 1, Column 2. To address this issue, a diverse learning is proposed to guide multiple branches to locate diverse facial regions automatically. The pyramid diverse attention (PDA) is formed by + +combining the pyramid attention with the diverse learning. + +Besides, few works consider hierarchical features from different layers in face recognition, resulting in loss of discriminative features from low layers. To alleviate this issue, the hierarchical bilinear pooling is used to explore good inter-layer interactions. + +# 3.2.1 Pyramid Attention + +The framework is shown in Fig. 4. There are multi-scale local representations encoded in a single layer, making it necessary to calibrate features at different scales. + +Let $X \in R^{\mathrm{h} \times \mathrm{w} \times \mathrm{c}}$ denote the input of the pyramid attention, where $h, w$ and $c$ represent height, width and number of feature maps, respectively. First, feature maps are split into outputs with different scales $[X_1, X_2, \dots, X_S]$ , where $S$ is the number of scales. $X_i \in R^{\mathrm{h}_i \times \mathrm{w}_i \times \mathrm{c}}$ is the output of the $i^{th}$ level, where $h_i \times w_i$ represent the spatial size. The finest level has the same size as input $X$ . The other levels split feature maps into different sub-regions, and then pool features in corresponding sub-regions. + +Second, for the $i^{\mathrm{th}}$ scale, the target is to output diverse attention masks $[M_i^1,M_i^2,\dots,M_i^B ]$ , where $B$ is the number of local branches. The $j^{th}$ output attention mask in the $i^{th}$ scale has the same spatial size as the input $X_{i}$ , i.e. $M_{i}^{j}\in R^{\mathrm{hi}\times \mathrm{wi}}$ . To model the feature map spatially, the Local Attention Network (LANet) from [30] is used, as shown in Fig. 5. Weights of different spatial locations are regressed by two consecutive convolutional layers. The first layer has $\frac{c}{r}$ feature maps, followed by a ReLU layer to increase the non-linearity. $r$ means the channel reduction ratio. The second one generates a feature map (i.e. $M_{i}^{j}$ ) with a sigmoid function. + +Third, we upsample different attention masks $M_{i}^{j}$ across multiple local branches ( $j \in [1,2,\dots,B]$ ) in different pyramid scales ( $i \in [1,2,\dots,S]$ ) to have the same size as input $X \in R^{\mathrm{h} \times \mathrm{w} \times \mathrm{c}}$ using a bilinear interpolation. + +Then, refined feature maps $R_{i}^{j}$ for the $j^{\mathrm{th}}$ local branch in the $i^{\mathrm{th}}$ scale is aggregated by the product of the attention mask $M_{i}^{j}$ and input $X$ : + +$$ +R _ {i} ^ {j} = X \circ M _ {i} ^ {j}, \tag {1} +$$ + +where $\circ$ denotes Hadamard product. + +Finally, output of $i^{\mathrm{th}}$ scale is obtained by first concatenating $B$ local branches and followed by a $1 \times 1$ convolutional layer to output $c$ feature maps. Then, feature maps across different scales are concatenated, regarding as outputs of the pyramid attention. + +However, it may be difficult for multiple local branches in the same scale to find different discriminative regions simultaneously. To address this problem, a diverse learning is proposed to guide the learning of complementary information across different local branches. + +# 3.2.2 Diverse Learning + +A divergence loss $L_{\mathrm{D}}$ is proposed to guide multiple local branches to learn diverse attention masks (i.e. $M_i^1, M_i^2, \dots, M_i^B$ ), locating diverse face regions and achieving a robust recognition from diversified parts (e.g. the left eye and mouth if the right eye is occluded in Fig. 1, Row 6, Column 8). The formulation is defined as following: + +$$ +L _ {\mathrm {D}} = \frac {2}{S B (B - 1)} \sum_ {i = 1} ^ {S} \sum_ {j = 1} ^ {B} \sum_ {\substack {\mathbf {k} = 1, \\ k \neq j}} ^ {B} \max (0, t - \left(M _ {i} ^ {j} - M _ {i} ^ {k}\right) ^ {2}), \tag{2} +$$ + +where $t$ is a hyper-parameter margin. $M_{i}^{j}$ and $M_{i}^{k}$ represent attention masks learned by local branches $j$ and $k$ in the $i^{\text{th}}$ scale, respectively. + +The diverse learning encourages each local branch to learn different attention masks by increasing their distances. Since each attention mask is applied on the same feature maps, diverse attention masks can locate different local patches. Consequently, the diverse learning can alleviate the problem of redundant responses in Fig. 1, Column 2, and extract diverse local patches, as shown in Fig. 1, Columns 3, 4 and 5. It is possible that some less important facial parts and even noisy background noise are located, resulting in sub-optimal facial representations. To overcome this issue, the classification loss is used with the divergence loss to select discriminative local patches. Only discriminative local patches are emphasized. This explains why attention masks may have overlaps among different local branches where some attention masks emphasize small regions while some focus on larger facial parts. + +# 3.2.3 Hierarchical Bilinear Pooling + +Most existing works learn features from the last convolutional layer. However, representations from the individual layer are not comprehensive. We consider to fuse features from multiple hierarchical layers. + +There are five layers in the last block of HSNet-61 model, shown in Fig. 3. The pyramid diverse attention is applied in every two layers, extracting complementary local information across different layers. Each single layer contains three parallel paths and the deepest path has three convolutional layers. Therefore, different features can be extracted hierarchically in every two layers. Instead of simple concatenation or addition, we adopt the approach in [41] to aggregate information from different layers. + +Suppose $X \in R^{\mathrm{h} \times \mathrm{w} \times \mathrm{c}_1}$ and $Y \in R^{\mathrm{h} \times \mathrm{w} \times \mathrm{c}_2}$ are outputs of two different layers, where $h$ and $w$ represent height and width of feature maps, respectively. $c_1$ and $c_2$ mean the number of feature maps in two different layers. We denote a $c_1$ dimensional feature at a spatial location on $X$ as $x =$ + +$\left[X_{1}, X_{2}, \ldots, X_{c_{1}}\right]$ . Similarly, a $c_{2}$ dimensional feature from $Y$ is $y = \left[Y_{1}, Y_{2}, \ldots, Y_{c_{2}}\right]$ . + +To capture more comprehensive local features, the cross-layer interaction is used, which is defined as following: + +$$ +z _ {\mathrm {i}} = x ^ {\top} W _ {\mathrm {i}} y = x ^ {\top} U _ {\mathrm {i}} V _ {\mathrm {i}} ^ {\top} y = U _ {\mathrm {i}} ^ {\top} x \circ V _ {\mathrm {i}} ^ {\top} y, \tag {3} +$$ + +where $W_{\mathrm{i}} \in R^{\mathrm{c} \times \mathrm{c}}$ is the projection matrix and $z_{i}$ is the projected output. $\circ$ means Hadamard product. In [41], the projection matrix is factorized into two one-rank vectors $U_{\mathrm{i}}, V_{\mathrm{i}} \in R^{\mathrm{c}}$ . + +To encode local information, features should be expanded to a high dimensional space by linear mappings. Therefore, a weight matrix $w = [w_{1},w_{2},\dots,w_{d}]$ is defined to obtain a $d$ dimensional feature $z$ . + +$$ +z = U ^ {\top} x \circ V ^ {\top} y, \tag {4} +$$ + +where $U, V \in R^{\mathrm{c} \times \mathrm{d}}$ and $d$ is the dimension of the projected feature. + +We consider to aggregate features from more layers, capturing more discriminative local features. Let $X^1, X^2, X^3$ represent outputs from three different layers. Eq. (4) is extended to concatenate multiple cross-layer representations: + +$$ +z = \operatorname {C o n c a t} \left(U ^ {\top} x ^ {1} \circ V ^ {\top} x ^ {2}, U ^ {\top} x ^ {1} \circ S ^ {\top} x ^ {3}, V ^ {\top} x ^ {2} \circ S ^ {\top} x ^ {3}\right). \tag {5} +$$ + +Finally, a FC layer is used to reduce dimension to 512. + +# 4. Experiments + +In this section, we conduct experimental validation of the proposed HPDA model on several datasets. + +# 4.1. Data Sets + +# 4.1.1 Training Data + +VGGFace2. VGGFace2 [1] has 3.14 million faces from 8,631 subjects, which covers a large range of poses, ages, ethnicities and professions. It is the default training dataset if unspecified. + +MS-Celeb-1M. The original MS-Celeb-1M dataset [8] contains too much noise. To get a high-quality dataset, [3] refined the dataset and made it publicly available. There are about 85,000 subjects with 5.8 million aligned images. + +# 4.1.2 Test Data + +Experiments are conducted on several datasets, including IJB-A [15] quality, CALFW [46], CACD-VS [2], CPLFW [45], VGGFace2-FP [1] and LFW [10] datasets. For the IJB-A quality dataset, following the work [7], there are 1,543 high-quality faces from 500 subjects and 6,196 low-quality images from 489 identities. The protocol is that each image is compared with every other image, making the task very challenging. There are 9.56 million pairs. For more details about other datasets, please refer to their references. + +
ModelLFWCPLFWCALFW
W/o diverse learning99.1585.8290.52
W/o hierarchical99.0785.6390.35
Global CNN99.1079.3089.90
Local CNNs99.2285.7390.20
HPDA99.3386.0790.93
+ +Table 1. Ablation analysis (%) of the HPDA. Global CNN or local CNNs refer to the framework in Fig. 3. + +
SBtChannel fusionLFWCPLFWCALFW
131.00HBP99.3085.9390.57
231.00HBP99.1785.7790.58
331.00HBP99.3386.0790.93
431.00HBP99.1585.5391.10
311.00HBP99.0885.6390.47
331.00HBP99.3386.0790.93
351.00HBP99.0786.1490.87
330.25HBP99.2085.9890.30
330.50HBP99.1585.7390.75
331.00HBP99.3386.0790.93
332.00HBP98.9785.1890.65
334.00HBP99.2085.9790.43
331.00Concat99.1785.8290.88
331.00Add99.1885.6790.55
331.00HBP99.3386.0790.93
+ +Table 2. Comparison of varying number of optimal scale levels $S$ and local branches $B$ , values of hyper-parameter $t$ and methods to fuse channels from different layers. + +# 4.2. Implementation Details + +CPLFW and CALFW datasets provide cropped faces. For other datasets, faces are cropped by MTCNN [42]. + +The $t$ in Eq. (2) is set to 1 empirically. After comparative experiments, the number of local branches is 3 (i.e. $B = 3$ ) and the pyramid diverse attention in Fig. 4 has three pyramid scales (i.e. $S = 3$ ). + +# 4.3. Ablation Analysis + +We conduct several experiments to analyze the proposed model on LFW, CPLFW and CALFW datasets. Tables 1 and 2 give detailed investigations. + +Importance of Diverse Learning. To locate diverse facial regions automatically in multiple local branches, a diverse learning is proposed. Competitive results demonstrate its superiority in Table 1. + +Besides, this is a face landmark free approach. For example, MTCNN [42] fails to detect landmarks for faces in Fig. 2, Row 1. For such challenging cases, our model can still learn discriminative local patches regardless of loss of face organs and noisy background (Row 3). Besides, it is + +also observed that in Fig. 1, Columns 3, 4 and 5, diverse attentions are generated by three local branches when the diverse learning is used, compared with the model without the diverse learning in Fig. 1, Column 2. This is because the diverse learning can emphasize informative face regions and suppress less important ones or background distraction. On one hand, discriminative local patches are enlarged. For example, as demonstrated in Fig. 2, Columns 6, 8, without diverse learning, discriminative face regions are lost in Row 2 under dramatic illumination changes or pose variations. However, our method locates rich discriminative face regions in Row 3. This benefits from the diverse learning which pushes models to learn more discriminative regions. On the other hand, our method suppresses noisy regions, like goggles in Fig. 2, Columns 1, 2, Row 3, compared with the model without the diverse learning in Row 2. + +Importance of Hierarchical Features. Compared with the last convolutional layer which captures high-level face abstractions, lower layers preserve more local details or small-scale face parts, exhibiting complementary components. + +Our model fuses features from three different layers hierarchically, as shown in Fig. 3. To investigate the necessity, we compare the HPDA model with the model without hierarchical information (i.e. w/o hierarchical) which only extracts features based on the last convolutional layer. As demonstrated in Table 1, our HPDA has slightly better overall performances. This shows the complementary information contained in low layers. + +Effects of Hierarchical Bilinear Pooling. It is intuitive to directly concatenate or add feature maps from different layers. However, simply concatenation or addition fails to capture rich inter-layer feature relations. To overcome this issue, we use hierarchical bilinear pooling (HBP) to incorporate multiple cross-layer interaction modules to learn complementary information from different layers. + +Experiments are conducted to compare HBP with concatenation and addition. For fair comparison, channels in each layer is transformed to a high dimension by $1 \times 1$ convolution as the HBP, encoding rich local information. Table 2 shows that HBP achieves slightly better performances than concatenation or addition, demonstrating that its superiority in capturing inter-layer feature relations. + +Effects of Number of Local Branches $B$ . We set $B$ to 1, 3 and 5. The performance increases when $B$ is changed from 1 to 3. This is because more discriminative facial regions are located by varying local branches which are guided by the diverse learning, boosting the performance. However, the performance drops slightly when $B$ is changed from 3 to 5. This can be explained by the fact that the diverse learning encourages diverse information extracted by different branches, resulting in useless or noisy information in some branches when $B$ is too large. + +Importance of Local CNNs and Global CNN. First, as shown in Fig. 1, the global CNN tends to characterize some less informative regions (e.g. cheek in Column 7, Rows 3, 4) and model more background information, compared with the local CNNs (Column 7 to Column 6, Rows 3, 4). On the other hand, the local CNNs focus on informative areas (Column 6, Rows 3, 4). This explains why the local CNNs offer performance improvement compared with the global CNN, as shown in Table 1. + +Second, global features describe general information of whole faces (Fig. 1, Column 7). Differently, the local CNNs encode more detailed characteristics within different local patches (Fig. 1, Column 6). Take faces in Fig. 1, Rows 3, 4 as examples, the noses and the shape of whole faces remain similar in these two faces despite changes of the global face appearances. The global CNN can represent holistic face shapes (Column 7) and the local CNNs can describe noses (Column 6). It is intuitive to combine the global CNN with the local CNNs to boost the performance. It is observed that the combined global and local representation (Column 8) is more descriptive compared with the global CNN (Column 7) and the local CNNs (Column 6). + +Effects of the Scale Level Number $S$ . We set the scale number $S$ in the pyramid attention to 1, 2, 3 and 4, respectively, where scale 7 is used for $S = 1$ and scale 7, 5, 3 and 1 are used for $S = 4$ . However, setting proper scale levels is necessary to boost the performance. The HPDA achieves the best overall performance when $S = 3$ in Table 2. + +Discriminative face regions have varying sizes due to expression changes (e.g. eyes in Fig. 2, Row 1, Columns 3, 4, 5) and pose changes (e.g. mouths in Fig. 2, Row 1, Columns 6, 7, 8). Although HSNet model extracts rich multi-scale features in a single layer by utilization of multi-scale convolutional kernels and concatenation of feature maps from previous layers, it can just weigh parts with fixed scales, while lacking the capacity to emphasize regions with flexible scales. In contrast, when the pyramid attention is used, attention masks are able to capture information at various scales. + +Effects of Hyper-parameter $t$ . Values of $t$ (0.25, 0.5, 1, 2 and 4) are compared. It can be seen that performance increases when $t$ increases from 0.25 to 1, but drops when $t$ increases from 1 to 4. + +# 4.4. Experiments on Cross-quality Face Matching + +Notice that this task is very close to real-world scenarios where the match is between faces from access control, video surveillance, or public safety (low-quality faces) and enrolled photos (high-quality faces). Following the work [7], several public models are compared. As shown in Table 3, our method HPDA increases the accuracies. + +There are many factors that can influence the quality of face images, such as resolution, pose, expression, ag- + +![](images/04e38bc878ed4a9b120449ae342a26855216bcc0944d861bc1521021b4190da8.jpg) +Figure 6. Qualitative comparison between landmark-based methods and the proposed HPDA model. Row 1: some challenging faces. Row 2: even face landmarks are detected, predefined crops may not be flexible and robust under pose, expression and occlusion variations. Row 3: the HPDA model can locate discriminative facial parts flexibly. + +ing, and illumination. A positive pair of high-quality and low-quality faces are shown in Fig. 1, Rows 1, 2. In such cases, the local CNNs can learn discriminative and diverse local regions. As illustrated in Column 6, it is observed that the local CNNs filter out useless background information and enhance important regions. In contrast, without the diverse learning, these compared models cannot filter out background, which would inevitably decrease the performance. + +Previous landmark-based and attention-based local methods are qualitatively compared with the proposed HPDA model. Landmark-based methods crop face parts around landmarks, suffering from noise from adjacent parts or background. For example, as shown in Fig. 6, Columns 1, 2, 3, mouths have varying shapes or sizes (Row 1) due to expression changes. As a consequence, some crops contain noise from noses and background (Row 2). Meanwhile, because of pose variations (Row 1, Columns 4, 5) and occlusions (Row 1, Column 6), some parts are partly or completely invisible. In such cases, background (Row 2, Columns 4, 5) or sunglasses (Row 2, Column 6) are cropped, leading to noisy representations. Moreover, it is noticed that landmark detection may be not accurate, resulting in inaccurate crops (Row 2, Columns 4, 5). For the attention-based models without diverse learning, many unimportant or noisy facial regions are emphasized in Fig. 2, Row 2. In contrast, our proposed HPDA model can locate discriminative parts and suppress less informative, as shown in Row 3, demonstrating its superiority. + +# 4.5. Experiments on Cross-age Face Matching + +We compare performances on CALFW and CACD-VS datasets in Table 3. It can be seen that HPDA model can slightly outperform others. For this task, as shown in Fig. 1, Rows 3, 4, even if these faces have undergone dramatic appearance changes, some local facial regions (e.g. the pointy + +
MethodsIJB-ACALFWCACD-VSCPLFWVGGFace2-FPLFW
FAR=0.01FAR=0.001
VGGFace [22]60.536.786.5096.00--99.13
Center loss [34]52.131.385.4897.4877.4875.1099.28
SphereFace [19]54.839.690.30-81.4020.1099.42
VGGFace2 [1]--90.57-84.0062.2299.43
LS-CNN [30](VGGFace2)87.575.592.0099.5088.0369.9299.52
LS-CNN [30](MS-Celeb-1M)87.277.594.4099.10---
ArcFace [3]68.665.795.45-92.0846.2099.83
Co-mining [32]--93.28-87.31--
MV-Softmax [33]--95.63-89.69-99.79
HPDA87.680.395.9099.5592.3595.3299.80
+ +Table 3. Performance comparison (%) of the HPDA model with state-of-the-art methods. LS-CNN model and MS-Celeb-1M dataset are used as the stem CNN and training dataset, respectively. As the baseline, LS-CNN model is run on both VGGFace2 and MS-Celeb-1M datasets. + +nose) remain to be very characteristic and the face shape (i.e. the oval face) is still similar. Accordingly, the global CNN (Column 7) and local CNNs (Column 6) focus on facial shapes and pointy noses, respectively. + +# 4.6. Experiments on Cross-pose Face Matching + +As shown in Table 3, our HPDA model outperforms the state-of-the-art on CPLFW and VGGFace2-FP datasets. Results on VGGFace2-FP dataset of Center loss, SphereFace and ArcFace models are from [29]. + +There are several reasons that can explain the results. First, local patches appear at different sizes due to pose changes. Especially, profile faces are self-occlusion where only partial organs are visible, like the small-scale mouths in Fig. 2, Columns 7, 8. The problem above motivates us to develop the pyramid attention to capture multi-scale features. Second, background distraction is a common problem for faces with large pose variations. On one hand, there are some transition regions between discriminative local patches (e.g. noses, eyes, mouths) and background for frontal faces. On the other hand, discriminative local patches are near to noisy background for profile faces. As a result, noisy background tends to be cropped with discriminative local patches, leading to inferior representations. This is especially serious for landmark-based local methods because face landmarks may lie in the background, as shown in Fig. 6, Row 2, Columns 4, 5. Meanwhile, because previous attention-based local methods do not consider the attention diversity, some useful regions are missed, as shown Fig. 2, Columns 7, 8, Row 2. The proposed diverse learning can alleviate this issue by emphasizing discriminative face regions and suppressing less important and background distraction, as illustrated in Row 3. + +Besides, the local CNNs extract complementary infor + +mation to the global CNN. One positive pair with pose changes are shown in Fig. 1, Rows 5, 6, which have similar eyes and big lips. The global CNN describes eyes in Column 7. Meanwhile, the local CNNs focus on big lips in Column 6. The combined local and global CNNs (Column 8) show that the complementarity between the local CNNs and the global CNN is learned. + +# 4.7. Experiments on LFW Dataset + +We also report the accuracy on the popular LFW dataset where most faces are frontal or near-frontal. As shown in Table 3, our model is only slightly worse than ArcFace, but outperforms all other models. Although our proposed HPDA model is designed to solve challenging face matching tasks, it still has an excellent generalization ability on LFW dataset. + +# 5. Conclusion + +We have proposed the HPDA model for face recognition, which adaptively extracts hierarchical multi-scale local representations. A pyramid attention has been applied to locate multi-scale disiminative face regions automatically and weigh adaptively for multiple facial parts. To capture diverse local facial representations, a diverse learning has been introduced to guide multiple attentions to locate diverse facial parts. The hierarchical bilinear pooling has been used to fuse complementary features from different layers. Experimental results on several very challenging face recognition tasks have validated the effectiveness and importance of our proposed HPDA model. + +# References + +[1] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zisserman. Vggface2: A dataset for recognising faces across pose and age. In FG, pages 67-74. IEEE, 2018. +[2] Bor-Chun Chen, Chu-Song Chen, and Winston H Hsu. Cross-age reference coding for age-invariant face recognition and retrieval. In Proceedings of the European Conference on Computer Vision, pages 768-783. Springer, 2014. +[3] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4690-4699, 2019. +[4] Changxing Ding and Dacheng Tao. Trunk-branch ensemble convolutional neural networks for video-based face recognition. TPAMI, 2017. +[5] Guodong Ding, Salman Khan, Zhenmin Tang, and Fatih Porikli. Let features decide for themselves: Feature mask network for person re-identification. arXiv preprint arXiv:1711.07155, 2017. +[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. +[7] Guodong Guo and Na Zhang. What is the challenge for deep learning in unconstrained face recognition? In FG, pages 436-442. IEEE, 2018. +[8] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In Proceedings of the European Conference on Computer Vision, pages 87–102. Springer, 2016. +[9] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. arXiv preprint arXiv:1709.01507, 7, 2017. +[10] Gary B Huang, Marwan Mattar, Tamara Berg, and Eric Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. In Workshop on faces in 'Real-Life' Images: detection, alignment, and recognition, 2008. +[11] Lei Huang, Xianglong Liu, Bo Lang, Adams Wei Yu, Yongliang Wang, and Bo Li. Orthogonal weight normalization: Solution to optimization over multiple dependent stiefel manifolds in deep neural networks. In AAAI, 2018. +[12] Bong-Nam Kang, Yonghyun Kim, Bongjin Jun, and Daijin Kim. Attentional feature-pair relation networks for accurate face recognition. Proceedings of the IEEE International Conference on Computer Vision, 2019. +[13] Bong-Nam Kang, Yonghyun Kim, Bongjin Jun, and Daijin Kim. Hierarchical feature-pair relation networks for face recognition. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0-0, 2019. +[14] Bong-Nam Kang, Yonghyun Kim, and Daijin Kim. Pairwise relational networks for face recognition. arXiv preprint arXiv:1808.04976, 2018. + +[15] Brendan F Klare, Ben Klein, Emma Taborsky, Austin Blanton, Jordan Cheney, Kristen Allen, Patrick Grother, Alan Mah, and Anil K Jain. Pushing the frontiers of unconstrained face detection and recognition: Iarpa janus benchmark a. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1931-1939, 2015. +[16] Dangwei Li, Xiaotang Chen, Zhang Zhang, and Kaiqi Huang. Learning deep context-aware features over body and latent parts for person re-identification. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 384–393, 2017. +[17] Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2285–2294, 2018. +[18] Jingtuo Liu, Yafeng Deng, Tao Bai, Zhengping Wei, and Chang Huang. Targeting ultimate accuracy: Face recognition via deep embedding. arXiv preprint arXiv:1506.07310, 2015. +[19] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherface: Deep hypersphere embedding for face recognition. arXiv preprint arXiv:1704.08063, 2017. +[20] Volodymyr Mnih, Nicolas Heess, Alex Graves, et al. Recurrent models of visual attention. In Advances in neural information processing systems, pages 2204-2212, 2014. +[21] Mete Ozay and Takayuki Okatani. Optimization on submanifolds of convolution kernels in cnns. arXiv preprint arXiv:1610.07008, 2016. +[22] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, et al. Deep face recognition. In BMVC, volume 1, page 6, 2015. +[23] Yi Sun, Xiaogang Wang, and Xiaou Tang. Deep learning face representation from predicting 10,000 classes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1891-1898, 2014. +[24] Yifan Sun, Liang Zheng, Weijian Deng, and Shengjin Wang. Svdnet for pedestrian retrieval. In Proceedings of the IEEE International Conference on Computer Vision, pages 3800-3808, 2017. +[25] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1-9, 2015. +[26] Zichang Tan, Yang Yang, Jun Wan, Guodong Guo, and Stan Z. Li. Deeply-learned hybrid representations for facial age estimation. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 3548-3554. International Joint Conferences on Artificial Intelligence Organization, 7 2019. +[27] Zichang Tan, Yang Yang, Jun Wan, Hanyuan Hang, Guodong Guo, and Stan Z. Li. Attention-based pedestrian attribute analysis. IEEE TIP, 28(12):6126-6140, 2019. +[28] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Zhifeng Li, Dihong Gong, Jingchao Zhou, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. arXiv preprint arXiv:1801.09414, 2018. + +[29] Qiangchang Wang and Guodong Guo. Benchmarking deep learning techniques for face recognition. Journal of Visual Communication and Image Representation, 65:102663, 2019. +[30] Q. Wang and G. Guo. Ls-cnn: Characterizing local patches at multiple scales for face recognition. IEEE Transactions on Information Forensics and Security, 15:1640-1653, 2020. +[31] Qiangchang Wang, Yuanjie Zheng, Gongping Yang, Weidong Jin, Xinjian Chen, and Yilong Yin. Multiscale rotation-invariant convolutional neural networks for lung texture classification. IEEE journal of biomedical and health informatics, 22(1):184-195, 2017. +[32] Xiaobo Wang, Shuo Wang, Jun Wang, Hailin Shi, and Tao Mei. Co-mining: Deep face recognition with noisy labels. In Proceedings of the IEEE International Conference on Computer Vision, pages 9358-9367, 2019. +[33] Xiaobo Wang, Shifeng Zhang, Shuo Wang, Tianyu Fu, Hailin Shi, and Tao Mei. Mis-classified vector guided softmax loss for face recognition. arXiv:1912.00833, 2019. +[34] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In Proceedings of the European Conference on Computer Vision, pages 499-515. Springer, 2016. +[35] Tianyi Wu, Sheng Tang, Rui Zhang, Juan Cao, and Jintao Li. Tree-structured kronecker convolutional network for semantic segmentation. In 2019 IEEE International Conference on Multimedia and Expo (ICME), pages 940–945. IEEE, 2019. +[36] Tianyi Wu, Sheng Tang, Rui Zhang, Guodong Guo, and Yongdong Zhang. Consensus feature network for scene parsing. arXiv preprint arXiv:1907.12411, 2019. +[37] Tianyi Wu, Sheng Tang, Rui Zhang, and Yongdong Zhang. Cgnet: A light-weight context guided network for semantic segmentation. arXiv preprint arXiv:1811.08201, 2018. +[38] Weidi Xie, Li Shen, and Andrew Zisserman. Comparator networks. In Proceedings of the European Conference on Computer Vision, pages 782-797, 2018. +[39] Jiwei Yang, Xu Shen, Xinmei Tian, Houqiang Li, Jianqiang Huang, and Xian-Sheng Hua. Local convolutional neural networks for person re-identification. In ACM Multimedia Conference on Multimedia Conference, pages 1074–1082. ACM, 2018. +[40] Hantao Yao, Shiliang Zhang, Richang Hong, Yongdong Zhang, Changsheng Xu, and Qi Tian. Deep representation learning with part loss for person re-identification. TIP, 28(6):2860-2871, 2019. +[41] Chaojian Yu, Xinyi Zhao, Qi Zheng, Peng Zhang, and Xinge You. Hierarchical bilinear pooling for fine-grained visual recognition. In Proceedings of the European Conference on Computer Vision, pages 574-589, 2018. +[42] Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li, and Yu Qiao. Joint face detection and alignment using multitask cascaded convolutional networks. IEEE Signal Processing Letters, 23(10):1499-1503, 2016. +[43] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2881-2890, 2017. + +[44] Heliang Zheng, Jianlong Fu, Tao Mei, and Jiebo Luo. Learning multi-attention convolutional neural network for fine-grained image recognition. In proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5209–5217, 2017. +[45] Tianyue Zheng and Weihong Deng. Cross-posed ffw: A database for studying crosspose face recognition in unconstrained environments. Beijing University of Posts and Telecommunications, Tech. Rep, pages 18-01, 2018. +[46] Tianyue Zheng, Weihong Deng, and Jiani Hu. Cross-age lfw: A database for studying cross-age face recognition in unconstrained environments. arXiv preprint arXiv:1708.08197, 2017. \ No newline at end of file diff --git a/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/images.zip b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..748716b143359324a2fffd27adc7ae1681c935ce --- /dev/null +++ b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c422b93a439da87caedc6cc57991b26b31cbc4afb2ddfdfb1532d3fe1c8a11cd +size 481178 diff --git a/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/layout.json b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b98af9bfc2b35013aa1d98a500f6eac67226dce2 --- /dev/null +++ b/hierarchicalpyramiddiverseattentionnetworksforfacerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:211d0d061e7abac12ffa94e125df08ef72c065b816038c09880f995edf9cdb9c +size 377771 diff --git a/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_content_list.json b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d5e584a6456ba6901a4ee189a018b62e72dbf471 --- /dev/null +++ b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2382b86dbe110bef9eeb9a674e5f60077859ad5a2e1359a051879c35066ab804 +size 78973 diff --git a/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_model.json b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0ab620f50ee08360c186a2804756fbda59d636f4 --- /dev/null +++ b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fea1860e2e5d4de12d4218ae5c90b41c733c299541c67258b7ab8320f54fb79 +size 97581 diff --git a/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_origin.pdf b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..128a7c21b04ec2356a4b9b198e187348d81f4ffd --- /dev/null +++ b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/27360509-0da6-419b-9d10-32745a306eae_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9889eda5f92bb09f2b8f708a301f5b90cfc46c20e3f09310f997a33b779d9de +size 745657 diff --git a/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/full.md b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..53bc03d91a92594d919b460506937cee05b8fdc3 --- /dev/null +++ b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/full.md @@ -0,0 +1,259 @@ +# Hierarchical Scene Coordinate Classification and Regression for Visual Localization + +Xiaotian Li $^{1}$ Shuzhe Wang $^{1}$ Yi Zhao $^{1}$ Jakob Verbeek $^{2*}$ Juho Kannala $^{1}$ $^{1}$ Aalto University $^{2}$ Facebook AI Research + +# Abstract + +Visual localization is critical to many applications in computer vision and robotics. To address single-image RGB localization, state-of-the-art feature-based methods match local descriptors between a query image and a pre-built 3D model. Recently, deep neural networks have been exploited to regress the mapping between raw pixels and 3D coordinates in the scene, and thus the matching is implicitly performed by the forward pass through the network. However, in a large and ambiguous environment, learning such a regression task directly can be difficult for a single network. In this work, we present a new hierarchical scene coordinate network to predict pixel scene coordinates in a coarse-to-fine manner from a single RGB image. The network consists of a series of output layers, each of them conditioned on the previous ones. The final output layer predicts the 3D coordinates and the others produce progressively finer discrete location labels. The proposed method outperforms the baseline regression-only network and allows us to train compact models which scale robustly to large environments. It sets a new state-of-the-art for single-image RGB localization performance on the 7-Scenes, 12-Scenes, Cambridge Landmarks datasets, and three combined scenes. Moreover, for large-scale outdoor localization on the Aachen Day-Night dataset, we present a hybrid approach which outperforms existing scene coordinate regression methods, and reduces significantly the performance gap w.r.t. explicit feature matching methods. $^{1}$ + +# 1. Introduction + +Visual localization aims at estimating precise six degree-of-freedom (6-DoF) camera pose with respect to a known environment. It is a fundamental component of many intelligent autonomous systems and applications in computer vision and robotics, e.g., augmented reality, autonomous driving, or camera-based indoor localization for personal as + +sistants. Commonly used visual localization methods rely on matching local visual descriptors [42, 43]. Correspondences are typically established between 2D interest points in the query and 3D points in the pre-built structure-from-motion model [48, 49] with nearest neighbor search, and the 6-DoF camera pose of the query can then be computed from the correspondences. + +Instead of explicitly establishing 2D-3D correspondences via matching descriptors, scene coordinate regression methods directly regress 3D scene coordinates from an image [3, 5, 8, 50]. In this way, correspondences between 2D points in the image and 3D points in the scene can be obtained densely without feature detection and description, and explicit matching. In addition, no descriptor database is required at test time since the model weights encode the scene representation implicitly. It was experimentally shown that recent CNN-based scene coordinate regression methods achieve better localization performance on small-scale datasets compared to the state-of-the-art feature-based methods [5]. The high accuracy and the compact representation of a dense scene model make scene coordinate regression approach an interesting alternative to the classic feature-based approach. + +However, most existing scene coordinate regression methods can only be adopted on small-scale scenes. Typically, scene coordinate regression networks are designed to have a limited receptive field [3, 5], i.e. only a small local image patch is considered for each scene coordinate prediction. This allows the network to generalize well from limited training data, since local patch appearance is more stable w.r.t. viewpoint change. On the other hand, a limited receptive field size can lead to ambiguous patterns in the scene, especially in large-scale environments, caused by visual similarity between local image patches. Due to these ambiguities, it is harder for the network to accurately model the regression problem, resulting in inferior performance at test time. Using larger receptive field sizes, up to the full image, to regress the coordinates can mitigate the issues caused by ambiguities. This, however, has been shown to be prone to overfitting the larger input patterns in the case of limited training data, even if data augmentation alleviates + +![](images/e14ac4f2731898517e983810bb33df3ba2aa41dd0e6d0b17d3a686698db7afb1.jpg) +Figure 1. Overview of our single-image RGB localization approach based on hierarchical scene coordinate prediction, here using 3 levels. + +this problem to some extent [27]. + +In contrast, in this work, we overcome the ambiguities due to small receptive fields by conditioning on discrete location labels around each pixel. During training, the labels are obtained by a coarse quantization of the ground-truth 3D coordinates. At test time, the location labels for each pixel are obtained using dense classification networks, which can more easily deal with the location ambiguity since they are trained using the cross-entropy classification loss which permits a multi-modal prediction in 3D space. Our model allows for several classification layers, using progressively finer location labels, obtained through hierarchical clustering of the ground-truth 3D point cloud data. Our hierarchical coarse-to-fine architecture is implemented using conditioning layers that are related to the FiLM architecture [36], resulting in a compact model. See Fig. 1 for a schematic overview of our approach. + +We validate our approach by comparing it to a regression-only network, which lacks the hierarchical coarse-to-fine structure. We present results on three datasets used in previous works: 7-Scenes [50], 12-Scenes [56], and Cambridge Landmarks [24]. Our approach shows consistently better performance and achieves state-of-the-art results for single-image RGB localization. Moreover, by compiling the 7-Scenes and 12-Scenes datasets into single large scenes, and using the Aachen Day-Night dataset [44, 46], we show that our approach scales more robustly to larger environments. + +In summary, our contributions are as follows: + +- We introduce a new hierarchical coarse-to-fine conditioning architecture for scene coordinate prediction, which improves the performance and scalability over a baseline regression-only network. +- We show that our novel approach achieves state-of-the-art results for single-image RGB localization on three benchmark datasets and it allows us to train single compact models which scale robustly to large scenes. +- For large-scale outdoor localization, we present a hy + +brid approach built upon our network, which reduces significantly the gap to feature-based methods. + +# 2. Related Work + +Visual localization. Visual localization aims at predicting 6-DoF camera pose for a given query image. To obtain precise 6-DoF camera pose, visual localization methods are typically structure-based, i.e. they rely on 2D-3D correspondences between 2D image positions and 3D scene coordinates. With the established 2D-3D correspondences, a RANSAC [20] optimization scheme is responsible for producing the final pose estimation. The correspondences are typically obtained by matching local features such as SIFT [29], and many matching and filtering techniques have been proposed, which enable efficient and robust city-scale localization [15, 25, 34, 43, 52, 54]. + +Image retrieval can also be used for visual localization [1]. The pose of the query image can be directly approximated by the most similar retrieved database image. Since compact image-level descriptors are used for matching, image retrieval methods can scale to very large environments. The retrieval methods can be combined with structure-based methods [40, 41, 45, 53, 60] or relative pose estimation [2, 18, 26] to predict precise poses. Typically, the retrieval step helps restrict the search space, leading to faster and more accurate localization. + +In recent years, learning-based localization approaches have been explored. One popular direction is to replace the entire localization pipeline with a single neural network. PoseNet [24] and its variants [9, 22, 23, 31, 58] directly regress the camera pose from a query image. Recently, however, it was demonstrated that direct pose regression yields results more similar to pose approximation via image retrieval than to accurate pose estimation via 3D structure [47]. Therefore, these methods are still outperformed by structure-based methods. By fusing estimated pose information from the previous frame, [37, 55] achieve better + +performance, but require sequences of images rather than single images. + +Scene coordinate regression. Instead of learning the entire pipeline, scene coordinate regression methods learn the first stage of the pipeline in the structure-based approaches. Namely, either a random forest [4, 13, 14, 21, 30, 32, 33, 50, 57] or a neural network [3, 5, 6, 7, 8, 10, 11, 12, 27, 28, 30] is trained to directly predict 3D scene coordinates for the pixels and thus the 2D-3D correspondences are established. These methods do not explicitly rely on feature detection, description and matching, and are able to provide correspondences densely. They are more accurate than traditional feature-based methods at small and medium scale, but usually do not scale well to larger scenes [5, 6]. In order to generalize well to novel viewpoints, these methods typically rely on only local image patches to produce the scene coordinate predictions. However, this may introduce ambiguities due to similar local appearances, especially when the scale of the scene is large. To resolve local appearance ambiguities, we introduce element-wise conditioning layers to modulate the intermediate feature maps of the network using coarse discrete location information. We show this leads to better localization performance, and we can robustly scale to larger environments. + +Joint classification-regression. Joint classification-regression frameworks have been proved effective in solving various vision tasks. For example, [38, 39] proposed a classification-regression approach for human pose estimation from single images. In [4], a joint classification-regression forest is trained to predict scene identifiers and scene coordinates. In [59], a CNN is used to detect and segment a predefined set of planar Objects-of-Interest (OOIs), and then, to regress dense matches to their reference images. In [10], scene coordinate regression is formulated as two separate tasks of object instance recognition and local coordinate regression. In [6], multiple scene coordinate regression networks are trained as a mixture of experts along with a gating network which assesses the relevance of each expert for a given input, and the final pose estimate is obtained using a novel RANSAC framework, i.e., Expert Sample Consensus (ESAC). In contrast to existing approaches, in our work, we use spatially dense discrete location labels defined for all pixels, and propose FiLM-like [36] conditioning layers to propagate information in the hierarchy. We show that our novel framework allows us to achieve high localization accuracy with one single compact model. + +# 3. Hierarchical Scene Coordinate Prediction + +We now describe our coarse-to-fine hierarchical scene coordinate prediction approach. Note that we address single-image RGB localization, as in e.g. [5, 6, 7, 28], rather than using RGB-D images [12, 13, 14, 21, 33, 50, 57], or + +image sequences [37, 55]. + +Hierarchical joint learning framework. To define hierarchical discrete location labels, we hierarchically partition the ground-truth 3D point cloud data. This step can be done, e.g., with k-means. In this way, in addition to the ground-truth 3D scene coordinates, each pixel in a training image is also associated with a number of labels, from coarse to fine, obtained at different levels of the clustering hierarchy. Then, for each level, our network has a corresponding classification layer which for all pixels predicts the discrete location labels at that level. Besides the classification layers, we include a final regression layer to predict the continuous 3D scene coordinates for the pixels, generating putative 2D-3D matches. To propagate the coarse location information to inform the predictions at finer levels, we introduce conditioning layers before each classification/regression layer. Note that we condition on the ground truth label maps during training, and condition on the predicted label maps at test time. + +Since the predictions in each classification layer are conditioned on all preceding label maps, at each particular classification layer, it suffices to predict the label branch at that level. For example, for a three-level classification hierarchy, with branching factor $k$ , we classify across only $k$ labels at each level. Similar to [10], instead of directly regressing the absolute coordinates, we regress the relative positions to the cluster centers in 3D space at the finest level. This accelerates convergence of network training [10]. Note that this hierarchical scene coordinate learning framework also allows a classification-only variant. That is, if we have fine enough location labels before the regression layer, we can simply use the cluster centers as the scene coordinates predictions without performing a final regression step. + +We design the network to be global-to-local, which means that finer output layers have smaller receptive fields in the input image. This allows the network to use more global information at coarser levels, while conditioning on location labels to disambiguate the local appearances at finer levels. Note that at test time, the receptive fields of the finer output layers are also large, as they depend on the discrete location labels which are predicted from the input at test time, rather than fixed as during training. + +Conditioning layers. To make use of the discrete location label information predicted by the network at coarser levels, these predictions should be fed back to the finer levels. Inspired by the Feature-wise Linear Modulation (FiLM) conditioning method [36], we introduce conditioning layers just before each of the output layers. A conditioning parameter generator takes the predicted label map $\ell$ as input, outputs a set of scaling and shifting parameters $\gamma (\ell)$ and $\beta (\ell)$ , and these parameters are fed into the conditioning layer to apply linear transformation to the input feature map. Unlike FiLM layers, however, which perform + +![](images/19715f6eb10f1f3d7f669c5ea4013abd61f538afa3137e06e8ab5555fb88f70e.jpg) +Figure 2. Left: Architecture of our hierarchical scene coordinate network (3-level). Right: Architecture of the conditioning layer. + +the same channel-wise modulation across the entire feature map, our conditioning layers perform a linear modulation per spatial position, i.e., element-wise multiplication and addition as shown in Fig. 2 (right). Therefore, instead of vectors, the output parameters $\gamma (\ell)$ and $\beta (\ell)$ from a generator are feature maps of the same (height, width, channel) dimensions as the input feature map of the corresponding conditioning layer. More formally, given the input feature map $x$ , the scaling and shifting parameters $\gamma (\ell)$ and $\beta (\ell)$ , the linear modulation can be written as: + +$$ +f (x, \ell) = \gamma (\ell) \odot x + \beta (\ell), \tag {1} +$$ + +where $\odot$ denotes the Hadamard product. In addition, the generators consist of only $1 \times 1$ convolutional layers so that each pixel is conditioned on its own location labels. We use an ELU non-linearity [16] after the feature modulation. + +Network architecture. In our main experiments we use 3-level hierarchy for all the datasets, i.e. our network has two classification output layers and one regression output layer. The overall architecture of this network is shown in Fig. 2 (left). The first classification branch predicts the coarse location labels, and the second one predicts the fine labels. We use strided convolution, upconvolution and dilated convolution for the two classification branches to enlarge the size of the receptive field, while preserving the output resolution. All the layers after the conditioning layers have kernel size of $1 \times 1$ such that the label conditioning is applied locally. More details on the architecture are provided in the supplementary material. + +Loss function. Our network predicts location labels and regresses scene coordinates at the same time. Therefore, we need both a regression loss and a classification loss during training. For the regression task, we minimize the Euclidean distance between predicted scene coordinates $\hat{y}$ and ground truth scene coordinates $y$ , + +$$ +\mathcal {L} _ {r} = \sum_ {i} \| y _ {i} - \hat {y} _ {i} \| _ {2}, \tag {2} +$$ + +where $i$ ranges over the pixels in the image. For the classification task, we use cross-entropy loss at each level, i.e. + +$$ +\mathcal {L} _ {c} ^ {j} = - \sum_ {i} \left(\ell_ {i} ^ {j}\right) ^ {\top} \log \hat {\ell} _ {i} ^ {j}, \tag {3} +$$ + +where $\ell_i^j$ denotes the one-hot coding of the ground-truth label of pixel $i$ at level $j$ , and $\hat{\ell}_i^j$ denotes the vector of predicted label probabilities for the same pixel, and the logarithm is applied element-wise. In the case of 3-level hierarchy, the final loss function is given by + +$$ +\mathcal {L} = w _ {1} \mathcal {L} _ {c} ^ {1} + w _ {2} \mathcal {L} _ {c} ^ {2} + w _ {3} \mathcal {L} _ {r}, \tag {4} +$$ + +where $w_{1}, w_{2}, w_{3}$ are weights for the loss terms. We found that the accuracy of the final regression prediction is crucial to localization performance, and thus a large value should be set for the regression loss. Details on the weights and training procedure are provided in the supplementary material. Note that, as mentioned before, our hierarchical joint learning framework also allows a classification-only variant, by using a finer label hierarchy. + +# 4. Experimental Evaluation + +In this section, we present our experimental setup and evaluation results on standard visual localization datasets. + +# 4.1. Datasets and Experimental Setup + +We use four standard benchmark datasets for our experiments. The 7-Scenes (7S) [50] dataset is a widely used RGB-D dataset that contains seven indoor scenes. RGB-D image sequences of the scenes are recorded by a KinectV1. Ground truth poses and dense 3D models are also provided. 12-Scenes (12S) [56] is another indoor RGB-D dataset. It is composed of twelve rooms captured with a Structure.io depth sensor and an iPad color camera, and ground truth poses are provided along with the RGB-D images. The recorded environments are significantly larger than those + +
7-ScenesDSAC++ [5]AS [43]Inloc [53]Regression-onlyOurs12-ScenesDSAC++ [5]Regression-onlyOurs
——Acc.Med. Err.Acc.Med. Err.Acc.Med. Err.Acc.Med. Err.Acc.Med. Err.——Acc.Med. Err.Acc.Med. Err.Acc.Med. Err.
Chess97.10.02, 0.5-0.04, 2.0-0.03, 1.195.40.02, 0.797.50.02, 0.7Kitchen-1100-1000.008, 0.41000.008, 0.4
Fire89.60.02, 0.9-0.03, 1.5-0.03, 1.194.90.02, 0.996.70.02, 0.9Living-1100-1000.011, 0.41000.011, 0.4
Heads92.40.01, 0.8-0.02, 1.5-0.02, 1.297.10.01, 0.81000.01, 0.9Bed99.5-1000.013, 0.61000.009, 0.4
Office86.60.03, 0.7-0.09, 3.6-0.03, 1.181.40.03, 0.986.50.03, 0.8Kitchen-299.5-1000.008, 0.41000.007, 0.3
Pumpkin59.00.04, 1.1-0.08, 3.1-0.05, 1.658.00.04, 1.159.90.04, 1.0Living-2100-1000.014, 0.61000.010, 0.4
Kitchen66.60.04, 1.1-0.07, 3.4-0.04, 1.356.50.05, 1.465.50.04, 1.2Luke95.5-93.80.020, 0.996.30.012, 0.5
Stairs29.30.09, 2.6-0.03, 2.2-0.09, 2.568.10.04, 1.087.50.03, 0.8Gates 362100-1000.011, 0.51000.010, 0.4
Average74.40.04, 1.1-0.05, 2.5-0.04, 1.478.80.03, 1.084.80.03, 0.9Gates 38196.8-98.80.016, 0.799.10.012, 0.6
Complete76.1--74.780.5Lounge95.1-99.40.015, 0.51000.014, 0.5
CambridgeDSAC++ [5]AS [43]NG-RANSAC [7]Regression-onlyOursManolis96.4-97.20.014, 0.71000.011, 0.5
Great Court0.40, 0.2-0.35, -1.25, 0.60.28, 0.2Floor5a83.7-97.00.016, 0.798.80.012, 0.5
K. College0.18, 0.30.42, 0.60.13, -0.21, 0.30.18, 0.3Floor 5b95.0-93.30.019, 0.697.30.015, 0.5
Old Hospital0.20, 0.30.44, 1.00.22, -0.21, 0.30.19, 0.3Average96.8-98.30.014, 0.699.30.011, 0.5
Shop Facade0.06, 0.30.12, 0.40.06, -0.06, 0.30.06, 0.3Complete96.497.999.1
St M. Church0.13, 0.40.19, 0.50.10, -0.16, 0.50.09, 0.3
Average0.19, 0.30.29, 0.60.17, -0.38, 0.40.16, 0.3
+ +Table 1. The median errors (m, °) for 7-Scenes, 12-Scenes and Cambridge, and the percentages of accurately localized test images (error $< 5$ cm, $5^{\circ}$ ) for 7-Scenes and 12-Scenes. "Complete" refers to the percentage among all test images of all scenes. + +in 7-Scenes. Cambridge Landmarks [24] is an outdoor RGB visual localization dataset. It consists of RGB images of six scenes captured using a Google LG Nexus 5 smartphone. Ground truth poses and sparse 3D reconstructions generated with structure from motion are also provided. In addition to these three datasets, we synthesize three large-scale indoor scenes based on 7-Scenes and 12-Scenes by placing all seven, twelve or nineteen individual scenes, into a single coordinate system similar to [6]. These large integrated datasets are denoted by i7-Scenes (i7S), i12-Scenes (i12S), i19-Scenes (i19S), respectively. Finally, we evaluate our method on the Aachen Day-Night dataset [44, 46] which is very challenging for scene coordinate regression methods due to the scale and sparsity of the 3D model. In addition, it contains a set of challenging night time queries, but there is no night time training data. In the following, we present the main setup for experiments on all the datasets except Aachen. See supplementary for details on Aachen. + +Ground truth scene coordinates can be either obtained from the known poses and depth maps or rendered using a 3D model. To generate the ground truth location labels, we run hierarchical k-means clustering on dense point cloud models. For all the individual scenes used in the main experiments, unless stated otherwise, we use two-level hierarchical k-means with the branching factor set to 25 for both levels. For the three combined scenes, i7-Scenes, i12-Scenes, and i19-Scenes, we simply combine the label trees at the first level. That is, e.g., for the i7-Scenes, there are 175 branches in total at the first level. + +We use the same VGG-style [51] architecture as DSAC++ [5] as the base regression network for our method, except we use ELU activation [16] instead of ReLU [35]. This is because we found that the plain regression network is easier to train with ReLU, while our network which has the additional conditioning layers and classification branches works better with ELU. The regression layer, the second and first classification layer have a receptive field size of $73 \times 73$ , $185 \times 185$ , and $409 \times 409$ pixels, respectively, in the input image. To show the advantage of the proposed architecture, we also evaluate the localization performance + +of the same regression-only network used in DSAC++ [5], but here trained with the Euclidean loss term only. Note that in [5], two additional training steps are proposed and the entire localization pipeline is optimized end-to-end, which can further improve the accuracy. Potentially, our network can also benefit from the DSAC++ framework, but it is beyond the scope of the current paper. Unless specified otherwise, we perform affine data augmentation with additive brightness changes during training. We also report the results obtained without data augmentation in Sec. 4.4. For pose estimation, we follow [5], and use the same PnP-RANSAC algorithm with the same hyperparameter settings. Further details about the architecture, training and other settings can be found in the supplementary material. + +# 4.2. Results on 7-Scenes, 12-Scenes and Cambridge + +To evaluate our hierarchical joint learning architecture, we first compare it with the state-of-the-art methods as well as a regression-only baseline on the 7-Scenes, the 12-Scenes, and the Cambridge Landmarks datasets. For the Cambridge Landmarks, we report median pose accuracy as in the previous works. Following [5, 7, 28], we do not include the Street scene, since the dense 3D reconstruction of this scene has rather poor quality that hampers performance. For the 7-Scenes and the 12-Scenes, we also report the percentage of the test images with error below $5\mathrm{cm}$ and $5^{\circ}$ , which is used as the main evaluation metric for both datasets and gives more information about the localization performance. Scene coordinate regression methods are currently the best performing single-image RGB methods on these three small/medium scale datasets [5, 7]. We also compare to a state-of-the-art feature-based method, i.e. Active Search [43] and an indoor localization method which exploits dense correspondences [53]. Note that, in general, methods that exploit additional depth information [12, 13] or sequences of images [37, 55] can provide better localization performance. However, the additional required information also restricts the scenarios in which they can be applied. We do not compare to those methods in this work, since they are not directly comparable to our results pro + +![](images/395d5434540536833f3dc0c31d1e3482c0b247234a0f25c99692f92e81f46e2a.jpg) +Figure 3. Average pose accuracy on the combined scenes. Results for ESAC taken from [6]. Our method consistently outperforms the regression-only baseline by a large margin and achieves better performance compared to ESAC. + +duced in the single-image RGB localization setting. + +The results are reported in Table 1. Numbers for the competing methods are taken from the corresponding papers. Overall, our approach yields excellent results. Compared to the regression-only baseline, our approach provides consistently better localization performance on all the scenes across the three datasets. During training, we also observed consistently lower regression training error compared to the regression-only baseline, underlining the ability of the discrete location labels to disambiguate the local appearances. Our approach also achieves overall better results compared to the current state-of-the-art methods DSAC++ [5] on all three datasets, and NG-RANSAC [7] on the Cambridge Landmarks (the latter does not report results on the 7-Scenes and 12-Scenes datasets). + +In Table 1 we trained our networks and the regression-only baseline with data augmentation, while DSAC++ and NG-RANSAC did not use data augmentation. In Sec. 4.4, we show that even without data augmentation, our method still achieves comparable or better performance compared to DSAC++ and NG-RANSAC. Moreover, in DSAC++ and NG-RANSAC, more advanced training steps and RANSAC schemes are proposed to improve the accuracy of the plain regression network and to optimize the entire pipeline, while in this work we focus on the scene coordinate network itself and we show that improvements on this single component can already improve the localization performance beyond the state-of-the-art. Note that DSAC++ and NG-RANSAC are complementary to our approach, and their combination could be explored in future work. + +# 4.3. Results on Combined Scenes + +The individual scenes from the previous datasets all have very limited physical extent. As in [6], to go beyond such small environments, we use the combined scenes, i.e. the i7-Scenes, i12-Scenes, and the i19-Scenes, as described in Sec. 4.1. We mainly compare to the regression-only base + +
Reg-onlyOursOurs capacity-ESAC (i7S) [6]ESAC (i12S) [6]ESAC (i19S) [6]
104MB165MB73MB7×28MB12×28MB19×28MB
+ +Table 2. Model size comparison. Our method can scale robustly to large environments with a compact model. + +line and ESAC [6] on the three combined scenes. To the best of our knowledge, ESAC is currently the only scene coordinate regression method that scales well to the combined scenes. The results are reported in Fig. 3. + +We see that the localization performance of the regression baseline (Reg-only) decreases dramatically when trained on the combined scenes compared to trained and tested on each of the scenes individually, $c.f.$ Table 1. Its performance drops more drastically as the scene grows larger. Our method is much more robust to the increase in the environment size, and significantly outperforms the baseline. This underlines the importance of our hierarchical learning framework when the environment is large and potentially contains more ambiguities. Our method also outperforms ESAC which uses an ensemble of networks, where each network specializes in a local part of the environment [6]. ESAC requires to train and store multiple networks, whereas our approach requires only a single model. + +Note that for ESAC the authors did not use data augmentation. When we train our method without data augmentation (Ours w/o aug), we still outperform ESAC on i7-Scenes and i12-Scenes, and obtain a slightly lower but comparable accuracy on i19-Scenes (87.9% vs. 88.1%). Note that ESAC and our approach are complementary, and their combination could be explored in future work. + +# 4.4. Detailed Analysis + +Network capacity. Compared to the regression-only baseline, our network has extra layers for the conditioning generators and classification branches, and thus has an increased number of parameters. Therefore, for fair comparison, we add more channels to the regression-only baseline to compensate the increased number of parameters in our model. On 7-Scenes, the average accuracy of the regression baseline increased from $78.8\%$ to $80.4\%$ . On the combined scenes, as shown in Fig. 3, we observe larger improvement in performance (denoted by Reg-only capacity+ in Fig. 3). However, even with increased capacity, the regression-only baseline still lags far behind our method, especially on the combined scenes. + +We also experimented with reducing the size of the backbone regression network, which accounts for most of the model parameters. We add more conditioning layers early in the network, while using less shared layers between the regression and classification branches. We denote the resulting network by Ours capacity-, see supplementary for details. In Table 2, we compare the model size of our network to the regression baseline and ESAC on the combined + +
7-Scenes12-ScenesCambridge
Reg-only w/o aug70.9%97.5%0.38m, 0.4°
Ours w/o aug75.5%99.4%0.18m, 0.3°
DSAC++ [5]74.4%96.8%0.19m, 0.3°
NG-RANSAC [7]--0.17m, -
+ +scenes. We see in Fig. 3 and Table 2 that this allows us to reduce our model size by more than a factor of two, while incurring a loss in accuracy below one percentage point. Compared to ESAC on the i19-Scenes dataset, our compressed model is more than seven times more compact. Note that since we perform regression locally, the k-means cluster centers also need to be stored. Since for each individual scene there are only 625 clusters, the storage space needed for the cluster centers is negligible ( $< 1\mathrm{MB}$ ). + +Using global information. Using global information directly to regress scene coordinates has been explored in [27]. However, even with data augmentation, large input patterns remain sensitive to viewpoint changes, leading to inferior performance at test time compared to using local patches [5]. We validate this by using the same regression network, but now with dilated convolution such that the receptive field size is much larger $(409 \times 409)$ . We find that in general directly using global context helps the training loss decrease faster. This might have a positive effect on complex scenes (39.3% with dilated convolution vs. 37.9% without it on i7-Scenes). For less demanding scenes, however, the network usually gives worse results (59.2% vs. 78.8% on 7-Scenes) due to decreased viewpoint invariance. Meanwhile, our network is able to use the global information in a more robust way, i.e., indirectly through discrete location labels. + +We also created two variants of our network with small $(73\times 73)$ and large $(409\times 409)$ receptive field across all levels, denoted by Ours $rf-$ and Ours $rf+$ respectively in Fig. 3. As expected, increasing the receptive field size at all levels harms the performance, as shown in Fig. 3. Interestingly, the model with small receptive field even performs sightly better on the combined scenes. This indicates that the local ambiguities can be handled well by the hierarchical coarse-to-fine conditioning mechanism. + +Data augmentation. We apply affine transformations to the images with additive brightness changes as data augmentation during training. In general, this improves the generalization capability of the network and makes it more robust to lighting and viewpoint changes. According to Table 1, Table 3 and Fig. 3, data augmentation consistently improves the localization performance of our method, except on the 12-Scenes dataset; in 12S, the training and test trajectories are close, and there are no significant viewpoint changes between training and test frames [13]. Data aug + +Table 3. Average pose accuracy/median error on the 7-Scenes, 12-Scenes and Cambridge datasets of our method and the regression-only baseline without data augmentation. + +
7S9×949×4910×100×10010×100×100×10062525×25
82.9%85.0%85.9%85.5%85.3%84.8%
i7S63×9343×4970×100×10070×100×100×1007×25×25175×25
80.6%83.7%83.0%82.1%83.0%83.3%
+ +Table 4. Average pose accuracy obtained with different hierarchy settings. The models with 4-level label hierarchy are classification-only, i.e. the final regression layer is omitted. + +mentation, however, can also increase the appearance ambiguity of the training data and make the network training more difficult. This happens to the baseline regression-only network: Although data augmentation helps it on the small-scale scenes, on the Cambridge and the combined scenes, data augmentation has no positive effects and even harms the performance. Note that without data augmentation, our method still provides results that are better than or on par with the state-of-the-arts, see Table 3 and Fig. 3. + +Conditioning mechanism. By formulating the scene regression task as a coarse-to-fine joint classification-regression task can help break the complexity of the original regression problem to some extent, even without the proposed conditioning mechanism. To show this experimentally, we trained a variant of our network without the conditioning mechanism, i.e. we removed all the conditioning generators and layers, thus no coarse location information is fed to influence the network activations at the finer levels. We did preserve the coarse-to-fine joint learning, and still use the predicted location labels to determine the k-means cluster w.r.t. which the local regression coordinates are predicted. We denote this model variant by Ours w/o cond. In contrast to the regression-only baseline, the regression part still learns to perform local regression by predicting the offsets with respect to the cluster centers of the finest classification hierarchy. As shown in Fig. 3, this variant outperforms the regression-only baseline, and significant performance gain can be observed on the combined scenes. However, compared to our full architecture, it still falls far behind, especially on the largest i19-Scenes. This illustrates that the proposed conditioning mechanism plays a crucial role in our hierarchical coarse-to-fine scene coordinate learning framework, and the significantly improved performance compared to the regression-only baseline is not achievable without it. + +Hierarchy and partition granularity. In Table 4 we report results obtained on the 7-Scenes and i7-Scenes datasets using label hierarchies of different depth and width. The results show that the performance of our approach is robust w.r.t. the choice of these hyperparameters, and only for the smallest 2-level label hierarchies that we tested we observed a significant drop in performance. Note that for the default setting $(25 \times 25)$ , the results on 7-Scenes reported in Table 1 and 4 are the best across 10 runs of the randomly initialized k-means (mean = 84.3%, SD = 0.4%). How to optimally partition the scene could be explored in future work. + +![](images/4c6c7d8e194ab4954206f282176f5d142d88a583cb769aa36eddef9268cb0d79.jpg) +Figure 4. Illustration of our method with sparse local features and global image retrieval used in the Aachen dataset experiments. + +# 4.5. Outdoor Aachen Localization Results + +The Aachen dataset is a challenging outdoor large-scale dataset, which is particularly difficult for scene coordinate regression methods due to the lack of dense model, the city-scale environment, and the night time queries. To the best of our knowledge, ESAC is the only existing method of this kind which gives reasonable results on this dataset. + +We present a hybrid approach built upon our network for the challenging dataset. To resolve the sparsity of the training data, in [6], a re-projection error [5, 28] is optimized densely, which is not applicable to our method. Therefore, we resort to sparse local features [17, 19], such that during both training and test, our network only takes in a list of sparse features as input rather than a dense RGB image. To use image-level contextual information, we adopt an image retrieval technique. In addition to the location labels, every output layer including the first one is also conditioned on an image ID. During training, it is the ID of the training image. At test time, it is the ID of a retrieved image. We use SuperPoint [17] as the local feature, and NetVLAD [1] for global image retrieval. The results in Table 5 show that for the Aachen dataset the classification-only variant performs better, although it is not always the case, see Table 4. We use a 4-level classification-only network, and at the finest level, each cluster contains only one single 3D point. We use the retrieved database image also to perform a simple pre-RANSAC filtering step. Since the predictions are conditioned on the image ID, a prediction that is not visible in the corresponding image is likely to be a false match. Therefore, we filter out the predictions that are not visible in the corresponding retrieved image before the RANSAC stage. As shown in Table 5, this further improves the performance. Since the top-1 image can be a false positive, we run the pipeline for all the top-10 images, and select the prediction with the largest number of inliers. See the supplementary material for more details. + +This approach significantly outperforms ESAC, and its performance is comparable to Active Search. However, + +
MethodAachen Day 0.25m, 2° / 0.5m, 5° / 5m, 10°Aachen Night 0.5m, 2° / 1m, 5° / 5m, 10°
AS [43]57.3% / 83.7% / 96.6%19.4% / 30.6% / 43.9%
HL SP+NV [40]80.5% / 87.4% / 94.2%42.9% / 62.2% / 76.5%
ESAC (50 experts) [6]42.6% / 59.6% / 75.5%3.1% / 9.2% / 11.2%
Ours top-10 w/ift71.1% / 81.9% / 91.7%32.7% / 43.9% / 65.3%
Ours top-10 w/ift w/o aug65.5% / 77.3% / 88.8%22.4% / 38.8% / 54.1%
Ours top-1 w/ift64.0% / 76.1% / 85.4%18.4% / 32.7% / 53.1%
Ours top-158.3% / 66.4% / 80.2%13.3% / 21.4% / 32.7%
Ours w/o retrieved ID50.6% / 56.3% / 70.1%7.1% / 11.2% / 19.4%
Ours top-1 (4-levelcls-reg)47.8% / 61.8% / 79.9%10.2% / 21.4% / 35.7%
Ours top-1 (3-levelcls-reg)20.9% / 42.2% / 76.9%3.1% / 14.3% / 32.7%
+ +Table 5. Accuracy on the Aachen dataset. Unless stated otherwise, we use a 4-level classification-only network for our method. + +compared to the hierarchical localization method of [40] which also uses SuperPoint and NetVLAD, our method still falls behind. Nevertheless, our method requires no database of local descriptors and the model size of our hierarchical network is 179MB, while in [40], a local descriptor database of 4GB is used. Our results reduce the gap between scene coordinate learning approaches and the state-of-the-art feature-based methods on this dataset, and we expect our method to perform better if a dense model is available. An advantage of the scene coordinate learning methods is that the model size does not grow linearly with the number of points in the scene model. This allows these methods to implicitly and efficiently store a dense descriptor point cloud in the network, and to produce dense matches at test time, which often leads to better pose estimation than sparse matches [53]. + +# 5. Conclusion + +We have proposed a novel hierarchical coarse-to-fine scene coordinate learning approach, enabled by a FiLM-like conditioning mechanism, for visual localization. Our network has several levels of output layers with each of them conditioned on the outputs of the previous ones. Progressively finer localization labels are predicted with classification branches. The scene coordinate predictions can be obtained through a final regression layer or using the cluster centers at the finest level. The results show that the hierarchical scene coordinate network leads to more accurate camera re-localization performance than the previous regression-only approaches, achieving state-of-the-art results for single-image RGB localization on three benchmark datasets. Moreover, our novel architecture allows us to train compact models which scale robustly to large environments, achieving state-of-the-art on three combined scenes. Finally, we show a hybrid approach that further narrows the gap to the state-of-the-art feature-based methods for challenging large-scale outdoor localization. + +Acknowledgements. This work has been supported by the Academy of Finland (grants 277685, 309902), and the French National Research Agency (grants ANR16-CE23-0006, ANR-11-LABX0025-01). We acknowledge the computational resources provided by the Aalto Science-IT project and CSC - IT Center for Science, Finland. + +# References + +[1] Relja Arandjelović, Petr Gronat, Akihiko Torii, Tomás Pájdla, and Josef Sivic. NetVLAD: CNN architecture for weakly supervised place recognition. In CVPR, 2016. 2, 8 +[2] Vassileios Balntas, Shuda Li, and Victor Adrian Prisacariu. RelocNet: Continuous metric learning relocalisation using neural nets. In ECCV, 2018. 2 +[3] Eric Brachmann, Alexander Krull, Sebastian Nowozin, Jamie Shotton, Frank Michel, Stefan Gumhold, and Carsten Rother. DSAC - Differentiable RANSAC for camera localization. In CVPR, 2017. 1, 3 +[4] Eric Brachmann, Frank Michel, Alexander Krull, Michael Ying Yang, Stefan Gumhold, and Carsten Rother. Uncertainty-driven 6D pose estimation of objects and scenes from a single RGB image. In CVPR, 2016. 3 +[5] Eric Brachmann and Carsten Rother. Learning less is more - 6D camera localization via 3D surface regression. In CVPR, 2018. 1, 3, 5, 6, 7, 8 +[6] Eric Brachmann and Carsten Rother. Expert sample consensus applied to camera re-localization. In ICCV, 2019. 3, 5, 6, 8 +[7] Eric Brachmann and Carsten Rother. Neural-guided RANSAC: Learning where to sample model hypotheses. In ICCV, 2019. 3, 5, 6, 7 +[8] Eric Brachmann and Carsten Rother. Visual camera re-localization from RGB and RGB-D images using DSAC. arXiv:2002.12324, 2020. 1, 3 +[9] Samarth Brahmbhatt, Jinwei Gu, Kihwan Kim, James Hays, and Jan Kautz. Geometry-aware learning of maps for camera localization. In CVPR, 2018. 2 +[10] Ignas Budvytis, Marvin Teichmann, Tomas Vojir, and Roberto Cipolla. Large scale joint semantic re-localisation and scene understanding via globally unique instance coordinate regression. In BMVC, 2019. 3 +[11] Mai Bui, Shadi Albarqouni, Slobodan Ilic, and Nassir Navab. Scene coordinate and correspondence learning for image-based localization. In BMVC, 2018. 3 +[12] Tommaso Cavallari, Luca Bertinetto, Jishnu Mukhoti, Philip Torr, and Stuart Golodetz. Let's take this online: Adapting scene coordinate regression network predictions for online RGB-D camera relocalisation. In 3DV, 2019. 3, 5 +[13] Tommaso Cavallari, Stuart Golodetz, Nicholas Lord, Julien Valentin, Victor Prisacariu, Luigi Di Stefano, and Philip HS Torr. Real-time RGB-D camera pose estimation in novel scenes using a relocalisation cascade. PAMI, 2019. 3, 5, 7 +[14] Tommaso Cavallari, Stuart Golodetz, Nicholas A Lord, Julien Valentin, Luigi Di Stefano, and Philip HS Torr. On-the-fly adaptation of regression forests for online camera relocalisation. In CVPR, 2017. 3 +[15] Wentao Cheng, Weisi Lin, Kan Chen, and Xinfeng Zhang. Cascaded parallel filtering for memory-efficient image-based localization. In ICCV, 2019. 2 +[16] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (ELUs). arXiv:1511.07289, 2015. 4, 5 + +[17] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. SuperPoint: Self-supervised interest point detection and description. In CVPR Workshops, 2018. 8 +[18] Mingyu Ding, Zhe Wang, Jiankai Sun, Jianping Shi, and Ping Luo. CamNet: Coarse-to-fine retrieval for camera relocalization. In ICCV, 2019. 2 +[19] Mihai Dusmanu, Ignacio Rocco, Tomas Pajdla, Marc Pollefeys, Josef Sivic, Akihiko Torii, and Torsten Sattler. D2-Net: A trainable CNN for joint detection and description of local features. In CVPR, 2019. 8 +[20] Martin A Fischler and Robert C Bolles. Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography. CACM, 24(6):381-395, 1981. 2 +[21] Abner Guzmán-Rivera, Pushmeet Kohli, Ben Glocker, Jamie Shotton, Toby Sharp, Andrew W. Fitzgibbon, and Shahram Izadi. Multi-output learning for camera relocalization. In CVPR, 2014. 3 +[22] Alex Kendall and Roberto Cipolla. Modelling uncertainty in deep learning for camera relocalization. In ICRA, 2016. 2 +[23] Alex Kendall and Roberto Cipolla. Geometric loss functions for camera pose regression with deep learning. In CVPR, 2017. 2 +[24] Alex Kendall, Matthew Grimes, and Roberto Cipolla. PoseNet: A convolutional network for real-time 6-DoF camera relocalization. In ICCV, 2015. 2, 5 +[25] Mans Larsson, Erik Stenberg, Carl Toft, Lars Hammarstrand, Torsten Sattler, and Fredrik Kahl. Fine-grained segmentation networks: Self-supervised segmentation for improved long-term visual localization. In ICCV, 2019. 2 +[26] Zakaria Laskar, Iaroslav Melekhov, Surya Kalia, and Juho Kannala. Camera relocalization by computing pairwise relative poses using convolutional neural network. In ICCV Workshops, 2017. 2 +[27] Xiaotian Li, Juha Ylioinas, and Juho Kannala. Full-frame scene coordinate regression for image-based localization. In RSS, 2018. 2, 3, 7 +[28] Xiaotian Li, Juha Ylioinas, Jakob Verbeek, and Juho Kannala. Scene coordinate regression with angle-based reprojection loss for camera relocalization. In ECCV Workshops, 2018. 3, 5, 8 +[29] David G Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91-110, 2004. 2 +[30] Daniela Massiceti, Alexander Krull, Eric Brachmann, Carsten Rother, and Philip HS Torr. Random forests versus neural networks - What's best for camera localization? In ICRA, 2017. 3 +[31] Iaroslav Melekhov, Juha Ylioinas, Juho Kannala, and Esa Rahtu. Image-based localization using hourglass networks. In ICCV Workshops, 2017. 2 +[32] Lili Meng, Jianhui Chen, Frederick Tung, James J Little, Julien Valentin, and Clarence W de Silva. Backtracking regression forests for accurate camera relocalization. In IROS, 2017. 3 +[33] Lili Meng, Frederick Tung, James J Little, Julien Valentin, and Clarence W de Silva. Exploiting points and lines in regression forests for RGB-D camera relocalization. In IROS, 2018. 3 + +[34] Sven Middelberg, Torsten Sattler, Ole Untzelmann, and Leif Kobbelt. Scalable 6-DoF localization on mobile devices. In ECCV, 2014. 2 +[35] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. 5 +[36] Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. FiLM: Visual reasoning with a general conditioning layer. In AAAI, 2018. 2, 3 +[37] Noha Radwan, Abhinav Valada, and Wolfram Burgard. VLocNet++: Deep multitask learning for semantic visual localization and odometry. RA-L, 3(4):4407-4414, 2018. 2, 3, 5 +[38] Gregory Rogez, Philippe Weinzaepfel, and Cordelia Schmid. LCR-Net: Localization-classification-regression for human pose. In CVPR, 2017. 3 +[39] Gregory Rogez, Philippe Weinzaepfel, and Cordelia Schmid. LCR-Net++: Multi-person 2D and 3D pose detection in natural images. PAMI, 2019. 3 +[40] Paul-Edouard Sarlin, Cesar Cadena, Roland Siegwart, and Marcin Dymczyk. From coarse to fine: Robust hierarchical localization at large scale. In CVPR, 2019. 2, 8 +[41] Paul-Edouard Sarlin, Frédéric Debraine, Marcin Dymczyk, Roland Siegwart, and Cesar Cadena. Leveraging deep visual descriptors for hierarchical efficient localization. In CoRL, 2018. 2 +[42] Torsten Sattler, Bastian Leibe, and Leif Kobbelt. Fast image-based localization using direct 2D-to-3D matching. In ICCV, 2011. 1 +[43] Torsten Sattler, Bastian Leibe, and Leif Kobbelt. Efficient & effective prioritized matching for large-scale image-based localization. PAMI, 39(9):1744-1756, 2016. 1, 2, 5, 8 +[44] Torsten Sattler, Will Maddern, Carl Toft, Akihiko Torii, Lars Hammarstrand, Erik Stenborg, Daniel Safari, Masatoshi Okutomi, Marc Pollefeys, Josef Sivic, Fredrik Kahl, and Tomas Pajdla. Benchmarking 6DoF outdoor visual localization in changing conditions. In CVPR, 2018. 2, 5 +[45] Torsten Sattler, Akihiko Torii, Josef Sivic, Marc Pollefeys, Hajime Taira, Masatoshi Okutomi, and Tomas Pajdla. Are large-scale 3D models really necessary for accurate visual localization? In CVPR, 2017. 2 +[46] Torsten Sattler, Tobias Weyand, Bastian Leibe, and Leif Kobbelt. Image retrieval for image-based localization revisited. In BMVC, 2012. 2, 5 +[47] Torsten Sattler, Qunjie Zhou, Marc Pollefeys, and Laura Leal-Taixe. Understanding the limitations of CNN-based absolute camera pose regression. In CVPR, 2019. 2 +[48] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In CVPR, 2016. 1 +[49] Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise view selection for unstructured multi-view stereo. In ECCV, 2016. 1 +[50] Jamie Shotton, Ben Glocker, Christopher Zach, Shahram Izadi, Antonio Criminisi, and Andrew Fitzgibbon. Scene coordinate regression forests for camera relocalization in RGB-D images. In CVPR, 2013. 1, 2, 3, 4 +[51] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014. 5 + +[52] Linus Svärn, Olof Enqvist, Fredrik Kahl, and Magnus Oskarsson. City-scale localization for cameras with known vertical direction. PAMI, 39(7):1455-1461, 2016. 2 +[53] Hajime Taira, Masatoshi Okutomi, Torsten Sattler, Mircea Cimpoi, Marc Pollefeys, Josef Sivic, Tomás Pajdla, and Akihiko Torii. InLoc: Indoor visual localization with dense matching and view synthesis. In CVPR, 2018. 2, 5, 8 +[54] Carl Toft, Erik Stenberg, Lars Hammarstrand, Lucas Brynte, Marc Pollefeys, Torsten Sattler, and Fredrik Kahl. Semantic match consistency for long-term visual localization. In ECCV, 2018. 2 +[55] Abhinav Valada, Noha Radwan, and Wolfram Burgard. Deep auxiliary learning for visual localization and odometry. In ICRA, 2018. 2, 3, 5 +[56] Julien Valentin, Angela Dai, Matthias Nießner, Pushmeet Kohli, Philip Torr, Shahram Izadi, and Cem Keskin. Learning to navigate the energy landscape. In 3DV, 2016. 2, 4 +[57] Julien Valentin, Matthias Nießner, Jamie Shotton, Andrew Fitzgibbon, Shahram Izadi, and Philip HS Torr. Exploiting uncertainty in regression forests for accurate camera relocalization. In CVPR, 2015. 3 +[58] Florian Walch, Caner Hazirbas, Laura Leal-Taixe, Torsten Sattler, Sebastian Hilsenbeck, and Daniel Cremers. Image-based localization using LSTMs for structured feature correlation. In ICCV, 2017. 2 +[59] Philippe Weinzaepfel, Gabriela Csurka, Yohann Cabon, and Martin Humenberger. Visual localization by learning objects-of-interest dense match regression. In CVPR, 2019. 3 +[60] Luwei Yang, Ziqian Bai, Chengzhou Tang, Honghua Li, Yasutaka Furukawa, and Ping Tan. SANet: Scene agnostic network for camera localization. In ICCV, 2019. 2 \ No newline at end of file diff --git a/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/images.zip b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5577b65b776226b4cb1e909ca1a45cb7d67836b9 --- /dev/null +++ b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84cd9753acb42d08b4f7f790614180305a4384f80575714d45f8a9db486ae25b +size 393751 diff --git a/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/layout.json b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8c41ac8dcd6140da7a505502f8c30c64f2a2e176 --- /dev/null +++ b/hierarchicalscenecoordinateclassificationandregressionforvisuallocalization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afcb280b76c9ae9a20deaa62dafa24012e5dabc251e9238576309e11bebbe88d +size 318979 diff --git a/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_content_list.json b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9fbe7eff4a4a029f12cf04f025d9c2f9f194ef83 --- /dev/null +++ b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d912f45f0e7bfa174b8e54236a89d95b4fc90782c79b4687a6ca5b125c72dc8 +size 78031 diff --git a/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_model.json b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d3e9d7e3b270e1c74023f1ee6cdd40ae7d8e8992 --- /dev/null +++ b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8fe550fa3acd43c1d3d847c64f1e6a80759c31711bad2ae7ca9795238b7fa4a +size 94974 diff --git a/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_origin.pdf b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c96aecd2e1368c902be550e3141a904aa023ed1 --- /dev/null +++ b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/6af52ade-815d-4414-96ca-8823de8735db_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6bd5b9eff96c634b78abfe03c2806db32d3b63ba61a10f9bd4abcd002cff858 +size 2418790 diff --git a/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/full.md b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..24d0641f4414a4576c9e74df04319d41de0ab538 --- /dev/null +++ b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/full.md @@ -0,0 +1,334 @@ +# High-dimensional Convolutional Networks for Geometric Pattern Recognition + +Christopher Choy Stanford University + +Junha Lee POSTECH + +René Ranftl +Intel Labs + +Jaesik Park POSTECH + +Vladlen Koltun +Intel Labs + +# Abstract + +Many problems in science and engineering can be formulated in terms of geometric patterns in high-dimensional spaces. We present high-dimensional convolutional networks (ConvNets) for pattern recognition problems that arise in the context of geometric registration. We first study the effectiveness of convolutional networks in detecting linear subspaces in high-dimensional spaces with up to 32 dimensions: much higher dimensionality than prior applications of ConvNets. We then apply high-dimensional ConvNets to 3D registration under rigid motions and image correspondence estimation. Experiments indicate that our high-dimensional ConvNets outperform prior approaches that relied on deep networks based on global pooling operators. + +# 1. Introduction + +Finding structure in noisy data is a general problem that arises in many different disciplines. For example, robust linear regression requires finding a pattern (line, plane) in noisy data. 3D registration of point clouds requires the identification of veridical correspondences in the presence of spurious ones [6]. Structure from motion (SfM) pipelines use verification based on prescribed geometric models to filter spurious image matches [38]. A variety of such applications can benefit from improved methods for the detection of geometric structures in noisy data. + +Such detection is challenging. Data points that belong to the sought-after structure often constitute only a small fraction, while the majority are outliers. Various algorithms have been proposed over the years to cope with noisy data [3, 9, 14, 19, 20, 32, 36, 39], but they are usually specific to a subset of problems. + +Recent works have advocated for using deep networks [33, 46, 49] to learn robust models to classify geometric structures in the presence of outliers. Deep networks offer significant flexibility and the promise to replace hand-crafted algorithms and heuristics by models learned directly from data. However, due to the unstructured nature of the data in geometric problems, existing works have treated such data as unordered sets, and relied on network + +architectures based predominantly on global pooling operators and multi-layer perceptrons (MLPs) [31, 47]. Such network architectures lack the capacity to model local geometric structures and do not leverage the nature of the data, which is often embedded in a (high-dimensional) metric space and has a meaningful geometric structure. + +In this work, we introduce a novel type of deep convolutional network that can operate in high dimensions. Our network takes a sparse tensor as input and employs high-dimensional convolutions as the fundamental operator. The distinguishing characteristic of our approach is that it is able to effectively leverage local neighborhood relations together with global context even for high-dimensional data. Our network is fully-convolutional, translation-invariant, and incorporates best practices from the development of ConvNets for two-dimensional image analysis [16, 21, 34]. + +To demonstrate the effectiveness and generality of our approach, we tackle various geometric pattern recognition problems. We begin with the diagnostic setting of linear subspace detection and show that our construction is effective in high-dimensional spaces and at low signal-to-noise ratios. We then apply the presented construction to geometric pattern recognition problems that arise in computer vision, including registration of three-dimensional point sets under rigid motion (a 6D problem) and correspondence estimation between images under epipolar constraints (a 4D problem). In both settings, the problem is made difficult by the presence of outliers. + +Our experiments indicate that the presented construction can reliably detect geometric patterns in high-dimensional data that is heavily contaminated by noise. It can operate in regimes where existing algorithms break down. Our approach significantly improves 3D registration performance when combined with standard approaches for 3D point cloud alignment [6, 37, 51, 52]. The presented high-dimensional convolutional network also outperforms state-of-the-art methods for correspondence estimation between images [46, 49]. All networks and training scripts are available at https://github.com/chrischoy/HighDimConvNets. + +# 2. Related Work + +Robust model fitting. Fitting a geometric model to a set of observations that are contaminated by outliers is a fundamental problem that frequently arises in computer vision and related fields. The most widely used approach for robust geometric model fitting is RANdom SAmple Consensus (RANSAC) [13]. Due to its fundamental importance, many variants and improvements of RANSAC have been proposed over the years [3, 9, 23, 32, 36, 39, 42, 41]. + +Alternatively, algorithms for robust geometric model fitting are frequently derived using techniques from robust statistics [14, 19, 20, 50], where outlier rejection is performed by equipping an estimator with a cost function that is insensitive to gross outliers. While the resulting algorithms are computationally efficient, they require careful initialization and optimization procedures to avoid poor local optima [51]. + +Another line of work proposes to find globally optimal solutions to the consensus maximization problem [5, 24, 45]. However, these approaches are currently computationally too demanding for many practical applications. + +3D registration. Finding reliable correspondences between a pair of surfaces is an essential step for 3D reconstruction [6, 10, 12, 29]. The problem has been conventionally framed as an energy minimization problem which can be solved using various techniques such as branch and bound [44], Riemannian optimization [35], mixed-integer programming [22], robust error minimization [51], semi-definite programming [18, 26], or random sampling [6]. + +Recent work has begun to leverage deep networks for geometric registration [2, 28, 30]. These works are predominantly based on PointNet and related architectures, which detect patterns via global pooling operations [31, 47]. In contrast, we develop a high-dimensional convolutional network that operates at multiple scales and can leverage not just global but also local geometric structure. + +Image correspondences. Yi et al. [46] and Zhang et al. [49] reduce essential matrix estimation to classification of correspondences into inliers and outliers. Ranftl and Koltun [33] present a similar formulation for fundamental matrix estimation. Brachmann and Rother [4] propose to learn a neural network that guides hypothesis sampling in RANSAC for model fitting problems. Dang et al. [11] propose a numerically stable loss function for essential matrix estimation. + +All of these works employ variants of PointNets to classify inliers in an unordered set of putative correspondences. These architectures, based on pointwise MLPs, lack the capacity to model local geometric structure. In contrast, we develop convolutional networks that directly leverage neighborhood relations in the high-dimensional space of correspondences. + +# 3. High-Dimensional Convolutional Networks + +In this section, we introduce the two main building blocks of our high-dimensional convolutional network construction: generalized sparse tensors and generalized convolutions. + +# 3.1. Sparse Tensor and Convolution + +A tensor is a multi-dimensional array that represents high-order data. A $D$ -th order tensor $\mathcal{T}$ requires $D$ indices to uniquely access its elements. We denote such indices or coordinates as $\mathbf{x} = [x^{1},\dots,x^{D}]$ and the element at the coordinate as $\mathcal{T}[\mathbf{x}]$ similar to how we access components in a matrix. Likewise, a sparse tensor is a high-dimensional extension of a sparse matrix where the majority of the elements are 0. Concretely, + +$$ +\mathfrak {T} [ \mathbf {x} _ {i} ] = \left\{ \begin{array}{l l} \mathbf {f} _ {i} & \text {i f} \mathbf {x} _ {i} \in \mathcal {C} \\ 0 & \text {o t h e r w i s e ,} \end{array} \right. \tag {1} +$$ + +where $\mathcal{C} = \{\mathbf{x}_i\mid \mathbf{x}_i\in \mathbb{N}^D,\mathfrak{T}[\mathbf{x}_i]\neq \mathbf{0}\}_{i = 1}^N$ is the set of coordinates with non-zero values, $N$ is the number of non-zero elements, and $\mathbf{f}_i$ is the non-zero value at the $i$ -th coordinate. A sparse tensor feature map is a $(D + 1)$ -th order tensor with $\mathbf{f}_i\in \mathbb{R}^{N_{D + 1}}$ as we use the last dimension to denote the feature dimension. A sparse tensor has the constraint that $\mathbf{x}_i\in \mathbb{N}^D$ . We extend the sparse tensor coordinates to integer indices $\mathbf{x}_i\in \mathbb{Z}^D$ and define $\mathfrak{T}\in \mathbb{R}^{\aleph_0^D\times N_{D + 1}}$ where $\aleph_0$ denotes the cardinality of the integer space $|\mathbb{Z}|$ to define a generalized sparse tensor. + +A convolution on this generalized sparse tensor can then be defined as a simple extension of the generalized sparse convolution [7]: + +$$ +\mathbf {f} _ {\mathbf {x}} ^ {\text {o u t}} = \sum_ {\mathbf {i} \in \mathcal {N} ^ {D} (\mathbf {x}) \cap \mathcal {C} ^ {\text {i n}}} \mathbf {W} _ {\mathbf {i}} \mathbf {f} _ {\mathbf {x} + \mathbf {i}} ^ {\text {i n}} \quad \text {f o r} \quad \mathbf {x} \in \mathcal {C} ^ {\text {o u t}}, \tag {2} +$$ + +where $\mathcal{C}^{\mathrm{in}}$ and $\mathcal{C}^{\mathrm{out}}$ are the set of input and output locations which is predefined by the user, $\mathbf{W}_{\mathrm{i}}$ is a weight matrix, and $\mathcal{N}^{D}(\mathbf{x})$ defines a set of neighbors of $\mathbf{x}$ which is defined by the shape of the convolution kernel. For example, if the convolution kernel is a hypercube of size $K$ , $\mathcal{N}^{D}(\mathbf{x}) \cap \mathcal{C}^{\mathrm{in}}$ is a set of all the non-zero elements of the input sparse tensor centered at $\mathbf{x}$ within the $L_{\infty}$ -ball of extent $K$ . + +# 3.2. Convolutional Networks + +We design a high-dimensional fully-convolutional neural network for sparse tensors (sparse tensor networks) based on generalized convolution [7, 8]. We use U-shaped networks [34] to capture large receptive fields while maintaining the original resolution at the final layer. The network has residual connections [16] within layers with the same resolution and across the network to speed up convergence + +and to recover the lost spatial resolution in the last layer. The network architecture is illustrated in Fig. 1. + +For computational efficiency in high dimensions, we use the cross-shaped kernel [7] for all convolutions. We denote the kernel size by $K$ . The cross-shaped kernel has non-zero weights only for the $K - 1$ nearest neighbors along each axis, which results in one weight parameter for the center location and $K - 1$ weight parameters for each axis. Note that a cross-shaped kernel is similar to separable convolution, where a full convolution is approximated by $D$ one-dimensional convolutions of size $K$ . Both types of kernels are rank-1 approximations of the full hyper-cubic kernel $K^D$ , but separable convolution requires $KD$ matrix multiplications, whereas the cross-shaped kernel requires only $(K - 1)D + 1$ matrix multiplications. + +# 3.3. Implementation + +We extend the implementation of Choy et al. [7], which supports arbitrary kernel shapes, to high-dimensional convolutional networks. To implement the sparse tensor networks, we need an efficient data structure that can generate a new sparse tensor as well as find neighbors within the sparse tensor. Choy et al. [7] use a hash table that is efficient for both insertion and search. We replaced the hash table with a faster and more efficient variant [1]. In addition, as the neighbor search can be run in parallel, we create an iterator function that can run in parallel with OpenMP [27] by dividing the table into smaller parallelization blocks. + +Lastly, U-shaped networks generate hierarchical feature maps that expand the receptive field. Choy et al. [7] use stride- $K$ convolutions with kernel size $\geq K$ to generate lower-resolution hierarchical feature maps. Still, such implementation requires iterating over at least $K^D$ elements within a hypercubic kernel as the coordinates are stored in a hash table, which results in $O(NK^{D})$ complexity where $N$ is the cardinality of input. Consequently, it becomes infeasible to store the weights on the GPU for high-dimensional spaces. Instead of strided convolutions, we propose an efficient implementation of stride- $K$ sum pooling layers with kernel size $K$ . Instead of iterating over all possible neighbors, we iterate over all input coordinates and round them down to multiples of $K$ , which requires only $O(N)$ complexity. + +# 4. Geometric Pattern Recognition + +Our approach uses convolutional networks to recognize geometric patterns in high-dimensional spaces. Specifically, we classify each point $\mathbf{x}_i$ in a high-dimensional dataset $\mathcal{X} = \{\mathbf{x}_i\}_{i=1}^N$ as an inlier or an outlier. We start by validating our approach on synthetic datasets of varying dimensionality and then show results on 3D registration and essential matrix estimation. + +![](images/8fdef8bc5e5c1e8efac01772abc8a2cc2ad8e9791e765b4d67ecac9c69823291.jpg) +Figure 1: A generic U-shaped high-dimensional convolutional network architecture. The numbers next to each block indicate kernel size, stride, and the number of channels. The strided convolutions that reduce the resolution of activations are shifted upward to indicate different levels of resolution. + +For all experiments, we first quantize the input coordinates to create a sparse tensor of order $D + 1$ , where the last dimension denotes the feature channels. The network then predicts a logit score for each non-zero element in the sparse tensor to indicate if a point is part of the geometric pattern or if it is an outlier. + +# 4.1. Line and Plane Detection + +We first test the capabilities of our fully-convolutional networks on simple high-dimensional pattern recognition problems that involve detecting linear subspaces amidst noise. Our dataset consists of uniformly sampled noise from the $D$ -dimensional space and a small number of samples from a line under a Gaussian noise model. The number of outliers increases exponentially in the dimension $(O(L^{D}))$ , while the number of inliers increases sublinearly $(O(\sqrt{LD}))$ , where $L$ is the extent of the domain. Further details are given in the supplement. The network predicts a likelihood score for each non-zero element in the input sparse tensor, and we threshold inliers with probability $\geq 0.5$ . We estimate the line equation from the predicted inliers using unweighted least squares. + +We use PointNet variants as the baselines for this experiment [31, 46, 47]. For Zaheer et al. [47], we were not able to get reasonable results with the network architecture proposed in the paper. We thus augmented the architecture with batch normalization and instance normalization layers after each linear transformation similar to Yi et al. [46], which boosted performance significantly. For all experiments, we use the cross-entropy loss. We used the same training hyperparameters, including loss, batch size, optimizer, and learning rate schedule for all approaches. + +We use three metrics to analyze the performance of the networks: Mean Squared Error (MSE), F1 score, and Average Precision (AP). For the MSE, we estimate the line equation with Least Squares to fit the line to the inliers. The second metric is the F1 score, the harmonic mean of precision and recall. In many problems, F1 score is a direct indicator of the performance of a classifier, and we also found a + +Table 1: Line detection in high-dimensional spaces in the presence of extreme noise. All networks are trained with the cross-entropy loss for 40 epochs. Inlier ratios are listed on the left. In the 32-dimensional setting, only 7 out of 10,000 data points are inliers. The table reports Mean Squared Error (MSE), F1 score, and Average Precision (AP) of our approach (a high-dimensional ConvNet) versus baselines (PointNet variants). MSE: lower is better. F1 and AP: higher is better. + +
Qi et al. [31]Zaheer et al. [47] + BN + INYi et al. [46]Ours
Dim.Inlier RatioMSEF1AP (AUC)MSEF1AP (AUC)MSEF1AP (AUC)MSEF1AP (AUC)
415.59%1.3370.0250.1646.33E-40.8670.9369.11E-50.9810.9962.33E-50.9980.999
85.54%2.3690.0220.0650.0010.8910.9552.45E-40.9460.9891.64E-50.9990.999
162.75%3.8540.0120.0344.86E-40.9700.9920.0020.9620.9863.39E-50.9990.999
240.40%5.3720.0210.0110.6760.6340.6910.7750.6100.6745.34E-50.9940.996
320.07%6.7150.0126.71E-5-0.00.295-0.00.0500.0100.6690.689
+ +Table 2: Plane detection in high-dimensional spaces in the presence of extreme noise. Inlier ratios are listed on the left. In the 32-dimensional setting, fewer than 5 out of 100,000 data points are inliers. The table reports the F1 score and Average Precision (AP) of our approach (a high-dimensional ConvNet) versus baselines (PointNet variants). Higher is better. + +
Qi et al. [31]Zaheer et al. [47] + BN + INYi et al. [46]Ours
Dim.Inlier RatioF1AP (AUC)F1AP (AUC)F1AP (AUC)F1AP (AUC)
429.96%0.00.3150.9800.9960.9930.9990.9910.998
88.07%0.00.0880.9850.9990.9900.9990.9980.999
160.34%0.00.0040.1550.2990.1820.3590.9510.961
240.01%0.01.61E-40.0320.1330.00.0810.3040.346
324.64E-3%0.05.56E-50.00.2210.00.0230.1380.240
+ +![](images/13e7a2fc5cfd237899affe39a2cf7fd18c87f9e40889b5fe00d617cdcccc66aa.jpg) +Qi et al. [31] + +![](images/94f7c388e5604d6c08b449769bedb9baf471dd958b278ebe5af48f71fdd3c557.jpg) +Zaheer et al. [47] + +![](images/617ed28e51826fdea85e0652d2aa6e5a31c9e1443596f6c6841f5a01d2c75df3.jpg) +Yiet al.[46] + +![](images/9966ce43814f3c82bb32840136e13953c082e84221613508f1bbacbd8cbaba5e.jpg) +Ours +Figure 2: 16D line detection projected to a 2D plane for visualization. Black dots are noise and blue dots are samples from a line in the 16D space. The dashed red line is the prediction of the respective method. Samples from the ground-truth line (blue) are enlarged by a factor of 10 for visualization. + +strong correlation between F1 score and the mean squared error. The final metric we use is average precision (AP), which measures the area under the precision-recall curve. We report the results in Tab. 1 and provide qualitative examples in Fig. 2. Tab. 1 lists the inlier ratio to indicate the difficulty of each task. + +In a second experiment, we create another synthetic dataset where the inlier pattern is sampled from a plane spanned by two vectors: $\{c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \mathbf{c} \mid c_1, c_2 \in \mathbb{R}\}$ . The two basis vectors are sampled uniformly from the $D$ -dimensional unit hypercube. We use the same training procedure for our network and the baselines, and report the results in Tab. 2. + +We found that the convolutional network is more robust to noise in high-dimensional spaces than the PointNet variants. In addition, the convolutional network training converges quickly, as shown in Fig. 3, which is a further indication that the architecture can effectively leverage the struc + +ture of the data. + +# 4.2.3D Registration + +A typical 3D registration pipeline consists of 1) feature extraction, 2) feature matching, 3) match filtering, and 4) global registration. In this section, we show that in the match filtering stage the correct (inlier) correspondences form a 6-dimensional geometric structure. We then extend our geometric pattern recognition networks to identify inlier correspondences in this 6-dimensional space. + +Let $\mathcal{X}$ be a set of points sampled from a 3D surface, $\mathcal{X} = \{\mathbf{x}_i\mid \mathbf{x}_i\in \mathbb{R}^3\}_{i = 1}^N$ , and let $\mathcal{X}'$ be a subset of $\mathcal{X}$ that went through a rigid transformation $T$ $\mathcal{X}' = \{T(\mathbf{x})\mid \mathbf{x}\in$ $S,S\subseteq \mathcal{X}\}$ . For example, $\mathcal{X}'$ could be a 3D scan from a different perspective that has an overlap with $\mathcal{X}$ . We denote a correspondence between points $\mathbf{x}_i\in \mathcal{X}$ and $\mathbf{x}_j^\prime \in \mathcal{X}^\prime$ as $\mathbf{x}_i\leftrightarrow \mathbf{x}_j^\prime$ . When we form an ordered pair $(\mathbf{x}_i,\mathbf{x}_j')\in \mathbb{R}^6$ , the ground truth correspondences satisfy $T(\mathbf{x}) = \mathbf{x}^{\prime}$ along the + +![](images/80a05419f67dffaf7c077fcf76016e0766768862d8d2ed284e3fd502dd683a8f.jpg) +Figure 3: 16D line detection, progression of training. We plot the running mean and standard deviation of precision, recall, and F1 score on the validation set. Our high-dimensional convolutional network quickly attains much higher accuracy than the baselines. + +![](images/8b1bd71e1f8f3d7331aaa33c15773b66bb7f8a4afc4b569b592c3057c60f49d9.jpg) + +![](images/6695f7431ab5c3173d068184b6ac673c806aae3fc6648d17ee84dd92e8457278.jpg) + +![](images/6ba66f66247d146e4fec68658b57d586965e6d6f4b3c1bca943a92c234429932.jpg) +Figure 4: The set $\mathcal{Y}$ is rigid translation of the set $\mathcal{X} = [1, \dots, 7]$ , $\mathcal{Y} = \{x + 4 | x \in \mathcal{X}\}$ . The ordered pairs of correspondences (blue) form a line segment while outliers (red) form random noise outside the line. + +common 3D geometry $\mathcal{S}$ whereas an incorrect correspondence implies $T(\mathbf{x})\neq \mathbf{x}^{\prime}$ . For example, in Fig. 4, we visualize the ordered pairs from 1-dimensional sets. Note that the inliers follow the geometry of the inputs and form a line segment. Similarly, the geometry $(\mathbf{x},\mathbf{x}^{\prime})\in \mathbb{R}^{6}$ or $(\mathbf{x},T(\mathbf{x}))$ for $\mathbf{x}\in S$ forms a surface in 6-dimensional space. + +We can thus use our high-dimensional convolutional network construction to segment the 6-dimensional set of correspondences into inliers and outliers by estimating the inlier likelihood for each correspondence. + +Network. We use a 6-dimensional instantiation of the U-shaped convolutional network presented in Sec. 3. As the dimensionality is manageable, we use hypercubic kernels. The network takes an order-6 sparse tensor whose coordinates are correspondences $(\mathbf{x}_i,\mathbf{x}_j^{\prime})\in \mathbb{R}^{6}$ . We discretize the coordinates with the voxel size used to extract features. Our baseline is Yi et al. [46], which takes dimensionless mean-centered correspondences without discretization. We train the networks to predict the inlier probability of each correspondence with the balanced cross-entropy loss. + +Dataset. We use the 3DMatch dataset for this experiment [48]. The 3DMatch dataset is a composition of various 3D scan datasets [15, 43, 48] and thus covers a wide range of scenes and different types of 3D cameras. We integrate RGB-D images to form fragments of the scenes + +following [48]. During training, we randomly rotate each scene on the fly to augment the dataset. We use a popular hand-designed feature descriptor, FPFH [37], to compute correspondences. Note, however, that our pipeline is agnostic to the choice of feature and can also be used with learned features [8]. + +We follow the standard procedures in the 3D registration literature to generate candidate correspondences. First, since 3D scans often exhibit irregular densities, we resample the input point clouds using a voxel grid to produce a regular point cloud. We use voxel sizes of $2.5\mathrm{cm}$ and $5\mathrm{cm}$ for our experiments. Next, we compute FPFH features and find the nearest neighbor for each point in feature space to form correspondences. The correspondences obtained from this procedure often exhibit a very low inlier ratio, as little as $0.87\%$ with a $2.5\mathrm{cm}$ voxel size. Among these correspondences, we regard $\mathbf{x} \leftrightarrow \mathbf{x}'$ as an inlier if it satisfies $\| \mathbf{T}(\mathbf{x}) - \mathbf{x}' \|_2 < \tau$ and all others as outliers. We set $\tau$ to be two times the voxel size. + +Finally, we use a registration method to convert the filtered correspondences into a final registration result. We show results with two different registration methods. The first is Fast Global Registration [51], which directly minimizes a robust error metric. The second is a variant of RANSAC [13] that is specialized to 3D registration [52]. + +Evaluation. We use three standard metrics to evaluate registration performance: rotation error, translation error, and success rate. The rotation error measures the absolute angular deviation from the ground truth rotation $\hat{\mathbf{R}}$ , $\arccos \frac{\mathrm{Tr}(\hat{\mathbf{R}}^T\mathbf{R}) - 1}{2}$ . Similarly, the translation error measures the deviation of the translation $\| \hat{\mathbf{t}} - \mathbf{t}\|_2$ . When we report these metrics, we exclude alignments that exceed a threshold following [8] since the results of the registration methods [51, 13] can be arbitrarily bad when registration fails. Finally, the success rate is the ratio of registrations that were successful; registration is considered successful if both rotation and translation errors are within the respective thresholds. For all experiments, we use a rotation error of 15 degrees and a translation error of $30\mathrm{cm}$ as the thresholds. + +Table 3: Pairwise registration on 3DMatch test scenes with ${2.5}\mathrm{\;{cm}}$ downsampling. Translation Error (TE),Rotation Error (RE),success rate. Registration is considered successful if $\mathrm{{TE}} < {30}\mathrm{\;{cm}}$ and $\mathrm{{RE}} < {15}^{ \circ }$ . + +
Inlier RatioFPFH + FGRFPFH + Ours + FGRFPFH + RANSACFPFH + Ours + RANSAC
TERESucc. RateTERESucc. RateTERESucc. RateTERESucc. Rate
Kitchen1.62%10.984.9937.155.682.2165.616.252.1744.475.901.9869.57
Home 12.71%11.124.4045.516.522.0880.777.072.1961.546.001.8780.13
Home 22.83%9.613.8336.547.132.5664.426.472.4050.007.862.5669.71
Hotel 11.35%12.315.0933.197.952.6576.117.482.7548.677.382.3880.09
Hotel 21.54%12.275.2225.007.862.5669.239.543.1847.126.402.2570.19
Hotel 31.59%13.527.0427.785.391.9972.225.912.4659.265.852.3681.48
Study0.87%16.106.0116.789.612.6453.4210.053.0130.488.512.2356.16
Lab1.59%10.484.8042.867.692.4461.048.012.3145.456.642.1268.83
Average12.055.1733.107.232.3967.857.602.5648.376.822.2272.02
+ +![](images/b95b6406b7654494ee692b8e00ec7f4bd008da4616d6ae4c5e3ba687e0500c3e.jpg) +Figure 5: The success rate of baseline methods and ours on the 3DMatch benchmark [48] with 5cm voxel size. FGR denotes registration with FPFH [37] and Zhou et al. [51], Yi et al. $+X$ denotes FPFH filtering with Yi et al. [46] and registration with X, and Ours $+X$ denotes our method for filtering followed by registration with X. + +Tab. 3 shows the 3D registration pipelines with and without our network to filter the outliers. Note that for FGR [51], we observe a considerable improvement with our network since FGR assumes more accurate correspondences as inputs. The improvement is smaller with RANSAC, since it is more robust to high outlier rates. Although the inlier ratio is as low as $1\%$ for many 3D scene pairs, our network generates very accurate predictions. Similar to the linear regression experiments in Fig. 3, we find that the network converges very quickly. We compare to the model of Yi et al. [46] in Fig. 5 with $5\mathrm{cm}$ voxel size to study the robustness of the 6-dimensional convolutional network to voxel size and find that the convolutional network improves the registration success rate significantly even for the higher inlier ratio seen with a $5\mathrm{cm}$ discretization resolution. Qualitatively, our network accurately filters out outliers even in the presence of extreme noise (Fig. 6). + +# 4.3. Filtering Image Correspondences + +In this section, we apply the high-dimensional convolutional network to image correspondence inlier detection. In the projective space $\mathbb{P}^2$ , an inlier correspondence $\mathbf{u}\leftrightarrow \mathbf{u}'$ must satisfy $\mathbf{u}'^\top \mathbf{E}\mathbf{u} = 0$ , where $\mathbf{E}$ is an essential matrix, $\mathbf{u}$ denotes a normalized homogeneous coordinate $\mathbf{u} = \mathbf{K}^{-1}\mathbf{x}$ , $\mathbf{x}$ is the corresponding homogeneous image coordinate, and $\mathbf{K}$ is the camera intrinsic matrix. When we expand + +$\mathbf{u}^{\prime \top}\mathbf{E}\mathbf{u} = 0$ , we get $u^{\prime 1}Au^{1} + u^{\prime 2}Bu^{1} + u^{\prime 1}Cu^{2} + u^{\prime 2}Du^{2} + Eu^{\prime 1} + Fu^{\prime 2} + Gu^{1} + Hu^{2} + I = 0$ , which is a quadri-variate quadratic function. If there is a real-valued solution, there are infinitely many solutions that form either an ellipse (sphere), a parabola, or a hyperbola. These are known as conic sections. Thus a set of ground-truth image correspondences will form a hyper conic section in 4-dimensional space. We use a convolutional network to predict the likelihood that a correspondence is an inlier. + +Dataset: YFCC100M. We use the large-scale phototourism dataset YFCC100M [40] for the experiment. The dataset contains 100M Flicker images of tourist hot-spots with metadata, which is curated into 72 locations with camera extrinsics estimated using SfM [17]. We follow Zhang et al. [49] to generate a dataset and use 68 locations for training and the others for testing. We filtered any image pairs that have fewer than 100 overlapping 3D points from SfM to guarantee non-zero overlap between images. + +We use SIFT features [25] to create correspondences and label a correspondence to be a ground-truth inlier if the symmetric epipolar distance of the correspondence is below a certain threshold using the provided camera parameters, i.e., + +$$ +\left(\frac {r ^ {2}}{l _ {1} ^ {2} + l _ {2} ^ {2}} + \frac {r ^ {2}}{l _ {1} ^ {\prime 2} + l _ {2} ^ {\prime 2}}\right) < \tau , \tag {3} +$$ + +![](images/c4386db2eb3a4f148eca285999eae822998605419e10bc057b7430add12518ae.jpg) + +![](images/2661b59fbf523d10ddec1dd2d7cfa327a77b52ae49521e1fe15a2fb57699310a.jpg) + +![](images/49171cd2318fe752edb41bf6274072f76cf128f150bc64e78578609beb90c5fb.jpg) +Bedroom + +![](images/7c308f432c60075226f8da2ea2dd5f7c6a8b0207632aa0568448ade57b783286.jpg) + +![](images/3261ea1664b4792d482913815a87e77ae4f0ca6395a10bf7c9c01ec754cdb4db.jpg) +Kitchen + +![](images/31861b204219bb5c2f3f9a4d327899006387948b6896819c2944bdbf59dd8a4e.jpg) +Livingroom + +![](images/dc8166cb87868ec91b0cc4d1b35d0501cae51e71f39eca96317318b94af038cc.jpg) +Figure 6: Visualization of color-coded correspondences before and after outlier filtering (Sec. 4.2). For each pair, we visualize 100 random correspondences from the candidate set on the left and 100 random correspondences after outlier pruning on the right. Red lines are outlier correspondences and blue lines are inlier correspondences. On the bottom right pair, there are two identical chairs. The average inlier ratio is $1.76\%$ . + +![](images/40040dcdf25ec8e8b32e7926eebc0ca27bd247a2e13de7a79c902e351b42dca9.jpg) +Study + +where $l = \mathbf{u}'^\top \mathbf{E} = (l_1, l_2, l_3)$ is a homogeneous line, $l' = \mathbf{E}\mathbf{u}$ , and $r = \mathbf{u}'^\top \mathbf{E}\mathbf{u}$ . + +Network. We convert a set of candidate image correspondences into an order-5 sparse tensor with four spatial dimensions and vectorized features. The coordinates are defined as normalized image coordinates $\mathbf{u}$ . We define integer coordinates by discretizing the normalized image coordinates with quantization resolution 0.01 and additionally use the normalized coordinates as features. We use state-of-the-art baselines on the YFCC dataset and two variants of convolutional networks for this task. The first variant is a U-shaped convolutional network (Ours); the second network is a ResNet-like network with spatial correlation modules $(\mathrm{Ours} + \mathrm{SC})$ . Spatial correlation modules [49] are blocks of shared MLPs that encode global context from a set of correspondences. We use the balanced cross-entropy loss [46] for all experiments. + +Evaluation. We use precision, recall, and F1 score to evaluate correspondence classification accuracy. We use $\tau = 10^{-4}$ for the distance threshold to define ground truth-correspondences. Our network predicts a correspondence to be accurate if its inlier probability prediction is above + +0.5. We provide quantitative results in Tab. 4 and qualitative results in Fig. 7. Our approach (with the spatial correlation modules) outperforms the PointNet variants [46, 49] as measured by the F1 score, but not by a large margin. We attribute this to the sparse nature of SIFT keypoints. Unlike FPFH, where we densely sample keypoints, correspondences are only defined on sparse keypoints. Such sparsity leads to fewer neighbors in the high-dimensional space, which can result in the degeneration of the convolution to a multi-layer perceptron. Our convolutional networks remain effective in this setting, but their distinctive ability to leverage local geometric structure is not strongly utilized. + +# 5. Conclusion + +Many interesting problems in computer vision involve geometric patterns in high-dimensional spaces. We proposed high-dimensional convolutional networks for geometric pattern recognition. We presented a fullyconvolutional network architecture that is efficient and able to find patterns in high-dimensional data even in the presence of severe noise. We validated the efficacy of our approach on tasks such as line and plane detection, 3D regis + +Table 4: Classification scores on the YFCC100M test set. We consider a correspondence a true positive if the symmetric epipolar distance is below $10^{-4}$ and the prediction confidence is above 0.5. + +
Yi et al. [46]Zhang et al. [49]OursOurs + SC
Prec.RecallF1Prec.RecallF1Prec.RecallF1Prec.RecallF1
BUCKINGHAM0.4970.7720.6050.4860.8890.6290.5350.8220.6480.6110.8350.705
NOTRE DAME0.5810.8940.7050.6290.9510.7570.6470.9150.7580.7210.9290.812
REICHTAG0.7470.8770.8070.7340.9170.8150.6950.9110.7890.7690.8970.827
SACRE COEUR0.6580.8710.7500.6620.9480.7800.6320.9170.7480.7180.9320.811
Average0.6210.8540.7170.6280.9260.7450.6280.8910.7360.7040.8980.789
+ +![](images/acb261f9f108e9fd02547ea20d54f807b9f45557122bf4576abcf4999e48e005.jpg) +BUCKINGHAM + +![](images/1c7bb8a9ba433c869a600473e536c89d29c93cce69e93b9a90bf5cf8c6263705.jpg) + +![](images/12817a5da9d072e9f1016a0b2ba5ca4ea6a41cbea63d49ab2cf6506bafa7bd16.jpg) +NOTRE DAME + +![](images/7a82b50cf2226422563cf663e4dae9499e45a41b6f9a17efd3eb17264413619f.jpg) + +![](images/ef28be9102747ec933c1cc74521019c2e5a5737438cd9bb3917e59ad98a27db3.jpg) +SACRE COEUR + +![](images/45115621759bac459f6d03a036b9a3555602680c7c33fcea5815a8ff968279f7.jpg) + +![](images/d8cf4dfa68b7ac26937c4f1797011abe65f69a4945de16d88b9b97cdb45c83f6.jpg) + +![](images/d7b495eb9506fbe9dda9353ece2afc7b5695919051443f4229c43ad8a431af12.jpg) + +![](images/f155db234ffe729691fbf9faddc2a4927cd4d0143b06b0351b6bbd093d12a09d.jpg) + +![](images/60aaee475fe22f9459e4eee16de9379b8d7c0834dc6cb8d67a3f50b20bc95637.jpg) + +![](images/777ed87de6c1b4556b20e494c5919b1683165fd846cea56d96ca48cda9f69692.jpg) + +![](images/ba6e0f3643d1a97f7093712af2c7d341fe8886fa0d9fdd92f26cb5f2a9cf9ec5.jpg) + +![](images/3d2e587ec058bbe8b6aa73d4a9a5c759553fd196c2733fe4213294af51b65bea.jpg) + +![](images/f97cde4e4e815a2505bfc2f68fed7662c5ae863c6ddd15c6891ebd7ce73bae6a.jpg) + +![](images/5a64c42cda0d4a105542b083c52c27bb08f572a3a1b0e732e79ed7afe65785f6.jpg) +Figure 7: Matching results using Yi et al. [46] (first row), Zhang et al. [49] (second row), and Ours + SC (last row). We visualize correspondences with inlier probability above 0.5. We color a correspondence green if it is a true positive (symmetric epipolar distance smaller than $10^{-4}$ ) and red otherwise. + +![](images/a525da61d1ce7724bd78f3e84545902e348ebb8e6e9c3b83d371262ad4369260.jpg) + +![](images/64d72f731ca2112d10dc740a77e2a24fc9cdd038c3e6db68361e97dd3f0aae09.jpg) + +![](images/663e266912e2489dc9807b0e21934a488744a6ceb103c2f0a2a70faf3c4fe7fc.jpg) + +![](images/69be5aa601e4855618bd0482e767abf899697cb75e5023a0370ef1ad27d3ff87.jpg) + +![](images/af1523f55febc950415771eedcd6131f69d4d77a794f1ce2e5d837e1e544d73b.jpg) + +![](images/e8529b0658e3a0b7cb09e52609f7af31c5eba4979841bd746d4edd86934c99bd.jpg) + +tration, and geometric filtering of image correspondences. We will further analyze network architectures, hyperparameters, and conditions in which high-dimensional convolutional networks succeed in future work. + +# Acknowledgements + +This work was partially supported by a National Research Foundation of Korea (NRF) grant and funded by the Korean government (MSIT) (No. 2020R1C1C1015260). + +# References + +[1] Martin Ankerl. Robin hood hashing. https://github.com/martinus/robin-hood hashing, 2019.3 +[2] Yasuhiro Aoki, Hunter Goforth, Rangaprasad Arun Srivatsan, and Simon Lucey. PointNetLK: Robust & efficient point cloud registration using pointnet. In CVPR, 2019. 2 +[3] Eric Brachmann, Alexander Krull, Sebastian Nowozin, Jamie Shotton, Frank Michel, Stefan Gumhold, and Carsten Rother. DSAC - differentiable RANSAC for camera localization. In CVPR, 2017. 1, 2 +[4] Eric Brachmann and Carsten Rother. Neural-guided RANSAC: Learning where to sample model hypotheses. In ICCV, 2019. 2 +[5] Tat-Jun Chin, Pulak Purkait, Anders P. Eriksson, and David Suter. Efficient globally optimal consensus maximisation with tree search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. 2 +[6] Sungjoon Choi, Qian-Yi Zhou, and Vladlen Koltun. Robust reconstruction of indoor scenes. In CVPR, 2015. 1, 2 +[7] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4D spatio-temporal ConvNets: Minkowski convolutional neural networks. In CVPR, 2019. 2, 3 +[8] Christopher Choy, Jaesik Park, and Vladlen Koltun. Fully convolutional geometric features. In ICCV, 2019. 2, 5 +[9] Ondrej Chum and Jiri Matas. Matching with prosacprogressive sample consensus. In CVPR, 2005. 1, 2 +[10] Angela Dai, Matthias Nießner, Michael Zolloffer, Shahram Izadi, and Christian Theobalt. BundleFusion: Real-time globally consistent 3d reconstruction using on-the-fly surface re-integration. ACM Transactions on Graphics, 2017. 2 +[11] Zheng Dang, Kwang Moo Yi, Yinlin Hu, Fei Wang, Pascal Fua, and Mathieu Salzmann. Eigendecomposition-free training of deep networks with zero eigenvalue-based losses. In ECCV, 2018. 2 +[12] Wei Dong, Jaesik Park, Yi Yang, and Michael Kaess. GPU accelerated robust scene reconstruction. In IROS, 2019. 2 +[13] Martin A. Fischler and Robert C. Bolles. Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 1981. 2, 5 +[14] Andrew W. Fitzgibbon. Robust registration of 2D and 3D point sets. Image and Vision Computing, 2003. 1, 2 +[15] Ben Glocker, Shahram Izadi, Jamie Shotton, and Antonio Criminisi. Real-time RGB-D camera relocalization. In IS-MAR, 2013. 5 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 1, 2 +[17] Jared Heinly, Johannes L Schonberger, Enrique Dunn, and Jan-Michael Frahm. Reconstructing the world in six days. In CVPR, 2015. 6 +[18] M. B. Horowitz, N. Matni, and J. W. Burdick. Convex relaxations of SE(2) and SE(3) for visual pose estimation. In ICRA, 2014. 2 +[19] Reza Hoseinnezhad and Alireza Bab-Hadiashar. An estimator for high breakdown robust estimation in computer + +vision. Computer Vision and Image Understanding, 2011. 1, 2 +[20] Peter J Huber. Robust statistics. Springer, 2011. 1, 2 +[21] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 1 +[22] Gregory Izatt and Russ Tedrake. Globally optimal object pose estimation in point clouds with mixed-integer programming. In International Symposium on Robotics Research, 2017. 2 +[23] Karel Lebeda, Jiri Matas, and Ondrej Chum. Fixing the locally optimized RANSAC-full experimental evaluation. In British Machine Vision Conference, 2012. 2 +[24] Hongdong Li. Consensus set maximization with guaranteed global optimality for robust geometry estimation. In ICCV, 2009. 2 +[25] David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 2004. 6 +[26] Haggai Maron, Nadav Dym, Itay Kezurer, Shahar Kovalsky, and Yaron Lipman. Point registration via efficient convex relaxation. ACM Transactions on Graphics, 2016. 2 +[27] OpenMP Architecture Review Board. OpenMP application program interface version 3.0, May 2008. 3 +[28] G. Dias Pais, Pedro Miraldo, Srikumar Ramalingam, Venu Madhav Govindu, Jacinto C. Nascimento, and Rama Chellappa. 3DRegNet: A deep neural network for 3D point registration. arXiv, 2019. 2 +[29] Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Colored point cloud registration revisited. In ICCV, 2017. 2 +[30] Thomas Probst, Danda Pani Paudel, Ajad Chhatkuli, and Luc Van Gool. Unsupervised learning of consensus maximization for 3D vision problems. In CVPR, 2019. 2 +[31] 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. 1, 2, 3, 4 +[32] Rahul Raguram, Ondrej Chum, Marc Pollefeys, Jiri Matas, and Jan-Michael Frahm. USAC: A universal framework for random sample consensus. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013. 1, 2 +[33] René Ranftl and Vladlen Koltun. Deep fundamental matrix estimation. In ECCV, 2018. 1, 2 +[34] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. 1, 2 +[35] David M Rosen, Luca Carlone, Afonso S Bandeira, and John J Leonard. Se-sync: A certifiably correct algorithm for synchronization over the special euclidean group. International Journal of Robotics Research, 2019. 2 +[36] Peter J. Rousseeuw. Least median of squares regression. Journal of the American Statistical Association, 1984. 1, 2 +[37] Radu Bogdan Rusu, Nico Blodow, and Michael Beetz. Fast point feature histograms (FPFH) for 3d registration. In ICRA, 2009. 1, 5, 6 +[38] Schonberger, Johannes Lutz, and Jan-Michael Frahm. Structure-from-motion revisited. In CVPR, 2016. 1 + +[39] Ruwan B. Tennakoon, Alireza Bab-Hadiashar, Zhenwei Cao, Reza Hoseinnezhad, and David Suter. Robust model fitting using higher than minimal subset sampling. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2016. 1, 2 +[40] Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100M: The new data in multimedia research. Communications of the ACM, 2016. 6 +[41] Philip HS Torr and Andrew Zisserman. MLESAC: A new robust estimator with application to estimating image geometry. Computer Vision and Image Understanding, 2000. 2 +[42] Philip H. S. Torr. Bayesian model estimation and selection for epipolar geometry and generic manifold fitting. International Journal of Computer Vision, 2002. 2 +[43] Jianxiong Xiao, Andrew Owens, and Antonio Torralba. Sun3D: A database of big spaces reconstructed using sfm and object labels. In ICCV, 2013. 5 +[44] Jiaolong Yang, Hongdong Li, and Yunde Jia. Go-ICP: Solving 3D registration efficiently and globally optimally. In ICCV, 2013. 2 +[45] Jiaolong Yang, Hongdong Li, and Yunde Jia. Optimal essential matrix estimation via inlier-set maximization. In ECCV, 2014. 2 + +[46] Kwang Moo Yi, Eduard Trulls, Yuki Ono, Vincent Lepetit, Mathieu Salzmann, and Pascal Fua. Learning to find good correspondences. In CVPR, 2018. 1, 2, 3, 4, 5, 6, 7, 8 +[47] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Ruslan R Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in Neural Information Processing Systems. 2017. 1, 2, 3, 4 +[48] 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, 2017. 5, 6 +[49] Jiahui Zhang, Dawei Sun, Zixin Luo, Anbang Yao, Lei Zhou, Tianwei Shen, Yurong Chen, Long Quan, and Honggen Liao. Learning two-view correspondences and geometry using order-aware network. In ICCV, 2019. 1, 2, 6, 7, 8 +[50] Zhengyou Zhang. Determining the epipolar geometry and its uncertainty: A review. International Journal of Computer Vision, 1998. 2 +[51] Qian-Yi Zhou, Jaesik Park, and Vladlen Koltun. Fast global registration. In ECCV, 2016. 1, 2, 5, 6 +[52] Qian-Yi Zhou, Jaesik Park, and Vladlen Koltun. Open3D: A modern library for 3D data processing. arXiv, 2018. 1, 5 \ No newline at end of file diff --git a/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/images.zip b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..29d82a9701f29f37beb040da093755b9043b50ac --- /dev/null +++ b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a3a2227f42547a72e89a0a7e9b4ebc80496ef4a08c6cf71172714d5dad40679 +size 876020 diff --git a/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/layout.json b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..828515520d2e044fb7fa053d0449c50d2da692e0 --- /dev/null +++ b/highdimensionalconvolutionalnetworksforgeometricpatternrecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cff91a440301bbea2a17233e36d02b8bc6995ef8fbcdd7703006f9f2809b226 +size 435345 diff --git a/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_content_list.json b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cafdea684f72ef1e5444d6bf9863f8e8ac5ba8dc --- /dev/null +++ b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4255b785e0200b56783bd8f69361acf3c9bbfc2f38e7e8b128321b0a08b2c906 +size 73809 diff --git a/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_model.json b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b988af87a34877a1f7a459a57a339444bb2b37d9 --- /dev/null +++ b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a44d0f9ecf1bada92424f78aa0591bb5e0accc8cede6fe71d4728c65c85c71d7 +size 90563 diff --git a/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_origin.pdf b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b4ca2b623ff83b868f9c7284c513b636c082db2d --- /dev/null +++ b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/b5d2c6d7-f63d-4600-95b5-4bbb9c69563a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85e4f458f8dd6b3f93b2d770f0110749d80ced2e7b0c5c50b825086c4b9a4091 +size 773264 diff --git a/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/full.md b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..086fbeb896d4e8887c6816557a03d59016cc398b --- /dev/null +++ b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/full.md @@ -0,0 +1,269 @@ +# HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation + +Bowen Cheng $^{1}$ , Bin Xiao $^{2}$ , Jingdong Wang $^{2}$ , Honghui Shi $^{1,3}$ , Thomas S. Huang $^{1}$ , Lei Zhang $^{2}$ + +$^{1}$ UIUC, $^{2}$ Microsoft, $^{3}$ University of Oregon + +# Abstract + +Bottom-up human pose estimation methods have difficulties in predicting the correct pose for small persons due to challenges in scale variation. In this paper, we present HigherHRNet: a novel bottom-up human pose estimation method for learning scale-aware representations using high-resolution feature pyramids. Equipped with multi-resolution supervision for training and multi-resolution aggregation for inference, the proposed approach is able to solve the scale variation challenge in bottom-up multi-person pose estimation and localize keypoints more precisely, especially for small person. The feature pyramid in HigherHRNet consists of feature map outputs from HRNet and upsampled higher-resolution outputs through a transposed convolution. HigherHRNet outperforms the previous best bottom-up method by $2.5\%$ AP for medium person on COCO test-dev, showing its effectiveness in handling scale variation. Furthermore, HigherHRNet achieves new state-of-the-art result on COCO test-dev $(70.5\%)$ AP without using refinement or other post-processing techniques, surpassing all existing bottom-up methods. HigherHRNet even surpasses all top-down methods on CrowdPose test $(67.6\%)$ AP, suggesting its robustness in crowded scene. The code and models are available at https://github.com/HRNet/Higher-HRNet-Human-Pose-Estimation. + +# 1. Introduction + +2D human pose estimation aims at localizing human anatomical keypoints (e.g., elbow, wrist, etc.) or parts. As a fundamental technique to human behavior understanding, it has received increasing attention in recent years. + +Current human pose estimation methods can be categorized into top-down methods and bottom-up methods. Top-down methods [34, 9, 16, 42, 38, 40, 39, 16] take a dependency on person detector to detect person instances each with a bounding box and then reduce the problem to a sim + +![](images/e0b628fd46ff431b5712b84b6eb66e787b5302394be79a7f7f8905166499720b.jpg) +(a) Image pyramid. + +![](images/12904069181f47ab6e8c686db53bad0541604fd22f241787ca0dda0db5c4b5e2.jpg) +(b) Upsampling input. + +![](images/cee4e5ce0640a107e2b82fb4c5da9b7111f5cda717ce596dcebb39befce1554f.jpg) +(c) Our approach. +Figure 1. (a) Using image pyramid for heatmap prediction [33, 30]. (a) Generating higher resolution and spatially more accurate heatmaps by upsampling image. Recent work PersonLab [33] relies on enlarging input image size to generate high quality feature maps. (c) Our HigherHRNet uses high resolution feature pyramid. + +pler task of single person pose estimation. As top-down methods can normalize all the persons to approximately the same scale by cropping and resizing the detected person bounding boxes, they are generally less sensitive to the scale variance of persons. Thus, state-of-the-art performances on various multi-person human pose estimation benchmarks are mostly achieved by top-down methods. However, as such methods rely on a separate person detector and need to estimate pose for every person individually, they are normally computationally intensive and not truly end-to-end systems. By contrast, bottom-up methods [3, 30, 33, 22] start by localizing identity-free keypoints for all the persons in an input image through predicting heatmaps of different anatomical keypoints, followed by grouping them into person instances. This strategy effectively makes bottom-up methods faster and more capable of achieving real-time pose estimation. However, because bottom-up methods need to deal with scale variation, there still exists a large gap between the performances of bottom-up and top-down + +methods, especially for small scale persons. + +There are mainly two challenges in predicting keypoints of small persons. One is dealing with scale variation, i.e. to improve the performance of small person without sacrificing the performance of large persons. The other is generating a high-resolution heatmap with high quality for precise localizing keypoints of small persons. Previous bottom-up methods [3, 30, 33, 22] mainly focus on grouping keypoints and simply use a single resolution of feature map that is $1/4$ of the input image resolution to predict the heatmap of keypoints. These methods neglect the challenge of scale variation and rely on image pyramid during inference (Figure 1 (a)). Feature pyramids are basic components for handling scale variation, however, smaller resolution feature maps in a top-down feature pyramid usually suffer from the second challenge. PersonLab [33] generates high-resolution heatmaps by increasing the input resolution (Figure 1 (b)). Although the performance of small persons increases consistently as input resolution, the performance of large persons begin decreasing when input resolution is too large. To solve these challenges, it is crucial to generate spatially more accurate and scale-aware heatmaps for bottom-up keypoints prediction in a natural and simple way without sacrificing computational cost. + +In this paper, we propose a Scale-Aware High-Resolution Network (HigherHRNet) to address these challenges. HigherHRNet generates high-resolution heatmaps by a new high-resolution feature pyramid module. Unlike the traditional feature pyramid that starts from 1/32 resolution and uses bilinear upsampling with lateral connection to gradually increases feature map resolution to 1/4, high-resolution feature pyramid directly starts from 1/4 resolution which is the highest resolution feature in the backbone and generates even higher-resolution feature maps with deconvolution (Figure 1 (c)). We build the high-resolution feature pyramid on the 1/4 resolution path of HRNet [38, 40], to make it efficient. To make HigherHRNet capable of handling scale variation, we further propose a Multi-Resolution Supervision strategy to assign training target of different resolutions to the corresponding feature pyramid level. Finally, we introduce a simple Multi-Resolution Heatmap Aggregation strategy during inference to generate scale-aware high-resolution heatmaps. + +We validate our method on the challenging COCO keypoint detection dataset [27] and demonstrate superior keypoint detection performance. Specifically, HigherHRNet achieves AP of $70.5\%$ on COCO2017 test-dev without any post processing, outperforming all existing bottom-up methods by a large margin. Furthermore, we observe that most of the gain comes from medium person (there is no small person annotation for the keypoint detection task), HigherHRNet outperforms the previous best bottom-up method by $2.5\%$ AP for medium persons without sacrafi- + +ing the performance of large persons $(+0.3\%)$ AP). This observation verifies HigherHRNet is indeed solving the scale variation challenge. We also provide a solid baseline for bottom-up methods on the new CrowdPose [24] dataset. Our HigherHRNet achieves AP of $67.6\%$ on CrowdPose test, surpassing all existing methods. This result suggests bottom-up methods naturally have the advantages in the crowded scene. + +To summarize our contributions: + +- We attempt to address the scale variation challenge, which is rarely studied before in bottom-up multiperson pose estimation. +- We propose a HigherHRNet that generates high-resolution feature pyramid with multi-resolution supervision in the training stage and multi-resolution heatmap aggregation in the inference stage to predict scale-aware high-resolution heatmaps that are beneficial for small persons. +- We demonstrate the effectiveness of our HigherHRNet on the challenging COCO dataset. Our model outperforms all other bottom-up methods. We especially observe a large gain for medium persons. +- We achieve a new state-of-the-art result on the CrowdPose dataset, suggesting bottom-up methods are more robust to the crowded scene over top-down methods. + +# 2. Related works + +Top-down methods. Top-down methods [42, 38, 40, 34, 16, 18, 15, 9, 31] detect the keypoints of a single person within a person bounding box. The person bounding boxes are usually generated by an object detector [36, 26, 14, 13]. Mask R-CNN [16] directly adds a keypoint detection branch on Faster R-CNN [36] and reuses features after ROIPooling. G-RMI [34] and the following methods further break top-down methods into two steps and use separate models for person detection and pose estimation. + +Bottom-up methods. Bottom-up methods [35, 19, 20, 3, 30] detect identity-free body joints for all the persons in an image and then group them into individuals. OpenPose [3] uses a two-branch multi-stage netork with one branch for heatmap prediction and one branch for grouping. OpenPose uses a grouping method named part affinity field which learns a 2D vector field linking two keypoints. Grouping is done by calculating line integral between two keypoints and group the pair with the largest integral. Newell et al. [30] use stacked hourglass network [31] for both heatmap prediction and grouping. Grouping is done by a method named associate embedding, which assigns each keypoint with a "tag" (a vector representation) and groups keypoints based on the $l_{2}$ distance between tag vectors. PersonLab [33] uses + +dilated ResNet [17] and groups keypoints by directly learning a 2D offset field for each pair of keypoints. PifPaf [22] uses a Part Intensity Field (PIF) to localize body parts and a Part Association Field (PAF) to associate body parts with each other to form full human poses. + +Feature pyramid. Pyramidal representation has been widely adopted in recent object detection and segmentation frameworks to handle scale variation. SSD [29] and MS-CNN [2] predict objects at multiple layers of the network without merging features. Feature pyramid networks [26] extend the backbone model with a top-down pathway that gradually recovers feature resolution from 1/32 to 1/4, using bilinear upsampling and lateral connection. The motivation in common is to let features from different pyramid level to predict instances of different scales. However, this pyramidal representation is less explored in bottom-up multi-person pose estimation. In this work, we design a high-resolution feature pyramid that extend the pyramid to a different direction, starting from 1/4 resolution feature and generate pyramid of features with higher resolution. + +High resolution feature maps. There are mainly 4 methods to generate high resolution feature maps. (1) Encoder-decoder [31, 16, 9, 37, 1, 25, 41, 10] captures the context information in the encoder path and recover high resolution features in the decoder path. The decoder usually contains a sequence of bilinear upsample operations with skip connections from encoder features with the same resolution. (2) Dilated convolution [44, 5, 6, 7, 8, 4, 28, 43, 11, 12] (a.k.a. "atrous" convolution) is used to remove several stride convolutions/max poolings to preserve feature map resolution. Dilated convolution prevents losing spatial information but introduces more computational cost. (3) Deconvolution (transposed convolution) [42] is used in sequence at the end of a network to efficiently increase feature map resolution. SimpleBaseline [42] demonstrates that deconvolution can generate high quality feature maps for heatmap prediction. (4) Recently, a High-Resolution Network (HRNet) [38, 40] is proposed as an efficient way to keep a high resolution pass throughout the network. HRNet [38, 40] consists of multiple branches with different resolutions. Lower resolution branches capture contextual information and higher resolution branches preserve spatial information. With multiscale fusions between branches, HRNet [38, 40] can generate high resolution feature maps with rich semantic. + +We adopt HRNet [38, 40] as our base network to generate high-quality feature maps. And we add a deconvolution module to generate higher resolution feature maps to predict heatmaps. The resulting model is named "Scale-Aware High-Resolution Network" (HigherHRNet). As both HRNet [38, 40, 40] and deconvolution are efficient, HigherHRNet is an efficient model for generating higher resolution feature maps for heatmap prediction. + +# 3. Higher-Resolution Network + +In this section, we introduce our proposed Scale-Aware High-Resolution Representation Learning using the HigherHRNet. Figure 2 illustrates the overall architecture of our method. We will firstly give a brief overview on the proposed HigherHRNet and then describe its components in details. + +# 3.1. HigherHRNet + +HRNet. HigherHRNet uses HRNet [38, 40] (shown in Figure 2) as backbone. HRNet [38, 40] starts with a high-resolution branch in the first stage. In every following stage, a new branch is added to current branches in parallel with $\frac{1}{2}$ of the lowest resolution in current branches. As the network has more stages, it will have more parallel branches with different resolutions and resolutions from previous stages are all preserved in later stages. An example network structure, containing 3 parallel branches, is illustrated in Figure 2. + +We instantiate the backbone using a similar manner as HRNet [38, 40]. The network starts from a stem that consists of two strided $3 \times 3$ convolutions decreasing the resolution to $1/4$ . The 1st stage contains 4 residual units where each unit is formed by a bottleneck with width (number of channels) 64, followed by one $3 \times 3$ convolution reducing the width of feature maps to $C$ . The 2nd, 3rd, 4th stages contain 1, 4, and 3 multi-resolution blocks, respectively. The widths of the convolutions of the four resolutions are $C, 2C, 4C$ , and $8C$ , respectively. Each branch in the multi-resolution group convolution has 4 residual units and each unit has two $3 \times 3$ convolutions in each resolution. We experiment with two networks with different capacity by setting $C$ to 32 and 48 respectively. + +HRNet [38, 40] was originally designed for top-down pose estimation. In this work, we adopt HRNet [38, 40] to a bottom-up method by adding a $1 \times 1$ convolution to predict heatmaps and tagmaps similar to [30]. We only use the highest resolution ( $\frac{1}{4}$ of the input image) feature maps for prediction. Following [30], we use a scalar tag for each keypoint. + +HigherHRNet. Resolution of the heatmap is important for predicting keypoints for small persons. Most existing human pose estimation methods predict Gaussian-smoothed heatmaps by preparing the ground truth headmaps with an unnormalized Gaussian kernel applied to each keypoint location. Adding this Gaussian kernel helps training networks as CNNs tend to output spatially smooth responses as a nature of convolution operations. However, applying a Gaussian kernel also introduces confusion in precise localization of keypoints, especially for keypoints belonging to small persons. A trivial solution to reduce this confusion is to reduce the standard deviation of the Gaus- + +![](images/f6ac6f0d0569b880f64df9c466f990cc2382f274f28b74e2a14ad8353b19a167.jpg) +Figure 2. An illustration of HigherHRNet. The network uses HRNet [38, 40] as backbone, followed by one or more deconvolution modules to generate multi-resolution and high-resolution heatmaps. Multi-resolution supervision is used for training. More details are given in Section 3. + +sian kernel. However, we empirically find that it makes optimization harder and leads to even worse results. + +Instead of reducing standard deviation, we solve this problem by predicting heatmaps at higher resolution with standard deviation unchanged at different resolutions. Bottom-up methods usually predict heatmaps at resolution $\frac{1}{4}$ of the input image. Yet we find this resolution is not high enough for predicting accurate heatmaps. Inspired by [42], which shows that deconvolution can be used to effectively generate high quality and high resolution feature maps, we build HigherHRNet on top of the highest resolution feature maps in HRNet as shown in Figure 2 by adding a deconvolution module as discussed in Section 3.3. + +The deconvolution module takes as input both features and predicted heatmaps from HRNet and generates new feature maps that are 2 times larger in resolution than the input feature maps. A feature pyramid with two resolutions is thus generated by the deconvolution module together with the feature maps from HRNet. The deconvolution module also predicts heatmaps by adding an extra $1 \times 1$ convolution. We follow Section 3.4 to train heatmap predictors at different resolutions and use a heatmap aggregation strategy as described in (Section 3.5) for inference. + +More deconvolution modules can be added if larger resolution is desired. We find the number of deconvolution modules is dependent on the distribution of person scales of the dataset. Generally speaking, a dataset containing smaller persons requires larger resolution feature maps for predic + +tion and vice versa. In experiments, we find adding a single deconvolution module achieves the best performance on the COCO dataset. + +# 3.2. Grouping. + +Recent works [30, 23] have shown that grouping can be solved with high accuracy by a simple method using associative embedding [30]. As an evidence, experimental results in [30] show that using the ground truth detections with the predicted tags improves AP from 59.2 to 94.0 on a held-out set of 500 training images of the COCO keypoint detection dataset [27]. We follow [30] to use associative embedding for keypoint grouping. The grouping process clusters identity-free keypoints into individuals by grouping keypoints whose tags have small $l_{2}$ distance. + +# 3.3. Deconvolution Module + +We propose a simple deconvolution module for generating high quality feature maps whose resolution is two times higher than the input feature maps. Following [42], we use a $4 \times 4$ deconvolution (a.k.a. transposed convolution) followed by BatchNorm and ReLU to learn to upsample the input feature maps. Optionally, we could further add several Basic Residual Blocks [17] after deconvolution to refine the upsampled feature maps. We add 4 Residual Blocks in HigherHRNet. + +Different from [42], the input to our deconvolution module is the concatenation of the feature maps and the pre + +dicted heatmaps from either HRNet or previous deconvolution modules. And the output feature maps of each deconvolution module are also used to predict heatmaps in a multi-scale fashion. + +# 3.4. Multi-Resolution Supervision + +Unlike other bottom-up methods [30, 33, 3] that only apply supervision to the largest resolution heatmaps, we introduce a multi-resolution supervision during training to handle scale variation. We transform ground truth keypoint locations to locations on the heatmaps of all resolutions to generate ground truth heatmaps with different resolutions. Then we apply a Gaussian kernel with the same standard deviation (we use standard deviation $= 2$ by default) to all these ground truth heatmaps. We find it important not to scale standard deviation of the Gaussian kernel. This is because different resolution of feature pyramid is suitable to predict keypoints of different scales. On higher-resolution feature maps, a relatively small standard deviation (compared to the resolution of the feature map) is desired to more precisely localize keypoints of small persons. + +At each prediction scale in HigherHRNet, we calculate the mean squared error between the predicted heatmaps of that scale and its associated ground truth heatmaps. The final loss for heatmaps is the sum of mean squared errors for all resolutions. + +It is worth highlighting that we do not assign different scale of persons to different levels in the feature pyramid, due to the following reasons. First, the heuristic used for assigning training target depends on both the dataset and network architecture. It is hard to transform the heuristic for FPN [26] to HigherHRNet as both the dataset (scale distribution of person v.s. all objects) and architecture (HigherHRNet only has 2 levels of pyramid while FPN has 4) change. Second, ground truth keypoint targets interact with each other since we apply the Gaussian kernel. Thus, it is very hard to decouple keypoints by simply setting ignored regions. We believe model has the ability to automatically focus on specific scales in different levels of the feature pyramid. + +Tagmaps are trained differently from heatmaps in HigherHRNet. We only predict tagmaps at the lowest resolution, instead of using all resolutions. This is because learning tagmaps requires global reasoning and it is more suitable to predict tagmaps in lower resolution. Empirically, we also find higher resolutions do not learn to predict tagmaps well and even do not converge. Thus, we follow [30] to train the tagmaps on feature maps at $\frac{1}{4}$ resolution of input image. + +# 3.5. Heatmap Aggregation for Inference + +We propose a heatmap aggregation strategy during inference. We use bilinear interpolation to upsample all the predicted heatmaps with different resolutions to the reso + +lution of the input image and average the heatmaps from all scales for final prediction. This strategy is quite different from previous methods [3, 30, 33] which only use heatmaps from a single scale or single stage for prediction. + +The reason that we use heatmap aggregation is to enable scale-aware pose estimation. For example, the COCO Keypoint dataset [27] contains persons of large scale variance from $32^2$ pixels to more than $128^2$ pixels. Top-down methods [34, 9, 42] solve this problem by normalizing person regions approximately into a single scale. However, bottom-up methods need to be aware of scales to detect keypoints from all scales. We find heatmaps from different scales in HigherHRNet captures keypoints with different scales better. For example, keypoints for small persons missed in lower-resolution heatmap can be recovered in the higher-resolution heatmap. Thus, averaging predicted heatmaps from different resolutions makes HigherHRNet a scale-aware pose estimator. + +# 4. Experiments + +# 4.1. COCO Keypoint Detection + +Dataset. The COCO dataset [27] contains over 200,000 images and 250,000 person instances labeled with 17 keypoints. COCO is divided into train/val/test-dev sets with $57\mathrm{k}$ , $5\mathrm{k}$ and $20\mathrm{k}$ images respectively. All the experiments in this paper are trained only on the train set. We report results on the val set for ablation studies and compare with other state-of-the-art methods on the test-dev set. + +Evaluation metric. The standard evaluation metric is based on Object Keypoint Similarity (OKS): OKS = $\frac{\sum_{i}\exp(-d_{i}^{2}/2s^{2}k_{i}^{2})\delta(v_{i} > 0)}{\sum_{i}\delta(v_{i} > 0)}$ . Here $d_{i}$ is the Euclidean distance between a detected keypoint and its corresponding ground truth, $v_{i}$ is the visibility flag of the ground truth, $s$ is the object scale, and $k_{i}$ is a per-keypoint constant that controls falloff. We report standard average precision and recall scores: AP50 (AP at OKS = 0.50), AP75, AP (the mean of AP scores at OKS = 0.50, 0.55, ..., 0.90, 0.95), APM for medium objects, APL for large objects, and AR (the mean of recalls at OKS = 0.50, 0.55, ..., 0.90, 0.95). + +Training. Following [30], we use data augmentation with random rotation $([-30^{\circ}, 30^{\circ}])$ , random scale ([0.75, 1.5]), random translation $(-40, 40)$ to crop an input image patch of size $512 \times 512$ as well as random flip. As mentioned in Section 3.4, we generate two ground truth heatmaps with resolutions $128 \times 128$ and $256 \times 256$ respectively. + +We use the Adam optimizer [21]. The base learning rate is set to $1e - 3$ , and dropped to $1e - 4$ and $1e - 5$ at the 200th and 260th epochs respectively. We train the model for a total of 300 epochs. To balance the heatmap loss and the grouping loss, we set the weight to 1 and $1e - 3$ respectively for the two losses. + +
MethodBackboneInput size#ParamsGFLOPsAP\( AP^{50} \)\( AP^{75} \)\( AP^M \)\( AP^L \)
w/o multi-scale test
OpenPose [3]†----61.884.967.557.168.2
Hourglass [30]Hourglass512277.8M206.956.681.861.849.867.0
PersonLab [33]ResNet-152140168.7M405.566.588.072.662.472.3
PifPaf [22]----66.7--62.472.9
Bottom-up HRNet‡HRNet-W3251228.5M38.964.186.370.457.473.9
HigherHRNet (Ours)HRNet-W3251228.6M47.966.487.572.861.274.2
HigherHRNet (Ours)HRNet-W4864063.8M154.368.488.275.164.474.2
w/ multi-scale test
Hourglass [30]Hourglass512277.8M206.963.085.768.958.070.4
Hourglass [30]†Hourglass512277.8M206.965.586.872.360.672.6
PersonLab [33]ResNet-152140168.7M405.568.789.075.464.175.5
HigherHRNet (Ours)HRNet-W4864063.8M154.370.589.377.266.675.8
+ +Indicates using refinement. +‡ Our implementation, not reported in [38, 40]. +Table 1. Comparisons with bottom-up methods on the COCO2017 test-dev set. All GFLOPs are calculated at single-scale. For PersonLab [33], we only calculate its backbone's #Params and GFLOPs. Top: w/o multi-scale test. Bottom: w/ multi-scale test. It is worth noting that our results are achieved without refinement. + +
MethodAP\( AP^{50} \)\( AP^{75} \)\( AP^M \)\( AP^L \)AR
Top-down methods
Mask-RCNN [16]63.187.368.757.871.4-
G-RMI [34]64.985.571.362.370.069.7
Integral Pose Regression [39]67.888.274.863.974.0-
G-RMI + extra data [34]68.587.175.565.873.373.3
CPN [9]72.191.480.068.777.278.5
RMPE [15]72.389.279.168.078.6-
CFN [18]72.686.169.778.364.1-
CPN (ensemble) [9]73.091.780.969.578.179.0
SimpleBaseline [42]73.791.981.170.380.079.0
HRNet-W48 [38, 40]75.592.583.371.981.580.5
HRNet-W48 + extra data [38, 40]77.092.784.573.483.182.0
Bottom-up methods
OpenPose* [3]61.884.967.557.168.266.5
Hourglass** [30]65.586.872.360.672.670.2
PifPaf [22]66.7--62.472.9-
SPM [32]66.988.572.962.673.1-
PersonLab+ [33]68.789.075.464.175.575.4
Ours: HigherHRNet-W48+70.589.377.266.675.874.9
+ +Table 2. Comparisons with both top-down and bottom-up methods on COCO2017 test-dev dataset. * means using refinement. + means using multi-scale test. + +
MethodFeat. stride/resolutionAPAPMAPL
HRNet4/12864.457.175.6
HigherHRNet2/25666.961.075.7
HigherHRNet1/51266.561.174.9
+ +Table 3. Ablation study of HRNet vs. HigherHRNet on COCO2017 val dataset. Using one deconvolution module for HigherHRNet performs best on the COCO dataset. + +Testing. We first resize the short side of the input image to 512 and keep the aspect ratio. Heatmap aggregation is done by resizing all the predicted heatmaps to the size of input image and taking the average. Following [30], flip testing is used for all the experiments. All reported numbers have been obtained with single model without ensembling. + +Results on COCO2017 test-dev. Table 1 summarizes the results on COCO2017 test-dev dataset. From the results, we can see that using HRNet [38, 40] itself already serves as a simple and strong baseline for bottom-up methods (64.1 AP). Our baseline method of HRNet with only single scale test outperforms Hourglass [30] using multi-scale test, while HRNet has much less parameters and computation in terms of FLOPs. Equipped with light-weight deconvolution modules, our proposed HigherHRNet (66.4 AP) outperforms HRNet by $+2.3$ AP with only marginal increase in parameters $(+0.4\%)$ and FLOPs $(+23.1\%)$ . HigherHRNet is comparable with PersonLab [33] but with only $50\%$ parameters and $11\%$ FLOPs. If we further use multi-scale test, our HigherHRNet achieves 70.5 AP, outperforming all existing bottom-up methods by a large margin. We do not use any post processing like refining with top-down methods in [3, 30]. + +Table 2 lists both bottom-up and top-down methods on the COCO2017 test-dev dataset. HigherHRNet further closes the performance gap between bottom-up and top-down methods. + +# 4.2. Ablation Experiments + +We perform a number of ablation experiments to analyze Scale-Aware High-Resolution Network (HigherHRNet) on the COCO2017 [27] val dataset. + +HRNet vs. HigherHRNet. We perform ablation study comparing HRNet and HigherHRNet. For HigherHRNet, deconvolution module without extra residual blocks is used, and heatmaps aggregation is used for inference. Results are shown in Table 3. A simple bottom-up baseline by using HRNet with a feature stride of 4 achieves $\mathrm{AP} = 64.4$ . By adding one deconvolution module, our HigherHRNet with a feature stride of 2 outperforms HRNet by a large margin of $+2.5$ AP (achieving 66.9 AP). Furthermore, the main + +![](images/d17b57386e405ced503bdea6dd43f9688c5a9793fa0e52d25b65611369ed36a6.jpg) + +![](images/51daa03cddf5230641b68bcf0e0be02ba22e126331ef3b124a3655a1bd9d39dd.jpg) +Figure 3. (a) Baseline method using HRNet [38, 40] as backbone. (b) HigherHRNet with multi-resolution supervision (MRS). (c) HigherHRNet with MRS and feature concatenation. (d) HigherHRNet with MRS and feature concatenation. (e) HigherHRNet with MRS, feature concatenation and extra residual blocks. For (d) and (e), heatmap aggregation is used. + +![](images/22df433e549aade9083d4274bc9945d076ab1c7029875e0389c6863e03bb6ef2.jpg) + +![](images/9bb28e2292868916f290040b97d284e7b421228b092842200670bd9c26dc1075.jpg) + +![](images/8b32724ed71ecb953fe7d1c8b173fe7bd7f4cbd555ac169653b4cdfd5621a94c.jpg) + +
Networkw/ MRSfeature concat.w/ heatmap aggregationextra res. blocksAPAPMAPL
(a)HRNet64.457.175.6
(b)HigherHRNet✓66.060.774.2
(c)HigherHRNet✓✓66.360.874.0
(d)HigherHRNet✓✓✓66.961.075.7
(e)HigherHRNet✓✓✓✓67.161.576.1
+ +Table 4. Ablation study of HigherHRNet's components on COCO2017 val dataset. MSR: multi-resolution supervision. feature concat.: feature concatenation. res. blocks: residual blocks. + +improvement comes from medium persons, where $\mathbf{AP}^M$ is improved from 57.1 for HRNet to 61.0 for HigherHRNet. + +These results show that HigherHRNet performs much better with small scales thanks to its higher resolution heatmaps. We also find the AP for large person pose does no drop. This is mainly because we also use smaller resolution heatmaps for prediction. It demonstrates that 1) making prediction at higher resolution is beneficial to bottom-up pose estimation and 2) scale-aware prediction is important. + +If we add a sequence of two deconvolution modules after HRNet to generate feature maps that is of the same resolution as the input image, we observe that the performance decreases to 66.5 AP from 66.9 AP for adding only one deconvolution module. The improvement for medium person is marginal $(+0.1$ AP) but there is a large drop in the performance of large person $(-0.8$ AP). We hypothesize this is because the misalignment between feature map scale and object scales. Larger resolution feature maps (feature stride $= 1$ ) are good for detecting keypoints from even smaller persons but the small persons in COCO are not considered for pose estimation. Therefore, we only use one deconvolution module by default for the COCO dataset. But we would like to point out that the number of cascaded deconvolution modules should be dependent on datasets and we will validate this on more datasets in our future work. + +HigherHRNet gain breakdown. To better understand the gain of the proposed components, we perform detailed ablation studies on each individual component. Figure 3 il + +lustrates all the architectures of our experiments. Results are shown in Table 4. + +Effect of deconvolution module. We perform ablation study on the effect of adding deconvolution module to generate higher resolution heatmaps. For a fair comparison, we only use the highest resolution feature maps to generate heatmaps for prediction (Figure 3 (b)). HRNet (Figure 3 (a)) achieves a baseline of 64.4 AP. By adding one deconvolution module, the model achieves 66.0 AP which is 1.6 AP better than the baseline. This improvement is completely due to predicting on larger feature maps with higher quality. The result verifies our claim that it is important to predict on higher resolution feature maps for bottom-up pose estimation. + +Effect of feature concatenation. We concatenate feature maps with predicted heatmaps from HRNet as input to the deconvolution module (Figure 3 (c)) and the performance is further improved to 66.3 AP. We also observe there is a large gain in medium persons while the performance for large persons decreases. Comparing method (a) and (c), the gain of predicting heatmaps at higher resolution mainly comes from medium persons $(+3.7\mathrm{AP}^M)$ . Moreover, the drop in large persons $(-1.6\mathrm{AP})$ justifies our claim that different different resolutions of feature maps are sensitive to different scales of persons. + +Effect of heatmap aggregation. We further use all resolutions of heatmaps following the heatmap aggregation strategy for inference (Figure 3 (d)). Compared with Fig- + +
Training sizeAPAPMAPL
51267.161.576.1
64068.564.375.3
76868.564.973.8
+ +Table 5. Ablation study of HigherHRNet with different training image size on COCO2017 val dataset. + +
Backbone#ParamsGFLOPsAPAPMAPL
HRNet-W3228.647.868.564.375.3
HRNet-W4044.5110.769.264.975.9
HRNet-W4863.8154.369.965.476.4
+ +ure 3 (c) (66.3 AP) that only uses the highest resolution heatmaps for inference, applying heatmap aggregation strategy achieves 66.9 AP. Comparing method (d) and (e), the gain of heatmap aggregation comes from large person (+1.7 AP). And the performance of large person is even marginally better than predicting at lower resolution (method (a)). It means that predicting heatmaps using heatmap aggregation strategy is truly scale-aware. + +Effect of extra residual blocks. We add 4 residual blocks in the deconvolution module and our best model achieves 67.1 AP. Adding residual blocks can further refine the feature maps and it increases AP for both medium and large persons equally. + +Training with larger image size. A natural question is can training with larger input size further improve performance? To answer this question, we train HigherHRNet with $640 \times 640$ and $768 \times 768$ and results are shown in Table 5, all three models are tested using the training image size. We find that by increasing training image size to 640, there is a significant gain of 1.4 AP. Most of the gain comes from medium person while the performance of large person degrades slightly. When we further change the training image size to 768, the overall AP does not change anymore. We observe a marginal improvement in medium person along with large degradation in large person. + +Larger backbone. In previous experiments, we use HRNet-W32 (1/4 resolution feature map has 32 channels) as backbone. We perform experiments with larger backbones HRNet-W40 and HRNet-W48. Results are shown in Table 6. We find using larger backbone consistently improves performance for both medium and large person. + +# 4.3. CrowdPose + +The CrowdPose [24] dataset consists of 20,000 images, containing about 80,000 persons. The training, validation and testing subset are split in proportional to 5:1:4. CrowdPose has more crowded scenes than the COCO keypoint + +Table 6. Ablation study of HigherHRNet with different backbone on COCO2017 val dataset. + +
MethodAP\( AP^{50} \)\( AP^{75} \)\( AP^E \)\( AP^M \)\( AP^H \)
Top-down methods
Mask-RCNN [16]57.283.560.369.457.945.8
AlphaPose [15]61.081.366.071.261.451.1
Top-down with refinement
SPPE [24]66.084.271.575.566.357.4
Bottom-up methods
OpenPose [3]---62.748.732.3
Ours: HigherHRNet-W4865.986.470.673.366.557.9
Ours: HigherHRNet-W48+67.687.472.675.868.158.9
+ +Table 7. Comparisons with both top-down and bottom-up methods on CrowdPose test dataset. Superscripts E, M, H of AP stand for easy, medium and hard. $^+$ means using multi-scale test. + +dataset, posing more challenges to pose estimation methods. The evaluation metric is the same as COCO [27]. + +The strong assumption of top-down methods that each person detection only contains a single person in the center, is no more valid in crowded scene. As shown in Table 7, top-down methods [16, 15] that perform well on COCO fail on the CrowdPose dataset. + +On the other hand, bottom-up methods naturally have the advantage in crowded scene. To validate the robustness of HigherHRNet in crowded scene, as well as setting up a strong baseline for bottom-up methods. We train our best HigherHRNet-W48 model on the CrowdPose train and val set and report performance on the test set. All training parameters follow COCO exactly and we use a crop size of $640 \times 640$ for both training and testing. + +Results are shown in Table 7. Our HigherHRNet outperforms naive top-down methods by a large margin of 6.6 AP. HigherHRNet also outperforms the previous best method [24] (which performs a global refinement of top-down method [15]) by a healthy margin of 1.6 AP and most of the gain comes from $\mathrm{AP}^M$ (+1.8 AP) and $\mathrm{AP}^H$ (+1.5 AP), which contains images with the most crowd. Even without multi-scale test, HigherHRNet outperforms SPPE [24] by 0.5 in $\mathrm{AP}^H$ . + +# 5. Conclusion + +We have presented a Scale-Aware High-Resolution Network (HigherHRNet) to solve the scale variation challenge in the bottom-up multi-person pose estimation problem, especially for precisely localizing keypoints of small persons. We find multi-scale image pyramid and larger input size partially solve the problem, but these methods suffer from high computational cost. To solve the problem, we propose an efficient high-resolution feature pyramid based on HRNet and train it with multi-resolution supervision. During the inference, HigherHRNet with multi-resolution heatmap aggregation is capable of efficiently generating multil- and higher-resolution heatmaps for more accurate human pose estimation. HigherHRNet outperforms all existing bottom-up methods by a large margin on the challenging COCO dataset, especially for small persons. + +# References + +[1] Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE TPAMI, 2017. 3 +[2] Zhaowei Cai, Quanfu Fan, Rogerio S Feris, and Nuno Vasconcelos. A unified multi-scale deep convolutional neural network for fast object detection. In ECCV, 2016.3 +[3] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In CVPR, 2017. 1, 2, 5, 6, 8 +[4] 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 NeurIPS, 2018. 3 +[5] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. 2015. 3 +[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 TPAMI, 2018. 3 +[7] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017.3 +[8] 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. 3 +[9] Yilun Chen, Zhicheng Wang, Yuxiang Peng, Zhiqiang Zhang, Gang Yu, and Jian Sun. Cascaded pyramid network for multi-person pose estimation. In CVPR, 2018. 1, 2, 3, 5, 6 +[10] Bowen Cheng, Liang-Chieh Chen, Yunchao Wei, Yukun Zhu, Zilong Huang, Jinjun Xiong, Thomas S Huang, WenMei Hwu, and Honghui Shi. Spgnet: Semantic prediction guidance for scene parsing. In ICCV, 2019. 3 +[11] Bowen Cheng, Maxwell D Collins, Yukun Zhu, Ting Liu, Thomas S Huang, Hartwig Adam, and Liang-Chieh Chen. Panoptic-deeplab. arXiv preprint arXiv:1910.04751, 2019. 3 +[12] 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. In CVPR, 2020. 3 +[13] Bowen Cheng, Yunchao Wei, Honghui Shi, Rogerio Feris, Jinjun Xiong, and Thomas Huang. Decoupled classification refinement: Hard false positive suppression for object detection. arXiv preprint arXiv:1810.04002, 2018. 2 +[14] Bowen Cheng, Yunchao Wei, Honghui Shi, Rogerio Feris, Jinjun Xiong, and Thomas Huang. Revisiting rcnn: On awakening the classification power of faster rcnn. In ECCV, 2018. 2 + +[15] Hao-Shu Fang, Shuqin Xie, Yu-Wing Tai, and Cewu Lu. *Rmpe: Regional multi-person pose estimation.* In ICCV, 2017. 2, 6, 8 +[16] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. 1, 2, 3, 6, 8 +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 3, 4 +[18] Shaoli Huang, Mingming Gong, and Dacheng Tao. A coarse-fine network for keypoint localization. In ICCV, 2017. 2, 6 +[19] Eldar Insafutdinov, Leonid Pishchulin, Bjoern Andres, Mykhaylo Andriluka, and Bernt Schiele. Deepercut: A deeper, stronger, and faster multi-person pose estimation model. In ECCV, 2016. 2 +[20] Umar Iqbal and Juergen Gall. Multi-person pose estimation with local joint-to-person associations. In ECCV, 2016. 2 +[21] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[22] Sven Kreiss, Lorenzo Bertoni, and Alexandre Alahi. Pifpaf: Composite fields for human pose estimation. In CVPR, 2019, 1, 2, 3, 6 +[23] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, 2018. 4 +[24] Jiefeng Li, Can Wang, Hao Zhu, Yihuan Mao, Hao-Shu Fang, and Cewu Lu. Crowdpose: Efficient crowded scenes pose estimation and a new benchmark. In CVPR, 2019. 2, 8 +[25] Guosheng Lin, Anton Milan, Chunhua Shen, and Ian Reid. Refinenet: Multi-path refinement networks for high-resolution semantic segmentation. In CVPR, 2017. 3 +[26] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 2, 3, 5 +[27] 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, 2014. 2, 4, 5, 6, 8 +[28] Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan Yuille, and Li Fei-Fei. Auto-deeplab: Hierarchical neural architecture search for semantic image segmentation. In CVPR, 2019. 3 +[29] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In ECCV, 2016. 3 +[30] Alejandro Newell, Zhiao Huang, and Jia Deng. Associative embedding: End-to-end learning for joint detection and grouping. In NeurIPS. 2017. 1, 2, 3, 4, 5, 6 +[31] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In ECCV, 2016. 2, 3 +[32] Xuecheng Nie, Jiashi Feng, Jianfeng Zhang, and Shuicheng Yan. Single-stage multi-person pose machines. In ICCV, 2019. 6 +[33] George Papandreou, Tyler Zhu, Liang chieh Chen, Spyros Gidaris, Jonathan Tompson, and Kevin Murphy. Personlab: Person pose estimation and instance segmentation with a part-based geometric embedding model. In ECCV, 2018. 1, 2, 5, 6 + +[34] George Papandreou, Tyler Zhu, Nori Kanazawa, Alexander Toshev, Jonathan Tompson, Chris Bregler, and Kevin Murphy. Towards accurate multi-person pose estimation in the wild. In CVPR, 2017. 1, 2, 5, 6 +[35] 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 CVPR, 2016. 2 +[36] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. 2 +[37] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. 3 +[38] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. In CVPR, 2019. 1, 2, 3, 4, 6, 7 +[39] Xiao Sun, Bin Xiao, Fangyin Wei, Shuang Liang, and Yichen Wei. Integral human pose regression. In ECCV, 2018. 1, 6 +[40] Jingdong Wang, Ke Sun, Tianheng Cheng, Borui Jiang, Chaorui Deng, Yang Zhao, Dong Liu, Yadong Mu, Mingkui Tan, Xinggang Wang, Wenyu Liu, and Bin Xiao. Deep high-resolution representation learning for visual recognition. CoRR, abs/1908.07919, 2019. 1, 2, 3, 4, 6, 7 +[41] Zbigniew Wojna, Vittorio Ferrari, Sergio Guadarrama, Nathan Silberman, Liang-Chieh Chen, Alireza Fathi, and Jasper Uijlings. The devil is in the decoder. In BMVC, 2017. 3 +[42] Bin Xiao, Haiping Wu, and Yichen Wei. Simple baselines for human pose estimation and tracking. In ECCV, 2018. 1, 2, 3, 4, 5, 6 +[43] 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. 3 +[44] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. 3 \ No newline at end of file diff --git a/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/images.zip b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1bf4f6643cf3122773d78a0511b1a9a25f0e4af2 --- /dev/null +++ b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49127e768e7af50bd64fdaa058d29a3ba81db4cb6c9b0ed4638cd1bb67ca2cce +size 384814 diff --git a/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/layout.json b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c885b7c7b36a0e39ba5a58f66eaa8a127fd1011a --- /dev/null +++ b/higherhrnetscaleawarerepresentationlearningforbottomuphumanposeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6f47d39f284a41887ae18581dda07cde28e4dc6add6a33bcb09c99afef4d7a5 +size 340925 diff --git a/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_content_list.json b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c8ebf6399f2ad2d0a78141429802844f6ea691d6 --- /dev/null +++ b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:388c886ee80dd89355fd1d7c93714d1203b525dd3f81c500290ddc6e8c819b29 +size 89718 diff --git a/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_model.json b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a0e0b6dbed20d3c798bf57b0c0ef73897e8f123e --- /dev/null +++ b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:640c732e530e85dbeb707efe1aa072c7e2cd72726c6508db73e98f50bdf685cd +size 117410 diff --git a/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_origin.pdf b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c10dcf176b48b8f1e2b56a4ea2e86fbfc421c0dc --- /dev/null +++ b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/9e302299-0d82-4431-9216-e04c30d8c30a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e5153967b1a5059eaab340bb53d21bb9b5a45414a682048c01709eede34d35c +size 3613060 diff --git a/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/full.md b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f5a400f294b43d9e66cfa73c4986456cc2209b2c --- /dev/null +++ b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/full.md @@ -0,0 +1,447 @@ +# High-frequency Component Helps Explain the Generalization of Convolutional Neural Networks + +Haohan Wang, Xindi Wu, Zeyi Huang, Eric P. Xing + +School of Computer Science + +Carnegie Mellon University + +{haohanw,epxing}@cs.cmu.edu,{xindiw,zeyih}@andrew.cmu.edu + +# Abstract + +We investigate the relationship between the frequency spectrum of image data and the generalization behavior of convolutional neural networks (CNN). We first notice CNN's ability in capturing the high-frequency components of images. These high-frequency components are almost imperceptible to a human. Thus the observation leads to multiple hypotheses that are related to the generalization behaviors of CNN, including a potential explanation for adversarial examples, a discussion of CNN's trade-off between robustness and accuracy, and some evidence in understanding training heuristics. + +# 1. Introduction + +Deep learning has achieved many recent advances in predictive modeling in various tasks, but the community has nonetheless become alarmed by the unintuitive generalization behaviors of neural networks, such as the capacity in memorizing label shuffled data [65] and the vulnerability towards adversarial examples [54, 21] + +To explain the generalization behaviors of neural networks, many theoretical breakthroughs have been made progressively, including studying the properties of stochastic gradient descent [31], different complexity measures [46], generalization gaps [50], and many more from different model or algorithm perspectives [30, 43, 7, 51]. + +In this paper, inspired by previous understandings that convolutional neural networks (CNN) can learn from confounding signals [59] and superficial signals [29, 19, 58], we investigate the generalization behaviors of CNN from a data perspective. Together with [27], we suggest that the unintuitive generalization behaviors of CNN as a direct outcome of the perceptional disparity between human and models (as argued by Figure 1): CNN can view the data at a much higher granularity than the human can. + +However, different from [27], we provide an interpreta + +![](images/1f099e11304bd5abc58d40804bfccd7ee3608b6432fdd4b12bcb483d2f45441a.jpg) +Figure 1. The central hypothesis of our paper: within a data collection, there are correlations between the high-frequency components and the "semantic" component of the images. As a result, the model will perceive both high-frequency components as well as the "semantic" ones, leading to generalization behaviors counter-intuitive to human (e.g., adversarial examples). + +tion of this high granularity of the model's perception: CNN can exploit the high-frequency image components that are not perceivable to human. + +For example, Figure 2 shows the prediction results of eight testing samples from CIFAR10 data set, together with the prediction results of the high and low-frequency component counterparts. For these examples, the prediction outcomes are almost entirely determined by the high-frequency components of the image, which are barely perceivable to human. On the other hand, the low-frequency components, which almost look identical to the original image to human, are predicted to something distinctly different by the model. + +Motivated by the above empirical observations, we further investigate the generalization behaviors of CNN and attempt to explain such behaviors via differential responses to the image frequency spectrum of the inputs (Remark 1). Our main contributions are summarized as follows: + +![](images/f4c2134d08287b0710dc03c4e2a4c3bb6c1a8bc995fc317a9833cba6f775ade2.jpg) +(a) A sample of frog + +![](images/7440efadbea7bb400319178f15c503051b8a9dd66db94527850305b79605d05e.jpg) +(b) A sample of mobile + +![](images/fbd0d2f4da64933351ecbf6fbe59e3fc0b557924798700df44433e4e27838c67.jpg) +(c) A sample of ship + +![](images/68a1f3d517607319b34bcef20b76230c169440585aa3186e012cf59e20422fe0.jpg) +(d) A sample of bird + +![](images/2379e9aa6f2ee458a0ebc4e4e20e5c5ccbe7664fb79c8998eb5ca6131e5e614e.jpg) +(e) A sample of truck + +![](images/02442c2d5b7e7cd4eae614f541ea57b9bf1d19cafae3f25727fdc1434ff79557.jpg) +(f) A sample of cat + +![](images/29442c2e8d3be43b68637827d4ed456d9bd729957212b865c0e6f5e4507007fb.jpg) +(g) A sample of airplane +Figure 2. Eight testing samples selected from CIFAR10 that help explain that CNN can capture the high-frequency image: the model (ResNet18) correctly predicts the original image ( $1^{\mathrm{st}}$ column in each panel) and the high-frequency reconstructed image ( $3^{\mathrm{rd}}$ column in each panel), but incorrectly predict the low-frequency reconstructed image ( $2^{\mathrm{nd}}$ column in each panel). The prediction confidences are also shown. The frequency components are split with $r = 12$ . Details of the experiment will be introduced later. + +![](images/fdadc0938c59cecf61522859d82afd9c8902970e1fb3c5cdb1006ddba7d49560.jpg) +(h) A sample of ship + +- We reveal the existing trade-off between CNN's accuracy and robustness by offering examples of how CNN exploits the high-frequency components of images to trade robustness for accuracy (Corollary 1). +- With image frequency spectrum as a tool, we offer hypothesis to explain several generalization behaviors of CNN, especially the capacity in memorizing label-shuffled data. +- We propose defense methods that can help improving the adversarial robustness of CNN towards simple attacks without training or fine-tuning the model. + +The remainder of the paper is organized as follows. In Section 2, we first introduce related discussions. In Section 3, we will present our main contributions, including a formal discussion on that CNN can exploit high-frequency components, which naturally leads to the trade-off between adversarial robustness and accuracy. Further, in Section 4-6, we set forth to investigate multiple generalization behaviors of CNN, including the paradox related to capacity of memorizing label-shuffled data (§4), the performance boost introduced by heuristics such as Mixup and BatchNorm (§5), and the adversarial vulnerability (§6). We also attempt to investigate tasks beyond image classification in Section 7. Finally, we will briefly discuss some related topics in Section 8 before we conclude the paper in Section 9. + +# 2. Related Work + +The remarkable success of deep learning has attracted a torrent of theoretical work devoted to explaining the generalization mystery of CNN. + +For example, ever since Zhang et al. [65] demonstrated the effective capacity of several successful neural network architectures is large enough to memorize random labels, the community sees a prosperity of many discussions about this apparent "paradox" [61, 15, 17, 15, 11]. Arpit et al. [3] demonstrated that effective capacity are unlikely to explain the generalization performance of gradient-based-methods trained deep networks due to the training data largely determine memorization. Kruger et al.[35] empirically argues by showing largest Hessian eigenvalue increased when training on random labels in deep networks. + +The concept of adversarial example [54, 21] has become another intriguing direction relating to the behavior of neural networks. Along this line, researchers invented powerful methods such as FGSM [21], PGD [42], and many others [62, 9, 53, 36, 12] to deceive the models. This is known as attack methods. In order to defend the model against the deception, another group of researchers proposed a wide range of methods (known as defense methods) [1, 38, 44, 45, 24]. These are but a few highlights among a long history of proposed attack and defense methods. One can refer to comprehensive reviews for detailed discussions [2, 10] + +However, while improving robustness, these methods may see a slight drop of prediction accuracy, which leads to another thread of discussion in the trade-off between robustness and accuracy. The empirical results in [49] demonstrated that more accurate model tend to be more robust over generated adversarial examples. While [25] argued that the seemingly increased robustness are mostly due to the increased accuracy, and more accurate models (e.g., VGG, ResNet) are actually less robust than AlexNet. Theoretical discussions have also been offered [56, 67], which also inspires new defense methods [67]. + +# 3. High-frequency Components & CNN's Generalization + +We first set up the basic notations used in this paper: $\langle \mathbf{x},\mathbf{y}\rangle$ denotes a data sample (the image and the corresponding label). $f(\cdot ;\theta)$ denotes a convolutional neural network whose parameters are denoted as $\theta$ . We use $\mathcal{H}$ to denote a human model, and as a result, $f(\cdot ;\mathcal{H})$ denotes how human will classify the data $\dots l(\cdot ,\cdot)$ denotes a generic loss function (e.g., cross entropy loss). $\alpha (\cdot ,\cdot)$ denotes a function evaluating prediction accuracy (for every sample, this function yields 1.0 if the sample is correctly classified, 0.0 otherwise). $d(\cdot ,\cdot)$ denotes a function evaluating the distance between two vectors. $\mathcal{F}(\cdot)$ denotes the Fourier transform; thus, $\mathcal{F}^{-1}(\cdot)$ denotes the inverse Fourier transform. We use $\mathbf{z}$ to denote the frequency component of a sample. Therefore, we have $\mathbf{z} = \mathcal{F}(\mathbf{x})$ and $\mathbf{x} = \mathcal{F}^{-1}(\mathbf{z})$ . + +Notice that Fourier transform or its inverse may introduce complex numbers. In this paper, we simply discard the imaginary part of the results of $\mathcal{F}^{-1}(\cdot)$ to make sure the resulting image can be fed into CNN as usual. + +# 3.1. CNN Exploit High-frequency Components + +We decompose the raw data $\mathbf{x} = \{\mathbf{x}_l, \mathbf{x}_h\}$ , where $\mathbf{x}_l$ and $\mathbf{x}_h$ denote the low-frequency component (shortened as LFC) and high-frequency component (shortened as HFC) of $\mathbf{x}$ . We have the following four equations: + +$$ +\mathbf {z} = \mathcal {F} (\mathbf {x}), \qquad \mathbf {z} _ {l}, \mathbf {z} _ {h} = t (\mathbf {z}; r), +$$ + +$$ +\mathbf {x} _ {l} = \mathcal {F} ^ {- 1} (\mathbf {z} _ {l}), \qquad \mathbf {x} _ {h} = \mathcal {F} ^ {- 1} (\mathbf {z} _ {h}), +$$ + +where $t(\cdot; r)$ denotes a thresholding function that separates the low and high frequency components from $\mathbf{z}$ according to a hyperparameter, radius $r$ . + +To define $t(\cdot; r)$ formally, we first consider a grayscale (one channel) image of size $n \times n$ with $\mathcal{N}$ possible pixel values (in other words, $\mathbf{x} \in \mathcal{N}^{n \times n}$ ), then we have $\mathbf{z} \in \mathcal{C}^{n \times n}$ , where $\mathcal{C}$ denotes the complex number. We use $\mathbf{z}(i, j)$ to index the value of $\mathbf{z}$ at position $(i, j)$ , and we use $c_i, c_j$ to denote the centroid. We have the equation $\mathbf{z}_l, \mathbf{z}_h = t(\mathbf{z}; r)$ formally defined as: + +$$ +\mathbf {z} _ {l} (i, j) = \left\{ \begin{array}{l l} \mathbf {z} (i, j), & \text {i f} d ((i, j), (c _ {i}, c _ {j})) \leq r \\ 0, & \text {o t h e r w i s e} \end{array} \right., +$$ + +$$ +\mathbf {z} _ {h} (i, j) = \left\{ \begin{array}{l l} 0, & \text {i f} d ((i, j), (c _ {i}, c _ {j})) \leq r \\ \mathbf {z} (i, j), & \text {o t h e r w i s e} \end{array} \right. +$$ + +We consider $d(\cdot, \cdot)$ in $t(\cdot; r)$ as the Euclidean distance in this paper. If $\mathbf{x}$ has more than one channel, then the procedure operates on every channel of pixels independently. + +Remark 1. With an assumption (referred to as A1) that presumes "only $\mathbf{x}_l$ is perceivable to human, but both $\mathbf{x}_l$ and $\mathbf{x}_h$ + +are perceivable to a CNN," we have: + +$$ +\mathbf {y} := f (\mathbf {x}; \mathcal {H}) = f (\mathbf {x} _ {l}; \mathcal {H}), +$$ + +but when a CNN is trained with + +$$ +\underset {\theta} {\arg \min } l (f (\mathbf {x}; \theta), \mathbf {y}), +$$ + +which is equivalent to + +$$ +\underset {\theta} {\arg \min } l (f (\{\mathbf {x} _ {l}, \mathbf {x} _ {h} \}; \theta), \mathbf {y}), +$$ + +CNN may learn to exploit $\mathbf{x}_h$ to minimize the loss. As a result, CNN's generalization behavior appears unintuitive to a human. + +Notice that "CNN may learn to exploit $\mathbf{x}_h$ " differs from "CNN overfit" because $\mathbf{x}_h$ can contain more information than sample-specific idiosyncrasy, and these more information can be generalizable across training, validation, and testing sets, but are just imperceptible to a human. + +As Assumption A1 has been demonstrated to hold in some cases (e.g., in Figure 2), we believe Remark 1 can serve as one of the explanations to CNN's generalization behavior. For example, the adversarial examples [54, 21] can be generated by perturbing $\mathbf{x}_h$ ; the capacity of CNN in reducing training error to zero over label shuffled data [65] can be seen as a result of exploiting $\mathbf{x}_h$ and overfitting sample-specific idiosyncrasy. We will discuss more in the following sections. + +# 3.2. Trade-off between Robustness and Accuracy + +We continue with Remark 1 and discuss CNN's trade-off between robustness and accuracy given $\theta$ from the image frequency perspective. We first formally state the accuracy of $\theta$ as: + +$$ +\mathbb {E} _ {(\mathbf {x}, \mathbf {y})} \alpha (f (\mathbf {x}; \theta), \mathbf {y}) \tag {1} +$$ + +and the adversarial robustness of $\theta$ as in e.g., [8]: + +$$ +\mathbb {E} _ {(\mathbf {x}, \mathbf {y})} \min _ {\mathbf {x} ^ {\prime}: d (\mathbf {x} ^ {\prime}, \mathbf {x}) \leq \epsilon} \alpha \left(f \left(\mathbf {x} ^ {\prime}; \theta\right), \mathbf {y}\right) \tag {2} +$$ + +where $\epsilon$ is the upper bound of the perturbation allowed. + +With another assumption (referred to as A2): "for model $\theta$ , there exists a sample $\langle \mathbf{x}, \mathbf{y} \rangle$ such that: + +$$ +f (\mathbf {x}; \theta) \neq f (\mathbf {x} _ {l}; \theta), ” +$$ + +we can extend our main argument (Remark 1) to a formal statement: + +Corollary 1. With assumptions A1 and A2, there exists a sample $\langle \mathbf{x},\mathbf{y}\rangle$ that the model $\theta$ cannot predict both accurately (evaluated to be 1.0 by Equation 1) and robustly (evaluated to be 1.0 by Equation 2) under any distance metric $d(\cdot ,\cdot)$ and bound $\epsilon$ as long as $\epsilon \geq d(\mathbf{x},\mathbf{x}_l)$ . + +![](images/76cf22661df4cd7a177282943a994e1494baf53ec67a07149c0a231045f29d12.jpg) +Figure 3. Training curves of the original label case (100 epochs) and shuffled label case (300 epochs), together plotted with the low-frequent counterpart of the images. All curves in this figure are from train samples. + +The proof is a direct outcome of the previous discussion and thus omitted. The Assumption A2 can also be verified empirically (e.g., in Figure 2), therefore we can safely state that Corollary 1 can serve as one of the explanations to the trade-off between CNN's robustness and accuracy. + +# 4. Rethinking Data before Rethinking Generalization + +# 4.1. Hypothesis + +Our first aim is to offer some intuitive explanations to the empirical results observed in [65]: neural networks can easily fit label-shuffled data. While we have no doubts that neural networks are capable of memorizing the data due to its capacity, the interesting question arises: "if a neural network can easily memorize the data, why it cares to learn the generalizable patterns out of the data, in contrast to directly memorizing everything to reduce the training loss?" + +Within the perspective introduced in Remark 1, our hypothesis is as follows: Despite the same outcome as a minimization of the training loss, the model considers different level of features in the two situations: + +- In the original label case, the model will first pick up LFC, then gradually pick up the HFC to achieve higher training accuracy. +- In the shuffled label case, as the association between LFC and the label is erased due to shuffling, the model has to memorize the images when the LFC and HFC are treated equally. + +# 4.2. Experiments + +We set up the experiment to test our hypothesis. We use ResNet-18 [22] for CIFAR10 dataset [33] as the base experiment. The vanilla set-up, which we will use for the rest of this paper, is to run the experiment with 100 epochs with the ADAM optimizer [32] with learning rate set to be $10^{-4}$ and batch size set to be 100, when weights are initialized with Xavier initialization [20]. Pixels are all normalized to be $[0,1]$ . All these experiments are repeated in MNIST [14], FashionMNIST [63], and a subset of ImageNet [13]. These efforts are reported in the Appendix. We train two models, + +Table 1. We test the generalization power of LFC and HFC by training the model with $\mathbf{x}_l$ or $\mathbf{x}_h$ and test on the original test set. + +
LFCHFC
rtrain acc.test acc.rtrain acc.test acc.
40.96680.616740.98850.2002
80.97860.715480.97680.092
120.97860.7516120.97970.0997
160.98390.7714160.93840.1281
+ +with the natural label setup and the shuffled label setup, denote as $\mathsf{M}_{\mathrm{natural}}$ and $\mathsf{M}_{\mathrm{shuffle}}$ , respectively; the $\mathsf{M}_{\mathrm{shuffle}}$ needs 300 epochs to reach a comparative training accuracy. To test which part of the information the model picks up, for any $\mathbf{x}$ in the training set, we generate the low-frequency counterparts $\mathbf{x}_l$ with $r$ set to 4, 8, 12, 16 respectively. We test the how the training accuracy changes for these low-frequency data collections along the training process. + +The results are plotted in Figure 3. The first message is the $M_{\text{shuffle}}$ takes a longer training time than $M_{\text{natural}}$ to reach the same training accuracy (300 epochs vs. 100 epochs), which suggests that memorizing the samples as an "unnatural" behavior in contrast to learning the generalizable patterns. By comparing the curves of the low-frequent training samples, we notice that $M_{\text{natural}}$ learns more of the low-frequent patterns (i.e., when $r$ is 4 or 8) than $M_{\text{shuffle}}$ . Also, $M_{\text{shuffle}}$ barely learns any LFC when $r = 4$ , while on the other hand, even at the first epoch, $M_{\text{natural}}$ already learns around $40\%$ of the correct LFC when $r = 4$ . This disparity suggests that when $M_{\text{natural}}$ prefers to pick up the LFC, $M_{\text{shuffle}}$ does not have a preference between LFC vs. HFC. + +If a model can exploit multiple different sets of signals, then why $\mathsf{M}_{\mathrm{natural}}$ prefers to learn LFC that happens to align well with the human perceptual preference? While there are explanations suggesting neural networks' tendency towards simpler functions [48], we conjecture that this is simply because, since the data sets are organized and annotated by human, the LFC-label association is more "generalizable" than the one of HFC: picking up LFC-label association will lead to the steepest descent of the loss surface, especially at the early stage of the training. + +To test this conjecture, we repeat the experiment of $\mathsf{M}_{\text{natural}}$ , but instead of the original train set, we use the $\mathbf{x}_l$ or $\mathbf{x}_h$ (normalized to have the standard pixel scale) and test how well the model can perform on original test set. Table 1 suggests that LFC is much more "generalizable" than HFC. Thus, it is not surprising if a model first picks up LFC as it leads to the steepest descent of the loss surface. + +# 4.3. A Remaining Question + +Finally, we want to raise a question: The coincidental alignment between networks' preference in LFC and human perceptual preference might be a simple result of the "survival bias" of the many technologies invented one of the other along the process of climbing the ladder of the + +state-of-the-art. In other words, the almost-100-year development process of neural networks functions like a "natural selection" of technologies [60]. The survived ideas may happen to match the human preferences, otherwise, the ideas may not even be published due to the incompetence in climbing the ladder. + +However, an interesting question will be how well these ladder climbing techniques align with the human visual preference. We offer to evaluate these techniques with our frequency tools. + +# 5. Training Heuristics + +We continue to reevaluate the heuristics that helped in climbing the ladder of state-of-the-art accuracy. We evaluate these heuristics to test the generalization performances towards LFC and HFC. Many renowned techniques in the ladder of accuracy seem to exploit HFC more or less. + +# 5.1. Comparison of Different Heuristics + +We test multiple heuristics by inspecting the prediction accuracy over LFC and HFC with multiple choices of $r$ along the training process and plot the training curves. + +Batch Size: We then investigate how the choices of batch size affect the generalization behaviors. We plot the results in Figure 4. As the figure shows, smaller batch size appears to excel in improving training and testing accuracy, while bigger batch size seems to stand out in closing the generalization gap. Also, it seems the generalization gap is closely related to the model's tendency in capturing HFC: models trained with bigger epoch sizes are more invariant to HFC and introduce smaller differences in training accuracy and testing accuracy. The observed relation is intuitive because the smallest generalization gap will be achieved once the model behaves like a human (because it is the human who annotate the data). + +The observation in Figure 4 also chips in the discussion in the previous section about "generalizable" features. Intuitively, with bigger epoch size, the features that can lead to steepest descent of the loss surface are more likely to be the "generalizable" patterns of the data, which are LFC. + +Heuristics: We also test how different training methods react to LFC and HFC, including + +- Dropout [26]: A heuristic that drops weights randomly during training. We apply dropout on fully-connected layers with $p = 0.5$ . +- Mix-up [66]: A heuristic that linearly integrate samples and their labels during training. We apply it with standard hyperparameter $\alpha = 0.5$ . +- BatchNorm [28]: A method that performs the normalization for each training mini-batch to accelerate Deep Network training process. It allows us to use a + +much higher learning rate and reduce overfitting, similar with Dropout. We apply it with setting scale $\gamma$ to 1 and offset $\beta$ to 0. + +- Adversarial Training [42]: A method that augments the data through adversarial examples generated by a threat model during training. It is widely considered as one of the most successful adversarial robustness (defense) method. Following the popular choice, we use PGD with $\epsilon = 8 / 255$ ( $\epsilon = 0.03$ ) as the threat model. + +We illustrate the results in Figure 5, where the first panel is the vanilla set-up, and then each one of the four heuristics are tested in the following four panels. + +Dropout roughly behaves similarly to the vanilla set-up in our experiments. Mix-up delivers a similar prediction accuracy, however, it catches much more HFC, which is probably not surprising because the mix-up augmentation does not encourage anything about LFC explicitly, and the performance gain is likely due to attention towards HFC. + +Adversarial training mostly behaves as expected: it reports a lower prediction accuracy, which is likely due to the trade-off between robustness and accuracy. It also reports a smaller generalization gap, which is likely as a result of picking up "generalizable" patterns, as verified by its invariance towards HFC (e.g., $r = 12$ or $r = 16$ ). However, adversarial training seems to be sensitive to the HFC when $r = 4$ , which is ignored even by the vanilla set-up. + +The performance of BatchNorm is notable: compared to the vanilla set-up, BatchNorm picks more information in both LFC and HFC, especially when $r = 4$ and $r = 8$ . This BatchNorm's tendency in capturing HFC is also related to observations that BatchNorm encourages adversarial vulnerability [18]. + +Other Tests: We have also tested other heuristics or methods by only changing along one dimension while the rest is fixed the same as the vanilla set-up in Section 4. + +Model architecture: We tested LeNet [37], AlexNet [34], VGG [52], and ResNet [23]. The ResNet architecture seems advantageous toward previous inventions at different levels: it reports better vanilla test accuracy, smaller generalization gap (difference between training and testing accuracy), and a weaker tendency in capturing HFC. + +Optimizer: We tested SGD, ADAM [32], AdaGrad [16], AdaDelta [64], and RMSprop. We notice that SGD seems to be the only one suffering from the tendency towards significantly capturing HFC, while the rest are on par within our experiments. + +# 5.2. A hypothesis on Batch Normalization + +Based on the observation, we hypothesized that one of BatchNorm's advantage is, through normalization, to align the distributional disparities of different predictive signals. For example, HFC usually shows smaller magnitude than + +![](images/de41db16f0b999435c992b845c6d7f825f049c44c2877ae078c855339517b8f5.jpg) +Figure 4. Plots of accuracy of different epoch sizes along the epochs for train, test data, as well as LFC and HFC with different radii. + +![](images/4f57ff0f71803eaa51331e9606440f67422bd164fee33783222396f258192740.jpg) +Figure 5. Plots of accuracy of different heuristics along the epochs for train, test data, as well as LFC and HFC with different radii. + +![](images/c2db8e9726f76f25a0bc854df0838a9a8ce8ee2c818cb6560f064c73a52e0f19.jpg) +Figure 6. Comparison of models with vs. without BatchNorm trained with LFC data. + +LFC, so a model trained without BatchNorm may not easily pick up these HFC. Therefore, the higher convergence speed may also be considered as a direct result of capturing different predictive signals simultaneously. + +To verify this hypothesis, we compare the performance of models trained with vs. without BatchNorm over LFC data and plot the results in Figure 6. + +As Figure 6 shows, when the model is trained with only LFC, BatchNorm does not always help improve the predictive performance, either tested by original data or by corresponding LFC data. Also, the smaller the radius is, the less the BatchNorm helps. Also, in our setting, BatchNorm does not generalize as well as the vanilla setting, which may raise a question about the benefit of BatchNorm. + +However, BatchNorm still seems to at least boost the convergence of training accuracy. Interestingly, the acceleration is the smallest when $r = 4$ . This observation further aligns with our hypothesis: if one of BatchNorm's advantage is to encourage the model to capture different predictive signals, the performance gain of BatchNorm is the most limited when the model is trained with LFC when $r = 4$ . + +# 6. Adversarial Attack & Defense + +As one may notice, our observation of HFC can be directly linked to the phenomenon of "adversarial example": if the prediction relies on HFC, then perturbation of HFC will significantly alter the model's response, but such perturbation may not be observed to human at all, creating the + +unintuitive behavior of neural networks. + +This section is devoted to study the relationship between adversarial robustness and model's tendency in exploiting HFC. We first discuss the linkage between the "smoothness" of convolutional kernels and model's sensitivity towards HFC (§6.1), which serves the tool for our follow-up analysis. With such tools, we first show that adversially robust models tend to have "smooth" kernels (§6.2), and then demonstrate that directly smoothing the kernels (without training) can help improve the adversarial robustness towards some attacks (§6.3). + +# 6.1. Kernel Smoothness vs. Image Frequency + +As convolutional theorem [6] states, the convolution operation of images is equivalent to the element-wise multiplication of image frequency domain. Therefore, roughly, if a convolutional kernel has negligible weight at the high-end of the frequency domain, it will weigh HFC accordingly. This may only apply to the convolutional kernel at the first layer because the kernels at higher layers do not directly with the data, thus the relationship is not clear. + +Therefore, we argue that, to push the model to ignore the HFC, one can consider to force the model to learn the convolutional kernels that have only negligible weights at the high-end of the frequency domain. + +Intuitively (from signal processing knowledge), if the convolutional kernel is "smooth", which means that there is no dramatics fluctuations between adjacent weights, the corresponding frequency domain will see a negligible amount of high-frequency signals. The connections have been mathematically proved [47, 55], but these proved exact relationships are out of the scope of this paper. + +# 6.2. Robust Models Have Smooth Kernels + +To understand the connection between "smoothness" and adversarial robustness, we visualize the convolutional kernels at the first layer of the models trained in the + +![](images/7b34f37614046da1df978180da8ed9f84dc64f68d617c535aa45f079f3e03b2a.jpg) +(a) convoluational kernels of $\mathsf{M}_{\mathrm{natural}}$ + +![](images/4aed0656259017022b2d4656e527a45b28f0a2882b2a295eb008e6d9e1b1e5aa.jpg) +(b) convoluational kernels of $M_{\text{adversarial}}$ + +![](images/a406ae5e3eb7d4883a58cc5bd4f4844b914e0caa5543206f760c5370236ce76b.jpg) +(c) convolutional kernels of $\mathsf{M}_{\mathrm{natural}}(\rho = 1.0)$ + +![](images/fd3c61a98816dedd49913329a0e69cb3fdf678abeef6c825fa5f9326e67d6c97.jpg) +(d) convolutional kernels of $\mathsf{M}_{\mathrm{adversarial}}(\rho = 1.0)$ +Figure 7. Visualization of convolutional kernels (16 kernels each channel $\times 3$ channels at the first layer) of models. + +vanilla manner $(\mathsf{M}_{\mathrm{natural}})$ and trained with adversarial training $(\mathsf{M}_{\mathrm{adversarial}})$ in Figure 7 (a) and (b). + +Comparing Figure 7(a) and Figure 7(b), we can see that the kernels of $\mathsf{M}_{\text{adversarial}}$ tend to show a more smooth pattern, which can be observed by noticing that the adjacent weights of kernels of $\mathsf{M}_{\text{adversarial}}$ tend to share the same color. The visualization may not be very clear because the convolutional kernel is only $[3 \times 3]$ in ResNet, the message is delivered more clearly in Appendix with other architecture when the first layer has kernel of the size $[5 \times 5]$ . + +# 6.3. Smoothing Kernels Improves Adversarial Robustness + +The intuitive argument in §6.1 and empirical findings in §6.2 directly lead to a question of whether we can improve the adversarial robustness of models by smoothing the convolutional kernels at the first layer. + +Following the discussion, we introduce an extremely simple method that appears to improve the adversarial robustness against FGSM [21] and PGD [36]. For a convolutional kernel $\mathbf{w}$ , we use $i$ and $j$ to denote its column and row indices, thus $\mathbf{w}_{i,j}$ denotes the value at $i^{\mathrm{th}}$ row and $j^{\mathrm{th}}$ column. If we use $\mathcal{N}(i,j)$ to denote the set of the spatial neighbors of $(i,j)$ , our method is simply: + +$$ +\mathbf {w} _ {i, j} = \mathbf {w} _ {i, j} + \sum_ {(h, k) \in \mathcal {N} (i, j)} \rho \mathbf {w} _ {h, k}, \tag {3} +$$ + +where $\rho$ is a hyperparameter of our method. We fix $\mathcal{N}(i,j)$ to have eight neighbors. If $(i,j)$ is at the edge, then we + +simply generate the out-of-boundary values by duplicating the values on the boundary. + +In other words, we try to smooth the kernel through simply reducing the adjacent differences by mixing the adjacent values. The method barely has any computational load, but appears to improve the adversarial robustness of $\mathsf{M}_{\mathrm{natural}}$ and $\mathsf{M}_{\mathrm{adversarial}}$ towards FGSM and PGD, even when $\mathsf{M}_{\mathrm{adversarial}}$ is trained with PGD as the threat model. + +In Figure 7, we visualize the convolutional kernels with our method applied to $\mathsf{M}_{\mathrm{natural}}$ and $\mathsf{M}_{\mathrm{adversarial}}$ with $\rho = 1.0$ , denoted as $\mathsf{M}_{\mathrm{natural}}(\rho = 1.0)$ and $\mathsf{M}_{\mathrm{adversarial}}(\rho = 1.0)$ , respectively. As the visualization shows, the resulting kernels tend to show a significantly smoother pattern. + +We test the robustness of the models smoothed by our method against FGSM and PGD with different choices of $\epsilon$ , where the maximum of perturbation is 1.0. As Table 2 shows, when our smoothing method is applied, the performance of clean accuracy directly plunges, but the performance of adversarial robustness improves. In particular, our method helps when the perturbation is allowed to be relatively large. For example, when $\epsilon = 0.09$ (roughly $23/255$ ), $\mathsf{M}_{\text{natural}}(\rho = 1.0)$ even outperforms $\mathsf{M}_{\text{adversarial}}$ . In general, our method can easily improve the adversarial robustness of $\mathsf{M}_{\text{natural}}$ , but can only improve upon $\mathsf{M}_{\text{adversarial}}$ in the case where $\epsilon$ is larger, which is probably because the $\mathsf{M}_{\text{adversarial}}$ is trained with $\mathsf{PGD}(\epsilon = 0.03)$ as the threat model. + +# 7. Beyond Image Classification + +We aim to explore more than image classification tasks. We investigate in the object detection task. We use RetinaNet [40] with ResNet50 [23] + FPN [39] as the backbone. We train the model with COCO detection train set [41] and perform inference in its validation set, which includes 5000 images, and achieve an MAP of $35.6\%$ . + +Then we choose $r = 128$ and maps the images into $\mathbf{x}_l$ and $\mathbf{x}_h$ and test with the same model and get $27.5\%$ MAP with LFC and $10.7\%$ MAP with HFC. The performance drop from $35.6\%$ to $27.5\%$ intrigues us so we further study whether the same drop should be expected from human. + +# 7.1. Performance Drop on LFC + +The performance drop from the $\mathbf{x}$ to $\mathbf{x}_l$ may be expected because $\mathbf{x}_l$ may not have the rich information from the original images when HFC are dropped. In particular, different from image classification, HFC may play a significant role in depicting some objects, especially the smaller ones. + +Figure 8 illustrates a few examples, where some objects are recognized worse in terms of MAP scores when the input images are replaced by the low-frequent counterparts. This disparity may be expected because the low-frequent images tend to be blurry and some objects may not be clear to a human either (as the left image represents). + +
CleanFGSMPGD
ε = 0.03ε = 0.06ε = 0.09ε = 0.03ε = 0.06ε = 0.09
Mnatural0.8560.1070.0690.0440.0030.0020.002
Mnatural(ρ = 0.10)0.8150.1490.1050.0730.0090.0020.001
Mnatural(ρ = 0.25)0.7430.160.110.0790.0210.0050.005
Mnatural(ρ = 0.50)0.6740.170.110.0830.0310.0160.014
Mnatural(ρ = 1.0)0.6310.1710.140.1270.0860.0780.078
Madversarial0.7070.4350.2320.1370.4030.1380.038
Madversarial(ρ = 0.10)0.6910.4120.1920.1090.3790.130.047
Madversarial(ρ = 0.25)0.6670.3850.1760.0970.3520.1160.04
Madversarial(ρ = 0.50)0.6530.3650.180.1060.3340.1210.062
Madversarial(ρ = 1.0)0.6380.3560.2230.1860.3370.1750.131
+ +Table 2. Prediction performance of models against different adversarial attacks with different $\epsilon$ . + +![](images/bb7d0c780f5104cf4a267bad78c10d70b48b40cd799cb2ea0006d177f7f5c041.jpg) +Figure 8. Some objects are recognized worse (lower MAP scores) when the experiments are repeated with low-frequent images. Marked objects are the ones that induce differences. + +![](images/1afd3e756b5fcabae537f4164c8ee36ca2ee0f85ab390d958aa4eb279083a62c.jpg) + +![](images/4c0cc9569ca481c9932c67bc3b37215df44689eab28f0993c11ec339303e87e0.jpg) + +![](images/2fa9906a09ba2b9bd505b04626e1c7a7e48488ab31168567fae7fe480516e949.jpg) + +![](images/edceca07366042e4fa2f761268ff9eac4b29d88288c08274c658dbb363707561.jpg) +Figure 9. Some objects are recognized better (higher MAP scores) when the experiments are repeated with low-frequent images. Marked objects are the ones that induce differences. + +![](images/a2311cfe18bba8d979925c1903a163bd8d77b49aaf53ee73e3c19a378f04a2cb.jpg) + +![](images/e01236198707d819785297d2809d8cf58eac012d17f2fc2fdd1e0c6ab05fc49d.jpg) + +![](images/f25d4984245f099fbdcab4ff1cd1e26466c12ceb11f417531a1e08b40762d101.jpg) + +# 7.2. Performance Gain on LFC + +However, the disparity gets interesting when we inspect the performance gap in the opposite direction. We identified 1684 images that for each of these images, the some objects are recognized better (high MAP scores) in comparison to the original images. + +The results are shown in Figure 9. There seems no apparent reasons why these objects are recognized better in low-frequent images, when inspected by human. These observations strengthen our argument in the perceptual disparity between CNN and human also exist in more advanced computer vision tasks other than image classification. + +# 8. Discussion: Are HFC just Noises? + +To answer this question, we experiment with another frequently used image denoising method: truncated singular value decomposition (SVD). We decompose the image and separate the image into one reconstructed with dominant singular values and one with trailing singular values. With this set-up, we find much fewer images supporting the story in Figure 2. Our observations suggest the signal CNN exploit is more than just random "noises". + +# 9. Conclusion & Outlook + +We investigated how image frequency spectrum affects the generalization behavior of CNN, leading to multiple interesting explanations of the generalization behaviors of neural networks from a new perspective: there are multiple signals in the data, and not all of them align with human's visual preference. As the paper comprehensively covers many topics, we briefly reiterate the main lessons learned: + +- CNN may capture HFC that are misaligned with human visual preference (§3), resulting in generalization mysteries such as the paradox of learning label-shuffled data (§4) and adversarial vulnerability (§6). +- Heuristics that improve accuracy (e.g., Mix-up and BatchNorm) may encourage capturing HFC ( $\S 5$ ). Due to the trade-off between accuracy and robustness ( $\S 3$ ), we may have to rethink the value of them. +- Adversarily robust models tend to have smooth convolutional kernels, the reverse is not always true (§6). +- Similar phenomena are noticed in the context of object detection (§7), with more conclusions yet to be drawn. + +Looking forward, we hope our work serves as a call towards future era of computer vision research, where the state-of-the-art is not as important as we thought. + +- A single numeric on the leaderboard, while can significantly boost the research towards a direction, does not reliably reflect the alignment between models and human, while such an alignment is arguably paramount. +- We hope our work will set forth towards a new testing scenario where the performance of low-frequent counterparts needs to be reported together with the performance of the original images. +- Explicit inductive bias considering how a human views the data (e.g., [58, 57]) may play a significant role in the future. In particular, neuroscience literature have shown that human tend to rely on low-frequent signals in recognizing objects [4, 5], which may inspire development of future methods. + +# References + +[1] Naveed Akhtar, Jian Liu, and Ajmal Mian. Defense against universal adversarial perturbations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3389-3398, 2018. 2 +[2] Naveed Akhtar and Ajmal Mian. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 6:14410-14430, 2018. 2 +[3] Devansh Arpit, Stanisław Jastrzebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at memorization in deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 233–242. JMLR.org, 2017. 2 +[4] Bhuvanesh Awasthi, Jason Friedman, and Mark A Williams. Faster, stronger, lateralized: low spatial frequency information supports face processing. Neuropsychologia, 49(13):3583-3590, 2011. 8 +[5] Moshe Bar. Visual objects in context. Nature Reviews Neuroscience, 5(8):617, 2004. 8 +[6] Ronald Newbold Bracewell. The Fourier transform and its applications, volume 31999. McGraw-Hill New York, 1986. 6 +[7] Sébastien Bubeck, Eric Price, and Ilya Razenshteyn. Adversarial examples from computational constraints. arXiv preprint arXiv:1805.10204, 2018. 1 +[8] Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, Aleksander Madry, and Alexey Kurakin. On evaluating adversarial robustness, 2019. 3 +[9] 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. 2 +[10] Anirban Chakraborty, Manaar Alam, Vishal Dey, Anupam Chattopadhyay, and Debdeep Mukhopadhyay. Adversarial attacks and defences: A survey, 2018. 2 +[11] Jinghui Chen and Quanquan Gu. Closing the generalization gap of adaptive gradient methods in training deep neural networks. arXiv preprint arXiv:1806.06763, 2018. 2 +[12] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017. 2 +[13] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. 4 +[14] 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 +[15] Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1019–1028. JMLR.org, 2017. 2 +[16] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochas- + +tic optimization. Journal of Machine Learning Research, 12(Jul):2121-2159, 2011. 5 +[17] Gintare Karolina Dziugaite and Daniel M Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017. 2 +[18] Angus Galloway, Anna Golubeva, Thomas Tanay, Medhat Moussa, and Graham W Taylor. Batch normalization is a cause of adversarial vulnerability. arXiv preprint arXiv:1905.02161, 2019. 5 +[19] 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 International Conference on Learning Representations, 2019. 1 +[20] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics. PMLR, 2010. 4 +[21] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples (2014). In International Conference on Learning Representations, 2015. 1, 2, 3, 7 +[22] 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. 4 +[23] 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. 5, 7 +[24] Warren He, James Wei, Xinyun Chen, Nicholas Carlini, and Dawn Song. Adversarial example defense: Ensembles of weak defenses are not strong. In 11th {USENIX} Workshop on Offensive Technologies ( {WOOT} 17), 2017. 2 +[25] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019. 2 +[26] Geoffrey E Hinton, Alexander Krizhevsky, Ilya Sutskever, and Nitish Srivastva. System and method for addressing overfitting in a neural network, Aug. 2 2016. US Patent 9,406,017. 5 +[27] Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. arXiv preprint arXiv:1905.02175, 2019. 1 +[28] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 5 +[29] Jason Jo and Yoshua Bengio. Measuring the tendency of cnns to learn surface statistical regularities. arXiv preprint arXiv:1711.11561, 2017. 1 +[30] Kenji Kawaguchi, Leslie Pack Kaelbling, and Yoshua Bengio. Generalization in deep learning. arXiv preprint arXiv:1710.05468, 2017. 1 +[31] Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and + +sharp minima. In International Conference on Learning Representations, 2017. 1 +[32] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 4, 5 +[33] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 4 +[34] 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 +[35] David Krueger, Nicolas Ballas, Stanislaw Jastrzebski, Devansh Arpit, Maxinder S Kanwal, Tegan Maharaj, Emmanuel Bengio, Asja Fischer, and Aaron Courville. Deep nets don't learn via memorization. 2017. 2 +[36] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In Workshop of International Conference on Learning Representations, 2017. 2, 7 +[37] 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. 5 +[38] Hyeungill Lee, Sungyeob Han, and Jungwoo Lee. Generative adversarial trainer: Defense to adversarial perturbations with gan. arXiv preprint arXiv:1705.03387, 2017. 2 +[39] 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. 7 +[40] 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. 7 +[41] 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. 7 +[42] 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, 2018. 2, 5 +[43] Saeed Mahloujifar, Dimitrios I. Diochnos, and Mohammad Mahmoody. The curse of concentration in robust learning: Evasion and poisoning attacks from concentration of measure, 2018. 1 +[44] Dongyu Meng and Hao Chen. Magnet: a two-pronged defense against adversarial examples. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pages 135-147. ACM, 2017. 2 +[45] Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. arXiv preprint arXiv:1702.04267, 2017. 2 + +[46] Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, pages 5947-5956, 2017. 1 +[47] Sergei Sergeevich Platonov. The fourier transform of functions satisfying the lipschitz condition on rank 1 symmetric spaces. Siberian Mathematical Journal, 46(6):1108-1118, 2005. 6 +[48] Nasim Rahaman, Devansh Arpit, Aristide Baratin, Felix Draxler, Min Lin, Fred A Hamprecht, Yoshua Bengio, and Aaron Courville. On the spectral bias of deep neural networks. arXiv preprint arXiv:1806.08734, 2018. 4 +[49] Andras Rozsa, Manuel Günther, and Terrance E Boult. Are accuracy and robustness correlated. In Machine Learning and Applications (ICMLA), 2016 15th IEEE International Conference on, pages 227-232. IEEE, 2016. 2 +[50] Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarial robust generalization requires more data, 2018. 1 +[51] Adi Shamir, Itay Safran, Eyal Ronen, and Orr Dunkelman. A simple explanation for the existence of adversarial examples with small hamming distance, 2019. 1 +[52] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 5 +[53] Jiawei Su, Danilo Vasconcellos Vargas, and Kouichi Sakurai. One pixel attack for fooling deep neural networks. IEEE Transactions on Evolutionary Computation, 2019. 2 +[54] 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, 3 +[55] Edward C Titchmarsh. Introduction to the theory of fourier integrals. 1948. 6 +[56] Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. In International Conference on Learning Representations, 2019. 2 +[57] Haohan Wang, Songwei Ge, Eric P. Xing, and Zachary C. Lipton. Learning robust global representations by penalizing local predictive power, 2019. 8 +[58] Haohan Wang, Zexue He, and Eric P. Xing. Learning robust representations by projecting superficial statistics out. In International Conference on Learning Representations, 2019. 1, 8 +[59] Haohan Wang, Aaksha Meghawat, Louis-Philippe Morency, and Eric P Xing. Select-additive learning: Improving generalization in multimodal sentiment analysis. In 2017 IEEE International Conference on Multimedia and Expo (ICME), pages 949–954. IEEE, 2017. 1 +[60] Haohan Wang and Bhiksha Raj. On the origin of deep learning. arXiv preprint arXiv:1702.07800, 2017. 5 +[61] Lei Wu, Zhanxing Zhu, et al. Towards understanding generalization of deep learning: Perspective of loss landscapes. arXiv preprint arXiv:1706.10239, 2017. 2 +[62] Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples + +with adversarial networks. arXiv preprint arXiv:1801.02610, 2018.2 +[63] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. 4 +[64] Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. 5 +[65] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017. 1, 2, 3, 4 +[66] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 5 +[67] Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P Xing, Laurent El Ghaoui, and Michael I Jordan. Theoretically principled trade-off between robustness and accuracy. arXiv preprint arXiv:1901.08573, 2019. 2 \ No newline at end of file diff --git a/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/images.zip b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5a22de3b3b8de85ce4241a0ccbce8a3b1c0dc9b3 --- /dev/null +++ b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:467de1fde2f5b8e327b18e8533d489b05d3726c73ae94003a6d4ab3fca50d73d +size 475141 diff --git a/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/layout.json b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..edb6131654c86f3a84396a8d4370f2c9981924bb --- /dev/null +++ b/highfrequencycomponenthelpsexplainthegeneralizationofconvolutionalneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcf428d92216a1b91bb600767ec8cc0e8f43613295ad1d78a71f042407c75503 +size 550263 diff --git a/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_content_list.json b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2f8fe19192ef28922bd08d10b8cddc000959eaf9 --- /dev/null +++ b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47670c8c7ced62879740c1cefd89947751dbe10bd56c529c725f171ee2b5dc57 +size 81466 diff --git a/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_model.json b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3ffe53b6553fed841f94fcfd3b5a9ad26d8383c4 --- /dev/null +++ b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2512c7ac919d1ed37053dc40fa181df8b147fcd1e51411924d0c89b7f7a8742 +size 99181 diff --git a/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_origin.pdf b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2765c92515e20c54b97d360a70e862416a8e28a1 --- /dev/null +++ b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/afbb2c98-6744-40f5-be0e-2cb192437fa7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ce13f74fe417c18854db9682cc192525185d4d7d0da6f5da2eb70654d913f8d +size 715708 diff --git a/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/full.md b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..14f1e97eb76ec5b68de682b3bbd2bfd569d410bf --- /dev/null +++ b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/full.md @@ -0,0 +1,330 @@ +# High-Order Information Matters: Learning Relation and Topology for Occluded Person Re-Identification + +Guan'an Wang $^{1*}$ , Shuo Yang $^{3*}$ , Huanyu Liu $^{2}$ , Zhicheng Wang $^{2}$ , Yang Yang $^{1}$ , Shuliang Wang $^{3}$ , Gang Yu $^{2}$ , Erjin Zhou $^{2}$ and Jian Sun $^{2}$ + +$^{1}$ Institute of Automation, CAS $^{2}$ MEGVII Technology $^{3}$ Beijing Institute of Technology + +$^{1}$ wangguanan2015@ia.ac.cn $^{2}$ {liuhanyu, wangzhicheng, yugang, zej, sunjian} @megvii.com + +$^{3}\{$ shuoyang,slwang2011 $\} @$ bit.edu.cn $^{1}\{$ yang.yang $\} @$ nlpr.i.a.ac.cn + +# Abstract + +Occluded person re-identification (ReID) aims to match occluded person images to holistic ones across disjoint cameras. In this paper, we propose a novel framework by learning high-order relation and topology information for discriminative features and robust alignment. At first, we use a CNN backbone and a key-points estimation model to extract semantic local features. Even so, occluded images still suffer from occlusion and outliers. Then, we view the local features of an image as nodes of a graph and propose an adaptive direction graph convolutional (ADGC) layer to pass relation information between nodes. The proposed ADGC layer can automatically suppress the message passing of meaningless features by dynamically learning direction and degree of linkage. When aligning two groups of local features from two images, we view it as a graph matching problem and propose a cross-graph embedded-alignment (CGEA) layer to jointly learn and embed topology information to local features, and straightly predict similarity score. The proposed CGEA layer not only take full use of alignment learned by graph matching but also replace sensitive one-to-one matching with a robust soft one. Finally, extensive experiments on occluded, partial, and holistic ReID tasks show the effectiveness of our proposed method. Specifically, our framework significantly outperforms state-of-the-art by $6.5\%$ mAP scores on Occluded-Duke dataset. Code is available at https://github.com/wangguanan/HOREID. + +# 1. Introduction + +Person re-identification (ReID) [6, 43] aims to match images of a person across disjoint cameras, which is widely + +![](images/cf7c2ce0dd9c99ffb77556e746a90438d3e727a555b1f5fe3f6f4d9fde4c0e05.jpg) + +![](images/b900706804a96c628caf8b08418bf9681f3a87ba7736842babaed7dfaebae719.jpg) + +![](images/cf5d22bd211dea8df452cb9e541314f6d835c02e49e2ee5ce3c540abf9ad1e8f.jpg) + +![](images/34bf2fcd6c15695da6cd1f63190f83f78ab4dd384e948141582c78263c944d49.jpg) + +![](images/ab458b5fde033b4492fc0c6e096c188b756f1092dceff2a40c4a6ca7ed9ca6af.jpg) +(a) Ocluded Images + +![](images/42e32a2ba5a70df22c51312d38877fbbd6d8e958d3922c32931926224190360d.jpg) +Use graph lean relation information from edges + +![](images/7587268427846ddc7e188f8554c70023ab5817a2314235add43a6368e4792f05.jpg) +Feature Learning +Alignment Learning +Figure 1. Illustration of high-order relation and topology information. (a) In occluded ReID, key-points suffer from occlusions $(12)$ and outliers $(3)$ . (b) Vanilla method relies on one-order key-points information in all three stages, which is not robust. (c) Our method learn features via an graph to model relation information, and view alignment as a graph matching problem to model topology information by learning both node-to-node and edge-to-edge correspondence. + +![](images/b5e8f1f70fe24aeeed539400c00411086ec006e79076de39b90a34244dc873e7.jpg) +Matching + +used in video surveillance, security and smart city. Recently, various of methods [25, 39, 18, 44, 16, 19, 43, 11, 35] have been proposed for person ReID. However, most of them focus on holistic images, while neglecting occluded ones, which may be more practical and challenging. As shown in Figure 1(a), persons can be easily occluded by some obstacles (e.g. baggage, counters, crowded public, cars, trees) or walk out of the camera fields, leading to occluded images. Thus, it is necessary to match persons with occluded observation, which is known as occluded person Re-ID problem [48, 26]. + +Compared with matching persons with holistic images, + +occluded ReID is more challenging due to the following reasons [45, 48]: (1) With occluded regions, the image contains less discriminative information and is more likely to match wrong persons. (2) Part-based features have been proved to be efficient [35] via part-to-part matching. But they require strict person alignment in advance, thus cannot work very well in seriously occluded situations. Recently, many occluded/partial person ReID methods [48, 49, 26, 10, 8, 34, 23] are proposed, most of them only consider one-order information for feature learning and alignment. For example, the pre-defined regions [35], poses [26] or human parsing [10] are used to for feature learning and alignment. We argue that besides one-order information, high-order one should be imported and may work better for occluded ReID. + +In Figure 1(a), we can see that key-points information suffers from occlusion (①②) and outliers (③). For example, key-points ① and ② are occluded, leading to meaningless features. Key-points ③ are outliers, leading to misalignment. A common solution is shown in Figure 1(b). It extracts local features of key-point regions, supposes all key-points are accurate and local features well aligned. In this solution, all three stages rely on the one-order keypoints information, which is not very robust. In this paper, as shown in Figure 1(c), we propose a novel framework for both discriminative feature and robust alignment. In feature learning stage, we view local features of an image as nodes of a graph to learn relation information. By passing message in the graph, the meaningless features caused by occluded key-points can be improved by their neighbor meaningful features. In alignment stage, we use graph matching algorithm [40] to learn robust alignment. Besides aligning with node-to-node correspondence, it models extra edge-to-edge correspondence. We then embed the alignment information to features by constructing a cross-images graph, where node message of an image can be passed to nodes of the other images. Thus, the features of outlier key-points can be repaired by its corresponding features on the other image. Finally, instead of computing similarity with predefined distance, we use a network to learn similarity supervised by a verification loss. + +Specifically, we propose a novel framework jointly modeling high-order relation and human-topology information for occluded person re-identification. As shown in Figure 2, our framework includes three modules, i.e. one-order semantic module $(S)$ , high-order relation module $(\mathcal{R})$ and high-order human-topology module $(\mathcal{T})$ . (1) In the $S$ , we utilize a CNN backbone to learn feature maps and a human key-points estimation model to learn key-points. Then we can extract semantic features of corresponding key-points. (2) In the $\mathcal{R}$ , we view the learned semantic features of an image as nodes of a graph and propose an adaptive-direction graph convolutional (ADGC) layer to learn and pass mes + +sages of edge features. The ADGC layer can automatically decide the direction and degree of every edge. Thus it can promote the message passing of semantic features and suppress that of meaningless and noisy ones. At last, the learned nodes contain both semantic and related information. (3) In the $\mathcal{T}$ , We propose a cross-graph embedded-alignment (CGEA) layer. It takes two graphs as inputs, learns correspondence of nodes across the two graphs using graph-matching strategy, and passes messages by viewing the learned correspondence as an adjacency matrix. Thus, the related features can be enhanced, and alignment information can be embedded in features. Finally, to avoid hard one-to-one alignment, we predict the similarity of the two graphs by mapping them to a logit and supervise with a verification loss. + +The main contributions of this paper are summarized as follows: (1) A novel framework of jointly modeling high-order relation and human-topology information is proposed to learn well and robustly aligned features for occluded ReID. To our best of our knowledge, this is the first work that introduces such high-order information to occluded ReID. (2) An adaptive directed graph convolutional (ADGC) layer is proposed to dynamically learn the directed linkage of the graph, which can promote message passing of semantic regions and suppress that of meaningless regions such as occlusion or outliers. With it, we can better model the relation information for occluded ReID. (3) A cross-graph embedded-alignment (CGEA) layer conjugated with verification loss is proposed to learn feature alignment and predict similarity score. They can avoid sensitive hard one-to-one person matching and perform a robust soft one. (4) Extensive experimental results on occluded, partial, and holistic ReID datasets demonstrate that the proposed model performs favorably against state-of-the-art methods. Especially on the occluded-Duke dataset, our method significantly outperforms state-of-the-art by at least $3.7\%$ and $6.5\%$ in terms of Rank-1 and mAP scores. + +# 2. Related Works + +Person Re-Identification. Person re-identification addresses the problem of matching pedestrian images across disjoint cameras [6]. The key challenges lie in the large intra-class and small inter-class variation caused by different views, poses, illuminations, and occlusions. Existing methods can be grouped into hand-crafted descriptors [25, 39, 18], metric learning methods [44, 16, 19] and deep learning algorithms [43, 11, 35, 36, 37, 22]. All those ReID methods focus on matching holistic person images, but cannot perform well for the occluded images, which limits the applicability in practical surveillance scenarios. + +Occluded Person Re-identification. Given occluded probe images, occluded person re-identification [48] aims to find the same person of full-body appearance in dis-joint + +![](images/5e896ff58d585879aa9bb59bf385fdc3cf548ddc79dee8821113403aca91aba8.jpg) +Figure 2. Illustration of our proposed framework. It consists of an one-order semantic module $S$ , a high-order relation module $\mathcal{R}$ and a high-order topology module $\mathcal{T}$ . The module $S$ learns semantic local features of key-point regions. In $\mathcal{R}$ , we view the local features of an image as nodes of a graph and propose an adaptive direction graph convolutional (ADGC) layer to pass relation information between nodes. In $\mathcal{T}$ , we view alignment problem as a graph matching problem and propose a cross-graph embedded-alignment (CGEA) layer to joint learn and embed topology information to local features, and straightly predict similarity scores. + +cameras. This task is more challenging due to incomplete information and spatial misalignment. Zhuo et al.[48] use occluded/non-occluded binary classification(OBC) loss to distinguish the occluded images from holistic ones. In their following works, a saliency map is predicted to highlight the discriminative parts, and a teacher-student learning scheme further improves the learned features. Miao et al.[26] propose a pose guided feature alignment method to match the local patches of probe and gallery images based on the human semantic key-points. And they use a pre-defined threshold of key-points confidence to determine whether the part is occluded or not. Fan et al.[3] use a spatial-channel parallelism network (SCPNet) to encode part features to specific channels and fuse the holistic and part features to get discriminative features. Luo et al.[23] use a spatial transform module to transform the holistic image to align with the partial ones, then calculate the distance of the aligned pairs. Besides, several efforts are put on the spatial alignment of the partial Re-ID tasks. + +Partial Person Re-Identification. Accompanied by occluded images, partial ones often occur due to imperfect detection and outliers of camera views. Like occluded person ReID, partial person ReID [45] aims to match partial probe images to gallery holistic images. Zheng et al.[45] propose a global-to-local matching model to capture the spatial layout information. He et al.[7] reconstruct the feature map of a partial query from the holistic pedestrian, and further improve it by a foreground-background mask to avoid the influence of backgrounds clutter in [10]. Sun et al.propose a Visibility-aware Part Model(VPM) in [34], which learns to perceive the visibility of regions through self-supervision. + +Different from existing occluded and partial ReID methods which only use one-order information for feature learning and alignment, we use high-order relation and human + +topology information for feature learning and alignment, thus achieve better performance. + +# 3. The Proposed Method + +This section introduces our proposed framework, including a one-order semantic module $(\mathcal{S})$ to extract semantic features of human key-point regions, a high-order relation module $(\mathcal{R})$ to model the relation-information among different semantic local features, and a high-order humantopology module $(\mathcal{T})$ to learn robust alignment and predict similarities between two images. The three modules are jointly trained in an end-to-end way. An overview of the proposed method is shown in Figure 2. + +Semantic Features Extraction. The goal of this module is to extract one-order semantic features of key-point regions, which is inspired by two cues. Firstly, part-based features have been shown to be efficient for person ReID [35]. Secondly, accurate alignment of local features is necessary in occluded/partial ReID [8, 34, 10]. Following the ideas above and inspired by recent developments on person ReID [43, 35, 24, 4] and human key-points prediction [2, 33], we utilize a CNN backbone to extract local features of different key-points. Please note that although the human key-points prediction have achieved high accuracy, they still suffer from unsatisfying performance under occluded/partial images [17]. Those factors lead to inaccurate key-points positions and their confidence. Thus, the following relation and human-topology information are needed and will be discussed in the next section. + +Specifically, given a pedestrian image $x$ , we can get its feature map $m_{cnn}$ and key-points heat map $m_{kp}$ through the CNN model and key-points model. Through an outer product $(\otimes)$ and a global average pooling operations $(g(\cdot))$ , + +we can get a group of semantic local features of key-points regions $V_{l}^{S}$ and a global feature $V_{g}^{S}$ . The procedures can be formulated in Eq.(1), where $K$ is key-point number, $v_{k} \in R^{c}$ and $c$ is channel number. Note that $m_{kp}$ is obtained by normalizing original key-points heatmap with a softmax function for preventing from noise and outliers. This simple operation is shown to be effective in experiment section. + +$$ +V _ {l} ^ {S} = \left\{v _ {k} ^ {S} \right\} _ {k = 1} ^ {K} = g \left(m _ {c n n} \otimes m _ {k p}\right) \tag {1} +$$ + +$$ +V _ {g} ^ {S} = v _ {K + 1} ^ {S} = g (m _ {c n n}) +$$ + +Training Loss. Following [43, 11], we utilize classification and triplet losses as our targets as in Eq.(2). Here, $\beta_{k} = \max (m_{kp}[k])\in [0,1]$ is the $k^{th}$ key-point confidence, and $\beta_{K + 1} = 1$ for global features, $p_{v_k^S}$ is the probability of feature $v_{k}^{s}$ belonging to its ground truth identity predicted by a classifier, $\alpha$ is a margin, $d_{v_{ak}^{s},v_{pk}^{s}}$ is the distance between a positive pair $(v_{ak}^{S},v_{pk}^{S})$ from the same identity, $(v_{ak}^{S},v_{pk}^{S})$ is from different identities. The classifiers for different local features are not shared. + +$$ +\begin{array}{l} \mathcal {L} _ {S} = \frac {1}{K + 1} \sum_ {k = 1} ^ {K + 1} \beta_ {k} \left[ \mathcal {L} _ {c l s} \left(v _ {k} ^ {s}\right) + \mathcal {L} _ {t r i} \left(v _ {k} ^ {s}\right) \right] \\ = \frac {1}{K + 1} \sum_ {k = 1} ^ {K + 1} \beta_ {k} \left[ - \log p _ {v _ {k} ^ {s}} + | \alpha + d _ {v _ {a k} ^ {S}, v _ {p k} ^ {S}} - d _ {v _ {a k} ^ {S}, v _ {n k} ^ {S}} | _ {+} \right] \tag {2} \\ \end{array} +$$ + +# 3.1. High-Order Relation Learning + +Although we have the one-order semantic information of different key-point regions, occluded ReID is more challenging due to incomplete pedestrian images. Thus, it is necessary to exploit more discriminative features. We turn to the graph convolutional network (GCN) methods [1] and try to model the high-order relation information. In the GCN, semantic features of different key-point regions are viewed as nodes. By passing messages among nodes, not only the one-order semantic information (node features) but also the high-order relation information (edge features) can be jointly considered. + +However, there is still a challenge for occluded ReID. Features of occluded regions are often meaningless even noisy. When passing those features in a graph, it brings in more noise and has side effects on occluded ReID. Hence, we propose a novel adaptive-direction graph convolutional (ADGC) layer to learn the direction and degree of message passing dynamically. With it, we can automatically suppress the message passing of meaningless features and promote that of semantic features. + +Adaptive Directed Graph Convolutional Layer: A simple graph convolutional layer [15] has two input, an adjacent matrix $\mathbf{A}$ of the graph and the features $\mathbf{X}$ of all node, + +![](images/40bb5c9c7b700e7a1f757ee5e3f25765058a02c2a07c279e97ecc8624ff64e89.jpg) +Figure 3. Illustration of the proposed adaptive directed graph convolutional (ADGC) layers. $A$ is a pre-defined adjacent matrix $\boxminus$ , $\boxplus$ , $\boxtimes$ are element-wise subtraction, add and multiplication. abs, bn and fc are absolution, batch normalization and fully connected layer, trans is transpose. Please refer text for more details. + +output can be calculated by: + +$$ +O = \hat {A} X W +$$ + +where $\hat{A}$ is normalized version of A and W refers to parameters. + +We improve the simple graph convolutional layer by adaptively learning the adjacent matrix (the linkage of node) based on the input features. We assume that given two local features, the meaningful one is more similar to the global feature than that of meaningless one. Therefore, we propose an adaptive directed graph convolutional (ADGC) layer, whose inputs are a global feature $V_{g}$ and K local features $V_{l}$ , and a pre-defined graph (adjacent matrix is A). We use differences between local features $V_{l}$ and global feature $V_{g}$ to dynamically update the edges' weights of all nodes in the graph, resulting $A^{adp}$ . Then a simple graph convolutional can be formulated by multiplication between $V_{l}$ and $A^{adp}$ . To stabilize training, we fuse the input local features $V_{l}$ to the output of our ADGC layer as in the ResNet [7]. Details are shown in Figure 3. Our adaptive directed graph convolutional (ADGC) layer can be formulated in Eq.(3), where $f_{1}$ and $f_{2}$ are two unshared fully-connected layers. + +$$ +V ^ {o u t} = \left[ f _ {1} \left(A ^ {a d p} \otimes V _ {l} ^ {i n}\right) + f _ {2} \left(V _ {l} ^ {i n}\right), V _ {g} ^ {i n} \right] \tag {3} +$$ + +Finally, we implement our high-order relation module $f_{R}$ as cascade of ADGC layers. Thus, given an image $x$ , we can get its semantic features $V^{S} = \{v_{k}^{S}\}_{k=1}^{K+1}$ via Eq.(1). Then its relation features $V^{R} = \{v_{k}^{R}\}_{k=1}^{K+1}$ can be formulated as below: + +$$ +V ^ {R} = f _ {R} \left(V ^ {S}\right) \tag {4} +$$ + +Loss and Similarity. We use classification and triplet losses as our targets as in Eq.(5), where the definition of $\mathcal{L}_{ce}(\cdot)$ and $\mathcal{L}_{tri}(\cdot)$ can be found in Eq.(2). Note that $\beta_{k}$ is the $k^{th}$ key-point confidence. + +$$ +\mathcal {L} ^ {R} = \frac {1}{K + 1} \sum_ {k = 1} ^ {K + 1} \beta_ {k} \left[ \mathcal {L} _ {c l s} \left(v _ {k} ^ {R}\right) + \mathcal {L} _ {t r i} \left(v _ {k} ^ {R}\right) \right] \tag {5} +$$ + +Given two images $x_{1}$ and $x_{2}$ , we can get their relation features $V_{1}^{R} = \{v_{1k}^{R}\}_{k=1}^{K+1}$ and $V_{1}^{R} = \{v_{2k}^{R}\}_{k=1}^{K+1}$ via Eq.(4), and calculate their similarity with cosine distance as in Eq.(6). + +$$ +s _ {x _ {1}, x _ {2}} ^ {R} = \frac {1}{K + 1} \sum_ {k = 1} ^ {K + 1} \sqrt {\beta_ {1 k} \beta_ {2 k}} \operatorname {c o s i n e} \left(v _ {1 k} ^ {R}, v _ {2 k} ^ {R}\right) \tag {6} +$$ + +# 3.2. High-Order Human-Topology Learning + +Part-based features have been proved to be very efficient for person ReID [35, 34]. One simple alignment strategy is straightly matching features of the same key-points. However, this one-order alignment strategy cannot deal with some bad cases such as outliers, especially in heavily occluded cases [17]. Graph matching [40, 38] can naturally take the high-order human-topology information into consideration. But it can only learn one-to-one correspondence. This hard alignment is still sensitive to outliers and has a side effect on performance. In this module, we propose a novel cross-graph embedded-alignment layer, which can not only make full use of human-topology information learned by graph matching algorithm, but also avoid sensitive one-to-one alignment. + +Revision of Graph Matching. Given two graphs $G_{1} = (V_{1}, E_{1})$ and $G_{2} = (V_{2}, E_{2})$ from image $x_{1}$ and $x_{2}$ , the goal of graph matching is to learn a matching matrix $U \in [0, 1]^{K \times K}$ between $V_{1}$ and $V_{2}$ . Let $U \in [0, 1]$ be an indicator vector such that $U_{ia}$ is the matching degree between $v_{1i}$ and $v_{2a}$ . A square symmetric positive matrix $M \in R^{KK \times KK}$ is built such that $M_{ia;jb}$ measures how well every pair $(i, j) \in E_{1}$ matches with $(a, b) \in E_{2}$ . For pairs that do not form edges, their corresponding entries in the matrix are set to 0. The diagonal entries contain node-to-node scores, whereas the off-diagonal entries contain edge-to-edge scores. Thus, the optimal matching $u^{*}$ can be formulated as below: + +$$ +U ^ {*} = \underset {U} {\operatorname {a r g m a x}} U ^ {T} M U, \text {s . t .} \| U \| = 1 \tag {7} +$$ + +Following [40], we parameter matrix $M$ in terms of unary and pair-wise point features. The optimization procedure is formulated by a power iteration and a bi-stochastic operations. Thus, we can optimize $U$ in our deep-learning framework with stochastic gradient descent. Restricted by pages, we don't show more details of graph matching, please refer to the paper [38, 40]. + +Cross-Graph Embedded-Alignment Layer with Similarity Prediction. We propose a novel cross-graph embedded-alignment layer (CGEA) that both considering the high-order human-topology information learned by GM and avoiding the sensitive one-to-one alignment. The proposed CGEA layer takes two sub-graphs from two images as inputs and outputs the embedded features, including both + +![](images/27bb00582162034ae00301dab5438fcc85dab163f4e5c6a4b8cae88a23939f8f.jpg) +Figure 4. Illustration of the cross-graph embedded-alignment layer. Here, $\otimes$ is matrix multiplication, $fc + relu$ means fully-connected layer and Rectified Linear Unit, $GM$ means graph matching operation, $U$ is the learned affinity matrix. Please refer text for more details. + +semantic features and the human-topology guided aligned features. + +The structure of our proposed CGEA layer is shown in Figure 4. It takes two groups of features and outputs two groups of features. Firstly, with two groups of nodes $V_{1}^{in} \in R^{(K + 1) \times C^{in}}$ and $V_{2}^{in} \in R^{(K + 1) \times C^{in}}$ , we embed them to a hidden space with a fully-connected layer and a ReLU layer, getting two groups of hidden features $V_{1}^{h} \in R^{(K + 1) \times C^{out}}$ and $V_{2}^{h} \in R^{(K + 1) \times C^{out}}$ . Secondly, we perform graph matching between $V_{1}^{h}$ and $V_{2}^{h}$ via Eq.(7), and get an affinity matrix $U^{k \times k}$ between $V_{1}^{h}$ and $V_{2}^{h}$ . Here, $U(i,j)$ means correspondence between $v_{1i}^{h}$ and $v_{2j}^{h}$ . Finally, the output can be formulated in Eq.(8), where $[\cdot, \cdot]$ means concatenation operation along channel dimension, $f$ is a fully-connected layer. + +$$ +\begin{array}{l} V _ {1} ^ {\text {o u t}} = f \left(\left[ V _ {1} ^ {h}, U \otimes V _ {2} ^ {h} \right]\right) + V _ {1} ^ {h} \tag {8} \\ V _ {2} ^ {\text {o u t}} = f \left(\left[ V _ {2} ^ {h}, U ^ {T} \otimes V _ {1} ^ {h} \right]\right) + V _ {2} ^ {h} \\ \end{array} +$$ + +We implement our high-order topology module $(\mathcal{T})$ with a cascade of CGEA layers $f_{T}$ and a similarity prediction layer $f_{P}$ . Given a pair of images $(x_{1}, x_{2})$ , we can get their relation features $(V_{1}^{R}, V_{2}^{R})$ via Eq.(4), and then their topology features of $(V_{1}^{T}, V_{2}^{T})$ via Eq.(9). After getting the topology features pair $(V_{1}^{T}, V_{2}^{T})$ , we can compute their similarity using Eq.(10), where $|\cdot|$ is element-wise absolution operation, $f_{s}$ is a fully-connected layer from $C_{T}$ to 1, $\sigma$ is sigmoid activation function. + +$$ +\left(V _ {1} ^ {T}, V _ {2} ^ {T}\right) = F _ {T} \left(V _ {1} ^ {R}, V _ {2} ^ {R}\right) \tag {9} +$$ + +$$ +s _ {x _ {1}, x _ {2}} ^ {T} = \sigma \left(f _ {s} \left(- \left| V _ {1} ^ {T} - V _ {2} ^ {T} \right|\right)\right) \tag {10} +$$ + +Verification Loss. The loss of our high-order humantopology module can be formulated in Eq.(11), where $y$ is their ground truth, $y = 1$ if $(x_{1}, x_{2})$ from the same person, otherwise $y = 0$ . + +$$ +\mathcal {L} _ {T} = y \log s _ {x _ {1}, x _ {2}} ^ {T} + (1 - y) \log \left(1 - s _ {x _ {1}, x _ {2}} ^ {T}\right) \tag {11} +$$ + +# 4. Train and Inference + +During the training stage, the overall objective function of our framework is formulated in Eq.(12), where $\lambda_{*}$ are + +weights of corresponding terms. We train our framework end-to-end by minimizing the $\mathcal{L}$ . + +$$ +\mathcal {L} = \mathcal {L} _ {S} + \lambda_ {R} \mathcal {L} _ {R} + \lambda_ {T} \mathcal {L} _ {T} \tag {12} +$$ + +For the similarity, given a pair of images $(x_{1},x_{2})$ , we can get their relation information based similarity $s_{x_1,x_2}^R$ from Eq.(6) and topology information based similarity $s_{x_1,x_2}^T$ from Eq.(10). The final similarity can be calculated by combing the two kind of similarities. + +$$ +s = \gamma s _ {x _ {1}, x _ {2}} ^ {R} + (1 - \gamma) s _ {x _ {1}, x _ {2}} ^ {T} \tag {13} +$$ + +When inferring, given an query image $x_{q}$ , we first compute its similarity $x^{R}$ with all gallery images and get its top $n$ nearest neighbors. Then we compute the final similarity $s$ in Eq.(13) to refine the top $n$ . + +# 5. Experiments + +# 5.1. Implementation Details + +Model Architectures. For CNN backbone, as in [43], we utilize ResNet50 [7] as our CNN backbone by removing its global average pooling (GAP) layer and fully connected layer. For classifiers, following [24], we use a batch normalization layer [13] and a fully connect layer followed by a softmax function. For the human key-points model, we use HR-Net [33] pre-trained on the COCO dataset [20], a state-of-the-art key-points model. The model predicts 17 key-points, and we fuse all key-points on head region and get final $K = 14$ key-points, including head, shoulders, elbows, wrists, hips, knees, and ankles. + +Training Details. We implement our framework with Pytorch. The images are resized to $256 \times 128$ and augmented with random horizontal flipping, padding 10 pixels, random cropping, and random erasing [47]. When test on occluded/partial datasets, we use extra color jitter augmentation to avoid domain variance. The batch size is set to 64 with 4 images per person. During the training stage, all three modules are jointly trained in an end-to-end way for 120 epochs with the initialized learning rate 3.5e-4 and decaying to its 0.1 at 30 and 70 epochs. Please refer our code1 for implementation details. + +Evaluation Metrics. We use standard metrics as in most person ReID literatures, namely Cumulative Matching Characteristic (CMC) curves and mean average precision (mAP), to evaluate the quality of different person re-identification models. All the experiments are performed in single query setting. + +# 5.2. Experimental Results + +Results on Occluded Datasets. We evaluate our proposed framework on two occluded datasets, i.e. Occluded-Duke [26] and Occluded-ReID [48]. Occluded-Duke is + +
DatasetTrain Nums (ID/Image)Testing Nums (ID/Image)
GalleryQuery
Market-1501751/12,936750/19,732750/3,368
DukeMTMC-reID702/16,5221,110/17,661702/2,228
Occluded-Duke702/15,6181,110/17,661519/2,210
Occluded-ReID-200/1,000200/1,000
Partial-REID-60/30060/300
Partial-iLIDS-119/119119/119
+ +Table 1. Dataset details. We extensively evaluate our proposed method on 6 public datasets, including 2 holistic, 2 occluded and 2 partial ones. + +
MethodsOccluded-DukeOccluded-REID
Rank-1mAPRank-1mAP
Part-Aligned [41]28.820.2--
PCB [35]42.633.741.338.9
Part Bilinear [32]36.9---
FD-GAN [5]40.8---
AMC+SWM [45]--31.227.3
DSR [8]40.830.472.862.8
SFR [9]42.332--
Ad-Occluded [12]44.532.2--
TCSDO [49]--73.777.9
FPR [10]--78.368.0
PGFA [26]51.437.3--
HOReID (Ours)55.143.880.370.2
+ +Table 2. Comparison with state-of-the-arts on two occluded datasets, i.e. Occluded-Duke [26] and Occluded-REID [48]. + +selected from DukeMTMC-reID by leaving occluded images and filter out some overlap images. It contains 15,618 training images, 17,661 gallery images, and 2,210 occluded query images. Occluded-ReID is captured by the mobile camera, consist of 2000 images of 200 occluded persons. Each identity has five full-body person images and five occluded person images with different types of severe occlusions. + +Four kinds of methods are compared, they are vanilla holistic ReID methods [41, 35], holistic ReID methods with key-points information [32, 5], partial ReID methods [45, 8, 9] and occluded ReID methods [12, 49, 10, 26]. The experimental results are shown in Table 2. As we can see, there is no significant gap between vanilla holistic ReID methods and holistic methods with key-points information. For example, PCB [34] and FD-GAN [5] both achieve approximately $40\%$ Rank-1 score on Occluded-Duke dataset, showing that simply using key-points information may not significantly benefit occluded ReID task. For partial ReID and occluded ReID methods, they both achieve an obvious improvement on occluded datasets. For example, DSR [8] get a $72.8\%$ and FPR [10] get a $78.3\%$ Rank-1 scores on Occluded-REID dataset. This shows that occluded and par + +
MethodsPartial-REIDPartial-iLIDS
Rank-1Rank-3Rank-1Rank-3
DSR [8]50.770.058.867.2
SFR [9]56.978.563.974.8
VPM [34]67.781.965.574.8
PGFA [26]68.080.069.180.9
AFPB [48]78.5---
FPR [10]81.0-68.1-
TCSDO [49]82.7---
HOReID(Ours)85.391.072.686.4
+ +Table 3. Comparison with state-of-the-arts on two partial datasets, i.e. Partial-REID [45] and Partial-iLIDS [8] datasets. Our method achieves best performance on the two partial datasets. + +tial ReID task share similar difficulties, i.e. learning discriminative feature and feature alignment. Finally, our proposed framework achieves best performance on Occluded-Duke and Occlude-REID datasets at $55.1\%$ and $80.4\%$ in terms of Rank-1 score, showing the effectiveness. + +Results on Partial Datasets. Accompanied by occluded images, partial ones often occur due to imperfect detection, outliers of camera views, and so on. To further evaluate our proposed framework, in Table 3 we also report the results on two partial datasets, Partial-REID [45] and Partial-iLIDS [8]. Partial-REID includes 600 images from 60 people, with five full-body images and five partial images per person, which is only used for the test. Partial-iLIDS is based on the iLIDS [8] dataset and contains a total of 238 images from 119 people captured by multiple non-overlapping cameras in the airport, and their occluded regions are manually cropped. Following [34, 10, 49], because the two partial datasets are too small, we use Market-1501 as training set and the two partial datasets as test set. As we can see, our proposed framework significantly outperforms the other methods by at least $2.6\%$ and $4.4\%$ in terms of Rank-1 score on the two datasets. + +Results on Holistic Datasets. Although recent occluded/partial ReID methods have obtained improvements on occluded/partial datasets, they often fail to get a satisfying performance on holistic datasets. This is caused by the noise during feature learning and alignment. In this part, we show that our proposed framework can also achieve satisfying performance on holistic ReID datasets including Market-1501 and DuekMTMTC-reID. Market-1501 [42] contains 1,501 identities observed from 6 camera viewpoints, 19,732 gallery images and 12,936 training images, all the dataset contains few of occluded or partial person images. DukeMTMC-reID [28, 46] contains 1,404 identities, 16,522 training images, 2,228 queries, and 17,661 gallery images. + +Specifically, we conduct experiments on two common + +
MethodsMarket-1501DukeMTMC
Rank-1mAPRank-1mAP
PCB [35]92.377.481.866.1
VPM [34]93.080.883.672.6
BOT [24]94.185.786.476.4
SPReID [14]92.581.3--
MGCAM [30]83.874.346.746.0
MaskReID [27]90.075.3--
FPR [10]95.486.688.678.4
PDC [31]84.263.4--
Pose-transfer [21]87.768.930.128.2
PSE [29]87.769.027.330.2
PGFA [26]91.276.882.665.5
HORId(Ours)94.284.986.975.6
+ +Table 4. Comparison with state-of-the-arts on two holistic datasets, Market-1501 [42] and DukeMTMc-reID [28, 46]. Our method achieves comparable performance on holistic ReID. + +holistic ReID datasets Market-1501 [42] and DukeMTMC-reID [28, 46], and compare with 3 vanilla ReID methods [35, 34, 24], 3 ReID methods with human-parsing information [14, 30, 27, 10] and 4 holistic ReID methods with key-points information [31, 21, 29, 26]. The experimental results are shown in Table 4. As we can see, the 3 vanilla holistic ReID methods obtain very competitive performance. For example, BOT [24] gets a $94.1\%$ and $86.4\%$ Rank-1 score on two datasets. However, for the holistic ReID methods using external cues such human-parsing and key-points information perform worse. For example, SPReID [14] uses human-parsing information and only achieves $92.5\%$ Rannk-1 score on Market-1501 dataset. PFGA [26] uses key-points information and only gets a $82.6\%$ Rank-1 score on DukeMTMC-reID dataset. This shows that simply using external cues such as human-parsing and key-points may not bring improvement on holistic ReID datasets. This is caused by that the most images holistic ReID datasets are well detected, vanilla holistic ReID methods is powerful enough to learn discriminative features. Finally, we propose a adaptive direction graph convolutional (ADGC) layer which can suppress noisy features and a cross-graph embedded-alignment (CGEA) layer which can avoid hard one-to-one alignment. With the proposed ADGC and CGEA layers, our framework also achieves comparable performance on the two holistic ReID datasets. Specifically, we achieve about $94\%$ and $87\%$ Rank-1 scores on Market-1501 and DukeMTMC-reID datasets. + +# 5.3. Model Analysis + +Analysis of Proposed Modules. In this part, we analyze our proposed one-order semantic module $(\mathcal{S})$ , high- + +
IndexSRTRank-1mAP
1×××49.939.5
2✓××52.442.8
3✓✓×53.943.2
4✓✓✓55.143.8
+ +order relation module $(\mathcal{R})$ and high-order human-topology module $(\mathcal{T})$ . The experimental results are shown in Table 5. Firstly, in index-1, we remove all the three modules degrading our framework to an IDE model [43], where only a global feature $V_{g}$ is available. Its performance is unsatisfying and only achieves $49.9\%$ Rank-1 score. Secondly, in index-2, when using one-order semantic information, the performance is improved by $2.5\%$ and up to $52.4\%$ Rank-1 score. This shows that the semantic information from keypoints is useful for learning and aligning features. Thirdly, in index-3, extra high-order relation information is added, and the performance is further improved by $1.5\%$ achieving $53.9\%$ . This demonstrates the effectiveness of our module $\mathcal{R}$ . Finally, in index-4, our full framework achieves the best accuracy at $55.1\%$ Rank-1 score, showing the the effectiveness of our module $\mathcal{T}$ . + +Analysis of Proposed layers. In this part, we further analyze normalization of key-point confidences (NORM), adaptive direction graph convolutional (ADGC) layer and cross-graph embedded-alignment (CGEA) layer, which are the key components of for semantic module $(S)$ , relation module $(\mathcal{R})$ and topology module $(\mathcal{T})$ . Specifically, when removing NORM, straightly use the original confidence score. When removing ADGC, in Eq.(3), we replace $A^{adj}$ with a fixed adjacency matrix linked like a human-topology. Thus, the relation module $(S)$ degrades to a vanilla GCN, which cannot suppress noise information. When removing CGEA, in Eq.(8), we replace $U_{1}$ and $U_{2}$ with a fully-connected matrix. That is, every node of graph 1 is connected to all nodes of graph 2. Then, the topology module $(\mathcal{T})$ contains no high-order human-topology information for feature alignment and degrades to a vanilla verification module. The experimental results are shown in Table 6. As we can see, when removing NORM, ADGC or CGEA, the performance significantly drop by $2.6\%$ , $1.4\%$ and $0.7\%$ rank-1 scores. The experimental results show the effectiveness of our proposed NORM, ADGC and CGEA components. + +Analysis of Parameters. We evaluate the effects of parameters in Eq.(13), i.e. $\gamma$ and $n$ . The results are shown in Figure 5, and the optimal setting is $\gamma = 0.5$ and $n = 8$ . When analyzing one parameter, the other is fixed at the op + +Table 5. Analysis of one-order semantic module $(S)$ , high-order relation module $(\mathcal{R})$ and high-order human-topology module $(\mathcal{T})$ . The experimental results show the effectiveness of our proposed three modules. + +
NORMADGCCGEARank-1mAP
×✓✓52.540.4
✓×✓53.742.2
✓✓×54.443.5
✓✓✓55.143.8
+ +Table 6. Analysis of normalization of key-point confidences (NORM), adaptive direction graph convolutional (ADGC) layer and cross-grpah embedded-alignment (CGEA) layer. The experimental results show the effectiveness of our proposed layers. + +![](images/67ba8e9dcfae4ddc6760129b7449bdec21f5aa493af8c1176c6807a80414bcc3.jpg) +Figure 5. Analysis of parameters $\gamma$ and $n$ in Eq.(13). The optimal values are $\gamma = 0.5$ and $n = 8$ . When analyze one of them, the other one is fixed as its optimal value. The The experimental results show that our model is robust to different parameters. + +![](images/cd6ef89028a2a2c1a00efc361b4ebe9bfec561dbfb841758b095b448e4acddf6.jpg) + +timal value. It is clear that, when using different $\gamma$ and $n$ , our model stably outperforms the baseline model. The experimental results show the our proposed framework is robust to different weights. Please note that the performances here are different from Table 2, where the former achieves $57\%$ while and the latter $55\%$ . This is because the latter is computed using average of 10 times for fair comparison. + +# 6. Conclusion + +In this paper, we propose a novel framework to learn high-order relation information for discriminative features and topology information for robust alignment. For learning relation information, we formulate local features of an image as nodes of a graph and propose an adaptive-direction graph convolutional (ADGC) layer to promote the message passing of semantic features and suppress that of meaningless and noisy ones. For learning topology information, we propose a cross-graph embedded-alignment (CGEA) layer conjugated with a verification loss, which can avoid sensitive hard one-to-one alignment and perform a robust soft alignment. Finally, extensive experiments on occluded, partial and holistic datasets demonstrate the effectiveness of our proposed framework. + +# Acknowledge + +This research was supported by National Key R&D Program of China (No. 2017YFA0700800). + +# References + +[1] Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vincius Flores Zambaldi, and Mateusz Malinowski. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018. +[2] 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. +[3] Xing Fan, Hao Luo, Xuan Zhang, Lingxiao He, Chi Zhang, and Wei Jiang. Scpnet: Spatial-channel parallelism network for joint holistic and partial person re-identification. In Asian Conference on Computer Vision, pages 19–34. Springer, 2018. +[4] Yang Fu, Yunchao Wei, Yuqian Zhou, Honghui Shi, Gao Huang, Xinchao Wang, Zhiqiang Yao, and Thomas Huang. Horizontal pyramid matching for person re-identification. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8295–8302, 2019. +[5] Yixiao Ge, Zhuowan Li, Haiyu Zhao, Guojun Yin, Shuai Yi, Xiaogang Wang, et al. Fd-gan: Pose-guided feature distilling gan for robust person re-identification. In Advances in Neural Information Processing Systems, pages 1222–1233, 2018. +[6] Shaogang Gong, Marco Cristani, Shuicheng Yan, and Chen Change Loy. *Person Re-Identification*. 2014. +[7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. +[8] Lingxiao He, Jian Liang, Haiqing Li, and Zhenan Sun. Deep spatial feature reconstruction for partial person re-identification: Alignment-free approach. pages 7073-7082, 2018. +[9] Lingxiao He, Zhenan Sun, Yuhao Zhu, and Yunbo Wang. Recognizing partial biometric patterns. arXiv preprint arXiv:1810.07399, 2018. +[10] Lingxiao He, Yinggang Wang, Wu Liu, Xingyu Liao, He Zhao, Zhenan Sun, and Jiashi Feng. Foreground-aware pyramid reconstruction for alignment-free occluded person re-identification. arXiv: Computer Vision and Pattern Recognition, 2019. +[11] Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. +[12] Houjing Huang, Dangwei Li, Zhang Zhang, Xiaotang Chen, and Kaiqi Huang. Adversarily occluded samples for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5098–5107, 2018. +[13] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. international conference on machine learning, pages 448-456, 2015. +[14] Mahdi M Kalayeh, Emrah Basaran, Muhittin Gokmen, Mustafa E Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In Proceedings of the + +IEEE Conference on Computer Vision and Pattern Recognition, pages 1062-1071, 2018. +[15] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. +[16] Martin Koestinger, Martin Hirzer, Paul Wohlhart, Peter M Roth, and Horst Bischof. Large scale metric learning from equivalence constraints. In 2012 IEEE conference on computer vision and pattern recognition, pages 2288-2295. IEEE, 2012. +[17] Jiefeng Li, Can Wang, Hao Zhu, Yihuan Mao, Hao-Shu Fang, and Cewu Lu. Crowdpose: Efficient crowded scenes pose estimation and a new benchmark. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10863-10872, 2018. +[18] Shengcai Liao, Yang Hu, Xiangyu Zhu, and Stan Z Li. Person re-identification by local maximal occurrence representation and metric learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2197–2206, 2015. +[19] Shengcai Liao and Stan Z Li. Efficient psd constrained asymmetric metric learning for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 3685–3693, 2015. +[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] Jinxian Liu, Bingbing Ni, Yichao Yan, Peng Zhou, Shuo Cheng, and Jianguo Hu. Pose transferrable person re-identification. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4099–4108, 2018. +[22] Yan Lu, Yue Wu, Bin Liu, Tianzhu Zhang, Baopu Li, Qi Chu, and Nenghai Yu. Cross-modality person re-identification with shared-specific feature transfer, 2020. +[23] Hao Luo, Xing Fan, Chi Zhang, and Wei Jiang. Stnreid: Deep convolutional networks with pairwise spatial transformer networks for partial person re-identification. arXiv preprint arXiv:1903.07072, 2019. +[24] Hao Luo, Youzhi Gu, Xingyu Liao, Shenqi Lai, and Wei Jiang. Bag of tricks and a strong baseline for deep person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. +[25] Bingpeng Ma, Yu Su, and Frederic Jurie. Covariance descriptor based on bio-inspired features for person re-identification and face verification. Image and Vision Computing, 32(6-7):379-390, 2014. +[26] Jiaxu Miao, Yu Wu, Ping Liu, Yuhang Ding, and Yi Yang. Pose-guided feature alignment for occluded person re-identification. In ICCV, 2019. +[27] Lei Qi, Jing Huo, Lei Wang, Yinghuan Shi, and Yang Gao. Maskreid: A mask based deep ranking neural network for person re-identification. arXiv preprint arXiv:1804.03864, 2018. +[28] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for + +multi-target, multi-camera tracking. In European Conference on Computer Vision, pages 17-35. Springer, 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 420–429, 2018. +[30] Chunfeng Song, Yan Huang, Wanli Ouyang, and Liang Wang. Mask-guided contrastive attention model for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1179–1188, 2018. +[31] Chi Su, Jianing Li, Shiliang Zhang, Junliang Xing, Wen Gao, and Qi Tian. Pose-driven deep convolutional model for person re-identification. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 3980–3989, 2017. +[32] Yumin Suh, Jingdong Wang, Siyu Tang, Tao Mei, and Kyoung Mu Lee. Part-aligned bilinear representations for person re-identification. *european conference on computer vision*, pages 418–437, 2018. +[33] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. In CVPR, 2019. +[34] 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. pages 393–402, 2019. +[35] 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 Proceedings of the European Conference on Computer Vision (ECCV), pages 480-496, 2018. +[36] Guan'an Wang, Tianzhu Zhang, Jian Cheng, Si Liu, Yang Yang, and Zengguang Hou. Rgb-infrared cross-modality person re-identification via joint pixel and feature alignment. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[37] Guan-An Wang, Tianzhu Zhang, Yang Yang, Jian Cheng, Jianlong Chang, Xu Liang, and Zengguang Hou. Cross-modality paired-images generation for rgb-infrared person re-identification. In AAAI-20 AAAI Conference on Artificial Intelligence, 2020. +[38] Runzhong Wang, Junchi Yan, and Xiaokang Yang. Learning combinatorial embedding networks for deep graph matching. arXiv preprint arXiv:1904.00597, 2019. +[39] Yang Yang, Jimei Yang, Junjie Yan, Shengcai Liao, Dong Yi, and Stan Z Li. Salient color names for person re-identification. In European conference on computer vision, pages 536-551. Springer, 2014. +[40] Andrei Zanfir and Cristian Sminchisescu. Deep learning of graph matching. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2684-2693, 2018. +[41] Liming Zhao, Xi Li, Yueting Zhuang, and Jingdong Wang. Deeply-learned part-aligned representations for person re-identification. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 3239–3248, 2017. + +[42] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Proceedings of the IEEE international conference on computer vision, pages 1116–1124, 2015. +[43] Liang Zheng, Yi Yang, and Alexander G Hauptmann. Person re-identification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016. +[44] Wei-Shi Zheng, Shaogang Gong, and Tao Xiang. Reidentification by relative distance comparison. IEEE transactions on pattern analysis and machine intelligence, 35(3):653-668, 2013. +[45] Wei-Shi Zheng, Xiang Li, Tao Xiang, Shengcai Liao, Jianhuang Lai, and Shaogang Gong. Partial person re-identification. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 4678-4686, 2015. +[46] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. arXiv preprint arXiv:1701.07717, 2017. +[47] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. arXiv preprint arXiv:1708.04896, 2017. +[48] Jiaxuan Zhuo, Zeyu Chen, Jianhuang Lai, and Guangcong Wang. Occluded person re-identification. In 2018 IEEE International Conference on Multimedia and Expo (ICME), pages 1–6. IEEE, 2018. +[49] Jiaxuan Zhuo, Jianhuang Lai, and Peijia Chen. A novel teacher-student learning framework for occluded person re-identification. arXiv preprint arXiv:1907.03253, 2019. \ No newline at end of file diff --git a/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/images.zip b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9a14ef5f9786de25b747f03985703de3c5a53c99 --- /dev/null +++ b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ee55ac5dc76d89aa0e6d0067b4fe60087a8379d8094e177a1091604a965abb9 +size 482694 diff --git a/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/layout.json b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4a658ffcfb540eb501d2d7f73b5dcbba8e3238ac --- /dev/null +++ b/highorderinformationmatterslearningrelationandtopologyforoccludedpersonreidentification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9dfe7974a71494cba6dfa3bcea342b049b5cc01dbc7ceaa5666513002fb14e1 +size 486498 diff --git a/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_content_list.json b/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d64101d249a9f6a0785a5790b6e3df76d559cf77 --- /dev/null +++ b/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c492480f21f9b6df270c794064289a219b49cbc577202ce1745aad90113fbe2d +size 81835 diff --git a/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_model.json b/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c04ffe7d1a68530612ba2ee5892051bdec185721 --- /dev/null +++ b/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0275ba1a2c1c9f5c7f6e9095ff7243a21f6b2f8ea03dd448515cf02f4db35b2 +size 101431 diff --git a/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_origin.pdf b/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..52367f44c04ffe4e6a7302ee74a4f6ac23096207 --- /dev/null +++ b/highperformancelongtermtrackingwithmetaupdater/b632de06-0b57-469c-82dd-5237855fdcef_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b20942caa94e919fb336414329028faab85f6a1488ca68086f848cbd64632e75 +size 2750825 diff --git a/highperformancelongtermtrackingwithmetaupdater/full.md b/highperformancelongtermtrackingwithmetaupdater/full.md new file mode 100644 index 0000000000000000000000000000000000000000..084f1d265f8c84413c9fff5c4c7df4760ce051b3 --- /dev/null +++ b/highperformancelongtermtrackingwithmetaupdater/full.md @@ -0,0 +1,325 @@ +# High-Performance Long-Term Tracking with Meta-Updater + +Kenan Dai $^{1}$ , Yunhua Zhang $^{2}$ , Dong Wang $^{1}$ , Jianhua Li $^{1}$ , Huchuan Lu $^{1,4}$ , Xiaoyun Yang $^{3}$ $^{1}$ School of Information and Communication Engineering, Dalian University of Technology, China + +$^{2}$ University of Amsterdam $^{3}$ China Science IntelliCloud Technology Co., Ltd $^{4}$ Peng Cheng Laboratory + +dkn2014@mail.dlut.edu.cn,y.zhang9@uva.nl,wdice@dlut.edu.cn + +jianhual@dlut.edu.cn, lhchuan@dlut.edu.cn, xiaoyun.yang@intellicloud.ai + +# Abstract + +Long-term visual tracking has drawn increasing attention because it is much closer to practical applications than short-term tracking. Most top-ranked long-term trackers adopt the offline-trained Siamese architectures, thus, they cannot benefit from great progress of short-term trackers with online update. However, it is quite risky to straightforwardly introduce online-update-based trackers to solve the long-term problem, due to long-term uncertain and noisy observations. In this work, we propose a novel offline-trained Meta-Updated to address an important but unsolved problem: Is the tracker ready for updating in the current frame? The proposed meta-updater can effectively integrate geometric, discriminative, and appearance cues in a sequential manner, and then mine the sequential information with a designed cascaded LSTM module. Our meta-updater learns a binary output to guide the tracker's update and can be easily embedded into different trackers. This work also introduces a long-term tracking framework consisting of an online local tracker, an online verifier, a SiamRPN-based re-detector, and our meta-updater. Numerous experimental results on the VOT2018LT, VOT2019LT, OxUvALT, TLP, and LaSOT benchmarks show that our tracker performs remarkably better than other competing algorithms. Our project is available on the website: https://github.com/Daikenan/LTMU. + +# 1. Introduction + +The study of visual tracking has begun to shift from short-term tracking to large-scale long-term tracking, roughly due to two reasons. First, long-term tracking is much closer to practical applications than short-term tracking. The average length of sequences in short-term tracking benchmarks (OTB [46], VOT2018 [23], TC128 [31], to name a few) is often at the second level, whereas the av + +![](images/ae5fc83f0b1477e7ae864766f746c4dc53d1965e340ca1e299183eb20295b3bc.jpg) +Figure 1. Visualization and comparisons of representative long-term tracking results on VOT2019LT. "ATOM*" is our local tracker based on ATOM [9], "Ours" denotes our long-term tracker with meta-update. "ATOM* LT" means "Ours" without meta-updater. "CLGS" and "SiamDW LT" are the second and third best trackers on VOT2019LT. Please see Sections 3 and 4 for more details. + +erage frame length in long-term tracking datasets (such as VOT2018LT [23], VOT2019LT [24], and OxUvALT [42]) is at least at the minute level. Second, the long-term tracking task additionally requires the tracker having the capability to handle frequent disappearance and reappearance (i.e., having a strong re-detection capability)1. + +Deep-learning-based methods have dominated the short-term tracking field [30, 47, 35], from the perspective of either one-shot learning [41, 2, 15, 28, 26, 12, 53, 29] or online learning [37, 10, 8, 21, 40, 7, 49, 50, 9]. Usually, the latter methods (e.g., ECO [8], ATOM [9]) are more accurate (with less training data) but slower than the former ones (e.g., SiamFC [2], SiamRPN [28]). A curious phenomenon is that few leading long-term trackers exploit online-updated short-term trackers to conduct local track- + +ing. MBMD [51], the winner of VOT2018LT, exploits an offline-trained regression network to directly regress the target's bounding box in a local region, and uses an online-learned verifier to make the tracker switch between local tracking and global re-detection. The recent SPLT [48] method utilizes the same SiamRPN model in [51] for local tracking. SiamFC+R [42], the best method in the OxUvALT report, equips the original SiamFC [2] with a simple re-detection scheme. An important reason is that online update is a double-edged sword for tracking. Online update captures appearance variations from both target and background, but inevitably pollutes the model with noisy samples. The risk of online update is amplified for long-term tracking, due to long-term uncertain observations. + +Motivated by the aforementioned analysis, this work attempts to improve the long-term tracking performance from two aspects. First, we design a long-term tracking framework that exploits an online-updated tracker for local tracking. As seen in Figure 1, the tracking performance is remarkably improved by extending $\mathrm{ATOM^{*}}$ to a long-term tracker (ATOM\* LT), but it remains worse than the CLGS and SiamDW LT methods. Second, we propose a novel meta-updater to effectively guide the tracker's update. Figure 1 shows that after adding our meta-updater, the proposed tracker achieves very promising tracking results. + +Our main contributions can be summarized as follows. + +- A novel offline-trained meta-updater is proposed to address an important but unsolved problem: Is the tracker ready for updating in the current frame? The proposed meta-updater effectively guide the update of the online tracker, not only facilitating the proposed tracker but also having good generalization ability. +- A long-term tracking framework is introduced on the basis of a SiamRPN-based re-detector, an online verifier, and an online local tracker with our meta-updater. Compared with other methods, our long-term tracking framework can benefit from the strength of online-updated short-term tracker at low risk. +- Numerous experimental results on the VOT2018LT, VOT2019LT, OxUvALT, TLP and LaSOT long-term benchmarks show that the proposed method outperforms the state-of-the-art trackers by a large margin. + +# 2. Related Work + +# 2.1. Long-term Visual Tracking + +Although large-scale long-term tracking benchmarks [23, 42] began to emerge since 2018, researchers have attached importance to the long-term tracking task for a long time (such as keypoint-based [17], proposal-based [54], detector-based [22, 32], and other methods). A classical algorithm is the tracking-learning-detection (TLD) method [22], which addresses long-term tracking as a combination of a local tracker (with forward-backward optical flow) and a global re-detector (with an ensemble of weak + +classifiers). Following this idea, many researchers [34, 32, 42] attempt to handle the long-term tracking problem with different local trackers and different global re-detectors. Among them, the local tracker and global re-detectors can also adopt the same powerful model [32, 26, 51, 48], being equipped with a re-detection scheme (e.g., random search and sliding window). A crucial problem of these trackers is how to switch the tracker between the local tracker and the global re-detector. Usually, they use the outputs of local trackers to conduct self-evaluation, i.e., to determine whether the tracker loses the target or not. This manner has a high risk since the outputs of local trackers are not always reliable and unexpectedly mislead the switcher sometimes. The MBMD method [51], the winner of VOT2018LT, conducts local and global switching with an additional online-updated deep classifier. This tracker exploits a SiamPRN-based network to regress the target in a local search region or every sliding window when re-detection. The recent S-PLT method [48] utilizes the same SiamPRN in [51] for tracking and re-detection, replaces the online verifier in [51] with an offline trained matching network, and speeds up the tracker by using their proposed skimming module. A curious phenomenon is that most top-ranked long-term trackers (such as MBMD [51], SPLT [48], and SiamRPN++ [26]), have not adopted excellent online-updated trackers (e.g., E-CO [8], ATOM [9]) to conduct local tracking. One of the underlying reasons is that the risk of online update is amplified for long-term tracking, caused by long-term uncertain observations. In this work, we attempt to address this dilemma by designing a high-performance long-term tracker with a meta-updater. + +# 2.2. Online Update for Visual Tracking + +For visual tracking, online update acts as a vital role to capture appearance variations from both target and its surrounding background during the tracking process. Numerous schemes have been designed to achieve this goal by using template update [6, 55, 29], incremental subspace learning [39, 43], online learning classifiers [16, 37, 8, 9], to name a few. However, online update is a double-edged sword in balancing the dynamical information description and unexpected noise introduction. Accumulating errors over a long time, collecting inappropriate samples or overfitting to available data when the target disappears can easily degrade the tracker and lead to tracking drift, especially for long-term tracking. To deal with this dilemma, many efforts have been done at least from two aspects. The first one aims to distill the online collected samples by recovering or clustering noisy observations [43, 8]. Another effective attempt is to design some criteria for evaluating the reliability of the current tracking result, to remove the unreliable samples or reject the inappropriate update. These criteria include the confidence score [37], the maximum (MAX) response [9], peak-to-sidelobe rate (PSR) [9], av- + +erage peak-to-correlation energy [44], and MAX-PSR [32]. These methods usually utilize the tracker's output to self-evaluate this reliability. But the self-evaluation of the trackers' reliability with its outputs has inevitable risks, especially when the tracker experiences the long-term uncertain and noisy observations. In this work, we propose a novel offline-trained meta-updater to integrate multiple cues in a sequential manner. The meta-updater outputs a binary score to indicate whether the tracker should be updated or not in the current frame, which not only remarkably improves the performance of our long-term tracker but also is easy to be embedded into other online-updated trackers. Recently, some meta-learning-based methods [25, 38, 27, 18, 5, 29] have been presented. All these methods focus on addressing the "how to update" problem (i.e., efficiently and/or effectively updating the trackers' appearance models). By contrast, our meta-updater is designed to deal with the "when to update" problem, and it can be combined with many "how to update" algorithms to further improve the tracking performance. + +![](images/6c1f076b4c2409829528da5b515d4640065698131e16e950d0f0315c9f9be0c6.jpg) +Figure 2. Proposed long-term tracking framework. Better viewed in color with zoom-in. + +# 3. Long-term Tracking with Meta-Updater +3.1. Long-term Tracking Framework + +The overall framework is presented in Figure 2. In each frame, the local tracker takes the local search region as input, and outputs the bounding box of the tracked object. Then, the verifier evaluates the correctness of the current tracking result. If the output verification score is larger than a predefined threshold, the tracker will continue to conduct local tracking in the next frame. If the score is smaller than the threshold, we use the faster R-CNN detector [4] to detect all possible candidates in the next frame and crop the local search region regarding each candidate. Then, a SiamPRN model [51] takes each region as input and outputs corresponding candidate boxes. These bounding boxes are sent to the verifier for identifying whether there exists the target or not. When the verifier finds the target, the local tracker will be reset to adapt to the current target appearance. Before entering into the next frame, all historic information is collected and sent into the proposed meta-updater. Finally, the meta-updater guides the online trackers' update. + +In this work, we implement an improved ATOM tracker (denoted as $\mathrm{ATOM^{*}}$ ) as our local tracker, which applies the + +classification branch of the ATOM method [9] for localization and exploits the SiamMask method [45] for scale estimation2. We use the RTMDNet method [21] as our verifier, and its verification threshold is set to 0. + +Strength and Imperfection. Compared with recent top-ranked long-term trackers (such as MBMD [51] and S-PLT [48]), the major strength of our framework lies in embedding an online-updated local tracker into the long-term tracking framework. This idea makes the long-term tracking solution benefit from the progress of short-term trackers, and unifies the short-term and long-term tracking problems as much as possible. One imperfection is that the risk of online update is amplified due to the long-term uncertain observations (since the results of any frame except for the first one have no absolute accuracy during tracking). Thus, we propose a novel Meta-Updater to handle this problem and obtain more robust tracking performance. + +# 3.2.Meta-Updated + +It is essential to update the tracker for capturing appearance variations from both target and its surrounding background. However, the inappropriate update will inevitably make the tracker degrade and cause tracking drift. To address this dilemma, we attempt to answer an important but unsolved question: Is the tracker ready for updating in the current frame? To be specific, we propose a Meta-Updater to determine whether the tracker should be updated or not in the present moment, by integrating historical tracking results. These historical results include geometric, discriminative, and appearance cues in a sequential manner. We introduce our meta-updater on the basis of an online tracker outputting a response map in each frame (e.g., ECO [8], ATOM [9]). It is easy to generalize our meta-updater for other types of trackers (such as MDNet [37]). + +# 3.2.1 Sequential Information for Meta-Updated + +Given an online tracker $\mathcal{T}$ , in the $t$ -th frame, we denote the output response map as $\mathbf{R}_t$ , the output bounding box as $\mathbf{b}_t$ , and the result image (cropped according to $\mathbf{b}_t$ ) as $\mathbf{I}_t$ , respectively. The target template in the first frame is denoted as $\mathbf{I}_0$ . An intuitive explanation is illustrated in Figure 3. + +![](images/a969c29dbf965600ece83e11779e0613eeeab819193cf01f7bb816f3e0bd796f.jpg) +Figure 3. Intuitive explanations of some notions in this work. + +We develop our meta-updater by mining the sequential + +![](images/6d16715a102c7485a4f4c52662e087c637aa4c0f35700766f6a4c6f3d8f21296.jpg) +Figure 4. Illustration of varied confidence scores with representative frames. Better viewed in color with zoom-in. + +information, integrating geometric, discriminative, and appearance cues within a given time slice. + +Geometric Cue. In the $t$ -th frame, the tracker outputs a bounding box $\mathbf{b}_t = [x_t,y_t,w_t,h_t]$ as the tracking state, where $(x,y)$ denote the horizontal and vertical coordinates of the up-left corner and $(w,h)$ are the width and height of the target. This bounding box itself merely reflects the geometric shape of the tracked object in the current frame. However, a series of bounding boxes from consecutive frames contain the important motion information regarding the target, such as velocity, acceleration, and scale change. + +Discriminative Cue. Visual tracking can be considered as a classification task to distinguish the target from its surrounding background, thus, an online tracker should have good discriminative ability itself. We define a confidence score $s_t^C$ as the maximum value of the response map $\mathbf{R}_t$ (1). For some trackers that do not output any response map (e.g., MDNet [37]), it is also not difficult to obtain this confidence score based on the classification probability or margin. + +$$ +s _ {t} ^ {C} = \max \left(\mathbf {R} _ {t}\right). \tag {1} +$$ + +Figure 4 indicates that the confidence score is not stable during the tracking process (see 89-and 261-th frames). In this work, we also exploit a convolutional neural network (CNN) to thoroughly mine the information within the response map, and obtain a response vector $\mathbf{v}_t^R$ as + +$$ +\mathbf {v} _ {t} ^ {R} = f ^ {R} \left(\mathbf {R} _ {t}; \mathbf {W} ^ {R}\right), \tag {2} +$$ + +where $f^{R}(:,.)$ denotes the CNN model with the parameter $\mathbf{W}^R$ . The output vector $\mathbf{v}_t^R$ implicitly encodes the reliability information of the tracker in the current frame, and is further processed by the subsequent model. + +Appearance Cue. The self-evaluation of the trackers' reliability with its outputs has inevitable risks, since online updating with noisy samples often makes the response not sensitive to appearance variations. Thus, we resort to a template matching method as a vital supplement, and define an appearance score as + +$$ +s _ {t} ^ {A} = \left\| f ^ {A} \left(\mathbf {I} _ {t}, \mathbf {W} ^ {A}\right) - f ^ {A} \left(\mathbf {I} _ {0}, \mathbf {W} ^ {A}\right) \right\| _ {2}, \tag {3} +$$ + +![](images/c4f254ad94fcbf9eba63298a50f230a6e3c18c9b9fb4dc1a844a34fbb83713d7.jpg) +Figure 5. Proposed three-stage cascaded LSTM. + +where $f^{A} \left(.,\mathbf{W}^{A}\right)$ is the embedding function to embed the target and candidates into a discriminative Euclidean space, $\mathbf{W}^{A}$ stands for its offline trained network parameters. As presented in [33], the network $f^{A} \left(.,\mathbf{W}^{A}\right)$ can be effectively trained with the combination of triplet and classification loss functions. The score $s_t^A$ measures the distance between the tracked result $\mathbf{I}_t$ and target template $\mathbf{I}_0$ . This template matching scheme is not affected by noisy observations. + +Sequential Information. We integrate the aforementioned geometric, discriminative and appearance cues into a sequential matrix as $\mathbf{X}_t = [\mathbf{x}_{t - t_s + 1};\dots;\mathbf{x}_{t - 1};\mathbf{x}_t]\in \mathbb{R}^{d\times t_s}$ where $\mathbf{x}_t\in \mathbb{R}^{d\times 1}$ is a column vector concentrated by $s_t^C$ $\mathbf{v}_t^R,s_t^A$ , and $\mathbf{b}_t$ . $d$ is the dimension of concentrated cues, and $t_s$ is a time step to balance the historical experience and current observation. This sequential information is further mined with the following cascaded LSTM scheme. + +# 3.2.2 Cascaded LSTM + +LSTM. Here, we briefly introduce the basic ideas and notions of LSTM [14] to make this paper self-contained. Its mathematical descriptions are presented as follows. + +$$ +\left\{ \begin{array}{l} \mathbf {f} _ {t} = \sigma \left(\mathbf {W} _ {f} \mathbf {x} _ {t} + \mathbf {U} _ {f} \mathbf {h} _ {t - 1} + \mathbf {b} _ {f}\right) \\ \mathbf {i} _ {t} = \sigma \left(\mathbf {W} _ {i} \mathbf {x} _ {t} + \mathbf {U} _ {i} \mathbf {h} _ {t - 1} + \mathbf {b} _ {i}\right) \\ \mathbf {o} _ {t} = \sigma \left(\mathbf {W} _ {o} \mathbf {x} _ {t} + \mathbf {U} _ {o} \mathbf {h} _ {t - 1} + \mathbf {b} _ {o}\right) \\ \mathbf {c} _ {t} = \mathbf {f} _ {t} \odot \mathbf {c} _ {t - 1} + \mathbf {i} _ {t} \odot t a n h \left(\mathbf {W} _ {c} \mathbf {x} _ {t} + \mathbf {U} _ {c} \mathbf {h} _ {t - 1} + \mathbf {b} _ {c}\right) \\ \mathbf {h} _ {t} = \mathbf {o} _ {t} \odot t a n h \left(\mathbf {c} _ {t}\right) \end{array} , \right. +$$ + +where $\sigma(.)$ denotes the element-wise sigmoid function, $\tanh(.)$ stands for the element-wise tangent operation, and $\odot$ is the element-wise multiplication. W, U, and b denote the weight matrices and bias vector requiring to be learned. The subscripts $f$ , $i$ , $o$ , and $c$ stand for the forget gate, input gate, output gate, and memory cell, respectively. Other variables are defined as follows. (a) $\mathbf{x}_t$ : the input vector to the LSTM unit; (b) $\mathbf{f}_t$ : the forget gate's activation vector; (c) $\mathbf{i}_t$ : the input gate's activation vector; (d) $\mathbf{o}_t$ : the output gate's activation vector; (e) $\mathbf{h}_t$ : the hidden state vector; and (f) $\mathbf{h}_t$ : the cell state vector. + +Three-stage Cascaded LSTM. After obtaining the sequential features $\mathbf{X}_t$ , presented in Section 3.2.1, we feed it into a three-stage cascaded LSTM model, shown in Figure 5. The time steps of three LSTMs gradually decrease to distill the sequential information and focus on the recent frames. The input-output relations are presented in Table 1. The superscript $i$ denotes the $i$ -th stage LSTM. + +Finally, the output $\mathbf{h}_t^3$ is processed by two fully connect + +Table 1. Input-output relations of our cascaded LSTM model. + +
Inputxt-ts+1, ..., xt-t1+1, ..., xt-t2+1, ..., Xt
LSTM1 → LSTM2ht-t1+1, ..., ht-t2+1, ..., ht1; ct1
LSTM2 → LSTM3ht-t2+1, ..., ht2; ct2
Outputht3
+ +ed layers to generate a binary classification score, indicating whether the tracker should be updated or not. + +# 3.2.3 Meta-Updated Training + +Sample Collection. We run the local tracker on different training video sequences, and record the tracking results in all frames. Then, we divide these results into a series of time slices, denoted as $\mathcal{Y} = \left(\mathbf{Y}_t^{v|t_v}\big|_{t = t_s}\right)^V$ , $v$ is the video index, $V$ is the number of training sequences, and $t_v$ is the total frame length of the $v$ -th video. $\mathbf{Y}_t^v = \{\mathbf{y}_{t - t_s + 1}^v,\mathbf{y}_{t - t_s + 2}^v,\dots ,\mathbf{y}_{t - 1}^v,\mathbf{y}_t^v\}$ , where $t_s$ denotes the time step. Each time slice $\mathbf{y}_t^v$ includes the bounding box, response map, response score, and predicted target image in the $t$ -th frame, along with the corresponding target template. See Section 3.2.1 for more detailed descriptions4. + +Then, we determine the label of $\mathbf{Y}_t^v$ as + +$$ +l \left(\mathbf {Y} _ {t} ^ {v}\right) = \left\{ \begin{array}{l} 1, i f \operatorname {I o U} \left(\mathbf {b} _ {t} ^ {v}, \mathbf {g} _ {t} ^ {v}\right) > 0. 5 \\ 0, i f \operatorname {I o U} \left(\mathbf {b} _ {t} ^ {v}, \mathbf {g} _ {t} ^ {v}\right) = 0 \end{array} , \right. \tag {4} +$$ + +where IoU stands for the Intersection-over-Union criterion. The slices whose IoUs are between 0 and 0.5 have been not adopted in the training phases to guarantee the training convergence. $\mathbf{b}_t^v$ is the output bounding box in the $t$ -th frame in video $v$ , and $\mathbf{g}_t^v$ is the corresponding groundtruth5. Equation (4) means that the label of a given time slice is determined based on whether the target is successfully located or not in the current (i.e., $t$ -th) frame. Figure 6 visualizes some positive and negative samples for training our meta-updater. + +# Algorithm 1 Iterative Training Scheme + +for $k = 0;k < K;k + +$ do Run $\{\mathcal{T},\mathcal{M}\mathcal{U}^k (\mathcal{T})\}$ , and record the tracking results Collect training samples $\mathcal{V}^k$ with their labels $\mathcal{L}^k$ Train the meta-updater $\mathcal{MU}^{k + 1}(\mathcal{T})$ +end for + +Model Training. In this study, the local tracker and its meta-updater are tightly-coupled. The tracker affects the sample collection process for training its meta-updater. The meta-updater will change the tracker's performance, and further affect sample collection indirectly. Thus, we propose an iterative training algorithm, listed in Algorithm 1. The symbol $\{\mathcal{T},\mathcal{MU}(\mathcal{T})\}$ is used to denote a local tracker + +equipped with its meta-updater $\mathcal{MU}(\mathcal{T})$ . $\mathcal{MU}^k (\mathcal{T})$ is the learned meta-updater after the $k$ -th iteration ( $k = 0$ means no meta-updater). $K$ is set to 3 in this work. + +# 3.2.4 Generalization ability + +The aforementioned introduction is with respect to the online-updated tracker outputting a response map. For the trackers without the response map (e.g., MDNet [37], RT-MDNet [21]), we can simply remove the subnetwork $f^R$ , and train the meta-updater with the remaining information. For some trackers those are online updated with accumulated samples over time (such as ECO [8]), our meta-updater is able to purify the sample pool used for updating. For a given frame, if the output of the meta-updater is 0, then the current tracking results will not be added into the sample pool (i.e., not used for updating). If an ensemble of multiple online-updated trackers (such as our long-term trackers, ATOM* for local tracking and RTMDNet for verification), we can train only one meta-updater with the information from all trackers as the input, and then use it to guide all trackers' update. Section 4.3 shows our meta-updater's generalization ability for different trackers. + +# 3.3. Implementation Details + +All networks below are trained using the stochastic gradient decent optimizer, with the momentum of 0.9. The training samples are all from the LaSOT [11] training set. + +Matching Network $f^A$ . The matching network $f^A$ adopts the ResNet-50 architecture and takes $107 \times 107$ image patches as inputs. For each target, we randomly sample bounding boxes around the groundtruth in each frame. We choose the patches with IoU above 0.7 as the positive data, and use the boxes with high confidence scores from the SiamRPN-based network [51] but not belonging to the target as the negative data. The batch size of the network $f^A$ is 16 and we train it for 60000 iterations. The initial learning rate is $10^{-4}$ and divided by 10 every 200000 iterations. The matching network is individually trained and fixed when training the remaining networks of our meta-updater. + +Subnetwork $f^R$ . The input response map is first resized to $50 \times 50$ , processed by two convolutional layers, and then followed by a global average pooling layer. The output is a $1 \times 1 \times 8$ vector. This subnetwork is jointly trained with the cascade LSTMs and the two fully connected layers. + +LSTMs with fully connected layers. The three-stage cascaded LSTMs have 64 units in each LSTM cell. $t_s$ , $t_1$ and $t_2$ are set to 20, 8 and 3, respectively. The forget bias is set to 1.0. The outputs are finally sent into two fully connected layers with 64 hidden units to get the final binary value. Each training stage of LSTM has a batch size of 16 and is trained by 100,000 iterations with the learning rate of $10^{-4}$ . + +# 4. Experiments + +We implement our tracker using Tensorflow on a PC machine with an Intel-i9 CPU (64G RAM) and a NVIDIA + +![](images/bba15a6599d34e4f10f79cddf6912472980c328dd55fba8825a4958f1451de02.jpg) +Figure 6. Illustration of positive and negative samples for meta-updater training. The first two rows illustrate two positive examples, whereas the last two rows display the negative ones. In fact, there is no interval among frames, the interval 5 is merely for clear visualization. + +GTX2080Ti GPU (11G memory). The tracking speed is approximatively 13 fps. We evaluate our tracker on five benchmarks: VOT2018LT [23], VOT2019LT [24], OxUvALT [42], TLP [36], and LaSOT [11]. + +# 4.1. Quantitative Evaluation + +Table 2. Comparisons of our tracker and 15 state-of-the-art methods on the VOT2018LT dataset [23]. The best three results are shown in red, blue and green colors, respectively. The trackers are ranked from top to bottom according to F-score. + +
TrackerF-scorePrRe
LTMU(Ours)0.6900.7100.672
SiamRPN++0.6290.6490.609
SPLT0.6160.6330.600
MBMD0.6100.6340.588
DaSiam_LT0.6070.6270.588
MMLT0.5460.5740.521
LTSINT0.5360.5660.510
SYT0.5090.5200.499
PTAVplus0.4810.5950.404
FuCoLoT0.4800.5390.432
SiamVGG0.4590.5520.393
SLT0.4560.5020.417
SiamFC0.4330.6360.328
SiamFCDet0.4010.4880.341
HMMTxD0.3350.3300.339
SAPKLTF0.3230.3480.300
ASMS0.3060.3730.259
+ +VOT2018LT. We first compare our tracker with other state-of-the-art algorithms on the VOT2018LT dataset [23], which contains 35 challenging sequences of diverse objects (e.g., persons, cars, motorcycles, bicycles and animals) with the total length of 146817 frames. Each sequence contains on average 12 long-term target disappearances, each lasting on average 40 frames. The accuracy evaluation of the VOT2018LT dataset [23] mainly includes tracking precision $(\mathbf{Pr})$ , tracking recall $(\mathbf{Re})$ and tracking F-score. Dif + +ferent trackers are ranked according to the tracking F-score. The detailed definitions of $\mathbf{Pr}$ , $\mathbf{Re}$ and F-score can be found in the VOT2018 challenge official report [23]. + +We compare our tracker with the VOT2018 official trackers and three recent methods (i.e., MBMD [51], SiamRP-N++ [26], and SPLT [48]) and report the evaluation results in Table 2. The results show that the proposed tracker outperforms all other trackers by a very large margin. + +VOT2019LT. The VOT2019LT [24] dataset, containing 50 videos with 215294 frames in total, is the most recent long-term tracking dataset. Each sequence contains on average 10 long-term target disappearances, each lasting on average 52 frames. Compared with VOT2018LT [23], VOT2019LT poses more challenges since it introduces 15 more difficult videos and some uncommon targets (e.g., boat, bull, and parachute). Its evaluation protocol is the same as that in VOT2018LT. Table 3 shows that our trackers achieves the first place on the VOT2019LT challenge. + +Table 3. Performance evaluation of our tracker and eight competing algorithms on the VOT2019LT dataset. The best three results are shown in red, blue and green colors, respectively. The trackers are ranked from top to bottom using the F-score measure. + +
TrackerF-scorePrRe
LTMU(Ours)0.6970.7210.674
CLGS0.6740.7390.619
SiamDW_LT0.6650.6970.636
mbdet0.5670.6090.530
SiamRPNsLT0.5560.7490.443
Siamfcos-LT0.5200.4930.549
CooSiam0.5080.4820.537
ASINT0.5050.5170.494
FuCoLoT0.4110.5070.346
+ +OxUvALT. The OxUvA long-term (denoted as OxUvALT) dataset [42] contains 366 object tracks in 337 videos, which are selected from YTBB. Each video in this dataset lasts for + +average 2.4 minutes, which is much longer than other commonly used short-term datasets (such as OTB2015 [46]). The targets are sparsely labeled at a frequency of $1\mathrm{Hz}$ . The dataset was divided into two disjoint subsets, dev and test. In this work, we follow the open challenge in OxUvALT, which means that trackers can use any dataset except for the YTBB validation set for training and use the OxUvALT test subset for testing. In the OxUvALT dataset, three criteria are adopted to evaluate different trackers, including true positive rate (TPR), true negative rate (TNR) and maximum geometric mean (MaxGM). TPR measures the fraction of present objects that are reported present as well as the location accuracy, and TNR gives the fraction of absent frames that are reported as absent. MaxGM makes a trade-off between TPR and TNR (i.e., MaxGM = $\max_{0\leq p\leq 1}\sqrt{((1 - p)\cdot\mathrm{TPR})((1 - p)\cdot\mathrm{TNR} + p))}$ , which is used to rank different trackers. We compare our tracker with three recent algorithms (MBMD [51], SPLT [48] and GlobalTrack [19]) and ten algorithms reported in [42] (such as LCT [34], EBT [54], TLD [22], ECO-HC [8], BACF [13], Staple [1], MDNet [37], SIN-T [41], SiamFC [2], and SiamFC+R [42]). Table 4 shows that our tracker performs best in terms of MaxGM and TPR while maintaining a very competitive TNR value. + +Table 4. Performance evaluation of our tracker and 13 competing algorithms on the OxUvALT dataset. The best three results are shown in red, blue and green colors, respectively. The trackers are ranked from top to bottom according to the MaxGM values. + +
TrackerMaxGMTPRTNR
LTMU(Ours)0.7510.7490.754
SPLT0.6220.4980.776
GlobalTrack0.6030.5740.633
MBMD0.5440.6090.485
SiamFC+R0.4540.4270.481
TLD0.4310.2080.895
LCT0.3960.2920.537
MDNet0.3430.4720
SINT0.3260.4260
ECO-HC0.3140.3950
SiamFC0.3130.3910
EBT0.2830.3210
BACF0.2810.3160
Staple0.2610.2730
+ +LaSOT. The LaSOT dataset [11] is one of the most recent large-scale datasets with high-quality annotations. It contains 1400 challenging sequences (1120 for training and 280 for testing) with 70 tracking categories, with an average of 2500 frames per sequence. In this work, we follow the one-pass evaluation (success and precision) to evaluate different trackers on the test set of LaSOT. Figure 7 illustrates both success and precision plots of our tracker and ten state-of-the-art algorithms, including Dimp50 [3], Dimp18 [3], GlobalTrack [19], SPLT [48], ATOM [9], SiamRP-N++ [26], ECO python [8], StructSiam [52], DSiam [55], + +and MDNet [37]. Figure 7 shows that our tracker achieves the best results among all competing methods. + +![](images/2103f72199569bc27bb0a82db3e5c8e161061590c873c18dbcbabe9e0b62c4e6.jpg) +Figure 7. One-pass evaluation of different trackers using LaSOT. Better viewed in color with zoom-in. + +![](images/693adbd86aee5c92d10dc8db6ca264d1476693c50b004d86d46f171310abca5d.jpg) + +TLP. The TLP dataset [36] contains 50 HD videos from real-world scenarios, with an average of 13500 frames per sequence. We follow the one-pass evaluation (success and precision) to evaluate different trackers on the TLP dataset. As shown in Figure 8, our tracker achieves the best results among all competing methods. + +![](images/3bc4409ca8badcd28e0509603d3505978c7324ad818a9659d56cc6d52f194c52.jpg) +Figure 8. One-pass evaluation of different trackers using TLP. Better viewed in color with zoom-in. + +![](images/f3e4c3fac2f4fcc43ab55c1e06b1c9c4267bfd18cbabb94b79d0f346f1160936.jpg) + +# 4.2. Ablation Study + +In this subsection, we conduct ablation analysis of our meta-updater using the LaSOT dataset [11]. + +Different time steps of meta-updater. First, we investigate the effects of different time steps. An appropriate time step could achieve a good trade-off between historical information and current observations. Table 5 shows that the best performance is obtained when the time step is set to 20. + +Table 5. Effects of different time steps for our meta-updater. + +
time step510203050
Success0.5530.5640.5720.5700.567
Precision0.5480.5610.5720.5690.565
+ +Different inputs for our meta-updater. For our long-term trackers, the inputs of the meta-updater include bounding box (B), confidence score (C), response map (R), and appearance score (A). We verify their contributions by separately removing them from our meta-update. Detailed results are reported in Table 6, showing that each input contributes to our meta-updater ( $w / o$ means 'without'). + +Table 6. Effectiveness of different inputs of our meta-updater. + +
different inputw/o Cw/o Rw/o Bw/o AOurs
Success0.5610.5680.5630.5490.572
Precision0.5580.5660.5620.5400.572
+ +Evaluation of iterative steps. Table 7 shows that the performance is gradually improved with the increase of $k$ . + +Table 7. Evaluation of iterative steps for our cascaded LSTM. + +
k0123
Success0.5390.5620.5680.572
Precision0.5350.5580.5660.572
+ +# 4.3. Discussions + +Generalization ability and speed analysis. We note that our meta-updater is easy to be embedded into other trackers with online learning. To show this good generalization ability, we introduce our meta-updater into four tracking algorithms, including ATOM, ECO (the official python implementation), RTMDNet and our base tracker (using a threshold to control update). Figure 9 shows the tracking performance of different trackers without and with meta-updater on the LaSOT dataset, and it demonstrates that the proposed meta-updater can consistently improve the tracking accuracy of different trackers. Table 8 reports the running speeds of those trackers without and with the proposed meta-updater, which demonstrates that the tracking speeds decrease slightly with an additional meta-updater scheme. Thus, we can conclude that our meta-updater has a good generalization ability, which can consistently improve the tracking accuracy almost without sacrificing the efficiency. + +![](images/3da630da31494c20eebf3567298529e835bda186531ca10a1777b7eaadb02605.jpg) +Figure 9. Generalization ability of our meta-updater (MU). Different trackers without and with meta-updater are evaluated using the LaSOT test dataset. Better viewed in color with zoom-in. + +![](images/037c3ddf7399ee73eb30ede36baf25c4d68d8c56b6e97aaa20b950844c8417fb.jpg) + +Table 8. Speed comparisons of different trackers without and with meta-updater (MU). + +
TrackersATOMECORTMDNetOurs-MU
FPS40494115
TrackersATOM+MUECO+MURTMDNet+MUOurs
FPS32383213
+ +Why our meta-updater works? We run a tracker without and with its meta-updater, and record the trackers' update state $(u = 0,1)$ paired with its ground truth in each frame $(l = 0,1)$ . $u = 1$ means that the tracker has been updated; otherwise, has not been updated. $l = 1$ means that the tracker can be updated; otherwise, cannot be updated. The definition of ground truth $l$ is the same as equation (4). We have the following concepts: (1) true positive (TP): $l = 1$ , $u = 1$ ; (2) false positive (FP): $l = 0$ , $u = 1$ ; (3) true negative (TN): $l = 0$ , $u = 0$ ; and (4) false negative (FN): $l = 1$ , $u = 0$ . Then, we can obtain the update precision (Pr), and update recall (Re) as $\mathrm{Pr} = \mathrm{TP} / (\mathrm{TP} + \mathrm{FP})$ , and $\mathrm{Re} = \mathrm{TP} / (\mathrm{TP} + \mathrm{FN})$ , respectively. A higher precision means that the tracker has + +been updated with less wrong observations. A higher recall means that the tracker more likely accepts to be updated with correct observations. We also define a true negative rate (TNR) to pay much attention to wrong observations as $\mathrm{TNR} = \mathrm{TN} / (\mathrm{TN} + \mathrm{FP})$ . A higher TNR value means that the tracker rejects to be updated with wrong observations more strongly. Table 9 shows the statistic results of different trackers with and without their meta-updater modules. The usage of meta-updater slightly sacrifices the update recall, which means that a portion of correct observations have not been used to update the tracker in comparison with that without meta-updater. This phenomenon affects little on the trackers' performance because correct observations are all for the same target and have a large amount of redundant information. In contrast, the usage of meta-updater significantly improves the Pr and TNR values, indicating that the tracker is much less polluted by wrong observations. Thus, the risk of online update will be significantly decreased. + +Table 9. Effectiveness of our meta-updater for different trackers. + +
TrackerPrReTNR
RTMDNet0.5990.9930.402
RTMDNet+MU0.9090.9020.898
ECO0.5831.0000.000
ECO+MU0.8520.8950.803
ATOM0.7650.9970.310
ATOM+MU0.9310.8860.845
Ours-MU0.8670.9940.479
Ours0.9520.8740.862
+ +# 5. Conclusions + +This work presents a novel long-term tracking framework with the proposed meta-updater. Combined with other top-ranked trackers, our framework exploits an online-update-based tracker to conduct local tracking, which makes the long-term tracking performance benefit from the excellent short-term trackers with online update (such as ATOM). More importantly, a novel meta-updater is proposed by integrating geometric, discriminative, and appearance cues in a sequential manner to determine whether the tracker should be updated or not at the present moment. This method substantially reduces the risk of online update for long-term tracking, and effectively yet efficiently guides the tracker's update. Numerous experimental results on five recent long-term benchmarks demonstrate that our long-term tracker achieves significantly better performance than other state-of-the-art methods. The results also indicate that our meta-updater has good generalization ability. + +Acknowledgement. The paper is supported in part by National Natural Science Foundation of China under Grant No. 61872056, 61771088, 61725202, U1903215, in part by the National Key RD Program of China under Grant No. 2018AAA0102001, and in part by the Fundamental Research Funds for the Central Universities under Grant No. DUT19GJ201. + +# References + +[1] Luca Bertinetto, Jack Valmadre, Stuart Golodetz, Ondrej Miksik, and Philip H. S. Torr. Staple: Complementary learners for real-time tracking. In CVPR, 2016. +[2] Luca Bertinetto, Jack Valmadre, Joo F. Henriques, Andrea Vedaldi, and Philip H. S. Torr. Fully convolutional siamese networks for object tracking. In ECCV Workshop, 2016. +[3] Goutam Bhat, Martin Danelljan, Luc Van Gool, and Radu Timofte. Learning discriminative model prediction for tracking. In ICCV, 2019. +[4] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. +[5] Janghoon Choi, Junseok Kwon, and Kyoung Mu Lee. Deep meta learning for real-time target-aware visual tracking. In ICCV, 2019. +[6] Dorin Comaniciu, Visvanathan Ramesh, and Peter Meer. Kernel-based object tracking. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(5):564-577, 2003. +[7] Kenan Dai, Dong Wang, Huchuan Lu, Chong Sun, and Jianhua Li. Visual tracking via adaptive spatially-regularized correlation filters. In CVPR, 2019. +[8] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ECO: Efficient convolution operators for tracking. In CVPR, 2017. +[9] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ATOM: Accurate tracking by overlap maximization. In CVPR, 2019. +[10] Martin Danelljan, Andreas Robinson, Fahad Shahbaz Khan, and Michael Felsberg. Beyond correlation filters: Learning continuous convolution operators for visual tracking. In ECCV, 2016. +[11] 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, 2019. +[12] Heng Fan and Haibin Ling. Siamese cascaded region proposal networks for real-time visual tracking. In CVPR, 2019. +[13] Hamed Kiani Galoogahi, Ashton Fagg, and Simon Lucey. Learning background-aware correlation filters for visual tracking. In ICCV, 2017. + +[14] Alex Graves. Supervised Sequence Labelling with Recurrent Neural Networks, volume 385 of Studies in Computational Intelligence. Springer, 2012. +[15] Anfeng He, Chong Luo, Xinmei Tian, and Wenjun Zeng. A twofold siamese network for real-time object tracking. In CVPR, 2018. +[16] Joo F Henriques, Rui Caseiro, Pedro Martins, and Jorge Batista. High-speed tracking with kernelized correlation filters. In ICVS, 2008. +[17] Zhibin Hong, Zhe Chen, Chaohui Wang, Xue Mei, Danil Prokhorov, and Dacheng Tao. MUlti-Store Tracker (MUSTe): A cognitive psychology inspired approach to object tracking. In CVPR, 2015. +[18] Jianglei Huang and Wengang Zhou. $\mathrm{Re}^2\mathrm{EMA}$ : Regularized and reinitialized exponential moving average for target model update in object tracking. In AAAI, 2019. +[19] Lianghua Huang, Xin Zhao, and Kaiqi Huang. GlobalTrack: A simple and strong baseline for long-term tracking. In AAAI, 2020. +[20] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yuning Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, 2018. +[21] Ilchae Jung, Jeany Son, Mooyeol Baek, and Bohyung Han. Real-time MDNet. In ECCV, 2018. +[22] Zdenek Kalal, Krystian Mikolajczyk, and Jiri Matas. Tracking-learning-detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(7):1409-1422, 2012. +[23] Matej Kristan, Ales Leonardis, Jiri Matas, Michael Felsberg, Roman Pfugfelder, Luka Cehovin Zajc, Tomas Vojir, Goutam Bhat, Alan Lukezic, Abdelrahman Eldesokey, Gustavo Fernandez, and et al. The sixth visual object tracking VOT2018 challenge results. In ECCVW, 2018. +[24] Matej Kristan, Jiri Matas, Ales Leonardis, Michael Felsberg, Roman Pflugfelder, Joni-Kristian Kamarainen, Luka Čehovin Zajc, Ondrej Drbohlav, Alan Lukežić, Amanda Berg, Abdelrahman Eldesokey, Jani Kapyla, and Gustavo Fernandez. The seventh visual object tracking VOT2019 challenge results. In IC-CVW, 2019. +[25] Hankyeol Lee, Seokeon Choi, and Changick Kim. A memory model based on the siamese network for long-term tracking. In ECCVW, 2018. +[26] Bo Li, Wei Wu, Qiang Wang, Fangyi Zhang, Junliang Xing, and Junjie Yan. SiamRPN++: Evolution of siamese visual tracking with very deep networks. In CVPR, 2019. + +[27] Bi Li, Wenxuan Xie, Wenjun Zeng, and Wenyu Liu. Learning to update for object tracking with recurrent meta-learner. IEEE Transcations on Image Processing, 28(7):3624-3635, 2019. +[28] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. In CVPR, 2018. +[29] Peixia Li, Boyu Chen, Wanli Ouyang, Dong Wang, Xiaoyun Yang, and Huchuan Lu. GradNet: Gradient-guided network for visual object tracking. In ICCV, 2019. +[30] Peixia Li, Dong Wang, Lijun Wang, and Huchuan Lu. Deep visual tracking: Review and experimental comparison. Pattern Recognition, 76:323-338, 2018. +[31] Pengpeng Liang, Erik Blasch, and Haibin Ling. Encoding color information for visual tracking: Algorithms and benchmark. IEEE Transcations on Image Processing, 24(12):5630-5644, 2015. +[32] Alan Lukei, Luka ehovin Zajc, Tom Voj, Ji Matas, and Matej Kristan. FCLT - A fully-correlational long-term tracker. In ACCV, 2018. +[33] Hao Luo, Youzhi Gu, Xingyu Liao, Shenqi Lai, and Wei Jiang. Bag of tricks and a strong baseline for deep person re-identification. In CVPR, 2019. +[34] Chao Ma, Xiaokang Yang, Chongyang Zhang, and Ming Hsuan Yang. Long-term correlation tracking. In CVPR, 2015. +[35] Seyed Mojtaba Marvasti-Zadeh, Li Cheng, Hossein Ghanei-Yakhdan, and Shohreh Kasaei. Deep learning for visual tracking: A comprehensive survey. CoRR, abs/1912.00535, 2019. +[36] Abhinav Moudgil and Vineet Gandhi. Long-term visual object tracking benchmark. In ACCV, 2018. +[37] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In CVPR, 2016. +[38] Eunbyung Park and Alexander C. Berg. Meta-tracker: Fast and robust online adaptation for visual object trackers. In ECCV, 2018. +[39] David A. Ross, Jongwoo Lim, Ruei-Sung Lin, and Ming-Hsuan Yang. Incremental learning for robust visual tracking. International Journal of Computer Vision, 77(1-3):125-141, 2008. +[40] Chong Sun, Dong Wang, Huchuan Lu, and Ming-Hsuan Yang. Correlation tracking via joint discrimination and reliability learning. In CVPR, 2018. +[41] Ran Tao, Efstratios Gavves, and Arnold W. M. Smeulders. Siamese instance search for tracking. In CVPR, 2016. + +[42] Jack Valmadre, Luca Bertinetto, Joao F. Henriques, Ran Tao, Andrea Vedaldi, Arnold W.M. Smeulders, Philip H.S. Torr, and Efstratios Gavves. Long-term tracking in the wild: a benchmark. In ECCV, 2018. +[43] Dong Wang, Huchuan Lu, and Ming-Hsuan Yang. Online object tracking with sparse prototypes. IEEE Transcations on Image Processing, 22(1):314-325, 2013. +[44] Mengmeng Wang, Yong Liu, and Zeyi Huang. Large margin object tracking with circulant feature maps. In CVPR, pages 4800-4808, 2017. +[45] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip H. S. Torr. Fast online object tracking and segmentation: A unifying approach. In CVPR, 2019. +[46] Yi Wu, Jongwoo Lim, and Ming Hsuan Yang. Object tracking benchmark. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(9):1834-1848, 2015. +[47] Bin Yan, Dong Wang, Huchuan Lu, and Xiaoyun Yang. Cooling-Shrinking Attack: Blinding the tracker with imperceptible noises. In CVPR, 2020. +[48] Bin Yan, Haojie Zhao, Dong Wang, Huchuan Lu, and Xiaoyun Yang. Skimming-Perusal Tracking: A framework for real-time and robust long-term tracking. In ICCV, 2019. +[49] Tianzhu Zhang, Si Liu, Changsheng Xu, Bin Liu, and Ming-Hsuan Yang. Correlation particle filter for visual tracking. IEEE Transactions on Image Processing, 27(6):2676-2687, 2018. +[50] Tianzhu Zhang, Changsheng Xu, and Ming-Hsuan Yang. Learning multi-task correlation particle filters for visual tracking. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(2):365-378, 2019. +[51] Yunhua Zhang, Dong Wang, Lijun Wang, Jinqing Qi, and Huchuan Lu. Learning regression and verification networks for long-term visual tracking. CoRR, abs/1809.04320, 2018. +[52] Yunhua Zhang, Lijun Wang, Jinqing Qi, Dong Wang, Mengyang Feng, and Huchuan Lu. Structured siamese network for real-time visual tracking. In ECCV, pages 355-370, 2018. +[53] Zhipeng Zhang and Houwen Peng. Deeper and wider siamese networks for real-time visual tracking. In CVPR, 2019. +[54] Gao Zhu, Fatih Porikli, and Hongdong Li. Beyond local search: Tracking objects everywhere with instance-specific proposals. In CVPR, 2016. +[55] Zheng Zhu, Qiang Wang, Bo Li, Wei Wu, Junjie Yan, and Weiming Hu. Distractor-aware siamese networks for visual object tracking. In ECCV, 2018. \ No newline at end of file diff --git a/highperformancelongtermtrackingwithmetaupdater/images.zip b/highperformancelongtermtrackingwithmetaupdater/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..60de5aedaa8038b95a6898e98e2b28e2af94cc53 --- /dev/null +++ b/highperformancelongtermtrackingwithmetaupdater/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:981dc1e24ddaa1e2c76e66bf1d67db1ac5f3eb4458dfa1fdf0ffebbdf4463898 +size 646364 diff --git a/highperformancelongtermtrackingwithmetaupdater/layout.json b/highperformancelongtermtrackingwithmetaupdater/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1c9baf99fc901d6500f3e8b3f3821d8b1b94a9c8 --- /dev/null +++ b/highperformancelongtermtrackingwithmetaupdater/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b4b630d76612cab2a25da03d58c03c091823982c5ac80bb180e8f08e8f97f54 +size 432648 diff --git a/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_content_list.json b/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a52f3eff87d7daea149701658015b93ae9a61955 --- /dev/null +++ b/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:201a7c6082a876dd10bbf4ded88f536f2787cc36adc066cfe3ad269f37a6ddb6 +size 67293 diff --git a/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_model.json b/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e2e058123f51e0964708616a75fc96b402e46c5a --- /dev/null +++ b/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:301a16e90a311d81ea6a16fe11fe19fe9763cec46bdc2a33d58d207f2e6abc51 +size 80128 diff --git a/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_origin.pdf b/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e8db41e2f5ba7ca622b501b864b9b1ba1f06eff5 --- /dev/null +++ b/highresolutiondaytimetranslationwithoutdomainlabels/b55b2ec0-7739-4ae1-b723-d42fdf6c0b90_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a406dbab4f94a74c52c185f737f46c9c3d6678aca6d723dc00e89c04d1f9b41 +size 3655143 diff --git a/highresolutiondaytimetranslationwithoutdomainlabels/full.md b/highresolutiondaytimetranslationwithoutdomainlabels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..89cf89ccd6ee35e439d271080792f9619eed77f1 --- /dev/null +++ b/highresolutiondaytimetranslationwithoutdomainlabels/full.md @@ -0,0 +1,246 @@ +# High-Resolution Daytime Translation Without Domain Labels + +I. Anokhin $^{1*}$ , P. Solovev $^{1*}$ , D. Korzhenkov $^{1*}$ , A. Kharlamov $^{1*}$ , T. Khakhulin $^{1,3}$ , A. Silvestrov $^{1}$ , S. Nikolenko $^{2,1}$ , V. Lempitsky $^{1,3}$ , G. Sterkin $^{1}$ + +$^{1}$ Samsung AI Center, Moscow + $^{2}$ National Research University Higher School of Economics, St.-Petersburg + $^{3}$ Skolkovo Institute of Science and Technology, Moscow + +![](images/4c1f2ea2cbf6ee545e9b76576f7410be1e3f8bbbb49731cadb51e2ee95eb4bbb.jpg) +Figure 1: Daytime translation results. Left - original images, right - translated and enhanced images (one style per column). + +![](images/bee4e13ec63aac1f8f4ceb0587ea36f102a0f30dea79d62439751863ac876ff9.jpg) + +![](images/35f078cbaaaf6d9b400a291af5f0de99693a5fb24ce64c8264bfd17430aa94bb.jpg) + +![](images/55584d497962f25a1714b1788ebaf21e61ec7e38ae93b98d57d1f409a5969184.jpg) + +![](images/a8f88ffa99a04aa52d2ea4db7f30d31afe7ada9c10324b3b871e74e000996833.jpg) + +# Abstract + +Modeling daytime changes in high resolution photographs, e.g., re-rendering the same scene under different illuminations typical for day, night, or dawn, is a challenging image manipulation task. We present the high-resolution daytime translation (HiDT) model for this task. HiDT combines a generative image-to-image model and a new upsampling scheme that allows to apply image translation at high resolution. The model demonstrates competitive results in terms of both commonly used GAN metrics and human evaluation. Importantly, this good performance comes as a result of training on a dataset of still landscape images with no daytime labels available. Our results are available at https://saic-mdal.github.io/HiDT/. + +# 1. Introduction + +In this work, we consider the task of generating daytime timelapse videos and pose it as an image-to-image translation problem. Recent image-to-image translation methods have successfully handled the task of conversion between two predefined paired domains [8, 30, 16, 7] as well as between multiple domains [2, 14, 13, 17]. Given the success of these methods, using image-to-image translation methods to generate daytime changes is a natural idea. + +Image-to-image translation approaches require domain labels at training as well as at inference time. The recent FUNIT model [17] relaxes this constraint partially. Thus, to extract the style at inference time, it uses several images from the target domain as guidance for translation (known as the few-shot setting). The domain annotations are however still needed during training. + +In our task, domains correspond to different times of + +the day and different lighting, and therefore domain labels are hard to define and hard to solicit from users. Furthermore, while timelapse videos might have provided us with weakly supervised data, we have found that collecting high-resolution diverse daytime timelapse videos is hard. Therefore, in our work, we aim to develop an image-to-image translation problem suitable for the setting when domain labels are unavailable. + +Thus, as our first contribution, we show how to train a multi-domain image-to-image translation model on a large dataset of unaligned images without domain labels. We demonstrate that the internal bias of the collected dataset, the inductive bias caused by the network architecture, and a specially developed training procedure make it possible to learn style transformations even in this setting. The only external (weak) supervision used by our approach are coarse segmentation maps estimated using an off-the-shelf semantic segmentation network. + +As the second contribution, to ensure fine detail preservation, we propose an architecture for image-to-image translation that combines the two well-known ideas: skip connections [22] and adaptive instance normalizations (AdaIN) [6]. We show that such a combination is feasible and leads to an architecture that preserves details much better than currently dominant AdaIN architectures without skip connections. We evaluate our system against several state-of-the-art baselines through objective measures as well as a user study. While our main focus is the task of photorealistic daytime alteration for landscape images, we also show that such architecture system can be used to handle other multi-domain image stylization/recoloring tasks. + +Finally, as the third contribution, we address the task of image-to-image translation at high resolution. In our case, as well as in many other settings, training a high-capacity image-to-image translation network directly at high resolution is computationally infeasible. We therefore propose a new enhancement scheme that allows to apply the imaged-to-image translation network trained at medium resolution for high-resolution images. + +The rest of the paper is organized as follows. Section 2 reviews related work. The main Section 3 presents the High-Resolution Daytime Translation (HiDT) model and the resolution-increasing enhancement model. Section 4 presents the results of a comprehensive experimental study, and Section 5 concludes the paper. Representative timelapse videos generated by our system are provided at the project webpage. + +# 2. Related work + +Unpaired image-to-image translation. The task of image translation aims to transfer images from one domain to another (e.g. from summer to winter) or add/remove some image attributes (e.g. adding eyeglasses to a portrait). Many + +image translation models exploit generative adversarial networks (GAN) with conditional generators to inject information about the target attribute or domain [2]. Others [7, 13] split input images into content and style representations and subsequently edit the style to obtain the desired effect. In both cases, most works target the two-domain setting [30] or a setting with several discrete domains [2]. + +More closely related to our work, several recent approaches [7, 13, 11] split input images into content and style representations and subsequently edit the style to obtain the desired effect. The most common choice for generators uses adaptive instance normalization (AdaIN) in the encoder-decoder architecture [6]. Providing explicit domain labels is still mandatory for most multi-domain algorithms. The recently proposed FUNIT model [17] is designed for the case when those labels are used only by the conditional discriminator, while the generator is extracting some style code from given samples in the target domain. In this work, we take the next logical step in the evolution of GAN-based style transfer and do not use domain labels at all. + +Timelapse generation. The generation of timelapses has attracted some attention from researchers, but most previous approaches use a dataset of timelapse videos for training. In particular, the work [24] used a bank of timelapse videos to find the scene most similar to a given image and then exploited the retrieved video as guidance for editing. Following them, the work [12] used a database of labeled images to create a library of transformations and apply them to image regions similar to input segments. Both methods rely on global affine transforms in the color space, which are often insufficient to model daytime appearance changes. + +Unlike them, a recent paper [20] has introduced a neural generation approach. The authors leveraged two timelapses datasets: one with timestamp labels and another without them, both of different image quality and resolution. Finally, a very recent and parallel research [3] uses a dataset of diverse videos to solve the daytime appearance change modeling problems. Note that the method [3] also considers the problem of modeling short-term changes and rapid object motion, which we do not tackle in our pipeline. Our approach is different from all previous works for timelapse generation, as it needs neither timestamps nor spatial alignment (such as, e.g. timelapse frames). + +High-resolution translation. Modern generative models are often hard to scale to high-resolution input images due to memory constraints; most models are trained on either cropped parts or downscaled versions of images. Therefore, to generate a plausible image in high resolution one needs an additional enhancement step to upscale the translation output and remove artifacts. Such enhancement is closely related to the superresolution problem. + +The work [15] compared photorealistic smoothing and image-guided filtering [4], and noted that the latter slightly + +![](images/b071a497b5331f0cc0e19d2db7c2155c1084238bccfd97f5450d976b1bd6bee5.jpg) +Figure 2: Diagram of the Adaptive U-Net architecture: an encoder-decoder network with dense skip-connections and content-style decomposition $(\mathbf{c},\mathbf{s})$ + +degraded the performance as compared to the former, but led to a significant performance gain. Another way, proposed in [20], is to apply a different kind of guided upsampling via local color transfer [5]. However, unlike image-guided filtering, this method does not have a closed-form solution and requires an optimization procedure at inference time. In [3], the model predicts the parameters of a pixelwise affine transformation of the downscaled image and then applies bilinear upsampling with these parameters to the full-resolution image. Unfortunately, both approaches often produce halo-type artifacts near image edges. + +The work most similar to ours in this regard, the pix2pixHD model [8], developed a separate refinement network. Our enhancement model is similar to their approach, as we also use the refinement procedure as a postprocessing step. But instead of training on the features, we use the output of low-resolution translation directly in a way inspired by classical multi-frame superresolution approaches [27]. + +# 3. Methods + +The main part of HiDT is an encoder-decoder architecture. The encoder performs decomposition into style (vector) and content (tensor). The decoder is then able to generate a new image $\hat{\mathbf{x}}$ by taking content from the content input image $\mathbf{x}$ and style from the style input image $\mathbf{x}'$ . + +The two components (the content and the style) are combined together using the AdaIN connection [6, 17]. The overall architecture has the following structure: the content encoder $E_{c}$ maps the initial image to a 3D tensor $\mathbf{c}$ using several convolutional downsampling layers and residual blocks. The style encoder $E_{s}$ is a fully convolutional network that ends with global pooling and a compressing $1 \times 1$ convolutional layer. The generator $G$ processes $\mathbf{c}$ with several residual blocks with AdaIN modules inside and then upsamples it. + +![](images/8d245d91552b7c63933e708adbd6d763bde053dd4073fca90165002de595cefb.jpg) +Figure 3: HiDT learning data flow. We show half of the (symmetric) architecture; $\mathbf{s}' = E_s(\mathbf{x}')$ is the style extracted from the other image $\mathbf{x}'$ , and $\hat{\mathbf{s}}'$ is obtained similarly to $\hat{\mathbf{s}}$ with $\mathbf{x}$ and $\mathbf{x}'$ swapped. Light blue nodes denote data elements; light green, loss functions; others, functions (subnetworks). Functions with identical labels have shared weights. Adversarial losses are omitted for clarity. + +To create a plausible daytime landscape image, the model should preserve fine details from the original image. To satisfy this requirement, we enhance the encoder-decoder architecture with skip connections between the downsampling part of tje encoder $E_{c}$ and the upsampling part of the generator $G$ . Regular skip connections would also "leak" the style of the initial input into the output. Therefore, we introduce an additional convolutional block with AdaIN [6] and apply it to the skip connections (see Fig. 2). + +# 3.1. Learning + +Overall, the architecture is trained using a reconstruction loss as well as a number of additional losses (Fig. 3). During training, the decoder predicts not only the input image $\mathbf{x}$ but also its semantic segmentation mask $\mathbf{m}$ (produced by a pretrained network [26]). While we do not aim to achieve state-of-the-art segmentation as a by-product, having the segmentation loss helps to control the style transfer and to preserve the semantic layout. Importantly, segmentation masks are not given as input to the networks, and are thus not needed at inference time. + +Notation. Denote the space of input images by $\mathcal{X}$ , their segmentation masks by $\mathcal{M}$ , and individual images with segmentation masks by $\mathbf{x}$ , $\mathbf{m} \in \mathcal{X} \times \mathcal{M}$ . Denote the space of latent content codes $\mathbf{c}$ is $\mathbf{c} \in \mathcal{C}$ , and the space of latent style codes $\mathbf{s}$ is $\mathbf{s} \in \mathcal{S}$ (as we will see below, $\mathcal{S} = \mathbb{R}^3$ while $\mathcal{C}$ has a more complex structure). To extract $\mathbf{c}$ and $\mathbf{s}$ from an image $\mathbf{x}$ , HiDT employs two encoders: $E_c: \mathcal{X} \to \mathcal{C}$ extracts the content representation $\mathbf{c}$ of the input image $\mathbf{x}$ , and + +$E_{s}:\mathcal{X}\to \mathcal{S}$ extracts the style representation $\mathbf{s}$ of the input image $\mathbf{x}$ . Given a content code $\mathbf{c}\in \mathcal{C}$ and a style code $\mathbf{s}\in S$ , the decoder (generator) $G:\mathcal{C}\times \mathcal{S}\rightarrow \mathcal{X}\times \mathcal{M}$ produces a new image $\hat{\mathbf{x}}$ and the corresponding segmentation mask $\hat{\mathbf{m}}$ . In particular, one can combine content from $\mathbf{x}$ and style from a different image $\mathbf{x}'$ as $(\hat{\mathbf{x}},\hat{\mathbf{m}}) = G(E_c(\mathbf{x}),E_s(\mathbf{x}'))$ . We call the result of the combination the translated image (and the translated mask). + +Also, during training we consider random style codes $\mathbf{s}_r$ sampled from a prior distribution $p^*$ on $\mathcal{S}$ . Then we get a random style image (and a random style mask) by applying the decoder to the content code $\mathbf{c}$ and the random style $\mathbf{s}_r$ respectively. During learning for each batch, we take the reconstructed images/masks, the translated images/masks (where the images are paired, and the styles are swapped) and the random style images/masks. + +Image reconstruction loss. The image reconstruction loss $\mathcal{L}_{\mathrm{rec}}$ is defined as the $L_{1}$ -norm of the difference between original and reconstructed images. It is applied in three different ways: (1) to the reconstruction $\tilde{\mathbf{x}}$ of the original image $\mathbf{x}$ , $\mathcal{L}_{\mathrm{rec}} = \| \tilde{\mathbf{x}} - \mathbf{x} \|_1$ , (2) to the reconstruction $\tilde{\mathbf{x}}_r$ of the random style image $\mathbf{x}_r$ , $\mathcal{L}_{\mathrm{rec}}^r = \| \tilde{\mathbf{x}}_r - \mathbf{x}_r \|_1$ , and (3) to the reconstruction $\tilde{\hat{\mathbf{x}}}$ of the image $\mathbf{x}$ obtained from the content of the stylized image $\hat{\mathbf{x}}$ and the style of the stylized image $\hat{\mathbf{x}}'$ (cross cycle consistency): $\mathcal{L}_{\mathrm{cyc}} = \left\| \tilde{\hat{\mathbf{x}}} - \mathbf{x} \right\|_1$ , where $\tilde{\hat{\mathbf{x}}} = G(\hat{\mathbf{c}}, \hat{\mathbf{s}}')$ (see Fig. 3). + +Segmentation loss. The segmentation loss $\mathcal{L}_{\mathrm{seg}}$ is used together with the image reconstruction loss and is defined as the cross entropy $\mathrm{CE}(\mathbf{m},\hat{\mathbf{m}}) = -\sum_{(i,j)}m_{i,j}\log \hat{m}_{i,j}$ between the original $\mathbf{m}$ and reconstructed $\hat{\mathbf{m}}$ segmentation masks. It is applied in two ways: first, to the translated mask $\hat{\mathbf{m}}$ , $\mathcal{L}_{\mathrm{seg}} = \mathrm{CE}(\mathbf{m},\hat{\mathbf{m}})$ , and then to the random style mask $\mathbf{m}_r$ : $\mathcal{L}_{\mathrm{seg}}^r = \mathrm{CE}(\mathbf{m},\mathbf{m}_r)$ . + +Adversarial loss. We use two discriminators, namely, the unconditional discriminator and the conditional discriminator, where the style vector is used as conditioning. Both discriminators consider translated and random style images as fakes. Both discriminators are trained with the least squares GAN approach [18]. We utilize the projection conditioning scheme [19] and detach the styles from the computational graph when feeding them to the conditional discriminator during the generator update step. + +Latent reconstruction losses. We enforce cycle consistency with respect to the style and the content codes. We pass the translated and the random style images into the encoders, and compute the losses between the resulting style (content) and the style (content) that the respective translated or the random style image was obtained from. We apply the $L_{1}$ loss to content codes as well as to the style codes. + +Style distribution loss. To enforce the structure of the space of extracted style codes, the style distribution loss in- + +spired by the CORAL approach [25], is applied to a pool of styles collected from a number of previous training iterations. Namely, for a given pool size $T$ we collect the styles $\{\mathbf{s}^{(1)},\dots ,\mathbf{s}^{(T)}\}$ from past minibatches with the stop gradient operation applied. We then add styles $\mathbf{s}$ and $\mathbf{s}'$ (which are part of the current computational graph) to this pool, and calculate the mean vector $\hat{\boldsymbol{\mu}}_s$ and covariance matrix $\hat{\Sigma}_s$ using the updated pool. Then the style distribution loss matches empirical moments of the resulting distribution to the moments of the prior distribution $\mathcal{N}(\mathbf{0},\mathbf{I})$ : $\mathcal{L}_{\mathrm{dist}} = \| \hat{\boldsymbol{\mu}}_T\| _1 + \left\| \hat{\boldsymbol{\Sigma}}_T - \mathbf{I}\right\| _1 + \left\| diag(\hat{\boldsymbol{\Sigma}}_T) - \mathbf{1}\right\| _1$ . Since the space $S = \mathbb{R}^3$ is low-dimensional, and our target is the unit normal distribution $\mathcal{N}(\mathbf{0},\mathbf{I})$ , this simplified approach suffices to enforce the structure in the space of latent codes. After computing the loss value, the oldest styles are removed from the pool to keep its size at $T$ . + +Total loss function. Thus, overall HiDT is jointly training the style encoder, content encoder, generator, and discriminator with the following objective: + +$$ +\begin{array}{l} \min _ {E _ {c}, E _ {s}, G} \max _ {D} \mathcal {L} \left(E _ {c}, E _ {s}, G, D\right) = \lambda_ {1} \left(\mathcal {L} _ {\mathrm {a d v}} + \mathcal {L} _ {\mathrm {a d v}} ^ {r}\right) + \\ + \lambda_ {2} \left(\mathcal {L} _ {\text {r e c}} + \mathcal {L} _ {\text {r e c}} ^ {r} + \mathcal {L} _ {\text {c y c}}\right) + \lambda_ {3} \left(\mathcal {L} _ {\text {s e g}} + \mathcal {L} _ {\text {s e g}} ^ {r}\right) + \\ + \lambda_ {4} \left(\mathcal {L} _ {\mathrm {c}} + \mathcal {L} _ {\mathrm {c}} ^ {r}\right) + \lambda_ {5} \mathcal {L} _ {\mathrm {s}} + \lambda_ {6} \mathcal {L} _ {\mathrm {s}} ^ {r} + \lambda_ {7} \mathcal {L} _ {\text {d i s t}} \\ \end{array} +$$ + +Hyperparameters $\lambda_1, \ldots, \lambda_7$ define the relative importance of the components in the overall loss function; they have been chosen by hand and will be shown below. + +During our experiments, we have observed that the projection discriminator significantly improves the results, while removing the segmentation loss function sometimes leads to undesirable hallucinations in the generator (see Fig. 5 for an example). However, the model is still well trained without segmentation loss function and gets a comparable user preference score. We provide a further ablation study in the supplementary material. + +# 3.2. Enhancement postprocessing + +Training image-to-image translation on high resolution images is infeasible due to both memory and computation time constraints. In principle, our architecture can be trained at medium resolution and applied to high resolution images in a fully convolutional way. Alternatively, guided filtering [4] can be used to upsample results of processing at medium resolution. Although both of these techniques show good results in most cases, they have limitations. A fully convolutional application might yield scene corruption due to limited receptive field, which is the case with sunsets where multiple suns might be drawn, or water reflections where the border between sky and water surface might be confused. Guided filtering, on the other hand, works great with water or sun but fails if small details like twigs were + +![](images/8d24b96bc143d68003ee34935685fbd0d03e8a18b3d32d1049dbb985ad46d23c.jpg) +Figure 4: Enhancement scheme: the input is split into subimages (color-coded) that are translated individually by HiDT at medium resolution. The outputs are then merged using the merging network $G_{\mathrm{enh}}$ . For illustration purposes, we show upsampling by a factor of two, but in the experiments we use a factor of four. We also apply bilinear downsampling (with shifts – see text for detail) rather than strided subsampling when decomposing the input into medium resolution images. + +changed by the style transfer procedure. It also often generates halo artefacts near the horizon and other high-contrast borders. Finally, we have found that a superresolution architecture [29] does not generalize well even to well-looking translated images, effectively amplifying translation artefacts. + +Inspired by existing multiframe image restoration methods [27], we propose to apply translation multiple times at medium resolution and then use a separate merging network $G_{\mathrm{enh}}$ to combine the results into a high-resolution translated image. More specifically, we consider a high resolution image $\mathbf{x}_{\mathrm{hi}}$ (in our experiments, $1024 \times 1024$ ). We then consider sixteen shifted versions of $\mathbf{x}_{\mathrm{hi}}$ denoted as $\{\mathbf{x}_{\mathrm{hi}}^{(i)}\}_i$ , each having the same size as $\mathbf{x}_{\mathrm{hi}}$ and obtained with integer displacement spanning the range [0; 4] in $x$ and $y$ (missing pixels are filled with zeros). The shifted images are then downsampled bilinearly resulting in sixteen medium-resolution images $\{\mathbf{x}_{\mathrm{med}}^{(i)}\}_i$ , from which the original image $\mathbf{x}_{\mathrm{hi}}$ can be easily recovered. + +We then apply HiDT to each of the medium-resolution images separately, getting translated medium-resolution images $\{\hat{\mathbf{x}}_{\mathrm{med}}^{(i)}\}_{i}$ , $\hat{\mathbf{x}}_{\mathrm{med}}^{(i)} = G(E_c(\mathbf{x}_{\mathrm{med}}^{(i)}), E_s(\mathbf{x}_{\mathrm{med}}^{(i)}))$ . These + +
NHiDT vs methodUser ↑ scorep-valueAdjusted p-value
1DRIT0.530.9971.0
FUNIT-T0.510.9040.999
FUNIT-O0.570.9991.0
5FUNIT-T0.480.0240.179
FUNIT-O0.550.4811.0
10FUNIT-T0.470.0010.011
FUNIT-O0.570.9991.0
+ +Table 1: User preference study of HiDT against the baselines. $N$ is the number of styles averaged in the few-shot setting. The user score is the share of users that choose HiDT in the pairwise comparison. Our results show that all methods are competitive. The increase of $N$ leads to the better quality of FUNIT-T. + +frames are stacked into a single tensor in a fixed order and are fed to the merging network $G_{\mathrm{enh}}$ that outputs the translated high-resolution image. The process is illustrated in Fig. 4. + +The merging network $G_{\mathrm{enh}}$ is trained in a semi-supervised mode on two datasets: paired and unpaired. To obtain a paired dataset, we use HiDT in an "autoencoder mode" (i.e. without changing the style). To obtain each training pair, we take a high-res image, decompose it into sixteen medium-resolution images, and pass them through the HiDT architecture without changing the style. For the unpaired dataset collection we use the same procedure, but the style is being sampled from normal distribution (since we used it as a prior during training). The merging network is thus shown stacks of resulting images and is tasked with restoring the original image. At test time, we can use a new style $\mathbf{s}'$ , when translating each of the medium-resolution images. The output of the merging network will then correspond to the high-resolution input image $\mathbf{x}_{\mathrm{hi}}$ translated to the style $\mathbf{s}'$ . + +We note the similarity of our approach to [28], with the difference being that we use several RGB images as input instead of feature maps. During training, we use the same losses as pix2pixHD [28], namely perceptual, feature matching, and adversarial loss functions. We apply only adversarial loss for the unpaired data. + +# 4. Experiments + +# 4.1. Daytime translation + +Training details. In our experiments, the content encoder has two downsampling and four residual blocks; after each downsampling, only five channels are used for skip connections in order to limit the information flow through them. The style encoder contains four downsampling blocks. The output of the style encoder is a three-channel tensor, which is averaged-pooled into a three + +
MethodDIPD↓ swappedDIPD↓ randomCIS↑IS↑ randomIS↑ swapped
FUNIT-T1.168-1.535-1.615
DRIT0.8631.0181.2031.2511.577
HiDT-AE0.321-1.179-1.524
HiDT0.6910.881.5591.6731.605
+ +Table 2: Performance comparison of three models using a hold-out dataset. FUNIT is not applicable in the random setting. According to the selected metrics, none of the models shows complete superiority over the others. + +![](images/42a5cd5ccac35f7295ff543ae28a298bbe9329c944b0d4b04f5da428df90d5fa.jpg) +(a) + +![](images/fbb6302fd4d45909fa12e91508b24239f3098a5977a2d6c2afeb760affae6b60.jpg) +Figure 5: Training without segmentation losses is prone to failures of semantic consistency. Left: original images. Right: transferred images. (a) Our ablated model, trained without auxiliary segmentation task, turns grass into water; (b) FUNIT hallucinates grass on the building. + +![](images/6f2b0c8c476a87d733bedf2c9d8b1691204709e14b4ff1a24369ec4f832b39e2.jpg) +(b) + +![](images/efe0478ff0965329e42ea5bc15d6435799e84c25b98eb57d2e4daf644261c780.jpg) + +dimensional vector. The decoder has five residual blocks with AdaIN layers and two upsampling blocks. AdaIN parameters are computed from the style vector via three-layer fully-connected network. Both discriminators are multiscale, with three downsampling levels. We trained the translation model for 450 thousand iterations with batch size four on a single NVIDIA Tesla P40. For training, the images were downscaled to the resolution of $256 \times 256$ . The loss weights were set to $\lambda_1 = 5, \lambda_2 = 2, \lambda_3 = 3, \lambda_4 = 1, \lambda_5 = 0.1, \lambda_6 = 4, \lambda_7 = 1$ . We used the Adam optimizer [10] with $\beta_{1} = 0.5, \beta_{2} = 0.999$ , and initial learning rate 0.0001 for both generators and discriminators, halving the learning rate every 20000 iterations. + +Dataset and daytime classifier. Following previous works, we collected a dataset of 20,000 landscape photos from the Internet. A small part of these images were manually labeled into four classes (night, sunset/sunrise, morning/evening, noon) using a crowdsourcing platform. A ResNet-based classifier was trained on those labels and applied to the rest of the dataset. We used predicted labels in two ways: (1) to balance the training set for image translation models with respect to daytime classes; (2) to provide domain labels for baseline models. Segmentation masks were produced by an external state of the art model [26] and reduced to nine classes: sky, grass, ground, mountains, water, buildings, trees, roads, and humans. + +Baselines. We used two recent image-to-image translation models as baselines: FUNIT [17] and Multi-domain DRIT++ [13] (referred to as DRIT for brevity). Both of them + +use domain labels. We trained the models on our dataset: DRIT with original hyperparameters, and FUNIT with both original (FUNIT-O) and properly tuned (FUNIT-T) hyperparameters. At inference time, FUNIT transfers the original image using styles extracted from other images, while DRIT in addition can transfer to randomly sampled styles. As another weak baseline, we train our model with only the autoencoding loss $\mathcal{L}_{\mathrm{rec}}$ (HiDT-AE). The trained HiDT-AE still produces some color shifting when the styles are swapped; the result does not resemble the target daytime well enough, although it preserves the content (details) well. + +Evaluation metrics. To compare our model with the baselines, we use several metrics, also commonly employed in previous works. The domain-invariant perceptual distance (DIPD) [7, 17] is the $L_{2}$ distance between normalized Conv5 features of the original image and its translated version. It is used to measure content preservation. The Inception score (IS) [23] assesses the photorealism of generated images. We use the classifier described above to predict the domain label of the translated image. Styles for the translation may be either sampled from the prior distribution $p^{*}(\mathbf{s})$ (IS-random) or extracted from other images (IS-swapped). The conditional inception score (CIS) [7] measures the diversity of translation results, which is suitable for our multi-domain setting. We calculate CIS for style swapping translation. To estimate the visual plausibility and photorealism of translation results, we use human evaluation with the following protocol. The assessors on a crowd-sourcing platform were shown triplets containing 1. the original image, 2. the image translated with our method, and 3. the image translated using one of the baseline models. We also show assessors the target label (time of day) and ask to choose the image that looks better with respect to both details preserved from the original image and the correct time of day. As both our model and FUNIT support the few-shot setting, styles for translation were obtained by averaging $N$ styles extracted from images with the corresponding labels $(N = 1, 5, 10)$ . Assessment time was limited to two minutes per task, and original images were independently collected from the Internet. For each compared pair of methods, we generated 500 triplets, and each triplet was assessed by five different workers. + +Results. Sample results of our image translation model are shown in the teaser figure on the first page. Fig. 6 shows style swapping between different images, while image translation with styles randomly sampled from the prior distribution is shown in Fig. 7. In these experiments, we applied the truncation trick known for improving the average output quality [1, 9] at inference time. Random styles are sampled with reduced variance, and the styles extracted from other images are interpolated with the style extracted from the original image. One important application of our + +![](images/c3426ee6fbb39b8588e52235fd59ede6db6af6e6f614bc2bd7d0373cc3107273.jpg) +Figure 6: Swapping styles between two images. Original images are shown on the main diagonal. The examples show that HiDT is capable to swap the styles between two real images while preserving details. + +![](images/c81eedb94dc02b86759e7424a03823b3ceb1b0dcab721ef792af09d60c2ec052.jpg) +Figure 7: The original content image (top left), transferred to randomly sampled styles from prior distribution. The results demonstrate the diversity of possible outputs. + +model is daytime timelapse generation using some video as a guidance; we showcase frames from such a timelapse in Fig. 9. + +A qualitative comparison of our model with baselines is + +shown in Fig. 8. Results of different models are hard to distinguish, which is supported by our human evaluation study (Table 1). We report user preference of our model over the baselines and evaluate its statistical significance, applying the one-tailed binomial test to the hypothesis "User score equals 0.5" against "User score is less than 0.5". Due to multiple hypothesis testing, we also apply the Holm-Sidak adjustment and show adjusted p-values. Table 1 suggests that unlabeled training is sufficient for time-of-day translation. Traditional image-to-image translation metrics are summarized in Table 2. Again, all models are basically on par with each other, with different winners according to different metrics. + +![](images/0e52b787650b3c44c9e32d0d8a4a41c899c1bc32e14e7253622a9e1c2ab28d06.jpg) +Figure 8: Comparison with baselines. Columns, left to right: the original image, FUNIT-T, FUNIT-O, DRIT, HiDT (ours). Our model, trained and applied without knowledge about domain labels, has translation quality similar to the models that require such supervision. + +![](images/1807e19578b777101a6f25ddc0d9666740e3f6ec32e1b246e23d22b1f7cd2a41.jpg) +Figure 9: Timelapse generation using styles extracted from a real video. Top: frames from a guidance video. Bottom: timelapse generated from a single image using extracted styles. + +# 4.2. High-resolution translation + +Training details. For the merging network, we used the RRBDNet architecture from ESRGAN [29] with five residual blocks for $G_{\mathrm{enh}}$ and a multiscale discriminator with three scales and five layers. We used multiplier coefficients of 10 for perceptual and feature matching losses and the unit weight for adversarial loss. We set learning rate of 0.0001 for both the merging network and the discriminator. + +![](images/a53a5d1a56613e1fe4e0b04f882ed783ba78c8b8665bfa6f7c34615ec8a10364.jpg) +Figure 10: Enhancement of our translation network outputs with different methods. Columns, left to right: original image; result of our translation network applied directly to the hi-res input; low-res translation output upsampled with Lanczos' method; the result of our enhancement scheme. In this example, direct fully-convolutional application to hi-res turns water into sky with stars, while the enhancement network preserves the semantics of the scene. + +![](images/dec3e787c2d47b7c88c2cb08086e6e1de22588fded766623ac0bb9f021905364.jpg) +Figure 11: A flower image (left) translated to several randomly sampled styles by HiDT trained on Oxford Flowers dataset. + +Baselines. We compare the proposed enhancement scheme with the following baselines: (1) fully convolutional application of the translation network to a high-resolution image, (2) Lanczos upsampling. The pix2pixHD [28] enhancement scheme requires supervision for translated images. Therefore, we do not use pix2pixHD as a baseline. + +Results. The resulting downsampled images produced with the enhancement procedure are presented in Fig. 1, and a detailed example is shown in Fig. 10. The latter figure contains image patch produced by different models and shows that our model is more plausible than the result of direct Lanczos upsampling: the rightmost patch contains more details from the original. + +# 4.3. Additional task + +To show the generality of the proposed HiDT approach, we additionally trained the image translation model on the Flowers dataset [21] for 60,000 iterations. Segmentation masks and associated losses were not used in this experiment. The results of translation to random styles (with no enhancement) are presented in Fig. 11. We have also applied HiDT to the WikiArt dataset of paintings (for which + +![](images/a946a9748b216a0117950c0f4ac1c1685595f6d2e899acc720659ba243faf1ee.jpg) +Figure 12: Style swapping for the HiDT system trained on a paintings dataset. The main diagonal contains original paintings and off-diagonal entries correspond to translated results. Plausbile translations obtained by HiDT in this case, suggests its generality. + +we have increased the dimensionality of the style space to 12). The result of style swapping in this case is shown in Fig. 12. + +# 5. Conclusion + +We have presented an image-to-image translation model that does not rely on domain labels during either training or inference. The new enhancement scheme shows promising results for increasing the resolution of translation outputs. We have shown that our model is able to learn daytime translation for high-resolution landscape images and provided qualitative evidence that our approach can be generalized to other domains. + +The results show that our method is on par with state of the art baselines that require labels at least at training time. Our model can generate images using styles extracted from images, as well as sampled from the prior distribution. An appealing straightforward application of our model is the generation of timelapses from a single image (the task currently mainly tackled with paired datasets). One direction for further work would be to unite the translation and enhancement networks into a single model trained end-to-end. + +# References + +[1] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In International Conference on Learning Representations, 2019. +[2] Y. Choi, M. Choi, M. Kim, J. Ha, S. Kim, and J. Choo. StarGAN: Unified Generative Adversarial Networks for Multidomain Image-to-Image Translation. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8789–8797, June 2018. +[3] Yuki Endo, Yoshihiro Kanamori, and Shigeru Kuriyama. Animating landscape: Self-supervised learning of decoupled motion and appearance for single-image video synthesis. 38(6):175:1-175:19. +[4] K. He, J. Sun, and X. Tang. Guided Image Filtering. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(6):1397-1409, June 2013. +[5] Mingming He, Jing Liao, Dongdong Chen, Lu Yuan, and Pedro V. Sander. Progressive color transfer with dense semantic correspondences. ACM Trans. Graph., 38(2):13:1-13:18, Apr. 2019. +[6] X. Huang and S. Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 1510-1519, Oct 2017. +[7] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal Unsupervised Image-to-Image Translation. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss, editors, Computer Vision - ECCV 2018, pages 179-196, Cham, 2018. Springer International Publishing. +[8] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[9] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[10] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, ICLR, 2015. +[11] Dmytro Kotovenko, Artsiom Sanakoyeu, Sabine Lang, and Bjorn Ommer. Content and style disentanglement for artistic style transfer. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[12] Pierre-Yves Laffont, Zhile Ren, Xiaofeng Tao, Chao Qian, and James Hays. Transient attributes for high-level understanding and editing of outdoor scenes. ACM Trans. Graph., 33(4):149:1-149:11, July 2014. +[13] Hsin-Ying Lee, Hung-Yu Tseng, Qi Mao, Jia-Bin Huang, Yu-Ding Lu, Maneesh Singh, and Ming-Hsuan Yang. DRIT++: diverse image-to-image translation via disentangled representations. CoRR, abs/1905.01270, 2019. +[14] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Diverse Image-to-Image Translation via Disentangled Representations. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair + +Weiss, editors, Computer Vision - ECCV 2018, Lecture Notes in Computer Science, pages 36-52. Springer International Publishing, 2018. +[15] Yijun Li, Ming-Yu Liu, Xueting Li, Ming-Hsuan Yang, and Jan Kautz. A Closed-Form Solution to Photorealistic Image Stylization. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss, editors, Computer Vision – ECCV 2018, pages 468–483, Cham, 2018. Springer International Publishing. +[16] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised Image-to-Image Translation Networks. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 700–708. Curran Associates, Inc., 2017. +[17] Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, and Jan Kautz. Few-shot unsupervised image-to-image translation. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[18] Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2794-2802, 2017. +[19] Takeru Miyato and Masanori Koyama. cGANs with projection discriminator. In International Conference on Learning Representations, 2018. +[20] Seonghyeon Nam, Chongyang Ma, Menglei Chai, William Brendel, Ning Xu, and Seon Joo Kim. End-to-end timelapse video synthesis from a single outdoor image. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[21] Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In *Indian Conference on Computer Vision, Graphics and Image Processing*, Dec 2008. +[22] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), volume abs/1505.04597, 2015. +[23] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, Xi Chen, and Xi Chen. Improved techniques for training gans. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 2234-2242. Curran Associates, Inc., 2016. +[24] Yichang Shih, Sylvain Paris, Frdo Durand, and William T. Freeman. Data-driven Hallucination of Different Times of Day from a Single Outdoor Photo. ACM Trans. Graph., 32(6):200:1-200:11, Nov. 2013. +[25] Baochen Sun, Jiashi Feng, and Kate Saenko. Correlation alignment for unsupervised domain adaptation. In Gabriela Csurka, editor, Domain Adaptation in Computer Vision Applications, pages 153-171. Springer International Publishing. +[26] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. + +mation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[27] R Tsai. Multiframe image restoration and registration. Advance Computer Visual and Image Processing, 1:317-339, 1984. +[28] T. Wang, M. Liu, J. Zhu, A. Tao, J. Kautz, and B. Catanzaro. High-resolution image synthesis and semantic manipulation with conditional gans. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8798-8807, June 2018. +[29] 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 Laura Leal-Taix and Stefan Roth, editors, In ECCV 2018 Workshops, pages 63-79. Springer International Publishing. +[30] J. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired Image-to-Image Translation Using Cycle-Consistent Adversarial Networks. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2242–2251, Oct. 2017. \ No newline at end of file diff --git a/highresolutiondaytimetranslationwithoutdomainlabels/images.zip b/highresolutiondaytimetranslationwithoutdomainlabels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4f04c429c91156f4b60bb3bc97659c19c8bdbe7e --- /dev/null +++ b/highresolutiondaytimetranslationwithoutdomainlabels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:051243459b776fd89c75f87a3427c6c11370856e8008526926041903a1effc86 +size 671522 diff --git a/highresolutiondaytimetranslationwithoutdomainlabels/layout.json b/highresolutiondaytimetranslationwithoutdomainlabels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..faf15b802376b928d747b506f862617ed21536d8 --- /dev/null +++ b/highresolutiondaytimetranslationwithoutdomainlabels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e52dde7c4b33f00c5457f495112118a6ac73919928c3b90d529dd9aa6b31ac4 +size 361818 diff --git a/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_content_list.json b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b835c707e6e4ac8d2b33500274a2cf2c08b54867 --- /dev/null +++ b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64463f8c2892101002570b92c037f19d030c6bb8800859cc80fcdaa08dfd6899 +size 80451 diff --git a/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_model.json b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8b83dde3b30cba40e21f55ceb22fb493e45bc003 --- /dev/null +++ b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da64c3024c4bc7aa6e8ff487ecbf9157176433aaab377f21f99468c62ac28a7c +size 100712 diff --git a/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_origin.pdf b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fd4456567a9eb3bc6d6dbe62f9d4396549e46592 --- /dev/null +++ b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/b6f30172-7f21-4643-abc1-45f690d69132_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce3e336a415729326a70acc68064d5289f290dfde3d29290bcdcd029c4f2b6f0 +size 581785 diff --git a/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/full.md b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7324a1926e178304bf53a3f68e93ef342c9d1c47 --- /dev/null +++ b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/full.md @@ -0,0 +1,329 @@ +# Hit-Detector: Hierarchical Trinity Architecture Search for Object Detection + +Jianyuan Guo $^{1,2}$ , Kai Han $^{2}$ , Yunhe Wang $^{2}$ , Chao Zhang $^{1*}$ , Zhaohui Yang $^{1}$ , Han Wu $^{1}$ , Xinghao Chen $^{2}$ , Chang Xu $^{3}$ + +1 Key Lab of Machine Perception (MOE), Dept. of Machine Intelligence, Peking University. + +$^{2}$ Noah's Ark Lab, Huawei Technologies. $^{3}$ School of Computer Science, Faculty of Engineering, University of Sydney. + +{jyguo, zhaohuiyang, wuhancs}@pku.edu.cn, chzhang@cis.pku.edu.cn + +c.xu@sydney.edu.au, {kai.han, yunhe.wang, xinghao.chen}@huawei.com + +# Abstract + +Neural Architecture Search (NAS) has achieved great success in image classification task. Some recent works have managed to explore the automatic design of efficient backbone or feature fusion layer for object detection. However, these methods focus on searching only one certain component of object detector while leaving others manually designed. We identify the inconsistency between searched component and manually designed ones would withhold the detector of stronger performance. To this end, we propose a hierarchical trinity search framework to simultaneously discover efficient architectures for all components (i.e. backbone, neck, and head) of object detector in an end-to-end manner. In addition, we empirically reveal that different parts of the detector prefer different operators. Motivated by this, we employ a novel scheme to automatically screen different sub search spaces for different components so as to perform the end-to-end search for each component on the corresponding sub search space efficiently. Without bells and whistles, our searched architecture, namely Hit-Detector, achieves $41.4\%$ mAP on COCO minival set with 27M parameters. Our implementation is available at https://github.com/ggjy/HitDet.pytorch. + +# 1. Introduction + +Object detection is a fundamental task in computer vision and has been widely applied in the real world, such as autonomous vehicles and surveillance video. The advancement of deep learning results in a number of convolutional neural network based solutions of object detection task. Typically, deep learning based detectors can be divided into two categories: (i) one-stage methods includingYOLO [40] and SSD [33] which directly utilize CNNs to predict the bounding boxes of interest; and (ii) two-stage + +Table 1. Comparing our model against some typical two-stage detectors on COCO benchmark. "4c" indicates four convolution layers. $\dagger$ means that NAS-FPN is originally searched for one-stage RetinaNet, we replace the neck in FPN with NAS-FPN to construct the two-stage detector. + +
ModelBackbone (#params/M)Neck (#params/M)Head (#params/M)mAP (%)
FPN baseline [26]Res50 (23.5)FPN (3.3)2fc (14.3)36.2
NAS-FPN [13]†Res50 (23.5)NAS-FPN (30.4)2fc (14.3)38.9
Backbone baselineRes50 (23.5)FPN (3.3)4c1fc (15.6)36.8
DetNAS [8]DetNet (9.4)FPN (2.8)4c1fc (15.6)40.2
NAS-FPN + DetNASDetNet (9.4)NAS-FPN (29.7)4c1fc (15.6)39.4
Hit-Detecotr (ours)Ours (13.9)Ours (2.7)Ours (9.9)41.4
+ +approaches such as Faster R-CNN [42] that generates the bounding boxes after extracting region proposals upon a region proposal network (RPN). The advantage of single-stage methods lies in the high detection speed whereas two-stage methods dominate in detection accuracy. + +A series of either one-stage [41, 27, 22] or two-stage approaches [9, 18, 5] have been developed to continuously boost the detection speed and accuracy. However, the manually designed architectures heavily rely on the expert knowledge [25] while still might be suboptimal. Thus neural architecture search (NAS) that automates the design of network architectures and minimizes human labor has drawn much attention and made impressive progress, especially in image classification tasks [57, 29, 45, 31, 43, 46, 48, 55, 17]. Compared with classification tasks that simply determine what the image is, detection tasks need to further figure out where the objects are. NAS for object detection therefore requires more careful design and is much more challenging. + +Modern object detection systems usually consist of four components: (a) backbone for extracting semantic features, e.g. ResNet-50 [19] and ResNeXt-101 [49]; (b) neck for fusing multi-level features, e.g. feature pyramid networks (FPN) [26]; (c) RPN for generating proposals (usually in two-stage detector); and (d) head for object classification + +and bounding box regression. Recently, there are works that explore NAS in object detection tasks to search for a good architecture of the backbone [37, 8] or FPN [13, 51]. With the searched backbone or FPN architectures, these works have achieved higher accuracy than the manually designed baselines with similar numbers of parameters and FLOPs. + +Nevertheless, exploiting only one part of the detector at a time cannot fulfill the potential of each component, and the separately searched backbone and neck may not be optimal or compatible with each other. As shown in Table 1, NAS-FPN [13] for neck searching achieves a $38.9\%$ mAP which is higher than that of vanilla FPN, and DetNAS [8] for backbone searching outperforms vanilla ResNet-50 backbone with $40.2\%$ mAP. However, a straightforward combination of NAS-FPN and DetNAS leads to a worse mAP, i.e., $39.4\%$ , let alone outperforms two models. This insightful observation motivates us to take the detector as a whole in NAS. + +In this paper, we propose to simultaneously search all components of the detector in an end-to-end manner. Due to the differences among optimum space for each component and the difficulty in optimizing within large search space, we introduce a hierarchical way to mine the proper sub search space from the large volume of operation candidates. In particular, our proposed Hit-Detector framework consists of two key procedures as shown in Fig. 1. First, given a large search space containing all the operation candidates, we screen out the customized sub search space suitable for each part of detector with the help of group sparsity regularization. Secondly, we search the architectures for each part within the corresponding sub search space by adopting the differentiable manner. Extensive experiments demonstrate that our Hit-Detector achieves state-of-the-art results on the benchmark dataset, which validates the effectiveness of the proposed method. + +Our main contributions can be summarized as follows: + +- This is the first time that architectures of backbone, neck and head are searched altogether in an end-to-end manner for object detection. +- We show that different parts prefer different operations, and propose a hierarchical way to specify appropriate sub search space for different components in detection system to improve the sampling efficiency. +- Our Hit-Detector outperforms either hand-crafted or automatically searched networks by a large margin with much less computational complexity. + +# 2. Related Work + +Object detection aims at determining what and where the object is when given an image. Riding the wave of convolutional neural networks, noticeable improvements in accuracy have been made in both one-stage [40, 33, 27, 22, 11, + +56] and two-stage [42, 18, 9, 26, 20, 21, 5, 32] detectors. Generally, object detector consists of four parts: a backbone that extracts features from input images, a neck attached to backbone that fuses multi-level features, a region proposal network which generates prediction candidates on extracted features1, and a head for classification and localization. + +In the past few years, various methods in the literature have been proposed to tackle with detection task and attain significant progress. With NAS prospering automating design of model architecture, it has also boosted the probe into automatically searching for the best architecture for object detection, other than manually design. Here we briefly review some of the recent detectors in two dimensions: + +# 2.1. Manual design + +The manual design of detectors in mainstream evolution of object detection solutions is promoted by several works. R-CNN [15] is the first to show that a CNN could lead to dramatic performance improvement in object detection. Selective Search [47] is used to generate proposals and SVM is applied to classify each region. Following R-CNN, Fast R-CNN [14] is proposed to improve the speed by sharing computation of convolutional layers between proposals. Faster R-CNN [42] replaces Selective Search with a novel RPN (region proposal network), further promoting the accuracy and makes it possible to train model in an end-to-end manner. In addition, Mask R-CNN [18] extends Faster R-CNN mainly in instance segmentation task. Meanwhile, a series of proposal free detectors, i.e. one-stage detectors, has been proposed to speed up the detection. YOLO [40] and YOLOv2 [41] extract features from input images straightly for predicting bound boxes and associated class probabilities through a unified architecture. SSD [33] further improves the mAP by predicting a set of bounding boxes from several feature maps with different scales. + +In the mean time, some arts concentrate on improving specific parts such as backbone, neck, and head to improve the efficiency in object detectors. DetNet [25] specifically designs a novel backbone network for object detection. FPN [26] develops a top-down architecture to effectively encode features from different scales. PANet [32] further modifies neck module to obtain a better fusion. Focal loss [27] is proposed to solve the problem of class imbalance. MetaAnchor [53] proposes a flexible mechanism which generates anchor from arbitrary prior boxes. LightHead R-CNN [24] designs a light head for two-stage detector to decrease the computation cost accordingly. + +# 2.2. Neural architecture search + +NAS for image classification NAS (neutral architecture search) has attracted great attention recently. Several rein + +![](images/063f92733ec3412ce9612f4b9e4339cb5536d4559fbd552bb88dfcb3dfcf93f7.jpg) +Figure 1. Overview of our Hit-Detector architecture search framework. Our method focuses on searching better architectures of the trinity, i.e. backbone, neck, and head for object detector. (a) is the whole search space; (b) indicates three sub search spaces for different components; and (c) shows the end-to-end searching for object detector. "TBS" denotes the layer to be searched. + +forcement learning based methods [1, 3, 57, 58, 29] train a RNN controller to generate cell structure and form the network accordingly. Evolutionary algorithm based methods [30, 35, 38, 39, 16, 45, 54] are also proposed to update architectures by mutating current ones. To speed up searching process, gradient based methods [31, 7, 48, 50, 4, 52] are proposed for continuous relaxation of search space, which allow the differentiable optimization in architecture search. + +NAS for object detection In addition to NAS works on classification, some recent works attempt to develop NAS for object detector. NATS [37] claims that the effective receptive field of backbone is critical and uses NAS to search different dilation rates for each convolution layer in backbone. Similarly, DetNAS [8] aims to search a better backbone for detection task. NAS-FPN [13] targets at a better architecture of feature pyramid network for object detection, adopting NAS to discover a new feature pyramid architecture covering all cross-scale connections. Auto-FPN [51] sequentially searches a better fusion of the multi-level features for neck and a better structure for head. However, there are two shortcomings in above methods: (i) the search space is defined by human prior and might be too naive for searching (e.g. four choices based on ShuffleNetV2 [34] in DetNAS [8]); (ii) in each work, only one certain part is searched (e.g. backbone in [37, 8], neck in [13]) can lead to suboptimal result in detection task. To tackle these two challenges, we propose Hit-Detector that filters proper search space for each parts hierarchically and searches every parts for a better detector in an end-to-end manner. + +# 3. Hit-Detector + +In this section, we introduce the proposed Hierarchical Trinity architecture search algorithm for object detection and the resulted detector, i.e. Hit-Detector. We first iden + +tify and analyze the problems in current NAS algorithms for object detection to clarify our motivation that we need to search all components together. Then we detail how to hierarchically filter the sub search space for each parts, and last, the end-to-end search process for Hit-Detector is depicted. The following statement of search algorithm is based on two-stage detection methods and can be easily applied to one-stage methods. + +# 3.1. Preliminaries and Motivation + +Two-stage detection system can be decoupled as four components: (i) Backbone. Commonly used backbones in detection system such as ResNet [19] and ResNeXt [49] are mostly manually designed for classification tasks. Usually, the largest proportion of parameters in a detector comes from backbone. For example, ResNet-101, the backbone of FPN [26], takes up $71\%$ parameters of all, leaving a large potential for searching; (ii) Neck. Employing in-network feature pyramids to approximate different receptive fields can help detector localize objects better. Previous architectures of feature fusion neck are manually designed while NAS can exploit better operations for merging features from different scales; (iii) RPN. The typical RPN is lightweight and efficient: a convolution layer followed by two fully connected layers for region proposal classification and bounding box regression. We follow this design for its efficiency and do not search for this part; and (iv) Head. Detectors usually have a heavy head attached to former network. For example, Faster R-CNN [42] employs the 5-th stage in ResNet [19] and FPN [26] uses two large fully connected layers ( $34\%$ parameters of whole detector) to execute classification and regression, which are inefficient for detection. We call the backbone, the neck, and the head which are valuable to be searched as detector trinity in this paper. + +Recently, several methods have been proposed to search either backbone [8] or feature pyramid architecture [13] for + +object detection. Denoting the search space $\mathcal{A}$ as a directed acyclic graph (DAG) where the nodes indicate the features while directed edges are associated with multifarious operations such as convolution layer and pooling layer. We can view each path from start point to end point in the graph as an architecture $\alpha \in \mathcal{A}$ . Previous NAS works for object detection can be formulated as the optimization problem: + +$$ +\begin{array}{l} \alpha^ {*} = \arg \min f (\alpha) = \arg \min \mathcal {L} _ {v a l} ^ {\det } (\alpha , w ^ {*} (\alpha)) \\ \alpha \in \mathcal {A} \quad \alpha \in \mathcal {A} \tag {1} \\ = \operatorname *{arg min}_{\alpha \in \mathcal{A}}\mathcal{L}^{det}_{val}(\alpha ,\operatorname *{arg min}_{w}\mathcal{L}^{det}_{train}(\alpha ,w)). \\ \end{array} +$$ + +The purpose of NAS process is to find a specific architecture $\alpha \in \mathcal{A}$ that minimizes the validation loss $\mathcal{L}_{val}^{det}(\alpha, w_{\alpha}^{*})$ with the trained weights $w_{\alpha}^{*}$ . The above formulation can represent searching on backbone (e.g. $\mathcal{A}$ denotes the backbone search space) or feature pyramid network (e.g. $\mathcal{A}$ denotes the FPN search space). + +However, the backbone, the neck (feature fusion network), and the head in object detection system should be highly consistent to each other. Only redesigning the backbone or neck is not enough, which can lead to suboptimal results. As shown in Table 1, combining the separately searched backbone in DetNAS and neck in NAS-FPN leads to a worse result. We claim that separately search backbone $\alpha$ , neck $\beta$ , and head $\gamma$ in detector is inferior to search all these components end-to-end: + +$$ +\mathcal {L} _ {v a l} ^ {d e t} \left(\alpha^ {\prime}, \beta^ {\prime}, \gamma^ {\prime}\right) \geq \mathcal {L} _ {v a l} ^ {d e t} \left(\alpha^ {*}, \beta^ {*}, \gamma^ {*}\right), +$$ + +$$ +s. t. \alpha^ {\prime}, \beta^ {\prime}, \gamma^ {\prime} = \underset {\alpha} {\arg \min } f (\alpha), \underset {\beta} {\arg \min } f (\beta), \underset {\gamma} {\arg \min } f (\gamma), \tag {2} +$$ + +$$ +\alpha^ {*}, \beta^ {*}, \gamma^ {*} = \underset {\alpha , \beta , \gamma} {\arg \min } \mathcal {L} _ {v a l} ^ {d e t} (\alpha , \beta , \gamma , w ^ {*} (\alpha , \beta , \gamma)), \tag {2} +$$ + +$$ +\alpha \in \mathcal {A} _ {b}, \beta \in \mathcal {A} _ {n}, \gamma \in \mathcal {A} _ {h}. +$$ + +where $\alpha', \beta', \gamma'$ are obtained by solving corresponding optimization problems as in Eq. 1 separately, while $\alpha^*, \beta^*, \gamma^*$ are optimized through the end-to-end searching algorithm, and $\mathcal{A}_b, \mathcal{A}_n, \mathcal{A}_h$ are search spaces for backbone, neck, and head, respectively. + +In this paper, we propose to search the trinity in detectors, i.e. backbone, neck, and head in an end-to-end manner: + +$$ +\begin{array}{l} \alpha^ {*}, \beta^ {*}, \gamma^ {*} = \underset {\alpha , \beta , \gamma} {\arg \min } \mathcal {L} _ {v a l} ^ {d e t} (\alpha , \beta , \gamma , w ^ {*} (\alpha , \beta , \gamma)) = \\ \operatorname *{arg min}_{\alpha ,\beta ,\gamma}\mathcal{L}^{det}_{val}(\alpha ,\beta ,\gamma ,\operatorname *{arg min}_{w}\mathcal{L}^{det}_{train}(\alpha ,\beta ,\gamma ,w)). \\ \end{array} +$$ + +As shown in Figure 1, we propose the hierarchical trinity architecture search framework to solve problems in Eq. 3, which includes two procedures: screening sub search space for each component and searching the trinity end-to-end. + +# 3.2. Screening Sub Search Space + +Search space is one of the key factors in neural architecture search. The search spaces in [8, 37, 51] are man + +![](images/1974318235f112929e4a817a160ec016d7e43241955f5d284ef715f0942e6448.jpg) +(a) Inverted Residual block + +![](images/552b786c18613d8ea62fb9a9dd4b1cf8b0bbe5cf88ef74ada5bf9e48ab73e14f.jpg) +(b) Separable block + +![](images/7053bf56598d42b600473bfdc7655601b97fd401a3e5f1a5b59420c5457d7f5c.jpg) +(c) Convolution block +Figure 2. The block structure of our search space, e.g., candidate operations in inverted residual block can choose a different expansion rate, kernel size and number of groups for group convolution. + +ually designed with a limited number of operation candidates. Furthermore, there is usually the case that manually designed search space is not suitable for the architecture that needs to be optimized. In order to prevent insufficient search space, we start from the FBNet [48] and traverse as many candidates as possible to form a large set of operation candidates, which are illustrated in Figure 2. Inverted residual block [44] contains a $1 \times 1$ convolution, a $k \times k$ depthwise convolution, another $1 \times 1$ convolution and an expansion factor $e$ . Separable block contains a $k \times k$ depth-wise convolution and a $1 \times 1$ convolution. If the output dimension is the same as input's, we use a skip connection to add them together. + +As shown in Figure 1(a), the whole search space consists of $N$ different operation candidates, e.g., $N = 32$ in our experimental setting. If we directly apply this large search space for NAS, the memory and computational overhead is so heavy that ordinary hardware cannot support the search process efficiently. Moreover, in Sec 4.4, we empirically show that the same operation can have different impacts on final result at different parts in detection system. In order to find the most suitable search space for each component and reduce the computational burden, we propose a screening scheme to hierarchically filter operation candidates for each component. As shown in Figure 1(b), every candidate is associated with a score. The candidates with higher scores are retained, and others with lower scores are deleted. + +Take the search space of backbone as an example, we conduct layer-wise search where each layer can choose any operation from the candidates. Assuming that the backbone has $L$ layers, the score of the $i$ -th operation in the $l$ -th layer is denoted as $\alpha_{l,i}$ . All scores form the architecture parameter matrix $\alpha \in \mathbb{R}^{L \times N}$ , where the $i$ -th column represents the scores of the $i$ -th operation in corresponding layers. With a relatively large amount of candidates, the scores tend to be similar and are hard to distinguish. In order to screen the most suitable operation subset, the matrix $\alpha$ is imposed with the column-sparse regularization: + +$$ +\min _ {\alpha} f (\alpha) + \mu \min _ {i} \left(\sqrt {\sum_ {l = 1} ^ {L} \alpha_ {l , i} ^ {2}}\right), \tag {4} +$$ + +$\mu$ is a trade-off hyper-parameter. In screening stage, the architecture parameter $\alpha$ is learned and the scores of candidates are ranked accordingly, the last several candidates will be removed from search space gradually until a search space with size $N_{b}$ is obtained. The sub search spaces for backbone, neck, and head are hierarchically selected from the whole search space, namely, $\mathcal{O}_b$ , $\mathcal{O}_n$ , and $\mathcal{O}_h$ . + +# 3.3. End-to-end Search in Hit-Detector + +After obtaining the suitable sub search space for each component, we start the end-to-end search for object detector. We adopt the differentiable manner proposed in [31] to solve Eq. 3, and represent the sub search space by a stochastic supernet. During searching, each intermediate node is computed as a weighted sum based on all candidates. For backbone, the $l$ -th node is formulated as + +$$ +x _ {l} = \sum_ {o \in \mathcal {O} _ {b}} \frac {\exp \left(\alpha_ {l} ^ {o}\right)}{\sum_ {o ^ {\prime} \in \mathcal {O} _ {b}} \exp \left(\alpha_ {l} ^ {o ^ {\prime}}\right)} o \left(x _ {l - 1}\right), \tag {5} +$$ + +where $x_{l}$ is the output of the $l$ -th layer, $\alpha_{l}^{o}$ is the parameter for operation $o(\cdot)$ , and $\mathcal{O}_b$ indicates the sub search space for backbone. The nodes in neck and head are similar to Eq. 5. This continuous relaxation makes the entire framework differentiable to both operation weights and architecture parameters, so that we can perform architecture search in an end-to-end manner. In testing phase, we can easily decode architectures from $\alpha, \beta, \gamma$ by choosing operation with the highest score in each layer and construct detector using the selected operation. + +The details of our detector supernet are described as follows. The basic structure of backbone consists of a $3 \times 3$ convolution head with stride of 2 followed by four stages that contain $4 + 4 + 8 + 4 = 20$ blocks to be searched. Conventionally, we define the layers that producing feature map with the same spatial size belong to the same network stage. In each stage, the first block has a stride of 2 for downsampling, and the last feature map generated by the backbone has a downsample rate of 32 compared to the input image. The channel of each stage is set to $\{48, 96, 256, 352\}$ respectively. We use $\{C_1, C_2, C_3, C_4\}$ to represent feature maps of stride $\{4, 8, 16, 32\}$ generated by backbone. Then we send the feature pyramid into the neck. Generally, high level features have better semantic information while low level features have more accurate location information. To propagate semantic signals and accurate information about localization to features from lower and higher level, we use both top-down and bottom-up path augmentation to enhance features from different levels inspired by [32]. We use $\{P_1, P_2, P_3, P_4\}$ and $\{N_1, N_2, N_3, N_4\}$ to denote feature maps after top-down and bottom-up path, respectively. + +The whole neck contains $4 + 4 = 8$ lateral connections to be searched, thus each feature level can search for different operations to assign proper receptive fields. Given the aligned feature maps generated by region proposal network, head is applied to predict final classification and refine the bounding box of the object. We design 4 blocks to be searched followed by a fully connected layer to form the detection head. The number of the output channels for each level in neck and head is 256 and the output of the fully connected layer is a 512 dimensional vector. In our experiments, we set $N_{b} = N_{n} = N_{h} = 8$ . Even if we extract the sub search spaces carefully, the final search space contains $8^{(20 + 8 + 4)} \approx 7.9 \times 10^{28}$ possible architectures. + +# 3.4. Optimization + +In order to control the computational cost of the searched detector at the same time, we add the FLOPs constraint as a regularization term in the loss function and rewrite the Eq. 3 as: + +$$ +\min _ {\alpha , \beta , \gamma} \mathcal {L} _ {v a l} ^ {d e t} (\alpha , \beta , \gamma , w ^ {*} (\alpha , \beta , \gamma)) + \lambda (C (\alpha) + C (\beta) + C (\gamma))) \tag {6} +$$ + +where $\lambda$ is the coefficient to balance accuracy and cost of the detector, $C(\alpha)$ indicates FLOPs of the backbone part and can be decomposed as linear sum of each operations: + +$$ +\mathrm {C} (\alpha) = \sum_ {l} \sum_ {o \in \mathcal {O} _ {b}} \alpha_ {l} ^ {o} \text {F L O P s} (o, l), \tag {7} +$$ + +$\mathrm{C}(\beta)$ and $\mathrm{C}(\gamma)$ can be calculated similarly. + +It is clear that continuous relaxation from Eq. 5 is differentiable with respect to architecture parameters and operation weights, thus $\{\alpha, \beta, \gamma, w\}$ can be optimized jointly using stochastic gradient descent. We adopt first-order approximation following [31] and update architecture parameters and operation weights alternately. We first fix $\{\alpha, \beta, \gamma\}$ and compute $\partial \mathcal{L} / \partial w$ to train the network weights on $50\%$ training data, then we fix the network weights and calculate $\partial \mathcal{L} / \partial \alpha, \partial \mathcal{L} / \partial \beta,$ and $\partial \mathcal{L} / \partial \gamma$ to update the architecture parameters on the remaining $50\%$ training data, where the loss function $\mathcal{L}$ is the localization and classification losses calculated on the detection mini-batch. The optimization alternates until the supernet converges. + +# 4. Experiments + +In this section, we investigate the effectiveness of proposed Hit-Detector by conducting elaborate experiments on COCO benchmark. + +# 4.1. Dataset and Metrics + +We conduct experiments on MS COCO 2014 dataset [28], which contains 80 object classes. Following [2, 26], our training set is the union of 80k training images and 35k subset of validation images (trainval35k), and validation set + +![](images/a6c34e20b899b6494ca1e26fc2ea67fe0333dea59a0f3f8c59f7fc368cdbe75c.jpg) +Figure 3. Influence of replacing a certain operation in different parts of the detector on COCO minival. FPN (4clfc head) is taken as a base detector and the input image is of size $320 \times 320$ . Taking the left figure as an example, each time one layer from backbone is randomly chosen to be replaced by an operation candidate. For one operation candidate, such random process is repeated for 6 times. + +![](images/5b88022add9b63cf5093d61123c564262b1740fa9a00f8dc019b552b90f926a8.jpg) + +![](images/cbe822a521bb893decfa665703e6716080fa19e7e4e91447a127ef8745e7faec.jpg) + +is the remaining 5k validation images (minimal). We consider Average Precision with different IoU thresholds from 0.5 to 0.95 with an interval of 0.05 as evaluation metric, i.e., $\mathrm{mAP}$ , $\mathrm{AP}_{50}$ , $\mathrm{AP}_{75}$ , $\mathrm{AP}_{\mathrm{S}}$ , $\mathrm{AP}_{\mathrm{M}}$ and $\mathrm{AP}_{\mathrm{L}}$ . The last three measure performance w.r.t. objects with different scales. + +# 4.2. Implementation Details + +Our implementation is based on mmdetection [6] with Pytorch framework [36]. We firstly filter three sub search spaces for backbone, neck, and head, respectively. Then we search for our Hit-Detector following the algorithm in sec 3.4. Finally we train our searched model on the training set mentioned above. We use only horizontal flipping as data augmentation for training, and there is no data augmentation for testing. The experiments are conducted on 8 V100 GPUs. + +Screening sub search space. We sequentially screen sub search spaces for different parts of the detector due to the GPU memory constraint. The number of operations in the whole search space $\mathcal{O}$ is 32 as shown in Fig. 2, and the number of operations to be screened for all three sub search spaces $\mathcal{O}_b$ , $\mathcal{O}_n$ , and $\mathcal{O}_h$ is set as 8. We halved the depth of backbone supernet to $2 + 2 + 4 + 2 = 10$ for simplifying this process. We first pretrain the backbone supernet on ImageNet for 10 epochs with fixed architecture parameters, then fine-tune the entire detector supernet on COCO. SGD optimizer with momentum 0.9 and cosine schedule with initial learning rate 0.04 is used for learning model weights, while Adam optimizer with learning rate 0.0004 is adopted for updating architecture parameters. The $\mu$ in Eq. 4 is empirically set to 0.1. We begin to optimize architecture parameters at the 6-th epochs and finish searching at 12 epochs, and we don't use resource constraint in this stage. + +Trinity Architecture searching. After screening sub search spaces, we start to search the backbone, neck and + +head in an end-to-end manner. We pretrain the new backbone supernet on ImageNet based on the corresponding sub search space, and then search the detector on COCO dataset. The optimizers to learn the architecture parameters and weights are the same as we do when screening sub search spaces. The $\lambda$ in Eq. 6 is empirically set to 0.01 to trade off the accuracy and the FLOPs constraint. + +Training details. We first pretrain the searched backbone on ImageNet for 300 epochs, then we fine-tune the whole detector on COCO training set. The input image is resized such that its shorter side has 800 pixels. We use SGD optimizer with a batch size of 4 images per GPU, and our model is trained for 12 epochs, known as $1 \times$ schedule. The initial learning rate is 0.04 and is divided by 10 at the 8-th and 11-th epoch. We set momentum as 0.9 and weight decay as 0.0001. + +# 4.3. Main Results + +Comparisons with hand-crafted methods. FPN [26] with ResNet-50 as backbone is the baseline model here. We replace the backbone in FPN with other excellent backbones, i.e. MobileNetV2 [44] and ResNeXt-101 [49], and form two competitor models accordingly. As shown in Table 2, Hit-Detector surpasses baseline by a large margin with much less parameters. In addition, Our method is $1.1\%$ higher on mAP compared to the ResNeXt based detector with less than one half of the parameters. And we outperform MobileNetV2 by $11.3\%$ on mAP with only a bit more parameters. This demonstrates that our method can find a better architecture than hand-crafted baselines. + +Comparisons with NAS based methods. As shown in Table 2, we compare our method with both detector searched on COCO benchmark and detector that adopts NAS based model as backbone. FBNet [48] is searched on ImageNet dataset and we directly apply it as the backbone of a detector, however, its performance on detection + +Table 2. Comparisons of the number of parameters, FLOPs and mAP on COCO minival. The FLOPs is based on the $800\times 1200$ input and 1000 proposals in region proposal network. $\ddagger$ means the 2x schedule in training. + +
modelmodified# params (total)# FLOPs (total)mAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
BNH
FPN [26]---41.76M197.4B36.258.039.121.340.046.1
MobileNetV2 [44]✓19.61M116.94B30.151.830.916.733.038.7
ResNeXt-101 [49]✓60.38M273.3B40.362.144.123.645.051.6
FBNet-C [48]✓21.40M119.0B35.157.437.219.338.346.7
DetNAS-1.3G [8]✓✓28.45M254.1B40.261.543.623.342.553.8
NASFPN [13]✓68.86M616.9B38.959.342.322.342.849.8
DetNAS-1.3G + NASFPN✓✓✓55.29M672.9B39.459.642.123.743.250.4
NATS-C [37]✓41.76M197.4B38.461.041.222.541.850.4
Auto-FPN‡ [51]✓✓32.64M476.6B40.561.543.825.644.951.0
Hit-Detector✓✓✓27.12M272.3B41.462.445.925.245.054.1
+ +task is disappointing. DetNAS [8] aims to search a better backbone directly on detection benchmark while leaves the rest parts unchanged. Our method outperforms DetNAS by $1.2\%$ with less parameters and pretty much FLOPs. It can be seen that Hit-Detector surpasses all previous NAS based methods, which indicates that it is important to search the trinity in an object detector. + +Comparison with State-of-the-arts on test-dev set. We also compare the results of our Hit-Detector with other state-of-the-art methods on the COCO test-dev, and we summarize the comparisons in Table 3. Hit-Detector only applies horizontal flipping as data augmentation and $2\mathrm{x}$ training scheme, achieves $44.5\%$ mAP without bells and whistles. Our model has less parameters and performs even better compared to other detectors such as TridentNet and NAS-FPN. This demonstrates that our method can find a better architecture than hand-crafted or partly searched methods. + +Table 3. Comparisons of single-model results on COCO test-dev. + +
modeltest sizemAP
R-FCN [9]600/100032.1
Faster R-CNN [42]600/100030.3
Deformable [10]600/100034.5
FPN [26]800/120036.2
Mask R-CNN [18]800/120038.2
RetinaNet [27]800/120039.1
Light head R-CNN [24]800/120041.5
PANet [32]800/100042.5
TridentNet [23]800/120042.7
NAS-FPN [13]1024/102444.2
Hit-Detector800/120044.5
+ +# 4.4. Ablation Studies + +Influence of different operations. We use a toy example to demonstrate that different parts of the detector are sensitive to different operations, so that different parts need different sub search spaces. Here we simply choose 12 op + +erations from the whole search space as shown in Figure 2. For example, "conv_k3_d1" denotes the convolution block with kernel size 3 and dilation rate 1, and "ir_k3_d1" denotes the inverted residual block with kernel size 3 and dilation rate 1, respectively. Take the left figure as an example, for each operation candidate, we randomly select a layer from backbone and replace original operation with the operation candidate to explore the influence of the selected operation candidate. For each part (backbone, neck, and head), we repeat the random process 6 times to ensure that operation candidate can be inserted in layers of different depths. We can find that (i) different parts prefer different operations. For example, operation "conv_k5_d3" achieves the highest mAP in backbone while "conv_k5_d1" performs the best in head; (ii) one operation has different performances in different parts, "conv_k3_d1" attains $30.4\% - 30.6\%$ mAP in backbone but gets $30.7\% - 30.9\%$ mAP in neck; and (iii) the performance of one operation within the same part is stable enough so that it's reasonable for us to screen sub search spaces by different parts. + +Column-sparse regularization. To further evaluate the influence of the column-sparse regularization, we set the $\mu$ in Eq. 4 to $\{0,0.01,0.1\}$ and randomly choose 4 operation candidates to draw the Figure 4. We can find that if there is no column-sparse regularization ( $\mu = 0$ ), probabilities of different operations are rather similar, which makes the screening process unstable. As $\mu$ increases, differences between operations become more significant, which helps to screen proper sub search space easier. We set $\mu = 0.1$ in the rest of our experiments. + +Importance of screening sub search space. We study the influence of screening different sub search spaces through the ablation study shown in Table 4. When three parts have the same sub search space, the mAP decreases from $41.4\%$ to $40.1\%$ , which indicates that different parts need to have their proper sub search space to achieve better performance. + +![](images/74a368a7065c82281f14694469e48f37f405fdd2e4ec8d818f7f69a94cc1edd7.jpg) +Figure 4. Ablation study of the trade-off parameter $\mu$ in column-sparse regularization. + +![](images/632853d784629a5e5d55574867a89d43f892247018ead5b22658a84c06000510.jpg) + +![](images/79bf283f769804aaf4dc65627df973bdc62d38fc1d3536051a7645e64de10460.jpg) +Figure 5. Visualization of the searched Hit-Detector. We use rectangle boxes to denote operations for each layer. + +Table 4. Ablation study of screening sub search space. + +
modelmAPAP50AP75
1 sub search space40.161.244.0
3 sub search space41.462.445.9
+ +Importance of trinity architecture searching. We explore the impact of each searched part in Hit-Detector here. Taking ResNet-50 based FPN [26] as baseline model, we replace one part of baseline model with our searched component each time and verify the new model on COCO minival. As shown in Table 5, our searched backbone architecture achieves $39.2\%$ mAP, and the searched head also attains $38.5\%$ mAP. With the searched trinity, the mAP of Hit-Detector increases to $41.4\%$ , which is much higher than baseline model and the single part competitor. Another noteworthy finding is that the backbone and head can boost performance better than neck. We think the main reasons are that (i) object detection emphasizes more on perception to the location of each object in an image, thus the backbone designed for detection can perform better compared to the one designed for classification; and (ii) head aims to identify and refine the location of bounding boxes, thus searching more suitable convolution layers in head can bring more benefits to detection task. + +Our searched Hit-Detector is depicted in Figure 5. We observed that the backbone prefers operations that have large kernel size. However, convolution layer with dilation 3 which achieves the best mAP in Figure 3 is not chosen. One main reason is that the ResNet-50 backbone in toy example only includes $3 \times 3$ convolution, thus operation with dilation 3 can boost the performance prominently. Except + +that, backbone and head prefer operations with bigger expansion rate such as inverted residual block which has more intermediate channels to increase the expression of feature, while the neck prefers bigger dilation rate for larger receptive fields. + +Table 5. Evaluations of different parts searched in Hit-Detector. $\checkmark$ means we replace the part in baseline with the searched one. + +
modelSearchedmAP
backboneneckhead
FPN baseline36.2
4c1fc baseline✓36.8
Searched backbone✓39.2
Searched neck✓37.4
Searched head✓38.5
Hit-Detector✓✓✓41.4
+ +Extension to one-stage detector. To evaluate the generalization of our method, we apply it to RetinaNet [27] for searching one-stage detector. The search algorithm is the same as mentioned in sec 3.4. As shown in Table 6, our model outperforms RetinaNet by $1.3\%$ in terms of mAP and the model size is smaller than both VGG based SSD and ResNet-50 based RetinaNet. + +Table 6. Extending Hit-Detector to one-stage detector on COCO minival (1x schedule). ${}^{ \dagger }$ denotes the result of our implementation. + +
model# ParamsmAP\( AP_{50} \)\( AP_{75} \)
SSD-VGG19 [33]36.04M29.3--
SSD-ResNet101 [12]-31.250.433.3
DSSD [12]-33.253.335.2
MobileNetV2†[44]16.68M31.550.933.5
RetinaNet†[27]37.97M35.655.638.4
Hit-Detector33.05M36.955.239.5
+ +# 5. Conclusion + +In this work, we propose a hierarchical trinity architecture search scheme to address the problem that incomplete searching of detector would cause the inconsistency between different components and lead to the suboptimal performance. We reveal that different components prefer different operations and thus screen three sub search spaces to improve the searching efficiency. Then we search for all components of object detectors based on the sub search spaces in an end-to-end manner. The searched architecture, namely Hit-Detector, achieves state-of-the-art performance on COCO benchmark without bells and whistles. + +Acknowledgement This work of J. Guo and C. Zhang is supported by the National Nature Science Foundation of China under Grant 61671027 and the National Key R&D Program of China under Grant 2017YFB1002400, and C. Xu is supported by the Australian Research Council under Project DE180101438. + +# References + +[1] Bowen Baker, Otkrist Gupta, Nikhil Naik, and Ramesh Raskar. Designing neural network architectures using reinforcement learning. ICLR, 2017. +[2] Sean Bell, C Lawrence Zitnick, Kavita Bala, and Ross Girshick. Inside-outside net: Detecting objects in context with skip pooling and recurrent neural networks. In CVPR, 2016. +[3] Han Cai, Tianyao Chen, Weinan Zhang, Yong Yu, and Jun Wang. Efficient architecture search by network transformation. In AAAI, 2018. +[4] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv preprint: 1812.00332, 2018. +[5] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In CVPR, 2018. +[6] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint:1906.07155, 2019. +[7] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. arXiv preprint: 1904.12760, 2019. +[8] Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. Detnas: Neural architecture search on object detection. In arXiv preprint:1903.10979, 2019. +[9] Jifeng Dai, Yi Li, Kaiming He, and Jian Sun. R-fcn: Object detection via region-based fully convolutional networks. In NIPS, 2016. +[10] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In ICCV, 2017. +[11] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian. Centernet: Object detection with keypoint triplets. arXiv preprint: 1904.08189, 2019. +[12] Cheng-Yang Fu, Wei Liu, Ananth Ranga, Ambrish Tyagi, and Alexander C Berg. Dssd: Deconvolutional single shot detector. arXiv preprint: 1701.06659, 2017. +[13] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Nas-fpn: Learning scalable feature pyramid architecture for object detection. In CVPR, 2019. +[14] Ross Girshick. Fast r-cnn. In ICCV, 2015. +[15] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. +[16] Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path oneshot neural architecture search with uniform sampling. arXiv preprint: 1904.00420, 2019. +[17] Kai Han, Yunhe Wang, Qi Tian, Jianyuan Guo, Chunjing Xu, and Chang Xu. Ghostnet: More features from cheap operations. arXiv preprint:1911.11907, 2019. + +[18] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. +[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[20] Han Hu, Jiayuan Gu, Zheng Zhang, Jifeng Dai, and Yichen Wei. Relation networks for object detection. In CVPR, 2018. +[21] Jonathan Huang, Vivek Rathod, Chen Sun, Menglong Zhu, Anoop Korattikara, Alireza Fathi, Ian Fischer, Zbigniew Wojna, Yang Song, Sergio Guadarrama, et al. Speed/accuracy trade-offs for modern convolutional object detectors. In CVPR, 2017. +[22] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, 2018. +[23] Yanghao Li, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Scale-aware trident networks for object detection. arXiv preprint: 1901.01892, 2019. +[24] Zeming Li, Chao Peng, Gang Yu, Xiangyu Zhang, Yangdong Deng, and Jian Sun. Light-head r-cnn: In defense of two-stage object detector. arXiv preprint: 1711.07264, 2017. +[25] Zeming Li, Chao Peng, Gang Yu, Xiangyu Zhang, Yangdong Deng, and Jian Sun. Detnet: A backbone network for object detection. arXiv preprint: 1804.06215, 2018. +[26] Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. +[27] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In ICCV, 2017. +[28] 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, 2014. +[29] 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 Proceedings of the European Conference on Computer Vision (ECCV), 2018. +[30] Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. arXiv preprint: 1711.00436, 2017. +[31] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. In arXiv preprint:1806.09055, 2018. +[32] Shu Liu, Lu Qi, Haifang Qin, Jianping Shi, and Jiaya Jia. Path aggregation network for instance segmentation. In CVPR, 2018. +[33] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In ECCV, 2016. +[34] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In ECCV, 2018. +[35] Risto Miikkulainen, Jason Liang, Elliot Meyerson, Aditya Rawal, Daniel Fink, Olivier Francon, Bala Raju, Hormoz Shahrzad, Arshak Navruzyan, Nigel Duffy, et al. Evolving + +deep neural networks. In Artificial Intelligence in the Age of Neural Networks and Brain Computing, 2019. +[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. 2017. +[37] Junran Peng, Ming Sun, Zhaoxiang Zhang, Tieniu Tan, and Junjie Yan. Efficient neural architecture transformation search in channel-level for object detection. In arXiv preprint:1909.02293, 2019. +[38] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In AAAI, 2019. +[39] 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. +[40] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, 2016. +[41] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In CVPR, 2017. +[42] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, 2015. +[43] Tomoya Sakai, Marthinus Christoffel du Plessis, Gang Niu, and Masashi Sugiyama. Semi-supervised classification based on classification from positive and unlabeled data. In ICML, 2017. +[44] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018. +[45] Syed Asif Raza Shah, Wenji Wu, Qiming Lu, Liang Zhang, Sajith Sasidharan, Phil DeMar, Chin Guok, John Macauley, Eric Pouyoul, Jin Kim, et al. Amoebanet: An sdn-enabled network service for big data science. Journal of Network and Computer Applications, 2018. +[46] 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 CVPR, 2019. +[47] Jasper RR Uijlings, Koen EA Van De Sande, Theo Gevers, and Arnold WM Smeulders. Selective search for object recognition. IJCV, 2013. +[48] 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 CVPR, 2019. +[49] Saining Xie, Ross Girshick, Piotr Dolkar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In CVPR, 2017. +[50] Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. Snas: stochastic neural architecture search. arXiv preprint: 1812.09926, 2018. +[51] Hang Xu, Lewei Yao, Wei Zhang, Xiaodan Liang, and Zhenguo Li. Auto-fpn: Automatic network architecture adap + +tation for object detection beyond classification. In ICCV, 2019. +[52] Chao Xue, Junchi Yan, Rong Yan, Stephen M Chu, Yonggang Hu, and Yonghua Lin. Transferable automl by model sharing over grouped datasets. In CVPR, 2019. +[53] Tong Yang, Xiangyu Zhang, Zeming Li, Wenqiang Zhang, and Jian Sun. Metaanchor: Learning to detect objects with customized anchors. In NIPS, 2018. +[54] Zhaohui Yang, Yunhe Wang, Xinghao Chen, Boxin Shi, Chao Xu, Chunjing Xu, Qi Tian, and Chang Xu. Cars: Continuous evolution for efficient neural architecture search. arXiv preprint:1909.04977, 2019. +[55] Zhaohui Yang, Yunhe Wang, Chuanjian Liu, Hanting Chen, Chunjing Xu, Boxin Shi, Chao Xu, and Chang Xu. Legonet: Efficient convolutional neural networks with lego filters. In ICML, 2019. +[56] Shifeng Zhang, Longyin Wen, Xiao Bian, Zhen Lei, and Stan Z Li. Single-shot refinement neural network for object detection. In CVPR, 2018. +[57] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint: 1611.01578, 2016. +[58] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In CVPR, 2018. \ No newline at end of file diff --git a/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/images.zip b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..362f24d16de0bbbee83d86c05ebca11c948651cc --- /dev/null +++ b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94f69833c3a15b47dddcfef20843952e5d2fdb5dce1a7669c06cb619f206646a +size 519809 diff --git a/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/layout.json b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6272790227ddd35daa7fb624c9da383bc5ad685d --- /dev/null +++ b/hitdetectorhierarchicaltrinityarchitecturesearchforobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab143f326fa0416e0acb23f98c8ed0e3cba63079aedd3343067e57e9e112743c +size 422667 diff --git a/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_content_list.json b/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e93d8786d89021419724242b58ba10c924ac07ca --- /dev/null +++ b/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ea2c45053cb707be1e89576368bb76493a9c5e021311524f59b0ccfe7e8d572 +size 88544 diff --git a/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_model.json b/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cdeee41bdb1d16ee9f7683938ac8e76370de274a --- /dev/null +++ b/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78bacb1e7d4a3266a17493bf06c2db3e4b9ef9f9b8660d822f1ad242a0587aff +size 105281 diff --git a/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_origin.pdf b/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d655cd75c627a63ed490d27a308555e19dc29b56 --- /dev/null +++ b/holisticallyattractedwireframeparsing/51c68ba0-ad3c-4628-bace-f78514b80f92_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:893ed8906e9ec45c4eec5ddf91062ba81e70133f120cabdfc81bbee20b153122 +size 1252795 diff --git a/holisticallyattractedwireframeparsing/full.md b/holisticallyattractedwireframeparsing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..42e018668f52a917f6c3e52e2692420d37007659 --- /dev/null +++ b/holisticallyattractedwireframeparsing/full.md @@ -0,0 +1,355 @@ +# Holistically-Attracted Wireframe Parsing + +Nan Xue $^{1,2}$ , Tianfu Wu $^{2}$ , Song Bai $^{3}$ , Fudong Wang $^{1}$ , Gui-Song Xia $^{1*}$ , Liangpei Zhang $^{1}$ , Philip H.S. Torr $^{3}$ + +$^{1}$ Wuhan University, China + +{xuanan, fudong-wang, guisong.xia, zlp62}@whu.edu.cn + +$^{2}$ NC State University, USA + +tianfu_wu@ncsu.edu + +$^{3}$ University of Oxford, UK + +songbai.site@gmail.com, philip.torr@eng.ox.ac.uk + +# Abstract + +This paper presents a fast and parsimonious parsing method to accurately and robustly detect a vectorized wireframe in an input image with a single forward pass. The proposed method is end-to-end trainable, consisting of three components: (i) line segment and junction proposal generation, (ii) line segment and junction matching, and (iii) line segment and junction verification. For computing line segment proposals, a novel exact dual representation is proposed which exploits a parsimonious geometric reparameterization for line segments and forms a holistic 4-dimensional attraction field map for an input image. Junctions can be treated as the "basins" in the attraction field. The proposed method is thus called Holistically-Attracted Wireframe Parser (HAWP). In experiments, the proposed method is tested on two benchmarks, the Wireframe dataset [15] and the YorkUrban dataset [8]. On both benchmarks, it obtains state-of-the-art performance in terms of accuracy and efficiency. For example, on the Wireframe dataset, compared to the previous state-of-the-art method L-CNN [41], it improves the challenging mean structural average precision (msAP) by a large margin (2.8% absolute improvements), and achieves 29.5 FPS on single GPU (89% relative improvement). A systematic ablation study is performed to further justify the proposed method. The source code is publicly available1. + +# 1. Introduction + +# 1.1. Motivations and Objectives + +Line segments and junctions are prominent visual patterns in the low-level vision, and thus often used as important cues/features to facilitate many downstream vision tasks such as camera pose estimation [24, 25, 11], image matching [36], image rectification [37], structure from motion (SfM) [4, 22], + +![](images/a391badacbf8225a8d9a0d153721ac69ba4a41dcb8990716d0240f11f7f45107.jpg) +(a) Image + +![](images/6d2b42dd365a54e435400107c6d70f7987c2c2d57016c8e39cc6fcf205462d8c.jpg) +(b) Learned Lines + +![](images/0e504ecd855709fcc6d51d465ed2794d2022556e45a1f6dcb98b414226f196bb.jpg) +(c) HAWP (score $>0.9$ ) + +![](images/4af3e4dac1cd71cea682a9106e1b259fe58ec6bd7c4b32db7c0c18ddc5fcb4a8.jpg) +(d) Junction Proposals + +![](images/20c63e19bb32698dee3d0e25987ddf7d3c4eeada72101b0f5c1ec87cd1668f4e.jpg) +(e) Enumerated Lines +(f) L-CNN (score $>0.9$ ) + +![](images/1b30b20841a11bc2805d51bc7d4e27d1544e7a3a8971e7010491a1014dd05207.jpg) +Figure 1. Illustration of the proposed HAWP in comparison with L-CNN [41] in wireframe parsing. The two methods adopt the same two-stage parsing pipeline: proposal (line segments and junctions) generation and proposal verification. They use the same junction prediction in (d) and verification modules. The key difference lies in the line segment proposal generation. L-CNN bypasses directly learning line segment prediction module and resorts to a sophisticated sampling based approach for generation line segment proposals in (e). Our HAWP proposes a novel line segment prediction method in (b) for more accurate and efficient parsing, e.g., the parsing results of the window in (c) and (f). + +visual SLAM [19, 39, 42], and surface reconstruction [17]. Both line segment detection and junction detection remain challenging problems in computer vision [32, 34, 35]. Line segments and junctions are often statistically coupled in images. So, a new research task, wireframe parsing, is recently emerged to tackle the problem of jointly detecting meaningful and salient line segments and junctions with large-scale benchmarks available [15]. And, end-to-end trainable approaches based on deep neural networks (DNNs) are one of the most interesting frameworks, which have + +shown remarkable performance. + +In wireframe parsing, it can be addressed relatively better to learn a junction detector with state-of-the-art deep learning approaches and the heatmap representation (inspired by its widespread use in human pose estimation [23, 29, 40]). This motivated a conceptually simple yet powerful wireframe parsing algorithm called L-CNN [41], which achieved state-of-the-art performance on the Wireframe benchmark [15]. L-CNN bypasses learning a line segment detector. It develops a sophisticated and carefully-crafted sampling schema to generate line segment proposals from all possible candidates based on the predicted junctions, and then utilizes a line segment verification module to classify the proposals. A large number of proposals are entailed for achieving good results at the expense of computational costs. And, ignoring line segment information in the proposal stage may not take full advantage of the deep learning pipeline for further improving performance. + +On the other hand, without leveraging junction information in learning, the recently proposed attraction field map (AFM) based approaches [34, 35] are the state-of-the-art methods for line segment detection. AFM is not strictly end-to-end trainable. The reparameterization of pixels in the lifting process is for lines, instead of line segments (i.e., we can only infer a line with a given displacement vector, and that is why the squeezing module is needed). + +In this paper, we are interested in learning an end-to-end trainable and fast wireframe parser. First, we aim to develop an exact dual and parsimonious reparameterization scheme for line segments, in a similar spirit to the AFM [34], but without resorting to the heuristic squeezing process in inference. Then, we aim to tackle wireframe parsing by leveraging both line segment and junction proposals to improve both accuracy and efficiency and to eliminate the carefully-crafted sampling schema as done in L-CNN [41]. + +# 1.2. Method Overview + +In general, a parsing algorithm adopts two phases as proposed in the generic image parsing framework [28]: proposal generation and proposal verification, which are also realized in the state-of-the-art object detection and instance segmentation framework [12, 26, 14]. The current state-of-the-art wireframe parser, L-CNN [41] follows the two-phase parsing paradigm. The proposed method in this paper also adopts the same setup. As illustrated in Fig. 1 and Fig. 2, the proposed method consists of three components: + +i) Proposal initialization: line segment detection and junction detection. Given an input image, it first passes through a shared feature backbone (e.g., the stacked Hourglass network [23]) to extract deep features. Then, for junction detection, we adopt the same head regressor based on the heatmap representation as done in L-CNN [41] (Section 4.2), from which the top- $K$ junctions are selected as initial junction proposals. For computing line segment proposals, a novel + +![](images/a4846e1edffc04879d8ce867d892d73283333edf7a169c41053386556d2c9e26.jpg) +Figure 2. Illustration of the architecture of our proposed HAWP. It consists of three components, proposal initialization, proposal refinement and proposal verification. See text for details. + +method is proposed (Section 4.1). + +ii) Proposal refinement: line segment and junction matching. The matching is to calculate meaningful alignment between line segment initial proposals and junction initial proposals. In the refinement (Section 4.3), a line segment proposal is kept if its two end-points are supported by two junction proposals. If a junction proposal does not find any support line segment proposal, it will be removed. +iii) Proposal verification: line segment and junction classification. The verification process is to classify (double-check) the line segments and junctions from the proposal refinement stage. We utilize the same verification head classifier (Section 4.4) as done in L-CNN [41], which exploits a Line-of-Interest (LOI) pooling operation to compute features for a line segment, motivated by the Region-of-Interest (ROI) pooling operation used in the popular two-stage R-CNN frameworks [12, 26, 14]. + +Geometrically speaking, the proposed wireframe parser is enabled by the holistic 4-D attraction field map and the "basins" of the attraction field revealed by junctions. We thus call the proposed method a Holistically-Attracted Wireframe Parser (HAWP). The proposed HAWP is end-to-end trainable and computes a vectorized wireframe for an input image in single forward pass. The key difference between our HAWP and the current state-of-the-art L-CNN [41] approach is the novel line segment reparameterization and its end-to-end integration in the parsing pipeline. Our HAWP outperforms L-CNN by a large margin in terms of both accuracy and efficiency (Section 5). + +# 2. Related Work and Our Contributions + +The fundamental problem in wireframe parsing is to learn to understand the basic physical and geometric constraints of our world. The problem can date back to the pioneering work of understanding Blocks World by Larry Roberts [27, 13] at the very beginning of computer vision. We briefly review two core aspects as follows. + +Representation of Line Segments. There is a big gap between the mathematically simple geometric representation of line segments (at the symbol level) and the raw image data (at the signal level). A vast amount of efforts have been de + +voted to closing the gap with remarkable progress achieved. Roughly speaking, there are three-level representations of line segments developed in the literature: (i) Edge-pixel based representations, which are the classic approaches and have facilitated a tremendous number of line segment detectors [3, 21, 5, 9, 30, 7, 30, 2, 7]. Many of these line segment detectors suffer from two fundamental issues inherited from the underlying representations: the intrinsic uncertainty and the fundamental limit of edge detection, and the lack of structural information guidance from pixels to line segments. The first issue has been eliminated to some extent by state-of-the-art deep edge detection methods [33, 20]. (ii) Local support region based representations, e.g., the level-line based support region used in the popular LSD method [30] and its many variants [1, 7]. The local support region is still defined on top of local edge information (gradient magnitude and orientation), thus inheriting the fundamental limit. (iii) Global region partition based representation, which is recently proposed in the AFM method [34]. AFM does not depend on edge information, but entails powerful and computationally efficient DNNs in learning and inference. AFM is not strictly an exact line segment representation, but a global region partition based line representation. The issue is addressed in this paper by proposing a novel holistic AFM representation that is parsimonious and exact for line segments. + +Wireframe Parsing Algorithm Design. The recent resurgence of wireframe parsing, especially in an end-to-end way, is driven by the remarkable progress of DNNs which enables holistic map-to-map prediction (e.g., from raw images to heatmaps directly encoding edges [33] or human keypoints [31], etc.). As aforementioned, the general framework of parsing is similar between different parsers. Depending on whether line segment representations are explicitly exploited or not, the recent work on wireframe parsing can be divided into two categories: (i) Holistic wireframe parsing, which include data-driven proposal generation for both line segments and junctions, e.g., the deep wireframe parser (DWP) [15] presented along with the wireframe benchmark. DWP is not end-to-end trainable and relatively slow. (ii) Deductive wireframe parsing, which utilizes data-driven proposals only for junctions and resorts to sophisticated top-down sampling methods to deduce line segments based on detected junctions, e.g., PPG-Net [38] and L-CNN [41]. The main drawbacks of deductive wireframe parsing are in two-fold: high computational expense for line segment verification, and over-dependence on junction prediction. The proposed HAWP is in the first category, but enjoys end-to-end training and real-time speed. + +Our Contributions. This paper makes the following main contributions to the field of wireframe parsing: + +- It presents a novel holistic attraction field to exactly characterize the geometry of line segments. To our knowledge, this is the first work that facilitates an exact + +dual representation for a line segment from any distant point in the image domain and that is end-to-end trainable. + +- It presents a holistically-attracted wireframe parser (HAWP) that extracts vectorized wireframes in input images in a single forward pass. +- The proposed HAWP achieves state-of-the-art performance (accuracy and efficiency) on the Wireframe dataset [15] and the YorkUrban dataset [8]. + +# 3. Holistic Attraction Field Representation + +In this section, we present the details of our proposed holistic attraction field representation of line segments. The goal is to develop an exact dual representation using geometric reparameterization of line segments, and the dual representation accounts for non-local information and enables leveraging state-of-the-art DNNs in learning. By an exact dual representation, it means that in the ideal case it can recover the line segments in closed form. Our proposed holistic attraction field representation is motivated by, and generalizes the recent work called attraction field map (AFM) [34]. + +We adopt the vectorized representation of wireframes in images [15], that is we use real coordinates for line segments and junctions, rather than discrete ones in the image lattice. Denote by $\Lambda$ and $\mathcal{D} \subset \mathbb{R}^2$ the image lattice (discrete) and the image domain (continuous) respectively. A line segment is denoted by its two end-points, $\ddot{l} = (\mathbf{x}_1, \mathbf{x}_2)$ , where $\mathbf{x}_1, \mathbf{x}_2 \in \mathcal{D}$ (2-D column vector). The corresponding line equation associated with $\ddot{l}$ is defined by, $l: \mathbf{a}_{\dot{l}}^{T} \cdot \mathbf{x} + b_{\dot{l}} = 0$ where $\mathbf{a}_{\dot{l}} \in \mathbb{R}^2$ and $b_{\dot{l}} \in \mathbb{R}$ , and they can be solved in closed form given the two end-points. + +Background on the AFM method [34]. To be self-contained, we briefly overview the AFM method. The basic idea is to "lift" a line segment to a region, which facilitates leveraging state-of-the-art DNNs in learning. To compute the AFM for a line segment map, each (pixel) point $\mathbf{p} \in \Lambda$ is assigned to a line segment $\ddot{l}$ if it has the minimum distance to $\ddot{l}$ among all line segments in a given image. The distance is calculated as follows. Let $\mathbf{p}'$ be the point projected onto the line $l$ of a line segment $\ddot{l}$ . If $\mathbf{p}'$ is not on the line segment $\ddot{l}$ itself, it will be re-assigned to one of the two end-points that has the smaller Euclidean distance. Then, the distance between $\mathbf{p}$ and $\ddot{l}$ is the Euclidean distance between $\mathbf{p}$ and $\mathbf{p}'$ . If $\mathbf{p}$ is assigned to $\ddot{l}$ , it is reparameterized as $\mathbf{p} - \mathbf{p}'$ , i.e., the displacement vector in the image domain. The AFM of a line segment map is a 2-D vector field, which is created by reparameterizing all the (pixel) points in the image lattice $\Lambda$ and often forms a region partition of the image lattice. A heuristic squeezing module is also proposed in the AFM work to recover a line segment from a 2-D vector field region (a.k.a., attraction). + +The proposed holistic attraction field map. Strictly + +![](images/7f1608b42fc27ef3b429b314d6ac0ae3036b868d09aa3279b44c0e39da77b016.jpg) +(a) Line segments +Figure 3. An illustration for representing line segments in images with the related distant points. (a) shows one of the line segments (marked black with two blue endpoints), the corresponding support region (marked gray) calculated by AFM [34] and one of the distant points in the support region. (b) shows the process of extending the attraction field representation and transforming the line segment into a standard local coordinate originated at $\mathbf{p}$ with a horizontal unit attraction vector. + +![](images/c4d5960e3ec548a3234b33f6a3870707e6c0dbeb7b37a72a71205516ad30e601.jpg) +(b) A line segment in the local coordinate of $\mathbf{p}$ + +speaking, the displacement vector based geometric reparameterization scheme in the AFM method can only provide complete information for the underlying line $l$ of a line segment $\vec{l}$ (when the projection is not outside the line segment). One straightforward extension of the AFM method is as follows. As illustrated in the first column in Fig. 3 (b), consider a distant (pixel) point $\mathbf{p}$ outside a line segment $\vec{l}$ with the projection point being on the line segment, if we not only use the displacement vector between $\mathbf{p}$ and its projection point, but also include the two displacement vectors between $\mathbf{p}$ and the two end-points of the line segment, we can reparameterize $\mathbf{p}$ by its 6-D displacement vector which can completely determine the line segment (i.e., an exact dual representation). There are some points (pixels) (e.g., points on any line segment) that should not be reparameterized to avoid degradation and are treated as the "background". Thus, we can create a 6-D attraction field and each line segment is supported by a region in the field map (shown by the gray region in Fig. 3 (a)). This was our first attempt in our study, and it turns out surprisingly that the 6-D attraction field can not be accurately and reliably learned in training with deep convolutional neural networks. We hypothesis that although the 6-D attraction field captures the sufficient and necessary information for recovering line segments in closed form, it is not parsimoniously and complementarily encoded using 3 displacement vectors for each point, which may increase the difficulty of learning even with powerful DNNs. + +We derive an equivalent geometric encoding that is parsimonious and complementary as shown in the right two columns in Fig. 3. For a line segment $\ddot{l}$ , our derivation undergoes a simple affine transformation for each distant pixel point $\mathbf{p}$ in its support region. Let $d$ be the distance between $\mathbf{p}$ and $\ddot{l}$ , i.e., $d = |\mathbf{a}_{\dot{l}}^{T} \cdot \mathbf{p}' + b_{\dot{l}}| > 0$ . We have, + +i) Translation: The point $\mathbf{p}$ is then used as the new coordinate origin. +ii) Rotation: The line segment is then aligned with the vertical $y$ -axis with the end-point $\mathbf{x}_1$ on the top and the point $\mathbf{p}$ (the new origin) to the left. The rotation angle is denoted by $\theta \in [-\pi, \pi)$ . + +iii) Scaling: The distance $d$ is used as the unit length to normalize the $x - y$ -axis in the new coordinate system. + +In the new coordinate system after the affine transformation, let $\theta_{1}$ and $\theta_{2}$ be the two angles as illustrated in Fig. 3 ( $\theta_{1} \in (0, \frac{\pi}{2})$ and $\theta_{2} \in (-\frac{\pi}{2}, 0]$ ). So, a point $\mathbf{p}$ in the support region of a line segment $\vec{l}$ is reparameterized as, + +$$ +\mathbf {p} (\ddot {l}) = (d, \theta , \theta_ {1}, \theta_ {2}), \tag {1} +$$ + +which is completely equivalent to the 6-D displacement vector based representation and thus capable of recovering the line segment in closed form in the ideal case. For the "background" points which are not attracted by any line segment based on our specification, we encode them by a dummy 4-D vector $(-1,0,0,0)$ . + +The derived 4-D vector field map for a line segment map is called a holistic attraction field map highlighting its completeness and parsimoniousness for line segments, compared to the vanilla AFM [34]. + +High-level explanations of why the proposed 4-D holistic AFM is better than the 6-D vanilla AFM. Intuitively, for a line segment and a distant point $\mathbf{p}$ , we can view the support region (the grey one in Fig. 3 (a)) as "a face" with the point $\mathbf{p}$ being the left "eye" center and the line segment being the vertical "head bone". So, the affine transformation stated above is to "align" all the "faces" w.r.t. the left "eye" in a canonical frontal viewpoint. It is well-known that this type of "representation normalization" can eliminate many nuisance factors in data to facilitate more effective learning. Furthermore, the joint encoding that exploits displacement distance and angle effectively decouples the attraction field w.r.t. complementary spanning dimensions. + +# 4. Holistically-Attracted Wireframe Parser + +In this section, we present details of our Holistically-Attracted Wireframe Parser (HAWP). + +Data Preparation. Let $D_{train} = \{(I_i, L_i); i = 1, \dots, N\}$ be the set of training data where all the images $I_i$ 's are resized to the same size of $\Lambda = H \times W$ pixels, and $L_i$ is the set of $n_i$ annotated line segments in the image $I_i$ , $L_i = \{\ddot{l}_{i,1}, \dots, \ddot{l}_{i,n_i}\}$ and each line segment $\ddot{l}_{i,j} = (\mathbf{x}_{i,j,1}, \mathbf{x}_{i,j,2})$ is represented by its two annotated end-points (the vectorized wireframe representation). + +The groundtruth junction heatmap representations. We adopt the same settings used in L-CNN [41]. For an image $I \in D_{train}$ (the index subscript is omitted for simplicity), the set of unique end-points from all line segments are the junctions, denoted by $J$ . Then, we create two maps: the junction mask map, denoted by $\mathcal{I}$ , and the junction 2-D offset map, denoted by $\mathcal{O}$ . A coarser resolution is used in computing the two maps by dividing the image lattice into $H' \times W'$ bins (assuming all bins have the same size, $B \times B$ , i.e., the down-sampling rate is $B = \frac{H}{H'} = \frac{W}{W'}$ ). Then, for each bin $b$ , let $\Lambda_b \subset \Lambda$ and $\mathbf{x}_b \in \Lambda_b$ be its corresponding + +patch and the center of the patch respectively in the original image lattice and we have, $\mathcal{J}(b) = 1$ and $\mathcal{O}(b) = (\mathbf{x}_b - \mathbf{p})$ if $\exists \mathbf{p} \in J$ , and $\mathbf{p} \in \Lambda_b$ and both are set to 0 otherwise, where the offset vector in $\mathcal{O}(b)$ is normalized by the bin size, so the range of $\mathcal{O}(b)$ is bounded by $[- \frac{1}{2}, \frac{1}{2}) \times [- \frac{1}{2}, \frac{1}{2})$ . + +The groundtruth holistic attraction field map. It is straightforward to follow the definitions in Section 3 to compute the map for an image $I \in D_{train}$ . Denote by $\mathcal{A}$ be the map of the size $H' \times W'$ (the same as that of the two junction maps), which is initialized using the method in Section 3. Then, we normalize each entry of the 4-D attraction field vector (Eqn. (1)) to be in the range [0, 1). We select a distance threshold $d_{max}$ . We filter out the points in $\mathcal{A}$ if their $d$ 's are greater than $d_{max}$ by changing them to the "background" with the dummy vector $(-1, 0, 0, 0)$ . Then, we divide the distances (the first entry) of the remaining non-background points by $d_{max}$ . Here, $d_{max}$ is chosen such that all line segments still have sufficient support distant points $(d_{max} = 5$ in our experiments). It also helps remove points that are far away from all line segments and thus may not provide meaningful information for LSD. For the remaining three entries, it is straightforward to normalize based on their bounded ranges. For example, an affine transformation is used to normalize $\theta$ to $\frac{\theta}{2\pi} + \frac{1}{2}$ . + +Feature Backbone. We chose the stacked Hourglass network [23] which is widely used in human keypoint estimation and corner-point based object detection [18, 10], and also adopted by L-CNN [41]. The size of the output feature map is also $H' \times W'$ . Denote by $\mathcal{F}$ the output feature map for an input image $I$ . + +# 4.1. Computing Line Segment Proposals + +Line segment proposals are computed by predicting the 4-D AFM $\mathcal{A}$ from $\mathcal{F}$ . Let $\hat{\mathcal{A}}$ be the predicted 4-D map. $\hat{\mathcal{A}}$ is computed by an $1\times 1$ convolutional layers followed by a sigmoid layer. With $\hat{\mathcal{A}}$ , it is straightforward to generate line segment proposals by reversing the simple normalization step and the geometric affine transformation (Section 3). However, we observe that the distance (the first entry) is more difficult to predict in a sufficiently accurate way. We leverage an auxiliary supervised signal in learning, which exploits the distance residual, in a similar spirit to the method proposed for depth prediction in [6]. In addition to predict $\hat{\mathcal{A}}$ from $\mathcal{F}$ , we also compute a distance residual map, denoted by $\Delta \hat{\mathbf{d}}$ , using one $1\times 1$ convolutional layers followed by a sigmoid layer. The groundtruth for $\Delta \hat{\mathbf{d}}$ , denoted by $\Delta \mathbf{d}$ , is computed by the residual (the absolute difference) between the two distances in $\mathcal{A}$ and $\hat{\mathcal{A}}$ respectively. + +In training, channel-wise $\ell_1$ norm is used as the loss function for both $\mathbb{L}(\mathcal{A},\hat{\mathcal{A}})$ and $\mathbb{L}(\Delta \mathbf{d},\hat{\Delta}\mathbf{d})$ . The total loss for computing line segments is the sum of the two losses, $\mathbb{L}_{LS} = \mathbb{L}(\mathcal{A},\hat{\mathcal{A}}) + \mathbb{L}(\Delta \mathbf{d},\hat{\Delta}\mathbf{d})$ . In inference, with the predicted $\hat{d}\in \hat{\mathcal{A}}$ and $\hat{\Delta} d\in \hat{\Delta}\mathbf{d}$ (both are non-negative due to the sigmoid transformation), since we do not know the + +underlying sign of the distance residual, we enumerate three possibilities in updating the distance prediction, + +$$ +\hat {d} ^ {\prime} (\kappa) = \hat {d} + \kappa \cdot \hat {\Delta} d, \tag {2} +$$ + +where $\kappa = -1,0,1$ . So, each distant point may generate up to three line segment proposals depending on whether the condition $0 < \hat{d}^{\prime}(\kappa)\leq d_{max}$ is satisfied. + +# 4.2. Junction Detection + +Junction detection is addressed by predicting the two maps, the junction mask map and the junction offset map, from the feature map $\mathcal{F}$ . They are computed by one $1 \times 1$ convolutional layers followed by a sigmoid layer. Denote by $\hat{\mathcal{I}}$ and $\hat{\mathcal{O}}$ the predicted mask map and offset map respectively. The sigmoid function for computing the offset map has an intercept $-0.5$ . In training, the binary cross-entropy loss is used for $\mathbb{L}(\mathcal{I}, \hat{\mathcal{I}})$ , and the $\ell_1$ loss is used for $\mathbb{L}(\mathcal{O}, \hat{\mathcal{O}})$ , following the typical setting in heatmap based regression for keypoint estimation tasks and consistent with the use in L-CNN [41]. The total loss is the weighted sum of the two losses, $\mathbb{L}_{Junc} = \lambda_{msk} \cdot \mathbb{L}(\mathcal{I}, \hat{\mathcal{I}}) + \lambda_{off} \cdot \mathcal{I} \odot \mathbb{L}(\mathcal{O}, \hat{\mathcal{O}})$ , where $\odot$ represents element-wise product, and $\lambda_{msk}$ and $\lambda_{off}$ are two trade-off parameters (we set $\lambda_{msk}$ and $\lambda_{off}$ to 8.0 and 0.25 respectively in our experiments). In inference, we also apply the standard non-max suppression (NMS) w.r.t. a $3 \times 3$ neighborhood, which can be efficiently implemented by a modified max-pooling layer. After NMS, we keep the top- $K$ junctions from $\hat{\mathcal{I}}$ . And, for a bin $b$ , if $\hat{\mathcal{I}}(b) > 0$ , a junction proposal is generated with its position computed by $\mathbf{x}_b + \hat{\mathcal{O}}(b) \cdot w$ , where $\mathbf{x}_b$ is the position of the junction pixel, $\hat{\mathcal{O}}(b)$ is the learned offset vector, and $w$ is a rescaling factor of the offset. + +# 4.3. Line Segment and Junction Matching + +Line segment proposals and junction proposals are computed individually by leveraging different information, and their matching will provide more accurate meaningful alignment in wireframe parsing. We adopt a simple matching strategy to refining the initial proposals. A line segment proposal from the initial set is kept if and only if its two endpoints can be matched with two junction proposals based on Euclidean distance with a predefined threshold $\tau$ ( $\tau = 10$ in all our experiments). A junction proposal will be removed if it does not match to any survived line segment proposal after refinement. After matching, line segments and junctions are coupled together, which will be further verified using a light-weight classifier. + +# 4.4. Line Segment and Junction Verification + +Without loss of generality, let $\vec{l}$ be a line segment proposal after refinement. A simple $2 - fc$ layer is used as the validation head. To extract the same-sized feature vectors in $\mathcal{F}$ (the output of the feature backbone) for different line segments of different length for the head classifier, the widely used RoIPool/RoIAlign operation in the R-CNN based object de + +tection system [12, 26] is adapted to line segments, and a simple LoIPool operation is used as done in L-CNN [41]. The LoIPool operation first uniformly samples $s$ points for a line segment $\vec{l}$ . The feature for each sampled point is computed from $\mathcal{F}$ using bi-linear interpolation as done in the RoIAlign operation and the 1D max-pooling operator is used to reduce the feature dimension. Then, all the features from the $s$ sampled points are concatenated as the feature vector for a line segment to be fed into the head classifier ( $s = 32$ in all our experiments). + +In training the verification head classifier, we assign positive and negative labels to line segment proposals (after refinement) based on their distances to the groundtruth line segments. A line segment proposal is assigned to be a positive sample if there is a groundtruth line segment and their distance is less than a predefined threshold $\eta$ ( $\eta = 1.5$ in all our experiments). The distance between two line segments is computed as follows. We first match the two pairs of end-points based on the minimum Euclidean distance. Then, the distance between the two line segments is the maximum distance of the two endpoint-to-endpoint distances. So, the set of line segment proposals will be divided into the positive subset and the negative subset. + +As illustrated in Fig. 1(b), the negative subset usually contains many hard negative samples since the proposed holistic AFM usually generates line segment proposals of "good quality", which is helpful to learn a better verification classifier. Apart from the learned positive and negative samples, we use a simple proposal augmentation method in a similar spirit to the static sampler used in L-CNN [41]: We add all the groundtruth line segments into the positive set. We also introduce a set of negative samples that are generated based on the groundtruth junction annotations (i.e., line segments using the two end-points that do not correspond to any annotated line segment). During training, to avoid the class imbalance issue, we sample the same number, $n$ , of positives and negatives (i.e., LoIs) from the two augmented subsets ( $n = 300$ in all our experiments). We use binary cross entropy loss in the verification module. Denote by $\mathbb{L}_{Ver}$ the loss computed on the sampled LoIs. + +The proposed HAWP is trained end-to-end with the following loss function, + +$$ +\mathbb {L} = \mathbb {L} _ {L S} + \mathbb {L} _ {J u n c} + \mathbb {L} _ {V e r}. \tag {3} +$$ + +# 5. Experiments + +In this section, we present detailed experimental results and analyses of the proposed HAWP. Our reproducible PyTorch source code will be released. + +Benchmarks. The wireframe benchmark [15] and the YorkUrban benchmark are used. The former consists of 5,000 training samples and 462 testing samples. The latter includes 102 samples in total. The model is only trained on the former and tested on both. + +Baselines. Four methods are used: LSD $[30]^2$ , AFM [34], DWP [15], and L-CNN [41] (the previous state-of-the-art approach). The last three are DNN based approaches and the first one does not need training. The last two leverage junction information in training, and thus are directly comparable to the proposed HAWP. + +Implementation Details. To be fair in comparison with L-CNN, we adopt the same hyper-parameter settings (including those defined in Section 4) when applicable in our HAWP. Input images are resized to $512 \times 512$ in both training and testing. For the stacked Hourglass feature backbone, the number of stacks, the depth of each Hourglass module and the number of blocks are 2, 4, 1 respectively. Our HAWP is trained using the ADAM optimizer [16] with a total of 30 epochs on a single Tesla V100 GPU device. The learning rate, weight decay rate and batch size are set to $4 \times 10^{-4}$ , $1 \times 10^{-4}$ and 6 respectively. The learning rate is divided by 10 at the 25-th epoch. To further ensure apple-to/apple comparisons with L-CNN, we also re-train it using the same learning settings with slightly better performance obtained than those reported in their paper. + +# 5.1. Evaluation Metric + +We follow the accuracy evaluation settings used in L-CNN summarized as follows to be self-contained. + +Structural Average Precision (sAP) of Line Segments [41]. This is motivated by the typical AP metric used in evaluating object detection systems. A counterpart of the Intersection-over-Union (IoU) overlap is used. For each ground-truth line segment $\vec{l} = (\mathbf{x}_1, \mathbf{x}_2)$ , we first find the set of parsed line segments each of which, $\hat{\vec{l}} = (\hat{\mathbf{x}}_1, \hat{\mathbf{x}}_2)$ , satisfies the "overlap", + +$$ +\min _ {(i, j)} \left\| \mathbf {x} _ {1} - \hat {\mathbf {x}} _ {i} \right\| ^ {2} + \left\| \mathbf {x} _ {2} - \hat {\mathbf {x}} _ {j} \right\| ^ {2} \leq \vartheta_ {L}, \tag {4} +$$ + +where $(i,j) = (1,2)$ or $(2,1)$ , and $\vartheta_{L}$ is a predefined threshold. If the set of parsed line segments "overlapping" with $\ddot{l}$ is empty, the line segment $\ddot{l}$ is counted as a False Negative (FN). If there are multiple candidates in the set, the one with the highest verification classification score is counted as a True Positive (TP), and the rest ones will be counted as False Positives (FPs). A parsed line segment that does not belong to the candidate set of any groundtruth line segment is also counted as a FP. Then, sAP can be computed. To eliminate the influence of image resolution, the wireframe parsing results and the groundtruth wireframes are rescaled to the resolution of $128 \times 128$ in evaluation. We set the threshold $\vartheta$ to 5, 10, 15 and report the corresponding results, denoted by $\mathrm{sAP}^{5}$ , $\mathrm{sAP}^{10}$ , $\mathrm{sAP}^{15}$ . The overall performance of a wireframe parser is represented by the mean of the sAP values with different thresholds, denoted by msAP. + +Heatmap based F-score, $\mathbf{F}^H$ and $\mathbf{AP}^H$ of Line Segments. These are traditional metrics used in LSD and wire + +
MethodWireframe DatasetYorkUrban DatasetFPS
\(sAP^5\)\(sAP^{10}\)\(sAP^{15}\)msAP\(mAP^J\)\(AP^H\)\(F^H\)\(sAP^5\)\(sAP^{10}\)\(sAP^{15}\)msAP\(mAP^J\)\(AP^H\)\(F^H\)
LSD [30]/////55.262.5/////50.960.149.6
AFM [34]18.524.427.523.523.369.277.27.39.411.19.312.448.263.313.5
DWP [15]3.75.15.94.940.967.872.21.52.12.62.113.451.061.62.24
L-CNN [41]58.962.964.962.259.380.3\(82.8^\dagger\)76.9\(81.3^\dagger\)24.326.427.526.130.458.5\(59.6^\dagger\)61.8\(65.3^\dagger\)15.6
L-CNN (re-trained)59.763.665.362.960.281.6\(83.7^\dagger\)77.9\(81.7^\dagger\)25.027.128.326.831.558.3\(59.3^\dagger\)62.2\(65.2^\dagger\)15.6
HAWP (ours)62.566.568.265.760.284.5\(86.1^\dagger\)80.3\(83.1^\dagger\)26.128.529.728.131.660.6\(61.2^\dagger\)64.8\(66.3^\dagger\)29.5
+ +![](images/692fb90052e2395f98111d7ad55ede0e5ecf9afb582a4052267cb947595a9c84.jpg) +Figure 4. Precision-Recall (PR) curves of sAP10 and APH for DWP [15], AFM [34], L-CNN [41] and HAWP (ours) on the wireframe benchmark (the left two plots) and the YorkUrban benchmark (the right two plots). Best viewed in color and magnification. + +![](images/7337ff9d20e5578cf666234bf07aa39b16633010e05bebe99026350b53adfcd9.jpg) + +![](images/e7734fab675a6524c5597bf699854cabd718d769510cf9f75d44fab9b01f68d8.jpg) + +![](images/1d91f114456fc3f12cdc5c73860b00f8f81c1cb96b452fc1f58ba9c9ed8a7412.jpg) + +frame parsing [15]. Instead of directly using the vectorized representation of line segments, heatmaps are used, which are generated by rasterizing line segments for both parsing results and the groundtruth. The pixel-level evaluation is used in calculating the precision and recall curves with which $\mathrm{F}^H$ and $\mathrm{AP}^H$ are computed. + +Vectorized Junction Mean AP $(\mathbf{mAP}^J)$ [41]. It is computed in a similar spirit to msAP of line segments. Let $\vartheta_J$ be the threshold for the distance between a predicted junction and a groundtruth one. The $\mathrm{mAP}^J$ is computed w.r.t. $\vartheta_J = 0.5, 1.0, 2.0$ . + +Speed. Besides accuracy, speed is also important in practice. We use the frames per second (FPS) in evaluation. For fair comparisons, we compute the FPS for different methods under the same setting: the batch-size is 1, and single CPU thread and single GPU (Tesla V100) are used. Note that the LSD [30] method does not take advantage of GPU. + +# 5.2. Results and Comparisons + +Quantitative Results. Table 1 summarizes the results and comparisons in terms of the evaluation metric stated in Section 5.1. Our HAWP obtains state-of-the-art performance consistently. In terms of the challenging msAP metric, it outperforms L-CNN by $2.8\%$ and $1.3\%$ (absolute improvement) on the wireframe benchmark and the YorkUrban benchmark respectively. It also runs much faster than L-CNN with $89\%$ relative improvement in FPS. AFM and DWP are relatively slow due to their non-GPU friendly post-processing modules entailed for performance. In terms of the + +Table 1. Quantitative results and comparisons. Our proposed HAWP achieves state-of-the-art results consistently except for the FPS. The FPS of our HAWP is still significantly better than that of the three deep learning based methods. Note that for fair and apple-to-apple comparisons, we also retrained a L-CNN model using their latest released code and the same learning hyper-parameters used in our HAWP. Our retrained L-CNN obtained slightly better performance than the original one. $\dagger$ means that the post-processing scheme proposed in L-CNN [41] is used. The FPS of L-CNN is computed without the post-processing. See text for details. + +
# Junctions# ProposalssAP10FPS# GT Lines
L-CNN [41]159.222k63.615.674.2
HAWP (ours)189.64k66.529.5
+ +Table 2. Performance profiling on the Wireframe dataset. #Proposals represents the number of line segments in verification. The average number of groundtruth is listed in the last row. + +heatmap based evaluation metric, our HAWP is also significantly better than L-CNN regardless of the post-processing module proposed in L-CNN. Fig. 4 shows comparisons of PR curves. + +Since our proposed HAWP and L-CNN use very similar wireframe parsing pipelines and adopt the same design choices when applicable. The consistent accuracy gain of our HAWP must be contributed by the novel 4-D holistic attraction field representation and its integration in the parsing pipeline. In terms of efficiency, our HAWP runs much faster since a significantly fewer number of line segment proposals are used in the verification module. As shown in Table 2, our HAWP uses 5.5 times fewer number of line segment proposals. + +Qualitative Results. Fig. 5 shows wireframe parsing results by the five methods. + +# 5.3. Ablation Study + +We compare the effects of three aspects: our proposed H-AFM vs. the vanilla AFM [34], the distance residual module (Section 4.1), and the composition of negative samples in training verification module (Section 4.4). + +Table 3 summarizes the comparisons. We observe that + +![](images/a1d1b65a2ec5fe4ea0cfc5a1b329c087a546a12cb5701f893151c15e9433dd59.jpg) +LSD + +![](images/816ceaabd430477691f21a002a2db429e4800a5b0f6c56096e0cbbf8812df29d.jpg) +DWP + +![](images/4e2fe53b479f337bfec156b6b6f4ca8b24611d1306cdf4e7f36371d82e0b4fb0.jpg) + +![](images/55e7029e0fc16475da5df9792da6577db2d03bc15a6209ed2bba5a01b373fd0b.jpg) +L-CNN + +![](images/8c558efe43a9c8a6a7ccad6cee99f3ccfc3aea0b40db8d3c5e144d3dc0691b46.jpg) +Ours + +![](images/df098b02303aacc053e3612d3fb0af3e33ad62dcebc9e01cabc91ed43217062e.jpg) +Ground Truth + +![](images/085b85ba74118abe14136d441ccaaf62b26476eba650790212ebd7575c33fcb3.jpg) + +![](images/0b66119110ce6d3877e36fe7c73a2c5b5360efed9e49f3b79532fdc4527e613e.jpg) + +![](images/e76b1078ebeffa46009ecd15a5bb4d8f8806497b02909e050d255a4ac92bc860.jpg) + +![](images/822d61426319f65d449cad68ee8d761ce75a5488ee34646634ed0e509c8065b8.jpg) + +![](images/33635d153b0bcc0d411feb9abba8874d893a217ad8f9908a0d3de21f42f01ca6.jpg) + +![](images/dccd413d427c529997e9661af4e960327dbfaae7e9a999e47a02260634055dac.jpg) + +![](images/7e7a8881378b91ef2ab3dff8e7e4c4f13b73d4a99acd2ece5f3cf1b0e157cd95.jpg) + +![](images/d77319de2c0d020a181acee7256e1ac7aff5a880ea01136f83ba5918359ca64f.jpg) + +![](images/3b86c98c56dfadcef1e6d16a2dbb0caf3a46c7348e7e81d5dc17e7d550126aa3.jpg) + +![](images/5e6f2c9cf8576f40b8c9fd156b1ddae16e78bb722f3769249df5ed6d4e79e830.jpg) + +![](images/dd65ba35769c16ffdf43d51d899522840c4bd0d0ab04a6733a7710b7b09bbf0f.jpg) + +![](images/64e062fa74901ea98e5af5f561a33d92b1f0e97c513b32adf778431336f98386.jpg) + +![](images/88f6d130f5d1701150a68d6e2baae3cef7e358a23aa21d4be01c2c45aa588a50.jpg) + +![](images/970e40136e479c43c99bf08bad5f9583c7332afd9891966601b958036d015ccf.jpg) +Figure 5. Wireframe parsing examples on the Wireframe dataset [15]. + +![](images/12dab9ac38e1a554ab4f12d8fe7999d26e1c66d6c9db4307c62eb492923dc3a3.jpg) + +![](images/feb4dc9e2a86aa6212edc40443f093d124dc2dce40aa00f40cbc5a9e0cb99e03.jpg) + +![](images/e89e9990654c706b178c6bf41e6f25cb2d3e8fddcc565f9d551ebf3b6fdb1db1.jpg) + +![](images/a25ac77f371655abdf616e539ab9416ccf64adf9e1f7914895d7847716a8e051.jpg) + +
Line Segment RepresentationDistance TrainingResidual TestingNegative Example SamplerPerformance
N*D*D-S-sAP5sAP10
H-AFM✓✓✓✓62.566.5
✓62.066.0
✓✓✓62.266.1
✓✓✓62.065.8
H-AFM✓✓✓58.963.0
H-AFM✓✓58.762.6
AFM✓✓30.933.7
+ +Table 3. The ablation study of three design and learning aspects in the proposed HAWP. See text for details. + +both H-AFM and the distance residual module are important for improving performance. The natural negative sampler $\mathbb{N}^*$ randomly chooses negative line segments based on the matching results (with respect to the annotations). The rest of three negative example samplers $(\mathbb{D}^*, \mathbb{D}^-, \mathbb{S}^-)$ are also investigated in L-CNN and their full combination is needed for training L-CNN. $\mathbb{D}^*$ randomly selects a part of examples from the online generated line segment proposals, regardless of the matching results. $\mathbb{D}^-$ tries to match the proposals with pre-computed hard negative examples and the matched proposals are used as negative samples. $\mathbb{S}^-$ directly obtains the negative examples from the pre-computed hard negative examples set. In our experiment, the number of samples for $\mathbb{N}^*, \mathbb{D}^*, \mathbb{D}^-$ and $\mathbb{S}^-$ are set to 300, 300, 300, 40 respectively. We observe that our HAWP is less sensitive to those samplers due to the informative line segment proposal generation stage. + +# 6. Conclusions and Discussions + +This paper presents a holistically-attracted wireframe parser (HAWP) with state-of-the-art performance obtained on two benchmarks, the wireframe dataset and the YorkUrban dataset. The proposed HAWP consists of three components: proposal (line segments and junctions) initialization, proposal refinement and proposal verification, which are end-to-end trainable. Compared to the previous state-of-the-art wireframe parser L-CNN [41], our HAWP is enabled by a novel 4-D holistic attraction field map representation (H-AFM) for line segments in proposal generation stages. Our HAWP also achieves real-time speed with a single GPU, and thus is useful for many downstream tasks such as SLAM and Structure from Motion (SfM). The proposed H-AFM is also potentially useful for generic LSD problems in other domains such as medical image analysis. + +Acknowledgement This work was supported by the National Natural Science Foundation of China under Grant 61922065, Grant 61771350 and Grant 41820104006. This work of T. Wu was supported in part by NSF IIS-1909644 and ARO Grant W911NF1810295. This work was also supported in part by EPSRC grant Seebibyte EP/M013774/1 and EPSRC/MURI grant EP/N019474/1. N. Xue was also supported by China Scholarship Council. The views presented in this paper are those of the authors and should not be interpreted as representing any funding agencies. + +# References + +[1] Cuneyt Akinlar and Cihan Topal. Edlines: A real-time line segment detector with a false detection control. Pattern Recognition Letters, 32(13):1633-1642, 2011. 3 +[2] Emilio J Almazan, Ron Tal, Yiming Qian, and James H Elder. MCMLSD: A Dynamic Programming Approach to Line Segment Detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[3] Dana H. Ballard. Generalizing the hough transform to detect arbitrary shapes. Pattern Recognition, 13(2):111-122, 1981. 3 +[4] Adrien Bartoli and Peter F. Sturm. Structure-from-motion using lines: Representation, triangulation, and bundle adjustment. Computer Vision and Image Understanding, 100(3):416-441, 2005. 1 +[5] J. Brian Burns, Allen R. Hanson, and Edward M. Riseman. Extracting straight lines. IEEE Trans. Pattern Analysis and Machine Intelligence, 8(4):425-455, 1986. 3 +[6] Rui Chen, Songfang Han, Jing Xu, and Hao Su. Point-based multi-view stereo network. In IEEE International Conference on Computer Vision (ICCV), 2019. 5 +[7] Nam Gyu Cho, Alan Yuille, and Seong Whan Lee. A Novel Linelet-Based Representation for Line Segment Detection. IEEE Trans. Pattern Analysis and Machine Intelligence, 40(5):1195-1208, 2018. 3 +[8] Patrick Denis, James H. Elder, and Francisco J. Estrada. Efficient Edge-Based Methods for Estimating Manhattan Frames in Urban Imagery. In European Conference on Computer Vision (ECCV), pages 197-210, 2008. 1, 3 +[9] Agnès Desolneux, Lionel Moisan, and Jean-Michel Morel. Meaningful alignments. International Journal of Computer Vision, 40(1):7-23, 2000. 3 +[10] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian. Centernet: Keypoint triplets for object detection. In IEEE International Conference on Computer Vision (ICCV), pages 6568-6577, 2019. 5 +[11] Timothy Duff, Kathlen Kohn, Anton Leykin, and Tomas Pajdla. Plmp - point-line minimal problems in complete multi-view visibility. In IEEE International Conference on Computer Vision (ICCV), October 2019. 1 +[12] Ross B. Girshick. Fast R-CNN. In IEEE International Conference on Computer Vision (ICCV), pages 1440-1448, 2015. 2, 6 +[13] Abhinav Gupta, Alexei A. Efros, and Martial Hebert. Blocks world revisited: Image understanding using qualitative geometry and mechanics. In European Conference on Computer Vision (ECCV), pages 482-496, 2010. 2 +[14] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross B. Girshick. Mask R-CNN. In IEEE International Conference on Computer Vision (ICCV), pages 2980-2988, 2017. 2 +[15] Kun Huang, Yifan Wang, Zihan Zhou, Tianjiao Ding, Shenghua Gao, and Yi Ma. Learning to parse wireframes in images of man-made environments. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 626-635, 2018. 1, 2, 3, 6, 7, 8 + +[16] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. 6 +[17] Pierre-Alain Langlois, Alexandre Boulch, and Renaud Marlet. Surface reconstruction from 3d line segments. In International Conference on 3D Vision (3DV), pages 553-563, 2019. 1 +[18] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In European Conference on Computer Vision (ECCV), pages 765-781, 2018. 5 +[19] Thomas Lemaire and Simon Lacroix. Monocular-vision based SLAM using line segments. In IEEE International Conference on Robotics and Automation (ICRA). IEEE, apr 2007. 1 +[20] Kevis-Kokitsi Maninis, Jordi Pont-Tuset, Pablo Arbelaez, and Luc Van Gool. Convolutional oriented boundaries: From image segmentation to high-level tasks. IEEE Trans. Pattern Analysis and Machine Intelligence, 40(4):819-833, 2018. 3 +[21] Jiri Matas, Charles Galambos, and Josef Kittler. Robust detection of lines using the progressive probabilistic hough transform. Computer Vision and Image Understanding, 78(1):119-137, 2000. 3 +[22] Branislav Miusik and Horst Wildenauer. Structure from motion with line segments under relaxed endpoint constraints. International Journal of Computer Vision, 124(1):65-79, 2017. 1 +[23] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In European Conference on Computer Vision (ECCV), pages 483-499, 2016. 2, 5 +[24] Bronislav Pribyl, Pavel Zemcik, and Martin Cadík. Camera pose estimation from lines using plücker coordinates. In Proceedings of the British Machine Vision Conference 2015, BMVC, pages 45.1-45.12, 2015. 1 +[25] Bronislav Pribyl, Pavel Zemicík, and Martin Cadík. Absolute pose estimation from line correspondences using direct linear transformation. Computer Vision and Image Understanding, 161:130-144, 2017. 1 +[26] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. IEEE Trans. Pattern Analysis and Machine Intelligence, 39(6):1137-1149, 2017. 2, 6 +[27] Lawrence G Roberts. Machine perception of three-dimensional solids. PhD thesis, Massachusetts Institute of Technology, 1963. 2 +[28] Zhuowen Tu, Xiangrong Chen, Alan L. Yuille, and Song Chun Zhu. Image parsing: Unifying segmentation, detection, and recognition. International Journal of Computer Vision, 63(2):113-140, 2005. 2 +[29] Gül Varol, Duygu Ceylan, Bryan C. Russell, Jamei Yang, Ersin Yumer, Ivan Laptev, and Cordelia Schmid. Bodynet: Volumetric inference of 3d human body shapes. In European Conference on Computer Vision (ECCV), pages 20-38, 2018. 2 +[30] R G von Gioi, J Jakubowicz, J M Morel, and G Randall. LSD: A Fast Line Segment Detector with a False Detection Control. IEEE Trans. Pattern Analysis and Machine Intelligence, 32(4):722-732, 2010. 3, 6, 7 + +[31] Shih-En Wei, Varun Ramakrishna, Takeo Kanade, and Yaser Sheikh. Convolutional pose machines. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4724–4732, 2016. 3 +[32] Gui-Song Xia, Julie Delon, and Yann Gousseau. Accurate junction detection and characterization in natural images. International Journal of Computer Vision, 106(1):31-56, 2014. 1 +[33] Saining Xie and Zhuowen Tu. Holistically-nested edge detection. International Journal of Computer Vision, 125(1-3):3-18, 2017. 3 +[34] Nan Xue, Song Bai, Fudong Wang, Gui-Song Xia, Tianfu Wu, and Liangpei Zhang. Learning attraction field representation for robust line segment detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3, 4, 6, 7 +[35] Nan Xue, Song Bai, Fudong Wang, Gui-Song Xia, Tianfu Wu, Liangpei Zhang, and Philip H.S. Torr. Learning regional attraction for line segment detection. IEEE Trans. Pattern Analysis and Machine Intelligence, 2019. 1, 2 +[36] Nan Xue, Gui-Song Xia, Xiang Bai, Liangpei Zhang, and Weiming Shen. Anisotropic-scale junction detection and matching for indoor images. IEEE Trans. Image Processing, 2018. 1 +[37] Zhucun Xue, Nan Xue, Gui-Song Xia, and Weiming Shen. Learning to calibrate straight lines for fisheye image rectification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[38] Ziheng Zhang, Zhengxin Li, Ning Bi, Jia Zheng, Jinlei Wang, Kun Huang, Weixin Luo, Yanyu Xu, and Shenghua Gao. Ppgnet: Learning point-pair graph for line segment detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3 +[39] Huizhong Zhou, Danping Zou, Ling Pei, Rendong Ying, Peilin Liu, and Wenxian Yu. Structslam: Visual SLAM with building structure lines. IEEE Trans. Vehicular Technology, 64(4):1364-1375, 2015. 1 +[40] 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. IEEE Trans. Pattern Anal. Mach. Intell., 41(4):901-914, 2019. 2 +[41] Yichao Zhou, Haozhi Qi, and Yi Ma. End-to-end wireframe parsing. In IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[42] Xingxing Zuo, Xiaojia Xie, Yong Liu, and Guoquan Huang. Robust visual SLAM with point and line features. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2017. 1 \ No newline at end of file diff --git a/holisticallyattractedwireframeparsing/images.zip b/holisticallyattractedwireframeparsing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6f2394614d25cde4286a35bbb3ef871860ba26a4 --- /dev/null +++ b/holisticallyattractedwireframeparsing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca7a59e300f26e0dab3fe73d07abf0d32de2357ca84ab0ffe94fafc5224a80b6 +size 579927 diff --git a/holisticallyattractedwireframeparsing/layout.json b/holisticallyattractedwireframeparsing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..207b1dcc4d53e377f52a294a85d6f5a5efbe7723 --- /dev/null +++ b/holisticallyattractedwireframeparsing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75718107d2026ed24dbc1927daac24d62fa566287d3488c4c710cf2681ab9a74 +size 527551 diff --git a/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_content_list.json b/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b6a49e7a6aa07822524064e62feb43657c7f7236 --- /dev/null +++ b/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4565dd7e3f6b983ceb4348d6b725019188c53e8ce759677e80e491ef7130371e +size 98049 diff --git a/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_model.json b/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ce5e28d2ce433455f6677b11c30d34da2f2f5632 --- /dev/null +++ b/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c9381864d6ed42cbc597e7a7ee27a173e382299f77b020c1d1c3e42bb5c7d82 +size 121403 diff --git a/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_origin.pdf b/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..18998f753e805372e2e0a41bcdf5d4d34fa3bb2b --- /dev/null +++ b/honnotateamethodfor3dannotationofhandandobjectposes/b020de51-79d8-404f-bb77-3c0c4747065b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f234c9f4267bc0884e36d782833f178b14f01fce6637121ba384499714bd7f86 +size 2645617 diff --git a/honnotateamethodfor3dannotationofhandandobjectposes/full.md b/honnotateamethodfor3dannotationofhandandobjectposes/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b4a7cbbc86f3805ead13bd51c0c8d50b9bb61b39 --- /dev/null +++ b/honnotateamethodfor3dannotationofhandandobjectposes/full.md @@ -0,0 +1,413 @@ +# HOnnotate: A method for 3D Annotation of Hand and Object Poses + +Shreyas Hampali1, Mahdi Rad1, Markus Oberweger1, and Vincent Lepetit2,1 + +$^{1}$ Institute for Computer Graphics and Vision, Graz University of Technology, Austria $^{2}$ LIGM, Ecole des Ponts, Univ Gustave Eiffel, CNRS, Marne-la-Vallee, France {hampali, rad, oberweger, lepetit} @icg.tugraz.at + +Project Page: https://www.tugraz.at/index.php?id=40231 + +# Abstract + +We propose a method for annotating images of a hand manipulating an object with the 3D poses of both the hand and the object, together with a dataset created using this method. Our motivation is the current lack of annotated real images for this problem, as estimating the 3D poses is challenging, mostly because of the mutual occlusions between the hand and the object. To tackle this challenge, we capture sequences with one or several RGB-D cameras and jointly optimize the 3D hand and object poses over all the frames simultaneously. This method allows us to automatically annotate each frame with accurate estimates of the poses, despite large mutual occlusions. With this method, we created HO-3D, the first markerless dataset of color images with 3D annotations for both the hand and object. This dataset is currently made of 77,558 frames, 68 sequences, 10 persons, and 10 objects. Using our dataset, we develop a single RGB image-based method to predict the hand pose when interacting with objects under severe occlusions and show it generalizes to objects not seen in the dataset. + +# 1. Introduction + +Methods for 3D pose estimation of rigid objects and hands from monocular images have made significant progress recently, thanks to the development of Deep Learning, and the creation of large datasets or the use of synthetic images for training [32, 35, 46, 55, 71, 73]. However, these recent methods still fail when a hand interacts with an object, mostly because of large mutual occlusions, and of the absence of datasets specific to 3D pose estimation for hand+object interaction. Breaking this limit is highly desirable though, as 3D hand and object poses would be very useful in augmented reality applications, or for learning-by-imitation in robotics, for example. + +Several pioneer works have already considered this problem, sometimes with impressive success [26, 52, 61]. These works typically rely on tracking algorithms to exploit temporal constraints, often also considering physical constraints between the hand and the object to improve the pose estimates. While these temporal and physical constraints remain relevant, we would like to also benefit from the power of data-driven methods for 3D hand+object pose estimation from a single image. Being able to estimate these poses from a single frame would avoid manual initialization and drift of tracking algorithms. A data-driven approach, however, requires real or synthetic images annotated with the 3D poses of the object and the hand. Unfortunately, creating annotated data for the hand+object problem is very challenging. Both common options for creating 3D annotations, annotating real images and generating synthetic images, raise challenging problems. + +Annotating real images. One can rely on some algorithm for automated annotation, as was done for current benchmarks in 3D hand pose estimation [45, 54, 57, 71, 74], where the "ground truth" annotations are obtained automatically with a tracking algorithm. Though these annotations are noisy, they are usually taken for granted and used for training and evaluation [37]. Another approach is to use sensors attached to the hand as in [14] (bottom right image of Fig. 1). This directly provides the 3D poses, however, the sensors are visible in the images, and thus bias learning methods. Significant effort is still required in developing algorithms for automated annotation of real images. + +Generating synthetic images. Relying on synthetic images is appealing, as the 3D poses are known perfectly. Realistic rendering and domain transfer can be used to train 3D pose estimation on synthetic images [31, 47, 73]. Generating physically correct grasps is possible [29], as shown in [18], but complex manipulation is difficult to simulate. However, real images with accurate 3D annotations would still be needed to evaluate the generalizability of the method + +![](images/77648ad3e35e6ae73a33a3ba2f2cb0200d3a5cd601aff52d0dcdc81fd6c3c004.jpg) + +![](images/50787d651c0703cb00f91a321247affbfb39d73dbc155b5fee2741fca863868c.jpg) + +![](images/b1d66fcd173834a1141b61c8b233ff8f5560a5c26173ba0b1cc351d81459ba40.jpg) + +![](images/b9a32e60804ee6b06a5da581550fbce604c305b7b6c456c6aaa4fa8f04d95614.jpg) + +![](images/7d58fcd838337aed60bb85a28d405811305bd878d84ea26fc5c47389605f8e77.jpg) + +![](images/68edcf558ac7714c8153dd867c929bc0e31c02b427535147a44a24129e68aba0.jpg) +Figure 1: We introduce a method for labelling real images of hand+object interaction with the 3D poses of the hand and of the object. With this method, we automatically created a dataset made of more than 75,000 frames, 10 different objects and 10 different users. In comparison, existing datasets have several limitations: The 3D objects are very simple, the interaction is not realistic, the images are synthetic, corrupted by sensors, and/or the number of samples is limited. More illustrations of annotations in our dataset are shown in the supplementary material. + +![](images/b10242bfc5266d2f69a7165b9bf489182a446e0ebf1d6cf0f7905ddf8363c835.jpg) +Our proposed HO-3D dataset + +![](images/4f3ce4d346c617c889ed9767d22de663e4e58274e69834bac6a3eee621d315d4.jpg) + +![](images/7dca34af8136ee379039d122df9539db58e9e614ac7727a3e050ec70b4330ebc.jpg) + +![](images/b7d56724fcec8fc4735d0a6916a2a542140e2c0e9885ba59b02087214eda3872.jpg) + +![](images/cdca9aee989ed9da00ea945c6789801998ce43700ffd4f668dbfb4839e854bb5.jpg) +[74] + +![](images/7090d53dfa910e564564673c76aa0ede5c75340e53535de77b14de0b861660d8.jpg) +[52] + +![](images/0d779d86d5463ac05b78f7ecfe65a8e9940feb0215b32c7c83925ce388b487b9.jpg) +[18] +Existing datasets + +![](images/60cbbd265ad039d086ddb66f4a26c04643f519d74a5466d2d6ceb7e33214db5e.jpg) +[14] + +to real data. + +We therefore propose a method to automatically annotate real images of hands grasping objects with their 3D poses. Our method works with a single RGB-D camera, but can exploit more cameras if available for better robustness and accuracy. The single-camera setup works under the assumption that the grasp pose varies marginally over the sequence; the multi-camera setup can handle complex hand+object interaction scenarios. Instead of tracking the poses frame-by-frame, our method optimizes jointly all the 3D poses of the hand and the object over the sequence. As our evaluations show, this allows us to exploit temporal consistency in a stronger way than a tracking algorithm. Using differentiable rendering, we can optimize a complex objective function by exploiting the new powerful gradient descent methods originally developed for Deep Learning [24]. We see this approach as the equivalent of bundle adjustment for SLAM algorithms, where we track objects instead of points. + +We rely on the MANO hand model [50], and the 3D model of the objects. We use objects from the YCB-Video dataset [68], as they have various shapes and materials, and can be bought online [1] by researchers interested in performing their own experiments. Being able to use a single camera also enables easier expansion of the dataset by other researchers with a larger variety of objects and grasping poses as multi-camera capture is often complex to setup. + +Using our method, we created a dataset, depicted in Fig. 1, which we call HO-3D. In addition, we used this dataset to learn to predict from a single RGB image the 3D pose of a hand manipulating an object. More exactly, we train a Deep Network to predict the 2D joint locations of the hand along with the joint direction vectors and lift them to 3D by fitting a MANO model to these predictions. This validates the fact that the 3D poses estimated by our annotation method can actually be used in a data-driven method for hand pose estimation. By comparing with an existing + +method for hand+object pose estimation [18] that directly estimates MANO parameters, we show that predicting 2D keypoints and lifting them to 3D performs more accurately. + +# 2. Related Work + +The literature on hand and object pose estimation is extremely broad, and we review only some works here. + +# 2.1.3D Object Pose Estimation + +Estimating the 3D pose of an object from a single frame is still one of the fundamental problems of Computer Vision. Some methods are now robust to partial occlusions [20, 36, 41], but many works rely on RGB-D data to handle this problem [5, 8, 22, 30], by fitting the 3D object model to depth data. This can fail when a hand grasps the object, since the surface of the hand can be mistaken for the surface of the object. + +# 2.2.3D Hand Pose Estimation + +Single image hand pose estimation is also a very popular problem in Computer Vision, and approaches can be divided into discriminative and generative methods. Discriminative approaches directly predict the joint locations from RGB or RGB-D images. Recent works based on Deep Networks [15,32,34,35,59,69,73] show remarkable performance, compared to early works based on Random Forests such as [23]. However, discriminative methods perform poorly in case of partial occlusion. + +Generative approaches take advantage of a hand model and its kinematic structure to generate hand pose hypotheses that are physically plausible [12, 28, 45, 51, 53, 63, 70]. [31, 40] predict 2D joint locations and then lift them to 3D. Generative approaches are usually accurate and can be made robust to partial occlusions. They typically rely on some pose prior, which may require manual initialization or result in drift when tracking. + +Our work is related to both discriminative and generative approaches: we use a generative approach within a global optimization framework to generate the pose annotations, and use a discriminative method to initialize this complex optimization. [64] also combines generative and discriminative approaches to train a network in a self-supervised setting. However, they only consider hands. We also train a discriminative method using our dataset, to predict the hand poses which are robust to occlusions from interacting objects. + +# 2.3. Synthetic Images for 3D Pose Estimation + +Being able to train discriminative methods on synthetic data is valuable as it is difficult to acquire annotations for real images [73]. [18, 47] show that because of the domain gap between synthetic and real images, training on synthetic images only results in sub-optimal performance. A GAN method was used in [31] to make synthetic images of hands more realistic. While using synthetic images remains appealing for many problems, creating the virtual scenes can be expensive and time-consuming. Generating animated realistic hand grasps of various objects, as it would be required to solve the problem considered in this paper remains challenging. Being able to use real sequences for training has thus also its advantages. Moreover, evaluation should be performed on real images. + +# 2.4. Joint Hand+Object Pose Estimation + +Early approaches for joint hand+object pose estimation [2,38,65] typically relied on multi-view camera setups, and frame-by-frame tracking methods, which may require careful initialization and drift over time. [39, 62] propose generative methods to track finger contact points for in-hand RGB-D object shape scanning. [43, 44] consider sensing from vision to estimate contact forces during hand+object interactions using a single RGB-D camera, and then estimate the hand and the object pose. However, these methods are limited to small occlusions. + +[26, 61] propose to use a physics simulator and a 3D renderer for frame-to-frame tracking of hands and objects from RGB-D. [27] uses an ensemble of Collaborative Trackers for multi-object and multiple hand tracking from RGB-D images. The accuracy of these methods seems to be qualitatively high, but as the ground truth acquisition in a real-world is known to be hard, they evaluate the proposed method on synthetic datasets, or by measuring the standard deviation of the difference in hand/object poses during a grasping scenario. + +[60] considers the problem of tracking a deformable object in interaction with a hand, by optimizing an energy function on the appearance and the kinematics of the hand, together with hand+object contact configurations. However, it is evaluated quantitatively only on synthetic images, + +which points to the difficulty of evaluation on real data. In addition, they only consider scenarios where the hand is visible from a top view, restricting the range of the hand poses and not allowing occlusions. + +Very recently, [25] uses a coarse hand pose estimation to retrieve the 3D pose and shape of hand-held objects. However, they only consider a specific type of object and do not estimate the object pose. [18] presents a model with contact loss that considers physically feasible hand+object interaction to improve grasp quality. However, to estimate 3D hand pose, they predict PCA components for the pose, which results in lower accuracy compared to ours, as our experiments show. [58] proposes a deep model to jointly predict 3D hand and object poses from egocentric views, but the absence of physical constraints might result in infeasible grasps. + +# 2.5. Hand+Object Datasets + +Several datasets for hand+object interactions have already been proposed. Many works provide egocentric RGB or RGB-D sequences for action recognition [3,6,7,13,48]. However, they focus on grasp and action labels and do not provide 3D poses. [10,32,49,60] generate synthetic datasets with 3D hand pose annotations, but fine interaction between a hand and an object remains difficult to generate accurately. + +[61, 63] captured sequences in the context of hand+hand and hand+object interaction, with 2D hand annotations only. [33] collected a dataset of real RGB images of hands holding objects. They also provide 2D joint annotations of pairs of non-occluded and occluded hands, by removing the object from the grasp of the subject, while maintaining their hand in the same pose. [16] proposes two datasets, a hand+object segmentation dataset, and a hand+object pose estimation dataset. However, for both datasets, the background pixels have been set to zero, and the training images only consist of a hand interacting with a tennis ball. They provide hand pose annotations and object positions, by manually labelling the joints and using a generative method to refine the joint positions. [21] generate a large scale dataset with full body pose and hand pose annotations in a multi-view setup. They use a generative approach to fit the body and hand models to 3D keypoints and point cloud. However, their dataset focuses on total body pose annotation and not hand+object interactions exclusively and does not provide object pose annotations. + +[52] proposed an RGB-D dataset of a hand manipulating a cube, which contains manual ground truth for both fingertip positions and 3D poses of the cube. [42] collected a dataset where they measure motion and force under different object-grasp configurations using sensors, but do not provide 3D poses. In contrast to these previous works, [14] provides a dataset of hand and object interactions with 3D annotations for both hand joints and object pose. They used + +
DatasetNo. of Frames3D Object PoseMarker-lessReal ImagesLabelsNo. of ObjectsNo. of Subjects
PAN [21]675K-++automatic-70
GAN [31]300K-+-synthetic--
FPHA [14]100K+ (23K frames)-+automatic26 (4 models)6
ObMan [18]150K++-synthetic2.7K20
Freihand [74]37K-++hybrid2735
HO-3D (ours)78K+++automatic1010
+ +Table 1: Comparison of hand+object datasets. + +a motion capture system made of magnetic sensors attached to the user's hand and to the object in order to obtain hand 3D pose annotations in RGB-D video sequences. However, this changes the appearance of the hand in the color images as the sensors and the tape attaching them are visible. + +Very recently, [18] introduced ObMan, a large dataset of images of hands grasping objects. The images in ObMan dataset are synthetic and the grasps are generated using an algorithm from robotics. Even more recently, [74] proposed a multi-view RGB dataset, FreiHAND, which includes hand-object interactions. However, the annotations are limited to the 3D poses and shapes of the hand. Further, [74] uses a human-in-the-loop method to obtain annotations from multiple RGB cameras in a green-screen background environment. Our method, on the other hand is fully automatic, capable of working even on a single RGBD-camera setup and does not make any assumption on the background. The objects in our dataset are also larger than those in FreiHAND, thus resulting in a more challenging scenario as the occlusions are larger. The annotation accuracy of our method is comparable to [74] as described in Section 6.1. + +As illustrated in Fig. 1 and Table 1, our HO-3D dataset is the first markerless dataset providing both 3D hand joints and 3D object pose annotations for real images, while the hand and the object are heavily occluded by each other. + +# 3. 3D Annotation Method + +We describe below our method for annotating a sequence $\mathcal{T} = \{\{(\mathrm{I}_c^t,\mathrm{D}_c^t)\}_{c = 1}^{N_C}\}_{i = 1}^{N_F}$ of $N_{C}\times N_{F}$ of RGB-D frames, captured by $N_{C}$ cameras. The sequence captures a hand interacting with an object. Each RGB-D frame is made of a color image $\mathrm{I}_c^t$ and a depth map $\mathrm{D}_c^t$ . + +We define the 3D hand and object poses in Section 3.1, and our general cost function in Section 3.2. We initialize the poses automatically and optimize the cost function in multiple stages as described in Sections 4.1 and 4.2. + +# 3.1. 3D Hand and Object Poses + +We aim to estimate the 3D poses $\mathcal{P} = \{(p_h^t,p_o^t)\}_{t = 1}^{N_F}$ for both the hand and the object in all the images of the sequence. We adopt the MANO hand model [50] and use the objects from the YCB-Video dataset [68] as their corresponding 3D models are available and of good quality. The MANO hand pose $\mathrm{p_h^t\in\mathbb{R}^{51}}$ consists of 45 DoF (3 DoF for each of the 15 finger joints) plus 6 DoF for rotation and + +translation of the wrist joint. The 15 joints together with the wrist joint form a kinematic tree with the wrist joint node as the first parent node. In addition to the pose parameters $\mathbf{p_h^t}$ , the hand model has shape parameters $\beta \in \mathbb{R}^{10}$ that are fixed for a given person and we follow a method similar to [56] to estimate these parameters. More details about the shape parameter estimation are provided in the supplementary material. The object pose $\mathbf{p_o^t} \in \mathrm{SE}(3)$ consists of 6 DoF for global rotation and translation. + +# 3.2. Cost Function + +We formulate the hand+object pose estimation as an energy minimization problem: + +$$ +\hat {\mathcal {P}} = \arg \min _ {\mathcal {P}} \sum_ {t = 1} ^ {N _ {F}} \left(E _ {\mathcal {D}} (\mathrm {p _ {h} ^ {t}}, \mathrm {p _ {o} ^ {t}}) + E _ {\mathcal {C}} (\mathrm {p _ {h} ^ {t}}, \mathrm {p _ {o} ^ {t}})\right), \quad (1) +$$ + +where $E_{\mathcal{D}}$ and $E_{\mathcal{C}}$ represent the energy from data terms and constraints, respectively. We define $E_{\mathcal{D}}$ as, + +$$ +\begin{array}{l} E _ {\mathcal {D}} \left(\mathrm {p} _ {\mathrm {h}} ^ {t}, \mathrm {p} _ {\mathrm {o}} ^ {t}\right) = \sum_ {c = 1} ^ {N _ {C}} \left(\alpha E _ {\text {m a s k}} \left(\mathrm {I} _ {c} ^ {t}, \mathrm {p} _ {\mathrm {h}} ^ {t}, \mathrm {p} _ {\mathrm {o}} ^ {t}\right) + \beta E _ {\text {d p t}} \left(\mathrm {D} _ {c} ^ {t}, \mathrm {p} _ {\mathrm {h}} ^ {t}, \mathrm {p} _ {\mathrm {o}} ^ {t}\right) + \right. \\ \left. \gamma E _ {\mathrm {j} 2 \mathrm {D}} \left(\mathrm {I} _ {c} ^ {t}, \mathrm {p} _ {\mathrm {h}} ^ {t}\right)\right) + \delta E _ {3 \mathrm {D}} \left(\left\{\mathrm {D} _ {c} ^ {t} \right\} _ {c = 1.. N _ {C}}, \mathrm {p} _ {\mathrm {h}} ^ {t}, \mathrm {p} _ {\mathrm {o}} ^ {t}\right), \tag {2} \\ \end{array} +$$ + +where $E_{\mathrm{mask}}(\cdot)$ is a silhouette discrepancy term, $E_{\mathrm{dpt}}(\cdot)$ a depth residual term, $E_{\mathrm{j2D}}(\cdot)$ a 2D error in hand joint locations, and $E_{\mathrm{3D}}(\cdot)$ a 3D distance term. This last term is not absolutely necessary, however, we observed that it significantly speeds up convergence. $\alpha, \beta, \gamma, \delta$ are weights. + +The constraints energy $E_{\mathcal{C}}$ is defined as, + +$$ +\begin{array}{l} E _ {\mathcal {C}} \left(\mathrm {p} _ {\mathrm {h}} ^ {t}, \mathrm {p} _ {\mathrm {o}} ^ {t}\right) = \epsilon E _ {\mathrm {j o i n t}} \left(\mathrm {p} _ {\mathrm {h}} ^ {t}\right) + \zeta E _ {\mathrm {p h y}} \left(\mathrm {p} _ {\mathrm {h}} ^ {t}, \mathrm {p} _ {\mathrm {o}} ^ {t}\right) + \\ \eta E _ {\mathrm {t c}} (\mathbf {p} _ {\mathrm {h}} ^ {t}, \mathbf {p} _ {\mathrm {o}} ^ {t}, \mathbf {p} _ {\mathrm {h}} ^ {t - 1}, \mathbf {p} _ {\mathrm {o}} ^ {t - 1}, \mathbf {p} _ {\mathrm {h}} ^ {t - 2}, \mathbf {p} _ {\mathrm {o}} ^ {t - 2}), (3) \\ \end{array} +$$ + +where $E_{\mathrm{joint}}(\cdot)$ denotes a prior on the hand pose to prevent unnatural poses, $E_{\mathrm{phy}}(\cdot)$ is a physical plausibility term ensuring the hand and the object do not interpenetrate, and $E_{\mathrm{tc}}(\cdot)$ is a temporal consistency term. The terms are weighted by parameters $\epsilon, \zeta$ and $\eta$ . + +We detail each of the terms in $E_{\mathcal{D}}$ and $E_{\mathcal{C}}$ below. For simplicity, we omit the frame index $t$ from our above notation except when necessary. + +Silhouette discrepancy term $E_{\mathrm{mask}}$ . The $E_{\mathrm{mask}}(\cdot)$ term compares the silhouettes of the hand and the object models rendered with the current estimated poses and their segmentation masks. We obtain a segmentation $S_{c}(\mathbf{I})$ of the hand and the object in the color image I of camera $c$ using DeepLabv3 [9] trained on images created by synthetically over-laying and under-laying images of hands on YCB objects. More details about this step are given in the supplementary material. The hand and object models are rendered on the camera plane using a differentiable renderer [19], + +which enables computing the derivatives of $E_{\mathrm{mask}}$ with respect to the pose parameters. The silhouette of the hand and object rendered on camera $c$ is denoted by $\mathrm{RS}_c(\mathfrak{p}_{\mathrm{h}},\mathfrak{p}_{\mathrm{o}})$ and the silhouette discrepancy is defined as, + +$$ +E _ {\text {m a s k}} \left(\mathrm {I} _ {c}, \mathrm {p} _ {\mathrm {h}}, \mathrm {p} _ {\mathrm {o}}\right) = \left\| \mathrm {R S} _ {c} \left(\mathrm {p} _ {\mathrm {h}}, \mathrm {p} _ {\mathrm {o}}\right) - S \left(\mathrm {I} _ {c}\right) \right\| ^ {2}. \tag {4} +$$ + +Depth residual term $E_{\mathrm{dpt}}$ . The depth residual term is similar to the segmentation discrepancy term: + +$$ +E _ {\mathrm {d p t}} \left(\mathrm {D} _ {c}, \mathrm {p} _ {\mathrm {h}}, \mathrm {p} _ {\mathrm {o}}\right) = \operatorname {T u k e y} \left(\left\| \mathrm {R D} _ {c} \left(\mathrm {p} _ {\mathrm {h}}, \mathrm {p} _ {\mathrm {o}}\right) - \mathrm {D} _ {c} \right\|\right), \tag {5} +$$ + +where $\mathrm{RD}_c(\mathfrak{p}_{\mathrm{h}},\mathfrak{p}_{\mathrm{o}})$ is the depth rendering of the hand and the object under their current estimated poses $\mathfrak{p}_{\mathrm{h}}$ and $\mathfrak{p}_{\mathrm{o}}$ . The Tukey function is a robust estimator that is similar to the $\ell_2$ loss close to 0, and constant after a threshold. It is useful to be robust to small deviations in the scale and shape of the hand and object models and also noise in the captured depth maps. $E_{\mathrm{dpt}}$ is differentiable as we employ a differentiable renderer [19] for rendering the depth maps. + +2D Joint error term $E_{\mathrm{j2D}}$ . The 2D joint error term is defined as, + +$$ +E _ {\mathrm {j 2 D}} \left(\mathrm {I} _ {c}, \mathrm {p} _ {\mathrm {h}}\right) = \sum_ {i = 1} ^ {2 1} \mathrm {h} [ i ] \left\| \operatorname {p r o j} _ {c} \left(\mathrm {J} _ {\mathrm {p} _ {\mathrm {h}}} [ i ]\right) - \mathrm {K} _ {c} [ i ] \right\| ^ {2}, \tag {6} +$$ + +where $\mathrm{J_{p_h}[i]}$ denotes the $i^{\mathrm{th}}$ 3D hand joint location under pose $\mathfrak{p}_{\mathrm{h}}$ , the $\mathrm{proj}_c(\cdot)$ operator projects it onto camera $c,$ $\mathrm{K}_c[i]$ is its predicted 2D location, and $\mathrm{h}[i]$ its confidence. The 21 hand joints in $E_{\mathrm{j2D}}(\cdot)$ consist of 15 finger joints, 5 finger tips, and the wrist joint. + +In practice, we take the $\mathrm{K}_c[i]$ as the locations of the maximum values of heatmaps, and the $\mathrm{h}[i]$ as the maximum values themselves. To predict these heatmaps, we trained a CNN based on the architecture of [66]. Training data come from an initial dataset [17] we created using a semiautomatic method. This dataset is made of 15,000 frames from 15 sequences in a single camera setup. We manually initialized the grasp pose and object pose for the first frame of each sequence. The manipulators were asked to maintain their grasp poses as rigid as possible to make the registration easier. We then ran the optimization stages for the single camera case described in Section 4.2. After optimization, we augmented the resulting dataset by scaling and rotating the images, and adding images from the Panoptic Studio dataset [67], which contain 3D annotations for hands. + +3D error term $E_{\mathbf{3D}}$ . This term is not absolutely necessary as the depth information from all the cameras is already exploited by $E_{\mathrm{dpt}}$ , however it accelerates the convergence by guiding the optimization towards the minimum even from far away. We build a point cloud P by merging the depth maps from the RGB-D cameras after transforming them to + +a common reference frame. More details on the point cloud reconstruction can be found in the supplementary material. + +We segment $\mathrm{P}$ into an object point cloud $\mathrm{P_o}$ and a hand point cloud $\mathrm{P_h}$ using the segmentation mask $S_{c}(\mathbf{I})$ in each camera image. At each iteration of the optimization, for each point $\mathrm{P_o}[j]$ of the object point cloud, we look for the closest vertex $\mathrm{V_o}[j^*]$ on the object mesh, and for each point $\mathrm{P_h}[k]$ of the hand point cloud, we look for the closest vertex $\mathrm{V_h}[k^*]$ on the hand mesh. $E_{3\mathrm{D}}(\mathrm{P},\mathrm{p_h},\mathrm{p_o})$ is then defined as, + +$$ +\sum_ {j} \left\| \mathrm {P} _ {\mathrm {o}} [ j ] - \mathrm {V} _ {\mathrm {o}} [ j ^ {*} ] \right\| ^ {2} + \sum_ {k} \left\| \mathrm {P} _ {\mathrm {h}} [ k ] - \mathrm {V} _ {\mathrm {h}} [ k ^ {*} ] \right\| ^ {2}. \tag {7} +$$ + +Joint angle constraint $E_{\mathrm{joint}}$ . This term imposes restrictions on the 15 joints of the hand to ensure the resulting pose is natural. The three-dimensional rotation of a joint is parameterized using the axis-angle representation in MANO model, resulting in 45 joint angle parameters. A common solution when using MANO model is to optimize in the PCA space of 3D joint angles with an $\ell_2$ regularizer [4,74] for pose coefficients. However, we observed in practice that optimizing Eq. 1 in PCA space had less expressibility: some of the complex grasp poses in our dataset could not be accurately expressed in the PCA space, which was constructed with relatively simpler grasp poses and free-hand gestures. Instead, we optimize on joint angles directly and derive our own limits for each of the 45 joint parameters (please refer to supplementary material for these limits). As in [72], the joint angle constraint term $E_{\mathrm{joint}}(\mathfrak{p}_{\mathrm{h}}^{t})$ is given by, + +$$ +\sum_ {i = 1} ^ {4 5} \max \left(\underline {{a _ {i}}} - a [ i ], 0\right) + \max \left(a [ i ] - \bar {a _ {i}}, 0\right), \tag {8} +$$ + +where $a[i]$ denotes the $i^{th}$ joint angle parameter for pose $\mathfrak{p}_{\mathrm{h}}$ and $\underline{a_i}$ and $\overline{a_i}$ correspond to its lower and upper limits. + +Physical plausibility term $E_{\mathrm{phy}}$ . During optimization, the hand model might penetrate the object model, which is physically not possible. To avoid this, we add a repulsion term that pushes the object and the hand apart if they interpenetrate each other. For each hand vertex $V_{\mathrm{h}}[m]$ , the amount of penetration $\Gamma[m]$ is taken as, + +$$ +\Gamma [ m ] = \max \left(- \mathbf {n} _ {\mathrm {o}} \left(\mathrm {V} _ {\mathrm {o}} [ m ^ {*} ]\right) ^ {T} \left(\mathrm {V} _ {\mathrm {h}} [ m ] - \mathrm {V} _ {\mathrm {o}} [ m ^ {*} ]\right), 0\right), \tag {9} +$$ + +where $\mathrm{V_o}[m^* ]$ is the vertex on object closest to hand vertex $\mathrm{V_h}[m]$ , and the $\mathbf{n}_{\mathrm{o}}(\cdot)$ operator provides the normal vector for a vertex. In words, the amount of penetration is estimated by projecting the vector joining a hand vertex and its nearest object vertex onto the normal vector at the object vertex location. The physical plausibility term is then defined as, + +$$ +E _ {\mathrm {p h y}} \left(\mathbf {p} _ {\mathrm {h}} ^ {t}, \mathbf {p} _ {\mathrm {o}} ^ {t}\right) = \sum_ {m} \exp (w \Gamma [ m ]). \tag {10} +$$ + +![](images/e4c9c8f575977316d8d1b03ae275eabfd486b63bc81c497d7382c5b6f597a0c9.jpg) +Figure 2: The different stages of the multi-camera and single camera setups. See Section 4 for more details. + +We use $w = 5$ in practice, and only a subsampled set of vertices of the hand to compute $E_{\mathrm{phy}}$ efficiently. + +Temporal consistency term $E_{\mathrm{tc}}$ . The previous terms are all applied to each frame independently. The temporal consistency term $E_{\mathrm{tc}}$ allows us to constrain together the poses for all the frames. We apply a 0-th and 1-st order motion model on both the hand and object poses: + +$$ +\begin{array}{l} E _ {\mathrm {t c}} \left(\mathbf {p} _ {\mathrm {h}} ^ {t}, \mathbf {p} _ {\mathrm {o}} ^ {t}, \mathbf {p} _ {\mathrm {h}} ^ {t - 1}, \mathbf {p} _ {\mathrm {o}} ^ {t - 1}, \mathbf {p} _ {\mathrm {h}} ^ {t - 2}, \mathbf {p} _ {\mathrm {o}} ^ {t - 2}\right) = \\ \| \Delta_ {h} ^ {t} \| ^ {2} + \| \Delta_ {o} ^ {t} \| ^ {2} + \| \Delta_ {h} ^ {t} - \Delta_ {h} ^ {t - 1} \| ^ {2} + \| \Delta_ {o} ^ {t} - \Delta_ {o} ^ {t - 1} \| ^ {2}, \\ \end{array} +$$ + +where $\Delta_h^t = \mathrm{p_h^t - p_h^{t - 1}}$ and $\Delta_o^t = \mathrm{p_o^t - p_o^{t - 1}}$ . Since we optimize a sum of these terms over the sequence, this effectively constrains all the poses together. + +# 4. Optimization + +Optimizing Eq. (1) is a challenging task, as it is a highly non-convex problem with many parameters to estimate. We therefore perform the optimization in multiple stages as shown in Fig. 2. These stages are different for multi-camera and single camera scenarios, and we detail them below. + +# 4.1. Multi-Camera Setup + +Initialization. In the multi-camera setup, we obtain a first estimate $\tilde{\mathbf{p}}_{\mathrm{h}}^{0}$ for the hand pose in the first frame $(t = 0)$ as, + +$$ +\tilde {\mathbf {p}} _ {\mathrm {h}} ^ {0} = \arg \min _ {\mathbf {p} _ {\mathrm {h}}} \sum_ {c = 1} ^ {N _ {C}} E _ {\mathrm {j 2 D}} \left(\mathbf {I} _ {c} ^ {0}, \mathbf {p} _ {\mathrm {h}}\right) + \nu E _ {\text {j o i n t}} \left(\mathbf {p} _ {\mathrm {h}}\right). \tag {11} +$$ + +We use the Dogleg optimizer [11] to perform this optimization. A first estimate $\tilde{\mathbf{p}}_0^0$ for the object pose in this frame is obtained using [46] trained by synthetically over-laying hands on YCB objects as explained in Section 3.2. + +Single-frame joint pose optimization. We then obtain estimates $\tilde{\mathfrak{p}}_{\mathrm{h}}^{t}$ and $\tilde{\mathfrak{p}}_{\mathrm{o}}^{t}$ for all the other frames ( $t = 1..N_F$ ) + +by tracking. We minimize $\left(E_{\mathcal{D}}(\mathfrak{p}_{\mathrm{h}}^{t},\mathfrak{p}_{\mathrm{o}}^{t}) + E_{\mathcal{C}}(\mathfrak{p}_{\mathrm{h}}^{t},\mathfrak{p}_{\mathrm{o}}^{t})\right)$ w.r.t. $\mathfrak{p}_{\mathrm{h}}^{t}$ and $\mathfrak{p}_{\mathrm{o}}^{t}$ , using $\tilde{\mathfrak{p}}_{\mathrm{h}}^{t - 1}$ and $\tilde{\mathfrak{p}}_{\mathrm{o}}^{t - 1}$ for initialization. + +Multi-frame joint pose optimization. We finally perform a full optimization of Eq. (1) w.r.t. $\mathfrak{p}_{\mathrm{h}}^{t}$ and $\mathfrak{p}_{\mathrm{o}}^{t}$ for $t = 0..N_{F}$ over all the frames simultaneously using estimates $\tilde{\mathfrak{p}}_{\mathrm{h}}^{t}$ and $\tilde{\mathfrak{p}}_{\mathrm{o}}^{t}$ for initialization. Due to memory constraints, we optimize Eq. (1) in batches instead of considering all the frames in sequence. We use a batch size of 20 frames with $\alpha = 20$ , $\beta = 20$ , $\gamma = 5 \times 10^{-5}$ , $\delta = 50$ , $\epsilon = 100$ , $\zeta = 50$ , and $\eta = 100$ , and the Adam optimizer with learning rate of 0.01 for 100 iterations. + +# 4.2. Single-Camera Setup + +Initialization. In the single camera setup, as we assume that the grasp pose varies marginally across the sequence, we initially make the assumption that it remains constant throughout the sequence. In order to account for the minor changes which occur in practice, we relax this assumption in the latter stages of the optimization. We thus obtain initial estimates $\tilde{\mathbf{p}}_{\mathrm{h}}^{t}$ for the hand poses as, + +$$ +\left\{\tilde {\mathrm {p}} _ {\mathrm {h}} ^ {t} \right\} _ {t} = \arg \min _ {\left\{\mathrm {p} _ {\mathrm {h}} ^ {t} \right\} _ {t}} \sum_ {t} E _ {\mathrm {j 2 D}} \left(\mathrm {I} ^ {t}, \mathrm {p} _ {\mathrm {h}} ^ {t}\right) + \nu E _ {\text {j o i n t}} \left(\mathrm {p} _ {\mathrm {h}} ^ {t}\right), \tag {12} +$$ + +where the joint angle parameters are constrained to be the same over all the frames, and only the rotation and translation parameters for the wrist joint can be different. In practice, we perform this optimization only over a random subset $\Omega$ of the frames to save time. We set $\nu = 50$ , size of $\Omega$ to 20 and use the Dogleg optimizer [11]. First estimates $\tilde{\mathbf{p}}_{\mathrm{o}}^{t}$ for the object poses in $\Omega$ are obtained as for the multi-camera setup. + +From the $\tilde{\mathfrak{p}}_{\mathrm{h}}^{t}$ and the $\tilde{\mathfrak{p}}_{\mathrm{o}}^{t}$ , we can compute the grasp pose in the object coordinate system $\tilde{\mathfrak{p}}_{\mathrm{h:o}}^{t}$ , which is assumed to be constant at this stage. The initial estimate of the constant grasp pose $\tilde{\mathfrak{p}}_{\mathrm{h:o}}$ is taken as the average of $\{\tilde{\mathfrak{p}}_{\mathrm{h:o}}^{t}\}_{t\in \Omega}$ . + +Grasp pose estimation. We obtain a better estimate of the grasp pose $\hat{\mathfrak{p}}_{\mathrm{h:0}}$ and object poses $\hat{\mathfrak{p}}_0^t$ under fixed grasp pose assumption as, + +$$ +\begin{array}{l} \hat {\mathbf {p}} _ {\mathrm {h : o}}, \{\hat {\mathbf {p}} _ {\mathrm {o}} ^ {t} \} _ {t \in \Omega} = \arg \min _ {\mathbf {p} _ {\mathrm {h : o}}, \left\{\mathbf {p} _ {\mathrm {o}} ^ {t} \right\} _ {t \in \Omega}} \sum_ {t \in \Omega} E _ {\mathcal {D}} \left(f _ {\mathbf {p} _ {\mathrm {o}} ^ {t}} \left(\mathbf {p} _ {\mathrm {h : o}}\right), \mathbf {p} _ {\mathrm {o}} ^ {t}\right) + \\ \zeta E _ {\text {p h y}} \left(f _ {\mathrm {p} _ {\mathrm {o}} ^ {t}} \left(\mathrm {p} _ {\mathrm {h}: \mathrm {o}}\right), \mathrm {p} _ {\mathrm {o}} ^ {t}\right) + \epsilon E _ {\text {j o i n t}} \left(\mathrm {p} _ {\mathrm {h}: \mathrm {o}}\right), \tag {13} \\ \end{array} +$$ + +wrt $\mathfrak{p}_{\mathrm{h:0}}$ and $\mathfrak{p}_{\mathrm{o}}^{t}$ over the frames in $\Omega$ , using $\tilde{\mathfrak{p}}_{\mathrm{h:0}}$ and $\tilde{\mathfrak{p}}_{\mathrm{o}}^{t}$ for initialization. $f_{\mathrm{P_o^t}}(\cdot)$ converts the grasp pose to the hand pose in the world coordinate system given object pose $\mathfrak{p}_{\mathrm{o}}^{t}$ . This optimization accounts for the mutual occlusions between hand and object. + +Object pose estimation. Having a good estimate $\hat{\mathfrak{p}}_{\mathrm{h};0}$ for the grasp pose, we obtain object pose estimates $\hat{\mathbf{p}}_o^t$ for all the frames by minimizing $E_{\mathcal{D}}\big(f_{\mathsf{p}_{\mathrm{o}}^{t}}(\tilde{\mathfrak{p}}_{\mathrm{h};0}),\mathfrak{p}_{\mathrm{o}}^{t}\big)$ wrt $\mathfrak{p}_0^t$ over each frame independently. We use $\hat{\mathbf{p}}_o^{t - 1}$ to initialize the optimization over $\mathfrak{p}_o^t$ at frame $t$ except for $\hat{\mathbf{p}}_o^0$ where $\tilde{\mathfrak{p}}_o^0$ is used. Note that the hand pose is not optimized in this stage. + +Multi-frame joint hand+object pose refinement. In this final stage, we allow variations in the grasp pose across frames and introduce temporal constraints. We thus optimize Eq. (1) w.r.t. $\left\{\left(\mathfrak{p}_{\mathrm{h}}^{t},\mathfrak{p}_{\mathrm{o}}^{t}\right)\right\}_{t = 1}^{N_{F}}$ over all the frames simultaneously, using pose parameters $\hat{\mathbf{p}}_o^t,\hat{\mathbf{p}}_h^t = f_{\hat{\mathbf{p}}_o^t}(\hat{\mathbf{p}}_{\mathrm{h};0})$ estimated in the previous stages as initialization for $\mathfrak{p}_0^t$ and $\mathfrak{p}_{\mathrm{h}}^{t}$ . + +# 5. Monocular RGB based 3D Hand Pose + +For establishing a baseline on our proposed dataset for single RGB image based hand pose prediction, we use a CNN architecture based on a Convolutional Pose Machine (CPM) [66] to predict the 2D hand joint locations $\{\mathrm{k}_i\}_{i = 1..21}$ . In addition, we also predict the root-relative hand joint directions $\{\mathrm{d}_i\}_{i = 1..20}$ , by adding an additional stage at the end of the CPM and replacing the last layer with a fully connected layer. More details on the architecture are provided in the supplementary material. The 3D joint locations and shape parameters of the hand are then obtained by fitting a MANO model to these predictions. The loss function for this fitting procedure is: + +$$ +\sum_ {i = 1} ^ {2 1} \left\| \hat {\mathbf {k}} _ {i} - \mathbf {k} _ {i} \right\| ^ {2} + \rho \sum_ {i = 1} ^ {2 0} \left(1 - \hat {\mathrm {d}} _ {i} \cdot \mathrm {d} _ {i}\right) + \sigma E _ {\text {j o i n t}} \left(\mathrm {p} _ {\mathrm {h}}\right) + \tau \| \boldsymbol {\beta} \| ^ {2}, \tag {14} +$$ + +where $\hat{\mathrm{d}}_i = \frac{\mathrm{p_h}[i + 1] - \mathrm{p_h}[1]}{\|\mathrm{p_h}[i + 1] - \mathrm{p_h}[1]\|}$ , $\hat{k}_i = \operatorname{proj}\left(\mathrm{J}_{\mathrm{p_h}}[i]\right)$ and $E_{\mathrm{joint}}$ is defined in Eq. (8). We use $\rho = 10$ , $\sigma = 5$ , and $\tau = 1$ . + +# 6. Benchmarking HO-3D + +In this section, we evaluate both our annotation method and our baseline for hand pose prediction from a single color image in hand+object interaction scenarios. We used + +our 3D pose annotation method to annotate 68 sequences, totalling 77,558 frames of 10 different users manipulating one among 10 different objects from the YCB dataset. The image sizes are $640 \times 480$ pixels for both the color and depth cameras, and we used 5 synchronized cameras in our multicamera setup. The cameras were synchronized with an accuracy of 5ms. + +# 6.1. Evaluation of the Annotation Method + +For validating the accuracy of our annotation method, we manually annotated the 3D locations of the 3D joints in randomly selected frames of a sequence, by relying on the consolidated point cloud from the 5 cameras. We then compared these locations to the ones predicted with our method (explained in Section 4.1) using the multi-camera setup. + +As shown in the last column of Table 2, our method achieves an average joint error accuracy of lower than $8\mathrm{mm}$ on average, with an Area Under the Curve metric (AUC) of 0.79. This metric is comparable with the results reported for the recent FreiHAND dataset [74] (AUC=0.791). Note that the occlusions in our dataset are higher due to larger objects and that we do not use green screens. + +To analyze the influence of the different terms in Eq. (1), we run the optimization of Eq. (1) by enabling only a subset of these terms, and report the results in Table 2. While $E_{\mathrm{silh}}$ and $E_{\mathrm{dpt}}$ terms alone cannot provide good pose estimates, together they provide better estimates as it leads to a loss function with less local minima. The $E_{3\mathrm{D}}$ term provides a minor improvement in estimates but speeds up the convergence. Though the physical plausibility term $E_{\mathrm{phy}}$ does not help in improving the pose estimates, it results in more natural grasps. The last two columns show the effect of multi-frame based joint optimization compared to single-frame based optimization when all the terms are considered. The multi-frame multi-camera based optimization over all the terms improves the accuracy by about $15\%$ . + +The accuracy of the single camera based annotation method is calculated by considering the annotations from the multi-camera method as ground truth for a given sequence. More specifically, for a sequence of 1000 frames, we compute the average difference between hand+object mesh vertices obtained from single and multi-camera setups. Further, we calculate the accuracy after each stage of the single-camera setup. The results are given in Table 3. The estimated poses with these two methods are consistent with each other with an average mesh error of $0.77\mathrm{cm}$ and $0.45\mathrm{cm}$ for hand and object, respectively. The final refinement stage yields a $15\%$ improvement in accuracy. + +# 6.2. Evaluation of Hand Pose Prediction Method + +We trained our single frame hand pose prediction method explained in Section 5 on 66,034 frames from our HO-3D dataset. We evaluated it on a test set of 13 sequences cap + +
TermsInitializationSingle-frame OptimizationMulti-frame Opt. (Eq. 1)
EsilhEdptEsilh + EdptEsilh + Edpt + E3DEsilh + Edpt + E3D + EphyEsilh + Edpt + E3D + Ephy + Ec0.77 (±0.29)
mean (std)4.20 (±3.32)1.17 (±1.12)2.22 (±1.22)1.04 (±0.43)0.98 (±0.40)0.99 (±0.40)0.92 (±0.34)
+ +Table 2: Evaluation of the accuracy for the multi-camera setup. We report the average hand-joint errors (in cm) for different combinations of the terms in Eq. (1). The final error is comparable to the recent FreiHAND dataset [74]. + +
StagesInit.Grasp Pose Est.Object Pose Est.Refinement
Hand5.403.600.910.77
Object4.024.020.520.45
+ +Table 3: Evaluation of the accuracy for the single-camera setup. The accuracy (average mesh error in cm) is measured at each stage of optimization by comparing with the annotations from multi-camera setup. The results show that the annotation quality of our single camera method is similar to that of the multi-camera setup. + +
MethodMesh Error↓F@5mm↑F@15mm↑Joint Error↓
Joints2D1.140.490.933.14
Joints2D + Dir. Vec.1.060.510.943.04
[18]1.300.420.908.31
+ +Table 4: Evaluation of different methods for single frame hand pose prediction. The Mesh Error (in cm) and $F$ -score are obtained after aligning the predicted meshes with ground truth meshes. The Mean joint error (in cm) is obtained after aligning the position of the root joint and overall scale with the ground truth. Hand pose prediction using joint direction predictions along with 2D joint predictions provides better accuracy than directly predicting the MANO parameters as in [18]. + +tured from different viewpoints and totaling 11,524 frames. The test set sequences also contain subjects and objects not present in the training set. + +We report three different metrics from previous works: Mean joint position error after aligning the position of the root joint and global scale with ground truth [73]; Mesh error measuring the average Euclidean distance between predicted and ground truth mesh vertices [74]; and the $F$ -score [74], defined as the harmonic mean between recall and precision between two meshes given a distance threshold. The mesh error and $F$ -score are obtained after aligning the predicted meshes using Procrustes alignment with the ground truth meshes and hence does not measure the accuracy of wrist joint rotation. The mean joint error on the other hand considers wrist joint location as the 3D points are not rotated before evaluation. + +To understand the effect of joint direction predictions on the overall accuracy, we evaluate the results of the MANO fitting by dropping the second term in Eq. (14). We also compare our results with the hand branch of [18], a very recent work that predicts the MANO pose and shape parameters directly from a single RGB image, retrained on our dataset. As shown in Table 4, predicting joint directions along with 2D joint locations significantly improves + +![](images/f99b8c1f67e06db7486e76eb004112f251c703e082d27719cffdd9b9976ad7b5.jpg) +Figure 3: Qualitative results of our single color image hand pose estimation method. It can recover hand poses even when the hand is heavily occluded by objects and in cluttered scenes. The last row shows it can handle unseen objects. + +the hand pose estimation accuracy. It can also be inferred that predicting 2D hand joint locations and fitting MANO model to them is more accurate than direct MANO parameter predictions as in [18]. Qualitative results are shown in Fig. 3. The last row shows that our method robustly predicts hand poses even when interacting with unknown objects. + +# 7. Conclusion + +We introduced a fully automatic method to annotate images of a hand manipulating an object with their 3D poses, even under large occlusions, by exploiting temporal consistency. We also introduced the first markerless dataset of color images for benchmarking 3D hand+object pose estimation. To demonstrate the usefulness of our dataset, we proposed a method for predicting the 3D pose of the hand from a single color image. Another future application is the joint estimation of hand+object poses from a single RGB frame. + +The lack of high quality segmentations (we had to use a synthetic dataset as explained in Section 3) of the hand sometimes affects accuracy. Improving these segmentations and/or introducing a attraction term and physics constraints as in [52,61] would further improve our annotations. + +# 8. Acknowledgment + +This work was supported by the Christian Doppler Laboratory for Semantic 3D Computer Vision, funded in part by Qualcomm Inc. + +# References + +[1] YCB Benchmarks - Object and Model Set. http://ycbbbenchmarks.org/. 2 +[2] Luca Ballan, Aparna Taneja, Jürgen Gall, Luc Van Gool, and Marc Pollefeys. Motion capture of hands in action using discriminative salient points. In European Conference on Computer Vision (ECCV), pages 640-653, Firenze, October 2012. 3 +[3] Sven Bambach, Stefan Lee, David J. Crandall, and Chen Yu. Lending a Hand: Detecting Hands and Recognizing Activities in Complex Egocentric Interactions. In The IEEE International Conference on Computer Vision (ICCV), pages 1949-1957, 2015. 3 +[4] Adnane Boukhayma, Rodrigo de Bem, and Philip HS Torr. 3d hand shape and pose from images in the wild. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 10843-10852, 2019. 5 +[5] Anders Glent Buch, Lilita Kiforenko, and Dirk Kraft. Rotational subgroup voting and pose clustering for robust 3d object recognition. In The IEEE International Conference On Computer Vision (ICCV), pages 4137-4145, United States, 2017. 2 +[6] Ian M. Bullock, Thomas Feix, and Aaron M. Dollar. The Yale Human Grasping Dataset: Grasp, Object, and Task Data in Household and Machine Shop Environments. The International Journal of Robotics Research, 34(3):251-255, 2015. 3 +[7] Minjie Cai, Kris M. Kitani, and Yoichi Sato. A Scalable Approach for Understanding the Visual Structures of Hand Grasps. In The IEEE International Conference on Robotics and Automation (ICRA), 2015. 3 +[8] Qixin Cao and Haoruo Zhang. Combined Holistic and Local Patches for Recovering 6D Object Pose. In The IEEE International Conference on Computer Vision (ICCV), pages 2219-2227, 2017. 2 +[9] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking Atrous Convolution for Semantic Image Segmentation. CoRR, abs/1706.05587, 2017. 4 +[10] Chiho Choi, Sang Ho Yoon, Chin-Ning Chen, and Karthik Ramani. Robust Hand Pose Estimation During the Interaction with an Unknown Object. In The IEEE International Conference on Computer Vision (ICCV), pages 3142-3151, 2017. 3 +[11] Andrew R. Conn, Nicholas I. M. Gould, and Philippe L. Toint. Trust-Region Methods. SIAM, 2000. 6 +[12] Martin de La Gorce, David J. Fleet, and Nikos Paragios. Model-Based 3D Hand Pose Estimation from Monocular Video. IEEE Trans. Pattern Anal. Mach. Intell.(PAMI), 33(9):1793-1805, 2011. 2 +[13] Alireza Fathi, Xiaofeng Ren, and James M. Rehg. Learning to Recognize Objects in Egocentric Activities. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3281-3288, 2011. 3 +[14] 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 The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 409-419, 2018. 1, 2, 3, 4 + +[15] Liuhao Ge, Yujun Cai, Junwu Weng, and Junsong Yuan. Hand PointNet: 3D Hand Pose Estimation Using Point Sets. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8417-8426, 2018. 2 +[16] Duncan Goudie and Aphrodite Galata. 3D Hand-Object Pose Estimation from Depth with Convolutional Neural Networks. In IEEE International Conference on Automatic Face & Gesture Recognition, 2017. 3 +[17] Shreyas Hampali, Markus Oberweger, Mahdi Rad, and Vincent Lepetit. HO-3D: a Multi-User, Multi-Object Dataset for Joint 3D Hand-Object Pose Estimation. CoRR, abs/1907.01481, 2019. 5 +[18] 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 The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 11807-11816, 2019. 1, 2, 3, 4, 8 +[19] Paul Henderson and Vittorio Ferrari. Learning Single-Image 3D Reconstruction by Generative Modelling of Shape, Pose and Shading. International Journal of Computer Vision (IJCV), pages 1573–1405, 2019. 4, 5 +[20] Yinlin Hu, Joachim Hugonot, Pascal Fua, and Mathieu Salzmann. Segmentation-Driven 6d Object Pose Estimation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3385–3394, 2019. 2 +[21] Hanbyul Joo, Tomas Simon, and Yaser Sheikh. Total Capture: A 3D Deformation Model for Tracking Faces, Hands, and Bodies. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8320-8329, 2018. 3, 4 +[22] 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 (ECCV), pages 205-220, 2016. 2 +[23] Cem Keskin, Furkan Kiraç, Yunus Emre Kara, and Lale Akarun. Hand Pose Estimation and Hand Shape Classification Using Multi-Layered Randomized Decision Forests. In European Conference on Computer Vision (ECCV), pages 852-863, 2012. 2 +[24] Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In The International Conference on Learning Representations (ICLR), 2015. 2 +[25] Mia Kokic, Danica Kragic, and Jeannette Bohg. Learning to Estimate Pose and Shape of Hand-Held Objects from RGB Images. In The IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 3980-3987, 11 2019. 3 +[26] Nikolaos Kyriazis and Antonis A. Argyros. Physically Plausible 3D Scene Tracking: The Single Actor Hypothesis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013. 1, 3 +[27] Nikolaos Kyriazis and Antonis A. Argyros. Scalable 3D Tracking of Multiple Interacting Objects. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 3 + +[28] Stan Melax, Leonid Keselman, and Sterling Orsten. Dynamics Based 3D Skeletal Hand Tracking. In Proceedings of Graphics Interface, 2013. 2 +[29] Andrew T. Miller and Peter K. Allen. Graspit! a Versatile Simulator for Robotic Grasping. Robotics Automation Magazine, pages 110-122, 2004. 1 +[30] Chaitanya Mitash, Abdeslam Boularias, and Kostas E. Bekris. Improving 6D Pose Estimation of Objects in Clutter via Physics-Aware Monte Carlo Tree Search. In The IEEE International Conference on Robotics and Automation (ICRA), pages 1-8, 2018. 2 +[31] Franziska Mueller, Florian Bernard, Oleksandr Sotnychenko, Dushyant Mehta, Srinath Sridhar, Dan Casas, and Christian Theobalt. *Ganerated Hands for Real-Time 3D Hand Tracking from Monocular RGB*. In *The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, pages 49-59, 2018. 1, 2, 3, 4 +[32] Franziska Mueller, Dushyant Mehta, Oleksandr Sotnychenko, Srinath Sridhar, Dan Casas, and Christian Theobalt. Real-Time Hand Tracking Under Occlusion from an Egocentric RGB-D Sensor. In The IEEE International Conference on Computer Vision (ICCV), 2017. 1, 2, 3 +[33] Battushig Myanganbayar, Cristina Mata, Gil Dekel, Boris Katz, Guy Ben-Yosef, and Andrei Barbu. Partially Occluded Hands: A Challenging New Dataset for Single-Image Hand Pose Estimation. In The Asian Conference on Computer Vision (ACCV), pages 85–98, 2018. 3 +[34] Natalia Neverova, Christian Wolf, Florian Nebout, and Graham W. Taylor. Hand Pose Estimation through Semi-Supervised and Weakly-Supervised Learning. Comput. Vis. Image Underst. (CVIU), 164:56-67, 2017. 2 +[35] Markus Oberweger and Vincent Lepetit. DeepPrior++: Improving Fast and Accurate 3D Hand Pose Estimation. In The IEEE International Conference on Computer Vision Workshops (ICCV), pages 585-594, 2017. 1, 2 +[36] Markus Oberweger, Mahdi Rad, and Vincent Lepetit. Making Deep Heatmaps Robust to Partial Occlusions for 3D Object Pose Estimation. In European Conference on Computer Vision (ECCV), pages 125-141, 2018. 2 +[37] Markus Oberweger, Gernot Riegler, Paul Wohlhart, and Vincent Lepetit. Efficiently Creating 3D Training Data for Fine Hand Pose Estimation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4957-4965, 2016. 1 +[38] Iasonas Oikonomidis, Nikolaos Kyriazis, and Antonis A. Argyros. Full DoF Tracking of a Hand Interacting with an Object by Modeling Occlusions and Physical Constraints. In The IEEE International Conference on Computer Vision (ICCV), pages 2088-2095, 2011. 3 +[39] Paschalis Panteleris, Nikolaos Kyriazis, and Antonis A. Argyros. 3D Tracking of Human Hands in Interaction with Unknown Objects. In Proceedings of the British Machine Vision Conference 2015 (BMVC), pages 123.1-123.12, 2015. 3 +[40] Paschalis Panteleris, Iason Oikonomidis, and Antonis A. Argyros. Using a Single RGB Frame for Real Time 3D Hand Pose Estimation in the Wild. In The IEEE Winter Conference on Applications of Computer Vision (WACV), pages 436-445, 2018. 2 + +[41] Sida Peng, Yuan Liu, Qixing Huang, Xiaowei Zhou, and Hu-jun Bao. Pvnet: Pixel-Wise Voting Network for 6DoF Pose Estimation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4561-4570, 2019. 2 +[42] Tu-Hoa Pham, Nikolaos Kyriazis, Antonis A. Argyros, and Abderrahmane Kheddar. Hand-Object Contact Force Estimation from Markerless Visual Tracking. IEEE Trans. Pattern Anal. Mach. Intell. (PAMI), 40(12):2883-2896, 2018. 3 +[43] Tu-Hoa Pham, Abderrahmane Kheddar, Ammar Qammaz, and Antonis A. Argyros. Capturing and Reproducing Hand-Object Interactions through Vision-Based Force Sensing. In Object Understanding for Interaction, 2015. 3 +[44] 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 The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 3 +[45] Chen Qian, Xiao Sun, Yichen Wei, Xiaou Tang, and Jian Sun. Realtime and Robust Hand Tracking from Depth. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 1, 2 +[46] Mahdi Rad and Vincent Lepetit. BB8: A Scalable, Accurate, Robust to Partial Occlusion Method for Predicting the 3D Poses of Challenging Objects Without Using Depth. In The IEEE International Conference on Computer Vision (ICCV), 2017. 1, 6 +[47] Mahdi Rad, Markus Oberweger, and Vincent Lepetit. Domain Transfer for 3D Pose Estimation from Color Images Without Manual Annotations. In The Asian Conference on Computer Vision (ACCV), 2018. 1, 3 +[48] Grégory Rogez, James Steven Supancic III, and Deva Ramanan. Understanding Everyday Hands in Action from RGB-D Images. In The IEEE International Conference on Computer Vision (ICCV), 2015. 3 +[49] Grégory Rogez, Maryam Khademi, James Steven Supancic III, J. M. M. Montiel, and Deva Ramanan. 3D Hand Pose Detection in Egocentric RGB-D Images. In European Conference on Computer Vision (ECCV), 2014. 3 +[50] Javier Romero, Dimitrios Tzionas, and Michael J. Black. Embodied Hands: Modeling and Capturing Hands and Bodies Together. ACM Trans. Graph., 36(6):245, 2017. 2, 4 +[51] Toby Sharp, Cem Keskin, Duncan P. Robertson, Jonathan Taylor, Jamie Shotton, David Kim, Christoph Rhemann, Ido Leichter, Alon Vinnikov, Yichen Wei, Daniel Freedman, Pushmeet Kohli, Eyal Krupka, Andrew W. Fitzgibbon, and Shahram Izadi. Accurate, Robust, and Flexible Real-Time Hand Tracking. In Proceedings of the 33rd Annual ACM Conference on Human Factors in Computing Systems, CHI, pages 3633-3642, 2015. 2 +[52] 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 European Conference on Computer Vision (ECCV), volume 9906, pages 294-310, 2016. 1, 2, 3, 8 +[53] Srinath Sridhar, Antti Oulasvirta, and Christian Theobalt. Interactive Markerless Articulated Hand Motion Tracking Using RGB and Depth Data. In The IEEE International Conference on Computer Vision (ICCV), pages 2456-2463, 2013. 2 + +[54] Xiao Sun, Yichen Wei, Shuang Liang, Xiaou Tang, and Jian Sun. Cascaded Hand Pose Regression. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 824-832, 2015. 1 +[55] Martin Sundermeyer, Zoltan-Csaba Marton, Maximilian Durner, Manuel Brucker, and Rudolph Triebel. Implicit 3D Orientation Learning for 6D Object Detection from RGB Images. In European Conference on Computer Vision (ECCV), pages 712-729, 2018. 1 +[56] David Joseph Tan, Thomas J. Cashman, Jonathan Taylor, Andrew W. Fitzgibbon, Daniel Tarlow, Sameh Khamis, Shahram Izadi, and Jamie Shotton. Fits Like a Glove: Rapid and Reliable Hand Shape Personalization. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5610-5619, June 2016. 4 +[57] Danhang Tang, Hyung Jin Chang, Alykhan Tejani, and Tae-Kyun Kim. Latent Regression Forest: Structured Estimation of 3D Articulated Hand Posture. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3786-3793, 2014. 1 +[58] Bugra Tekin, Federica Bogo, and Marc Pollefeys. $\mathrm{H} + \mathrm{O}$ : Unified Egocentric Recognition of 3D Hand-Object Poses and Interactions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4511–4520, 2019. 3 +[59] Jonathan Thompson, Murphy Stein, Yann LeCun, and Ken Perlin. Real-Time Continuous Pose Recovery of Human Hands Using Convolutional Networks. ACM Trans. Graph., 33:169:1-169:10, 2014. 2 +[60] Aggeliki Tsoli and Antonis A. Argyros. Joint 3D Tracking of a Deformable Object in Interaction with a Hand. In European Conference on Computer Vision (ECCV), pages 504-520, 2018. 3 +[61] Dimitrios Tzionas, Luca Ballan, Abhilash Srikantha, Pablo Aponte, Marc Pollefeys, and Juergen Gall. Capturing Hands in Action Using Discriminative Salient Points and Physics Simulation. International Journal of Computer Vision (IJCV), 118(2):172-193, 2016. 1, 3, 8 +[62] Dimitrios Tzionas and Juergen Gall. 3D Object Reconstruction from Hand-Object Interactions. In The IEEE International Conference on Computer Vision (ICCV), pages 729–737, 2015. 3 +[63] Dimitrios Tzionas, Abhilash Srikantha, Pablo Aponte, and Juergen Gall. Capturing Hand Motion with an RGB-D Sensor, Fusing a Generative Model with Salient Points. In German Conference on Pattern Recognition (GCPR), pages 277-289, 2014. 2, 3 +[64] Chengde Wan, Thomas Probst, Luc Van Gool, and Angela Yao. Self-Supervised 3D Hand Pose Estimation through Training by Fitting. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 10853-10862, June 2019. 3 +[65] Robert Y. Wang, Sylvain Paris, and Jovan Popovic. 6D Hands: Markerless Hand-Tracking for Computer Aided Design. In ACM Symposium on User Interface Software and Technology, pages 549–558, 2011. 3 +[66] Shih-En Wei, Varun Ramakrishna, Takeo Kanade, and Yaser Sheikh. Convolutional Pose Machines. In The IEEE Confer + +ence on Computer Vision and Pattern Recognition (CVPR), pages 4724-4732, 2016. 5, 7 +[67] Donglai Xiang, Hanbyul Joo, and Yaser Sheikh. Monocular Total Capture: Posing Face, Body, and Hands in the Wild. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 10965-10974, 2019. 5 +[68] 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 XIV (RSS), 2018. 2, 4 +[69] Chi Xu, Lakshmi Narasimhan Govindarajan, Yu Zhang, and Li Cheng. Lie-X: Depth Image Based Articulated Object Pose Estimation, Tracking, and Action Recognition on Lie Groups. International Journal of Computer Vision (IJCV), 123:454-478, 2017. 2 +[70] Qi Ye, Shanxin Yuan, and Tae-Kyun Kim. Spatial Attention Deep Net with Partial PSO for Hierarchical Hybrid Hand Pose Estimation. In European Conference on Computer Vision (ECCV), pages 346-361, 2016. 2 +[71] Shanxin Yuan, Qi Ye, Bjorn Stenger, Siddhant Jain, and Tae-Kyun Kim. Big Hand 2.2m Benchmark: Hand Pose Data Set and State of the Art Analysis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 1 +[72] Xingyi Zhou, Qingfu Wan, Wei Zhang, Xiangyang Xue, and Yichen Wei. Model-based deep hand pose estimation. In The International Joint Conference on Artificial Intelligence (IJCAI), pages 2421-2427, 2016. 5 +[73] Christian Zimmermann and Thomas Brox. Learning to Estimate 3D Hand Pose from Single RGB Images. In The IEEE International Conference on Computer Vision (ICCV), pages 4913-4921, 2017. 1, 2, 3, 8 +[74] Christian Zimmermann, Duygu Ceylan, Jimei Yang, Bryan C. Russell, Max J. Argus, and Thomas Brox. FreiHAND: A Dataset for Markerless Capture of Hand Pose and Shape from Single RGB Images. In The IEEE International Conference on Computer Vision (ICCV), pages 813-822, 2019. 1, 2, 4, 5, 7, 8 \ No newline at end of file diff --git a/honnotateamethodfor3dannotationofhandandobjectposes/images.zip b/honnotateamethodfor3dannotationofhandandobjectposes/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..58513847fb36a126ab2f3cafa92ed6f5ac31e975 --- /dev/null +++ b/honnotateamethodfor3dannotationofhandandobjectposes/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b324336691038b9040800afad2df185fd500be44af22ec2f91041c5dc322416b +size 418182 diff --git a/honnotateamethodfor3dannotationofhandandobjectposes/layout.json b/honnotateamethodfor3dannotationofhandandobjectposes/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..cbbf3e98b0ad21965f05a2b7fc0719ea37c4921d --- /dev/null +++ b/honnotateamethodfor3dannotationofhandandobjectposes/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21938364fae07f897acb4121d482b4254648eee350d4118c91c55545f16df293 +size 523771 diff --git a/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_content_list.json b/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ffb3b8a7912c93ddeb8bc156eae39209cc36c883 --- /dev/null +++ b/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ff387bc4536be33ef7857624c14e25f35915952a706b4b919f1df33c5511953 +size 74987 diff --git a/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_model.json b/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..24b10216a4bf3f2fa5a60696be036f46dfb37131 --- /dev/null +++ b/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:089f951dbd393492545c585847198906de9dce2dcf120dfc5cdddf396a6f44e9 +size 87149 diff --git a/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_origin.pdf b/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..836165839b258e0671f43d579344373210c9bdfc --- /dev/null +++ b/hopenetagraphbasedmodelforhandobjectposeestimation/ed698567-3f6d-4cae-91c0-e49c8556aee1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd1f5d956dfd684638787a370fdfac2ad7c4b83e234ca7115e72b162ce2f89aa +size 870666 diff --git a/hopenetagraphbasedmodelforhandobjectposeestimation/full.md b/hopenetagraphbasedmodelforhandobjectposeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..da5c1505cb0456d06ffd56a616794f7d297a045f --- /dev/null +++ b/hopenetagraphbasedmodelforhandobjectposeestimation/full.md @@ -0,0 +1,345 @@ +# HOPE-Net: A Graph-based Model for Hand-Object Pose Estimation + +Bardia Doosti + +Shujon Naha + +Majid Mirbagheri2 + +David J. Crandall1 + +1 Luddy School of Informatics, Computing, and Engineering, Indiana University Bloomington + +{bdoosti, snaha, djcran}@indiana.edu + +$^{2}$ Institute for Learning and Brain Sciences, University of Washington + +mbagheri@uw.edu + +Project Page: http://vision.sice.indiana.edu/projects/hopenet + +# Abstract + +Hand-object pose estimation (HOPE) aims to jointly detect the poses of both a hand and of a held object. In this paper, we propose a lightweight model called HOPE-Net which jointly estimates hand and object pose in 2D and 3D in real-time. Our network uses a cascade of two adaptive graph convolutional neural networks, one to estimate 2D coordinates of the hand joints and object corners, followed by another to convert 2D coordinates to 3D. Our experiments show that through end-to-end training of the full network, we achieve better accuracy for both the 2D and 3D coordinate estimation problems. The proposed 2D to 3D graph convolution-based model could be applied to other 3D landmark detection problems, where it is possible to first predict the 2D keypoints and then transform them to 3D. + +# 1. Introduction + +We use our hands as a primary means of sensing and interacting with the world. Thus to understand human activity, computer vision systems need to be able to detect the pose of the hands and to identify properties of the objects that are being handled. This human Hand-Object Pose Estimation (HOPE) problem is crucial for a variety of applications, including augmented and virtual reality, fine-grained action recognition, robotics, and telepresence. + +This is a challenging problem, however. Hands move quickly as they interact with the world, and handling an object, by definition, creates occlusions of the hand and/or object from nearly any given point of view. Moreover, hand-object interaction video is often collected from first-person (wearable) cameras (e.g., for Augmented Reality applications), generating a large degree of unpredictable camera motion. + +Of course, one approach is to detect the poses of the hands and objects separately [27,30]. However, this ignores + +![](images/b0a199f07853f3a4868249df62396b83f9c7490ce29bd8c2036d1d07ed264b7f.jpg) +Figure 1. The goal of Hand-Object Pose Estimation (HOPE) is to jointly estimate the poses of both the hand and a handled object. Our HOPE-Net model can estimate the 2D and 3D hand and object poses in real-time, given a single image. + +![](images/a336756770b78ce60a26fb2225a739fa9d00fad060a6f6bc65cb0764b8585568.jpg) + +the fact that hand and handled object poses are highly correlated: the shape of an object usually constrains the types of grasps (hand poses) that can be used to handle it. Detecting the pose of the hand can give cues as to the pose and identity of an object, while the pose of an object can constrain the pose of the hand that is holding it. Solving the two problems jointly can help overcome challenges such as occlusion. Recent work [10,26] proposed deep learning-based approaches to jointly model the hand and object poses. We build on this work, showing how to improve performance by more explicitly modeling the physical and anatomical constraints on hand-object interaction. + +We propose to do this using graph convolutional neural networks. Given their ability to learn effective representations of graph-structured data, graph convolutional neural networks have recently received much attention in computer vision. Human hand and body pose estimation problems are particularly amenable to graph-based techniques since they can naturally model the skeletal and kinematic constraints between joints and body parts. Graph convolution can be used to learn these inter-joint relationships. + +In this paper, we show that graph convolution can dramatically increase the performance of estimating 3D hand-object pose in real-world hand-object manipulation videos. We model hand-object interaction by representing the hand and object as a single graph. We focus on estimating 3D + +hand-object poses from egocentric (first-person) and third-person monocular color video frames, without requiring any depth information. Our model first predicts 2D keypoint locations of hand joints and object boundaries. Then the model jointly recovers the depth information from the 2D pose estimates in a hierarchical manner (Figure 1). + +This approach of first estimating in 2D and then "converting" to 3D is inspired by the fact that detection-based models perform better in detecting 2D hand keypoints, but in 3D, because of the high degree of non-linearity and the huge output space, regression-based models are more popular [4]. Our graph convolutional approach allows us to use a detection-based model to detect the hand keypoints in 2D (which is easier than predicting 3D coordinates), and then to accurately convert them to 3D coordinates. We show that using this graph-based network, we are not limited to training on only annotated real images, but can instead pretrain the 2D to 3D network separately with synthetic images rendered from 3D meshes of hands interacting with objects (e.g. ObMan dataset [10]). This is very useful for training a model for hand-object pose estimation as real-world annotated data for these scenarios is scarce and costly to collect. + +In brief, the core contributions of our work are: + +- We propose a novel but lightweight deep learning framework, HOPE-Net, which can predict 2D and 3D coordinates of hand and hand-manipulated object in real-time. Our model accurately predicts the hand and object pose from single RGB images. +- We introduce the Adaptive Graph U-Net, a graph convolution-based neural network to convert 2D hand and object poses to 3D with novel graph convolution, pooling, and unpooling layers. The new formulations of these layers make it more stable and robust compared to the existing Graph U-Net [5] model. +- Through extensive experiments, we show that our approach can outperform the state-of-the-art models for joint hand and object 3D pose estimation tasks while still running in real-time. + +# 2. Related Work + +Our work is related to two main lines of research: joint hand-object pose prediction models and graph convolutional networks for understanding graph-based data. + +Hand-Object Pose Estimation. Due to the strong relationship between hand pose and the shape of a manipulated object, several papers have studied joint estimation of both hand and object pose. Oikonomidis et al. [20] used hand-object interaction as context to better estimate the 2D hand pose from multiview images. Choi et al. [3] trained two networks, one object-centered and one hand-centered, to + +capture information from both the object and hand perspectives, and shared information between these two networks to learn a better representation for predicting 3D hand pose. Panteleris et al. [21] generated 3D hand pose and 3D models of unknown objects based on hand-object interactions and depth information. Oberweger et al. [19] proposed an iterative approach by using Spatial Transformer Networks (STNs) to separately focus on the manipulated object and the hand to predict their corresponding poses. Later they estimated the hand and object depth images and fused them using an inverse STN. The synthesized depth images were used to refine the hand and object pose estimates. Recently, Hasson et al. [10] showed that by incorporating physical constraints, two separate networks responsible for learning object and hand representations can be combined to generate better 3D hand and object shapes. Tekin et al. [26] proposed a single 3D YOLO model to jointly predict the 3D hand pose and object pose from a single RGB image. + +Graph Convolution Networks. Graph convolution networks allow learning high-level representations of the relationships between the nodes of graph-based data. Zhao et al. [31] proposed a semantic graph convolution network for capturing both local and global relationships among human body joints for 2D and 3D human pose estimation. Cai et al. [1] converted 2D human joints to 3D by encoding domain knowledge of the human body and hand joints using a graph convolution network which can learn multiscale representations. Yan et al. [29] used a graph convolution network for learning a spatial-temporal representation of human body joints for skeleton-based action recognition. Kolotouros et al. [14] showed that graph convolutional networks can be used to extract 3D human shape and pose from a single RGB image, while Ge et al. [7] used them to generate complete 3D meshes of hands from images. Li et al. [17] used graph convolutional networks for skeleton-based action recognition, while Shi et al. [24,25] similarly used two stream adaptive graph convolution. + +Gao et al. [5] introduced the Graph U-Net structure with their proposed pooling and unpooling layers. But that pooling method did not work well on graphs with low numbers of edges, such as skeletons or object meshes. Ranjan et al. [22] used fixed pooling and Hanocka et al. [9] used edge pooling to prevent holes in the mesh after pooling. In this paper, we propose a new Graph U-Net architecture with different graph convolution, pooling, and unpooling. We use an adaptive adjacency matrix for our graph convolutional layer and new trainable pooling and unpooling layers. + +# 3. Methodology + +We now present HOPE-Net, which consists of a convolutional neural network for encoding the image and predicting the initial 2D locations of the hand and object key + +![](images/e3d9b456b91d327da8558d0cb35a663d8d9a1e29381f66149a1982ae1943777f.jpg) +Figure 2. The architecture of HOPE-Net. The model starts with ResNet10 as the image encoder and for predicting the initial 2D coordinates of the joints and object vertices. The coordinates concatenated with the image features used as the features of the input graph of a 3 layered graph convolution to use the power of neighbors features to estimate the better 2D pose. Finally the 2D coordinates predicted in the previous step are passed to our Adaptive Graph U-Net to find the 3D coordinates of the hand and object. + +points (hand joints and tight object bounding box corners), a simple graph convolution to refine the predicted 2D predictions, and a Graph U-Net architecture to convert 2D keypoints to 3D using a series of graph convolutions, poolings, and unpoolings. Figure 2 shows an overall schematic of the HOPE-Net architecture. + +# 3.1. Image Encoder and Graph Convolution + +For the image encoder, we use a lightweight residual neural network [11] (ResNet10) to help reduce overfitting. The image encoder produces a 2048D feature vector for each input image. Then initial predictions of the 2D coordinates of the keypoints (hand joints and corners of the object's tight bounding box) are produced using a fully-connected layer. Inspired by the architecture of [15], we concatenate these features with the initial 2D predictions of each keypoint, yielding a graph with 2050 features (2048 image features plus initial estimates of $x$ and $y$ ) for each node. A 3-layer adaptive graph convolution network is applied to this graph to use adjacency information and modify the 2D coordinates of the keypoints. In the next section, we explain the adaptive graph convolution in depth. The concatenation of the image features to the predicted $x$ and $y$ of each keypoint forces the graph convolution network to modify the 2D coordinates conditioned on the image features as well as the initial prediction of the 2D coordinates. These final 2D coordinates of the hand and object keypoints are then passed to our adaptive Graph U-Net, a graph convolution network using adaptive convolution, pooling, and unpooling to convert 2D coordinates to 3D. + +# 3.2. Adaptive Graph U-Net + +In this section, we explain our graph-based model which predicts 3D coordinates of the hand joints and object cor + +ners based on predicted 2D coordinates. In this network, we simplify the input graph by applying graph pooling in the encoding part, and in the decoding part, we add those nodes again with our graph unpooling layers. Also, similar to the classic U-Net [23], we use skip connections and concatenate features from the encoding stage to features of the decoding stage in each decoding graph convolution. With this architecture we are interested in training a network which simplifies the graph to obtain global features of the hand and object, but also tries to preserve local features via the skip connections from the encoder to the decoder layers. Modeling the HOPE problem as a graph helps use neighbors to predict more accurate coordinates and also to discover the relationship between hands and objects. + +The Graph U-Net concept was previously introduced by Gao et al. [5], but our network layers, i.e. graph convolution, pooling, and unpooling, are significantly different. We found that the sigmoid function in the pooling layer of [5] (gPool) can cause the gradients to vanish and to not update the picked nodes at all. We thus use a fully-connected layer to pool the nodes and updated our adjacency matrix in the graph convolution layers, using the adjacency matrix as a kernel we apply to our graph. Moreover, Gao et al.'s gPool [5] removes the vertices and all the edges connected to them and does not have a procedure to reconnect the remaining vertices. This approach may not be problematic for dense graphs (e.g. Citeseer [13]) in which removing a node and its edges will not change the connectivity of the graph. But in graphs with sparse adjacency matrices, such as when the graph is a mesh or a hand or body skeleton, removing one node and its edges may cut the graph into several isolated subgraphs and destroy the connectivity, which is the most important feature of a graph convolutional neural network. Using an adaptive graph convolution neural network, + +![](images/06302445953aa3dd844880de8957c3a1b1d2a2e480583a4f23d5344bb36283be.jpg) +Figure 3. A schematic of our Adaptive Graph U-Net architecture, which is used to estimate 3D coordinates from 2D coordinates. In each of the pooling layers, we roughly cut the number of nodes in half, while in each unpooling layer, we double the number of nodes in the graph. The red arrows in the image are the skip layer features which are passed to the decoder to be concatenated with the unpooled features. + +we avoid this problem as the network finds the connectivity of the nodes after each pooling layer. + +Below we explain the three components of our network, graph convolution, pooling, and unpooling layers, in detail. The architecture of our adaptive Graph U-Net is shown in Figure 3. + +# 3.2.1 Graph Convolution + +The core part of a graph convolutional network is the implementation of the graph convolution operation. We implemented our convolution based on the Renormalization Trick mentioned in [13]: the output features of a graph convolution layer for an input graph with $N$ nodes, $k$ input features, and $\ell$ output features for each node is computed as, + +$$ +Y = \sigma (\tilde {A} X W), \tag {1} +$$ + +where $\sigma$ is the activation function, $W\in \mathbb{R}^{k\times \ell}$ is the trainable weights matrix, $X\in \mathbb{R}^{N\times k}$ is the matrix of input features, and $\tilde{A}\in \mathbb{R}^{N\times N}$ is the row-normalized adjacency matrix of the graph, + +$$ +\tilde {A} = \hat {D} ^ {- \frac {1}{2}} \hat {A} \hat {D} ^ {- \frac {1}{2}}, \tag {2} +$$ + +where $\hat{A} = A + I$ and $\hat{D}$ is the diagonal node degree matrix. $\tilde{A}$ simply defines the extent to which each node uses other nodes' features. So $\tilde{A} X$ is the new feature matrix in which each node's features are the averaged features of the node itself and its adjacent nodes. Therefore, to effectively formulate the HOPE problem in this framework, an effective adjacency matrix is needed. + +Initially, we tried using the adjacency matrix defined by the kinematic structure of the hand skeleton and the object bounding box for the first layer of the network. But we found it was better to allow the network to learn the best adjacency matrix. Note that this is no longer strictly an adjacency matrix in the strict sense, but more like an "affinity" + +matrix where nodes can be connected by weighted edges to many other nodes in the graph. An adaptive graph convolution operation updates the adjacency matrix $(A)$ , as well as the weights matrix $(W)$ during the backpropagation step. This approach allows us to model subtle relationships between joints which are not connected in the hand skeleton model (e.g. strong relationships between finger tips despite not being physically connected). + +We use ReLU as the activation function for the graph convolution layers. Also we found that the network trains faster and generalizes better if we do not use either Batch [12] or Group Normalization [28]. + +# 3.2.2 Graph Pooling + +As mentioned earlier, we did not find gPool [5] helpful in our problem: the sigmoid function's weaknesses are well-known [16, 18] and the use of sigmoid in the pooling step created very small gradients during backpropagation. This caused the network not to update the randomly-initialized selected pooled nodes throughout the entire training phase, and lost the advantage of the trainable pooling layer. + +To solve this problem, we use a fully-connected layer and apply it on the transpose of the feature matrix. This fully-connected works as a kernel along each of the features and outputs the desired number of nodes. Compared to gPool, we found this module updated very well during training. Also due to using an adaptive graph convolution, this pooling does not fragment the graph into pieces. + +# 3.2.3 Graph Unpooling + +The unpooling layer used in our Graph U-Net is also different from Gao et al.'s gUnpool [5]. That approach adds the pooled nodes to the graph with empty features and uses the subsequent graph convolution to fill those features. Instead, + +we use a transpose convolution approach in our unpooling layer. Similar to our pooling layer, we use a fully-connected layer and applied it on the transpose matrix of the features to obtain the desired number of output nodes, and then transpose the matrix again. + +# 3.3. Loss Function and Training the Model + +Our loss function for training the model has three parts. We first calculate the loss for the initial 2D coordinates predicted by ResNet $(\mathcal{L}_{init2D})$ . We then add this loss to that calculated from the predicted 2D and 3D coordinates $(\mathcal{L}_{2D}$ and $\mathcal{L}_{3D}$ ), + +$$ +\mathcal {L} = \alpha \mathcal {L} _ {\text {i n i t} 2 D} + \beta \mathcal {L} _ {2 D} + \mathcal {L} _ {3 D}, \tag {3} +$$ + +where we set $\alpha$ and $\beta$ to 0.1 to bring the 2D error (in pixels) and 3D error (in millimeters) into a similar range. For each of the loss functions, we used Mean Squared Error. + +# 4. Results + +We now describe our experiments and report results for hand-object pose estimation. + +# 4.1. Datasets + +To evaluate the generality of our hand-object pose estimation method, we used two datasets with very different contexts: First-Person Hand Action Dataset [6], which has videos captured from egocentric (wearable) cameras, and HO-3D [8], which was captured from third-person views. We also used a third dataset of synthetic images, ObMan [10], for pre-training. + +First-Person Hand Action Dataset [6] contains first-person videos of hand actions performed on a variety of objects. The objects are milk, juice bottle, liquid soap, and salt, and actions include open, close, pour, and put. Three-dimensional meshes for the objects are provided. Although this is a large dataset, a relatively small subset of frames (21, 501) include 6D object pose annotations, with 11, 019 for training and 10, 482 for evaluation. The annotation provided for each frame is a 6D vector giving 3D translation and rotation for each of the objects. To fit this annotation to our graph model, for each object in each frame, we translate and rotate the 3D object mesh to the pose given by the annotation, and then compute a tight oriented bounding box (simply PCA on vertex coordinates). We use the eight 3D coordinates of the object box corners as nodes in our graph. + +The HO-3D Dataset [8] also contains hands and handled objects but is quite different because it is captured from a third-person point-of-view. Hands and objects in these videos are smaller because they are further from the camera, and their position is less constrained than in first-person videos (where people tend to center their field of view around attended objects). HO-3D contains 77,558 + +![](images/be77d8aae29ba7de80767fe97ec6a9754dc2c440465a35bd865cfefab2f2bc42.jpg) +Figure 4. Scatter plot of keypoint coordinates in the First Person Hand Action dataset. The red dashed rectangle denotes the image frame. Since many points are outside the image boundary, the detection-based models did not work well on this dataset. + +frames annotated with hands and objects, and was collected with 10 subjects and 10 objects. 66,034 frames are designated as the training set and 11,524 are for evaluation. Hands in the evaluation set of HO-3D are just annotated with the wrist coordinates and the full hand is not annotated. + +ObMan [10] is a large dataset of synthetically-generated images of hand-object interactions. Images in this dataset were produced by rendering meshes of hands with selected objects from ShapeNet [2], using an optimization on the grasp of the objects. ObMan contains 141,550 training, 6,463 validation, and 6,285 evaluation frames. Despite the large-scale of the annotated data, we found that models trained with these synthetic images do not generalize well to real images. Nevertheless, we found it helpful to pretrain our model on the large-scale data of ObMan, and then fine-tune using real images. + +All of these datasets use 21 joints model for hands which contains one joints for the wrist and 4 joints for each of the fingers. + +# 4.2. Implementation Details + +Because of the nature of first-person video, hands often leave the field of view, and thus roughly half of the frames in the First-Person Hand Action dataset have at least one keypoint outside of the frame (Figure 4). Because of this, we found that detection-based models are not very helpful in this dataset. Thus we use a regression-based model to find the initial 2D coordinates. To avoid overfitting, we use a lightweight ResNet which gave better generalization. This lightweight model is also fast, allowing us to run our model in near real-time. For both datasets, we use the official training and evaluation splits, and pretrain on ObMan [10]. + +Since HOPE-Net has different numbers of parameters and complexity, we train the image encoder and graph parts separately. The 2D to 3D converter network can be trained separately because it is not dependent to the annotated im + +![](images/28926989906aa085b64bfdf17c59a62cc4316e5f5061e7f9665d78968688953b.jpg) +Figure 5. The percentage of correct 2D object pose of our model on the First-Person Hand Action dataset compared to [26] and [27]. The graph convolutional layers helped the model to predict more accurate coordinates. + +age. In addition to the samples in the FPHA dataset, we augment the 2D points with Gaussian noise $(\mu = 0,\sigma = 10)$ to help improve robustness to errors. + +For both FPHA and HO-3D datasets we train the ResNet model with an initial learning rate of 0.001 and multiply it by 0.9 every 100 steps. We train ResNet for 5000 epochs and the graph convolutional network for 10,000 epochs, starting from a learning rate of 0.001 and multiplying by 0.1 every 4000 steps. Finally we train the model end-to-end for another 5000 epochs. All the images are resized to $224 \times 224$ pixels and passed to the ResNet. All learning and inference was implemented in PyTorch. + +# 4.3. Metrics + +Similar to [26], we evaluated our model using percentage of correct pose (PCP) for both 2D and 3D coordinates. In this metric, a pose is considered correct if the average distance to the ground truth pose is less than a threshold. + +# 4.4. Hand-Object Pose Estimation Results + +We now report the performance of our model in hand and object pose estimation on our two datasets. Figure 5 presents the percentage of correct object pose for each pixel threshold on the First-Person Hand Action dataset. As we can see in this graph, the 2D object pose estimates produced by the HOPE-Net model outperform the state-of-the-art model of Tekin et al. [26] for 2D object pose estimation, even though we do not use an object locator and we operate on single frames without using temporal constraints. Moreover, our architecture is lightweight and faster to run. + +Figure 6 presents the percentage of correct 3D poses for various thresholds (measured in millimeters) on the First-Person Hand Action dataset. The results show that the HOPE-Net model outperforms Tekin et al.'s RGB-based + +![](images/4d7103e648eadc2177884a4dbdfd91b8727c76e731cca6a420692301c369b62a.jpg) +Figure 6. The percentage of correct 3D hand pose of our model on the First-Person Hand Action dataset compared to the RGB-based technique of [26] and the depth-based technique of [6]. Our model works well on roughly accurate 2D estimates. + +model [26] and Herando et al.'s [6] depth-based model in 3D pose estimation, even without using an object localizer or temporal information. + +We also tested our graph model with various other inputs, including ground truth 2D coordinates, as well as ground truth 2D coordinates with Gaussian noise added (with zero mean and $\sigma = 20$ and $\sigma = 50$ ). Figure 6 presents the results. We note that the graph model is able to effectively remove the Gaussian noise from the keypoint coordinates. + +Figure 7 shows selected qualitative results of our model on the First-Person Hand Action dataset. Figure 8 breaks out the error of the 2D to 3D converter for each finger and also for each kind of joint of the hand. + +We also tested on the third-person videos of the very recent HO-3D dataset. Although the locations of hands and objects in the images vary more in HO-3D, we found that HOPE-Net performs better, perhaps because of the size of the dataset. The Area Under the Curve (AUC) score of HOPE-Net is 0.712 for 2D pose and 0.967 for 3D pose estimation. Note that hands in the evaluation set of HO-3D are just annotated with the wrist (without the full hand annotation). Therefore the mentioned results are just for wrist keypoint. + +# 4.5. Adaptive Graph U-Net Ablation Study + +We also conducted an ablation study of our Adaptive Graph U-Net to identify which components were important for achieving our results. We first compare our model to other models, and then we evaluate the influence of the adjacency matrix initialization on the adaptive Graph U-Net performance. + +To show the effectiveness of our U-Net structure, we compared it to two different models, one with three Fully + +![](images/af2c0d49a5f09837f193ed928ad97a491757b35d1c35a285943354a33b659348.jpg) +Figure 7. Qualitative 2D and 3D results of HOPE-Net on the First-Person Hand Action dataset. The estimated poses are shown in color, and the ground truth is shown in black. The last row includes three failure cases. + +![](images/4ec6f272bf1a45ae425214239cb49f26838bf385413f9601314a1661474b748b.jpg) + +![](images/11cb3aa5d93d828afc9599be0e6e342524e8d36f99176dea5a9dddf1607ec4c5.jpg) + +![](images/f50a86a5b1872617e384a275248fe192370bbf78fac5a608c7119d3777145971.jpg) + +![](images/12e9f07f8ff2ffe33868514254b321ac8c0f86ca068fba4eecf885b55c95f27c.jpg) + +![](images/480115c7f1ba318d7ce917c80afd485d49e74fe50a0932379e94c452123045ae.jpg) + +![](images/85e4c9b5bdcdbc599193a976948ff2a436674be445512a4daf1c0956858a6671.jpg) + +![](images/11a5a9dab6da1ddfe456bbcebf6751be41cb9d92e2a75fe35687b0bd724e5291.jpg) + +![](images/bdfe9482ff340e7e0628f94a3a4f75fb5c5ea5a85035056bd45b7d0bd6a55dc6.jpg) + +![](images/28046f96f7a193f8ef976109f166730ca8f6723fd280782180571ec55622cd46.jpg) + +![](images/b44780d42e099c29c09f7ea2b5c8b5df4594ec1f3a6a113dd58cd74ca71cce41.jpg) + +![](images/1f0ccfc2af92ba04047897d7e02433f33123f1c096626331f1e3f48d2cd35f07.jpg) + +![](images/93a1238c907463048bb0d1ba09320110b7bcc07c39987330eee189d8b3d581d9.jpg) + +![](images/315f171d505efeae635cfbff67d9db69ee8f5d1572c7bc95fa9ede0098dd31fd.jpg) + +![](images/ac10472da48480bacd5f5663540506518ad5bc078904d9ade631816da21da1cd.jpg) + +![](images/9cd99fc55c3f8fc70b9fc60f1cb640d56a29a60cb83562a489b34a015dd65bb3.jpg) + +![](images/9c52353b7dcc53a5981a626b7fce6e6348573a29973956d140640610c17f9b07.jpg) + +![](images/e99b007e4cfd690c0cb955f9a9ac3cd796d76bc43132d44249292acb4bdfe1df.jpg) + +![](images/4e503c3c3d52657c19b245fcc11ccc84eb57f7ebd2e9ff4f2d669896cae78cfc.jpg) + +![](images/a57ffe9624a3fb3e0369c52d4776f44a547dc06d2b2be95a67d5e679780a483c.jpg) + +![](images/1900ca64cf78d391b47f359a5ef53e9fc1567e748d9e86941c63274c8c466836.jpg) + +![](images/109208478c5a843591fd1bc26900389152a3b0fcf297070434a54a138adcfbeb.jpg) + +![](images/a01aca7d342f76319c7f26c6fdbefde8cc23d85979e23938b47733e7bc8a89f7.jpg) + +![](images/24986ce0fada339e6b7f960143a16bbeb108aaee9f2992e68c360ab322b51ad3.jpg) + +![](images/429ccc45c7bb40537d9294e51b1048de41759cf38c8fdfcfc89677ac6a622516.jpg) + +![](images/e34766f68124c5f28e42133394269978d2e002f4ec7e7663b2c393484192569b.jpg) + +![](images/742f2173d6fa15a34414c8fe7a9b90abfd17086e2933164e1337f70078dba36f.jpg) +(a) + +![](images/f010932c6cc311571bd54880e2313596fbf0dab4ccd25fe6f4475d7caecfcd6c.jpg) +(b) +Figure 8. Average 3D pose estimation errors broken out across (a) each joint of the hand and (b) each finger. Note that MCP, PIP, and DIP denote the 3 joints located between the wrist and fingertip (TIP), in that order. + +Connected Layers and one with three Graph Convolutional Layers without pooling and unpooling. We were interested in the importance of each of our graph convolutional models in the 3D output. Each of these models is trained to convert 2D coordinates of the hand and object keypoints to 3D. Table 1 shows the results. The adaptive Graph U-Net performs better than the other methods by a large margin. This large margin seems to come from the U-Net structure and the pooling and unpooling layers. + +To understand the effect of our graph pooling layer, we compared it with Gao et al.'s [5] gPool, and also with fixed + +Table 1. Average error on 3D hand and object pose estimation given 2D pose. The first row is a multi-layer perceptron and the second row is a 3-layered graph convolution without pooling and unpooling. The Adaptive Graph U-Net structure has the best performance. + +
ArchitectureAverage Error (mm)
Fully Connected185.18
Adaptive Graph Convolution68.93
Adaptive Graph U-Net6.81
+ +Table 2. Average error on 2D to 3D hand and object pose estimation using different pooling methods. Our trainable pooling method produces the best results. + +
Pooling methodAverage Error (mm)
gPool [5]153.28
Fixed Pooling Layers7.41
Trainable Pooling6.81
+ +pooled nodes which do not break the graph into pieces. Table 2 compares the performance of different graph pooling methods. We see that by using a more efficient training algorithm and also by not breaking apart the graph after pooling, our pooling layer performs better than gPool. + +Since we are using an adaptive graph convolution, the network learns the adjacency matrix as well. We tested + +![](images/bb6d470cb3cbc7a8dd0db7e38d9220f0b3db4b4e9f060bbff8331b201328c273.jpg) +Figure 9. Visualization of the learned adjacency matrices of the adaptive graph convolution layers. For instance, we see in the $A_0$ matrix that the corners of the object bounding box (row and column indices 21 through 29) are highly dependent on one another, and also there is a relatively strong connection between fingertips. + +![](images/9add881303a20896546d9658d62b67ad00cb33863bbd18087b4bd9e8659e1d9c.jpg) + +![](images/715b2e510dc8d471e4397aea0c8c77c1d165690060cbf4d9d09aa9ceca25295c.jpg) + +![](images/d416c302951ae2d0a94fa0fff5a85df2e2dc018d92a2c21a522197fe3b7a6a4e.jpg) + +![](images/41499de0febc6f18455de91ea49853f742e62111932659c683762c9c52c1f225.jpg) + +Table 3. Average error in 3D pose estimation in the adaptive graph convolution layer. The model has the best performance when it is initialized with the identity matrix. "Skeleton" in the fourth row refers to an adjacency matrix that simply encodes the actual kinematic structure of the human hand. + +
Initial Adjacency MatrixAverage Error (mm)
Zeros (0n×n)92805.02
Random Initialization94.42
Ones (1n×n)63.25
Skeleton12.91
Identity (I n×n)6.81
+ +the effect of different adjacency matrix initializations on the final performance, including: hand skeleton and object bounding box, empty graph with and without self-loops, complete graph, and a random connection of vertices. Table 3 presents the results of the model initialized with each of these matrices, showing that the identity matrix is the best initialization. In other words, the model seems to learn best when it finds the relationship between the nodes starting with an unbiased (uninformative) initialization. + +The final trained adjacency matrices for the graph convolution layers (starting from $\mathbf{I}_{n\times n}$ ) are visualized in Figure 9. We see that the model has found relationships between nodes which are not connected in the hand skeleton model. For example, it found a relationship between node 6 (index finger's PIP) and node 4 (thumb's TIP), which are not connected in the hand skeleton model. + +# 4.6. Runtime + +As mentioned earlier, HOPE-Net consists of a lightweight feature extractor (ResNet10) and two graph convolutional neural networks which are more than ten times faster than the shallowest image convolutional neural network. The core inference of the model can be run in real-time on an Nvidia Titan Xp. On such a GPU, the entire 2D and 3D inference of a single frame requires just 0.005 seconds. + +# 5. Conclusion and Future Work + +In this paper, we introduced a model for hand-object 2D and 3D pose estimation from a single image using an image encoder followed by a cascade of two graph convolutional neural networks. Our approach beats the state-of-the-art, while also running in real-time. + +Nevertheless, there are limitations of our approach. When trained on the FPHA and HO-3D datasets, our model is well-suited for objects that are of similar size or shape to those seen in the dataset during training, but might not generalize well to all categories of object shapes. For example, objects with a non-convex geometry lacking a tight 3D bounding box would be a challenge for our technique. For real-world applications, a larger dataset including a greater variety of shapes and environments would help to improve the estimation accuracies. + +Future work could include incorporating temporal information into our graph-based model, both to improve pose estimation results and as step towards action detection. Graph classification methods can be integrated into the proposed framework to infer categorical semantic information for applications such as detecting sign language or gesture understanding. Also, in addition to hand pose estimation, the Adaptive Graph U-Net introduced in this work can be applied to a variety of other problems such as graph completion, protein classification, mesh classification, and body pose estimation. + +# Acknowledgment + +The work in this paper was supported in part by the National Science Foundation (CAREER IIS-1253549), and by the IU Office of the Vice Provost for Research, the College of Arts and Sciences, and the Luddy School of Informatics, Computing, and Engineering through the Emerging Areas of Research Project "Learning: Brains, Machines, and Children." + +# References + +[1] Yujun Cai, Liuhao Ge, Jun Liu, Jianfei Cai, Tat-Jen Cham, Junsong Yuan, and Nadia Magnenat Thalmann. Exploiting spatial-temporal relationships for 3d pose estimation via graph convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2272-2281, 2019. 2 +[2] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. 5 +[3] Chiho Choi, Sang Ho Yoon, Chin-Ning Chen, and Karthik Ramani. Robust hand pose estimation during the interaction with an unknown object. In IEEE International Conference on Computer Vision (ICCV), pages 3123-3132, 2017. 2 +[4] Bardia Doosti. Hand pose estimation: A survey. CoRR, abs/1903.01013, 2019. 2 +[5] Hongyang Gao and Shuiwang Ji. Graph u-nets. In International Conference on Learning Representations (ICLR), 2019. 2, 3, 4, 7 +[6] 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 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 5, 6 +[7] 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 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 10833-10842, 2019. 2 +[8] Shreyas Hampali, Mahdi Rad, Markus Oberweger, and Vincent Lepetit. Honnotate: A method for 3d annotation of hand and objects poses, 2019. 5 +[9] Rana Hanocka, Amir Hertz, Noa Fish, Raja Giryes, Shachar Fleishman, and Daniel Cohen-Or. MeshCNN: a network with an edge. ACM Transactions on Graphics (TOG), 38(4):90, 2019. 2 +[10] 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 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 5 +[11] 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. 3 +[12] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning (ICML), 2015. 4 +[13] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017. 3, 4 +[14] 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 (CVPR), pages 4501-4510, 2019. 2 +[15] 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 (CVPR), June 2019. 3 +[16] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 1097-1105, 2012. 4 +[17] Maosen Li, Siheng Chen, Xu Chen, Ya Zhang, Yanfeng Wang, and Qi Tian. Actional-structural graph convolutional networks for skeleton-based action recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[18] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In International Conference on Machine Learning (ICML), pages 807-814, 2010. 4 +[19] Markus Oberweger, Paul Wohlhart, and Vincent Lepetit. Generalized feedback loop for joint hand-object pose estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 2 +[20] Iason Oikonomidis, Nikolaos Kyriazis, and Antonis A Argyros. Full dof tracking of a hand interacting with an object by modeling occlusions and physical constraints. In 2011 International Conference on Computer Vision, pages 2088-2095. IEEE, 2011. 2 +[21] Paschalis Panteleris, Nikolaos Kyriazis, and Antonis A Argyros. 3d tracking of human hands in interaction with unknown objects. In British Machine Vision Conference (BMVC), pages 123-1, 2015. 2 +[22] Anurag Ranjan, Timo Bolkart, Soubhik Sanyal, and Michael J Black. Generating 3d faces using convolutional mesh autoencoders. In European Conference on Computer Vision (ECCV), pages 704-720, 2018. 2 +[23] 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. 3 +[24] Lei Shi, Yifan Zhang, Jian Cheng, and Hanqing Lu. Skeleton-based action recognition with directed graph neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[25] Lei Shi, Yifan Zhang, Jian Cheng, and Hanqing Lu. Two-stream adaptive graph convolutional networks for skeleton-based action recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[26] Bugra Tekin, Federica Bogo, and Marc Pollefeys. H+o: Unified egocentric recognition of 3d hand-object poses and interactions. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2, 6 +[27] Bugra Tekin, Sudipta N Sinha, and Pascal Fua. Real-time seamless single shot 6d object pose prediction. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 292-301, 2018. 1, 6 + +[28] Yuxin Wu and Kaiming He. Group normalization. In European Conference on Computer Vision (ECCV), pages 3-19, 2018. 4 +[29] 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. 2 +[30] Shanxin Yuan, Guillermo Garcia-Hernando, Björn Stenger, Gyeongsik Moon, Ju Yong Chang, Kyoung Mu Lee, Pavlo Molchanov, Jan Kautz, Sina Honari, Liuhao Ge, et al. Depth-based 3d hand pose estimation: From current achievements to future goals. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2636-2645, 2018. 1 +[31] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris N Metaxas. Semantic graph convolutional networks for 3d human pose regression. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3425-3435, 2019. 2 \ No newline at end of file diff --git a/hopenetagraphbasedmodelforhandobjectposeestimation/images.zip b/hopenetagraphbasedmodelforhandobjectposeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..df7a50f303cdec4ceae40ca157558dc6cd5398cc --- /dev/null +++ b/hopenetagraphbasedmodelforhandobjectposeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d70b7774e0a557d9550df48e66736702827799d3f46c2cac3d43d03460c64e99 +size 538126 diff --git a/hopenetagraphbasedmodelforhandobjectposeestimation/layout.json b/hopenetagraphbasedmodelforhandobjectposeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..15af21bdbb1963957129efce8bbed3c437908179 --- /dev/null +++ b/hopenetagraphbasedmodelforhandobjectposeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a064be97f30c0d42e34fff614deba817b8244f6550e54c3a2fd47d5054d0a41a +size 340162 diff --git a/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_content_list.json b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4941e7185e0ad947ce5187c3853fccfe7eae4300 --- /dev/null +++ b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06d59bf77eb393d1464784a94205f5a757faa7c71f759da1927cf9d59b0380a0 +size 80183 diff --git a/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_model.json b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cf9464cf78ec7351ade64d0745251ab7528d8d8b --- /dev/null +++ b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfb052f5a6729bc2ca929b8c76f0e788ec8fdebd8464c11b243246d9fc15718b +size 95573 diff --git a/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_origin.pdf b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d67c4e376d298e9b1f841d3ebf9352a970936bae --- /dev/null +++ b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/9a1618e2-a47c-4949-b674-b1b643d491d1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6776964dee540a9127087a5fc55d21e3e1a3f4be876bad416a15ed8377a37037 +size 441653 diff --git a/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/full.md b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2c61dce939eb37581e5bd10eb22e463b07dcdce4 --- /dev/null +++ b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/full.md @@ -0,0 +1,368 @@ +# How Does Noise Help Robustness? Explanation and Exploration under the Neural SDE Framework + +Xuanqing Liu UCLA + +xqliu@cs.ucla.edu + +Tesi Xiao + +UC Davis + +texiao@ucdavis.edu + +Sanjiv Kumar Google + +sanjivk@google.com + +Si Si + +Google + +sisidaisy@google.com + +Qin Cao + +Google + +qincao@google.com + +Cho-Jui Hsieh + +UCLA, Google + +chohsieh@cs.ucla.edu + +# Abstract + +Neural Ordinary Differential Equation (Neural ODE) has been proposed as a continuous approximation to the ResNet architecture. Some commonly used regularization mechanisms in discrete neural networks (e.g., dropout, Gaussian noise) are missing in current Neural ODE networks. In this paper, we propose a new continuous neural network framework called Neural Stochastic Differential Equation (Neural SDE), which naturally incorporates various commonly used regularization mechanisms based on random noise injection. For regularization purposes, our framework includes multiple types of noise patterns, such as dropout, additive, and multiplicative noise, which are common in plain neural networks. We provide some theoretical analyses explaining the improved robustness of our models against input perturbations. Furthermore, we demonstrate that the Neural SDE network can achieve better generalization than the Neural ODE and is more resistant to adversarial and non-adversarial input perturbations. + +# 1. Introduction + +Despite the superhuman performance in many computer vision tasks, recent findings [2, 8, 28] demonstrate that deep neural networks remain to be more fragile than human or even shallow models. Existing work supports such phenomenon from different perspectives; for instance, on CIFAR-10 and ImageNet, [25] shows that the test accuracy drops by $5\% - 15\%$ if we replace the original test set by a new one. This experiment casts doubts on the brittleness of generalization and implies that current classifiers are very sensitive to minutiae of data cleaning process. Even on the same test set, unnoticeable adversarial perturbations crafted by specific algorithms [19] can make the test accuracy close to zero. In the less challenging non-adversarial case, [11] + +collects tens of different types of perturbations and corruptions, including motion blur or frog, to large scale image dataset; they found that test accuracy drops considerably on corrupted images. We summarize three settings above as generalization, adversarial robustness, and non-adversarial robustness. Ideally, we desire a model not only to be distributionally robust but also be resistant against adversarial and non-adversarial perturbations. Unfortunately, previous works only focus on one of these problems - e.g. they may apply adversarial training technique [8, 19] to tackle adversarial examples but fall short of clean accuracy when no perturbation exists. It is thus very interesting to see whether there is a unified way to mitigate all the problems, and whether we can find a theoretical explanation for it. + +In this paper, we study the role of randomness for training a robust neural network. There are abundant sources of randomness: 1) dropout layer [26] randomly disable some neural connections and set the corresponding hidden features to zero; 2) similarly, drop block [7] selects a dense, rectangular region to zero; 3) stochastic depth network [12] removes some residual blocks as a whole during the training stage; and 4) random smoothing [4] adds i.i.d. Gaussian noise to input images to be resistant to adversarial perturbations. As we will see later, all of these ideas are mostly the same, which are composed of the deterministic part - a neural network, and the stochastic part - Bernoulli or Gaussian random variables. + +To study and understand how randomness stabilizes neural networks, we propose a new continuous neural network framework called Neural Stochastic Differential Equation (Neural SDE), which models the continuous limits of ResNet based on the recent proposed Neural ODE model [3] and adds stochastic diffusion and jump terms to cover various commonly used regularization mechanisms based on random noise, including Dropout, stochastic depth and Gaussian smoothing. Inside the Neural SDE model, + +there are drift term – the deterministic part of our network; the diffusion term – the stochastic part driven by multidimensional Brownian motions; and the jump term – the stochastic part driven by Poisson process. Diffusion term is best suited for small but persistent changes to hidden features, such as Gaussian smoothing after each residual block. Jump term works better for strong and sparse strikes to hidden features, examples include dropout/drop block layer and stochastic depth network. Based on the formulation, we draw a theoretical connection between the robustness of neural networks to the stability of the solution. Furthermore, we manage to get the stability condition in the scope of neural network. + +In addition to the theoretical contribution, we also show that it's possible to directly train the Neural SDE model efficiently by numerically solving the SDE system. With the added stochastic regularizations, the proposed continuous neural network outperforms the Neural ODE network in terms of generalizability, adversarial robustness, and nonadversarial robustness on CIFAR10 (or CIFAR10.1 [24]), STL10, as well as Tiny-ImageNet datasets. + +# 2. Related work + +Our work is inspired by the success of the Neural ODE network, and we seek to improve the generalization and robustness of Neural ODE by adding noise in the dynamic system. Regularization mechanisms such as dropout cannot be easily incorporated in the original Neural ODE due to its deterministic nature. + +Neural ODE The idea of formulating ResNet as a dynamic system was discussed in [5]. A framework was proposed to link existing deep architectures with discretized numerical ODE solvers [18], and was shown to be parameter efficient. These networks adopt layer-wise architecture - each layer is parameterized by different independent weights. The Neural ODE model [3] computes hidden states in a different way: it directly models the dynamics of hidden states by an ODE solver, with the dynamics parameterized by a shared model. A memory efficient approach to compute gradient by adjoint methods was developed, making it possible to train large, multi-scale generative networks [1, 9]. Our work can be regarded as an extension of this framework, with the purpose of incorporating a variety of noise-injection based regularization mechanisms. Stochastic differential equation (SDE) in the context of neural network has been studied recently, focusing either on understanding how dropout shapes the loss landscape [27], or on using SDE as a universal function approximation tool to learn the solution of high dimensional PDEs [23]. Instead, we aim to explain why adding random noise boosts the stability of deep networks, and demonstrates the improved generalization and robustness. + +Noisy Neural Networks Adding random noise to different layers is a technique commonly employed in training neural networks. Dropout [26] randomly disables some neurons to avoid overfitting, which can be viewed as multiplying hidden states with Bernoulli random variables. Stochastic depth neural network [12] randomly drops some residual blocks of residual neural network during training time. Another successful regularization for ResNet is Shake-Shake regularization [6], which sets a binary random variable to randomly switch between two residual blocks during training. More recently, dropblock [7] was designed specifically for convolutional layers: unlike dropout, it drops some continuous regions rather than sparse points to hidden states. All of the above regularization techniques are proposed to improve generalization performance. One common characteristic of them is that they fix the network during testing time. There is another line of research that focuses on improving robustness to perturbations/adversarial attacks by noise injection. Among them, random self-ensemble [17, 16] adds Gaussian noise to hidden states during both training and testing time. In training time, it works as a regularizer to prevent overfitting; in testing time, the random noise is also helpful, which will be explained in this paper. Very recently, there are several concurrent work on stochastic version of Neural ODE [13, 29, 30]. However compared with [13] and [29], our paper addresses a very different problem, i.e. the robustness of deep random neural network. And while [30] deals with adversarial robustness (which is also in our scope, but we extend it to non-adversarial robustness), their method is still based on adversarial training. In contrast, we are interested in how and why random noise in training and testing phases improves robustness. + +# 3. Neural SDE model + +Traditional neural networks are usually stacked with multiple layers; recent work [3] shows that we can model it in the continuous limit. This means that there is no notion of discrete layers, and hidden features are changed smoothly. Mathematically it has the following form + +$$ +\boldsymbol {h} _ {t} = \boldsymbol {h} _ {s} + \int_ {s} ^ {t} \boldsymbol {f} \left(\boldsymbol {h} _ {\tau}, \tau ; \boldsymbol {w}\right) \mathrm {d} \tau , \tag {1} +$$ + +where $t > s$ are two different "depths"; $h_t$ is the hidden features at depth $t$ ; $f$ is the residual block parameterized by $w$ . This formula is exactly the continuous limit of the original ResNet [10] structure + +$$ +\boldsymbol {h} _ {n + 1} = \boldsymbol {h} _ {n} + \boldsymbol {f} \left(\boldsymbol {h} _ {n}; \boldsymbol {w} _ {n}\right), \tag {2} +$$ + +here the layer index $n = 1,2,\ldots ,N$ is discrete. Notice that the original Neural ODE model does not contain any randomness in hidden features $\pmb{h}_t$ . Thus it is not ready to model + +a variety of random neural networks (such as dropout). To address this limitation, we augment the original Neural ODE model (1) with two kinds of stochastic terms: one is the diffusion term (to model Gaussian noise), and the other is jump term (to model Bernoulli noise), formally + +$$ +\begin{array}{l} \boldsymbol {h} _ {t} = \boldsymbol {h} _ {s} + \underbrace {\int_ {s} ^ {t} \boldsymbol {f} \left(\boldsymbol {h} _ {\tau} , \tau ; \boldsymbol {w}\right) \mathrm {d} \tau} _ {\text {dr i f t t e r m}} + \underbrace {\int_ {s} ^ {t} \boldsymbol {G} \left(\boldsymbol {h} _ {\tau} , \tau\right) \mathrm {d} \boldsymbol {B} _ {\tau}} _ {\text {d i f f u s i o n t e r m}} \tag {3} \\ + \underbrace {\int_ {s} ^ {t} \boldsymbol {J} (\boldsymbol {h} _ {\tau} , \tau) \odot \mathbf {Z} _ {N _ {\tau}} \mathrm {d} N _ {\tau}} _ {\text {j u m p t e r m}}. \\ \end{array} +$$ + +Compared with Neural ODE model in (1) that only contains deterministic component (drift term), we add two extra terms in (3) to model different nature of randomness: diffusion term and jump term. The diffusion term consists of Brownian motion $\mathbf{B}_t$ and its coefficient $G$ (optionally) parameterized by unknown variables $\pmb{v}$ . Inside the jump term, deterministic function $J(h_{\tau},\tau)$ controls the jump size; Random variables $\mathbf{Z}_{N_{\tau}}\sim \mathrm{Bernoulli}(\pm 1,p)$ controls the direction; and $N_{\tau}\sim \mathrm{Poisson}(\lambda \tau)$ is a Poisson counting process controlling the "frequency" of jumps. For completeness, we include some key properties of Brownian motion to appendix, and for more systematic discussion we refer readers to related sections in [22, 14], informally we can regard the random variable $\mathrm{d}\mathbf{B}_t$ as i.i.d. Gaussian random variables with distribution $\mathcal{N}(0,\mathrm{d}t)$ . Next we will explain these two terms in details. + +Diffusion term. This part is an Itô integral and we know it follows Gaussian distribution. To see it more clearly, we can simply set $G(h_{\tau}, \tau) = \sigma$ and so the result of integration will be $\mathbf{B}_t - \mathbf{B}_s \sim \mathcal{N}(0, (t - s)\sigma^2)$ , which is consistent with adding Gaussian noise to each residual block. For general $G$ , it does allow closed-form solution but the result is still Gaussian, only the variance is now dependent on hidden features $h_{\tau}$ . + +Jump term. The key feature of jump term is that the integral is calculated over Poisson process $N_{t}$ , that is, the total number of jumps in interval $[s,t]$ follows Poisson distribution + +$$ +P \left(N _ {s \rightarrow t} = n\right) = \frac {\left[ \lambda (t - s) \right] ^ {n}}{n !} e ^ {- \lambda (t - s)}, \quad n \in \mathbb {Z} _ {+}. +$$ + +We can imagine that by inserting the jump term to our hidden state transition formula (3), we are effectively adding $n$ dropout layers to the network, where $n$ is drawn from some Poisson distribution; and for each dropout layer, it is randomly placed to any network depth (see Fig. 1 to get a better picture). Additionally, for each dropout layer, the drop probability is determined by Bernoulli random variables $\mathbf{Z}$ . + +![](images/71c1be66f1424b1b80d35335b2c20730d548d7456b35a2c9f0558f753611385d.jpg) +Figure 1. Illustration of dropout layers under (3). + +Rationale of (3). It might not be straightforward to see why our model (3) is a proper replacement for the discrete version of a residual neural network equipped with Gaussian smoothing and Dropout layers. Here we make more justifications about it. We first notice that the noise pattern coming from dropout layers is very different from the noise generated by Gaussian smoothing. By definition, Dropout randomly sets some features to zero, so the noise here is inherently Bernoulli distributed. On the other hand, the diffusion term is a Gaussian process (Ito integral). Therefore, it is not reasonable to model a dropout layer with diffusion term, nor is it suitable to model Gaussian noise with jump term. That is why we use two separate terms in our continuous framework. + +# 3.1. Some concrete examples + +We proposed a new framework in (3) for encoding the randomness into Neural ODE using diffusion and jump terms. Next we will give some concrete examples for these two terms. + +Dropout. Dropout layer randomly disables some connections in neural network, here we consider a common situation where dropout layer is placed after convolutional block and before residual connection (Fig. 2). Mathematically we + +![](images/742025e6440ba8b7a4e310b98de0185fd8a2c219bcb5e6d25bd6881af0e9f259.jpg) +Figure 2. Our dropout layer configuration. + +can formulate it as $\pmb{h}_{t + 1} = \pmb{h}_t + \pmb {f}(\pmb {h}_t;w)\odot \pmb{\gamma}$ , where $\pmb{h}_t$ + +is input features at depth $\tau$ , and $P(\gamma_i = 0) = p_{\mathrm{drop}}$ determines the drop rate. To be compatible with (3), we rewrite it as + +$$ +\begin{array}{l} \boldsymbol {h} _ {t + 1} = \boldsymbol {h} _ {t} + \boldsymbol {f} (\boldsymbol {h} _ {t}; w) \odot \gamma \\ = \boldsymbol {h} _ {t} + \frac {1}{2} \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) + 2 \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) \odot \frac {\gamma - 0 . 5}{2}, \tag {4} \\ = \boldsymbol {h} _ {t} + \frac {1}{2} \boldsymbol {f} (\boldsymbol {h} _ {t}; w) + 2 \boldsymbol {f} (\boldsymbol {h} _ {t}; w) \odot \mathbf {Z} \\ \end{array} +$$ + +where we are essentially shifting Bernoulli random variables from $\gamma$ (with values $\{0,1\}$ ) to $\mathbf{Z}$ (with values $\{-1, + 1\}$ ). Comparing (4) with (3), we arrive at the following continuous version of (4) + +$$ +\boldsymbol {h} _ {t} = \boldsymbol {h} _ {s} + \int_ {s} ^ {t} \frac {1}{2} \boldsymbol {f} (\boldsymbol {h} _ {\tau}; w) \mathrm {d} \tau + \int_ {s} ^ {t} 2 \boldsymbol {f} (\boldsymbol {h} _ {\tau}; w) \odot \mathbf {Z} _ {N _ {\tau}} \mathrm {d} N _ {\tau}. +$$ + +Stochastic depth network. This is very similar to the previous dropout setting, the only difference is that for stochastic depth network, random vector $\gamma$ is no longer i.i.d. Bernoulli distributed but "bonded" together. More formally, $\gamma = \gamma \cdot J$ where $J_{i,j} = 1$ is an all-ones matrix and $\gamma$ is a (scalar) Bernoulli random variable (of values $\{0,1\}$ ). Beyond that, there is no difference with previous dropout layer, and the continuous form of it is + +$$ +\boldsymbol {h} _ {t} = \boldsymbol {h} _ {s} + \int_ {s} ^ {t} \frac {1}{2} \boldsymbol {f} \left(\boldsymbol {h} _ {\tau}; w\right) \mathrm {d} \tau + \int_ {s} ^ {t} 2 \boldsymbol {f} \left(\boldsymbol {h} _ {\tau}; w\right) Z _ {N _ {\tau}} \mathrm {d} N _ {\tau}, \tag {5} +$$ + +here $Z_{N_{\tau}}$ is just a scalar random variable. + +Gaussian-dropout. We can create another kind of dropout noise that does not involve Bernoulli random variables. We first scale the original dropout (4) by $1 - p_{\mathrm{drop}}$ which becomes + +$$ +\boldsymbol {h} _ {t + 1} = \boldsymbol {h} _ {t} + \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) \odot \frac {\gamma}{1 - p _ {\mathrm {d r o p}}}. \tag {6} +$$ + +The reason we add an $1 - p_{\mathrm{drop}}$ scaling factor is that now the output expectation $\mathbb{E}[h_{t + 1}] = h_t + f(h_t;w)$ looks as if no dropout is used, due to the fact that $\mathbb{E}[\gamma ] = 1 - p_{\mathrm{drop}}$ . Disentangling the mean from variance, we have + +$$ +\begin{array}{l} \boldsymbol {h} _ {t + 1} = \boldsymbol {h} _ {t} + \boldsymbol {f} (\boldsymbol {h} _ {t}; w) + \boldsymbol {f} (\boldsymbol {h} _ {t}; w) \odot \left(\frac {\gamma}{1 - p _ {\text {d r o p}}} - \boldsymbol {I}\right) \\ = \boldsymbol {h} _ {t} + \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) + \sqrt {\frac {p _ {\text {d r o p}}}{1 - p _ {\text {d r o p}}}} \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) \odot \boldsymbol {z} _ {t}, \tag {7} \\ \end{array} +$$ + +where $\pmb{I}$ is the identity matrix, and $z_{t} \triangleq \sqrt{\frac{1 - p_{\mathrm{drop}}}{p_{\mathrm{drop}}}}\left(\frac{\gamma}{1 - p_{\mathrm{drop}}} - I\right)$ . We can verify that $z_{t}$ as a two-point distribution, has the same mean and variance as standard Gaussian distribution. So as an approximation, we directly replace $z_{t}$ with + +$\mathcal{N}(0,1)$ . After that, the continuous version becomes + +$$ +\boldsymbol {h} _ {t} = \boldsymbol {h} _ {s} + \int_ {s} ^ {t} \boldsymbol {f} (\boldsymbol {h} _ {\tau}; w) \mathrm {d} \tau + \int_ {s} ^ {t} \sqrt {\frac {p _ {\text {d r o p}}}{1 - p _ {\text {d r o p}}}} \boldsymbol {f} (\boldsymbol {h} _ {t}; w) \odot \mathrm {d} \mathbf {B} _ {\tau}. +$$ + +Gaussian smoothing. As we have mentioned before, Gaussian noise is better modeled by diffusion term. The traditional way of applying Gaussian smoothing is adding small, uncorrelated noise to each hidden layer [17] (or just the input layer [16, 4]), mathematically + +$$ +\boldsymbol {h} _ {t + 1} = \boldsymbol {h} _ {t} + \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) + \mathbf {W} _ {t}, \quad \mathbf {W} _ {t} \sim \mathcal {N} (\mathbf {0}, \sigma^ {2} \boldsymbol {I}). \tag {8} +$$ + +But through experiments we found that multiplicative noise of following form also works + +$$ +\boldsymbol {h} _ {t + 1} = \boldsymbol {h} _ {t} + \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) + \boldsymbol {f} \left(\boldsymbol {h} _ {t}; w\right) \mathbf {W} _ {t}, \quad \mathbf {W} _ {t} \sim \mathcal {N} (\mathbf {0}, \sigma^ {2} \boldsymbol {I}). \tag {9} +$$ + +Unlike (8), the noise scale in (9) grows with the scale of output from convolution block $f(h_{t};w)$ , thus the noise variance is self-adjustable and sometimes it can be advantageous. For both additive and multiplicative Gaussian noise, the integral form is as straightforward as follows + +$$ +\boldsymbol {h} _ {t} = \boldsymbol {h} _ {s} + \int_ {s} ^ {t} \boldsymbol {f} \left(\boldsymbol {h} _ {\tau}; w\right) \mathrm {d} \tau + \left\{ \begin{array}{l} \int_ {s} ^ {t} \boldsymbol {G} (\tau) \mathrm {d} \mathbf {B} _ {\tau}, \\ \int_ {s} ^ {t} \boldsymbol {G} \left(\boldsymbol {h} _ {t}, \tau\right) \mathrm {d} \mathbf {B} _ {\tau}. \end{array} \right. \tag {10} +$$ + +As we can see, for additive noise, diffusion coefficient $G$ is independent on $h_t$ ; while for multiplicative noise, $G$ can change along with hidden features $h_t$ . + +# 3.2. Training algorithm and complexity + +The implementation of the stochastic, continuous neural network training algorithm is similar to Neural ODE [3] and it is stated in Algorithm 1. In fact, we can view (3) as a SDE problem, and standard SDE solvers can be applied here for training. We can see from the algorithm that for forward propagation we pick a standard SDE solvers such as Euler-Maruyama [15], Milstein [21] or higher order Runge-Kutta method, but for backward propagation we simply rely on the automatic gradient provided by major deep learning frameworks. Although it is possible to derive + +Algorithm 1 Forward and backward propagation +1: procedure TRAINING-PROCESS ▷ Do forward & backward propagation +2: Given initial state $h_0$ , integral range [0, T]. +3: $h_T = \text{SDE\_Solve}\left(\boldsymbol{f}(\boldsymbol{h}_t, t; \boldsymbol{w}), \boldsymbol{G}(\boldsymbol{h}_t, t; \boldsymbol{v}), [0, T]\right)$ ▷ Call a black-box SDE solver +4: Calculate loss $L = \ell(h_T)$ . +5: Calculate gradient $\frac{\partial L}{\partial \boldsymbol{w}}$ and $\frac{\partial L}{\partial \boldsymbol{v}}$ with autograd. +6: Update network parameters $\boldsymbol{w}$ and $\boldsymbol{v}$ . + +![](images/0adebde05fcd7df7f1a60d2b3419517fa184487286e3d662529cf0a2d3bb0219.jpg) +Figure 3. Left: we compare the propagation time between Neural ODE, ODE with adjoint, and SDE. We can see that the running time increases proportionally with network depth and there is no significant overhead in our model. Right: We compute the error of SDE solver caused by discretization in Euler schemes, measured by the relative error in $\pmb{h}_t$ , i.e. $\varepsilon = \frac{\|\pmb{h}_T - \hat{\pmb{h}}_T\|}{\|\pmb{h}_T\|}$ and $\pmb{h}_T$ is the ground-truth (computed with a very fine grid), $\hat{\pmb{h}}_T$ is computed with coarse grid $\Delta t \in [1.0 \times 10^{-4}, 1.0 \times 10^{-1}]$ (note that network depth $t = T / \Delta T$ ). + +![](images/f18c7729c24968eb19f674a8b600192750192d9ef47ad41da62889a7e32df46f.jpg) + +an adjoint algorithm as in [3] to save memory consumption, in practice, we find that the most straightforward autograd method works efficiently in all our experiments, see Fig. 3(left). Furthermore, we observe the error caused by discretization is small enough for end tasks even when using a large grid size in SDE solver (Line 3 in Algorithm 1) as shown in Fig 3(right). More details are in the appendix. + +# 4. Connection between jump-diffusion and robustness + +In this section, we build a new explanation to shed some light on answering how noise (inside jump-diffusion term (3)) helps training the robust neural network. It is worth noting that our analysis is very different from the traditional belief that noise acts as a regularizer during training. We focus on the role of randomness in testing time, and in this sense, our idea is complementary to the former. In the following parts, we first deliver a toy example to have a closer view of this phenomenon, and then we present some theories to understand the principles in behind. + +# 4.1. A toy example + +Let's look at a 1-dimensional toy example where randomness stabilizes the system. Suppose we have a simple SDE + +$$ +\mathrm {d} x _ {t} = x _ {t} \mathrm {d} t + \sigma x _ {t} \mathrm {d} \mathbf {B} _ {t}, \tag {11} +$$ + +with $\mathbf{B}_t$ being the standard Brownian motion. When we remove the diffusion term by setting $\sigma = 0$ , (11) becomes an ODE: $\mathrm{d}x_{t} = x_{t}\mathrm{d}t$ with solution $x_{t} = x_{0}e^{t}$ , where $x_0$ is the initialization of $x_{t}$ . If $x_0\neq 0$ , we can see that $x_{t}\rightarrow \pm \infty$ as $t\to \infty$ . In other words, any small perturbation at initialization $x_0 = \epsilon$ will be amplified through the ODE-system at future time $t$ . In contrast, if we add the diffusion back $\sigma \neq 0$ , we then have the classic geometric Brownian motion with solution $x_{t} = x_{0}\exp \big((1 - \sigma^{2} / 2)t + \sigma B_{t}\big)$ . Once the variance of noise is large enough (e.g. $\sigma >\sqrt{2}$ ), then we know that $x_{t}\stackrel {\mathrm{a.s.}}{\rightarrow}0$ . + +To visualize the difference, we run several numerical simulations in Fig. 4 for $x_{t}$ with different variances $\sigma$ . The + +![](images/19b5bb219696067381f6377db840f007b16213199a03855a9639cc56978e0f92.jpg) +Figure 4. Toy example. By comparing the simulations under $\sigma = 0$ and $\sigma = 2.8$ , we see adding noise to the system can be an effective way to control $x_{t}$ . Average over multiple runs is used to cancel out the volatility during the early stage. It is noteworthy that here we employ the multiplicative noise, where the deviation term scales proportionally to $x_{t}$ . + +experiments in Fig. 4 clearly show that the behavior of solution paths can change significantly after adding a diffusion term. This example is inspiring because we can control the impact of perturbations on the output by adding a stochastic term to our networks. + +# 4.2. Theoretical explanation + +Inspired by the toy example above, we theoretically analyze the stability of Neural jump-diffusion equation (3). Our analytical results show that the jump-diffusion terms can indeed improve the robustness of the model against small, arbitrary input perturbations. This finding also explains why noise injection can improve both generalizability and robustness in discrete networks, which has been observed in current literature [17, 16]. To simplify our symbols, we ignore the jump term temporarily and focus on the diffusion term. The following assumptions on drift $\pmb{f}$ and diffusion $G$ guarantee the existence and uniqueness of solution. + +$$ +\begin{array}{l} \text {A s s u m p t i o n 1} f \text {a n d} G \text {a r e a t m o s t l i n e a r , i . e .} \| f (\boldsymbol {x}, t) \| + \\ \| G (\boldsymbol {x}, t) \| \leq c _ {1} (1 + \| \boldsymbol {x} \|) \text {f o r} c _ {1} > 0, \forall \boldsymbol {x} \in \mathbb {R} ^ {n} \text {a n d} t \in \mathbb {R} ^ {+}. \end{array} +$$ + +$$ +\begin{array}{l} \text {A s s u m p t i o n 2 f a n d G a r e c _ {2} - L i p s c h i t z :} \| f (\boldsymbol {x}, t) - \\ \boldsymbol {f} (\boldsymbol {y}, t) \| + \| \boldsymbol {G} (\boldsymbol {x}, t) - \boldsymbol {G} (\boldsymbol {y}, t) \| \leq c _ {2} \| \boldsymbol {x} - \boldsymbol {y} \| \text {f o r c _ {2} > 0 ,} \\ \forall \boldsymbol {x}, \boldsymbol {y} \in \mathbb {R} ^ {n} \text {a n d} t \in \mathbb {R} ^ {+}. \end{array} +$$ + +Based on the above assumptions, we can show that the SDE (3) has a unique solution [22]. We remark that these assumptions on $f$ are quite natural and are also enforced on the original Neural ODE model (see Sec. 6 of [3]). As to the diffusion matrix $G$ , we have seen that at least for additive Gaussian noise (where $G$ is a constant matrix) and multiplicative Gaussian noise (where $G$ is proportional to $f$ ), both assumptions are automatically satisfied as long as $f$ possesses the same regularities. + +We analyze the dynamics of perturbation. Our analysis applies not only to the Neural SDE model but also to the Neural ODE model, by setting the diffusion term $G$ and jump term $J$ to zero. Our idea is illustrated in Fig. 5. First + +![](images/cc34500423cd10df997584d6f9d874fc94179ae0d8d9a275add6975434fc6319.jpg) +Figure 5. Illustration of our analysis. Given a smaller perturbation $\varepsilon$ at the input, how does the error propagation through a deep neural network? If the error is controllable, then we can make sure that the final prediction result is also controllable. In our analysis, we do not need to care about how $h_t$ or $h_t^e$ evolves, only the difference $\varepsilon_t = h_t^e - h_t$ matters; and this is depicted in (13). + +of all, we consider initializing our differential equation (3) at two slightly different values $h_0$ and $h_0^e = h_0 + \varepsilon_0$ , where $h_0$ is the original (clean) input, $\varepsilon_0$ is the perturbation (also called "error") on $h_0$ . In many real problems, the perturbation at input is bounded, i.e. $\| \varepsilon_0 \| \leq \delta$ . Therefore, under the perturbed initialization $h_0^e$ , the hidden states at time $t$ follow the same rule in (3), recalling the jump term is ignored for simplicity, + +$$ +\mathrm {d} \boldsymbol {h} _ {t} ^ {e} = \boldsymbol {f} \left(\boldsymbol {h} _ {t} ^ {e}, t; \boldsymbol {w}\right) \mathrm {d} t + \boldsymbol {G} \left(\boldsymbol {h} _ {t} ^ {e}, t\right) \mathrm {d} \mathbf {B} _ {t} ^ {\prime}, \text {w i t h} \boldsymbol {h} _ {0} ^ {e} = \boldsymbol {h} _ {0} + \varepsilon_ {0}, \tag {12} +$$ + +where $\mathbf{B}_t^\prime$ is Brownian motions for the SDE associated with initialization $h_0^e$ . Then it is natural to analyze how the perturbation $\varepsilon_{t} = h_{t}^{e} - h_{t}$ evolves in the long run. Subtracting (3) from (12), we have + +$$ +\begin{array}{l} \mathrm {d} \varepsilon_ {t} = \left[ \boldsymbol {f} \left(\boldsymbol {h} _ {t} ^ {e}, t; \boldsymbol {w}\right) - \boldsymbol {f} \left(\boldsymbol {h} _ {t}, t; \boldsymbol {w}\right) \right] \mathrm {d} t \\ + \left[ \boldsymbol {G} \left(\boldsymbol {h} _ {t} ^ {e}, t\right) - \boldsymbol {G} \left(\boldsymbol {h} _ {t}, t\right) \right] \mathrm {d} \mathbf {B} _ {t} \tag {13} \\ = \boldsymbol {f} _ {\Delta} (\varepsilon_ {t}, t; \boldsymbol {w}) \mathrm {d} t + \boldsymbol {G} _ {\Delta} (\varepsilon_ {t}, t) \mathrm {d} \mathbf {B} _ {t}. \\ \end{array} +$$ + +Here we made an implicit assumption that the Brownian motions $\mathbf{B}_t$ and $\mathbf{B}_t^\prime$ have the same sample path for both initialization $h_0$ and $h_0^e$ , i.e. $\mathbf{B}_t = \mathbf{B}_t^\prime$ w.p.1. In other words, we focus on the difference of two random processes $h_t$ and $h_t^e$ driven by the same underlying Brownian motion. So it is valid to subtract the diffusion terms. + +An important property of (13) is that it admits a trivial solution $\varepsilon_t \equiv 0, \forall t \in \mathbb{R}^+$ and $\boldsymbol{w} \in \mathbb{R}^d$ . To verify that, we only need to show that both the drift $(f)$ and diffusion $(G)$ are zero under $\varepsilon_t = 0$ : + +$$ +\begin{array}{l} \boldsymbol {f} _ {\Delta} (\mathbf {0}, t; \boldsymbol {w}) = \boldsymbol {f} \left(\boldsymbol {h} _ {t} + \mathbf {0}, t; \boldsymbol {w}\right) - \boldsymbol {f} \left(\boldsymbol {h} _ {t}, t; \boldsymbol {w}\right) = 0, \tag {14} \\ \boldsymbol {G} _ {\Delta} (\boldsymbol {0}, t) = \boldsymbol {G} (\boldsymbol {h} _ {t} + \boldsymbol {0}, t) - \boldsymbol {G} (\boldsymbol {h} _ {t}, t) = 0. \\ \end{array} +$$ + +The implication of zero solution is clear: for a neural network, if we do not perturb the input data, then the output will never change. However, the solution $\varepsilon_{t} = 0$ can be highly unstable, in the sense that for an arbitrarily small perturbation $\varepsilon_0\neq 0$ at initialization, the change of output $\varepsilon_{T}$ can be arbitrarily large. Luckily, as we will show below, by choosing the diffusion term $G$ properly, we can always control $\varepsilon_{t}$ within a small range. + +In general, we cannot get the closed-form solution to a multidimensional SDE, but we can still analyze the asymptotic stability through the dynamics $\pmb{f}$ and $\pmb{G}$ . This is an extension of the Lyapunov stability theory to a stochastic system. First, we define the notion of stability in the stochastic case. Let $(\Omega, \mathcal{F}, P)$ be a complete probability space with filtration $\{\mathcal{F}_t\}_{t \geq 0}$ and $\mathbf{B}_t$ be an $m$ -dimensional Brownian motion defined in the probability space, we consider the SDE in (13) with initial value $\varepsilon_0$ + +$$ +\mathrm {d} \varepsilon_ {t} = \boldsymbol {f} _ {\Delta} \left(\varepsilon_ {t}, t\right) \mathrm {d} t + \boldsymbol {G} _ {\Delta} \left(\varepsilon_ {t}, t\right) \mathrm {d} \mathbf {B} _ {t}, \tag {15} +$$ + +where for simplicity we dropped the dependency on parameters $\boldsymbol{w}$ and $\boldsymbol{v}$ . We further assume $f_{\Delta}:\mathbb{R}^n\times \mathbb{R}_+ \mapsto \mathbb{R}^n$ and $G_{\Delta}:\mathbb{R}^{n}\times \mathbb{R}_{+}\mapsto \mathbb{R}^{n\times m}$ are both Borel measurable. We can show that if assumptions (1) and (2) hold for $\pmb{f}$ and $\pmb{G}$ , then they hold for $f_{\Delta}$ and $G_{\Delta}$ as well (see appendix), and we know the SDE (15) allows a unique solution $\varepsilon_t$ . We have the following Lynapunov stability results from [20]. + +Definition 4.1 (Lyapunov stability of SDE) The solution $\varepsilon_{t} = 0$ of (15): + +A. is stochastically stable if for any $\alpha \in (0,1)$ and $r > 0$ , there exists a $\delta = \delta(\alpha, r) > 0$ such that $\operatorname{Pr}\{\|\pmb{\varepsilon}_t\| < r \text{ for all } t \geq 0\} \geq 1 - \alpha$ whenever $\|\pmb{\varepsilon}_0\| \leq \delta$ . Moreover, if for any $\alpha \in (0,1)$ , there exists a $\delta = \delta(\alpha) > 0$ such that $\operatorname{Pr}\{\lim_{t \to \infty} \|\pmb{\varepsilon}_t\| = 0\} \geq 1 - \alpha$ whenever $\|\pmb{\varepsilon}_0\| \leq \delta$ , it is said to be stochastically asymptotically stable; +B. is almost surely exponentially stable if for all $\varepsilon_0\in \mathbb{R}^n$ $\lim_{t\to \infty}\sup_t\frac{1}{t}\log \| \pmb {\varepsilon}_t\| < 0 a.s.$ + +Note that for part A in Definition 4.1, it is hard to quantify how well the stability is and how fast the solution reaches equilibrium. In addition, under assumptions (1, 2), we have a straightforward result $\operatorname{Pr}\{\varepsilon_t \neq 0 \text{ for all } t \geq 0\} = 1$ whenever $\varepsilon_0 \neq 0$ as shown in appendix. That is, almost all the sample paths starting from a non-zero initialization can never reach zero due to Brownian motion. On the contrary, the almost sure exponentially stability result implies that almost all the sample paths of the solution will be close to zero exponentially fast. One important result regarding to stability of this system is [20], deferred to appendix. We now consider a special case, when the noise is + +Table 1. Evaluating the model generalization under different choices of diffusion matrix $G(h_{t}, t; \mathbf{v})$ introduced above. For the three noise types, we search a suitable parameter $\sigma_{t}$ for each of them so that the diffusion matrix $G$ properly regularizes the model. TTN means testing time noise. We observe adding noises can improve the test accuracy over Neural ODE, and furthermore, noise at testing time is beneficial. + +
DataAccuracy@1 — w/o TTNAccuracy@1 — w/ TTN
ODEAdditiveMultiplicativeDropoutODEAdditiveMultiplicativeDropout
CIFAR-1087.9588.6989.0688.23-88.7389.7788.44
CIFAR-10.170.0070.8071.5071.85-71.7072.0573.60
STL-1058.0361.2360.5461.26-62.1162.5862.13
Tiny/ImageNet45.1945.2546.9447.04-45.3946.6547.81
+ +multiplicative $G(\pmb{h}_t, t) = \sigma \cdot \pmb{h}_t$ and $m = 1$ . The corresponding SDE of perturbation $\varepsilon_t = \pmb{h}_t^e - \pmb{h}_t$ becomes + +$$ +\mathrm {d} \varepsilon_ {t} = \boldsymbol {f} _ {\Delta} \left(\varepsilon_ {t}, t; \boldsymbol {w}\right) \mathrm {d} t + \sigma \cdot \varepsilon_ {t} \mathrm {d} \mathbf {B} _ {t}. \tag {16} +$$ + +Note that for the deterministic case of (16) by setting $\sigma \equiv 0$ , the solution may not be stable in certain cases (see Figure 4). Whereas for general cases when $\sigma > 0$ , following corollary claims that by setting $\sigma$ properly, we will achieve an (almost surely) exponentially stable system. + +Corollary 4.0.1 For (16), if $\pmb{f}(\pmb{h}_t, t; \pmb{w})$ is $L$ -Lipschitz continuous w.r.t. $\pmb{h}_t$ , then (16) has a unique solution with the property $\lim_{t \to \infty} \sup_{t \to \infty} \frac{1}{t} \log \| \pmb{\varepsilon}_t \| \leq -\left( \frac{\sigma^2}{2} - L \right)$ almost surely for any $\pmb{\varepsilon}_0 \in \mathbb{R}^n$ . In particular, if $\sigma^2 > 2L$ , the solution $\pmb{\varepsilon}_t = \mathbf{0}$ is almost surely exponentially stable. + +# 5. Experiment + +In this section, we show the effectiveness of our framework in terms of generalization, non-adversarial robustness, and adversarial robustness. Throughout our experiments, we set $f(\cdot)$ to be a neural network with several convolution blocks. As to $G(\cdot)$ we have the following choices: + +- Neural ODE, this can be done by dropping the diffusion term $G(h_{t}, t) = 0$ . +- Additive noise, when the diffusion term is independent of $\pmb{h}_t$ , here we simply set it to be diagonal $\pmb{G}(\pmb{h}_t, t) = \sigma_t \pmb{I}$ . +- Multiplicative noise, when the diffusion term is proportional to $h_t$ , or $G(h_t, t) = \sigma_t h_t$ . +- Gaussian-dropout noise, when the diffusion term is proportional to the drift term $\pmb{f}(\pmb{h}_t,t;\pmb{w})$ , i.e. $G(h_{t},t) = \sigma_{t}\mathrm{diag}\{\pmb {f}(\pmb {h}_{t},t;\pmb {w})\}$ . + +Note the last three are our proposed model with different types of randomness, as explained in Section 3.1. For more experimental details, the architecture of $\pmb{f}(\cdot)$ and the numerical solver for SDE, please refer to our appendix. Note that we use the same architecture for all the methods mentioned above, so the comparisons are fair. + +# 5.1. Generalization Performance + +In the first experiment, we show a small noise helps generalization. However, note that our noise injection is different from the randomness layer in the discrete case. For instance, dropout layers add Bernoulli noise at training time but not testing time, whereas our model keeps randomness at the testing time and takes the averaged prediction of multiple forward propagations. + +As for datasets, we choose CIFAR-10, STL-10 and TinyImageNet² to include various sizes and number of classes. The experimental results are shown in Table 1. We observe that for all datasets, noisy versions consistently outperform ODE, and the reason is that adding moderate noise to the models at training time can act as a regularizer and thus improves testing accuracy. Based upon that, if we further keep testing time noise and ensemble the outputs, we will obtain even better results. + +# 5.2. Improved non-adversarial robustness + +We evaluate the robustness of models under non-adversarial corruption following the idea of [11]. The corrupted datasets contain tens of defects in photography, including motion blur, Gaussian noise, fog, etc. For each noise type, we run Neural ODE and our model with dropout noise and gather the testing accuracy. The final results are reported by mean accuracy (mAcc) in Table 2 by changing the level of corruption. Both models are trained on clean data, which means the corrupted images are not visible to them during the training stage, nor could they augment the training set with the same types of corruption. From the table, we can see that our model performs better than Neural ODE in 8 out of 10 cases. For the rest two, both ODE and SDE are performing very close. This shows that our proposed neural jump-diffusion improves the robustness of Neural ODE under non-adversarial corrupted data. + +# 5.3. Improved adversarial robustness + +Next, we consider the performance of our models under adversarial perturbation. This scenario is strictly harder than the previous case - perturbations are crafted through + +Table 2. Testing accuracy results under different levels of non-adversarial perturbations. + +
DataNoise typemild corrupt ← Accuracy → severe corrupt
Level 1Level 2Level 3Level 4Level 5
CIFAR10-C†ODE75.8970.5966.5260.9153.02
Dropout77.0271.5867.2161.6153.81
Dropout+TTN79.0773.9869.7464.1955.99
TinyImageNet-C†ODE23.0119.1815.2012.209.88
Dropout22.8518.9414.6411.549.09
Dropout+TTN23.8419.8915.2812.089.44
+ +Downloaded from https://github.com/hendrycks/robustness + +![](images/0d620fed7065f9b5fb01851f3f4788661565efb48932f8e41033140bad6c838b.jpg) +Figure 6. Comparing the robustness against $\ell_2$ -norm constrained adversarial perturbations, on CIFAR-10 (left), STL-10 (middle) and Tiny-ImageNet (right) data. We observe that jump-diffusion model with either multiplicative noise or dropout noise is more resistant to adversarial attack than Neural ODE. + +![](images/48ff13bdb2ad7803cb055041d6c0627c26fc264ef8d95351949610d02b4d0480.jpg) + +![](images/42edc6991bf5b61be294c570df6578c77c4d41985d541cf6a8a6f7eba82954e0.jpg) + +constrained loss maximization procedure, so it represents the worst-case performance. In our experiment, we adopt $\ell_2$ -PGD attack with 20 steps [19]. The experimental results are shown in Figure 6. As we can see, jump-diffusion model with either multiplicative noise or dropout noise is more resistant to adversarial attack than Neural ODE. We also observe dropout noise outperforms multiplicative noise. + +# 5.4. Visualizing the perturbations of hidden states + +![](images/be4a402b55f29be25c446a22cdbf666f6161d4d8a239420ff879f11041bb0a1f.jpg) +Figure 7. Comparing the perturbations of hidden states, $\varepsilon_{t}$ , on both ODE and SDE (we choose dropout-style noise). + +In this experiment, we take a look at the perturbation $\varepsilon_{t} = h_{t}^{e} - h_{t}$ at any time $t$ . Recall that in the 1-d toy example in Figure 4, we observe that the perturbation at time $t$ can be well suppressed by adding a strong diffusion term, which is also confirmed by our theorem. However, it is still questionable whether the same phenomenon also ex + +ists in deep neural networks since we cannot add very large noise to the network during training or testing time. If the noise is too large, it will also remove all useful features. Thus it becomes important to make sure that this will not happen to our models. To this end, we first sample an input $\mathbf{x}$ from CIFAR-10 and gather all the hidden states $\pmb{h}_t$ at time $t = [0, \Delta t, 2\Delta t, \dots, N\Delta t]$ . Then we perform regular PGD attack [19] to find the perturbation $\delta_x$ such that $\pmb{x}_{\mathrm{adv}} = \pmb{x} + \delta_x$ is an adversarial image, and feed the new data $\pmb{x}_{\mathrm{adv}}$ into network again so we get $\pmb{h}_t^e$ at the same time stamps as $\pmb{h}_t$ . Finally we plot the error $\varepsilon_t = \pmb{h}_t^e - \pmb{h}_t$ w.r.t. time $t$ (also called "network depth"), shown in Figure 7. We can observe that by adding a diffusion term (dropout-style noise), the error accumulates much slower than the ordinary Neural ODE model. + +# 6. Conclusion + +To conclude, we introduce the Neural SDE model, which can stabilize the prediction of Neural ODE by injecting stochastic noise. Our model can achieve better generalization and improve the robustness under both adversarial and non-adversarial noises. + +Acknowledgement This work is partially supported by NSF under IIS1719097. + +# References + +[1] Lynton Ardizzone, Jakob Kruse, Sebastian Wirkert, Daniel Rahner, Eric W Pellegrini, Ralf S Klessen, Lena Maier-Hein, Carsten Rother, and Ullrich Kothe. Analyzing inverse problems with invertible neural networks. arXiv preprint arXiv:1808.04730, 2018. 2 +[2] Anurag Arnab, Ondrej Miksik, and Philip H. S. Torr. On the robustness of semantic segmentation models to adversarial attacks. In CVPR, 2018. 1 +[3] Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems, pages 6572-6583, 2018. 1, 2, 4, 5 +[4] Jeremy M Cohen, Elan Rosenfeld, and J Zico Kolter. Certified adversarial robustness via randomized smoothing. arXiv preprint arXiv:1902.02918, 2019. 1, 4 +[5] Weinan E. A proposal on machine learning via dynamical systems. Communications in Mathematics and Statistics, 5(1):1-11, 2017. 2 +[6] Xavier Gastaldi. Shake-shake regularization. arXiv preprint arXiv:1705.07485, 2017. 2 +[7] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Dropout: A regularization method for convolutional networks. In Advances in Neural Information Processing Systems, pages 10727-10737, 2018. 1, 2 +[8] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 1 +[9] Will Grathwohl, Ricky TQ Chen, Jesse Betterncourt, Ilya Sutskever, and David Duvenaud. Ffjord: Free-form continuous dynamics for scalable reversible generative models. arXiv preprint arXiv:1810.01367, 2018. 2 +[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. 2 +[11] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019. 1, 7 +[12] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646-661. Springer, 2016. 1, 2 +[13] Junteng Jia and Austin R. Benson. Neural jump stochastic differential equations, 2019. 2 +[14] Ioannis Karatzas and Steven E Shreve. Brownian motion. In Brownian Motion and Stochastic Calculus, pages 47-127. Springer, 1998. 3 +[15] Peter E Kloeden and Eckhard Platen. Numerical solution of stochastic differential equations, volume 23. Springer Science & Business Media, 2013. 4 +[16] Mathias Lecuyer, Vaggelis Atlidakis, Roxana Geambasu, Daniel Hsu, and Suman Jana. Certified robustness to adversarial examples with differential privacy. arXiv preprint arXiv:1802.03471, 2018. 2, 4, 5 + +[17] Xuanqing Liu, Minhao Cheng, Huan Zhang, and Cho-Jui Hsieh. Towards robust neural networks via random self-ensemble. In Proceedings of the European Conference on Computer Vision (ECCV), pages 369–385, 2018. 2, 4, 5 +[18] Yiping Lu, Aoxiao Zhong, Quanzheng Li, and Bin Dong. Beyond finite layer neural networks: Bridging deep architectures and numerical differential equations. In International Conference on Machine Learning, pages 3282-3291, 2018. 2 +[19] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. 1, 8 +[20] Xuerong Mao. Stochastic differential equations and applications. Elsevier, 2007. 6 +[21] GN Mil'shtein. Approximate integration of stochastic differential equations. Theory of Probability & Its Applications, 19(3):557-562, 1975. 4 +[22] Bernt Øksendal. Stochastic differential equations. In Stochastic differential equations, pages 65-84. Springer, 2003. 3, 5 +[23] Maziar Raissi. Forward-backward stochastic neural networks: Deep learning of high-dimensional partial differential equations. arXiv preprint arXiv:1804.07010, 2018. 2 +[24] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do cifar-10 classifiers generalize to cifar-10? 2018. https://arxiv.org/abs/1806.00451.2 +[25] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imageNet? arXiv preprint arXiv:1902.10811, 2019. 1 +[26] 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. 1, 2 +[27] Qi Sun, Yunzhe Tao, and Qiang Du. Stochastic training of residual networks: a differential equation viewpoint. arXiv preprint arXiv:1812.00174, 2018. 2 +[28] 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 +[29] Belinda Tzen and Maxim Raginsky. Neural stochastic differential equations: Deep latent gaussian models in the diffusion limit, 2019. 2 +[30] Bao Wang, Binjie Yuan, Zuoqiang Shi, and Stanley J Osher. Enresnet: Resnet ensemble via the feynman-kac formalism. In Neural Information Processing Systems, 2019. 2 \ No newline at end of file diff --git a/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/images.zip b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4c64d5f2e18e79301a06fcfb97696baea551aeea --- /dev/null +++ b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41d18971070579a14a84a8deab0e70e86fc0ffa801d2d7cf0c77375e4b1daf2f +size 381906 diff --git a/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/layout.json b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1e1adca9c4a50e5fd79ab2a9da439df1b9791578 --- /dev/null +++ b/howdoesnoisehelprobustnessexplanationandexplorationundertheneuralsdeframework/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e9a06c4d546e2e8b8df25f5fc59fb365aac1d9233bf9cd961cebd8092a70323 +size 477860 diff --git a/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_content_list.json b/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1a0514de4abe706d02c7e26e495840712b9344 --- /dev/null +++ b/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311ea8ed05e360861bc7867d312eae3970ec0b6f861e4c7c31894bef600e22b4 +size 73562 diff --git a/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_model.json b/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2c6fdfc257e6b505bdaa8dbb3a6291f016752821 --- /dev/null +++ b/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aad55c5d1b398664daa1ee2666302469393a531ba80a987cc14e4b80265ab63 +size 92854 diff --git a/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_origin.pdf b/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cfe38202be65e6dd598f404e9e3333d53e92fe93 --- /dev/null +++ b/howmuchtimedoyouhavemodelingmultidurationsaliency/c41cea74-5fe3-47a2-935f-fe83e4143c12_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62b875c24429f857ab13977bb219566a586e695dd3ebfb8e107f8897afc9369e +size 1136168 diff --git a/howmuchtimedoyouhavemodelingmultidurationsaliency/full.md b/howmuchtimedoyouhavemodelingmultidurationsaliency/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5dc3c63d5a3cdfd3c1452274faed72e7ee2ca2db --- /dev/null +++ b/howmuchtimedoyouhavemodelingmultidurationsaliency/full.md @@ -0,0 +1,297 @@ +# How much time do you have? Modeling multi-duration saliency + +Camilo Fosco $^{1}$ , Anelise Newman $^{1}$ , Pat Sukhum $^{2}$ , Yun Bin Zhang $^{2}$ , Nanxuan Zhao $^{3}$ , Aude Oliva $^{1}$ , and Zoya Bylinskii $^{4}$ + +1Massachusetts Institute of Technology, 2Harvard University, 3City University of Hong Kong, 4Adobe Research + +{camilolu, apnewman, oliva}@mit.edu, {psukhum, ybzhang} + +@g.harvard.edu, nanxuanzhao@gmail.com, bylinski@adobe.com + +# Abstract + +What jumps out in a single glance of an image is different than what you might notice after closer inspection. Yet conventional models of visual saliency produce predictions at an arbitrary, fixed viewing duration, offering a limited view of the rich interactions between image content and gaze location. In this paper we propose to capture gaze as a series of snapshots, by generating population-level saliency heatmaps for multiple viewing durations. We collect the CodeCharts1K dataset, which contains multiple distinct heatmaps per image corresponding to 0.5, 3, and 5 seconds of free-viewing. We develop an LSTM-based model of saliency that simultaneously trains on data from multiple viewing durations. Our Multi-Duration Saliency Excited Model (MD-SEM) achieves competitive performance on the LSUN 2017 Challenge with $57\%$ fewer parameters than comparable architectures. It is the first model that produces heatmaps at multiple viewing durations, enabling applications where multi-duration saliency can be used to prioritize visual content to keep, transmit, and render. + +# 1. Introduction + +How long an observer has to examine an image determines what they notice and what tasks they can complete. Despite this dependency of viewing behavior on viewing time, most models of visual attention predict saliency at an arbitrary duration because they are trained on data accumulated over 3 or 5 seconds of viewing [9, 22, 30, 33, 43]. On the other hand, scanpath models, which predict individual gaze trajectories over time, struggle to summarize the attention patterns of a population [2, 3, 27, 42, 53]. + +![](images/2c1d809c465d5fc7fd2c4755bcd2ba25aaa692e46c7f13aa774235caca094584.jpg) +Input image + +![](images/6d7a4c32d37f498eee474ea17588b0a84035576b0ad6b45c46f1a78d3c48b21f.jpg) + +![](images/c478674e715845df62f5b869d5c0e388bd76e0e3402115a778470fd6a20c557a.jpg) +Figure 1: Predictions of our Multi-Duration Saliency Excited Model at three viewing durations. Images are from the Abnormal Objects [46], SALICON [33], and EyeCrowd [34] datasets (top to bottom). Insets with blue borders contain human ground truth collected using the CodeCharts UI. + +![](images/c44f5a1494b44d4a51b715a553d9559afb1527374d595d705f84f05882b1dafd.jpg) +0.5 sec + +![](images/554241d48c1b8bcdac4344c0902a8e2951b11a14427513d93bb005e68152f2b9.jpg) + +![](images/647313f64807ff5a1bdc0861162cb5493c71997a6c6cf42b7986b22a874f55f8.jpg) + +![](images/87ca5a8bb76191e968151d2bcdd964a06c8757b3d0df2aa3ef63ff6f71a00759.jpg) +3 sec + +![](images/26e24b605302da15dec35631a1a7e534282bd82e6498247ba79fcdbec3b7441d.jpg) + +![](images/5cddadc13749cf55e9d0ec1e3f75a9b6cdc220f1c57e76d9a011909659598949.jpg) + +![](images/8330b08b0b5a3ee228f2d2a5642971f528fae4a546c7203f252f7a6a422faca8.jpg) +5 sec + +![](images/65ab4fdcd81eb3586476dd17a8d15e7d85d2c0d13b988ef1a3943800a95c197f.jpg) + +![](images/b4194e730693f71e5b2f528759f70336b9e576aae96de92252d8635fdaaf3a80.jpg) + +In this paper, we introduce the concept of multi-duration saliency, which captures multiple attention snapshots corresponding to different viewing durations (Fig. 1). This offers richer insight into how gaze evolves over time than conventional saliency, while providing a more robust representation than scanpaths (Fig. 2). We leverage an efficient crowdsourcing methodology for collecting large scale human attention data at several viewing durations (Fig. 3). We use it to assemble CodeCharts1K, a dataset of 1000 images with viewing patterns at three durations: 0.5, 3, and 5 seconds. Our data shows that human gaze patterns are highly consistent at each viewing duration but can differ across durations, proving that saliency depends predictably on viewing duration. + +![](images/2eb2164617dea9b3ad1aa539227a5b7335efe148954b65ef4fc2a05ec6c950dc.jpg) +Figure 2: Multi-duration saliency compared to other gaze prediction tasks: combining the stability and generalizability of a population-level metric with rich temporal data. + +To capture this dependency, our multi-duration saliency model takes an image as input and predicts three distinct saliency maps for three different durations. This lightweight model achieves competitive performance when evaluated at a single duration, and outperforms baseline models trained to predict multiple durations. We show that the predicted saliency maps can be used as input to applications such as image cropping, compression/rendering, and captioning to tailor them to different contexts based on viewing time. + +# 2. Related work + +Crowdsourcing attention: Recent efforts at collecting large-scale attention data have used interfaces that can be run remotely, without an eye tracker [11, 33, 37, 38, 41, 45]. Moving-window approaches like SALICON [33] and BubbleView [37] involve using the mouse cursor to inspect small, bubble-shaped regions of blurred images. While providing cheap, high-fidelity data, these interfaces have two downsides: (1) blurring images distorts the visual content and interferes with feature sizes at different resolutions, and (2) moving the cursor requires a different process than moving the eyes, which can impact which image regions are explored [37, 52]. The CodeCharts UI [41, 49] captures attention without distorting the underlying image or relying on mouse movements. It can account for over $80\%$ of human consistency and outperforms other attention-capturing interfaces, including BubbleView, at approximating eye movements [41]. Because it allows for fine-grained control of image presentation time, we use it to capture multi-duration attention data. + +Saliency modeling: The large-scale attention data captured using SALICON [33] and BubbleView [37] enabled training neural network models of saliency (e.g., [11, 22, 30, 43]). The top performers on the MIT Saliency Benchmark [9] were trained on SALICON data and have opened a wide performance gap to the previous, traditional models of saliency [12]. Driven by such improvements in efficiency and accuracy, saliency models have found wide use in applications like image cropping, retargeting, and view-finding + +for improved composition [6, 15, 24, 54]. + +Scanpath modeling: Ground truth saliency maps are computed by accumulating gaze locations of multiple observers over a fixed viewing duration, which averages out patterns in gaze location over time. A complementary approach to representing and modeling human attention is via scanpaths: the sequence of gaze locations that an observer makes on an image over time. Scanpath analysis and modeling is complicated by the fact that individual differences are huge at the level of single gaze locations [3, 39]. This hides the fact that different permutations of traversing image content may nevertheless correspond to a similar allocation of attention to the respective image regions. + +How does multi-duration saliency relate to conventional saliency and scanpaths? We propose an intermediate representation of attention that maintains the robustness of population-level saliency modeling and the temporal resolution of scanpaths (Fig. 2). We introduce multiduration saliency as a way to snapshot attention at a few distinct time points. Unlike conventional saliency, multiduration saliency accounts for the effect of viewing duration on gaze patterns and provides insight into how attention evolves over time. However, in contrast to scanpath prediction, multi-duration saliency is a population-level metric that produces stable, interpretable, and generalizable attention heatmaps. This framing addresses questions like: what content do people prioritize, and what is initially attention grabbing versus noticeable only after seconds of viewing? + +# 3. Collecting multi-duration saliency + +In this section, we introduce a scalable approach to measuring multi-duration saliency that uses a web-based interface as a proxy for eye tracking. + +CodeCharts UI: In the CodeCharts methodology [41, 49], participants view an image for 500-5000 milliseconds followed by a jittered grid of three-character codes ("codechart"). They then self-report the first three-character code they see when the image vanishes (Fig. 3a-c). By construction, participants report the region of the image they were looking at last. The steps in Fig. 3a-d are repeated for dozens of images. The task also contains validation trials consisting of randomly placed cropped faces [5], where we expect the participant to enter a code that overlaps with the face. To ensure data quality, we filter out participants who enter nonexistent codes, fail over $25\%$ of validation images, or look at the same spot repeatedly (more details in the supplement). We collect 50 gaze points per image per viewing duration, which produces on average 44 valid gaze points after filtering. We blur all gaze points (with a Gaussian sigma of 50 pixels) to produce an attention heatmap. + +Pilot experiments: We ran an initial experiment with 50 images from the OSIE dataset [55] to analyze differences in gaze patterns across viewing durations. We collected gaze + +![](images/441d612e0ce672c716a2d7d742be5f104f455dff077d848710dbe75365078eec.jpg) +Figure 3: CodeCharts UI task flow. (a) Participants view an image for a duration chosen by the experimenter. (b) A codechart is briefly flashed on the screen. (c) Participants report the character code they remember looking at last, which indicates where they were gazing on an image. This repeats for a sequence of images, separated by a fixation cross (d) to re-center gaze. Validation trials (e) are interspersed among the experimental sequence to check if participants move their gaze as expected. + +locations for 6 durations: 0.5, 1, 2, 3, 4, and 5 seconds. Attention heatmaps at 0.5, 3, and 5 seconds of viewing were the most distinct from each other (Fig. 4), so we collect further data at these 3 durations. Attention heatmaps at 3 seconds most closely matched the ground truth OSIE data, originally also collected at 3 seconds (Pearson's CC = .62, averaged over 50 OSIE images). This further validates the ability of CodeCharts data to model natural human gaze. + +CodeCharts1K: Our collected dataset contains a variety of image types to provide a broad picture of differences in attention over time. We used 500 images from SALICON [33], 130 from LaMem [36], 120 from CAT2000 [7]², 100 from EyeCrowd [34], 100 from a mix of Abnormal Objects [46] and Out-of-Context Objects [19], and 50 from the Stanford 40K Actions dataset [56]³. Images were padded to the same aspect ratio and resized in-browser to fit in a $700 \times 1000$ pixel window. The task sequence included 6 practice images to pre-screen for attentiveness, 50 dataset images, and 5 validation trials of faces spaced throughout the sequence. We used Amazon's Mechanical Turk and paid participants at an hourly rate of $10. Data collection cost $4.90 per image for 150 unique gaze points (50 participants each at 0.5, 3, and 5 second viewing durations). + +What does CodeCharts measure? We conducted an analysis to understand what aspect of gaze CodeCharts data captures. We had two hypotheses: CodeCharts approximates either (1) people's last fixation before the end of the viewing duration, or (2) all fixations within the viewing duration. For 100 images from the CAT2000 Action category, we used the sequential ground truth eye fixations and assumed that they were equally distributed within the 5-second viewing interval. We then generated two sets of ground truth heatmaps by sampling an equal number of fixations according to our two hypotheses. The similarity between ground truth and CodeCharts heatmaps best sup + +![](images/0aea068c8f22610fbffd3236658f492c4109230754b4b27788993d4718984aa0.jpg) +CodeCharts UI gaze locations +Figure 4: CodeCharts gaze locations collected on an OSIE dataset image at 6 viewing durations (left). The highest correlation with ground truth eye movements (Pearson's CC) occurs when the viewing duration was 3 seconds, the same as the duration used for the eye tracking data collection (right). For further CodeCharts data collection, we used viewing durations of 0.5, 3, and 5 seconds, as they were most distinct from each other. + +ported hypothesis 2 (Pearson's CC of .57 versus .54), which gives us reason to believe that CodeCharts measures what was most salient within the entire viewing interval. + +# 4. Data analysis + +# 4.1. Is multi-duration saliency predictable? + +To measure whether gaze patterns across participants are consistent for a given viewing duration, we perform a split-half consistency analysis on the CodeCharts1K data. We divide participants into two groups, generate a heatmap from each group's gaze points, and compute Pearson's Correlation Coefficient (CC) between the heatmaps. We repeat this computation over 10 splits of participant data and average the scores. To measure whether the gaze patterns vary systematically across durations, we select participants from different viewing duration conditions. + +Saliency is predictable across viewing durations: The split-half consistency between participants is high across all + +durations (CC=.76 at 0.5 sec, CC=.68 at 3 sec, CC=.67 at 5 sec). While the highest consistency occurs at the briefest duration [8, 51], consistency remains high across the longer viewing durations. These findings hold across the image sets tested (more results in the supplement). + +Different things are salient at different durations: When there are differences in what is salient at different durations, CC scores between participants viewing an image at the same duration are higher than CC scores between participants viewing an image at different durations. Gaze patterns are different between .5 and 3 sec for $51\%$ of images from CodeCharts1K; $55\%$ of images show differences between .5 and 5 sec, and $27\%$ of images show differences between 3 and 5 sec. + +These analyses indicate that gaze data collected using the CodeCharts UI contains a consistent signal at each of the viewing durations and the signal differs between viewing durations. This suggests that saliency is predictable at different viewing durations, setting the stage for the computational model in Sec. 5. + +# 4.2. What is salient when? + +Things and stuff: We used COCO segmentation maps [13] of the SALICON images to compute gaze counts per object class over time. From 0.5 to 3 seconds, gaze frequently moves away from people and towards objects and furniture (e.g., paper, bottle, table). From 3 to 5 seconds, there is an increase in attention on "stuff" (like grass, carpet, and road) that may contain other objects. At these longer durations people gaze more at small and distant objects. + +Faces: We know that gaze is attracted by faces [12, 14]. For a finer-grained analysis, we ran a face detection network [26] over images in CodeCharts1K. Across the 266 images where faces were detected, we computed a measure of face saliency at different durations. At each duration, we counted all the gaze points that land on a face region and normalized by the number of gaze points per image across all 3 durations, so face saliency ranges between 0 and 1. Fig. 5a plots face saliency as a function of viewing duration for each image. Across CodeCharts1K, we find a dominant "boomerang" pattern (found in $33\%$ of images with faces): people notice faces at 0.5 sec, their gaze shifts elsewhere at 3 sec, and returns to faces at 5 sec. The second most prevalent pattern is a decrease in gaze on faces over time $(24\%)$ . Other patterns, like an increase in face saliency over time, were in the minority. These observations are consistent with the phenomenon known as inhibition of return (IOR) [31, 47], or the relative suppression of visual cues that were recently attended to. Samuel and Kat [50] found that IOR lasts for approximately 3 seconds, which might explain why attention tends to shift away from faces between 0.5 and 3 sec but often returns to faces at 5 sec. + +Qualitatively, human gaze frequently moves from the ac + +![](images/1db713680b708469e3e169eb2b61ec746cec1ee8fdace6c0a971251eaf741779.jpg) +Face saliency as a function of viewing duration (per image) + +![](images/99ca5426b6ff2252a962e6ab28a888869aae49f13f64dd98f3d5a5c8bfd09964.jpg) +b) + +![](images/a8e6b2e17eda721b57f0055861d37547bf308dccbefeda7b6a84bc560f1a785e.jpg) +Figure 5: Dominant patterns of human gaze on faces across time. (a) Individual lines plot how the saliency of faces within an image varies across viewing durations. Thicker lines (labeled) are averages over the dominant patterns. We include the percent of images that follow each pattern. (b) Examples where face saliency decreases from 0.5 to 3 sec, increasing again from 3 to 5 sec ("boomerang"). (c) Examples where face saliency decreases from 0.5 to 5 sec. + +tor (at 0.5 sec) to the action (at 3 and 5 sec). Sometimes this shift in attention is gradual: saliency at 3 sec is a combination of saliency at 0.5 and 5 sec (Fig. 5c). In other cases, saliency at 5 sec is more similar to that at 0.5 sec; in these cases it seems that people explore an image before returning to the most interesting regions (Fig. 5b). + +# 5. Modeling multi-duration saliency + +To efficiently and accurately predict multiple saliency maps for a single image, we introduce the Multi-Duration Saliency Excited Model (MD-SEM), a novel architecture designed for multi-duration saliency (Fig. 6). MD-SEM is the first model that outputs multiple saliency maps corresponding to different viewing durations. The core of our model is a new Temporal Excitation Module (TEM) that applies a time-based re-weighting to saliency feature maps with a minimal increase in parameters. We also design a + +![](images/ab7f9c801181b3f2a490e75be9471cf97f3e0d672db22ab074f0ae6b0e8fcff9.jpg) +Figure 6: Architecture of our Multi-Duration Saliency Excited Model (MD-SEM). The encoder outputs compressed feature maps that are fed to the Temporal Excitation Module (TEM). In order to predict saliency across durations, TEM uses LSTM cells to generate scaling vectors that re-weight the feature maps differently for each duration. The modified feature maps are then decoded into saliency heatmaps. Reused features and shared weights keep the architecture lightweight. + +new loss, the Correlation Coefficient Match (CCM) loss, that encourages the network to capture temporal patterns. + +# 5.1. Architecture motivation + +Current saliency architectures tend to be bulky, with large numbers of parameters and specialized modules. For instance, the Saliency Attentive Model (SAM) [22] uses an Attentive Convolutional LSTM and a Learned Prior module with several 5x5 convolutions, bringing the total model size to more than 70M parameters. CASNet [25], which applies channel reweighting over 1024 channels, has 142M parameters. We present an accurate model of reduced size and complexity by distilling the required components to a minimum: (1) a strong Xception-based encoder [20], (2) a temporal processing module that operates on a compressed representation, and (3) a simple regularized decoder. + +# 5.2. Convolutional encoder-decoder + +Convolutional encoder-decoder architectures are particularly effective for image-to-image tasks like segmentation [4, 16, 40] and saliency prediction [11, 32, 43]. Encoding the image allows for rich feature extraction and reduces the dimensionality of the input. We use a state-of-the-art backbone as our encoder: the Xception network [20] pretrained on ImageNet. The Xception network is lightweight and accurate (0.790 top-1 accuracy on ImageNet with only 22M parameters) and has shown success in semantic segmentation [17]. For the decoder, our experiments showed that a simple module composed of 3 sets of convolution, up-sampling and dropout layers are sufficient for this task. This choice of module reduces model complexity and implicitly regularizes the network. + +# 5.3. Temporal Excitation Module + +To predict multi-duration saliency, we introduce a module that recursively manipulates the feature representation generated by the encoder to adapt it for each duration. Our module uses a Long Short Term Memory (LSTM) network to generate scaling vectors that re-weight the feature maps differently for each of $T$ timesteps (where $T = 3$ in our implementation). Feature map re-weighting has been explored in the form of Squeeze and Excitation Modules [29], but has not been exploited as a temporal modification tool. + +The architecture of the Temporal Excitation Module (TEM) is shown in Fig. 6. First, the feature maps generated by the encoder are pooled through global average pooling and passed through a fully connected layer, which reduces the dimensionality of the feature vector and aids in generalization. The output of the dense layer is replicated $T$ times and fed as a sequence to the LSTM. The LSTM then outputs $T$ vectors, which contain information specific to each timestep and will be used to rescale each feature map differently. These vectors are passed through a fully-connected layer that increases their dimensionality to match the channel dimension of the feature maps $(C)$ , yielding scaling vectors $s^{(t)}$ of length $C$ . A sigmoid non-linearity ensures that the scaling weights remain within a sensible range. Finally, the block outputs a set of $T$ feature maps, which are obtained by rescaling the original feature maps according to each of the $T$ vectors $s$ . Formally, the module outputs $T$ sets of $C$ feature maps, where each feature map $f_{c}^{(t)}$ is computed as: + +$$ +f _ {c} ^ {(t)} = I _ {c} \cdot s _ {c} ^ {(t)}, +$$ + +where $I_{c}$ is the $c$ -th input feature map and $s_{c}^{(t)}$ is the scaling weight for duration $t$ and channel $c$ . + +Efficiency: TEM is designed to be lightweight. TEM's LSTM operates over a squeezed, low-dimensional vector obtained from pooling input feature maps. By contrast, SAM [22], a top-performing saliency model, uses an LSTM for internal map refinement that operates on full 3D feature maps. Our approach results in an architecture with 30 million parameters, $57\%$ smaller than SAM [22]. In Sec. 6.3, we show that our architecture outperforms SAM. + +# 5.4. Correlation Coefficient Match Loss + +To ensure that our network correctly captures differences across viewing durations, we introduce a novel training loss called Correlation Coefficient Match (CCM) loss. This loss forces the network to output saliency maps that reproduce the correlations between ground truth saliency maps at adjacent durations. If ground truth maps at durations $t$ and $t + 1$ are dissimilar, we encourage the network to produce equally dissimilar maps at these durations. Given a set of $T$ viewing durations for which we want to predict saliency maps, we calculate the CCM loss by computing Pearson's Correlation Coefficient (CC) on pairs of saliency maps at adjacent durations, then computing the difference between the ground truth and predicted scores. CC is defined as: $CC(y_{1},y_{2}) = \frac{\sigma(y_{1},y_{2})}{\sigma(y_{1})\cdot\sigma(y_{2})}$ , where $\sigma (y_1,y_2)$ is the covariance of $y_{1}$ and $y_{2}$ . If we let $y^{(t)}$ be the heatmap corresponding to duration $t$ , our CCM loss is: + +$$ +\begin{array}{l} L _ {C C M} \left(y _ {g}, y _ {p}\right) = \\ \frac {1}{T - 1} \sum_ {t = 0} ^ {T - 1} \left| C C \left(y _ {g} ^ {(t)}, y _ {g} ^ {(t + 1)}\right) - C C \left(y _ {p} ^ {(t)}, y _ {p} ^ {(t + 1)}\right) \right| \\ \end{array} +$$ + +where $y_{g}^{(t)}$ and $y_{p}^{(t)}$ are the ground truth and predicted saliency maps for duration $t$ , respectively. + +This novel loss boosts performance on multi-duration saliency prediction, increasing the NSS score of MD-SEM by nearly $5\%$ on CodeCharts1K (see the supplement for detailed numbers). + +# 5.5. Implementation details + +Architecture: We remove the last fully connected layer from the Xception decoder in order to obtain a feature map of size $H \times W \times 2048$ . TEM contains a 512-unit fully connected layer, followed by an LSTM with 512 cells, a ReLU non-linearity, and a sigmoid-activated fully connected layer with 2048 parameters to transform the scaling vector back to its input size. The decoder is composed of 3 sets of convolutional blocks with Dropout. Finally, a 1x1 convolution with 1 filter is used to reduce the final set of feature maps to a single-channel saliency heatmap. Note that the same decoder is applied to each of the $T$ outputs of TEM, thus + +concentrating time information exclusively in that module and reducing model complexity. + +Loss: The network's loss is a weighted combination of our novel CCM loss, Kullback Leibler divergence (KL), Pearson's Correlation Coefficient (CC) and Normalized Scanpath Saliency (NSS) (see [10] for formulations). Since NSS is more robust than other metrics at measuring the quality of saliency predictions [10], we place a higher weight on NSS. We set the weights to 3 for CCM, 10 for KL, -5 for CC and -10 for NSS during SALICON-MD training (Sec. 6.1), but changed the NSS weight to -1 for CodeCharts1K training to account for the reduction in the number of fixations per image. + +# 6. Evaluation + +# 6.1. Datasets + +For training, we use the SALICON-MD (Multi-Duration) and CodeCharts1K datasets. We created SALICON-MD from the original SALICON dataset [33] by bucketing a participant's attention locations based on when they occurred. Since no timestamps were provided, we assumed an even distribution across the viewing duration (from 0 to 5 seconds) and split the attention locations into 6 buckets. This time-bucketed data serves as an approximate but large pretraining dataset. For final training and evaluation, we use ground truth multi-duration data from CodeCharts1K (introduced in Sec. 3). + +# 6.2. Training details + +Our training scheme takes advantage of both datasets to create a model that is generalizable and accurate at every duration. In order to learn from as much data as possible, we pretrain on SALICON-MD. Pretraining on temporal data that exhibits differences across durations is important so that our model learns at the outset to discriminate between timesteps. We then fine-tune on ground truth CodeCharts1K. For both datasets, we set the batch size to 8 and the initial learning rate to 1e-4, which is reduced by a factor of ten every three epochs. At the beginning of training we freeze the weights of the encoder for one epoch. We found that 10 epochs of training on SALICON-MD and 5 on CodeCharts1K was sufficient. For SALICON-MD, we used the provided test, train, and validation splits. For CodeCharts1K, we trained on $70\%$ of the images, validated on $5\%$ , and tested on $25\%$ . + +# 6.3. Comparison to state-of-the-art + +Multi-duration baselines: Our model is first-of-its-kind in its ability to predict saliency at multiple durations. To demonstrate the superiority of our model over existing single-duration models, we compare to a baseline that represents the best alternative for obtaining multiple distinct + +
ModelParams ↓500ms3000ms5000msAll durations
CC ↑NSS ↑KL ↓CC ↑NSS ↑KL ↓CC ↑NSS ↑KL ↓CC ↑NSS ↑KL ↓
SAM × 3210.3M0.8043.2360.3660.6932.4090.5450.7062.4800.5370.7342.7080.483
SAM-MD70.1M0.8053.1810.3700.7382.5410.4690.7152.4950.5350.7532.7390.458
MD-SEM30.9M0.8163.3740.3510.7452.6940.4520.7342.6770.4870.7652.9150.430
+ +Table 1: Comparison of multi-duration saliency models evaluated on CodeCharts1K. Baselines are SAM×3 (three copies of SAM, each trained exclusively on data for one duration) and SAM-MD (a custom modification of SAM whose LSTM outputs multiple maps). MD-SEM (ours) excels across all three viewing durations, while using substantially fewer parameters. + +
ModelNSS↑CC↑KL↓SIM↑
SAM-res [22]1.9900.8990.6100.793
EML-Net [32]2.0500.8860.5200.780
SalNet [44]1.8590.622--
CEDNS2.0450.8621.0260.753
MD-SEM (Ours)2.0580.8680.5680.774
+ +Table 2: Comparison to state-of-the-art on SALICON test set (LSUN 2017 Challenge). + +saliency heatmaps: training multiple copies of a state-of-the-art architecture on the ground truth for 3 different durations. We call this approach $SAM \times 3$ . Next, to demonstrate the advantages of our particular architecture, we benchmark against SAM-MD, a modified, multi-duration version of SAM where the LSTM is modified to produce a different saliency map at each timestep. Each output map corresponds to a different viewing duration and the network trains on all three durations simultaneously. The results of these comparisons on all three CodeCharts durations are shown in Table 1. Not only is MD-SEM better at approximating human gaze and differentiating across durations, but it also uses many fewer parameters than the other models. Our model performs particularly well on images from LaMem and CAT2000, but struggles on images with out-of-context objects or complex actions (see the supplement). + +Single-duration baselines: We also evaluated our architecture on the conventional single-duration saliency task and obtained a performance competitive with state-of-the-art saliency models. MD-SEM achieves a second-place NSS score on the LSUN 2017 challenge [1] (Table 2). + +Qualitatively, our model accurately reproduces many of the dominant human gaze patterns from the CodeCharts1K dataset, such as the tendency of humans to focus on the object of an action at longer viewing durations, and for attention to shift from the center of the image to smaller details and secondary objects (Fig. 10). + +# 7. Applications + +Saliency models have proven useful for many image processing applications, including smart cropping, retargeting, and image captioning. Our multi-duration saliency model + +![](images/bbb7e1dee26e9d5862737bef9acd25da517bb9b37e98f0248fbe5db388c4adb6.jpg) +Figure 7: Cropping. Images automatically cropped based on cumulative viewing duration by selecting the window with $90\%$ of the most salient image regions as predicted by our model. Image crops for shorter viewing durations contain close-ups of key elements. + +can contribute additional context by accounting for the expected time that a viewer may have to explore an image. In this section, we discuss how multi-duration saliency can be used to adapt existing saliency-driven applications. + +Cropping: Automatic image cropping is useful for thumbnailing, view-finding for improved composition, and retargeting for different use cases [23]. Multi-duration saliency allows us to additionally take into account the expected time a viewer will spend on an image (e.g., an image that is part of a passing advertisement should contain fewer elements than if it is the main image on a page). In Fig. 7 we use our multi-duration saliency maps to crop windows that capture $90\%$ of the heatmap density that occurs at or below a particular viewing duration [18]. Our automatically-generated thumbnails contain close-ups of the most important objects at shorter viewing durations. + +Compression and rendering: Multi-duration saliency heatmaps can indicate the order in which items in a scene should be rendered to provide a seamless user experience. In Fig. 8 we visualize which elements would be prioritized at different viewing durations. To generate these visualizations, we used Mask R-CNN for instance segmentation [28]. We accumulated saliency heatmap density for each instance across time to determine which instances to pri + +![](images/ef83f9262086a6c45a764fe797e6cb1eb4e0c0fce9c6908247531cb3f10c7528.jpg) +Figure 8: Compression. We visualize instance detections that are predicted to attract gaze at different viewing durations (accumulated over time). Content that is salient at short durations could be rendered before content that becomes salient later. + +![](images/7e6201ae173d02358207449e255f15bbd5b54aba36c4049073dd5b8be26e7247.jpg) +Figure 9: Captioning. Captions generated by passing saliency-enhanced images to an image captioning model [48], using saliency at different viewing durations to prioritize image content. + +oritize. Instances with a mean saliency score in the 90th percentile were kept and the rest of the image was blurred and darkened for visualization purposes. + +Captioning: Image captions can facilitate search and improve accessibility. Some recent work attempts to use a saliency map to guide attention for captioning [21]; however the saliency model does not explicitly model the temporal aspect of human attention. In Fig. 9, we used our saliency predictions to focus an image captioning model [48] on regions that should stand out at different viewing durations. Removing the non-salient visual clutter can benefit caption quality. + +# 8. Conclusion + +Guided by the insight that where you focus on an image depends on how much time you have to explore it, we tackle the problem of predicting multi-duration saliency: saliency as a function of viewing duration. We propose a scalable, crowdsourced technique for gathering ground + +![](images/261dab9d418d73cf85546d5a2be43b4376cba3c82a879d81570aeefaec92f32f.jpg) +Figure 10: MD-SEM predictions on various datasets. Insets contain human ground truth from CodeCharts1K. Our model approximates human attention by shifting saliency from faces to objects of action across time (a,c,d) and shifting the center of focus from the center of the image to secondary image regions at longer viewer durations (b,e). Difficult cases for our model include cluttered scenes with many objects, people, or complex actions (f,g). + +truth multi-duration saliency data and use it to collect the CodeCharts1K dataset. Our LSTM-based saliency model is a top performer at predicting conventional saliency while also providing predictions at multiple durations. We provided initial hints of how multi-duration saliency could be used in applications which require prioritizing visual content, but unfortunately, your viewing time is up. + +Acknowledgements: We thank our funding sources: the Vannevar Bush Faculty Fellowship program by the ONR (N00014-16-1-3116) and the SystemsThatLearn@CSAIL / Ignite Grant (to A.O). Work supported in part by cloud credits from the MIT Quest for Intelligence. + +# References + +[1] SALICON Saliency Prediction Challenge (LSUN 2017). https://competitions.codalab.org/competitions/17136#results. +[2] Marc Assens, Xavier Giroi Nieto, Kevin McGuinness, and Noel E. O'Connor. Pathgan: Visual scanpath prediction with generative adversarial networks. CoRR, abs/1809.00567, 2018. +[3] Marc Assens Reina, Xavier Giró-i Nieto, Kevin McGuinness, and Noel E. O'Connor. Saltinet: Scan-path prediction on 360 degree images using saliency volumes. In ICCV Workshop on Egocentric Perception, Interaction and Computing, Oct 2017. +[4] Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE transactions on pattern analysis and machine intelligence, 39(12):2481-2495, 2017. +[5] Wilma A Bainbridge, Phillip Isola, and Aude Oliva. The intrinsic memorability of face photographs. Journal of Experimental Psychology: General, 142(4):1323, 2013. +[6] Ali Borji. Saliency prediction in the deep learning era: An empirical investigation. arXiv preprint arXiv:1810.03716, 2018. +[7] Ali Borji and Laurent Itti. CAT2000: A large scale fixation dataset for boosting saliency research. CVPR'15 Workshop on the Future of Datasets, 2015. +[8] Guy Thomas Buswell. How people look at pictures: a study of the psychology and perception in art. 1935. +[9] Zoya Bylinskii, Tilke Judd, Ali Borji, Laurent Itti, Frédo Durand, Aude Oliva, and Antonio Torralba. Mit saliency benchmark. +[10] Zoya Bylinskii, Tilke Judd, Aude Oliva, Antonio Torralba, and Frédo Durand. What do different evaluation metrics tell us about saliency models? IEEE transactions on pattern analysis and machine intelligence, 41(3):740-757, 2019. +[11] Zoya Bylinskii, Nam Wook Kim, Peter O'Donovan, Sami Alsheikh, Spandan Madan, Hanspeter Pfister, Fredo Durand, Bryan Russell, and Aaron Hertzmann. Learning visual importance for graphic designs and data visualizations. In Proceedings of the 30th Annual ACM Symposium on User Interface Software and Technology, pages 57-69. ACM, 2017. +[12] Zoya Bylinskii, Adrià Recasens, Ali Borji, Aude Oliva, Antonio Torralba, and Frédo Durand. Where should saliency models look next? In European Conference on Computer Vision, pages 809-824. Springer, 2016. +[13] Holger Caesar, Jasper Uijlings, and Vittorio Ferrari. Cocosstuff: Thing and stuff classes in context. In Computer vision and pattern recognition (CVPR), 2018 IEEE conference on. IEEE, 2018. +[14] Moran Cerf, E Paxon Frady, and Christof Koch. Faces and text attract gaze independent of the task: Experimental data and computer model. Journal of vision, 9(12):10-10, 2009. +[15] Jiansheng Chen, Gaocheng Bai, Shaoheng Liang, and Zhengqin Li. Automatic image cropping: A computational complexity study. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 507-515, 2016. + +[16] 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, 2018. +[17] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 801-818, 2018. +[18] Yi-Ling Chen, Tzu-Wei Huang, Kai-Han Chang, Yu-Chen Tsai, Hwann-Tzong Chen, and Bing-Yu Chen. Quantitative analysis of automatic image cropping algorithms: a dataset and comparative study. In IEEE WACV 2017, 2017. +[19] Myung Jin Choi, Antonio Torralba, and Alan S Willsky. Context models and out-of-context objects. Pattern Recognition Letters, 33(7):853-862, 2012. +[20] 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. +[21] Marcella Cornia, Lorenzo Baraldi, Giuseppe Serra, and Rita Cucchiara. Paying more attention to saliency: Image captioning with saliency and context attention. ACM Transactions on Multimedia Computing, Communications, and Applications (TOMM), 14(2):48, 2018. +[22] Marcella Cornia, Lorenzo Baraldi, Giuseppe Serra, and Rita Cucchiara. Predicting human eye fixations via an LSTM-based saliency attentive model. IEEE Transactions on Image Processing, 27(10):5142-5154, 2018. +[23] Rachel England. Twitter uses smart cropping to make image previews more interesting. https://engadget.com/2018/01/25/twitter-uses-smart-cropping-to-make-image-previews-m +[24] Seyed A Esmaeili, Bharat Singh, and Larry S Davis. Fast-at: Fast automatic thumbnail generation using deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4622-4630, 2017. +[25] Shaojing Fan, Zhiqi Shen, Ming Jiang, Bryan Koenig, Juan Xu, Mohan Kankanhalli, and Qi Zhao. Emotional attention: A study of image sentiment and visual attention. pages 7521-7531, 06 2018. +[26] Adam Geitgey. Face recognition. http://github.com/ageitgey/face_recognition. +[27] Rui Han and Shuangjiu Xiao. Human visual scanpath prediction based on rgb-d saliency. In Proceedings of the 2018 International Conference on Image and Graphics Processing, ICIGP 2018, pages 180-184, New York, NY, USA, 2018. ACM. +[28] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. +[29] 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. +[30] Xun Huang, Chengyao Shen, Xavier Boix, and Qi Zhao. Salicon: Reducing the semantic gap in saliency prediction by + +adapting deep neural networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 262-270, 2015. +[31] Laurent Itti and Christof Koch. Computational modeling of visual attention. Nature reviews. Neuroscience, 2:194-203, 04 2001. +[32] Sen Jia. Eml-net: An expandable multi-layer network for saliency prediction. arXiv preprint arXiv:1805.01047, 2018. +[33] Ming Jiang, Shengsheng Huang, Juanyong Duan, and Qi Zhao. Silicon: Saliency in context. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1072-1080, 2015. +[34] Ming Jiang, Juan Xu, and Qi Zhao. Saliency in crowd. In European Conference on Computer Vision, pages 17-32. Springer, 2014. +[35] Tilke Judd, Fredo Durand, and Antonio Torralba. Fixations on low-resolution images. Journal of Vision, 11(4):14-14, 2011. +[36] Aditya Khosla, Akhil S. Raju, Antonio Torralba, and Aude Oliva. Understanding and predicting image memorability at a large scale. In International Conference on Computer Vision (ICCV), 2015. +[37] Nam Wook Kim, Zoya Bylinskii, Michelle A Borkin, Krzysztof Z Gajos, Aude Oliva, Fredo Durand, and Hanspeter Pfister. Bubbleview: an interface for crowdsourcing image importance maps and tracking visual attention. ACM Transactions on Computer-Human Interaction (TOCHI), 24(5):36, 2017. +[38] Kyle Krafka, Aditya Khosla, Petr Kellnhofer, Harini Kannan, Suchendra Bhandarkar, Wojciech Matusik, and Antonio Torralba. Eye tracking for everyone. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2176-2184, 2016. +[39] Olivier Le Meur and Thierry Baccino. Methods for comparing scanpaths and saliency maps: strengths and weaknesses. Behavior research methods, 45(1):251-266, 2013. +[40] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. +[41] Anelise Newman, Barry McNamara, Camilo Fosco, Yun Bin Zhang, Pat Sukhum, Matthew Tancik, Nam Wook Kim, and Zoya Bylinskii. TurkEyes: A web-based toolbox for crowdsourcing attention data. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, 2020. +[42] Thuyen Ngo and B.S. Manjunath. Saccade gaze prediction using a recurrent neural network. In IEEE International Conference on Image Processing, Sep 2017. +[43] Junting Pan, Cristian Canton, Kevin McGuinness, Noel E. O'Connor, Jordi Torres, Elisa Sayrol, and Xavier and Giro-i Nieto. Salgan: Visual saliency prediction with generative adversarial networks. In arXiv, January 2017. +[44] Junting Pan, Elisa Sayrol, Xavier Giro-i Nieto, Kevin McGuinness, and Noel E O'Connor. Shallow and deep convolutional networks for saliency prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 598-606, 2016. + +[45] Alexandra Papoutsaki, Patsorn Sangkloy, James Laskey, Nediyana Daskalova, Jeff Huang, and James Hays. Webgazer: Scalable webcam eye tracking using user interactions. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence-IJCAI 2016, 2016. +[46] Sangdon Park, Wonsik Kim, and Kyoung Mu Lee. Abnormal object detection by canonical scene-based contextual model. In European Conference on Computer Vision (ECCV), 2012. +[47] Michael Posner and Yoav Cohen. Components of visual orienting. Attention and performance X: Control of language processes, 32:531-, 01 1984. +[48] Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jerret Ross, and Vaibhava Goel. Self-critical sequence training for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7008-7024, 2017. +[49] Dmitry Rudoy, Dan B Goldman, Eli Shechtman, and Lihi Zelnik-Manor. Crowdsourcing gaze data collection. Proceedings of ACM Collective Intelligence Conference, 2012. +[50] Arthur Samuel and Donna Kat. Inhibition of return: A graphical meta-analysis of its time course and an empirical test of its temporal and spatial properties. Psychonomic bulletin review, 10:897-906, 01 2004. +[51] Benjamin W Tatler, Mary M Hayhoe, Michael F Land, and Dana H Ballard. Eye guidance in natural vision: Reinterpreting salience. Journal of vision, 11(5):5-5, 2011. +[52] Hamed R Tavakoli, Fawad Ahmed, Ali Borji, and Jorma Laaksonen. Saliency revisited: Analysis of mouse movements versus fixations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1774-1782, 2017. +[53] Yixiu Wang, Bin Wang, Xiaofeng Wu, and Liming Zhang. Scanpath estimation based on foveated image saliency. Cognitive Processing, 18, 10 2016. +[54] Zijun Wei, Jianming Zhang, Xiaohui Shen, Zhe Lin, Radomír Mech, Minh Hoai, and Dimitris Samaras. Good view hunting: learning photo composition from dense view pairs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5437-5446, 2018. +[55] Juan Xu, Ming Jiang, Shuo Wang, Mohan S Kankanhalli, and Qi Zhao. Predicting human gaze beyond pixels. Journal of vision, 14(1):28-28, 2014. +[56] Bangpeng Yao, Xiaoye Jiang, Aditya Khosla, Andy Lai Lin, Leonidas Guibas, and Li Fei-Fei. Human action recognition by learning bases of action attributes and parts. In 2011 International Conference on Computer Vision, pages 1331–1338. IEEE, 2011. \ No newline at end of file diff --git a/howmuchtimedoyouhavemodelingmultidurationsaliency/images.zip b/howmuchtimedoyouhavemodelingmultidurationsaliency/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bc26c1bedcc5692553d9e36f6094b93339e4729c --- /dev/null +++ b/howmuchtimedoyouhavemodelingmultidurationsaliency/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c8bc2593331a18a9eba995563f218bb9eb5a129bd9c8ffe2a46ff3031b0939e +size 571463 diff --git a/howmuchtimedoyouhavemodelingmultidurationsaliency/layout.json b/howmuchtimedoyouhavemodelingmultidurationsaliency/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..62e2a19109e6c2fb15ff5ed804a38541b9fbb7bf --- /dev/null +++ b/howmuchtimedoyouhavemodelingmultidurationsaliency/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86cc8afc761de97a2d0c9346bfb090071f641634481734e5c6e534c2deff3a5f +size 360900 diff --git a/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_content_list.json b/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..567ceade30385539412a293492f5364578b93063 --- /dev/null +++ b/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48c1a3b0e1087ee53264e2c7444af7578966d885a6b1cc22c61434ea22d39505 +size 81883 diff --git a/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_model.json b/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f1a4ed21731810e7d1e00d42426196d321b38193 --- /dev/null +++ b/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea80872e2c9db7d419425d88222367131c756cfbe2cee156a80e23a36f053556 +size 99955 diff --git a/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_origin.pdf b/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..44d0abbcec6dedbfced2273cd83e24a92d408c23 --- /dev/null +++ b/howtotrainyourdeepmultiobjecttracker/720d4d9f-66d6-4711-bffa-3a9a07ce4c60_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:964f28ad92f816a6f6377f814ab0e74edca5c17c2bac951544b508a2217f1469 +size 1073109 diff --git a/howtotrainyourdeepmultiobjecttracker/full.md b/howtotrainyourdeepmultiobjecttracker/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cc51c4d96f4e7bb53aa67d8c2450fe6f02fa0a75 --- /dev/null +++ b/howtotrainyourdeepmultiobjecttracker/full.md @@ -0,0 +1,308 @@ +# How To Train Your Deep Multi-Object Tracker + +Yihong Xu $^{1}$ Aljosa Osep $^{2}$ Yutong Ban $^{1,3}$ Radu Horaud $^{1}$ Laura Leal-Taixe $^{2}$ Xavier Alameda-Pineda $^{1}$ + +1Inria, LJK, Univ. Grenoble Alpes, France 2Technical University of Munich, Germany 3Distributed Robotics Lab, CSAIL, MIT, USA + +$^{1}\{\text { firstname. lastname } \} @ \text { inria.fr }$ $^{2}\{\text { aljosa. osep, leal. taixe } \} @ \text { tum.de }$ $^{3}\text { yban@csail.mit.edu }$ + +# Abstract + +The recent trend in vision-based multi-object tracking (MOT) is heading towards leveraging the representational power of deep learning to jointly learn to detect and track objects. However, existing methods train only certain submodules using loss functions that often do not correlate with established tracking evaluation measures such as Multi-Object Tracking Accuracy (MOTA) and Precision (MOTP). As these measures are not differentiable, the choice of appropriate loss functions for end-to-end training of multi-object tracking methods is still an open research problem. In this paper, we bridge this gap by proposing a differentiable proxy of MOTA and MOTP, which we combine in a loss function suitable for end-to-end training of deep multi-object trackers. As a key ingredient, we propose a Deep Hungarian Net (DHN) module that approximates the Hungarian matching algorithm. DHN allows estimating the correspondence between object tracks and ground truth objects to compute differentiable proxies of MOTA and MOTP, which are in turn used to optimize deep trackers directly. We experimentally demonstrate that the proposed differentiable framework improves the performance of existing multi-object trackers, and we establish a new state of the art on the MOTChallenge benchmark. Our code is publicly available from https://github.com/yihongXU/deepMOT. + +# 1. Introduction + +Vision-based multi-object tracking (MOT) is a longstanding research problem with applications in mobile robotics and autonomous driving. It is through tracking that we become aware of surrounding object instances and anticipate their future motion. The majority of existing methods for pedestrian tracking follow the tracking-by-detection paradigm and mainly focus on the association of detector responses over time. A significant amount of research investigated combinatorial optimization techniques for this challenging data association problem [37, 36, 41, 49, 8, 7]. + +Recent data-driven trends in MOT leverage the representational power of deep networks for learning identity + +![](images/a277645e22a765a20216c17993c5a8dd9fc127ddf62f1095be8d5d8561fd5eee.jpg) +Figure 1. We propose DeepMOT, a general framework for training deep multi-object trackers including the DeepMOT loss that directly correlates with established tracking evaluation measures [6]. The key component in our method is the Deep Hungarian Net (DHN) that provides a soft approximation of the optimal prediction-to-ground-truth assignment, and allows to deliver the gradient, back-propagated from the approximated tracking performance measures, needed to update the tracker weights. + +preserving embeddings for data association [24, 43, 46], learning the appearance model of individual targets [12, 50] and learning to regress the pose of the detected targets [4]. However, these methods train individual parts of the MOT pipeline using proxy losses (e.g. triplet loss [40] for learning identity embeddings), that are only indirectly related to the MOT evaluation measures [6]. The main difficulty in defining loss functions that resemble standard tracking evaluation measures is due to the need of computing the optimal matching between the predicted object tracks and the ground-truth objects. This problem is usually solved by using the Hungarian (Munkres) algorithm (HA) [23], which contains non-differentiable operations. + +The significant contribution of this paper is a novel, differentiable framework for the training of multi-object trackers (Fig. 1): it proposes a differentiable variant of the standard CLEAR-MOT [6] evaluation measures, which we combine into a novel loss function, suitable for end-to-end training of MOT methods. In particular, we introduce a differentiable network module - Deep Hungarian Net (DHN) - that approximates the HA and provides a soft approximation of the optimal prediction-to-ground-truth assignment. The proposed approximation is based on a bidirectional recurrent neural network (Bi-RNN) that computes the (soft) assignment matrix based on the prediction- + +to-ground-truth distance matrix. We then express both the MOTA and MOTP [6] as differentiable functions of the computed (soft) assignment matrix and the distance matrix. Through DHN, the gradients from the approximated tracking performance measures are back-propagated to update the tracker weights. In this way, we can train object trackers in a data-driven fashion using losses that directly correlate with standard MOT evaluation measures. In summary, this paper makes the following contributions: + +(i) We propose novel loss functions that are directly inspired by standard MOT evaluation measures [6] for end-to-end training of multi-object trackers. +(ii) In order to back-propagate losses through the network, we propose a new network module - Deep Hungarian Net - that learns to match predicted tracks to ground-truth objects in a differentiable manner. +(iii) We demonstrate the merit of the proposed loss functions and differentiable matching module by training the recently published Tracktor [4] using our proposed framework. We demonstrate improvements over the baseline and establish a new state-of-the-art result on MOTChallenge benchmark datasets [32, 25]. + +# 2. Related Work + +Tracking as Discrete Optimization. With the emergence of reliable object detectors [13, 15, 26] tracking-by-detection has become the leading tracking paradigm. These methods first perform object detection in each image and associate detections over time, which can be performed online via frame-to-frame bi-partite matching between tracks and detections [23]. As early detectors were noisy and unreliable, several methods search for the optimal association in an offline or batch fashion, often posed as a network flow optimization problem [36, 41, 49, 8, 7]. + +Alternatively, tracking can be posed as a maximum-a-posteriori (MAP) estimation problem by seeking an optimal set of tracks as a conditional distribution of sequential track states. Several methods perform inference using conditional random fields (CRFs) [33, 10, 35], Markov chain Monte Carlo (MCMC) [34] or a variational expectation-maximization [1, 2, 3]. These methods in general, use hand-crafted descriptors for the appearance model, such as color histograms [33, 9], optical flow based descriptors [10] and/or motion models [26, 35] as association cues. Therefore typically only a few parameters are trainable and are commonly learned using grid/random search or tree of parzen window estimators [5, 35]. In the case of CRF-based methods, the weights can be trained using structured SVM [45, 47]. + +Deep Multi-Object Tracking. Recent data-driven trends in MOT leverage representational power of deep neural networks. Xiang et al. [48] learn track birth/death/association policy by modeling them as Markov Decision Processes + +(MDP). As the standard evaluation measures [6] are not differentiable, they learn the policy by reinforcement learning. + +Several existing methods train parts of their tracking methods using losses, not directly related to tracking evaluation measures [6]. Kim et al. [21] leverages pre-learned CNN features or a bilinear LSTM [22] to learn the long-term appearance model. Both are incorporated into (Multiple Hypothesis Tracking) MHT framework [37]. Other methods [16, 24, 46, 43] learn identity-preserving embeddings for data association using deep neural networks, trained using contrastive [17], triplet [40] or quadruplet loss [43]. At inference time, these are used for computing data association affinities. Approaches by [12, 50] learn the appearance model of individual targets using an ensemble of single-object trackers that share a convolutional backbone. A spatiotemporal mechanism (learned online using a cross-entropy loss) guides the online appearance adaptation and prevents drifts. All these methods are only partially trained, and sometimes in various stages. Moreover, it is unclear how to train these methods to maximize established tracking metrics. + +Most similar to our objective, Wang et al. [47] propose a framework for learning parameters of linear cost association functions, suitable for network flow optimization [49] based multi-object trackers. They train parameters using structured SVM. Similar to our method, they devise a loss function, that resembles MOTA: the intra-frame loss penalizes false positives (FP) and missed targets while the inter-frame component of the loss penalizes false associations, ID switches, and missed associations. However, their loss is not differentiable and is only suitable for training parameters within the proposed min-cost flow framework. Chu et al. [11] propose an end-to-end training framework that jointly learns feature, affinity and multi-dimensional assignment. However, their losses are not directly based on MOTA and MOTP. Schulter et al. [41] parameterize (arbitrary) cost functions with neural networks and train them end-to-end by optimizing them with respect to the min-flow training objective. Different from [41], our approach goes beyond learning the association function, and can be used by any learnable tracking method. + +Bergmann et al. [4] propose a tracking-by-regression approach to MOT. The method is trained for the object detection task using a smooth $L_{1}$ loss for the bounding box regressor. Empirically, their method is able to regress bounding boxes in high-frame rate video sequences with no significant camera motion. Apart from the track birth and death management, this approach is fully trainable, and thus it is a perfect method for demonstrating the merit of our training framework. Training this approach on a sequence-level data using our proposed loss further improves the performance and establishes a new state of the art on the MOTChallenge benchmark [25]. + +# 3. Overview and Notation + +The objective of any MOT method is to predict tracks in a video sequence. Each track $\mathbf{X}^i$ is associated with an identity $i$ , and consists of $L_{i}$ image bounding boxes $\mathbf{x}_{t_l}^i \in \mathbb{R}^4$ (2D location and size), $l = 1, \dots, L_i$ . The task of a multi-object tracker is to accurately estimate the bounding boxes for all identities through time. + +At evaluation time, the standard metrics operate frame-by-frame. At frame $t$ , the $N_{t}$ predicted bounding boxes, $\mathbf{x}_t^{i_1},\ldots ,\mathbf{x}_t^{i_{N_t}}$ must be compared to the $M_{t}$ ground-truth objects, $\mathbf{y}_t^{j_1},\ldots ,\mathbf{y}_t^{j_{M_t}}$ . We first need to compute the correspondence between predicted bounding boxes and ground-truth objects. This is a non-trivial problem as multiple ground-truth boxes may overlap and thus can fit to several track hypotheses. In the following we will omit temporal index $t$ to ease the reading. All expressions will be evaluated with respect to time index $t$ unless specified otherwise. + +The standard metrics, proposed in [6], tackle this association problem using bi-partite matching. First, a prediction-to-ground-truth distance matrix $\mathbf{D} \in \mathbb{R}^{N \times M}$ , $d_{nm} \in [0,1]$ is computed. For vision-based tracking, an intersection-over-union (IoU) based distance is commonly used. Then, the optimal prediction-to-ground-truth assignment binary matrix is obtained by solving the following integer program using the Hungarian algorithm (HA) [23]: + +$$ +\mathbf {A} ^ {*} = \underset {\mathbf {A} \in \{0, 1 \} ^ {N \times M}} {\operatorname {a r g m i n}} \sum_ {n, m} d _ {n m} a _ {n m}, \text {s . t .} \sum_ {m} a _ {n m} \leq 1, \forall n; +$$ + +$$ +\sum_ {n} a _ {n m} \leq 1, \forall m; \sum_ {m, n} a _ {n m} = \min \{N, M \}. +$$ + +By solving this integer program we obtain a mutually consistent association between ground-truth objects and track predictions. The constraints ensure that all rows and columns of the assignment should sum to 1, thus avoiding multiple assignments between the two sets. After finding the optimal association, $\mathbf{A}^*$ , we can compute the MOTA and MOTP measures using $\mathbf{A}^*$ and $\mathbf{D}$ : + +$$ +\mathrm {M O T A} = 1 - \frac {\sum_ {t} \left(\mathrm {F P} _ {t} + \mathrm {F N} _ {t} + \mathrm {I D S} _ {t}\right)}{\sum_ {t} M _ {t}}, \tag {1} +$$ + +$$ +\mathrm {M O T P} = \frac {\sum_ {t} \sum_ {n , m} d _ {t n m} a _ {t n m} ^ {*}}{\sum_ {t} | \mathrm {T P} _ {t} |}, \tag {2} +$$ + +where $a_{tnm}^{*}$ is the $(n,m)$ -th entry of $\mathbf{A}^{*}$ at time $t$ . The true positives (TP) correspond to the number of matched predicted tracks and false positives (FP) correspond to the number of non-matched predicted tracks. False negatives (FN) denote the number of ground-truth objects without a match. Finally, to compute ID switches (IDS) we need to keep track of past-frame assignments. Whenever the track + +assigned to a ground truth object changes, we increase the number of IDS and update the assignment structure. + +As these evaluation measures are not differentiable, existing strategies only optimize the trackers' hyperparameters (using, e.g. random or grid search) that maximize MOTA or MOTP or a combination of both. In their current version, MOTA and MOTP cannot be directly used for tracker optimization with gradient descent techniques. + +# 4. DeepMOT + +The first step to compute the CLEAR-MOT [6] tracking evaluation measures is to perform bi-partite matching between the sets of ground-truth objects and of predicted tracks. Once the correspondence between the two sets is established, we can count the number of TP, FN, and IDS needed to express MOTA and MOTP. As the main contribution of this paper, we propose a differentiable loss inspired by these measures, following the same two-step strategy. We first propose to perform a soft matching between the two sets using a differentiable function, parameterized as a deep neural network. Once we establish the matching, we design a loss, approximating the CLEAR-MOT measures, as a combination of differentiable functions of the (soft) assignment matrix and the distance matrix. Alternative measures such as IDF1 [39] focus on how long the tracker correctly identifies targets instead of how often mismatches occur. However, MOTA and IDF1 have a strong correlation. This is reflected in our results – by optimizing our loss, we also improve the IDF1 measure (see Sec. 5.3). In the following, we discuss both the differentiable matching module (Sec. 4.1) and the differentiable version of the CLEAR-MOT measures [6] (Sec. 4.2). + +# 4.1. Deep Hungarian Net: DHN + +In this section, we introduce DHN, a fundamental block in our DeepMOT framework. DHN produces a proxy $\tilde{\mathbf{A}}$ that is differentiable w.r.t. $\mathbf{D}$ . Thus DHN provides a bridge to deliver gradient from the loss (to be described later on) to the tracker. We formalize DHN with a non-linear mapping that inputs $\mathbf{D}$ and outputs the proxy soft assignment matrix $\tilde{\mathbf{A}}$ . DHN is modeled by a neural network $\tilde{\mathbf{A}} = g(\mathbf{D}, \omega_d)$ with parameters $\omega_d$ . Importantly, the DHN mapping must satisfy several properties: (i) the output $\tilde{\mathbf{A}}$ must be a good approximation to the optimal assignment matrix $\mathbf{A}^*$ , (ii) this approximation must be differentiable w.r.t. $\mathbf{D}$ , (iii) both input and output matrix are of equal, but varying size and (iv) $g$ must take global decisions as the HA does. + +While (i) will be achieved by setting an appropriate loss function when training the DHN (see Sec. 5.1), (ii) is ensured by designing DHN as a composite of differentiable functions. The requirements (iii) and (iv) push us to design a network that can process variable (but equal) input and output sizes, where every output neuron has a receptive field + +![](images/4b58ddc56b6094b6f70dafc1957df4e9083d50404446bde35f91e50ff79a7c11.jpg) +Figure 2. Structure of the proposed Deep Hungarian Net. The row-wise and column-wise flattening are inspired by the original Hungarian algorithm, while the Bi-RNN allows for all decisions to be taken globally, thus is accounting for all input entries. + +equals to the entire input. We opt for bi-directional recurrent neural networks (Bi-RNNs). Alternatively, one could consider the use of fully convolutional networks, as these would be able to process variable input/output sizes. However, large assignment problems would lead to partial receptive fields, and therefore, to local assignment decisions. + +We outline our proposed architecture in Fig. 2. In order to process a 2D distance matrix $\mathbf{D}$ using RNNs, we perform row-wise (column-wise) flattening of $\mathbf{D}$ . This is inspired by the original HA that performs sequentially row-wise and column-wise reductions and zero-entry verifications and fed it to Bi-RNNs (see details below), opening the possibility for $g(\cdot)$ to make global assignment decisions. + +Precisely, we perform flattening sequentially, i.e., first row-wise followed by column-wise. The row-wise flattened $\mathbf{D}$ is input to a first Bi-RNN that outputs the first-stage hidden representation of size $N\times M\times 2h$ , where $h$ is the size of the Bi-RNN hidden layers. Intuitively the first-stage hidden representation encodes the row-wise intermediate assignments. We then flatten the first-stage hidden representation column-wise, to input to a second Bi-RNN that produces the second-stage hidden representation of size $N\times M\times 2h$ . The two Bi-RNNs have the same hidden size, but they do not share weights. Intuitively, the second-stage hidden representation encodes the final assignments. To translate these encodings into the final assignments, we feed the second-stage hidden representation through three fully-connected layers (along the $2h$ dimension, i.e., independently for each element of the original $\mathbf{D}$ ). Finally, a sigmoid activation produces the optimal $N\times M$ soft-assignment matrix $\tilde{\mathbf{A}}$ . Note that in contrast to the binary output of the Hungarian algorithm, DHN outputs a (soft) assignment matrix $\tilde{\mathbf{A}}\in [0,1]^{N\times M}$ . + +Distance Matrix Computation. The most common metric for measuring the similarity between two bounding boxes is the Intersection-over-Union (IoU). Note that, in principle, the input $\mathbf{D}$ can be any (differentiable) distance function. However, if two bounding boxes have no intersection, the distance $1 - \mathrm{IoU}$ will always be a constant value of 1. In that case, the gradient from the loss will be 0, and no information will be back-propagated. For this reason, our distance is an average of the Euclidean center-point distance and the Jaccard distance $\mathcal{J}$ (defined as $1 - \mathrm{IoU}$ ): + +$$ +d _ {n m} = \frac {f \left(\mathbf {x} ^ {n} , \mathbf {y} ^ {m}\right) + \mathcal {J} \left(\mathbf {x} ^ {n} , \mathbf {y} ^ {m}\right)}{2}. \tag {3} +$$ + +$f$ is the Euclidean distance normalized w.r.t. the image size: + +$$ +f \left(\mathbf {x} ^ {n}, \mathbf {y} ^ {m}\right) = \frac {\| c \left(\mathbf {x} ^ {n}\right) - c \left(\mathbf {y} ^ {m}\right) \| _ {2}}{\sqrt {H ^ {2} + W ^ {2}}}, \tag {4} +$$ + +where function $c(\cdot)$ computes the center point of the bounding box and $H$ and $W$ are the height and the width of the video frame, respectively. Both the normalized Euclidean distance and Jaccard distance have values in the range of [0, 1], so do all entries $d_{nm}$ . Our framework admits any distance that is expressed as a composition of differentiable distance functions. In the experimental section, we demonstrate the benefits of adding a term that measures the cosine distance between two learned appearance embeddings. In the following, we explain how we compute a differentiable proxy of MOTA and MOTP as functions of $\mathbf{D}$ and $\tilde{\mathbf{A}}$ . + +# 4.2. Differentiable MOTA and MOTP + +In this section, we detail the computation of two components of the proposed DeepMOT loss: differentiable MOTA (dMOTA) and MOTP (dMOTP). As discussed in Sec. 3, to compute the classic MOTA and MOTP evaluation measures, we first find the optimal matching between predicted tracks and ground-truth objects. Based on $\mathbf{A}^*$ , we count FN, FP and IDS. The latter is computed by comparing assignments between the current frame and previous frames. To compute the proposed dMOTA and dMOTP, we need to express all these as differentiable functions of $\mathbf{D}$ and $\tilde{\mathbf{A}}$ computed using DHN (see Sec. 4.1). + +The operations described in the following are illustrated in Fig. 3. First, we need to count FN and FP. Therefore, we need to obtain a count of non-matched tracks and non-matched ground-truth objects. To this end, we first construct a matrix $\mathbf{C}^r$ by appending a column to $\tilde{\mathbf{A}}$ , filled with a threshold value $\delta$ (e.g., $\delta = 0.5$ ), and perform row-wise softmax (Fig. 3a). Analogously, we construct $\mathbf{C}^c$ by appending a row to $\tilde{\mathbf{A}}$ and perform column-wise softmax (Fig. 3b). Then, we can express a soft approximation of the number of FP and FN as: + +$$ +\tilde {\mathrm {F P}} = \sum_ {n} \mathbf {C} _ {n, M + 1} ^ {r}, \quad \tilde {\mathrm {F N}} = \sum_ {m} \mathbf {C} _ {N + 1, m} ^ {c}. \tag {5} +$$ + +Intuitively, if all elements in $\tilde{\mathbf{A}}$ are smaller than the threshold $\delta$ , then entries of $\mathbf{C}_{n,M + 1}^{r}$ and $\mathbf{C}_{N + 1,m}^{c}$ will be close to 1, signaling we have a FP or FN. Otherwise, the element with the largest value in each row/column of $\mathbf{C}^r$ and + +![](images/f145748f7562e6c19f2460affc47a97169c82a5232072b0329bcb88f0a317fa0.jpg) +Figure 3. DeepMOT loss: $dMOTP$ (top) is computed as the average distance of matched tracks and $dMOTA$ (bottom) is composed with FP, IDS and FN. + +$\mathbf{C}^c$ (respectively) will be close to 1, signaling that we have a match. Therefore, the sum of the $N + 1$ -th row of $\mathbf{C}^c$ (Fig. 3b) and of the $M + 1$ -th column of $\mathbf{C}^r$ (Fig. 3a) provide an soft estimate of the number of FN and the number of FP, respectively. We will refer to these as $\tilde{\mathrm{FN}}$ and $\tilde{\mathrm{FP}}$ . + +To compute the soft approximations $\hat{\mathrm{IDS}}$ and $dMOTP$ , we additionally need to construct two binary matrices $\mathbf{B}^{\mathrm{TP}}$ and $\mathbf{B}_{-1}^{\mathrm{TP}}$ , whose non-zero entries signal true positives at the current and previous frames respectively. Row indices of these matrices correspond to indices assigned to our tracks and column indices correspond to ground truth object identities. We need to pad $\mathbf{B}_{-1}^{\mathrm{TP}}$ for element-wise multiplication because the number of tracks and objects varies from frame-to-frame. We do this by filling-in rows and columns of $\mathbf{B}_{-1}^{\mathrm{TP}}$ to adapt the matrix size for the newly-appeared objects at the current frame by copying their corresponding rows and columns from $\mathbf{B}^{\mathrm{TP}}$ . Note that we do not need to modify $\mathbf{B}^{\mathrm{TP}}$ to compensate for newly appearing objects as these do not cause IDS. By such construction, the sum of $\mathbf{C}_{1:N,1:M}^{c}\odot \overline{\mathbf{B}}_{-1}^{\mathrm{TP}}$ (where $\overline{\mathbf{B}}$ is the binary complement of $\mathbf{B}$ ) yields the (approximated) number of IDS (Fig. 3c): + +$$ +\tilde {\mathbf {I D S}} = \left\| \mathbf {C} _ {1: N, 1: M} ^ {c} \odot \overline {{\mathbf {B}}} _ {- 1} ^ {\mathrm {T P}} \right\| _ {1}, \tag {6} +$$ + +where $\| \cdot \|_1$ is the $L_1$ norm of a flattened matrix. With these ingredients, we can evaluate $dMOTA$ : + +$$ +d M O T A = 1 - \frac {\tilde {\mathrm {F P}} + \tilde {\mathrm {F N}} + \gamma \tilde {\mathrm {I D S}}}{M}. \tag {7} +$$ + +$\gamma$ controls the penalty we assign to $\tilde{\mathrm{IDS}}$ . Similarly, we can + +![](images/72b6041db9048ce2306024f9227299227eee5bb1aeae96905db940a5b5eb0e2e.jpg) +Figure 4. The proposed MOT training strategy (bottom) accounts for the track-to-object assignment problem, solved by the proposed DHN, and approximates the standard MOT losses, as opposed to the classical training strategies (top) using the non-differentiable HA. + +express $dMOTP$ as: + +$$ +d M O T P = 1 - \frac {\left\| \mathbf {D} \odot \mathbf {B} ^ {\mathrm {T P}} \right\| _ {1}}{\left\| \mathbf {B} ^ {\mathrm {T P}} \right\| _ {0}}. \tag {8} +$$ + +Intuitively, the $L_{1}$ norm expresses the distance between the matched tracks and ground-truth objects, and the zero-norm $\| \cdot \|_0$ counts the number of matches. Since we should train the tracker to maximize MOTA and MOTP, we propose the following DeepMOT loss: + +$$ +\mathcal {L} _ {\text {D e e p M O T}} = (1 - d \text {M O T A}) + \lambda (1 - d \text {M O T P}), \tag {9} +$$ + +where $\lambda$ is a loss balancing factor. By minimizing our proposed loss function $\mathcal{L}_{\mathrm{DeepMOT}}$ , we are penalizing FP, FN and IDS - all used by the CLEAR-MOT measures [6]. Same as for the standard CLEAR-MOT measures, $dMOTA$ , $dMOTP$ must be computed at every time frame $t$ . + +# 4.3. How To Train Your Deep Multi-Object Tracker + +The overall tracker training procedure is shown in Fig. 4. We randomly sample a pair of consecutive frames from the training video sequences. These two images together with their ground-truth bounding boxes constitute one training instance. For each such instance, we first initialize the tracks with ground-truth bounding boxes (at time $t$ ) and run the forward pass to obtain the track's bounding-box predictions in the following video frame (time $t + 1$ ). To mimic the effect of imperfect detections, we add random perturbations to the ground-truth bounding boxes (see supplementary material for details). We then compute $\mathbf{D}$ and use our proposed DHN to compute $\tilde{\mathbf{A}}$ (Sec. 4.1). Finally, we compute our proxy loss based on $\mathbf{D}$ and $\tilde{\mathbf{A}}$ (Sec. 4.2). This provides us with a gradient that accounts for the assignment, and that is used to update the weights of the tracker. + +# 5. Experimental Evaluation + +In this section, we first experimentally verify that our proposed DHN is a good approximation to HA [23] for bi + +partite matching, as required by MOT evaluation measures (Sec. 5.1). To show the merit of the proposed framework, we conduct several experiments on several datasets for evaluating pedestrian tracking performance (Sec. 5.2). + +# 5.1. DHN Implementation Details + +In this section, we provide insights into the performance of our differentiable matching module and outline the training and evaluation details. + +DHN Training. To train the DHN, we create a data set with pairs of matrices $(\mathbf{D}$ and $\mathbf{A}^*$ ), separated into 114,483 matrices for training and 17,880 for matrices testing. We generate distance matrices $\mathbf{D}$ using ground-truth bounding boxes and public detections, provided by the MOT challenge datasets [32, 25]. We generate the corresponding assignment matrices $\mathbf{A}^*$ (as labels for training) using HA described in [6]. We pose the DHN training as a 2D binary classification task using the focal loss [28]. We compensate for the class imbalance (between the number of zeros $n_0$ and ones $n_1$ in $\mathbf{A}^*$ ) by weighting the dominant zero-class using $w_0 = n_1 / (n_0 + n_1)$ . We weight the one-class by $w_1 = 1 - w_0$ . We evaluate the performance of DHN by computing the weighted accuracy (WA): + +$$ +\mathrm {W A} = \frac {w _ {1} n _ {1} ^ {*} + w _ {0} n _ {0} ^ {*}}{w _ {1} n _ {1} + w _ {0} n _ {0}}, \tag {10} +$$ + +where $n_1^*$ and $n_0^*$ are the number of true and false positives, respectively. Since the output of the DHN are between 0 and 1, we threshold the output at 0.5. Under these conditions, the network in Fig. 2 scores a WA of $92.88\%$ . In the supplementary material, we provide (i) an ablation study on the choice of recurrent unit, (ii) a discussion of alternative architectures, (iii) an analysis of the impact of the distance matrix size on the matching precision and (iv) we experimentally assess how well the DHN preserves the properties of assignment matrices. + +DHN Usage. Once the DHN is trained with the strategy described above, its weights are fixed: they are not updated in any way during the training of the deep trackers. + +# 5.2. Experimental Settings + +We demonstrate the practical interest of the proposed framework by assessing the performance of existing (deep) multi-object trackers when trained using the proposed framework on several datasets for pedestrian tracking. We first ablate the loss terms and the tracking architectures. We also evaluate the impact of the framework with respect to other training alternatives. Finally, we establish a new state-of-the-art score on the MOTChallenge benchmark. + +Datasets and Evaluation Metrics. We use the MOT15, MOT16, and MOT17 datasets, which provide crowded + +pedestrian video sequences captured in the real-world outdoor and indoor scenarios. For the ablation study, we divide the training sequences into training and validation. The details of the split can be found in the supplementary material. In addition to the standard MOTP and MOTA measures [6], we report the performance using the IDF1 [39] measure, defined as the ratio of correctly identified detections over the average number of ground-truth objects and object tracks. We also report mostly tracked (MT) and mostly lost (ML) targets, defined as the ratio of ground-truth trajectories that are covered by a track hypothesis more than $80\%$ and less than $20\%$ of their life span respectively. + +Tracktor. Tracktor [4] is an adaptation of the Faster RCNN [38] object detector to the MOT task. It uses a region proposal network (RPN) and the classification/regression heads of the detector to (i) detect objects and (ii) to follow the detected targets in the consecutive frames using a bounding box regression head. As most parts of Tracktor are trainable, this makes this method a perfect candidate to demonstrate the benefits of our framework. Note that Tracktor was originally trained only on the MOTChallenge detection dataset and was only applied to video sequences during inference. In the following, we will refer to Tracktor trained in this setting as Vanilla Base Tracktor. Thanks to DeepMOT, we can train Tracktor directly on video sequences, optimizing for standard MOT measures. We will refer to this variant as DeepMOT Base Tracktor. + +Tractor+ReID. Vanilla Tracktor has no notion of track identity. Therefore [4] proposed to use an externally trained ReID module during inference to mitigate IDS. This external ReID module is a feature extractor with a ResNet-50 backbone, trained using a triplet loss [40] on the MOTChallenge video sequences. We will refer to this variant as +ReIDext. Note that this does not give Tracktor any notion of identity during training. This means that the DeepMOT loss which penalizes the number of IDS will have no significant effect on the final performance. For this reason, we propose to replace ReIDext with a lightweight ReID head that we can train jointly with Tracktor using DeepMOT. This in turn allows us to utilize $\tilde{\mathrm{IDS}}$ and to fully optimize performance to all components of CLEAR-MOT measures. We refer to this variant as +ReIDhead. It takes the form of a fully-connected layer with 128 units plugged into Tracktor. In the supplementary material we provide details on how we embed the ID information into the distance matrix D. + +Even if such a network head has been previously used in [46], it was trained externally using the triplet loss [40]. To the best of our knowledge, we are the first to optimize such an appearance model by directly optimizing the whole network for tracking evaluation measures. + +MOT-by-SOT. To demonstrate the generality of our method, we propose two additional simple trainable base- + +
MethodMOTA ↑MOTP ↑IDF1 ↑MT ↑ML ↓FP ↓FN ↓IDS ↓
Van.Base59.9789.5070.8435.1327.6627631827326
+ReLUxt60.2089.5071.1535.1327.8027631827152
DeepMOTBase60.4391.8271.4435.4127.2521831545309
+ReLUxt60.6291.8271.6635.4127.3921831545149
+ReLUhead60.6691.8272.3235.4127.2521831545118
+ +Table 1. Impact of the different ReID strategies for the two training strategies on Tracktor's performance. + +lines to perform MOT by leveraging two existing off-the-shelf (trainable) single-object trackers (SOTs): GO-TURN [18] and SiamRPN [27]. During inference we initialize and terminate tracks based on object detections. For each object, the SOTs take a reference image at time $t - 1$ of the person and a search region in image $t$ as input. Based on this reference box and search region, the SOTs then regress a bounding box for each object independently. + +Track Management. In all cases, we use a simple (non-trainable) track management procedure. We (i) use detector responses to initialize object tracks in regions, not covered by existing tracks (can be either public detections or Faster RCNN detection responses in the case of Tracktor); (ii) we regress tracks from frame $t - 1$ to frame $t$ using either a SOT or Tracktor and (iii) we terminate tracks that have no overlap with detections (SOT baseline) or invoke the classification head of Tracktor, that signals whether a track is covering an object or not. As an alternative to direct termination, we can set a track as invisible for $K$ frames. + +# 5.3. Results and Discussion + +Beyond Bounding Box Regression. In Tab. 1, we first establish the Vanilla Base Tracktor performance on our validation set and compare it to the DeepMOT Base Tracktor. This experiment (i) validates that our proposed training pipeline based on DHN delivers the gradient to the trackers and improves the overall performance, and (ii) confirms our intuition that training object trackers using a loss that directly correlates with the tracking evaluation measures has a positive impact. Note that the impact on IDS is minimal, which may be on the first sight surprising, as our proposed loss penalizes IDS in addition to FP, FN, and bounding box misalignment. + +We study this by first evaluating the impact of applying external ReID module, i.e., +ReIDext. As can be seen in Tab. 1, ReIDext has a positive impact on the performance, as expected, in terms of MOTA (+0.23% and +0.19%) and IDS (-174 and -160) compared to Base for Vanilla and DeepMOT training respectively. To further demonstrate the interest of a ReID module, we also report the +ReIDhead architecture trained with DeepMOT. Importantly, +ReIDhead cannot be trained in the Vanilla setting due to the lack of mechanisms to penalize IDS. Remarkably, +ReIDhead trained end-to-end with Tracktor does not only improve over the Base performance (MOTA +0.23%, IDS ↓ 191), + +
Training lossMOTA ↑MOTP ↑IDF1 ↑MT ↑ML ↓FP ↓FN ↓IDS ↓
Vanilla60.2089.5071.1535.1327.8027631827152
Smooth L160.3891.8171.2734.9927.2529431649164
dMOTP60.5191.7471.7535.4126.8329131574142
dMOTA60.5288.3171.9235.4127.3925431597142
dMOTA+dMOTP-IDS60.6192.0372.1035.4127.2522231579124
dMOTA+dMOTP60.6691.8272.3235.4127.2521831545118
+ +Table 2. Ablation study on the effect the training loss on Tracktor. + +but it also outperforms $+\mathrm{ReIDext}$ (MOTA $\uparrow 0.04$ and IDS $\downarrow 31$ ). Very importantly, the lightweight ReID head contains a significantly lower number of parameters ( $\approx 131\mathrm{K}$ ) compared to the external ReID module ( $\approx 25\mathrm{M}$ ). + +Finally, in addition to improve the performance measures for which we optimize Tracktor, DeepMOT consistently improves tracking measures such as IDF1 (↑ 1.17 improvement of DeepMOT+ReIDhead over Vanilla+ReIDext). We conclude that (i) training existing trackers using our proposed loss clearly improves the performance and (ii) we can easily extend existing trackers such as Tracktor to go beyond simple bounding box regression and incorporate the appearance module directly into the network. All modules are optimized jointly in a single training. + +DeepMOT Loss Ablation. Next, we perform several experiments in which we study the impact of different components of our proposed loss (Eq. 9) to the performance of Tracktor (DeepMOT+ReLUhead). We outline our results in Tab. 2. In addition to Vanilla+ReLUDext (representing the best performance trained in Vanilla settings), we also report results obtained by training the same architecture using only the Smooth $L_{1}$ loss (see Fig. 4). We train the regression head with Smooth $L_{1}$ loss using a similar training procedure as for DeepMOT (see Sec. 4.3), to regress predicted bounding boxes to the ones at current time step of their associated tracks. This approach is limited in the sense that we cannot (directly) penalize FP, FN and IDS. + +The Smooth $L_{1}$ training, when compared to Vanilla, has a positive impact on almost all performance measures, except for MT, FP, and IDS. However, both Vanilla and Smooth $L_{1}$ are outperformed almost systematically for all performance measures by the various variants of the DeepMOT loss. Remarkably, when using $dMOTA$ term in our loss, we significantly reduce the number of IDS and FP. Training with $dMOTP$ has the highest impact on MOTP, as it is the case when training with Smooth $L_{1}$ . When only optimizing for $dMOTA$ , we have a higher impact on the MOTA and IDF1 measure. Remarkably, when training with $(dMOTA + dMOTP)$ , we obtain a consistent improvement on all tracking evaluation measures with respect to Vanilla and Smooth $L_{1}$ . Finally, we assess the impact of $\tilde{IDS}$ , by setting the weight $\gamma$ to 0 (Eq. 7) (line $dMOTA + dMOTP - \tilde{IDS}$ ). In this settings, the trackers exhibit a higher number of IDS compared to using the full loss, confirming that the latter is the best strategy. + +
TrainingMOTA ↑MOTP ↑IDF1 ↑MT ↑ML ↓FP ↓FN ↓IDS ↓
GOTURNPre-trained45.9985.8749.8322.2736.512927392711577
Smooth L152.2890.5663.5329.4634.58202636180472
DeepMOT54.0990.9566.0928.6335.1392736019261
SiamRPNPre-trained55.3587.1566.9533.6131.81190733925356
Smooth L156.5190.8868.3833.7532.6492534151167
DeepMOT57.1689.3269.4933.4732.7888933667161
TracterVanilla60.2089.5071.1535.1327.8027631827152
Smooth L160.3891.8171.2734.9927.2529431649164
DeepMOT60.6691.8272.3235.4127.2521831545118
+ +Table 3. DeepMOT vs. Smooth $L_{1}$ using MOT-by-SOT baselines and Tracktor. + +
MethodMOTA ↑MOTP ↑IDF1 ↑MT ↑ML ↓FP ↓FN ↓IDS ↓
MOT17DeepMOT-Tracktor53.777.253.819.436.611731247447
Tracktor [4]53.578.052.319.536.612201248047
DeepMOT-SiamRPN52.178.147.716.741.712132255743
SiamRPN [27]47.876.441.417.041.738279251989
DeepMOT-GOTURN48.177.940.013.643.522497266515
GOTURN [18]38.375.125.79.447.155381282670
eHAF [42]51.877.054.723.437.933212236772
FWT [19]51.377.047.621.435.224101247921
jCC [20]51.275.954.520.937.025937247822
MOTDT17 [29]50.976.652.717.535.724069250768
MHT DAM [21]50.777.547.220.836.922875252889
MOT16DeepMOT-Tracktor54.877.553.419.137.0295578765
Tracktor [4]54.478.252.519.036.9328079149
DeepMOT-SiamRPN51.878.145.516.145.1357683699
SiamRPN [27]44.076.636.615.545.71878482318
DeepMOT-GOTURN47.278.037.213.746.1723087781
GOTURN [18]37.575.425.18.446.51774692867
HCC [31]49.379.050.717.839.9533386795
LMP [44]48.879.051.318.240.1665486245
GCRA [30]48.277.548.612.941.1510488586
FWT [19]47.875.544.319.138.2888685487
MOTDT [29]47.674.850.915.238.3925385431
+ +Table 4. We establish a new state-of-the-art on MOT16 and MOT17 public benchmarks by using the proposed DeepMOT. + +MOT-by-SOT Ablation. Using DeepMOT, we can turn trainable SOT methods into trainable MOT methods by combining them with the track management mechanism (as explained in Sec. 5.2) and optimize their parameters using our loss. In Tab. 3, we outline the results of the two MOT-by-SOT baselines (GOTURN [18] and SiamRPN [27]). For both, we show the performance when using (i) a pre-trained network, (ii) a network fine-tuned using the Smooth $L_{1}$ loss, and (iii) the one trained with DeepMOT. + +Based on the results outlined in Tab. 3, we conclude that training using the Smooth $L_{1}$ loss improves the MOTA for both SOTs (GOTURN: +6.29%, SiamRPN: +1.16%). Moreover, compared to models trained with Smooth $L_{1}$ loss, we further improve MOTA and reduce the number of IDS when we train them using DeepMOT. For GOTURN (SiamRPN), we record a MOTA improvement of 1.81% (0.65%) while reducing the number of IDS by 211 (6). We also outline the improvements comparing Vanilla+ReIDext Tracktor trained with Smooth $L_{1}$ loss, and DeepMOT+ReIDhead Tracktor trained using DeepMOT. These results further validate the merit and generality of our method for training deep multi-object trackers. + +MOTChallenge Benchmark Evaluation We evaluate the trackers trained using our framework on the MOTChallenge + +benchmark (test set) using the best-performing configuration, determined previously using the validation set. During training and inference, we use the camera motion compensation module, as proposed by [4], for the three trained trackers. We discuss the results obtained on MOT16-17. MOT15 results and parameters are in the supplementary. + +We follow the standard evaluation practice and compare our models to methods that are officially published on the MOTChallenge benchmark and peer-reviewed. For MOT16 and MOT17, we average the results obtained using the three sets of provided public detections (DPM [15], SDP [14] and Faster R-CNN [38]). As in [4], we use these public detections for track initialization and termination. Importantly, in the case of Tracktor, we do not use the internal detection mechanism of the network, but only public detections. + +As can be seen in Tab. 4, DeepMOT-Tracktor establishes a new state-of-the-art on both MOT17 and MOT16. We improve over Tracktor (on MOT17 and MOT16, respectively) in terms of (i) MOTA $(0.2\%$ and $0.4\%)$ , (ii) IDF1 $(1.5\%$ and $0.9\%)$ and (iii) IDS (125 and 37). On both benchmarks, Vanilla Tracktor is the second best-performing method, and our simple SOT-by-MOT baseline DeepMOT-SiamRPN is the third. We observe large improvements over our MOT-by-SOT pre-trained models and models trained using DeepMOT. For GOTURN, we improve MOTA by $9.8\%$ and $9.7\%$ and we significantly reduce the number of IDS by 6536 and 2071, for MOT17 and MOT16 respectively. Similar impact on DeepMOT-SiamRPN is observed. + +# 6. Conclusion + +In this paper, we propose an end-to-end MOT training framework, based on a differentiable approximation of HA and CLEAR-MOT metrics. We experimentally demonstrate that our proposed MOT framework improves the performance of existing deep MOT methods. Thanks to our method, we set a new state-of-the-art score on the MOT16 and MOT17 datasets. We believe that our method was the missing block for advancing the progress in the area of end-to-end learning for deep multi-object tracking. We expect that our training module holds the potential to become a building block for training future multi-object trackers. + +# Acknowledgements + +We gratefully acknowledge the mobility grants from the Department for Science and Technology of the French Embassy in Berlin (SST) and the French Institute for Research in Computer Science and Automation (Inria), especially the Perception team. We are grateful to the Dynamic Vision and Learning Group, Technical University of Munich as the host institute, especially Guillem Brasó and Tim Meinhardt for the fruitful discussions. Finally, this research was partially funded by the Humboldt Foundation through the Sofja Kovalevskaja Award. + +# References + +[1] Sileye Ba, Xavier Alameda-Pineda, Alessio Xompero, and Radu Horaud. An on-line variational bayesian model for multi-person tracking from cluttered scenes. CVU, 153:64-76, 2016. 2 +[2] Yutong Ban, Xavier Alameda-Pineda, Laurent Girin, and Radu Horaud. Variational bayesian inference for audiovisual tracking of multiple speakers. IEEE Trans. Pattern Anal. Mach. Intell., 2019. 2 +[3] Yutong Ban, Sileye Ba, Xavier Alameda-Pineda, and Radu Horaud. Tracking multiple persons based on a variational bayesian model. ECCV, 2016. 2 +[4] Philipp Bergmann, Tim Meinhardt, and Laura Leal-Taixe. Tracking without bells and whistles. ICCV, 2019. 1, 2, 6, 8 +[5] James Bergstra, Daniel Yamins, and David D. Cox. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures. ICML, 2013. 2 +[6] Keni Bernstein and Rainer Stiefelhagen. Evaluating multiple object tracking performance: The clear mot metrics. JIVP, 2008:1:1-1:10, 2008. 1, 2, 3, 5, 6 +[7] William Brendel, Mohamed R. Amer, and Sinisa Todorovic. Multi object tracking as maximum weight independent set. CVPR, 2011. 1, 2 +[8] Asad A. Butt and Robert T. Collins. Multi-target tracking by lagrangian relaxation to min-cost network flow. CVPR, 2013. 1, 2 +[9] Hyunggi Cho, Young-Woo Seo, BVK Vijaya Kumar, and Ragunathan Raj Rajkumar. A multi-sensor fusion system for moving object detection and tracking in urban driving environments. ICRA, 2014. 2 +[10] Wongun Choi. Near-online multi-target tracking with aggregated local flow descriptor. ICCV, 2015. 2 +[11] Peng Chu and Haibin Ling. Famnet: Joint learning of feature, affinity and multi-dimensional assignment for online multiple object tracking. ICCV, 2019. 2 +[12] 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. ICCV, 2017. 1, 2 +[13] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. CVPR, 2005. 2 +[14] Piotr Dólar, Ron Appel, Serge Belongie, and Pietro Perona. Fast feature pyramids for object detection. IEEE Trans. Pattern Anal. Mach. Intell., 36(8):1532-1545, 2014. 8 +[15] Pedro Felzenszwalb, David McAllester, and Deva Ramanan. A discriminatively trained, multiscale, deformable part model. CVPR, 2008. 2, 8 +[16] Chuang Gan, Hang Zhao, Peihao Chen, David Cox, and Antonio Torralba. Self-supervised moving vehicle tracking with stereo sound. ICCV, 2019. 2 +[17] Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. CVPR, 2006. 2 +[18] David Held, Sebastian Thrun, and Silvio Savarese. Learning to track at 100 fps with deep regression networks. ECCV, 2016. 7, 8 + +[19] Roberto Henschel, Laura Leal-Taixe, Daniel Cremers, and Bodo Rosenhahn. Improvements to frank-wolfe optimization for multi-detector multi-object tracking. arXiv preprint arXiv:1705.08314, 2017. 8 +[20] Margret Keuper, Siyu Tang, Bjorn Andres, Thomas Brox, and Bernt Schiele. Motion segmentation & multiple object tracking by correlation co-clustering. IEEE Trans. Pattern Anal. Mach. Intell., 2018. 8 +[21] Chanho Kim, Fuxin Li, Arridhana Ciptadi, and James M. Rehg. Multiple hypothesis tracking revisited. ICCV, 2015. 2, 8 +[22] Chanho Kim, Fuxin Li, and James M. Rehg. Multi-object tracking with neural gating using bilinear LSTM. ECCV, 2018. 2 +[23] Harold William Kuhn and Bryn Yaw. The hungarian method for the assignment problem. Naval research logistics quarterly, pages 83-97, 1955. 1, 2, 3, 5 +[24] Laura Leal-Taixe, Cristian Canton-Ferrer, and Konrad Schindler. Learning by tracking: Siamese cnn for robust target association. CVPR Workshops, 2016. 1, 2 +[25] 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 +[26] Bastian Leibe, Konrad Schindler, Nico Cornelis, and Luc Van Gool. Coupled object detection and tracking from static cameras and moving vehicles. IEEE Trans. Pattern Anal. Mach. Intell., 30(10):1683-1698, 2008. 2 +[27] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. CVPR, 2018. 7, 8 +[28] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. ICCV, 2017. 6 +[29] Chen Long, Ai Haizhou, Zhuang Zijie, and Shang Chong. Real-time multiple people tracking with deeply learned candidate selection and person re-identification. ICME, 2018. 8 +[30] Cong Ma, Changshui Yang, Fan Yang, Yueqing Zhuang, Zwei Zhang, Huizhu Jia, and Xiaodong Xie. Trajectory factory: Tracklet cleaving and re-connection by deep siamese bi-gru for multiple object tracking. ICME, 2018. 8 +[31] Liqian Ma, Siyu Tang, Michael J. Black, and Luc Van Gool. Customized multi-person tracker. ACCV, 2018. 8 +[32] 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 +[33] Anton Milan, Stefan Roth, and Konrad Schindler. Continuous energy minimization for multitarget tracking. IEEE Trans. Pattern Anal. Mach. Intell., 36(1):58-72, 2014. 2 +[34] Songhwai Oh, Stuart Russell, and Shankar Sastry. Markov chain monte carlo data association for multi-target tracking. IEEE Trans. Autom. Control, 54(3):481-497, 2009. 2 +[35] Aljoša Osep, Wolfgang Mehner, Markus Mathias, and Bastian Leibe. Combined image- and world-space tracking in traffic scenes. ICRA, 2017. 2 + +[36] Hamed Pirsiavash, Deva Ramanan, and Charles C.Fowlkes. Globally-optimal greedy algorithms for tracking a variable number of objects. CVPR, 2011. 1, 2 +[37] Donald B. Reid. An algorithm for tracking multiple targets. IEEE Trans. Autom. Control, 24(6):843-854, 1979. 1, 2 +[38] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. NIPS, 2015. 6, 8 +[39] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for multi-target, multi-camera tracking. ECCV, 2016. 3, 6 +[40] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. CVPR, 2015. 1, 2, 6 +[41] Samuel Schulter, Paul Vernaza, Wongun Choi, and Manmohan Krishna Chandraker. Deep network flow for multi-object tracking. CVPR, 2017. 1, 2 +[42] Hao Sheng, Yang Zhang, Jiahui Chen, Zhang Xiong, and Jun Zhang. Heterogeneous association graph fusion for target association in multiple object tracking. IEEE Trans. Circuits Syst. Video Technol., 2018. 8 +[43] Jeany Son, Mooyel Baek, Minsu Cho, and Bohyung Han. Multi-object tracking with quadruplet convolutional neural networks. CVPR, 2017. 1, 2 +[44] Siyu Tang, Mykhaylo Andriluka, Bjoern Andres, and Bernt Schiele. Multiple people tracking by lifted multicut and person re-identification. CVPR, 2017. 8 +[45] Ben Taskar, Carlos Guestrin, and Daphne Koller. Max-margin markov networks. NIPS, 2003. 2 +[46] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, B.B.G Sekar, Andreas Geiger, and Bastian Leibe. MOTS: Multi-object tracking and segmentation. CVPR, 2019. 1, 2, 6 +[47] Shaofei Wang and Charless C. Fowlkes. Learning optimal parameters for multi-target tracking with contextual interactions. IJCV, 122(3):484-501, 2016. 2 +[48] Yu Xiang, Wongun Choi, Yuanqing Lin, and Silvio Savarese. Data-driven 3d voxel patterns for object category recognition. CVPR, 2015. 2 +[49] Li Zhang, Li Yuan, and Ramakant Nevatia. Global data association for multi-object tracking using network flows. CVPR, 2008. 1, 2 +[50] Ji Zhu, Hua Yang, Nian Liu, Minyoung Kim, Wenjun Zhang, and Ming-Hsuan Yang. Online multi-object tracking with dual matching attention networks. ECCV, 2018. 1, 2 \ No newline at end of file diff --git a/howtotrainyourdeepmultiobjecttracker/images.zip b/howtotrainyourdeepmultiobjecttracker/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d26d73888ae35ff93b7f3569795b79dbbafc4f49 --- /dev/null +++ b/howtotrainyourdeepmultiobjecttracker/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:742a5c7d8a9cf3ea7e5f393d4c3bdf60877f4a6e2184c45df28271cdf58c5006 +size 416567 diff --git a/howtotrainyourdeepmultiobjecttracker/layout.json b/howtotrainyourdeepmultiobjecttracker/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9d6baa8fa73467de5a3a3d531133ab4a701d2f1d --- /dev/null +++ b/howtotrainyourdeepmultiobjecttracker/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:452a52d74481809b7e037f8dfbb8b235046072861641d9de4c85c0aa4eae6eae +size 433311 diff --git a/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_content_list.json b/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ceaff7051bccbe619f75d81909c081c42c1478e5 --- /dev/null +++ b/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d816960873eef27509cfe4b4ca2a5444edafd0d198f5b2c50b5aa360755e085 +size 75733 diff --git a/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_model.json b/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0b70ed718218bae12e90030129ba5e03a220f009 --- /dev/null +++ b/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:684cc23e4c40669f5299655c085d7b25e2aac9c163b99b7f7ced2103d5d55258 +size 93160 diff --git a/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_origin.pdf b/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06911ddc82608e9fa2d55a14e2049ecc925b511f --- /dev/null +++ b/howusefulisselfsupervisedpretrainingforvisualtasks/484a3865-c8cd-468c-9a39-6eeeebf62ebb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36ba2f890aaec2c1bbca54e02885d442bb965a3582c598e243d9de869addf31d +size 910160 diff --git a/howusefulisselfsupervisedpretrainingforvisualtasks/full.md b/howusefulisselfsupervisedpretrainingforvisualtasks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..72e616f89c428b601362d3f3f5fc8073ae68b0d5 --- /dev/null +++ b/howusefulisselfsupervisedpretrainingforvisualtasks/full.md @@ -0,0 +1,323 @@ +# How Useful is Self-Supervised Pretraining for Visual Tasks? + +Alejandro Newell Jia Deng Princeton University + +{anewell,jiadeng}@cs.princeton.edu + +# Abstract + +Recent advances have spurred incredible progress in self-supervised pretraining for vision. We investigate what factors may play a role in the utility of these pretraining methods for practitioners. To do this, we evaluate various self-supervised algorithms across a comprehensive array of synthetic datasets and downstream tasks. We prepare a suite of synthetic data that enables an endless supply of annotated images as well as full control over dataset difficulty. Our experiments offer insights into how the utility of self-supervision changes as the number of available labels grows as well as how the utility changes as a function of the downstream task and the properties of the training data. We also find that linear evaluation does not correlate with finetuning performance. Code and data is available at github.com/princeton-vl/selfstudy. + +# 1. Introduction + +Self-supervised learning has the potential to revolutionize computer vision. It aims to learn good representations from unlabeled visual data, reducing or even eliminating the need for costly collection of manual labels. In the context of deep networks, the most common use of self-supervision is in pretraining a network with unlabeled data for later finetuning on a downstream task. The better the self-supervision, the better the downstream performance. + +Progress on self-supervised pretraining has accelerated in recent years. In particular, self-supervised models now produce features that are comparable to or outperform those produced by ImageNet pretraining [1, 36, 19, 16]. While it is currently not common to leverage such methods, wider adoption might be seen in the wake of these advances. + +In this work we investigate what barriers might exist between the latest progress in self-supervision and its broader use in the field, as well as how to approach evaluation in a way that is informative and useful to practitioners. + +We are motivated by the observation that much of the existing literature evaluates self-supervision in either few-shot settings or when restricting downstream use of the model. + +![](images/cafb8f5818fe57c0623a406f3020892dc2a3fb44eea4a994e06eea5e01f57656.jpg) +pretrained w/ self-supervision trained from scratch + +![](images/210ebb87b7b51e8d151a2c6a8c3f8902a833497401af104b77920e023e864ff1.jpg) +(a) + +![](images/fb790693c7e062961a7a2296ffc3c5e37e1a547b4e75933d7c87515376258c06.jpg) +(b) + +![](images/063ec046cadede95f5747784353f1366172240ad15496e2f1bc141e684c2055b.jpg) +(c) +Figure 1. We highlight three possible outcomes when using self-supervised pretraining, the pretrained model either: a) always provides an improvement over the model trained from scratch even as the amount of labeled data increases, b) reaches higher accuracy with fewer labels but plateaus to the same accuracy as the baseline, c) converges to baseline performance before accuracy plateaus. In our experiments we find option (c) to be the most common outcome. + +For example, a common form of evaluation is to freeze all weights of the pretrained network and train a linear layer for the downstream task. However, for many computer vision tasks, there already exists a large amount of labeled data, and finetuning of the model is necessary to get as high accuracy as possible. + +Evaluating self-supervision in unrestricted settings is important because in practice there are many situations where maximizing accuracy is paramount (think of pedestrian detection for self-driving cars). It is in one's interest to collect as many labeled examples as possible in such a setting. How useful is self-supervision in these cases? How do we measure this utility? + +Given a downstream task, several outcomes are possible when comparing a finetuned self-supervised model against a baseline trained from scratch (illustrated in Fig. 1). With more labeled data, the performance of a model will improve and may eventually plateau. But in practice, one has a finite labeling budget, and that budget will determine the accuracy reached when training from scratch. There are three subsequent outcomes for the finetuned model: (a) self-supervision achieves a better accuracy than the baseline; (b) self-supervision achieves the same accuracy but with fewer labeled examples; (c) self-supervision achieves the same accuracy with the same number of labeled examples. + +For each of these outcomes, we can quantify the utility of self-supervision as the saving in labels. That is, to achieve the same accuracy without self-supervision, how many more labels would be needed. Specifically, if we define $a(n)$ as the accuracy of a model trained from scratch given $n$ labeled examples and $a_{ft}(n)$ as the accuracy of the finetuned model, the utility at $n$ is defined as $U(n) = \hat{n} / n - 1$ where $\hat{n}$ is the number of labels required such that $a(\hat{n}) = a_{ft}(n)$ . This is the ratio of additional labels needed to match the accuracy of the finetuned model. The utility is zero when self-supervision achieves the same maximum accuracy without lowering labeling cost $(\hat{n} = n)$ . The utility is infinite when there does not exist any number of labeled samples such that the model trained from scratch matches the finetuned model. + +Note that one might not expect self-supervision to help in the presence of many labeled examples, because in the limit the entire input space would be densely covered, and a deep network just needs to fit the labeled data well. However, this is based on the false assumption that we can fit large labeled data arbitrarily well. SGD training is not guaranteed to reach a global optimum, and self-supervised pretraining may produce better representations that help optimization, just as residual links improve fitting to the data. + +Given the above definition of utility, we systematically evaluate a number of recent self-supervised algorithms. To do this, we construct a benchmark of synthetic images. A synthetic benchmark offers unique advantages. It allows easy generation of a large number of labeled examples. It also allows easy exploration of a variety of downstream tasks from classification to dense prediction and from semantics to geometry. Finally, it allows precise control of the complexity of the data and the difficulty of the downstream task through factors such as color, texture, and viewpoint. Our main contribution is a thorough exploration along all of these dimensions to provide insights into where and when one can expect self-supervision to be useful in practice. + +We find that leading self-supervised pretraining methods are useful with a small labeling budget, but utility tends to decrease with ample labels. In particular, as the number of labels increases, the most common outcome is Fig. 1 (c), where gains from self-supervised pretraining tend to diminish before performance plateaus for the training-from-scratch baseline. We also find that self-supervision is more helpful when applied to larger models and to more difficult versions of the data. Moreover, we find that relative performance of methods is not consistent across downstream settings, and that the commonly used linear evaluation does not correlate with utility. + +# 2. Related Work + +Pretraining has long been used to improve performance on visual tasks [11, 14]. The features learned by a convolu + +tional network trained on a large dataset like ImageNet [8] transfer well to many settings. It has further been shown that pretraining is effective given exceedingly large, noisy or weakly-labeled datasets [35, 26, 41, 23]. In this work we focus specifically on the results that can be achieved with self-supervised pretraining, so do not consider the use of weak labels nor do we touch on semi-supervised methods that pseudolabel data [2, 40, 41]. + +Recent work has shown that with sufficient training time, a model trained from scratch can match ImageNet-pretrained performance on COCO [17]. We do not investigate how to improve training from scratch to match pretraining, nor do we benchmark ImageNet pretraining. ImageNet pretraining is subject to concerns around domain shifts, so self-supervised methods have an advantage in our benchmark since pretraining can be performed on the exact image distribution used for the downstream task. + +The past several years have seen a wide variety of methods proposed for visual self-supervision [21, 10, 13, 4, 3, 47]. These methods can take many forms and also rely on a variety of cues such as information across frames in video [46, 38] or across different image modalities [36, 34, 32]. One family of methods are those that center around reconstruction. This often takes the form of an autoencoder [20, 22, 45] or alternatively requires inferring some missing part of the data by performing tasks like inpainting [31] or colorization [44, 37]. Other methods take advantage of spatial properties of images. This can include judging the relative spatial position of image patches [9, 27], or predicting what sorts of transformations have been applied to an image [13, 12]. + +Recently, a wave of methods based on contrastive embeddings have proven effective for pretraining [29, 19, 36, 39, 1, 42]. These methods produce features that maximize mutual information either across representations at different spatial locations of the image [19, 1] or across different views [36] of the image. The key idea being that different patches of an image or different versions of the image (e.g. different image channels or versions augmented with data transformations) should map to a similar embedding that is unique across image samples. + +There have also been a number of recent undertakings to provide comprehensive evaluation of today's self-supervised methods [28, 15, 25, 43, 24, 10, 33]. Each work focuses on distinct facets such as how the choice of architecture design affects performance [24] or to what degree methods produce disentangled representations and how this affects downstream task performance [25]. Other work has measured performance by scaling up the number of unlabeled images and increasing the difficulty of the self-supervised tasks [15]. A distinguishing feature of our work is an emphasis on measuring utility both with large numbers of labels and when finetuning the full model. More + +![](images/4bfac2c908ca34a020f36e73ec91eabb83ce919862329cc75fb8cea46733e8e3.jpg) +Figure 2. Example images from four datasets of increasing complexity (from left to right) controlling for viewpoint and texture. + +over, our synthetic setting provides the opportunity to gain insights into how image complexity affects self-supervision performance. + +# 3. Self-supervised Pretraining + +We follow a fixed strategy for pretraining and finetuning. During pretraining, a self-supervised algorithm is chosen, and the model is presented with unlabeled images to fit the specified loss. During finetuning, a new output layer is added to the network for a target downstream task and the model is trained on labeled images to fit the task as well as possible. At no point is the network jointly trained on both the self-supervised task and downstream task, both for simplicity and to reflect typical use of pretrained models. + +The usefulness of self-supervised pretraining depends on a number of factors. We break down these factors across the following four categories: + +- Data: There is a close connection between the difficulty of a dataset and the number of labeled examples required to saturate performance on a task. Thus it is important to run experiments that control for not just the number of images but their complexity. Here, complexity refers to factors of variation such as those that arise due to changes in lighting, texture, and viewpoint. +- Model: The highest level of performance possible on a task depends on the model used to learn that task. We do our best to control for the backbone model such that a fair comparison is made between methods. +- Self-supervision algorithm: Self-supervised algorithms rely on different cues for learning, and this choice may affect downstream performance. For example, a particular method may explicitly train a model to be invariant to features required by a particular downstream task. +- Downstream task: Similarly, different tasks may lend themselves better or worse to different types of pretraining. Moreover, the difficulty of the downstream task will affect how much data is needed to do well and the degree to which performance plateaus as the number of labels increases. + +To summarize, in this work we will be assessing the effectiveness of pretraining with different data, different + +backbones, different pretraining, and different downstream tasks. The interplay of all of these factors is complicated, so it is important to see how they affect each other under as many settings as possible. For a particular setting, we will pretrain a model and then finetune it while varying the amount of available labels. We compare performance to a baseline model trained from scratch. + +# 4. Synthetic Benchmark + +The need to control for dataset difficulty as well as the need for many labeled images motivates our use of synthetic images. We can control all factors of the generation process and produce an endless supply of images. Moreover, it is trivial to acquire annotations for a wide variety of tasks - many of which would be difficult or impossible to collect for real world images such as ground truth depth. + +Our synthetic images consist of objects floating in empty space. For a given image, we can change the number of objects, their orientation, their texture, as well as the lighting conditions of the scene. If the scene only consists of a single object, we keep the position of the object fixed in the center of the image at a fixed distance. We also normalize the scale so that the size of objects is consistent across classes and models. If there are multiple objects, their positions are chosen randomly such that they are evenly dispersed and remain mostly in the camera frame. + +We render images with Blender [7] using object models from ShapeNet [5]. We choose 10 object classes to use in all versions of the synthetic data (airplane, bench, cabinet, car, chair, lamp, sofa, table, watercraft, motorcycle). To increase image diversity and account for classes with a limited number of models, we augment the models with occasional random stretching along spatial axes. For all datasets, a strict split is enforced across our training and evaluation settings. A random subset of $80\%$ of the models are used for training, the remaining $20\%$ are used during validation and testing. For consistency, this same split is enforced across all versions of our synthetic data. + +# 4.1. Factors of variation + +When rendering, we control for four different sources of image variation. The complexity of the dataset increases as more sources of variation are used. + +Texture: We either apply a flat color material or a texture to the ShapeNet objects and background (as seen in + +![](images/5a632f36a2217e6c5de47f2baff17f7b7ae3526d23ac2e6b3cbc37daa61423b8.jpg) +Figure 3. Example images in the multi-object setting as well as the ground truth semantic segmentation and depth. + +Figure 2). Textures are taken from DTD [6] which provides a wide variety of images to source from. These can vary from basic patterns such as colored stripes to photos of intricate textures found in the world. + +Color: In the real world, object classes are often associated with colors, and many self-supervised techniques rely on this fact to train models [44, 36]. With this in mind, we define two options for using color in the synthetic data. In the easier setting, each class is associated with a fixed color distribution. Concretely, a random hue is assigned to each class. When rendering an object, a new color is chosen by sampling from a normal distribution around the corresponding hue for that class. We follow this strategy even when a texture is applied to the object by mixing the texture image with the target color. + +It is not trivial to predict the object class strictly from the color of pixels in the image as the distribution of colors will overlap across classes. But still, the correlation between color and object class does make classification easier. In the harder setting, each object is rendered with a random color so that there is no correlation whatsoever between the color and object class. + +**Viewpoint:** We render objects at either a fixed or random orientation. At the fixed orientation, all objects are viewed such that there are clearly visible features to distinguish each class as opposed to an ambiguous overhead or head-on view. When randomly sampling viewpoints, a rotation is chosen from a normal distribution with a mean at the previously described fixed orientation. The deviation is large enough to include many extreme viewpoints, but views are more likely to be sampled close to the original fixed viewpoint. + +Lighting: There is a single light source in the scene. We either render data with the light in a fixed position or randomly placed for each sample. + +# 5. Downstream Tasks + +To ensure we evaluate on a variety of downstream tasks, we consider common distinguishing features of computer vision problems. For example, tasks are often differentiated by whether they pertain more to semantic or geometric information. An example of the former would be recognizing object categories, while an example of the latter + +would be surface normal estimation. Another major distinction amongst vision tasks is whether or not a task requires dense predictions across the space of the image. This is the difference between object classification and semantic segmentation where classification is done per pixel. + +It is important to consider these distinctions as there could be differences in whether pretraining is relevant for geometric as opposed to semantic features. Furthermore, many pretraining methods are designed around producing a single feature vector, so it is unclear how well these methods serve for downstream tasks that require dense prediction. + +The tasks that we benchmark on are object classification, object pose estimation, semantic segmentation, and depth estimation. These tasks provide a contrast between extracting semantic and geometric information (classification/segmentation vs. pose/depth), as well as a contrast between predicting global or dense features (classification/pose vs. segmentation/depth). + +Another factor guiding our choice of tasks is simplicity. We benchmark on tasks that do not require sophisticated losses, two-stage pipelines, or complicated post-processing. This is a practical decision to limit the hyperparameters that would govern training behavior and allow us to focus more directly on the impact of pretraining. + +# 5.1. Task Details + +Object classification: Object classification is one of the most standard benchmarks for evaluating self-supervised pretraining. For this task, we train the model to distinguish between the ten ShapeNet classes used to render our synthetic data. Images are generated such that they only contain a single object, and a uniform distribution exists across all ten classes. We measure performance by standard classification accuracy. + +Object pose estimation: To evaluate object pose estimation, again we use images that only contain a single, centered object. Rather than predicting a full rotation matrix (or some alternative representation) we discretize pose into five bins and train a classifier. + +One reason for framing the problem this way is to account for the rotational symmetry present in some of the ShapeNet categories (namely lamps and tables). The five bins are chosen such that orientation along that rotational + +axis is ignored. The model must predict whether the top face of the object is either oriented upwards, forwards, backward, to the left, or to the right. + +This formulation for pose estimation still requires that the model extract features relevant for 3D understanding, but alleviates some of the complications that arise when supervising and evaluating pose. The bins are chosen such that samples are evenly distributed across all five categories. We train with a cross entropy loss and report classification accuracy. + +Semantic segmentation: For semantic segmentation, images are rendered with multiple objects (as seen in Figure 3). We are not concerned with designing a model to output high resolution or precise segmentation masks, so instead we supervise at a much coarser resolution relative to the input image. We apply a per-pixel cross entropy loss and report average classification accuracy. + +Depth estimation: Just as with semantic segmentation, depth estimation is tested on images with multiple objects and at a much coarser resolution than the original input image. We supervise depth with an L1 loss, and measure accuracy with a standard metric in the literature ( $\delta < 1.25$ ) that measures the percentage of predictions that fall within a given ratio of the ground truth depth. + +# 6. Pretraining Methods + +We choose four different self-supervised algorithms for pretraining: + +- Variational autoencoder (VAE) [22]: A standard, established baseline for mapping images to a low-dimensional latent space. +- Rotation [13]: A simple yet effective method for pretraining. The network is tasked with predicting whether an image has been rotated either 0, 90, 180, or 270 degrees. +- Contrastive Multiview Coding (CMC) [36]: A recent method for self-supervision that works by splitting an image into multiple channels such as the $L$ and $ab$ channels of an image in Lab color space. The separated channels are passed through two halved networks and the output embeddings are compared and contrasted to embeddings from other images. +- Augmented Multiscale Deep InfoMax (AMDIM) [1]: Similar to CMC, this method also trains a model through contrastive coding. Instead of comparing across image channels, AMDIM compares representations from two augmented versions of the same image as well as representations produced at intermediate layers of the network. + +These methods were chosen to strike a balance between styles of self-supervision as well as complexity of the self-supervised task. Rotation, CMC, and AMDIM are three high performing self-supervision methods as measured by pretraining and evaluation on ImageNet. + +# 7. Experiment Details + +Datasets: We render 15 dataset variations for our experiments. The key distinguishing feature of the datasets is whether they belong to the lower-resolution single-object setting or higher-resolution multi-object setting. We use single-object images to evaluate object classification and pose estimation, and multi-object images for semantic segmentation and depth. The dataset resolutions are 64x64 and 128x128 respectively. + +For most datasets we render 240,000 images. The only exception are the single-object datasets with viewpoint changes where we render 480,000 images total. A subset of $15\%$ of the images is held out for validation and testing. + +In the figures presented in this paper we use a shorthand to summarize the factors of variation of a particular dataset. Each letter corresponds to a particular factor, and a dash (-) signals that the easier version of that factor is used. To summarize, T: Texture (flat colors vs DTD textures); C: Color (fixed distribution vs random colors); V: Viewpoint (fixed viewpoint vs random viewpoint); L: Lighting (fixed lighting vs random lighting). An example dataset would be 'TC--' where DTD textures are applied along with random colors but viewpoint and lighting are fixed. + +Models: We use ResNet9 [30] and ResNet50 [18] for all experiments. The ResNet9 model suits our experiments well since it is much faster to train and converge, while ResNet50 is more commonly used and can illustrate how results change with additional network capacity. + +We reduce the amount of pooling performed by the models to account for the fact that we are benchmarking on lower resolutions than typical for ResNet models. For the dense prediction tasks, we predict outputs from the features just before global pooling. Thus we supervise at a resolution of 16x16. While this is low, it allows us to assess the model's ability to produce features for dense tasks with zero modifications to the network backbone. + +Training: For a given dataset, we pretrain all self-supervised algorithms on all available training images. The self-supervised algorithms are trained for between 100-200 epochs depending on the algorithm. For finetuning, we load a pretrained model and train for between 75 to 200 additional epochs. This is determined by the amount of images used, and whether we are performing dense prediction. + +Evaluation: On all tasks we report standard performance metrics as described in Section 5.1. We measure how performance changes as more labeled examples are provided during finetuning. Furthermore, we report the utility mea + +![](images/9d72282b99ab3830f355286419f353c6f9f7045f3e5074373497ecd9dcc7a6ff.jpg) + +![](images/a4c5cdf63acaad206babaa6c955859e2ad66084244feee7093c5db33d4d6e2f2.jpg) + +![](images/37befd66f326863e58ec3ae904d6a124804f8f2627a5eb18fc5340d2b1c5849d.jpg) + +![](images/1fb13281b878554a3e836602790cc2d24952cb6b4f4febe8e47e11a1aa8abc50.jpg) + +![](images/4132f1eea4e4db2a0ef93f479a7cc251da6f4d594122e8212790f6d3f79f989f.jpg) +Figure 4. Object classification accuracy and utility of pretrained ResNet9 models when finetuning on increasing numbers of labeled samples. As more labeled data is included, the utility (ratio of labels saved) tends toward zero eventually converging with performance when trained from scratch. This occurs before model performance has saturated. + +![](images/783fc45d7bf07444ee11de937b8fec9df31817336bc50bbe17b49286c7ddfc2c.jpg) + +![](images/0ce2ab696a508c9ab6b07dd0b375d58d2636bb54634b5e5d62485c6ee0e25111.jpg) + +![](images/7cb8bd8f5702d93fdbb5ad1b52b7719e4b14cb8a0e30641926e60662ec11473c.jpg) + +sure as described in the introduction, which measures the proportion of additional labels that would be necessary to reach the same accuracy without pretraining. For example, if a self-supervised algorithm reaches a certain accuracy at 100 samples, and it requires 500 samples to reach that performance when training from scratch, then $U(100) = (500 / 100) - 1 = 4$ . We report the change in utility as a function of labeled samples for each self-supervised algorithm. + +Note that utility cannot be calculated if a model reaches accuracies higher than the maximum reached by the baseline trained from scratch. This does not mean that there does not exist a corresponding value since it is possible the baseline may reach higher accuracy given a larger budget, but does mean that we cannot compute a utility value appropriately. To visualize this we gray out areas in which utility cannot be calculated. Concretely, if the maximum accuracy of training from scratch is reached at 100k samples, then when calculating $U(50\mathrm{k})$ no value above 1 could be computed and thus this area would be grayed out. + +# 8. Results + +Utility vs Number of Labeled Samples: We first study how utility changes as the number of downstream training examples increases. For simplicity, we start with results on object classification shown in Figure 4. + +We see that self-supervision has significant utility when the number of labeled samples is small, but utility approaches zero as labeled data grows. This observation holds for all pretraining methods across downstream settings. Performance of the pretrained models converges with performance of the baseline before accuracy of the model plateaus on the task. This suggests that the utility of + +self-supervised pretraining comes mainly from better regularization that reduces overfitting, not better optimization that reduces underfitting—otherwise we should expect self-supervision to have non-negligible utility even with large numbers of labeled samples. + +Utility vs Downstream Task: Next, we investigate whether pretraining algorithms are more or less useful across different downstream tasks. In Figure 5 we report performance on pose estimation, depth, and semantic segmentation. For the sake of space we only report performance on one dataset variation (TCVL), but more results can be found in the supplementary material. + +The relative rank of different pretraining methods changes with the choice of downstream task. Where CMC performs best in object classification and object pose estimation, we observe that rotation and AMDIM perform better on segmentation and depth estimation respectively. + +Because utility depends on the downstream setting, an important implication is that object classification performance may not be predictive of performance on other tasks. It is thus important to consider diverse downstream settings when evaluating self-supervised methods, and the best pretraining method for a practitioner will depend on the specific context in which they wish to use their model. + +Utility vs Data Complexity: Our experiments also allow us to measure how factors of image variation impact the utility of different pretraining methods. In Figure 6, we report the change in utility for each method across dataset pairs controlling for individual factors. + +We observe relatively consistent changes to the utility of a particular algorithm when adjusting a given factor of image variation. For example, upon introducing random colors or textures, the utility of CMC consistently goes up, but + +![](images/6a05c593033e6644b0a946b98efbf50a69d70efadaa5a3fe05335d12f562f848.jpg) + +![](images/90f440286968ea019678c065b522f58d40e7efd03ee167e3f92d094181eaeba6.jpg) + +![](images/595467514b92c4e4635c65a6a4269724a7dc4a473e5f8e887a291e0e7c04b721.jpg) + +![](images/09a3570632d63130d83ebf3a22fe31e6c77a76dcd74f23ccde6b2fbf9dde3ac0.jpg) +Figure 5. Performance on additional downstream tasks with ResNet9 on the hardest dataset setting (TCVL). The best performing method differs depending on the downstream task suggesting that diverse settings should be considered when comparing self-supervised models. + +![](images/6c80dc088901b120ad1fc1acaef9c80f05ea5de2c5e670f08c6aaffe23600a2a.jpg) + +![](images/c01b5bdf4dc8201b632f5b1139c7f7dc9df4026a8ec088fedfed29fee3546611.jpg) + +![](images/f4c3ee151109433e29152cc34a01b97f3a34b471a01b289eef14a631f97a8153.jpg) +Figure 6. Change in utility across datasets when controlling for factors of image variation (all models trained with ResNet9). The factors are: color (C), texture (T), viewpoint (V), and lighting (L). + +the addition of viewpoint changes results in a drop in utility. These effects occur across multiple dataset pairs. + +Changes to utility for each factor differ across pretraining algorithms. That is, where utility goes up with texture and down with viewpoint changes for CMC, the opposite is true for AMDIM. One possible source of this discrepancy is that as opposed to CMC that applies a loss to global features, AMDIM encourages intermediate local features across the image to map to similar embeddings. This may + +
—-C--C-L-CVLT-T-VLTC-TCVL
normal training98.596.293.892.197.491.895.391.5
AMDIM96.994.989.877.492.573.080.474.5
CMC88.788.987.572.591.369.990.869.0
Rotate31.430.039.730.632.237.625.432.9
VAE71.763.851.035.772.826.936.831.5
+ +Table 1. Results of linear evaluation for object classification. + +increase sensitivity to evidence in local windows, which would explain the adverse effect of random textures and robustness to viewpoint changes where local object evidence changes less than the global arrangement of object parts. + +For VAE, additional factors of variation lower utility. A possible explanation is that as a reconstruction-based approach, the latent space must encode all information necessary to reproduce the image. As data complexity increases, more spurious details must be captured that do not pertain to the downstream task. Contrastive approaches on the other hand, teach a network to map to the same embedding after applying different image transformations. Thus the network learns to ignore changes in pixel space that do not correspond to changes in semantic object class that a VAE would otherwise encode. + +Linear evaluation: In Table 1 we report performance of each self-supervised method using the linear evaluation common in other work. We freeze each pretrained model and train a single linear layer for object classification. Note, the linear layer is trained with all available samples for that dataset. We report performance across eight datasets for object classification with a ResNet9 model. + +The linear evaluation results do not reflect finetuned performance shown in Figures 4. Despite AMDIM having the best linear performance, its utility is consistently lower than both CMC and Rotation. While linear evaluation is infor + +![](images/fcc9acf2c39b5bee53b1534b18bad2d929b637313d18f9329996dc125d9f607c.jpg) +Figure 7. Comparison between ResNet9 and ResNet50 backbones for object classification on TCVL. With few labeled samples the performance of the ResNet50 model is worse when trained from scratch, but when pretrained is better than the pretrained ResNet9 suggesting the importance of pretraining large models when working with less data. + +![](images/960b14cf4e09fb3ef186abbdd3f0f4f3e8742d15762e2359388f80bd33fa68b9.jpg) + +![](images/2ce1e1661abe85314a85615f7fd250a4b22235b40c8c7da2bc9b468aed87ff5e.jpg) + +![](images/980d029234f0eb718a28b92bb1a7e46654cc096fdff45a3ae27caaf6a2513d4f.jpg) + +![](images/f2e02f2adacff17372a5813e3ab2f791ba79edc9d2da81623b397d57c36abb8d.jpg) +Figure 8. Finetuning performance when freezing different amounts of the network. Change in utility and accuracy is reported relative to a baseline where all weights are finetuned. The numbers (1-3) indicate the number of blocks of the ResNet model that have been frozen. + +![](images/800a042bb3f01bb204ece180dc16ab219e4564da6cb0c328e65de090e8749e28.jpg) + +![](images/27cbeb4d871143980b951a60968b927c4af79079fc4872f7d994a14776eb2304.jpg) + +![](images/23c3f6cc353784bc9e75f3db6d7f98e40b888e9c42ca34df8d34ab5c3270ef57.jpg) + +motive for leveraging a frozen model, it may not correspond to which models perform best when finetuned. + +Utility vs Model Size: Next, to measure the effect of model capacity, we provide a comparison between ResNet9 and ResNet50 performance on object classification in Figure 7. + +Utility is always higher with a ResNet50 backbone. This is due to both a performance drop of the baseline and performance improvement of the finetuned model when transitioning to the larger model. The baseline drop occurs at small dataset sizes and ResNet50 does outperform the ResNet9 given sufficient labels. + +CMC achieves higher performance with the larger backbone even when finetuning with less labels. This suggests that for best downstream performance, it is helpful to pretrain on as large a backbone as possible. Similar findings are shown when pretraining with noisy labels [23]. + +Utility vs Amount of Finetuning: To further expand on the comparison between finetuning and the linear evaluation, we measure performance after finetuning a network frozen up to different intermediate layers. The ResNet9 model is made up of three main blocks of layers, so we test how finetuning performance changes if we freeze the model up to each block. Note that after the third block, there are two fully-connected layers so this is slightly more expressive than the linear evaluation baseline. In Figure 8 we show both the change in utility and change in accuracy after freezing increasing amounts of the network. Results are averaged across multiple dataset variations. + +Performance suffers as more of the model is frozen. As expected, when most of the network is frozen ('frozen (3)') the pretraining techniques that have the highest linear performance see less of a drop in performance. And though some freezing is helpful when the number of labels is low (100-250 samples), the best accuracy is consistently reached by models that are fully finetuned. + +# 9. Conclusion + +In this work we investigate a number of factors that affect the utility of self-supervised pretraining. We provide a thorough set of experiments across different downstream tasks and synthetic datasets to measure the utility of pretraining with state-of-the-art self-supervised algorithms. Our study shows that the greatest benefits of pretraining are currently in low data regimes, and utility approaches zero before performance plateaus on the task from additional labels. Further, performance of a self-supervised algorithm in one setting may not necessarily reflect its performance in others, underscoring the importance of studying and evaluating pretraining methods across diverse scenarios. + +Acknowledgements The authors would like to thank Jonathan Stroud for his feedback on paper drafts and for many helpful discussions. This work was partially supported by the National Science Foundation under Grants No. 1734266 and No. 1617767. + +# References + +[1] Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. arXiv preprint arXiv:1906.00910, 2019. 1, 2, 5 +[2] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. arXiv preprint arXiv:1905.02249, 2019. 2 +[3] Piotr Bojanowski and Armand Joulin. Unsupervised learning by predicting noise. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 517-526. JMLR.org, 2017. 2 +[4] 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. 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. Technical Report arXiv:1512.03012 [cs.GR], Stanford University — Princeton University — Toyota Technological Institute at Chicago, 2015. 3 +[6] M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, , and A. Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2014. 4 +[7] Blender Online Community. Blender - a 3D modelling and rendering package. Blender Foundation, Stichting Blender Foundation, Amsterdam, 2018. 3 +[8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. IEEE, 2009. 2 +[9] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE International Conference on Computer Vision, pages 1422-1430, 2015. 2 +[10] Carl Doersch and Andrew Zisserman. Multi-task self-supervised visual learning. In Proceedings of the IEEE International Conference on Computer Vision, pages 2051-2060, 2017. 2 +[11] J Donahue, Y Jia, O Vinyals, J Hoffman, N Zhang, E Tzeng, and T Darrell. Decaf: a deep convolutional activation feature for generic visual recognition. corr (2013). arXiv preprint arXiv:1310.1531, 2013. 2 +[12] Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Ried-miller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In Advances in neural information processing systems, pages 766-774, 2014. 2 +[13] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018. 2, 5 +[14] 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. 2 +[15] Priya Goyal, Dhruv Mahajan, Abhinav Gupta, and Ishan Misra. Scaling and benchmarking self-supervised visual representation learning. arXiv preprint arXiv:1905.01235, 2019. 2 +[16] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. arXiv preprint arXiv:1911.05722, 2019.1 +[17] Kaiming He, Ross Girshick, and Piotr Dollar. Rethinking imagenet pre-training. In Proceedings of the IEEE International Conference on Computer Vision, pages 4918-4927, 2019. 2 +[18] K He, X Zhang, S Ren, and J Sun. Deep residual learning for image recognition. computer vision and pattern recognition (cvpr). In 2016 IEEE Conference on, volume 5, page 6, 2015. 5 +[19] 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. 1, 2 +[20] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504-507, 2006. 2 +[21] Longlong Jing and Yingli Tian. Self-supervised visual feature learning with deep neural networks: A survey. arXiv preprint arXiv:1902.06162, 2019. 2 +[22] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 2, 5 +[23] Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, and Neil Houlsby. Large scale learning of general visual representations for transfer. arXiv preprint arXiv:1912.11370, 2019. 2, 8 +[24] Alexander Kolesnikov, Xiaohua Zhai, and Lucas Beyer. Revisiting self-supervised visual representation learning. arXiv preprint arXiv:1901.09005, 2019. 2 +[25] Francesco Locatello, Stefan Bauer, Mario Lucic, Sylvain Gelly, Bernhard Schölkopf, and Olivier Bachem. Challenging common assumptions in the unsupervised learning of disentangled representations. arXiv preprint arXiv:1811.12359, 2018. 2 +[26] 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. 2 +[27] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision, pages 69-84. Springer, 2016. 2 +[28] 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. 2 + +[29] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 2 +[30] David Page. How to train your resnet, 2018. 5 +[31] 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. 2 +[32] Zhongzheng Ren and Yong Jae Lee. Cross-domain self-supervised multi-task feature learning using synthetic imagery. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 762-771, 2018. 2 +[33] Cinjon Resnick, Zeping Zhan, and Joan Bruna. Probing the state of the art: A critical look at visual representation evaluation. arXiv preprint arXiv:1912.00215, 2019. 2 +[34] Nawid Sayed, Biagio Brattoli, and Björn Ommer. Cross and learn: Cross-modal self-supervision. In German Conference on Pattern Recognition, pages 228-243. Springer, 2018. 2 +[35] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843-852, 2017. 2 +[36] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019. 1, 2, 4, 5 +[37] Carl Vondrick, Abhinav Shrivastava, Alireza Fathi, Sergio Guadarrama, and Kevin Murphy. Tracking emerges by colorizing videos. In The European Conference on Computer Vision (ECCV), September 2018. 2 +[38] 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. 2 +[39] Zhirong Wu, Yuanjun Xiong, Stella Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance-level discrimination. arXiv preprint arXiv:1805.01978, 2018. 2 +[40] Qizhe Xie, Eduard Hovy, Minh-Thang Luong, and Quoc V Le. Self-training with noisy student improves imagenet classification. arXiv preprint arXiv:1911.04252, 2019. 2 +[41] I Zeki Yalniz, Herve Jégou, Kan Chen, Manohar Paluri, and Dhruv Mahajan. Billion-scale semi-supervised learning for image classification. arXiv preprint arXiv:1905.00546, 2019. 2 +[42] Mang Ye, Xu Zhang, Pong C Yuen, and Shih-Fu Chang. Unsupervised embedding learning via invariant and spreading instance feature. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6210-6219, 2019. 2 +[43] Xiaohua Zhai, Joan Puigcerver, Alexander Kolesnikov, Pierre Ruyssen, Carlos Riquelme, Mario Lucic, Josip Djolonga, Andre Susano Pinto, Maxim Neumann, Alexey Dosovitskiy, et al. The visual task adaptation benchmark. arXiv preprint arXiv:1910.04867, 2019. 2 +[44] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European conference on computer vision, pages 649-666. Springer, 2016. 2, 4 + +[45] 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, pages 1058-1067, 2017. 2 +[46] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and ego-motion from video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1851-1858, 2017. 2 +[47] Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local aggregation for unsupervised learning of visual embeddings. In Proceedings of the IEEE International Conference on Computer Vision, pages 6002-6012, 2019. 2 \ No newline at end of file diff --git a/howusefulisselfsupervisedpretrainingforvisualtasks/images.zip b/howusefulisselfsupervisedpretrainingforvisualtasks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cc1cf27414fc571be27b18911b8000a9db408653 --- /dev/null +++ b/howusefulisselfsupervisedpretrainingforvisualtasks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d01d74fc958b154dfbd04e260e804fd6ce12991eecc22e502bfab8b1f2fca30 +size 378540 diff --git a/howusefulisselfsupervisedpretrainingforvisualtasks/layout.json b/howusefulisselfsupervisedpretrainingforvisualtasks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..604c66e4e3237ca6b01540c787449f3fed62f560 --- /dev/null +++ b/howusefulisselfsupervisedpretrainingforvisualtasks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e1c008be67d84aaa74f36d93d834f58e2cd935704c44cbb4420333e181233a0 +size 333344 diff --git a/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_content_list.json b/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bd914260a641088e3d3a85284a33431347325204 --- /dev/null +++ b/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1d8c97eacce9f46f3d4205edd3d913b405cd3b454c94b043aaea1786aebdbfa +size 78840 diff --git a/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_model.json b/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_model.json new file mode 100644 index 0000000000000000000000000000000000000000..449145b00cea3f8ee158d5111cb614494660eecd --- /dev/null +++ b/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8052148e0eca53da5f5d3a9eec1fdb2e4beb4b181248fd07d279caaaf4e3c03 +size 95301 diff --git a/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_origin.pdf b/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..19d12a7cc9f7c5f36ba334aa98da13dccf68d978 --- /dev/null +++ b/hrankfilterpruningusinghighrankfeaturemap/13146cec-d157-4f2c-8efd-2fcb5d31f674_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b0f5c25f3975ed99e213d900c2f17723b6485f9352c1e3d750ffa471d3732df +size 1734344 diff --git a/hrankfilterpruningusinghighrankfeaturemap/full.md b/hrankfilterpruningusinghighrankfeaturemap/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c27945943c4efbf1ba43e93ccf40318fd38ea8a2 --- /dev/null +++ b/hrankfilterpruningusinghighrankfeaturemap/full.md @@ -0,0 +1,295 @@ +# HRank: Filter Pruning using High-Rank Feature Map + +Mingbao Lin $^{1}$ , Rongrong Ji $^{1,5*}$ , Yan Wang $^{2}$ , Yichen Zhang $^{1}$ , Baochang Zhang $^{3}$ , Yonghong Tian $^{4,5}$ , Ling Shao $^{6}$ + +$^{1}$ Media Analytics and Computing Laboratory, Department of Artificial Intelligence, School of Informatics, Xiamen University, China, $^{2}$ Pinterest, USA, $^{3}$ Beihang University, China $^{4}$ Peking University, Beijing, China, $^{5}$ Peng Cheng Laboratory, Shenzhen, China $^{6}$ Inception Institute of Artificial Intelligence, Abu Dhabi, UAE + +lmbxmu@stu.xmu.edu.cn, rrji@xmu.edu.cn, yanw@ pinterest.com, ethan.zhangyc@gmail.com, bczhang@buaa.edu.cn, yhtian@oku.edu.cn, ling.shao@ieee.org + +# Abstract + +Neural network pruning offers a promising prospect to facilitate deploying deep neural networks on resource-limited devices. However, existing methods are still challenged by the training inefficiency and labor cost in pruning designs, due to missing theoretical guidance of non-salient network components. In this paper, we propose a novel filter pruning method by exploring the High Rank of feature maps (HRank). Our HRank is inspired by the discovery that the average rank of multiple feature maps generated by a single filter is always the same, regardless of the number of image batches CNNs receive. Based on HRank, we develop a method that is mathematically formulated to prune filters with low-rank feature maps. The principle behind our pruning is that low-rank feature maps contain less information, and thus pruned results can be easily reproduced. Besides, we experimentally show that weights with high-rank feature maps contain more important information, such that even when a portion is not updated, very little damage would be done to the model performance. Without introducing any additional constraints, HRank leads to significant improvements over the state-of-the-arts in terms of FLOPs and parameters reduction, with similar accuracies. For example, with ResNet-110, we achieve a $58.2\%$ -FLOPs reduction by removing $59.2\%$ of the parameters, with only a small loss of $0.14\%$ in top-1 accuracy on CIFAR-10. With Res-50, we achieve a $43.8\%$ -FLOPs reduction by removing $36.7\%$ of the parameters, with only a loss of $1.17\%$ in the top-1 accuracy on ImageNet. The codes can be available at https://github.com/lmbxmu/HRank. + +# 1. Introduction + +Convolutional Neural Networks (CNNs) have demonstrated great success in computer vision applications, like classification [33, 11], detection [7, 30], and segmentation [25, 2]. However, their high demands in computing power and memory footprint prohibit most state-of-the-art CNNs to be deployed in edge devices such as smartphones or wearable devices. While good progress has been made in designing new hardware and/or hardware-specific CNN acceleration frameworks like TensorRT, it retains as a significant demand to reduce the FLOPs and size of CNNs, with limited compromise on accuracy [4]. Popular techniques include filter compression [6], parameter quantization [3], and network pruning [10]. + +Among them, network pruning has shown broad prospects in various emerging applications. Typical works either prune the filter weights to obtain sparse weight matrices (weight pruning) [10, 9, 1], or remove entire filters from the network (filter pruning) [18, 19, 20]. Besides network compression, weight pruning approaches can also achieve acceleration on specialized software [28] or hardware [8]. However, they have limited applications on general-purpose hardware or BLAS libraries. In contrast, filter pruning approaches do not have this limitation since entire filters are removed. In this paper, we focus on the filter pruning to achieve model compression (reduction in parameters) and acceleration (reduction in FLOPs), aiming to provide a versatile solution for devices with low computing power. + +The core of filter pruning lies in the selection of filters, which should yield the highest compression ratio with the lowest compromise in accuracy. Based on the design of filter evaluation functions, we empirically categorize filter pruning into two groups as discussed below. + +Property Importance: The filters are pruned based on the intrinsic properties of CNNs. These pruning approaches do not modify the network training loss. After the pruning, the model performance is enhanced through fine-tuning. Among these methods, Hu et al. [14] utilized the sparsity of outputs in a large network to remove filters with a high percentage of zero activations. The $\ell_1$ -norm based pruning [18] assumes that parameters or features with small norms are less informative, and thus should be pruned first. Molchanov et al. [27] considered the first-order gradient to evaluate the importance of filters and removed the least important ones. In [34], the importance scores of the final responses are propagated to every filter in the network and the CNNs are pruned by removing the one with the least importance. He et al. [12] calculated the geometric median in the layers, and the filters closest to this are pruned. Most designs for filter evaluation functions are ad-hoc, which brings the advantage of low time complexity, but also limits the acceleration and compression ratios. + +Adaptive Importance: Different from the property importance based approaches, another direction embeds the pruning requirement into the network training loss, and employs a joint-retraining optimization to generate an adaptive pruning decision. Liu et al. [24] and Zhao et al. [36] imposed a sparsity constraint on the scaling factor of the batch normalization layer, allowing channels with lower scaling factors to be identified as unimportant. Huang et al. [16] and Lin et al. [23] introduced a new scaling factor parameter (also known as a mask) to learn a sparse structure pruning where filters corresponding to a scaling factor of zero are removed. Compared with property importance based filter pruning, adaptive importance based methods usually yield better compression and acceleration results due to their joint optimization. However, because the loss is changed, the required retraining step is heavy in both machine time and human labor, usually demanding another round of hyper-parameter tuning. For some methods, e.g., the mask-based scheme, the modified loss even requires specialized optimizers [16, 23], which affects the flexibility and ease of using approaches based on adaptive importance. + +Overall, filter pruning remains an open problem so far. On one hand we pursue higher compression/acceleration ratios, while on the other hand we are restricted by heavy machine time and human labor (especially for adaptive importance based methods). We attribute these problems to the lack of practical/theoretical guidance regarding to the filter importance and redundancy. In this paper, we propose an effective and efficient filter pruning approach that explores the High Rank of the feature map in each layer (HRank), as shown in Fig. 1. The proposed HRank performs as such a guidance, which is a property importance based filter pruner. It eliminates the need of introducing additional auxiliary constraints or retraining the model, thus simplifying + +![](images/db3cc6f5da4419242e0fa6d2717a14be2b3bbb73a5e5173c3391f70f938e3f2e.jpg) +Figure 1. Framework of HRank. In the left column, we first use images to run through the convolutional layers to get the feature maps. In the middle column, we then estimate the rank of each feature map, which is used as the criteria for pruning. The right column shows the pruning (the red filters), and fine-tuning where the green filters are updated and the blue filters are frozen. + +the pruning complexity. Moreover, compared with existing property importance based methods, HRank also leads to significant improvements in acceleration and compression [18, 34], achieving even better results than state-of-the-art adaptive importance based methods [13, 24, 26, 16, 23, 36]. The motivation behind enforcing the high rank of feature maps comes from an empirical and quantitative observation. As shown in Fig. 2, we have found that the average rank of feature maps generated by a single filter is always the same, regardless of how much data the CNN has seen. It suggests that the ranks of feature maps in deep CNNs can be accurately estimated using only a small portion of the input images, and thus can be highly efficient. Based on this idea, we mathematically prove that feature maps with lower ranks contribute less to accuracy. Thus the filters generating these feature maps can be removed first. + +We conduct extensive experiments on two benchmarks, CIFAR-10 [17] and ImageNet [31], using many representative large CNN models, including VGGNet [32], GoogLeNet [33], ResNet [11] and DenseNet [15]. The results demonstrate the superior performance of HRank over existing filter pruning methods, including property importance based approaches[18, 34] and state-of-the-art adaptive importance based models [13, 24, 26, 16, 23, 36]. We also carry out experiments to show that, even when we freeze a portion of filters with high-rank feature maps during the fine-tuning after pruning, the model still retains high accuracy, which verifies our assumption. + +To summarize, our main contributions are three-fold: + +- Based upon extensive statistical verification, we empirically demonstrate that the average rank of feature maps generated by a single filter is almost unchanged. To the best of our knowledge, this is the first time this observation is reported. +- We mathematically prove that filters with lower-rank feature maps are less informative and thus less important to preserve accuracy, which can be removed first. The opposite is true for high-rank feature maps. + +- Extensive experiments demonstrate the efficiency and effectiveness of HRank in both model compression and acceleration over a variety of state-of-the-arts [18, 34, 13, 24, 26, 16, 23, 36]. + +# 2. Related Work + +Filter Pruning. Opposed to weight pruning, which prunes the weight matrices, filter pruning removes the entire filters according to certain metrics. Filter pruning not only significantly reduces storage usage, but also decreases the computational cost in online inference. As discussed in Sec. 1, filter pruning can be divided into two categories: property importance approaches and adaptive importance approaches. Property importance based filter pruning aims to exploit the intrinsic properties of CNNs (e.g., $\ell_1$ -norm and gradient, etc), and then uses them as criteria for discriminating less important filters. For example, the sparser filters in [27] are considered less important while [14] prunes filters with smaller $\ell_1$ -norm. In contrast, adaptive importance based filter pruning typically retrain the networks with additional constraints to generate an adaptive pruning decision. Beyond the related work discussed in Sec. 1, Luo et al. [26] established filter pruning as an optimization problem, where the filters are pruned based on the statistics information from the next layer. He et al. [13] proposed a two-step algorithm including a LASSO regression to remove redundant filters and a linear least square to construct the outputs. + +Low-rank Decomposition. As shown in [5], neural networks tend to be over-parameterized, which suggests that the parameters in each layer can be accurately recovered from a small subset. Inspired by this, low-rank decomposition has emerged as an alternative for network compression. It approximates convolutional operations by representing the weight matrix as a low-rank product of two smaller matrices. Unlike pruning, it aims to reduce the computational costs of the network instead of changing the original number of filters. To this end, Denton et al. [6] exploited the linear structure of CNNs by exploring an appropriate low-rank approximation of the weights and keeping the accuracy within a $1\%$ loss of the original model. Further, Zhang et al. [35] considered the subsequent nonlinear units while learning the low-rank decomposition to provide significant speed-up. Lin et al. [21] proposed a low-rank decomposition for both convolutional filters and fully-connected matrices, which are then solved by a closed-form solver with a fixed rank. Though low-rank decomposition can benefit the compression and speedup of CNNs, it normally incurs a large loss in accuracy under high compression ratios. + +Discussion. Compared with weight pruning, filter pruning tends to be more favorable in reducing model complexity. Besides, its structured pruning can be easily integrated into the highly efficient BLAS libraries without specialized software or hardware support. Nevertheless, existing fil + +ter pruning methods suffer from inefficient acceleration and compression (property importance based filter pruning) or machine and labor costs (adaptive importance based filter pruning), as discussed in Sec. 1. These two issues bring fundamental challenges to the deployment of deep CNNs on resource-limited devices. We attribute the dilemma to the missing of practical/theoretical guidance regarding to the filter importance and redundancy. We focus on the rank of feature maps and analyze its effectiveness both theoretically and experimentally. Note that our approach is orthogonal to low-rank decomposition approaches. We aim to prune filters generating low-rank feature maps rather than decompose filters. Note that, the low-rank methods can be integrated into our model (e.g., to decompose fully-connected layers) to achieve higher compression and speedup ratios. + +# 3. The Proposed Method + +# 3.1. Notations + +Assume a pre-trained CNN model has a set of $K$ convolutional layers $^1$ , and $\mathcal{C}^i$ is the $i$ -th convolutional layer. The parameters in $\mathcal{C}^i$ can be represented as a set of 3-D filters $\mathcal{W}_{\mathcal{C}^i} = \{\mathbf{w}_1^i,\mathbf{w}_2^i,\dots,\mathbf{w}_{n_i}^i\} \in \mathbb{R}^{n_i\times n_{i - 1}\times k_i\times k_i}$ where the $j$ -th filter is $\mathbf{w}_j^i\in \mathbb{R}^{n_{i - 1}\times k_i\times k_i}$ . $n_i$ represents the number of filters in $\mathcal{C}^i$ and $k_{i}$ denotes the kernel size. The outputs of filters, i.e., feature maps, are denoted as $\mathcal{O}^i = \{\mathbf{o}_1^i,\mathbf{o}_2^i,\dots,\mathbf{o}_{n_i}^i\} \in \mathbb{R}^{n_i\times g\times h_i\times w_i}$ , where the $j$ -th feature map $\mathbf{o}_j^i\in \mathbb{R}^{g\times h_i\times w_i}$ is generated by $\mathbf{w}_j^i$ . $g$ is the size of input images. $h_i$ and $w_{i}$ are the height and width of the feature map, respectively. In filter pruning, $\mathcal{W}_{\mathcal{C}^i}$ can be split into two groups, i.e., a subset to be kept $\mathcal{I}_{\mathcal{C}^i} = \{\mathbf{w}_{\mathcal{I}_1^i}^i,\mathbf{w}_{\mathcal{I}_2^i}^i,\dots,\mathbf{w}_{\mathcal{I}_{n_1}^i}^i\}$ and a subset, with less importance, to be pruned $\mathcal{U}_{\mathcal{C}^i} = \{\mathbf{w}_{\mathcal{U}_1^i}^i,\mathbf{w}_{\mathcal{U}_2^i}^i,\dots,\mathbf{w}_{\mathcal{U}_{n_2}^i}^i\}$ , where $\mathcal{I}_j^i$ and $\mathcal{U}_j^i$ are the indices of the $j$ -th important and unimportant filter, respectively. $n_{i1}$ and $n_{i2}$ are the number of important and unimportant filters, respectively. We have: $\mathcal{I}_{\mathcal{C}^i}\cap \mathcal{U}_{\mathcal{C}^i} = \emptyset ,\mathcal{I}_{\mathcal{C}^i}\cup \mathcal{U}_{\mathcal{C}^i} = \mathcal{W}_{\mathcal{C}^i}$ and $n_{i1} + n_{i2} = n_{i}$ . + +# 3.2. HRank + +Filter pruning aims to identify and remove the less important filter set from $\mathcal{I}_{\mathcal{C}^i}$ , which can be formulated as an optimization problem: + +$$ +\min _ {\delta_ {i j}} \sum_ {i = 1} ^ {K} \sum_ {j = 1} ^ {n _ {i}} \delta_ {i j} \mathcal {L} \left(\mathbf {w} _ {j} ^ {i}\right), \tag {1} +$$ + +$$ +s. t. \sum_ {j = 1} ^ {n _ {i}} \delta_ {i j} = n _ {i 2}, +$$ + +![](images/cd83f91038ab0c637fca6681b9665212d9bd5d16151cfed51b50eba0cb3f227d.jpg) +(a) VGGNet-16.1. + +![](images/f2fe5c59ae142b1fd635d1765dd20bc159c2856aa9e01456b0d8644f08ae0513.jpg) +(b) VGGNet-16_6. + +![](images/de106fa184eac5b01aa379f49f9d5c7207a923b0dfb6b378d55dd1e4dd1f81ba.jpg) +(c) VGGNet-16_12. + +![](images/6a1934b0d58bff97e20662eb12f471c006672ccc4ba97d9d60d0a4dc70901242.jpg) +(d) GoogLeNet_1. + +![](images/2afdd12ca0952db41295817a216554853ed75e5cd8c586f70d2a751202ae7ba6.jpg) +(e) GoogLeNet_5_3x3. + +![](images/447dfdc2d0382ec07301af7652f037467a4466074746c18255284483115d2c51.jpg) +(f) GoogLeNet_10_5x5. + +![](images/690291a8c63540d6fc0afe92edb90717ab4ede4eacce46e8ce45cc387b7b9709.jpg) +(g) ResNet-56_1. + +![](images/9dd98540b140f3aa6dc9971b88c8ae63387b7645b46f3d9b3bf1506af11ef842.jpg) +(h) ResNet-56_28. + +![](images/03c044c6dfe7f9ca5004a1c182c3adeff798e5b0d61d2b77278365d3a60cb42b.jpg) +(i) ResNet-56_55. + +![](images/8c897c599e2a0ce7327fe3b8b7d5df9a584d064339b71b277bcb93e4a9d8ef71.jpg) +(j) ResNet-110_1. + +![](images/8fb44479d1398166afdfb611e7b8e32a0edd272b07bcfd5bf24cfec9a3c76304.jpg) +(k) ResNet-110_54. + +![](images/553a1f058abcb7c906e9bb29fe0d7852f6c67f003b2897dc43937e92c40fc8ed.jpg) +(1) ResNet-110_108. + +![](images/9e18de2caa40bf7b113b23a9f1a2074f2860bc51bac210bf02369756735e9a03.jpg) +(m) DenseNet-40_1. +Figure 2. Average rank statistics of feature maps from different convolutional layers and architectures on CIFAR-10. For each subfigure, the x-axis represents the indices of feature maps and the y-axis is the batches of training images (each batch size is set to 128). Different colors denote different rank values. As can be seen, the rank of each feature map (column of the subfigure) is almost unchanged (the same color), regardless of the image batches. Hence, even a small number of images can effectively estimate the average rank of each feature map in different architectures. + +![](images/18eb3f38cf5dd5bafcb293f62fcc73d0d0244146a5f8c94b928667120f905dc4.jpg) +(n) DenseNet-40_20. + +![](images/be8be50acd07583c0568a86df627808bf272ad99efed3c2a48c70c513fe43733.jpg) +(o) DenseNet-40_39. + +where $\delta_{ij}$ is an indicator which is 1 if $\mathbf{w}_j^i$ is grouped to $\mathcal{U}_{C^i}$ , or 0 if $\mathbf{w}_j^i$ is grouped to $\mathcal{I}_{C^i}$ . $\mathcal{L}(\cdot)$ measures the importance of a filter input to the CNN. Thus minimizing Eq. (1) is equal to removing the $n_{i2}$ least important filters in $\mathcal{C}^i$ . + +In this framework, most prior works resort to directly designing $\mathcal{L}(\cdot)$ on the filters. We argue that ad-hoc designs of $\mathcal{L}$ on the filters ignore the distribution of the input images as well as the output labels, and might be the reason why property importance based approaches show suboptimal performance. In contrast, in this paper, we propose to define $\mathcal{L}$ on the feature maps. The rationale lies in that the feature maps are an intermediate step that can reflect both the filter properties and the input images. As investigated in [37], individual feature maps, even within the same layer, play different roles in the network. Furthermore, they can capture how an input image is transformed in each layer, and finally, to the predicted labels. To that effect, we reformulate Eq. (1) as: + +$$ +\begin{array}{l} \min _ {\delta_ {i j}} \sum_ {i = 1} ^ {K} \sum_ {j = 1} ^ {n _ {i}} \delta_ {i j} \mathbb {E} _ {I \sim P (I)} [ \hat {\mathcal {L}} (\mathbf {o} _ {j} ^ {i} (I, :, :)) ], \tag {2} \\ s. t. \sum_ {j = 1} ^ {n _ {i}} \delta_ {i j} = n _ {i 2}, \\ \end{array} +$$ + +where $I$ is the input image, which is sampled from a distribution $P(I)$ . $\hat{\mathcal{L}} (\cdot)$ is used to estimate the information of feature maps $\mathbf{o}_j^i (I,:,:)$ generated by the filter $\mathbf{w}_j^i$ . In our settings, the expectation of $\hat{\mathcal{L}} (\cdot)$ is proportional to $\mathcal{L}(\cdot)$ in + +Eq. (1), i.e., the more information the feature map contains, the more important the corresponding filter is. + +Thus our key problem falls in designing a proper function $\hat{\mathcal{L}} (\cdot)$ which can well reflect the information richness of feature maps. Prior property importance based method [14] utilizes the sparsity of feature maps. It calculates the zero activations from extensive input images and removes the filters with a large portion of zeros in the feature maps. However, such a data-driven scheme heavily relies on the distribution $P(I)$ of the input images, which is extremely complex to describe. While the Monte-Carlo approximation can be adopted, it is still intractable since a large number of input images (over ten thousand in [14]) are required to maintain a reasonable prediction. + +Instead, we exploit the rank of feature maps which is demonstrated to be not only an effective measure of information, but also a stable representation across $P(I)$ . We first define our information measurement as: + +$$ +\hat {L} \left(\mathbf {o} _ {j} ^ {i} (I, :, :)\right) = \operatorname {R a n k} \left(\mathbf {o} _ {j} ^ {i} (I, :, :)\right), \tag {3} +$$ + +where $\mathbf{Rank}(\cdot)$ is the rank of a feature map for input image $I$ . We conduct a Singular Value Decomposition (SVD) for $\mathbf{o}_j^i (I,:,:)$ + +$$ +\begin{array}{l} \mathbf {o} _ {j} ^ {i} (I, :,:) = \sum_ {\substack {i = 1 \\ }} ^ {r} \sigma_ {i} \mathbf {u} _ {i} \mathbf {v} _ {i} ^ {T} \tag{4} \\ = \sum_ {i = 1} ^ {r ^ {\prime}} \sigma_ {i} \mathbf {u} _ {i} \mathbf {v} _ {i} ^ {T} + \sum_ {i = r ^ {\prime} + 1} ^ {r} \sigma_ {i} \mathbf {u} _ {i} \mathbf {v} _ {i} ^ {T}, \\ \end{array} +$$ + +where $r = \mathbf{Rank}(\mathbf{o}_j^i (I,:,:))$ and $r^\prime < r$ . $\delta_{i}$ , $\mathbf{u}_i$ and $\mathbf{v}_i$ are the top- $i$ singular values, left singular vector and right singular vector of $\mathbf{o}_j^i (I,:,:))$ , respectively. It can be seen that a feature map with rank $r$ can be decomposed into a lower-rank feature map with rank $r^\prime$ , i.e., $\sum_{i = 1}^{r^{\prime}}\sigma_{i}\mathbf{u}_{i}\mathbf{v}_{i}^{T}$ , and some additional information, i.e., $\sum_{i = r' + 1}^{r}\sigma_{i}\mathbf{u}_{i}\mathbf{v}_{i}^{T}$ . Hence, higher-rank feature maps actually contain more information than lower-rank ones. Thus, the rank can serve as a reliable measurement for information richness. + +# 3.3. Tractability of Optimization + +One critical point in the pruning procedures discussed above falls in the calculation of ranks. However, it is possible that the rank of the feature maps $\mathbf{o}_j^i\in \mathbb{R}^{g\times h_i\times w_i}$ is sensitive to the distribution of input images, $P(I)$ . For example, the rank of $\mathbf{o}_j^i (1,:,:)$ is not necessarily the same as that of $\mathbf{o}_j^i (2,:,:)$ . To accurately estimate the expectation of ranks, extensive input images have to be used, as with [14]. This poses a great challenge when evaluating the relative importance of filters. + +Fortunately, we empirically observe that the expectation of ranks generated by a single filter is robust to the input images. To illustrate, we plot the average of rank values w.r.t. different numbers of input batches in Fig. 2. It is obvious that the colors (which indicate the values) of the average ranks from a single filter are the same, which are irrespective to the image that CNNs receive. To explain, although different images may have different ranks, the variance is negligible. Hence, a small batch of input images can be used to accurately estimate the expectation of the feature map rank. Then, we define the rank expectation of feature map $\mathbf{o}_j^i$ as: + +$$ +\mathbb {E} _ {I \sim P (I)} \left[ \hat {\mathcal {L}} \left(\mathbf {o} _ {j} ^ {i} (I, :, :)\right) \right] \approx \sum_ {t = 1} ^ {g} \operatorname {R a n k} \left(\mathbf {o} _ {j} ^ {i} (t, :, :)\right). \tag {5} +$$ + +In our experiments, we set the number of images, $g = 500$ , to estimate the average rank, which is several orders of magnitude smaller than [14], where over ten thousand input images are used to estimate the sparsity of feature maps. Besides, calculating the ranks of feature maps can be implemented offline. Hence, Eq. (3) is easily tractable using the above approximation. Combining Eq. (2) and Eq. (5), we derive our final optimization objective as follows: + +$$ +\min _ {\delta_ {i j}} \sum_ {i = 1} ^ {K} \sum_ {j = 1} ^ {n _ {i}} \delta_ {i j} \left(\mathbf {w} _ {j} ^ {i}\right) \sum_ {t = 1} ^ {g} \operatorname {R a n k} \left(\mathbf {o} _ {j} ^ {i} (t, :, :)\right), \tag {6} +$$ + +$$ +s. t. \sum_ {j = 1} ^ {n _ {i}} \delta_ {i j} = n _ {i 2}. +$$ + +It is intuitive that Eq. (6) can be minimized by pruning the filters with $n_{i2}$ least average ranks of feature maps. + +Pruning Procedure. Given filters $\mathcal{W}_{\mathcal{C}^i}$ in $\mathcal{C}^i$ and their generated feature maps $\mathcal{O}^i$ , as defined in Sec.3.1, we prune $\mathcal{W}_{\mathcal{C}^i}$ as follows: First, we calculate the average rank of feature map $\mathbf{o}_j^i$ in $\mathcal{O}^i$ , forming a rank set $\mathcal{R}^i = \{r_1^i,r_2^i,\dots,r_{n_i}^i\} \in \mathbb{R}^{n_i}$ . Second, we re-rank the rank set in decreasing order $\hat{\mathcal{R}}^i = \{r_{I_1^i}^i,r_{I_2^i}^i,\dots,r_{I_{n_i}^i}^i\} \in \mathbb{R}^{n_i}$ , where $I_j^i$ is the index of the $j$ -th top value in $\mathcal{R}^i$ . Third, we determine the values of $n_{i1}$ (number of preserved filters) and $n_{i2}$ (number of pruned filters). Fourth, we obtain the important filter set $\mathcal{I}_{\mathcal{C}^i} = \{\mathbf{w}_{\mathcal{I}_1^i}^i,\mathbf{w}_{\mathcal{I}_2^i}^i,\dots,\mathbf{w}_{\mathcal{I}_{n_{i1}}^i}^i\}$ where the rank of $\mathbf{w}_{\mathcal{I}_j^i}^i$ is $r_{I_j^i}^i$ . Similarly, we obtain the filter set $\mathcal{U}_{\mathcal{C}^i} = \{\mathbf{w}_{\mathcal{U}_1^i}^i,\mathbf{w}_{\mathcal{U}_2^i}^i,\dots,\mathbf{w}_{\mathcal{U}_{n_{i2}}^i}^i\}$ . Lastly, we remove the set $\mathcal{U}_{\mathcal{C}^i}$ and fine-tune the network with $\mathcal{I}_{\mathcal{C}^i}$ as the initialization. + +# 4. Experiments + +# 4.1. Experimental Settings + +Datasets and Baselines. To demonstrate our efficiency in reducing model complexity, we conduct experiments on both small and large datasets, i.e., CIFAR-10 [17] and ImageNet [31]. We study the performance of different algorithms on the mainstream CNN models, including VG-GNet with a plain structure [32], GoogLeNet with an inception module [33], ResNet with a residual block [11] and DenseNet with a dense block [15]. Fig. 3 provides standards for pruning these popular networks. For all benchmarks and architectures, we randomly sample 500 images to estimate the average rank of each feature map. + +Evaluation Protocols. We adopt the widely-used protocols, i.e., number of parameters and required Float Points Operations (denoted as FLOPs), to evaluate model size and computational requirement. To evaluate the task-specific capabilities, we provide top-1 accuracy of pruned models and the pruning rate (denoted as PR) on CIFAR-10, and top-1 and top-5 accuracies of pruned models on ImageNet. + +Configurations. We use PyTorch [29] to implement the proposed HRank approach. We solve the optimization problem by using Stochastic Gradient Descent algorithm (SGD) with an initial learning rate of 0.01. The batch size, weight decay and momentum are set to 128, 0.0005 and 0.9, respectively. For each layer, we retrain the network for 30 epochs after pruning $^2$ , with the learning rate being divided by 10 at epochs 5 and 10 on CIFAR-10, and divided by 10 every 10 epochs on ImageNet. All experiments are conducted on two NVIDIA GTX 1080Ti GPUs. It is worth noting that for ResNet-50 on ImageNet, instead of fine-tuning the network every time after pruning a convolution layer, we prune the network in a per-block fashion, i.e. we fine-tune the network only after performing pruning within the entire + +![](images/bb770f89102671b189b7779bf50439167e4f8eaceb3b4baa36a78baa918889c0.jpg) +Figure 3. An illustration of mainstream network structures to be pruned, including Plain structure [32], Inception module [33], Residual block [11] and Dense block [15]. The black lines denote the inference streams of CNNs. The red dots denote the outputs of a convolutional layer (i.e., feature maps). The red dashed lines denote the to-be-pruned layers after observing the ranks of feature maps. Note that, for $1 \times 1$ convolutions followed by $n \times n$ convolution ( $n = 3$ in (b)), we do not consider pruning the $1 \times 1$ filter since it contains fewer parameters and less computation compared with an $n \times n$ filter. + +block, as shown in Fig. 3 (c). So the computational cost can be further reduced, which is important for large-scale datasets such as ImageNet. For a fair comparison, we fix the accuracy to be similar to the baselines and measure the parameters and FLOPs reductions, or fix similar reductions of parameters and FLOPs, and measure the accuracy. + +# 4.2. Results and Analysis + +# 4.2.1 Results on CIFAR-10 + +We analyze the performance on CIFAR-10, comparing against several popular CNNs, including VGG-16, GoogLeNet, ResNet56/110 and DenseNet-40. We use a variation of VGG-16, as in [18]. Following the state-of-the-art baseline [23], the output of the original GoogLeNet is changed to fit the class number in CIFAR-10. And for DenseNet-40, it has 40 layers with a growth rate of 12. + +VGG-16. Tab. 1 shows the performance of different methods, including a property importance based method, i.e., L1 [18] and several adaptive importance based methods, i.e., SSS [16], Zhao et al. [36] and GAL [23]. Compared with L1, HRank provides significantly better parameters and FLOPs reductions (53.5% vs. 34.3% and 82.9% vs. 64.0%), which demonstrates the superiority of exploiting the rank of feature maps as an intrinsic property of + +Table 1. Pruning results of VGGNet on CIFAR-10. + +
ModelTop-1%FLOPs(PR)Parameters(PR)
VGGNet93.96313.73M(0.0%)14.98M(0.0%)
L1 [18]93.40206.00M(34.3%)5.40M(64.0%)
SSS [16]93.02183.13M(41.6%)3.93M(73.8%)
Zhao et al. [36]93.18190.00M(39.1%)3.92M(73.3%)
HRank(Ours)93.43145.61M(53.5%)2.51M(82.9%)
GAL-0.05 [23]92.03189.49M(39.6%)3.36M(77.6%)
HRank(Ours)92.34108.61M(65.3%)2.64M(82.1%)
GAL-0.1 [23]90.73171.89M(45.2%)2.67M(82.2%)
HRank(Ours)91.2373.70M(76.5%)1.78M(92.0%)
Table 2. Pruning results of GoogLeNet on CIFAR-10.
ModelTop-1%FLOPs(PR)Parameters(PR)
GoogLeNet95.051.52B(0.0%)6.15M(0.0%)
Random94.540.96B(36.8%)3.58M(41.8%)
L1 [18]94.541.02B(32.9%)3.51M(42.9%)
HRank(Ours)94.530.69B(54.9%)2.74M(55.4%)
GAL-ApoZ [14]92.110.76B(50.0%)2.85M(53.7%)
GAL-0.05 [23]93.930.94B(38.2%)3.12M(49.3%)
HRank(Ours)94.070.45B(70.4%)1.86M(69.8%)
+ +CNNs. Compared with adaptive importance based methods, HRank yields a better compression and acceleration rate than SSS and Zhao et al., while maintaining a higher accuracy (93.43% vs. 93.02% by SSS and 93.18% by Zhao et al.). Compared with GAL-0.05, HRank is advantageous in all aspects (65.3% vs. 39.6% in FLOPs reduction, 82.1% vs. 77.6% in parameters reduction, and 92.34% vs. 92.03% in top-1 accuracy). Lastly, compared with GAL-0.1, where only a 90.73% top-1 accuracy is obtained, the proposed HRank gains a better result of 91.23%. Moreover, over 76% of FLOPs are reduced and 90% of parameters are removed. Hence, HRank demonstrates its ability to compress and accelerate a neural network with a plain structure. + +GoogLeNet. The results for GoogLeNet are shown in Tab. 2. HRank again demonstrates its ability to obtain a high accuracy of $94.53\%$ , with around $55\%$ FLOPs and parameters reduction. This is significantly better than L1 and randomized pruning, which indicates that pruning with HRank is more compact and efficient. Furthermore, compared with adaptive importance based methods, GAL-ApoZ and GAL-0.05, HRank obtains a better top-1 accuracy (94.07% vs. 92.11% by GAL-ApoZ and 93.93% by GAL-0.05), faster acceleration (70.4% vs. 50.0% by GAL-ApoZ and 38.2% by GAL-0.05.) and more compact parameters (69.8% reduction vs. 53.7% by GAL-ApoZ and 49.3% by GAL-0.05%). Without introducing additional constraints, HRank still reduces model complexity while maintaining a good accuracy, showing that the ranks of feature maps can serve as a discriminative property for identifying the redundant filters. Besides, it demonstrates that HRank can be effectively applied to compressing neural networks with inception modules. + +ResNet-56/110. We compress ResNet-56 and ResNet-110, results of which are displayed in Tab. 3. We begin with ResNet-56. Under similar FLOPs and parameters reduction with L1, HRank obtains an excellent top-1 accuracy (93.52% vs. 93.06%), which is even better than the + +Table 3. Pruning results of ResNet-56/110 on CIFAR-10. + +
ModelTop-1%FLOPs(PR)Parameters(PR)
ResNet-5693.26125.49M(0.0%)0.85M(0.0%)
L1 [18]93.0690.90M(27.6%)0.73M(14.1%)
HRank(Ours)93.5288.72M(29.3%)0.71M(16.8%)
NISP [34]93.0181.00M(35.5%)0.49M(42.4%)
GAL-0.692.9878.30M(37.6%)0.75M(11.8%)
HRank(Ours)93.1762.72M(50.0%)0.49M(42.4%)
He et al. [13]90.8062.00M(50.6%)-
GAL-0.890.3649.99M(60.2%)0.29M(65.9%)
HRank(Ours)90.7232.52M(74.1%)0.27M(68.1%)
ResNet-11093.50252.89M(0.0%)1.72M(0.0%)
L1 [18]93.30155.00M(38.7%)1.16M(32.6%)
HRank(Ours)94.23148.70M(41.2%)1.04M(39.4%)
GAL-0.5 [23]92.55130.20M(48.5%)0.95M(44.8%)
HRank(Ours)93.36105.70M(58.2%)0.70M(59.2%)
HRank(Ours)92.6579.30M(68.6%)0.53M(68.7%)
+ +Table 4. Pruning results of DenseNet-40 on CIFAR-10. + +
ModelTop-1%FLOPs(PR)Parameters(PR)
DenseNet-4094.81282.00M(0.0%)1.04M(0.0%)
Liu et al. - 40% [24]94.81190.00M(32.8%)0.66M(36.5%)
GAL-0.01 [23]94.29182.92M(35.3%)0.67M(35.6%)
HRank(Ours)94.24167.41M(40.8%)0.66M(36.5%)
Zhao et al. [36]93.16156.00M(44.8%)0.42M(59.7%)
GAL-0.05 [23]93.53128.11M(54.7%)0.45M(56.7%)
HRank(Ours)93.68110.15M(61.0%)0.48M(53.8%)
+ +baseline model (93.52% vs. 93.26%). Besides, we observe that HRank shares the same parameters reduction as NISP, another property importance based method, but achieves a better accuracy (93.17% vs. 93.01) and larger FLOPs reduction (50.0% vs. 35.5%). Moreover, HRank can effectively deal with filters with more computation costs, leading to a significant acceleration. Similar observations can be found when compared with adaptive importance based methods, including He et al. and GAL-0.8. HRank yields an impressive acceleration (74.1% vs. 50.6% for He et al. and 60.2% for GAL-0.8). + +Next, we analyze the performance on ResNet-110. Similar to what we have found with ResNet-56, HRank leads to an improvement in accuracy over the baseline model (94.23% vs. 93.50%) with around 41.2% FLOPs and 39.4% parameters reduction. Besides, compared with L1, with a slightly better complexity reduction, HRank again benefits from better accuracy performance (94.23% vs. 93.30%). Therefore, the rank can effectively reflect the relative importance of a filter and serve as a better intrinsic property. Finally, in comparison with GAL-0.5, HRank greatly reduces the model complexity (58.2% vs. 48.5% for FLOPs and 59.2% vs. 44.8% for parameters) with only a small loss in accuracy of 0.14%, while GAL-0.5 suffers a 0.95% accuracy drop. Moreover, we also maintain a similar accuracy with GAL-0.5 (92.65% vs. 92.55%). Obviously, HRank further accelerates the computation (68.6% vs. 48.5%) and relieves the overload (68.7% vs. 44.8%). This indicates that HRank is especially suitable for pruning neural networks with residual blocks. + +DenseNet-40. Tab. 4 summarizes the experimental results on DenseNet. We observe that HRank has the poten + +Table 5. Pruning results of ResNet-50 on ImageNet. + +
ModelTop-1%Top-5%FLOPsParameters
ResNet-50 [26]76.1592.874.09B25.50M
SSS-32 [16]74.1891.912.82B18.60M
He et al. [13]72.3090.802.73B-
GAL-0.5 [23]71.9590.942.33B21.20M
HRank(Ours)74.9892.332.30B16.15M
GDP-0.6 [22]71.1990.711.88B-
GDP-0.5 [22]69.5890.141.57B-
SSS-26 [16]71.8290.792.33B15.60M
GAL-1 [23]69.8889.751.58B14.67M
GAL-0.5-joint [23]71.8090.821.84B19.31M
HRank(Ours)71.9891.011.55B13.77M
Thinet-50 [26]68.4288.301.10B8.66M
GAL-1-joint [23]69.3189.121.11B10.21M
HRank(Ours)69.1089.580.98B8.27M
+ +tial to remove more FLOPs. Though Liu et al. retains the accuracy of the baseline, it produces only $32.8\%$ FLOPs reductions. In contrast, over $40.8\%$ of FLOPs are removed by HRank. Compared with Zhao et al. and GAL-0.05, HRank achieves higher accuracy and FLOPs reduction, though it removing fewer parameters. Overall, HRank has the potential to better accelerate neural networks. Hence, it can also be applied in networks with dense blocks. + +# 4.2.2 Results on ImageNet + +We also conduct experiments for ResNet-50 on the challenging ImageNet dataset. The results are shown in Tab. 5. Generally, HRank surpasses its counterparts in all aspects, including top-1 and top-5 accuracies, as well as FLOPs and parameters reduction. More specifically, $1.78 \times$ FLOPs (2.30B vs. 4.09B for ResNet-50) and $1.58 \times$ parameters (16.15M vs. 25.50M of ResNet-50) are removed by HRank, while it still yields $74.98\%$ top-1 accuracy and $92.33\%$ top-5 accuracy, significantly better than GAL-0.5. Moreover, HRank obtains 71.98 top-1 accuracy and 91.01 top-5 accuracy with $2.64 \times$ and $1.85 \times$ reductions of FLOPs and parameters, respectively. Further, between ThiNet-50 and GAL-1-joint, we observe that GAL-1-joint advances in better accuracies, while ThiNet-50 shows more advantages in FLOPs and parameters reductions. Nevertheless, HRank outperforms both GAL-1-joint and ThiNet-50. Compared with GAL-1-joint, which gains $69.31\%$ top-1 and $89.12\%$ top-5 accuracies, HRank obtains $69.10\%$ top-1 and $89.58\%$ top-5 accuracies. When comparing to ThiNet-50, better complexity reductions are observed (0.98B FLOPs vs. 1.10B FLOPs for ThiNet-50 and 8.27M parameters vs. 8.66M for ThiNet-50). Hence, HRank also works well on complex datasets. + +# 4.3. Ablation Study + +We conduct detailed ablation studies on variants of HRank and keeping a portion of filters frozen during finetuning. For brevity, we report the results of the ResNet-56 with top-1 accuracy of $93.17\%$ in Tab. 3. Similar observations can be found in other networks and datasets. + +![](images/5695626bb60666e586aabd4caf22aa591a3f77ed76cbf0c5c708774bb9f50915.jpg) +Figure 4. Top-1 accuracy for variants of HRank. + +Variants of HRank. Three variants are proposed to demonstrate the appropriateness of preserving filters with high-rank feature maps, including: (1) Edge: Filters generating both low- and high-rank feature maps are pruned, (2) Random: Filters are randomly pruned. (3) Reverse: Filters generating high-rank feature maps are pruned. The pruning rate is set to be the same as that with $93.17\%$ top-1 accuracy of HRank in Tab. 3. We report the corresponding top-1 accuracy for each variant in Fig. 4. Among the variants, Edge shows the best performance. To analyze, though part of filters with high-rank feature maps removed, it retains some of those with relatively high-rank feature maps, which contains rich information. Besides, HRank obviously outperforms its variants and Reverse performs the worst, demonstrating that low-rank feature maps contain less information and the corresponding filters can be safely removed. + +Freezing Filters during Fine-tuning. We show that not updating filters with higher-rank feature maps does little damage to the model performance. To that effect, we show the top-1 accuracy w.r.t. different rates of untrained weights in Fig. 5. In Fig. 5(a), all the reserved filters are involved in updating, which yields a top-1 accuracy of $93.17\%$ (this can be seen as the upper boundary for Fig. 5(b) and Fig. 5(c)). In Fig. 5(b), around $15\% - 20\%$ of filters are untrained, which returns a top-1 accuracy of $93.13\%$ , which is only slightly worse than the $93.17\%$ of Fig. 5(a). The effect of a larger percentage of untrained filters is displayed in Fig. 5(c), consisting of around $20\% - 25\%$ of the overall weights. The pruned model obtains a top-1 accuracy of $93.01\%$ . Though with a $0.11\%$ drop in performance, it still outperforms the methods compared in Fig. 3. Fig. 5 well supports our claim that feature maps with high ranks contain more information. + +# 5. Conclusions + +In this paper, we present a novel filter pruning method called HRank, which determines the relative importance of filters by observing the rank of feature maps. To that effect, we empirically demonstrate that the average rank of feature maps generated by a single filter are always the same. Then, we mathematically prove that filters that gen + +![](images/1cf2462460df74cf363b5722200303ebc33ae885874e4c930aafe237327cc128.jpg) +(a) $0\%$ of the filters are frozen, resulting in a top-1 precision of $93.17\%$ . + +![](images/793e868e397fbf38cbbcf9e013a54d4d72fe563dee009a27351c7f549ec379ec.jpg) +(b) $15\% - 20\%$ of the filters are frozen, resulting in a top-1 precision of $93.13\%$ . + +![](images/6afc4de2808d2a102fe30f6fa6eb1a88ef7c20b977256db133f3bf8ba0a5022e.jpg) +(c) $20\% - 25\%$ of the filters are frozen, resulting in a top-1 precision of $93.01\%$ . +Figure 5. How freezing filter weights during fine-tuning affects the top-1 precision. The x-axes denote the indices of convolutional layers. The blue, green and red denote the percentage of pruned, trained and untrained filters, respectively. + +erate lower-rank feature maps are less important and should be removed first, and vice versa, which is also verified by the experiments. In addition, we propose to freeze a portion of the filters producing high-rank feature maps to further reduce the fine-tuning cost, showing little compromise to the model performance. Extensive experiments on various modern CNNs demonstrate the effectiveness of HRank in reducing the computational complexity and model size. In the future work, we will do more on the theoretical analysis on why the average rank of feature maps generated by a single filter are always the same. + +# 6. Acknowledge + +This work is supported by the Nature Science Foundation of China (No.U1705262, No.61772443, No.61572410, No.61802324 and No.61702136), National Key R&D Program (No.2017YFC0113000, and No.2016YFB1001503), and Nature Science Foundation of Fujian Province, China (No. 2017J01125 and No. 2018J01106). + +# References + +[1] Miguel A Carreira-Perpinan and Yerlan Idelbayev. Learning-compression algorithms for neural net pruning. In Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[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 Transaction on Pattern Analysis and Machine Learning (TPAMI), 2017. 1 +[3] Wenlin Chen, James T. Wilson, Stephen Tyree, Killian Q. Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In International Conference on Machine Learning (ICML), 2015. 1 +[4] Jian Cheng, Pei-song Wang, Gang Li, Qing-hao Hu, and Han-qing Lu. Recent advances in efficient computation of deep convolutional neural networks. Frontiers of Information Technology & Electronic Engineering (FITEE), 2018. 1 +[5] Misha Denil, Babak Shakibi, Laurent Dinh, Marc'Aurelio Ranzato, and Nando De Freitas. Predicting parameters in deep learning. In Neural Information Processing Systems (NeurIPS), 2013. 3 +[6] Emily L Denton, Wojciech Zaremba, Joan Bruna, Yann LeCun, and Rob Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In Neural Information Processing Systems (NeurIPS), 2014. 1, 3 +[7] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), 2014. 1 +[8] Song Han, Xingyu Liu, Huizi Mao, Jing Pu, Ardavan Pedram, Mark A Horowitz, and William J Dally. Eie: efficient inference engine on compressed deep neural network. In International Conference on Computer Architecture (ISCA), 2016. 1 +[9] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In International Conference of Learning Representation (ICLR), 2015. 1 +[10] Song Han, Jeff Pool, John Tran, and William J Dally. Learning both weights and connections for efficient neural network. In Neural Information Processing Systems (NeurIPS), 2015. 1 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), 2016. 1, 2, 5, 6 +[12] Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[13] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In International Conference on Computer Vision (ICCV), 2017. 2, 3, 7 +[14] Hengyuan Hu, Rui Peng, Yu-Wing Tai, and Chi-Keung Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016. 2, 3, 4, 5, 6 + +[15] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Computer Vision and Pattern Recognition (CVPR), 2017. 2, 5, 6 +[16] Zehao Huang and Naiyan Wang. Data-driven sparse structure selection for deep neural networks. In European Conference on Computer Vision (ECCV), 2018. 2, 3, 6, 7 +[17] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 2, 5 +[18] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In International Conference of Learning Representation (ICLR), 2017. 1, 2, 3, 6, 7 +[19] Mingbao Lin, Rongrong Ji, Shaojie Li, Qixiang Ye, Yonghong Tian, Jianzhuang Liu, and Qi Tian. Filter sketch for network pruning. arXiv preprint arXiv:2001.08514, 2020. 1 +[20] Mingbao Lin, Rongrong Ji, Yuxin Zhang, Baochang Zhang, Yongjian Wu, and Yonghong Tian. Channel pruning via automatic structure search. arXiv preprint arXiv:2001.08565, 2020. 1 +[21] Shaohui Lin, Rongrong Ji, Chao Chen, Dacheng Tao, and Jiebo Luo. Holistic cnn compression via low-rank decomposition with knowledge transfer. IEEE Transaction on Pattern Analysis and Machine Learning (TPAMI), 2018. 3 +[22] Shaohui Lin, Rongrong Ji, Yuchao Li, Yongjian Wu, Feiyue Huang, and Baochang Zhang. Accelerating convolutional networks via global & dynamic filter pruning. In International Joint Conference on Artificial Intelligence (IJCAI), 2018. 7 +[23] Shaohui Lin, Rongrong Ji, Chenqian Yan, Baochang Zhang, Liujuan Cao, Qixiang Ye, Feiyue Huang, and David Doermann. Towards optimal structured cnn pruning via generative adversarial learning. In Computer Vision and Pattern Recognition (CVPR), 2019. 2, 3, 6, 7 +[24] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In International Conference on Computer Vision (ICCV), 2017. 2, 3, 7 +[25] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), 2015. 1 +[26] Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. In Computer Vision and Pattern Recognition (CVPR), 2017. 2, 3, 7 +[27] Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. In International Conference of Learning Representation (ICLR), 2016. 2, 3 +[28] Jongsoo Park, Sheng Li, Wei Wen, Ping Tak Peter Tang, Hai Li, Yiran Chen, and Pradeep Dubey. Faster cnns with direct sparse convolutions and guided pruning. In International Conference of Learning Representation (ICLR), 2016. 1 + +[29] 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 Neural Information Processing Systems (NeurIPS), 2017. 5 +[30] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Neural Information Processing Systems (NeurIPS), 2015. 1 +[31] 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. *Internation Journal of Computer Vision (IJCV)*, 2015. 2, 5 +[32] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint, 2014. 2, 5, 6 +[33] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Computer Vision and Pattern Recognition (CVPR), 2015. 1, 2, 5, 6 +[34] Ruichi Yu, Ang Li, Chun-Fu Chen, Jui-Hsin Lai, Vlad I Morariu, Xintong Han, Mingfei Gao, Ching-Yung Lin, and Larry S Davis. Nisp: Pruning networks using neuron importance score propagation. In Computer Vision and Pattern Recognition (CVPR), 2018. 2, 3, 7 +[35] Xiangyu Zhang, Jianhua Zou, Xiang Ming, Kaiming He, and Jian Sun. Efficient and accurate approximations of nonlinear convolutional networks. In Computer Vision and Pattern Recognition (CVPR), 2015. 3 +[36] Chenglong Zhao, Bingbing Ni, Jian Zhang, Qiwei Zhao, Wenjun Zhang, and Qi Tian. Variational convolutional neural network pruning. In Computer Vision and Pattern Recognition (CVPR), 2019. 2, 3, 6, 7 +[37] Bolei Zhou, Yiyou Sun, David Bau, and Antonio Torralba. Revisiting the importance of individual units in cnns via ablation. arXiv preprint arXiv:1806.02891, 2018. 4 \ No newline at end of file diff --git a/hrankfilterpruningusinghighrankfeaturemap/images.zip b/hrankfilterpruningusinghighrankfeaturemap/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..64756303e5f22957bfa2c03e459fde159b5b450a --- /dev/null +++ b/hrankfilterpruningusinghighrankfeaturemap/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1202e471335f476e7b30b91b1d504e86279ce9ff73de41386beb1b935bf9d04d +size 565657 diff --git a/hrankfilterpruningusinghighrankfeaturemap/layout.json b/hrankfilterpruningusinghighrankfeaturemap/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..109461f9545799064df4307f37d2498a20ac6ad9 --- /dev/null +++ b/hrankfilterpruningusinghighrankfeaturemap/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b9969eb802ecb8a494fdfd124a604576b9df0de40229be671418b98f43ae8b8 +size 429145 diff --git a/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_content_list.json b/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9b64680e384f4e0d9313fa276c8939e085465fd2 --- /dev/null +++ b/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17f4774aa2b84c32b5d626b7725c399b516f6e7d73031d6c1db7b5bd624ad208 +size 82463 diff --git a/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_model.json b/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..248d8729feb7510f2166fd04da1a50940c804312 --- /dev/null +++ b/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3e68f373d2c936b3f18ed8cdb2e083c4498add6dd338090b67a06505eafb3c3 +size 107412 diff --git a/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_origin.pdf b/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8c9fa671018312ab074c07354336b99396c8153d --- /dev/null +++ b/humbialargemultiviewdatasetofhumanbodyexpressions/afa0dcdc-db57-4c8a-bca0-cc733f7ffaf0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9abcb29757090d4a0237a85a7aee8c4921c4a148b5e825b5dceb61f4889621f9 +size 6118969 diff --git a/humbialargemultiviewdatasetofhumanbodyexpressions/full.md b/humbialargemultiviewdatasetofhumanbodyexpressions/full.md new file mode 100644 index 0000000000000000000000000000000000000000..211038d6b6d926c6ffb0f645b2a1ea515d61dd3c --- /dev/null +++ b/humbialargemultiviewdatasetofhumanbodyexpressions/full.md @@ -0,0 +1,345 @@ +# HUMBI: A Large Multiview Dataset of Human Body Expressions + +*Zhixuan Yu† *Jae Shin Yoon† In Kyu Lee† Prashanth Venkatesh† +Jaesik Park‡ Jihun Yu‡ Hyun Soo Park† +†University of Minnesota ‡POSTECH #BinaryVR + +![](images/c8f9605ed9eeff6ded6032522529b42926f6a745976f25c968dcfcf685faac90.jpg) +Figure 1: We present a new large dataset of multiview human body expressions for modeling view-specific appearance and geometry. 107 synchronized cameras capture the expressions of 772 distinctive subjects. We focus on five elementary expressions: face (blue), gaze (yellow), hand (pink and purple), body (light orange), and garment including top (light blue) and bottom (light green). + +# Abstract + +This paper presents a new large multiview dataset called HUMBI for human body expressions with natural clothing. The goal of HUMBI is to facilitate modeling view-specific appearance and geometry of gaze, face, hand, body, and garment from assorted people. 107 synchronized HD cameras are used to capture 772 distinctive subjects across gender, ethnicity, age, and physical condition. With the multiview image streams, we reconstruct high fidelity body expressions using 3D mesh models, which allows representing view-specific appearance using their canonical atlas. We demonstrate that HUMBI is highly effective in learning and reconstructing a complete human model and is complementary to the existing datasets of human body expressions with limited views and subjects such as MPII-Gaze, Multi-PIE, Human3.6M, and Panoptic Studio datasets. + +# 1. Introduction + +We express sincere intent, emotion, and attention through our honest body signals [50], including gaze, facial expression, and gestures. Modeling and photorealistic rendering of such body signals are, therefore, the core enabler of authentic telepresence. However, it is challenging due to + +the complex physical interactions between texture, geometry, illumination, and viewpoint (e.g., translucent skins, tiny wrinkles, and reflective fabric). Recently, pose- and view-specific models by making use of a copious capacity of neural encoding [6,39] substantially extend the expressibility of existing linear models [16]. So far, these models have been constructed by a sequence of the detailed scans of a target subject using dedicated camera infrastructure (e.g., multicamera systems [7,25, 73]). Looking ahead, we would expect a new versatile model that is applicable to the general appearance of assorted people without requiring the massive scans for every target subject. + +Among many factors, what are the core resources to build such a generalizable model? We argue that the data that can span an extensive range of appearances from numerous shapes and identities are prerequisites. To validate our conjecture, we present a new dataset of human body expressions called HUMBI (HUMAN Multiview Behavioral Imaging) that pushes to two extremes: views and subjects. As of Nov 20191, the dataset is composed of 772 distinctive subjects with natural clothing across diverse age, gender, ethnicity, and physical condition captured by 107 HD synchronized cameras (68 cameras facing at frontal body). Comparing to existing datasets for human body expressions such as CMU Panoptic Studio [24, 26], MPII [51, 52], and + +![](images/1762f2f8ce6e7cc3adc7287ecd2dd39c7853b9931b86a8dd2cc8fe36d98139d9.jpg) +Figure 2: We present HUMBI that pushes towards two extremes: views and subjects. The view-specific appearance measured by 107 HD cameras regarding five elementary body expressions for 772 distinctive subjects. + +![](images/2e2a5f6d3920402ee642beae98cfbdb9d11649170695a33fa20be74155d27630.jpg) + +INRIA [31], HUMBI presents the unprecedented scale visual data (Figure 2) that are ideal for learning the detailed appearance and geometry of five elementary human body expressions: gaze, face, hand, body, and garment (Figure 1). + +Our analysis shows that HUMBI is effective. We make use of vanilla convolutional neural networks (CNN) to learn view-invariant 3D pose from HUMBI, which quantitatively outperforms the counterpart models trained by existing datasets with limited views and subjects. More importantly, we show that HUMBI is complementary to such datasets, i.e., the trained models can be substantially improved by combining with these datasets. + +The main properties of HUMBI are summarized below. (1) Complete: it captures the total body, including gaze, face, hand, foot, body, and garment to represent holistic body signals [28], e.g., perceptual asynchrony between the face and hand movements. (2) Dense: 107 HD cameras create a dense light field that observe the minute body expressions with minimal self-occlusion. This dense light field allows us to model precise appearance as a function of view [39]. (3) Natural: the subjects are all voluntary participants (no actor/actress/student/researcher). Their activities are loosely guided by performance instructions, which generates natural body expressions. (4) Diverse: 772 distinctive subjects with diverse clothing styles, skin colors, time-varying geometry of gaze/face/body/hand, and range of motion. (5) Fine: with multiview HD cameras, we reconstruct the high fidelity 3D model using 3D meshes, which allows representing view-specific appearance in its canonical atlas. + +# 2. Related Work + +We briefly review the existing datasets for modeling human body expressions: gaze, face, hand, body, and garment. These datasets are summarized in Table 1. + +Gaze Columbia Gaze dataset [62] and UT-Multiview dataset [64] have been captured in a controlled environments where the head poses are fixed. In subsequent work, such constraints have been relaxed. Eyediap dataset [43] captured gaze while allowing head motion, providing natural gaze movements. MPI-Gaze dataset [81] measured inthe-wild gaze from laptops, including 214K images across + +15 subjects. This contains a variety of appearance and illumination. RT-GENE dataset [18] takes a step further by measuring free-ranging point of regard where the ground truth was obtained by using motion capture of mobile eyetracking glasses. + +Face 3D Morphable Model (3DMM) [10] was constructed by 3D scans of large population to model the complex geometry and appearance of human faces. For instance, 3D faces were reconstructed by leveraging facial landmarks [8, 29, 36, 55, 57], and dense face mesh [17, 68]. Notably, 3DMM is fitted to 60K samples from several face alignment datasets [8, 42, 56, 82, 85] to create the 300W-LP dataset [84]. For facial appearance, a deep appearance model [39] introduces view-dependent appearance using a conditional variational autoencoder, which outperforms linear active appearance model [16]. + +Hand Dexterous hand manipulation frequently introduces self-occlusion, which makes building a 3D hand pose dataset challenging. A depth image that provides trivial hand segmentation in conjunction with tracking has been used to establish the ground truth hand pose [65-67, 69]. However, such approaches still require intense manual adjustments. This challenge was addressed by making use of graphically generated hands [44, 45, 86], which may introduce a domain gap between real and synthetic data. For real data, an auxiliary input such as magnetic sensors was used to precisely measure the joint angle and recover 3D hand pose using forward kinematics [74, 78]. Notably, a multicamera system has been used to annotate hands using 3D bootstrapping [61], which provided the hand annotations for RGB data. FreiHAND [15] leveraged MANO [53] mesh model to represent dense hand pose. + +Body Markerless motion capture is a viable solution to measure dense human body expression at high resolution. For example, multi-camera systems have been used to capture a diverse set of body poses, e.g., actors and actresses perform a few scripted activities such as drinking, answering cellphone, and sitting [23, 60]. Natural 3D human behaviors were captured in the midst of the role-playing of social events from a multiview system [27], while those events inherently involve with a significant occlusion by people or objects that inhibit modeling a complete human body. Further, a 4D scanner [11,52] enabled high resolution body capture to construct a parametric human models, e.g., SMPL [40]. Notably, image-to-surface correspondences on 50K COCO images [38] enabled modeling humans from a single view image [32]. Further, rendering of human model in images could alleviate annotation efforts [70]. + +Clothes Previous works have proposed to capture the natural cloth deformation in response to human body movement. Cloth regions were segmented in 3D using multiview reconstruction [13, 75]. To ensure the same topology when segmenting the cloth from 3D reconstruction, the SMPL body model can be used to parametrize cloth motion, which produces physically plausible cloth geometry while preserving + +
Dataset# of subjectsMeasurement methodGazeFaceHandBodyCloth
Columbia Gaze [62]565 cameras✓ (fixed)
UT-Multiview [64]508 cameras✓ (fixed)
Eyediap [43]161 depth camera and 1 HD camera✓ (free)
MPII-Gaze [81]151 camera✓ (free)
RT-GENE [18]17eyetracking device✓ (free)
CMU Multi-PIE [19]33715 cameras✓
3DMM [10]2003D scanner✓
BFM [49]2003D scanner✓
ICL [12]10,0003D scanner✓
NYU Hand [69]2 (81K samples)Depth camera✓
HandNet [74]10 (213K samples)Depth camera and magnetic sensor✓
BigHand 2.2M [78]10 (2.2M samples)Depth camera and magnetic sensor✓
RHD [86]20 (44K samples)N/A (synthesized)✓
STB [80]1 (18K samples)1 pair of stereo cameras✓
FreiHand [15]N/A (33K samples)8 cameras✓
CMU Mocap~100Marker-based✓
CMU Skin Mocap [47]<10Marker-based✓✓
INRIA [31]N/AMarkerless (34 cameras)✓✓ (natural)
Human EVA [60]4Marker-based and Markerless (4-7 cameras)✓
Human 3.6M [23]11Markerless (depth camera and 4 HD cameras)✓
Panoptic Studio [27,61]~100Markerless (31 HD and 480 VGA cameras)✓✓
Dyna [52]10Markerless (22 pairs of stereo cameras)✓
ClothCap [51]10Markerless (22 pairs of stereo cameras)✓ (synthesized)
BUFF [79]5Markerless (22 pairs of stereo cameras)✓✓ (natural)
3DPW [71]7Marker-based (17 IMUs) and Markerless (1 camera + 3D scanner)✓✓ (natural)
TNT15 [72]4Marker-based (10 IMUs) and Markerless (8 cameras + 3D scanner)✓
D-FAUST [11]10Markerless (22 pairs of stereo cameras)✓
HUMBI772Markerless (107 HD cameras)✓ (free)✓✓✓✓ (natural)
+ +Table 1: Human body expression datasets. + +wrinkle level details [51]. + +Our Approach Unlike existing datasets focusing on each body expressions, HUMBI is designed to span geometry and appearance of total body expressions from a number of distinctive subjects using a dense camera array. Our terascale multiview visual data provide a new opportunity to generalize pose- and view-specific appearance. + +# 3. HUMBI + +HUMBI is composed of 772 distinctive subjects captured by 107 synchronized HD cameras. 69 cameras are uniformly distributed across dodecagon frame with $2.5\mathrm{m}$ diameter along the two levels of an arc (0.8 m and $1.6\mathrm{m}$ ) where the baseline between adjacent cameras is approximately $10^{\circ}$ (22 cm). Another 38 cameras are distributed across the frontal quadrant of the dodecagon frame (average baseline: $10\mathrm{cm}$ ) to densify cameras used for capturing face/gaze. The dataset includes the five elementary body expressions: gaze, face, hand, body, and garment. We use COLMAP [59] to calibrate cameras, and upgrade the reconstruction to the metric scale using physical camera baselines. Notable subject statistics include: evenly distributed gender (50.7% female; 49.3% male); a wide range of age groups (11% of thirties, 29% of twenties, and 26% of teenagers); diverse skin colors (black, dark brown, light brown, and white); various styles of clothing (dress, short-/long-sleeve t-shirt, jacket, hat, and short-/long-pants). The statistics are summarized in Figure 3. In this section, we focus on the resulting computational representations while deferring the detailed description of reconstruction approaches to Appendix. + +Notation We denote our representation of human body expressions as follows: + +Images: $\mathcal{I} = \{\mathbf{I}_i\}$ is a set of multiview images. +3D keypoints: $\kappa$ + +3D mesh: $\mathcal{M} = \{\mathcal{V},\mathcal{E}\}$ +- 3D occupancy map: $\mathcal{O}:\mathbb{R}^3\to \{0,1\}$ that takes as input 3D voxel coordinate and outputs binary occupancy. +- Appearance map: $\mathcal{A}:\mathbb{R}^2\to [0,1]^3$ that takes as input atlas coordinate (UV) and outputs normalized RGB values. + +Keypoint 3D keypoints on face ( $\mathcal{K}_{\mathrm{face}}$ ), hands ( $\mathcal{K}_{\mathrm{hand}}$ ), and body including feet ( $\mathcal{K}_{\mathrm{body}}$ ) are reconstructed by triangulating 2D human keypoints detections [14] with RANSAC, followed by a nonlinear refinement minimizing geometric reprojection error. When multiple humans are visible, we localize each subject via geometric verification. + +# 3.1. Gaze + +HUMBI Gaze contains $\sim 93\mathrm{K}$ images (4 gaze directions $\times \sim 30$ views per subject). We represent gaze geometry using a unit 3D vector $\mathbf{g} \in \mathbb{S}^2$ with respect to the moving head coordinate system. + +The head coordinate is defined as follows. The origin is the center of eyes, $\mathbf{o} = (\mathbf{p}_l + \mathbf{p}_r) / 2$ where $\mathbf{p}_l, \mathbf{p}_r \in \mathbb{R}^3$ are left and right eye centers. The $x$ -axis is the direction along the line joining the two eye centers, $(\mathbf{p}_l - \mathbf{o}) / \| \mathbf{p}_l - \mathbf{o}\|$ ; the $z$ -axis is the direction perpendicular to the plane made of $\mathbf{p}_l$ , $\mathbf{p}_r$ , and $\mathbf{p}_m$ where $\mathbf{p}_m$ is the center of the mouth, orienting towards the hind face; $y$ -axis is defined as a vector orthogonal to both $x$ - and $z$ -axes under right-hand rule constraint. + +For eye appearance, we provide two representations: (1) normalized eye patches and (2) pose-independent appearance map. For the normalized eye patches, we warp an eye patch region such that the orientation and distance remain constant across views. RGB values are histogram-qualified. For appearance, we select vertices of eye region in the Surrey face model [22] to build a canonical atlas coordinate (UV) for each eye. We represent view-specific + +![](images/4e5d488a5e901f429124377e5220a75569d271c90062a7b7cc0c0d9995fe164f.jpg) +Figure 3: (Top and bottom) HUMBI includes 772 distinctive subjects across gender, ethnicity, age, clothing style, and physical condition, which generates diverse appearance of human expressions. (Middle) For each subject, 107 HD cameras capture her/his expressions including gaze, face, hand, body, and garment. + +appearance map $\mathcal{A}_{\mathrm{gaze}}$ by projecting pixels in the image onto that the atlas coordinate. Figure 4(a) illustrates view-specific appearance across views with median and variance of appearance. The variance map shows that the appearance is highly dependent on viewpoint in particular in the iris region. + +# 3.2. Face + +HUMBI Face contains $\sim 17.3\mathrm{M}$ images (330 frames $\times$ 68 views per subject). We represent face geometry using a 3D blend shape model $\mathcal{M}_{face}$ (Surrey [22]) with 3,448 vertices and 6,736 faces. We reconstruct the shape model using 68 facial keypoints $(\mathcal{K}_{\mathrm{face}})$ and the associated multiview images $(\mathcal{I}_{\mathrm{face}})$ , i.e., $\mathcal{M}_{\mathrm{face}} = f_{\mathrm{face}}(\mathcal{K}_{\mathrm{face}},\mathcal{I}_{\mathrm{face}})$ where $f_{\mathrm{face}}$ is a face alignment function. We align the face model by minimizing reprojection error over shape, expression, illumination, and texture parameters (see Appendix). Given the reconstructed face mesh model, we construct a view-specific appearance map $\mathcal{A}_{\mathrm{face}}$ by projecting pixels in the image onto its canonical atlas coordinate. For each view, the projection map between the image and atlas coordinate is established through the corresponding 3D locations in the reconstructed mesh with bilinear interpolation. Figure 4(b) illustrates view-specific appearance across views with median and variance of appearance. The variance map shows that the appearance is dependent on views, e.g. the regions of salient landmarks such as eye, eyebrows, nose, and mouth, which justifies the necessity of view-specific appearance modeling [39]. + +# 3.3. Hand + +HUMBI Hand contains $\sim 24\mathrm{M}$ images (290 frames $\times$ 68 views per subject). We represent hand geometry using a 3D parametric model $\mathcal{M}_{\mathrm{hand}}$ (MANO [53]) with 778 vertices and 1,538 faces. We reconstruct the mesh + +model using hand keypoints $(\mathcal{K}_{\mathrm{hand}}$ with 21 keypoints), i.e., $\mathcal{M}_{\mathrm{hand}} = f_{\mathrm{hand}}(\mathcal{K}_{\mathrm{face}})$ , where $f_{\mathrm{hand}}$ is a hand alignment function. We align the hand model to multiview images by minimizing the Euclidean distance between hand keypoints and the corresponding pose of the mesh model with a $L_{2}$ parameter regularization. To learn the consistent shape of the hand model for each subject, we infer the maximum likelihood estimate of the shape parameter given the reconstructed keypoints over frames (see Appendix). Given the reconstructed hand mesh model, we construct a view-specific appearance map $\mathcal{A}_{\mathrm{hand}}$ by projecting pixels in an image onto the canonical atlas coordinate. Figure 4(c) illustrates view-specific appearance across views with median and variance of appearance. The variance map shows that the appearance is dependent on view points. + +# 3.4. Body + +Each subject performs a sequence of motion and dance performance, which constitutes $\sim 26\mathrm{M}$ images. Given a set of multiview images at each time instant, we reconstruct a mesh model $\mathcal{M}_{\mathrm{body}}$ using body keypoints $\kappa_{\mathrm{body}}$ , and occupancy map $\mathcal{O}_{\mathrm{body}}$ , i.e., $\mathcal{M}_{\mathrm{body}} = f_{\mathrm{body}}(\mathcal{K}_{\mathrm{body}}, \mathcal{O}_{\mathrm{body}})$ where $f_{\mathrm{body}}$ is a alignment function that matches the surface of $\mathcal{M}_{\mathrm{body}}$ to the outer surface of the occupancy map while minimizing the distance between the reconstructed keypoints $\kappa_{\mathrm{body}}$ and the underlying pose of the mesh (see Appendix). We use the SMPL parametric model [40] that is composed of 4,129 vertices and 7,999 faces without hand and head vertices. + +Shape-from-silhouette² [34] is used to reconstruct the occupancy map $\mathcal{O}_{\mathrm{body}}$ . The occupancy map is generated by human body segmentation [37]. As a by-product, the semantics (i.e., head, torso, upper arm, lower arm, upper leg, + +![](images/4ca21ddd556ea5b38c75f9c2a5ea3bf6e250409c8478756e8340a56b5c8e65b4.jpg) +(a) Gaze appearance + +![](images/700b9d0df933738013dd9c2accb1ec44d1d43f1e32ae910942cd193e4f3c3b27.jpg) +(b) Face appearance + +![](images/a955d9582e74a6e4e787a1890431366e57398e8265fd75fbfe09d885bdb80366.jpg) +(c) Hand appearance + +![](images/0e8c8a3e4726952fab658a6d66c446b41fe0ba81eabf3fbeb9941ae2ca058967.jpg) +(d) Body appearance + +and lower leg) can be labeled at each location in the occupancy map by associating with the projected body label [76] as shown in Figure 5. + +Given the reconstructed body mesh model, we construct a view-specific appearance map $\mathcal{A}_{\mathrm{body}}$ by projecting pixels in an image onto the canonical atlas coordinate. Figure 4(d) illustrates view-specific appearance across views with median and variance of appearance. The variance map shows that the appearance is dependent on view points. + +# 3.5. Garment + +Given the body reconstruction, we represent the garment geometry using a garment mesh model $\mathcal{M}_{\mathrm{cloth}}$ as similar to [51]. An alignment function $\mathcal{M}_{\mathrm{cloth}} = f_{\mathrm{cloth}}(\mathcal{M}_{\mathrm{body}},\mathcal{O}_{\mathrm{body}})$ is used to reconstruct the cloth mesh model from the body model and occupancy map. A set of fiducial correspondences between the cloth and body meshes are predefined, which are used as control points for cloth deformation. The deformed cloth is matched to the outer surface of the occupancy map with a Laplacian regularization [63] (see Appendix). Three garment topologies for each cloth piece are used, i.e., tops: sleeveless shirts + +![](images/d289bc5e0b48f81e9ecbedb068f3ffc6214e6c9f217b7d1abfdb276b8ffed28b.jpg) +Figure 4: View-specific appearance rendered from multiview images with median appearance and variance for (a) gaze, (b) face, (c) hand, (d) body. +Figure 5: We reconstruct the body occupancy map and its outer surface using shape-from-silhouette and associate the point cloud with body semantics (head, body, arms, and legs). + +(3,763 vertices and 7,261 faces), T-shirts (6,533 vertices, 13,074 faces), and long-sleeve shirts (8,269 vertices and 16,374 faces), and bottoms: short (3,975 vertices and 7,842 faces), medium (5,872 vertices and 11,618 faces), and long pants (11,238 vertices and 22,342 meshes), which are manually matched to each subject. + +![](images/7398dd3c30b6e6719c8f546929aecc4694921815058b4abfe1ebecd15b4cc745.jpg) + +![](images/35ec9dc674072c2eb08e2f4c2d19bd41327b9e1b88d70d62f1f84e5ce5ad072b.jpg) + +![](images/aa5c1c29a282aaa6a08e5adec01e4ca5dba24326fc58e0ec8787c375e1e4f2f9.jpg) + +![](images/fa32d0379cadc3062f25d99a1b6bf79615c674e58aa336813a1a17b7d40719a6.jpg) + +![](images/305d4cc05faee19595d4ab5ed79889264d6b522422ad6706d08bf39fb3a06a95.jpg) + +![](images/fe2f318a3cc7ee8ec1f9f51607ace5d1d3341425de45e01af787888508a9140f.jpg) + +![](images/5c8e0b023785c8bc6226122308f5d0092cc93306e0d67047503e3ac567c47f79.jpg) + +![](images/f6f2601d95e5249aa737b944b89ebe193b694f8977794823e0580862ad759ae8.jpg) + +![](images/1f34c6d23fa78d35dc06d0b0a22b8b58c5f4d85eafc0ee62420d9b316fa6d69c.jpg) +Figure 6: Distribution of head pose, gaze and eye pose in normalized space for MPII-Gaze, UT-Multiview, RT-GENE and HUMBI. Horizontal and vertical axis represent yaw and pitch angle respectively (unit: degree). + +![](images/9e4e7f3177952946cdab665959ddab21292c28c2d4ec21a7f17b96b9c1c96b10.jpg) + +![](images/e113de9b8ed86ff6682b6708742fb4ceea0ee761dd2088a9e3247898550c9cbf.jpg) + +![](images/d33b209c2445a269b713f3576d6f91a1b49b387b96c1aa7ae603e5d21da9c469.jpg) + +
Bias / Variance \UTMVMPIIRTGENEHUMBI
Gaze7.43 / 33.098.80 / 10.1019.35 / 31.717.70 / 30.01
Headpose4.20 / 29.2812.51 / 16.0417.97 / 22.481.42 / 24.77
Eyepose8.43 / 15.4020.81 / 19.023.21 / 17.498.78 / 19.04
Average6.69 / 25.9314.04 / 15.0513.51 / 23.905.98 / 24.61
+ +# 4. Evaluation + +We evaluate HUMBI in terms of generalizability, diversity, and accuracy. For the generalizability, we conduct the cross-data evaluation on tasks of single view human reconstruction, e.g., monocular 3D face mesh prediction. For diversity, we visualize the distribution of HUMBI, e.g., gaze direction distribution along the yaw and pitch angle. For the accuracy, we measure how the number of cameras affects the quality of reconstruction. More evaluations can be found in Appendix. + +# 4.1. Gaze + +Benchmark Datasets We use three benchmark datasets: (1) MPII-Gaze (MPII) [81] contains 213,659 images from 15 subjects, which was captured under the scenarios of everyday laptop use. (2) UT-Multiview (UTMV) [64] is composed of 50 subjects with 160 gaze directions captured by 8 monitor-mounted cameras. Using the real data, the synthesized images from 144 virtual cameras are augmented. (3) RT-GENE [18] contains 122,531 images of 15 subjects captured by eye-tracking glasses. + +Distribution of Gaze Directions To characterize HUMBI Gaze, we visualize three measures in Figure 6: (1) gaze pose: the gaze direction with respect to camera pose; (2) head pose: the head orientation with respect to the camera pose; and (3) eye pose: the gaze direction with respect to the head. HUMBI covers a wide and continuous range of + +Table 2: Bias and variance analysis of the distribution of head pose, gaze and eye pose (unit: degree, smallest bias and largest variance in bold, second with underline). + +
Training TestingMPIIUTMVHUMBIMPII + HUMBIUTMV + HUMBI
MPII6.1±3.311.8±6.68.8±4.87.4±4.17.7±4.6
UTMV23.3±9.45.0±3.28.2±4.59.4±5.15.4±3.2
HUMBI23.7±13.714.6±10.37.9±5.48.9±6.28.0±5.4
+ +Table 3: The mean error of 3D gaze prediction for the cross-data evaluation (unit: degree). + +head poses, due to numerous views and natural head movements by many subjects. The yaw and pitch of gaze and eye poses are distributed uniformly across all angles. The quantitative analysis of the bias and variance of the gaze distribution is summarized in Table 2. HUMBI shows the smallest average bias $(5.98^{\circ}$ compared to $6.69^{\circ} - 14.04^{\circ}$ from other datasets) and second-largest average variance $(24.61^{\circ}$ compared to $25.93^{\circ}$ of UTMV). Notice that UTMV is a synthesized dataset while HUMBI is real. + +Monocular 3D Gaze Prediction To validate the generalizability of HUMBI Gaze, we use an existing gaze detection network [81] to conduct a cross-data evaluation. We randomly choose $\sim 25\mathrm{K}$ images (equally distributed among subjects) as experiment set for each dataset. One dataset is used for training and others are used for testing. Each data sample is defined as $\{(e_c, h_c), g_c\}$ , where $e_c \in \mathbb{R}^{36 \times 60}$ , $h_c \in \mathbb{R}^2$ , $g_c \in \mathbb{R}^2$ are normalized eye patch, yaw and pitch angle of head pose, and gaze direction with respect to a virtual camera $c$ . The detection network is trained to minimize the mean squared error of gaze yaw and pitch angles. We conduct a self-data evaluation for each dataset with $90\% / 10\%$ of training/testing split. Table 3 summarizes the experiment results. The detector trained by MPII and UTMV shows weak performance on cross-data evaluation comparing to HUMBI with $3^\circ - 16^\circ$ margin. HUMBI exhibits strong performance on cross-data evaluation with minimal degradation (less than $1^\circ$ drop). Also, UTMV + HUMBI and MPII + HUMBI outperform each alone by a margin of $4.1^\circ$ and $13.9^\circ$ when tested on the third dataset MPII and UTMV respectively, showing that HUMBI is complementary to UTMV and MPII. + +# 4.2. Face + +Benchmark Dataset We use 3DDFA [84] that provides $\sim 6\mathrm{K}$ 2D-3D pairs of the 3D face geometry and the associated images. We use $90\% /10\%$ of training/testing split. The base face model of 3DDFA is the Basel model [49], which is different from our face model (Surrey [22]). We manually pre-define the correspondences between two models in the canonical coordinates. + +Monocular 3D Face Mesh Prediction We evaluate HUMBI Face by predicting a 3D face mesh using a recent mesh reconstruction network [77]. The network encoder directly regresses the 3D face shape and head pose from a single view image. We modify the decoder to accommodate the differentiable Basel model. We train the network + +![](images/8d7410b095ad1c0fe6dc39f6f3663e253c94dff85ee2a9243d5d1b46ddce2bf2.jpg) +Figure 7: We measure viewpoint dependency of a face/body mesh reconstruction model trained by multiple datasets. Augmenting HUMBI substantially reduce the view dependency. + +
Training +Testing3DDFAHUMBI3DDFA+HUMBI
3DDFA7.1±6.420.7±7.14.3±6.6
HUMBI23.5±13.913.3±13.78.4±12.2
+ +with three dataset combinations, i.e., 3DDFA, HUMBI, and 3DDFA+HUMBI, and for each training, we minimize the loss of the reprojection error with weak perspective projection model. To measure the accuracy, we use the reprojection error scaled to the input image resolution (256 pixel). Table 4 summarizes the results. From the results of 3DDFA+HUMBI, the prediction accuracy is improved from both datasets (2.8 pixels from 3DDFA and 4.9 pixels from HUMBI) by combining two datasets, which indicates the complementary nature of HUMBI. Due to the multiview images in HUMBI, the network can learn the view-invariant geometric representation, which allows precise reconstruction even with considerable occlusion as shown in Figure 7. + +# 4.3. Hand + +Benchmark Datasets We use three benchmark datasets: (1) Rendered Handpose Dataset (RHD) [86] is a synthesized hand dataset containing 44K images built from 20 freely available 3D models performing 39 actions. (2) Stereo Hand Pose Tracking Benchmark (SHPTB) [80] is a real hand dataset captured by a stereo rgb camera rig. (3) FreiHAND [15] is a multi-view real hand dataset captured by 8 cameras. (4) ObMan [21] is a large scale synthetic hand mesh dataset with associated 2D images (141K pairs). We use previous two datasets for the hand keypoint evaluation and the last one for the hand mesh evaluation. + +Monocular 3D Hand Pose Prediction To validate HUMBI Hand, we conduct a cross-data evaluation for the task of the 3D hand pose estimation from a single view image, where we use a recent hand pose detector [86]. We train and evaluate the model trained by each dataset and a combination of HUMBI and each other dataset. The results are sum + +Table 4: The mean error of 3D face mesh prediction for cross-data evaluation (unit: pixel). + +
TrainingTestingSRFHS+HR+HF+H
STB (S)0.720.400.220.470.400.520.44
RHD (R)0.160.590.260.490.480.500.44
FreiHand (F)0.150.400.720.370.350.430.35
HUMBI (H)0.160.360.180.500.430.470.41
Average0.300.440.360.460.420.480.41
+ +Table 5: Cross-data evaluation results of 3D hand keypoint prediction. Metric is AUC of PCK calculated over an error range of 0-20 mm. + +marized in Table 5. We use area under PCK curve (AUC) in an error range of $0 - 20\mathrm{mm}$ as the metric. It shows that HUMBI is more generalizable for predicting 3D hand pose than other three datasets (by a margin of 0.02-0.16 AUC). Moreover, HUMBI is complementary to other datasets and the performance of model trained by another dataset alone is increased with HUMBI (by a margin of 0.04-0.12 AUC). + +Monocular 3D Hand Mesh Prediction We compare HUMBI Hand with synthetic ObMan [21] dataset. We use a recent regression network [77] that outputs the hand mesh shape and camera pose with minor modifications, e.g., we change the size of the latent coefficient and the hand mesh decoder to the ones from the MANO hand model. We train and evaluate the network based on the reprojection error with weak perspective projection model. The results are summarized in Table 6. Due to the domain gap between the real and synthetic data, the prediction accuracy of the network trained with synthetic data is largely degraded on the real data. However, by combining two datasets, the performance is highly improved (even better than intra-data evaluation), e.g., ObMan+HUMBI can outperform ObMan and HUMBI 0.3 and 1.7 pixels, respectively. + +# 4.4. Body + +Benchmark Datasets We use four benchmark datasets: (1) Human3.6M [23] contains numerous 3D human poses of 11 actors/actresses measured by motion capture system with corresponding images from 4 cameras. (2) MPI-INF-3DHP [41] is 3D human pose estimation dataset, which contains both 3D and 2D pose labels as well as images covering both indoor and outdoor scenes. We use its test set containing 2,929 valid frames from 6 subjects. (3) UP-3D [33] is a 3D body mesh dataset providing $\sim 9\mathrm{K}$ pairs of 3D body reconstruction and the associated 2D images. We use Human3.6M, MPI-INF-3DHP for body pose evaluation and UP-3D for body mesh evaluation. + +Monocular 3D Body Pose Prediction To validate HUMBI body, we conduct a cross-data evaluation for the task of estimating 3D human pose from a single view image. We use a recent body pose detector [83]. We train and evaluate model trained by each dataset and model trained by a combination of HUMBI and each other dataset. By following the training protocol of [83], we use 2D landmark labels from MPII dataset [5] for a weak supervision. The results are summa + +
Training TestingObManHUMBIObMan+HUMBI
ObMan3.84±2.66.1±4.13.5±2.4
HUMBI10.6±11.36.5±8.44.8±5.8
+ +Table 6: The mean error of 3D hand mesh prediction for cross-data evaluation (unit: pixel). + +
Training TestingH36MMI3DHUMBIH36M +HUMBIMI3D +HUMBI
H36M0.5620.3620.4340.5510.437
MI3D0.3170.3770.3540.3750.425
HUMBI0.2480.2670.4090.3720.377
Average0.3760.3350.3990.4330.413
+ +Table 7: Cross-data evaluation results of 3D body keypoint prediction. Metric is AUC of PCK calculated over an error range of $0 - 150\mathrm{mm}$ . + +
Training +TestingUP-3DHUMBIUP-3D+HUMBI
UP-3D22.7±18.649.4±0.0918.4±13.8
HUMBI26.0±19.714.5±6.612.5±8.4
+ +Table 8: The mean error of 3D body mesh prediction for cross-data evaluation (unit: pixel). + +rized in Table 7. We use area under PCK curve (AUC) in an error range of $0 - 150\mathrm{mm}$ as the metric. It shows that HUMBI is more generalizable for predicting 3D body pose than Human3.6M and MPI-INF-3DHP (by a margin of 0.023 and 0.064 AUC). Moreover, HUMBI is complementary to each other dataset and the performance of model trained by another dataset alone is increased with HUMBI (by a margin of 0.057 and 0.078 AUC respectively). + +Monocular 3D Body Mesh Prediction We compare the body mesh prediction accuracy using a recent CNN model trained on (1) HUMBI, (2) UP-3D, and (3) HUMBI+UP-3D. While we use [77] for the testing CNN model, recent monocular body reconstruction methods [1-4, 9, 20, 30, 35, 46, 48, 54, 58] can be alternative to test the generalization ability of HUMBI. The network decoder is modified to accommodate the differentiable SMPL parameter prediction. The reprojection error is used to supervise the network and to evaluate testing performance. The cross-data evaluation is summarized in Table 8. We observe that the network trained with HUMBI shows weak performance because of the lack of diversity of poses. However, it is highly complementary to other datasets as it provides various appearance from 107 viewpoints as shown in Figure 7. + +# 4.5. Garment + +We conduct camera-ablation study to evaluate how the number of cameras affect garment reconstruction quality. We incrementally reduce the number of cameras and measure the reconstruction accuracy and density. The reconstruction density is computed by the number of 3D points produced by multiview stereo [59]. The reconstruction accuracy metric is the closest point distance from the 3D gar + +![](images/19c4db3398a560b0525e3993311d806f00c5e5708e86fe5b938de8e0400173ca.jpg) + +![](images/0432f8a1762fb6e88fdae5495545392ada1871a16369ca002dc401e3651598ca.jpg) + +![](images/a8a9bfe6deebf0951e6748e5b48a96c62dc810703ab7bd339841c3a51c767e1c.jpg) +Figure 8: We conduct camera-ablation study to evaluate the accuracy of the garment reconstruction in terms of the density (left) and the accuracy (right). + +![](images/6ea409fd390bae5923b51e26a8efe1a0c79b98b703f2a5133991f1b5269a29b0.jpg) + +ment surface reconstructed by shape-from-silhouette [34]. In both cases, the performance reaches to the optimal even without 107 cameras as shown in Figure 8, ensuring that our garment reconstruction is accurate (density: 90 cameras ≈ 107 cameras; accuracy: 60 cameras ≈ 107 cameras). The additional evaluations on the garment silhouette accuracy can be found in the Appendix. + +# 5. Discussion + +We present HUMBI dataset that is designed to facilitate high resolution pose- and view-specific appearance of human body expressions. Five elementary body expressions (gaze, face, hand, body, and garment) are captured by a dense camera array composed of 107 synchronized cameras. The dataset includes diverse activities of 772 distinctive subjects across gender, ethnicity, age, and physical condition. We use a 3D mesh model to represent the expressions where the view-dependent appearance is coordinated by its canonical atlas. Our evaluation shows that HUMBI outperforms existing datasets as modeling nearly exhaustive views and can be complementary to such datasets. + +HUMBI is the first-of-its-kind dataset that attempts to span the general appearance of assorted people by pushing towards two extremes: views and subjects. This will provide a new opportunity to build a versatile model that generates photorealistic rendering for authentic telepresence. However, the impact of HUMBI will not be limited to appearance modeling, i.e., it can offer a novel multiview benchmark dataset for a stronger and generalizable reconstruction and recognition model specific to humans. + +# Acknowledgement + +This work was partially supported by National Science Foundation (No.1846031 and 1919965), National Research Foundation of Korea, and Ministry of Science and ICT of Korea (No.2020R1C1C1015260). + +# References + +[1] T. Alldieck, M. Magnor, B. L. Bhatnagar, C. Theobalt, and G. Pons-Moll. Learning to reconstruct people in clothing from a single RGB camera. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 8 +[2] T. Alldieck, M. Magnor, W. Xu, C. Theobalt, and G. Pons-Moll. Video based reconstruction of 3d people models. In IEEE Conference on Computer Vision and Pattern Recognition. CVPR Spotlight Paper. 8 +[3] T. Alldieck, M. Magnor, W. Xu, C. Theobalt, and G. Pons-Moll. Detailed human avatars from monocular video. In 3DV, 2018. 8 +[4] T. Alldieck, G. Pons-Moll, C. Theobalt, and M. Magnor. Tex2shape: Detailed full human body geometry from a single image. In ICCV, 2019. 8 +[5] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 7 +[6] M. Armando, J.-S. Franco, and E. Boyer. Adaptive mesh texture for multi-view appearance modeling. In 3DV, 2018. 1 +[7] T. Beeler, B. Bickel, P. Beardsley, B. Sumner, and M. Gross. High-quality single-shot capture of facial geometry. SIGGRAPH, 2010. 1 +[8] P. N. Belhumeur, D. W. Jacobs, D. J. Kriegman, and N. Kumar. Localizing parts of faces using a consensus of exemplars. TPAMI, 2013. 2 +[9] B. L. Bhatnagar, G. Tiwari, C. Theobalt, and G. Pons-Moll. Multi-garment net: Learning to dress 3d people from images. In ICCV, 2019. 8 +[10] V. Blanz and T. Vetter. Face recognition based on fitting a 3D morphable model. TPAMI, 2003. 2, 3 +[11] F. Bogo, J. Romero, G. Pons-Moll, and M. J. Black. Dynamic FAUST: Registering human bodies in motion. In CVPR, 2017. 2, 3 +[12] J. Booth, A. Roussos, A. Ponniah, D. Dunaway, and S. Zafeiriou. Large scale 3D morphable models. IJCV. 3 +[13] D. Bradley, T. Popa, A. Sheffer, W. Heidrich, and T. Boubekeur. Markerless garment capture. In TOG, 2008. 2 +[14] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multi-person 2D pose estimation using part affinity fields. In CVPR, 2017. 3 +[15] J. Y. B. R. M. A. Christian Zimmermann, Duygu Ceylan and T. Brox. Freihand: A dataset for markerless capture of hand pose and shape from single rgb images. In ICCV, 2019. 2, 3, 7 +[16] T. F. Cootes, G. J. Edwards, and C. J. Taylor. Active appearance models. TPAMI, 2001. 1, 2 +[17] Y. Feng, F. Wu, X. Shao, Y. Wang, and X. Zhou. Joint 3d face reconstruction and dense alignment with position map regression network. In ECCV, 2018. 2 +[18] T. Fischer, H. Jin Chang, and Y. Demiris. Rt-gene: Realtime eye gaze estimation in natural environments. In ECCV, 2018. 2, 3, 6 +[19] R. Gross, I. Matthews, J. F. Cohn, T. Kanade, and S. Baker. Multi-PIE. IVC, 2009. 3 +[20] M. Habermann, W. Xu, M. Zollhoefer, G. Pons-Moll, and C. Theobalt. Livecap: Real-time human performance capture from monocular video. ACM Transactions on Graphics (TOG), 2019. 8 + +[21] Y. Hasson, G. Varol, D. Tzionas, I. Kalevatykh, M. J. Black, I. Laptev, and C. Schmid. Learning joint reconstruction of hands and manipulated objects. In CVPR, 2019. 7 +[22] P. Huber, G. Hu, R. Tena, P. Mortazavian, P. Koppen, W. J. Christmas, M. Ratsch, and J. Kittler. A multiresolution 3d morphable face model and fitting framework. In VISIGRAPP, 2016. 3, 4, 6 +[23] C. Ionescu, D. Papava, V. Olaru, and C. Sminchisescu. Human3.6M: Large scale datasets and predictive methods for 3d human sensing in natural environments. TPAMI, 2014. 2, 3, 7 +[24] H. Joo, H. Liu, L. Tan, L. Gui, B. Nabbe, I. Matthews, T. Kanade, S. Nobuhara, and Y. Sheikh. Panoptic studio: A massively multiview system for social motion capture. In ICCV, 2015. 1 +[25] H. Joo, H. S. Park, and Y. Sheikh. Map visibility estimation for large-scale dynamic 3d reconstruction. In CVPR, 2014. 1 +[26] H. Joo, T. Simon, M. Cikara, and Y. Sheikh. Towards social artificial intelligence: Nonverbal social signal prediction in a triadic interaction. In CVPR, 2019. 1 +[27] H. Joo, T. Simon, X. Li, H. Liu, L. Tan, L. Gui, S. Banerjee, T. S. Godisart, B. Nabbe, I. Matthews, T. Kanade, S. Nobuhara, and Y. Sheikh. Panoptic studio: A massively multiview system for social interaction capture. TPAMI, 2017, 2, 3 +[28] H. Joo, T. Simon, and Y. Sheikh. Total capture: A 3d deformation model for tracking faces, hands, and bodies. In CVPR, 2018. 2 +[29] A. Jourabloo and X. Liu. Large-pose face alignment via cnn-based dense 3d model fitting. In CVPR, 2016. 2 +[30] A. Kanazawa, M. J. Black, D. W. Jacobs, and J. Malik. End-to-end recovery of human shape and pose. In CVPR, 2018. 8 +[31] D. Knossow, R. Ronfard, and R. Horaud. Human motion tracking with a kinematic parameterization of extremal contours. IJCV, 2008. 2, 3 +[32] C. Lassner, J. Romero, M. Kiefel, F. Bogo, M. J. Black, and P. V. Gehler. Unite the people: Closing the loop between 3d and 2d human representations. In CVPR, 2017. 2 +[33] C. Lassner, J. Romero, M. Kiefel, F. Bogo, M. J. Black, and P. V. Gehler. Unite the people: Closing the loop between 3d and 2d human representations. In CVPR, 2017. 7 +[34] A. Laurentini. The visual hull concept for silhouette-based image understanding. TPAMI, 1994. 4, 8 +[35] V. Lazova, E. Insafutdinov, and G. Pons-Moll. 360-degree textures of people in clothing from a single image. In 3DV, 2019. 8 +[36] V. Le, J. Brandt, Z. Lin, L. Bourdev, and T. S. Huang. Interactive facial feature localization. In ECCV, 2012. 2 +[37] G. Lin, A. Milan, C. Shen, and I. D. Reid. Refinenet: Multipath refinement networks for high-resolution semantic segmentation. In CVPR, 2017. 4 +[38] 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, 2014. 2 +[39] S. Lombardi, J. Saragih, T. Simon, and Y. Sheikh. Deep appearance models for face rendering. SIGGRAPH, 2018. 1, 2, 4 + +[40] M. Loper, N. Mahmood, J. Romero, G. Pons-Moll, and M. J. Black. Smpl: A skinned multi-person linear model. TOG, 2015, 2, 4 +[41] D. Mehta, H. Rhodin, D. Casas, P. Fua, O. Sotnychenko, W. Xu, and C. Theobalt. Monocular 3d human pose estimation in the wild using improved cnn supervision. In 3DV, 2017. 7 +[42] K. Messer, J. Matas, J. Kittler, J. Luettin, and G. Maitre. Xm2vtsdb: The extended m2vts database. In AVBPA, 1999. 2 +[43] K. A. F. Mora, F. Monay, and J.-M. Odobez. Eyediap: A database for the development and evaluation of gaze estimation algorithms from rgb and rgb-d cameras. In ETRA, 2014. 2, 3 +[44] F. Mueller, F. Bernard, O. Sotnychenko, D. Mehta, S. Sridhar, D. Casas, and C. Theobalt. Ganerated hands for real-time 3d hand tracking from monocular rgb. In CVPR, 2018. 2 +[45] F. Mueller, D. Mehta, O. Sotnychenko, S. Sridhar, D. Casas, and C. Theobalt. Real-time hand tracking under occlusion from an egocentric rgb-d sensor. In ICCV, 2017. 2 +[46] M. Omran, C. Lassner, G. Pons-Moll, P. Gehler, and B. Schiele. Neural body fitting: Unifying deep learning and model based human pose and shape estimation. In 3DV, 2018. 8 +[47] S. Park and J. Hodgins. Capturing and animating skin deformation in human motion. SIGGRAPH, 2006. 3 +[48] G. Pavlakos, V. Choutas, N. Ghorbani, T. Bolkart, A. A. A. Osman, D. Tzionas, and M. J. Black. Expressive body capture: 3d hands, face, and body from a single image. In CVPR, 2019. 8 +[49] P. Paysan, R. Knothe, B. Amberg, S. Romdhani, and T. Vetter. A 3D face model for pose and illumination invariant face recognition. AVSS, 2009. 3, 6 +[50] A. Pentland. *Honest Signals: How They Shape Our World*. MIT Press, 2008. 1 +[51] G. Pons-Moll, S. Pujades, S. Hu, and M. J. Black. Clothcap: Seamless 4d clothing capture and retargeting. TOG, 2017. 1, 3, 5 +[52] G. Pons-Moll, J. Romero, N. Mahmood, and M. J. Black. Dyna: A model of dynamic human shape in motion. SIGGRAPH, 2015. 1, 2, 3 +[53] J. Romero, D. Tzionas, and M. J. Black. Embodied hands: Modeling and capturing hands and bodies together. SIGGRAPH, 2017. 2, 4 +[54] Y. Rong, Z. Liu, C. Li, K. Cao, and C. C. Loy. Delving deep into hybrid annotations for 3d human recovery in the wild. In ICCV, 2019. 8 +[55] C. Sagonas, E. Antonakos, G. Tzimiropoulos, S. Zafeiriou, and M. Pantic. 300 faces in-the-wild challenge: Database and results. IVC, 2016. 2 +[56] C. Sagonas, G. Tzimiropoulos, S. Zafeiriou, and M. Pantic. 300 faces in-the-wild challenge: The first facial landmark localization challenge. In ICCVW, 2013. 2 +[57] C. Sagonas, G. Tzimiropoulos, S. Zafeiriou, and M. Pantic. A semi-automatic methodology for facial landmark annotation. In CVPRW, 2013. 2 +[58] S. Saito, , Z. Huang, R. Natsume, S. Morishima, A. Kanazawa, and H. Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. 2019. 8 + +[59] J. L. Schonberger and J.-M. Frahm. Structure-from-motion revisited. In CVPR, 2016. 3, 4, 8 +[60] L. Sigal, A. O. Balan, and M. J. Black. Humaneva: Synchronized video and motion capture dataset and baseline algorithm for evaluation of articulated human motion. IJCV, 2010. 2, 3 +[61] T. Simon, H. Joo, I. A. Matthews, and Y. Sheikh. Hand keypoint detection in single images using multiview bootstrapping. In CVPR, 2017. 2, 3 +[62] B. Smith, Q. Yin, S. Feiner, and S. Nayar. Gaze locking: Passive eye contact detection for humanobject interaction. In UIST, 2013. 2, 3 +[63] O. Sorkine and M. Alexa. As-rigid-as-possible surface modeling. In Symposium on Geometry processing, 2007. 5 +[64] Y. Sugano, Y. Matsushita, and Y. Sato. Learning-bysynthesis for appearance-based 3d gaze estimation. In CVPR, 2014. 2, 3, 6 +[65] X. Sun, Y. Wei, S. Liang, X. Tang, and J. Sun. Cascaded hand pose regression. In CVPR, 2015. 2 +[66] J. S. Supancic, G. Rogez, Y. Yang, J. Shotton, and D. Ramana. Depth-based hand pose estimation: data, methods, and challenges. In ICCV, 2015. 2 +[67] D. Tang, H. J. Chang, A. Tejani, and T.-K. Kim. Latent regression forest: Structured estimation of 3d articulated hand posture. In CVPR, 2014. 2 +[68] A. Tewari, M. Zollofer, H. Kim, P. Garrido, F. Bernard, P. Perez, and T. Christian. MoFA: Model-based Deep Convolutional Face Autoencoder for Unsupervised Monocular Reconstruction. In ICCV, 2017. 2 +[69] J. Thompson, M. Stein, Y. Lecun, and K. Perlin. Real-time continuous pose recovery of human hands using convolutional networks. TOG, 2014. 2, 3 +[70] G. Varol, J. Romero, X. Martin, N. Mahmood, M. J. Black, I. Laptev, and C. Schmid. Learning from synthetic humans. In CVPR, 2017. 2 +[71] T. von Marcard, R. Henschel, M. Black, B. Rosenhahn, and G. Pons-Moll. Recovering accurate 3d human pose in the wild using imus and a moving camera. In ECCV, 2018. 3 +[72] T. von Marcard, G. Pons-Moll, and B. Rosenhahn. Human pose estimation from video and imus. Transactions on Pattern Analysis and Machine Intelligence, 2016. 3 +[73] A. Wenger, A. Gardner, C. Tchou, J. Unger, T. Hawkins, and P. Debevec. Performance relighting and reflectance transformation with time-multiplexed illumination. SIGGRAPH, 2005. 1 +[74] A. Wetzler, R. Slossberg, and R. Kimmel. Rule of thumb: Deep derotation for improved fingertip detection. In BMVC, 2016. 2, 3 +[75] R. White, K. Crane, and D. A. Forsyth. Capturing and animating occluded cloth. In TOG, 2007. 2 +[76] J. S. Yoon, Z. Li, and H. S. Park. 3d semantic trajectory reconstruction from 3d pixel continuum. CVPR, 2018. 5 +[77] J. S. Yoon, T. Shiratori, S.-I. Yu, and H. S. Park. Self-supervised adaptation of high-fidelity face models for monocular performance tracking. In CVPR, 2019. 6, 7, 8 +[78] S. Yuan, Q. Ye, B. Stenger, S. Jain, and T.-K. Kim. Big hand 2.2m benchmark: Hand pose data set and state of the art analysis. In CVPR, 2017. 2, 3 + +[79] C. Zhang, S. Pujades, M. J. Black, and G. Pons-Moll. Detailed, accurate, human shape estimation from clothed 3d scan sequences. In CVPR, 2017. 3 +[80] J. Zhang, J. Jiao, M. Chen, L. Qu, X. Xu, and Q. Yang. A hand pose tracking benchmark from stereo matching. In ICIP, 2017. 3, 7 +[81] X. Zhang, Y. Sugano, M. Fritz, and A. Bulling. Appearance-based gaze estimation in the wild. In CVPR, 2015. 2, 3, 6 +[82] E. Zhou, H. Fan, Z. Cao, Y. Jiang, and Q. Yin. Extensive facial landmark localization with coarse-to-fine convolutional + +network cascade. In ICCVW, 2013. 2 +[83] X. Zhou, Q. Huang, X. Sun, X. Xue, and Y. Wei. Towards 3d human pose estimation in the wild: a weakly-supervised approach. In ICCV, 2017. 7 +[84] X. Zhu, Z. Lei, X. Liu, H. Shi, and S. Z. Li. Face alignment across large poses: A 3d solution. In CVPR, 2016. 2, 6 +[85] X. Zhu and D. Ramanan. Face detection, pose estimation, and landmark localization in the wild. In CVPR, 2012. 2 +[86] C. Zimmermann and T. Brox. Learning to estimate 3d hand pose from single rgb images. In ICCV, 2017. 2, 3, 7 \ No newline at end of file diff --git a/humbialargemultiviewdatasetofhumanbodyexpressions/images.zip b/humbialargemultiviewdatasetofhumanbodyexpressions/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7778508dc379af9e211797283813831ef7e559f2 --- /dev/null +++ b/humbialargemultiviewdatasetofhumanbodyexpressions/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d627a342b70ff6e4a15f8c543395ed626ae829387597c037d8504f167a921f0e +size 976311 diff --git a/humbialargemultiviewdatasetofhumanbodyexpressions/layout.json b/humbialargemultiviewdatasetofhumanbodyexpressions/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..235a0c819348f10f7bd1224c47cff707cf3abac5 --- /dev/null +++ b/humbialargemultiviewdatasetofhumanbodyexpressions/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b3d750aa433d917c759b8713548ad5726cbb8bc77743b882162560967680f3 +size 442040 diff --git a/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_content_list.json b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1ab9908e8d6f1bdcb1eac6ab9a9986cb1fc38661 --- /dev/null +++ b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27cba31f16a582051e6bd884c95fb99ace5a01ccff4730ba517c8fd36e5f62f7 +size 78301 diff --git a/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_model.json b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2a9b26f7f79a7781d981be0bafa542cf38d3eebe --- /dev/null +++ b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:409d24a5727e91c775ddfed2521064e3462dbce2298520fa237e355c6f1b7c72 +size 94174 diff --git a/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_origin.pdf b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fe2d40f1a29ad47bfecc356eda40f6d3fec3b943 --- /dev/null +++ b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/1803abe7-7257-4b55-b059-c0b6b3f4dee4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cf18b75a049cb74f9e89f16bdf9b88125f26f350a8490d21638babc9780a4a3 +size 1032141 diff --git a/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/full.md b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7c2b7d7bfb1dea2ed1f35b5ede550a09d58eeb2f --- /dev/null +++ b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/full.md @@ -0,0 +1,295 @@ +# HVNet: Hybrid Voxel Network for LiDAR Based 3D Object Detection + +Maosheng Ye Shuangjie Xu Tongyi Cao DEEPROUTE.AI + +{maoshengye, shuangjiexu, tongyicao}@deeproute.ai + +# Abstract + +We present Hybrid Voxel Network (HVNet), a novel one-stage unified network for point cloud based 3D object detection for autonomous driving. Recent studies show that 2D voxelization with per voxel PointNet style feature extractor leads to accurate and efficient detector for large 3D scenes. Since the size of the feature map determines the computation and memory cost, the size of the voxel becomes a parameter that is hard to balance. A smaller voxel size gives a better performance, especially for small objects, but a longer inference time. A larger voxel can cover the same area with a smaller feature map, but fails to capture intricate features and accurate location for smaller objects. We present a Hybrid Voxel network that solves this problem by fusing voxel feature encoder (VFE) of different scales at point-wise level and project into multiple pseudo-image feature maps. We further propose an attentive voxel feature encoding that outperforms plain VFE and a feature fusion pyramid network to aggregate multi-scale information at feature map level. Experiments on the KITTI benchmark show that a single HVNet achieves the best mAP among all existing methods with a real time inference speed of $31Hz$ . + +# 1. Introduction + +3D object detection is the task to recognize and locate objects in 3D scene. It serves as a fundamental task for 3D scene understanding with wide applications in robotics and self-driving cars. Recent approaches utilize various types of data, including monocular images [23, 27], stereo images [11, 21] and point cloud [10, 35] from LiDAR. + +Unlike 2D images, point cloud data has some unique properties. The location of each point reflects the surface of physical objects in the real world. In bird eye view, data is scale invariant inherently and objects are naturally separated, which facilitates the detection of occluded object. Due to its accuracy and robustness, LiDAR has become the prevalent sensor for autonomous. However, the density of point cloud varies greatly. The volume density is proportional to the inverse of square distance to the sensor. This makes it difficult to adopt point cloud segmentation net + +![](images/5e6c0eee75999379561c2bdb93685167364bc59d8fc12be932b15143a64adc8b.jpg) + +![](images/99da17da00f27caab16ba48aa8a81b99dc73670120c4dc48d7e7548e28f600bb.jpg) +Runtime (Hz) + +![](images/a0cc5807886b2ee805a535a5f74f33a8c6cba964a0a4a5f3942d738e16c4065e.jpg) + +![](images/c1538dd178d86e0ba6e6f33e9b679e75fe6559d44d4db9e67bcaf0392913760c.jpg) +Figure 1. Bird's eye view performance vs speed in KITTI [5] test set. Multi-sensor methods drawn as blue circles; two-stage LiDAR based methods drawn as green diamonds and one-stage methods drawn as red squares. Methods on the right of the blue vertical bar are real-time. Methods should be at least $20Hz$ since onboard application should cover 360 degree rather than KITTI annotation at limited 90 degree. Drawn methods are FP: F-PointNet [20], AF: AVOD-FPN [9], M: MMF [13], I: IPOD [31], FC: F-ConvNet [26], S: STD [32], PR: PointRCNN [22], FPR: Fast Point R-CNN [2], SE: SECOND [28], PP: PointPillars [10], PI: $\mathrm{PIXOR}++$ [29] and O: our HVNet. For PointPillars we use their runtime on PyTorch for a fair comparison. Our approach outperforms in most case, especially for $mAP$ and Cyclist. + +works or 2D image detection methods. + +In order to handle these problems and utilize the advantages of LiDAR data, many approaches have been proposed recently (see Fig 1 caption). A noticeable line of methods combine 2D/3D voxelization with PointNet feature extractor in each voxel [10, 28, 35], which we call voxel feature encoding (VFE) methods. Using learnt point cloud features and 2D pseudo image feature map, these methods achieve both good accuracy and high inference speed. VFE methods generally contain three steps (Fig 2 VFE). 1. Voxelization: the point cloud is assigned to a 2D voxel grid. 2. Voxel Feature Extraction: a grid dependent point-wise feature is + +![](images/e7e803f9eca7da25a87c620227bcc8261031acc5701311c382503114e6e94e36.jpg) + +![](images/ac03b0d4af49851e375370230d8cfb2e53aa5e248d87d86e96d879db57c47579.jpg) +Figure 2. The voxel feature extraction strategy of VFE methods and our HVNet. Each point feature in VFE methods only contains one specified scale knowledge. As to HVNet, point features under hybrid scales are aggregated into a global context, then projected to features in dynamic target scales. + +computed for each point and fed into a Pointnet style feature encoder. 3. Projection: the point-wise feature is aggregated to the voxel-level feature and projected back to their original grid, forming a pseudo-image feature map. + +A key parameter in VFE methods is the size of voxel. A smaller voxel captures finer geometry feature and better localizes the object but suffers from longer inference time. A coarser voxel leads to a smaller feature map and faster inference speed but has inferior performance, especially for small objects. In [10], a grid size of 0.12 gives the best result on KITTI dataset with a speed of $25\mathrm{Hz}$ . However, the inference space is limited to the 90 degree FOV in front with a 70 meter range. Other work uses multiple voxel scales to enhance the performance [24] of the network but the runtime is still dominated by the largest feature map. + +In order to utilize fine-grained voxel feature as well as maintain runtime efficiency, we propose Hybrid Voxel Network (HVNet). HVNet decouples the feature extraction scale and the pseudo-image projection scale. Similar to [10], the HVNET contains three steps (Fig 2 HVFE): 1. Multi-Scale Voxelization: We create a set of feature voxel scale and each point is assigned to multiple voxels. 2. Hybrid Voxel Feature Extraction: for each scale, a voxel dependent feature is computed for each point and fed into the attentive voxel feature encoder (AVFE). Feature from each voxel scale is concatenated point-wise. 3. Dynamic Feature Projection To project the feature back to a pseudo-image, we create another set of multi-scale projection voxels, which can be independent of the feature voxels. The multi-scale point-wise feature from the last step is aggregated according to the projection scale voxels, forming + +multiple pseudo-image feature maps. By these strategies, the HVNet is able to be time-efficient. As an example, a set of feature voxel scale can be $\{0.1m, 0.2m, 0.4m\}$ and the projection voxel scale can be $\{0.4m\}$ . For a $80m \times 80m$ area we end up with a feature map of size $200 \times 200$ . For a normal VFE structure, we need a feature map of size of $800 \times 800$ to capture small feature at $0.1m$ scale. + +We evaluated our HVNet on the KITTI [5] dataset. HVNet achieves the state-of-the-art performance among all the LiDAR one-stage methods (Fig. 1). Besides, even when compared with methods of two stage and multi-sensor, our approach also outperforms in $mAP$ and Cyclist. At the same time, HVNet runs at a real-time speed of $31Hz$ . + +In summary, our contributions reside as follows: + +- We propose an novel Hybrid Voxel Feature Encoder that fuses multi-scale VFE efficiently by decoupling the feature extraction voxels and the feature map projection voxels. +- We maintain all the voxels implicitly and perform the scale aggregation in the compact point-wise form to achieve high computation and memory efficiency. +- We propose an attentive VFE that achieves great improvement with little computation overhead. +- Extensive experiments are conducted on the KITTI to demonstrate the effectiveness of each component. + +# 2. Related Work + +# 2.1. 3D Object Detection + +There are roughly two different lines for existing methods of 3D object detection with point cloud: + +Multi-sensor based 3D object detection. MV3D [1] is a pioneering work which projects point cloud into bird eye view and front view. AVOD [9], inspired by MV3D, designs 3D object anchors and then aggregates corresponding feature maps by projection to generate a comprehensive representation for detection. F-PointNet [20] extends the 2D detections from image into corresponding frustums in the 3D space. MMF [13] is proposed to exploit multiple related tasks including depth completion and 2D object detection for accurate multi-sensor 3D object detection. However, although multiple sensors could provide extra information, the inference efficiency for these frameworks are relatively low. Besides, synchronization requirement between multiple sensors makes it hard to deploy. + +Point cloud based 3D object detection. Voxel based methods [3, 9, 30, 25] share a main idea to project sparse point cloud into compact representation. VoxelNet [35] employs VFE layers based on PointNet for 3D space points characterization. SECOND [28] utilizes Sparse Convolution [6] to accelerate VoxelNet and improve performance. Based on SECOND, PointPillars [10] applies voxelization only in XY direction to form pseudo-image featurization for + +![](images/0e5677cce34bdb2eb78f9927ac7300db11a3f4b8962cd3fdc3419642954fe20e.jpg) +Figure 3. The first line is the whole structure of HVNet. The second line is the Hybrid Voxel Feature Extractor architecture, consisting of four parts: a) multi-scale pre-voxelization in $x - y$ plane; b) multi-scale point cloud data encoding by multi-stream AVFE layers parallelly; c) encoded features aggregation; d) dynamic feature projection by AVFEO layers with aggregated features and target scale knowledge. + +point cloud. However, point number in each voxel is limited, leading to information loss. In this work, we propose a novel encoder for lossless 3D representation. + +There have been many two-stage works [31, 26, 32, 22, 2] recently. Fast Point R-CNN [2] applies two-stage framework exploiting volumetric representation for initial predictions and raw point cloud for refinement. STD [32] first generates proposals and compact proposal features with PointsPool in the first stage, and then predicts 3D bounding box in the second stage. These methods have high accuracy due to better recall rate, but long inference time (lower than $20Hz$ ). Therefore, We focus on one-stage unified framework with both time efficiency and accuracy in this paper. + +# 2.2. Multi-scale feature aggregation + +Multi-scale strategy [14, 13, 2] has been proved to be effective to 3D object detection. ContFuse [14] uses continuous convolution to aggregate multi-scale feature maps from different ResNet Block [7]. Voxel-FPN [24] employs a RPN-FPN module [15] to aggregate different voxel features generated by voxelization from various voxel sizes. However, the voxel feature maps have strict correspondence to each voxel size, making the multi-scale learning inadequate and inflexible. Instead, our HVNet, a novel multiscale zoomable aggregation strategy, is able to zoom scales into a many-to-many relationship. + +# 3. Approach + +In this paper we describe our one-stage 3D object detector HVNet. The overall network is presented in the first line of Figure 3, which consists of three main stages: 1) hybrid voxel feature extraction that projects the raw point cloud into pseudo-image feature; 2) 2D convolutional middle layers for multi-scale feature fusion; and 3) a detection head that predicts 3D boxes for different classes separately. + +# 3.1. Hybrid Voxel Feature Extractor + +The three main steps included in the hybrid voxel feature extractor (HVFE), i.e., hybrid scale voxelization, hybrid voxel feature encoding and dynamic feature projection. Furthermore, to decouple the hybrid voxel scale and pseudo-image feature projection scale for a more flexible balance between speed and accuracy, the global context for hybrid voxel representation is introduced under the voxelwise attention guidance, whose detail will be described in in Sec. 3.2. Overall structure of this stage is shown in Fig. 3. + +Point cloud representation. A point cloud would be represented by an unordered point set $\{\mathbf{p}_1,\mathbf{p}_2,\dots ,\mathbf{p}_N\}$ with $\mathbf{p}_i\in \mathbb{R}^d$ , which includes $\mathbf{x}_i\in \mathbb{R}^3$ for point coordinate $(x,y,z)$ and $\mathbf{f}_i\in \mathbb{R}^{d - 3}$ for associated feature vector. The physical dimension of the scene that we detect objects on is defined as $L\times W\times H$ , from the minimum $(x_{min},y_{min},z_{min})$ to the maximum $(x_{max},y_{max},z_{max})$ + +Hybrid scales voxelization. HSV is a way of voxelization that assigns points to evenly spaced grid of voxels. The assignment phase in prior methods, like VoxelNet [35] and PointPillar [10], is accompanied by buffer allocation with a fixed size. Points will be dropped when the buffer capacity for a voxel is exceeded, causing randomness and information loss. Instead, we maintain only the voxel index of each point. Assume that the point cloud is discretized into numerous voxels $\mathbf{V} = \{\mathbf{v}_j|j = 1,\dots ,N_{\mathbf{v}}\}$ with resolution of $v_{L}\times v_{W}\times v_{H}$ per voxel. $v_{H}$ is set to $H$ followed by [10]. The point-wise index $\mathbf{c}_i$ for target voxel scale size $s$ is recorded as a cursor to which voxel it lies in, given as: + +$$ +\mathbf {c} _ {i} ^ {(s)} = \left\lfloor \frac {\left(x _ {i} - x _ {m i n}\right)}{v _ {L} s} \right\rfloor \left\lfloor \frac {W}{v _ {W} s} \right\rfloor + \left\lfloor \frac {\left(y _ {i} - y _ {m i n}\right)}{v _ {W} s} \right\rfloor . \tag {1} +$$ + +Only the point to voxel mapping relation is needed in our approach, unlike MVF [34] which need bi-directional relationships. In this way, only tensor $\mathbf{c}$ are allocated during + +voxelization stage. Besides, we keep all points retained inside a voxel other than methods, which also becomes the precondition for voxel attention. + +Hybrid voxel feature extraction. The HVFE module provides a novel way to create fine-grained point cloud feature with little computation cost. Take PointPillar [10] as an example (Fig 2), previous voxel based methods are limited to the fixed voxel scale $s$ , where each encoded point feature only contains the scale knowledge of $s$ . Besides, the size of final projected features is the same as the corresponding voxel size, which means that the computation complexity will rise rapidly with the addition of fine-grained voxel scale. Assume that the projected pseudo-image feature $\mathbf{I}^s \in \mathbb{R}^{N_W \times N_L \times N_H}$ , where $N_L = \lfloor L / (v_L s) \rfloor$ , $N_W = \lfloor W / (v_W s) \rfloor$ and $N_H$ is the projection output dimension. When $s$ reduces $n$ times, $N_L \times N_W$ will increase $n^2$ times. + +Shown in Fig 3, the HVFE module takes point features of a set of voxel scales $S_{T} = \{s_{t}|1 < t < N_{T}\}$ as input, encoding them as unified point-wise feature $\mathbf{H}$ with information from different voxel scales. Drawn in Fig. 3, firstly the raw point cloud is hybrid voxelized to get cursor set $\mathbf{c}^{S_T} = \{\mathbf{c}_i^{(s_t)}|s_t\in S_T,i\in [1,N]\}$ . Secondly, attention feature set $\mathbf{G}^{S_T}$ whose tensor dimensionality is same as the pointnet features $\mathbf{F}\in \mathbb{R}^{N\times q}$ are obtained. Thirdly, the AVFE layer takes $\mathbf{F}$ , $\mathbf{G}^{S_T}$ and $\mathbf{c}^{S_T}$ together to encode raw data into voxel scale feature set $\mathbf{H}^{S_T}$ specified to each voxel scale $s$ with $\mathbf{H}^{s_t}\in \mathbb{R}^{N\times 2q}$ . All the AVFE layers for different scales share the same parameter. After that, $\mathbf{H}\in \mathbb{R}^{N\times e}$ is aggregated by concatenation of the $\mathbf{H}^{S_T}$ where $e = 2qN_{T}$ . It's validated by experiments that only limited $N_{T}$ of input multi-scale features is able to bring enough information to retrieve features of unseen scales out of $S_{T}$ , utilizing the dynamic feature projection. + +Dynamic feature projection. The global context $\mathbf{H}$ is a high level feature containing information of hybrid voxel scales. Therefore, the feature projection scales $S_{R} = \{s_{r}|1 < r < N_{R}\}$ of pseudo-image features that are out of $S_{T}$ can be projected dynamically and flexibly with $\mathbf{H}$ . In order to restore information at scales $s_r$ from $\mathbf{H}$ , some scale-related information needs to be used as guidance in the projection, containing point-wise index $\mathbf{c}^{s_r}$ and the attention knowledge $\mathbf{G}^{s_r}$ . The attentive VFE output (AVFEO) layer takes $\mathbf{H}$ , $\mathbf{c}^{s_r}$ and $\mathbf{G}^{s_r}$ to retrieve the voxel-wise feature and then project it to a pseudo-image feature $\mathbf{I}^{s_r}$ . Same as the AVFE layer, all AVFEO layers share the same parameters. In the dynamic feature projection, $\mathbf{G}^{s_r}$ is the key for the scale-wise feature retrieval, guiding the AVFEO layer to be attentive to project $\mathbf{H}$ into corresponding scale $s_r$ . Besides, $\mathbf{c}^{s_r}$ is used for the efficient graph-based implementation of the AVFEO layer (Sec. 3.2). + +# 3.2. Attentive Voxel Feature Encoding + +Standard VFE layer. Traditional VFE [35, 10] first voxelizes data with point number in each voxel limited and al + +![](images/f01dbaf5e39d2a93d0f2121432659e0981ef606998ffa8d5fadf1e1d1f4da29e.jpg) +Figure 4. AVFE and AVFEO layers. The index tensor is used in indexing operation: Gather and Scatter. + +locates fixed preassigned tensors for each voxel. After that, linear transforms and max pooling are conducted in each voxel to aggregate features. Then pseudo-image features are collected according to the physical location of voxels. + +While VFE method provides a simple means of integrating sparse point cloud, it has several drawbacks: + +- There are points dropped stochastically during voxelization, leading to tremendous information losses and instability prediction behaviours; +- Zero padding is conducted when point number is lower than limitation, which can greatly enlarge amounts of computation and memory consumption; + +Voxel-wise attention feature. As the expansion of raw point-wise features $\mathbf{p}_i$ , attention knowledge $\mathbf{g}_j \in \mathbb{R}^q$ for voxel $\mathbf{v}_j$ is obtained by voxel-wise feature aggregation, which guides our feature encoding network to concern more about the interrelationships within a voxel. Given index $\mathbf{c}$ , the attention knowledge $\mathbf{g}_i$ of point $\mathbf{p}_i$ is represented as: + +$$ +\mathbf {g} _ {i} = \left(\left(\mathbf {x} _ {i} - \frac {\sum_ {U _ {j}} \mathbf {x} _ {k}}{N _ {U _ {j}}}\right) \oplus \mathbf {f} _ {i}\right) \oplus \frac {\sum_ {U _ {j}} \mathbf {p} _ {k}}{N _ {U _ {j}}}, \tag {2} +$$ + +where $\oplus$ represents the tensor concatenate. The collection $U_{j}$ , referred to the index set of points that lies in the same voxel as $\mathbf{p}_i$ , is denoted as $U_{j} = \{k|0 < k < N\& \mathbf{c}_{k} = \mathbf{c}_{i}\}$ . The collection process of $U$ has a lot of loops, making this aggregation step unbearably slow. We will discuss the efficient index-based implementation in Sec. 3.3. + +Shown in the Eq. 2, the attention knowledge for a point $\mathbf{p}$ in a voxel $\mathbf{v}$ is composed of two parts: a) the mean of features from all the points lie in $\mathbf{v}$ ; and b) the feature of $\mathbf{p}$ whose point coordinate $\mathbf{x}$ is subtracted by the average coordinate of $\mathbf{v}$ . The attention feature $\mathbf{g}$ participates in both encoder and decoder as the bridge information. + +Learning to be flexible and attentive. Shown in Fig. 4, the input point features $\mathbf{F}$ and the attention knowledge $\mathbf{G}$ are conducted by linear layers, followed by a element-wise matrix multiply. After that, multiplied features $\mathbf{M}$ in the same voxel are aggregated by max pooling layer to form the voxel-wise features $\mathbf{G}' \in \mathbb{R}^{N \times q}$ . For AVFE layer, the output is the point-wise concatenation of $\mathbf{M}$ and $\mathbf{G}'$ . For + +![](images/81eb8acc3d343a5deaab93087ff813affce4a11ab81a1a7116c1af8a563d0353.jpg) +Figure 5. The backbone network architecture of HVNet. Multiscale features are first fused shallowly in the main stream network, and then fused deeply in the proposed FFPN network. + +AVFEO layer, each feature of $\mathbf{G}^{\prime}$ is projected to a pixel $(x_{I}^{s_{r}},y_{I}^{s_{r}})$ in pseudo image $\mathbf{I}^{s_r}$ , given as: + +$$ +x _ {I} ^ {s _ {r}} = \mathbf {c} _ {j} ^ {s _ {r}} \mid \left\lfloor \frac {W}{v _ {W} s _ {r}} \right\rfloor , y _ {I} ^ {s _ {r}} = \mathbf {c} _ {j} ^ {s _ {r}} \bmod \left\lfloor \frac {W}{v _ {W} s _ {r}} \right\rfloor , \tag {3} +$$ + +where $s_r$ is the target scale, $|$ denotes exact division and mod denotes the module operation. + +# 3.3. Efficient Index-based Implementation + +The Hybrid Voxel Feature Extraction module is a index-based learning system, where the irregular graph data (point cloud) is grouped by physical correlation. In order to handle the sparse structures, we propose HSV operation to transform sparse matrix into dense matrix and corresponding indexes. Verified by experiments, the efficiency of the HVNet then hinges heavily on how well The index strategy of $U$ and the parallel stream processing schedules. Therefore, the key index-based propagation operators, Scatter and Gather, is implemented on GPUs. + +The Gather conducts the sparse point data propagation within voxel and behave as tensor slice according to the cursor vector $\mathbf{c}$ . For implementation, tensor slice operation in PyTorch [19] is fast enough for Gather. + +The Scatter manipulates all values from source tensor into output at the indices specified in $\mathbf{c}$ along a given axis. In our approach, Scatter Mean is used in voxel wise attention and Scatter Max is used in AVFE and AVFEO layers. Take Scatter Max as an example: $\mathrm{out}_i = \max (\mathrm{out}_i,\max (\{\mathrm{src}_j|\mathbf{c}_j = i,j\in \mathbf{c}\}))$ , where out and src are output and input respectively, $\mathbf{c}$ is the 'group-index' that references the location of src. In the implementation of Scatter, atomic lock of GPU Global Memory is used to ensure the consistency of arg max results for reproducibility. + +# 3.4. Backbone Network + +We use a 2D convolutional backbone network for further detection. The backbone network has two main parts: 1) the main stream network that aggregates multi-scale features $\mathbf{I}^{S_R}$ ; 2) the FFPN network that refines the feature map and generates multi-class features in the same time. + +Main stream network with multi-scale feature aggregation. The main stream is shown in the orange part in Fig. 5, characterized by a concatenation of several blocks. In Block_2 and Block_3, the first layer has a $2 \times 2$ stride to reduce spatial resolution of features. Given pseudo-image feature set $\mathbf{I}^{S_R}$ where $s_{r+1} = 2s_r$ , $\mathbf{I}^{s_1}$ is taken as input of Block_1 and $\mathbf{I}^{s_2}$ is aggregated in Block_2 by tensor concatenation with output of the first layer in Block_2. More scales can be added by the similar way. We take the output of the last three blocks $\mathbf{B}_1 \in \mathbb{R}^{N_W \times N_L \times C_1}$ , $\mathbf{B}_2 \in \mathbb{R}^{\frac{N_W}{2} \times \frac{N_L}{2} \times C_2}$ and $\mathbf{B}_3 \in \mathbb{R}^{\frac{N_W}{4} \times \frac{N_L}{4} \times C_3}$ as the input of FFPN. + +Feature fusion pyramid network. The FPN [15] has been proved to be a valid means for multi-scale feature embedding. Due to the sparse data distribution in point cloud and the small resolution of $I_{R}$ , the FPN structure plays a more important role in our approach. Therefore, an enhanced feature fusion pyramid network is proposed, whose main structure is shown in Fig. 3 Instead fusing features from top to bottom layer by layer in [15], we first concatenate features at the smallest scale to obtain an intermediate feature $\mathbf{B}_f$ , represented as: + +$$ +\mathbf {B} _ {f} = \sum_ {i = 1} ^ {N _ {B}} \Psi_ {i} \left(\mathbf {B} _ {i} + 1 _ {i < N _ {B}} \Gamma_ {i + 1} \left(\mathbf {B} _ {i + 1}\right)\right), \tag {4} +$$ + +where $+$ means tensor concatenate, 1 means the indicator function, $N_{B}$ is the number of $\mathbf{B}_i$ , $\Gamma_i$ represents the deconv function of each input feature map $\mathbf{B}_i$ for scale alignment and $\Psi_i$ denotes the conv function before being concatenated together. The class-specific pyramid features are given as $\mathbf{B}_o^{(i)} = \Upsilon_i(\mathbf{B}_f)$ , where $\Upsilon_i$ denotes the conv layers with various stride. Compared with F-SSD [12], we fuse features in two stages: a) layer by layer fusion in Eq. 4 and b) down-sample convolutional chain. Furthermore, within one forward propagation, class-specific pyramid features are able to be obtained, where $\mathbf{B}_o^{(1)}$ for Pedestrian class, $\mathbf{B}_o^{(2)}$ for Cyclist class and $\mathbf{B}_o^{(3)}$ for Car class respectively. + +# 3.5. Detection Head and Loss Design + +We use the detection head in the SSD [17] to detect 3D objects as [10]. In our setting, the positive anchors are selected by matching to the ground truth by Rotated Intersection over Union (RIoU) [4, 33] in bird eye view (BEV). Each pyramid feature $\mathbf{B}_o^{(i)}$ is wrapped by three parallel branches which are $3\times 3$ convolution layers $\phi_c^{(i)}$ , $\phi_l^{(i)}$ and $\phi_h^{(i)}$ to get classification probability, location offsets and height regression respectively, whose output channel numbers are $N_{\mathrm{anc}}\times N_{\mathrm{cls}}$ , $N_{\mathrm{anc}}\times 8$ for location corner offsets in + +
MethodSpeed (Hz)InputCar BEV AP (%)Pedestrian BEV AP (%)Cyclist BEV AP (%)
LIEasyModer.HardEasyModer.HardEasyModer.Hard
F-PointNet [20]5.9✓✓91.1784.6774.7757.1349.5745.4877.2661.3753.78
AVOD-FPN [9]10✓✓90.9984.8279.6258.4950.3246.9869.3957.1251.09
MMF [13]12.5✓✓93.6788.2181.99N/AN/AN/AN/AN/AN/A
IPOD [31]5✓89.6484.6279.9660.8849.7945.4378.1959.4051.38
F-ConvNet [26]2.1✓91.5185.8476.1157.0448.9644.3384.1668.8860.05
STD [32]12.5✓94.7489.1986.4260.0248.7244.5581.3667.2359.35
PointRCNN [22]10✓92.1387.3982.7254.7746.1342.8482.5667.2460.28
Fast Point R-CNN [2]16.7✓90.8787.8480.52N/AN/AN/AN/AN/AN/A
SECOND [28]20✓89.3983.7778.5955.9945.0240.9376.5056.0549.45
HRI-VoxelFPN [24]50✓92.7587.2179.82N/AN/AN/AN/AN/AN/A
PointPillars [10]42.4✓90.0786.5682.8157.6048.6445.7879.9062.7355.58
PIXOR++ [29]35✓93.2886.0180.11N/AN/AN/AN/AN/AN/A
Ours31✓92.8388.8283.3854.8448.8646.3383.9771.1763.65
+ +Table 1. Performance of bird eye views on KITTI test set. Here 'L' denotes LiDAR input and 'I' denotes RGB image. We compare with detectors on the KITTI leaderboard evaluated by 40 recall positions. Methods are divided into three types: LiDAR & image, two-stage LiDAR only and one-stage. The bold results means the best in all methods and the blue results means the best among one-stage methods. + +BEV and $N_{\mathrm{anc}} \times 2$ for z center and height. + +Different from most voxel-based methods [10, 35, 24] that predict center $x,y$ and $w,h,l,\theta$ , HVNet utilizes location corner offsets relative to anchors in BEV as localization objective, represented as $\Delta \overrightarrow{\mathrm{cor}} = \{\Delta \vec{x}_i,\Delta \vec{y}_i|i = 1,2,3,4\}$ . $\Delta \mathrm{cor}$ is a vector of $\mathbb{R}^8$ during propagation. Suppose that the location branch $\phi_l$ predicts the offset $\Delta \mathrm{cor}$ , then the localization loss is given by $\mathcal{L}_{\mathrm{loc}} = \sum \mathrm{SmoothL1}(\Delta \overrightarrow{\mathrm{cor}} -\Delta \mathrm{cor})$ . + +As to the classification branch $\phi_c$ , given the class probability $p_a$ of an anchor, focal loss [16] is used to handle the unbalance between positive and negative samples, represented as $\mathcal{L}_{cls} = -\alpha (1 - p_a)^\gamma \log (p_a)$ . Given prediction $z,h$ from $\phi_h$ , the vertical loss is denoted as $\mathcal{L}_h = \sum_{b\in (z,h)}\mathrm{SmoothL1}(\Delta b)$ . + +Therefore, the total loss is given by + +$$ +\mathcal {L} = \frac {1}{N _ {\mathrm {p o s}}} \left(\lambda_ {\mathrm {l o c}} \mathcal {L} _ {\mathrm {l o c}} + \lambda_ {\mathrm {c l s}} \mathcal {L} _ {\mathrm {c l s}} + \lambda_ {h} \mathcal {L} _ {h}\right). \tag {5} +$$ + +# 4. Experiments + +HVNet is evaluated on the challenging KITTI benchmark [5]. We first introduce the setup details of HVNet in Sec. 4.1. In Sec. 4.2, we compare HVNet with state-of-the-art methods. A detailed ablation study is also provided in Sec. 4.3 to verify the validity of each component. + +# 4.1. Setup + +Dataset. KITTI dataset [5] consists of 7481 training images and 7518 test images as well as the corresponding point cloud with categories Car, Pedestrian and Cyclist. + +Metric. KITTI's metric is defined as average precision (AP) over the 40 recall positions on the PR curve [4]. Labels are divided into three subsets (Easy, Moderate, Hard) on the basis of object size, occlusion and truncation levels. The leaderboard rank is based on results of Moderate difficult. + +Experiment details. The physical detection range is limited within minimum $(0, -32, -3)$ and maximum + +(64, 32, 2). The size of a voxel is $v_{L} = 0.2$ , $v_{W} = 0.2$ thus the resolution of BEV feature is $320 \times 320$ . In the encoder and decoder, scale set $S_{T} = \{0.5,1,2\}$ and $S_{R} = \{1,2,4\}$ . Besides, feature dimension is $q = 64$ for $\mathbf{H}^{s_t}$ and $N_{H} = 128$ for $\mathbf{I}^{s_t}$ . Anchor size is designed as [0.8, 0.8, 1.7] for Pedestrian, 0.8, 1.8, 1.5 for Cyclist and [1.7, 3.5, 1.56], [2.0, 6.0, 1.56] for Car. Each class has the same anchor orientation in [0, $\pi /4,\pi /2,3\pi /4$ ]. In the training phase, we choose anchors that have RIOU with ground truth larger than [0.35, 0.35, 0.5] for Pedestrian, Cyclist and Car respectively as positive samples, and those lower than [0.25, 0.25, 0.35] as negative samples. As to the test phase, prediction score threshold is set to 0.2, and the rotated NMS [18] threshold is set to [0.02, 0.02, 0.4]. In the loss design, $\alpha$ and $\gamma$ for focal loss are set to [0.75, 0.75, 0.25] and [2., 2., 2.] respectively. Three loss weights are $\lambda_{\mathrm{loc}} = 1$ , $\lambda_{\mathrm{cls}} = 1$ and $\lambda_{\mathrm{h}} = 1.5$ . HVNet is trained for 70 epochs with Adam [8] optimizer, the initial learning rate is $\mathrm{lr} = 2e^{-4}$ with weight decay $1e^{-4}$ . We first employ warmup strategy [7] with 300 warmup iterations and $1./3$ warmup ratio. Besides, lr decays in a ratio of 0.1 in the 40-th and 60-th epoch. + +3D data augmentation. Global random flipping, rotation, scaling and translation are first applied to the whole point cloud data, where the flipping probability is set to 0.5, the rotation angle ranges are uniform distribution from $[- \pi /2, \pi /2]$ , the scaling ratio is between [0.95, 1.05] and the location translation obeys normal distribution with mean 0 and standard deviation [0.2, 0.2, 0.2] for $(x,y,z)$ . Followed by SECOND [28], several new boxes from ground truth and corresponding points in other frames, where 8 for Cyclist, 8 for Pedestrian and 15 for Car, will be fixed into current training frame except boxes which have physical collision with boxes in the current frame. + +# 4.2. Experimental Results + +Quantitative Analysis. We compare with 3D object detectors in three types: a) LiDAR & image based approaches; + +![](images/5c4f79388496a37c2c4306a2c7a319f662474f42120e7d6e08cd5a3f1df35225.jpg) +Figure 6. Qualitative analysis on KITTI validation set with Kitti Viewer [28]. We show 3D bounding boxes on point cloud along with projected 2D bounding boxes on image. In each image, blue boxes indicate the ground truth, red boxes indicate detections by HVNet. + +![](images/1ecc4ae541dfe2ef797d1f4787f1f7d0457a060063d22ba38a1f7d7e4e5d57f8.jpg) + +![](images/7cb98d121e8dc8cfa16d7e01356367425fd80b4472d7d4c17e50d83ac0a7364c.jpg) + +![](images/2356d6eb3b81e173f0a462d178e191376dfc6d6aa20954faeedca43ab30e0b76.jpg) + +
MethodCar BEV AP(%)Car 3D AP(%)
EasyModer.HardEasyModer.Hard
MV3D [1]86.5578.1076.6771.2962.6856.56
F-PointNet [20]88.1684.0276.4483.7670.9263.65
VoxelNet [35]89.6084.8178.5781.9765.4662.85
SECOND [28]89.9687.0779.6687.4376.4869.10
PointPillars [10]N/A87.7N/AN/A77.4N/A
Ours93.2988.9087.7287.2177.5871.79
+ +Table 2. Performance (AP) of BEV and 3D on KITTI validation set for Car. Our method achieves the state of the art in most case. + +
ClassesTasksEasyModer.Hard
Car2D96.5092.0489.34
Pedestrian2D76.5370.7568.37
BEV75.6569.7665.25
3D69.1364.8159.42
Cyclist2D93.9080.5477.41
BEV89.9877.1372.27
3D87.2173.7568.98
+ +Table 3. Performance on KITTI validation set for Pedestrian, Cyclist in 2D, BEV and 3D tasks; and Car in 2D task. + +b) LiDAR only two-stage approaches and c) one-stage approaches, shown in three columns respectively in Tab. 1. Most methods in a) and b) are relatively slow for inference. From the table we see that HVNet outperforms all other approaches in $mAP$ and Cyclists. HVNet also achieves attractive performance for Car and Pedestrian under a real-time runtime, even when compared with two-stage approaches. Among one-stage approaches, HVNet achieves the state of the art in Car and Cyclist, leading the second best HRI-VoxelFPN [24] and PointPillars [10] by over $1.61\%$ and $8.44\%$ respectively in moderate. More details for our test results are in KITTI leaderboard. Furthermore, we draw the performance vs. speed figure in Fig. 1 according KITTI leaderboard to have more intuitive comparison. + +Only a few methods expose the results on the validation set. The comparison results for Car are reported in Tab. 2. Among methods that expose results, our approach achieves the best performance in both BEV and 3D tasks. As almost no currently published method presents validation results for Pedestrian and Cyclist, we show only our validation results for these two classes in Tab 3 in all the three tasks: 2D, BEV and 3D. Overall, evaluation both on test and validation set shows that our approach can produce high-accuracy detections with a fast inference speed. Besides that, we con + +![](images/4859df9f394b6c47c7ab3550b65d29d8f2bd306b4c3c44b85fc80cf84ea75481.jpg) +Figure 7. Voxel scale study on BEV of KITTI validation set. For PointPillar we use our own implementation in Pytorch. Blue circle shows the results of PointPillar. We choose voxel scale at $\{0.16^2, 0.20^2, 0.24^2\}m^2$ . Red rectangle illustrates results from Hybrid Voxel Feature Extractor. From left to right, we use voxel scales at $\{0.1, 0.2\}m, \{0.2, 0.3\}m, \{0.2, 0.4\}m$ , feature projection scales at $0.2m, 0.3m, 0.4m$ respectively + +duct experiments on our Hybrid Voxel Feature Extractor architecture at different settings, compared with PointPillar through different grid size in Fig. 7. We can easily see the power of our architecture. Compared with best result from PointPillar at grid size $0.16\mathrm{m}$ , our model show great advantages at both mAP and inference speed. Even at a coarse scale for feature projection scale of grid size $0.4\mathrm{m}$ , our model can achieve comparable results of PointPillar at grid size $0.24\mathrm{m}$ and save a lot of runtime cost. + +Qualitative Analysis. We present several 3D detections on the KITTI validation set along with projected 2D bounding boxes on 2D image in Fig. 6. HVNet can produce high-quality 3D detections for all classes via a single pass of the network. Moreover, good detections are also given by HVNet for scenes that have point cloud occlusion or strongly dense objects. Generally, these qualitative results demonstrate the effectiveness of our approach. + +# 4.3. Ablation Studies + +Multiple components study. To analyze how different components contribute to the final performance, we conduct an ablation study on KITTI validation set. We use the BEV mean AP of three categories (Car, Pedestrian and Cyclist) as the evaluation matrix, shown in Tab. 4. Our baseline model, shown in the first line of Tab. 4, is a detector with a single scale feature extractor and a SSD [17] like + +
Modelvoxel scale STprojection scale SRAVFEFPNFFPNαBEV mAP (%)
0.5S1S2S1S2S4SEasyModer.Hard
Baseline✓✓0.2579.3971.766.77
+ Attention✓✓✓0.2581.3673.7669.18
+ FPN✓✓✓✓0.2581.8474.3469.83
+ FFPN✓✓✓✓0.2582.3975.1870.78
* Focal loss✓✓✓✓0.7582.8275.7171.54
+ Scale 2*✓✓✓✓✓0.7584.3476.8873.01
+ Scale 2✓✓✓✓✓✓0.7585.2677.8874.46
+ Scale 3✓✓✓✓✓✓✓✓0.7586.3178.5975.08
+ +![](images/257c14b14226ef87489d55824a7a4122b36341ad634138629c97b6882c9d42f4.jpg) +Figure 8. Ablation study on KITTI validation set for hybrid scale. The jacinth line means $N_{T}$ changes from 5 to 1 when $N_{R} = 1$ . The blue line means $N_{R}$ changes from 5 to 1 when $N_{T} = 3$ . + +backbone. Besides, the VFE layers [35] replace the AVFE and AVFEO layers. It's given that adding attention to VFE layer is able to bring a $2.06\mathrm{mAP}$ gain in BEV Moderate compared with baseline. FPN is effective with a 0.58 gain but the proposed FFPN bring a larger improvement of a 1.42 gain. We also adopt focal loss for classification. However, the default $\alpha$ results in the confidence score degradation for Pedestrian and Cyclist. Therefore, we change $\alpha = 0.75$ by experiments. As to the Hybrid Voxel Feature Extractor, increasing voxel/feature projection scale number to 2 gives the maximum performance boost of 2.17 in mAP. Furthermore, keeping going up to 3 scales gives another 0.71 gain. + +Hybrid Voxel Feature Extractor. Given that the Hybrid Voxel strategy plays an important role, it is important to make $S_{T}$ and $S_{R}$ enough for feature encoding while not consuming much computation. Thus, we conduct a series of experiments with various scale number. Note that as the scale number increases, the block number in backbone in Fig. 5 increases as well. Shown in Fig. 8, it's a nice tradeoff between speed and performance when $N_{T} = N_{R} = 3$ , demonstrated that the effectiveness of scale projection between $S_{T}$ and $S_{R}$ . Furthermore, we visualize the $\mathbf{H}^{S_T}$ with/without attention in Fig. 9, which shows that the activation of target region is greater with attention strategy. + +Table 4. Ablation study on KITTI validation set for the $mAP$ . 0.5S means the scale of 0.5. Δ mAP denotes the change in Moderate mAP compared with the corresponding controlled experiment. The maximum improvement is achieved by increasing $S_T$ and $S_R$ . + +
VFE [10]HSVMulti-class HeadTime (ms)
✓××34
×✓×32
×✓✓35
+ +Table 5. Inference speed for HVNet with different module. +Inference speed. The inference time of HVNet is $32ms$ + +![](images/5fc037810f069c11495d2d862ae5caccb547e277334f5cba93bed0abf5d3d8aa.jpg) +Figure 9. Multi-scale features $\mathbf{H}^{S_T}$ with/without attention. With attention mechanism, our output feature map can suppress the background area and enhance the shape feature of objects + +for a single class in average on a 2080Ti GPU where the Hybrid Voxel Feature Extractor takes $12ms$ , the backbone network takes $11ms$ and the head with NMS takes the left $9ms$ . The required time for each module is changed with the number of input points. In our approaches, HSV and index-based implementation are proposed to accelerate the feature encoding, whose effectiveness is shown in Tab. 5. We employ the VFE layer in PointPillars [10] as baseline. Utilize the HSV and index-based implementation save $2ms$ in average. Furthermore, the head in our model only takes extra $3ms$ for extending multi-class detection in one forward. + +# 5. Conclusion + +In this work, we propose HVNet, a novel one-stage 3D object detector. HVNet aggregates hybrid scale voxel grids into unified point-wise features, and then projects them into different scale pseudo-image features under the guidance of attention knowledge. The key to HVNet is that it decouples the feature extraction scales and the pseudo-image projection scales. Further more, a backbone with feature fusion pyramid network takes pseudo-images and fuses features to generate compact representations for different categories. Experimental studies show that our method achieves state-of-the-art $mAP$ with a real-time speed. + +# References + +[1] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2, 7 +[2] Yilun Chen, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Fast Point R-CNN. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 3, 6 +[3] M. Engelcke, D. Rao, D. Z. Wang, C. H. Tong, and I. Posner. Vote3Deep: Fast object detection in 3D point clouds using efficient convolutional neural networks. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1355-1361, 2017. 2 +[4] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. International journal of computer vision, 88(2):303-338, 2010. 5, 6 +[5] A. Geiger, P. Lenz, and R. 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, 2012. 1, 2, 6 +[6] Benjamin Graham, Martin Engelcke, and Laurens Van Der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 +[7] 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. 3, 6 +[8] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[9] J. Ku, M. Mozifian, J. Lee, A. Harakeh, and S. L. Waslander. Joint 3D Proposal Generation and Object Detection from View Aggregation. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1-8, 2018. 1, 2, 6 +[10] Alex H. Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. PointPillars: Fast Encoders for Object Detection From Point Clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12697-12705, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[11] 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. 1 +[12] Zuoxin Li and Fuqiang Zhou. Fssd: feature fusion single shot multibox detector. arXiv preprint arXiv:1712.00960, 2017.5 +[13] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-Task Multi-Sensor Fusion for 3D Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7345–7353, 2019. 1, 2, 3, 6 +[14] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep Continuous Fusion for Multi-Sensor 3D Object + +Detection. In Proceedings of the European Conference on Computer Vision (ECCV), pages 641-656, 2018. 3 +[15] 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. 3, 5 +[16] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal Loss for Dense Object Detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 2980-2988, 2017. 6 +[17] 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. 5, 7 +[18] Alexander Neubeck and Luc Van Gool. Efficient nonmaximum suppression. In 18th International Conference on Pattern Recognition (ICPR'06), volume 3, pages 850-855. IEEE, 2006. 6 +[19] 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. 2017. 5 +[20] Charles R. Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J. Guibas. Frustum PointNets for 3D Object Detection From RGB-D Data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 918-927, 2018. 1, 2, 6, 7 +[21] Zengyi Qin, Jinglu Wang, and Yan Lu. Triangulation Learning Network: From Monocular to Stereo 3D Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7615-7623, 2019. 1 +[22] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. PointR-CNN: 3D Object Proposal Generation and Detection From Point Cloud. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-779, 2019. 1, 3, 6 +[23] Andrea Simonelli, Samuel Rota Rota Bulò, Lorenzo Porzi, Manuel López-Antequera, and Peter Kontschieder. Disentangling Monocular 3D Object Detection. arXiv:1905.12365 [cs], 2019. 1 +[24] Bei Wang, Jianping An, and Jiayan Cao. Voxel-FPN: Multiscale voxel feature aggregation in 3D object detection from point clouds. arXiv:1907.05286 [cs, stat], 2019. 2, 3, 6, 7 +[25] Dominic Zeng Wang and Ingmar Posner. Voting for voting in online point cloud object detection. In Robotics: Science and Systems, volume 1, pages 10-15607, 2015. 2 +[26] Zhixin Wang and Kui Jia. Frustum ConvNet: Sliding Frustums to Aggregate Local Point-Wise Features for Amodal 3D Object Detection. arXiv:1903.01864 [cs], 2019. 1, 3, 6 +[27] Bin Xu and Zhenzhong Chen. Multi-Level Fusion Based 3D Object Detection From Monocular Images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2345-2353, 2018. 1 +[28] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 18(10):3337, 2018. 1, 2, 6, 7 + +[29] Bin Yang, Ming Liang, and Raquel Urtasun. HDNET: Exploiting HD Maps for 3D Object Detection. In Conference on Robot Learning, pages 146-155, 2018. 1, 6 +[30] Bin Yang, Wenjie Luo, and Raquel Urtasun. Pixor: Realtime 3d object detection from point clouds. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 +[31] Zetong Yang, Yanan Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. IPOD: intensive point-based object detector for point cloud. CoRR, abs/1812.05276, 2018. 1, 3, 6 +[32] Zetong Yang, Yanan Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. STD: Sparse-to-Dense 3D Object Detector for Point Cloud. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 3, 6 +[33] Dingfu Zhou, Jin Fang, Xibin Song, Chenye Guan, Junbo Yin, Yuchao Dai, and Ruigang Yang. IoU Loss for 2D/3D Object Detection. arXiv:1908.03851 [cs], 2019. 5 +[34] 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. arXiv preprint arXiv:1910.06528, 2019. 3 +[35] Yin Zhou and Oncel Tuzel. VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4490–4499, 2018. 1, 2, 3, 4, 6, 7, 8 \ No newline at end of file diff --git a/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/images.zip b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ab6c2c6e2e45cf84cf950122be4ec3610c4e4a7e --- /dev/null +++ b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e92388ea220af7c92b31b523a76056f43b112d0615b0dd4c849523ae3db142cf +size 657852 diff --git a/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/layout.json b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1f404dc9e7eab71b613a0e8d7d289dfcdd496d51 --- /dev/null +++ b/hvnethybridvoxelnetworkforlidarbased3dobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc063644dd379c3359eddf3b494b4194790f7e31ce4b2a9745667688f7b675a2 +size 468027 diff --git a/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_content_list.json b/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..469184bf887bf62c2fef05b2db7dfbaea3f70270 --- /dev/null +++ b/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9d4eb0a559c43e4352d6e4572aaf254d0060ee19cc7582f11ab55ba6afbb5fb +size 85844 diff --git a/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_model.json b/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4dca6182a048598539d9fcc84003ba6fc553487b --- /dev/null +++ b/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2241103095738efc6e9de4dbc64668013fc92e7b0daeefeaa114f5e4a4efa096 +size 104700 diff --git a/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_origin.pdf b/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c3cf0431b16b7e15ac28d783a719e948de82b29c --- /dev/null +++ b/hybridpose6dobjectposeestimationunderhybridrepresentations/a29fd836-8f9b-461f-91a9-8ef4d8a22a57_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4042b31cc2e649702136a8305fd3f71cc4df73e4d859fc93b44795daad5eff2 +size 1899570 diff --git a/hybridpose6dobjectposeestimationunderhybridrepresentations/full.md b/hybridpose6dobjectposeestimationunderhybridrepresentations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a889c87d88b83a56e86fec794a2f036fc240d2ab --- /dev/null +++ b/hybridpose6dobjectposeestimationunderhybridrepresentations/full.md @@ -0,0 +1,343 @@ +# HybridPose: 6D Object Pose Estimation under Hybrid Representations + +Chen Song*, Jiaru Song*, Qixing Huang +The University of Texas at Austin + +song@cs.utexas.edu, jiarus@cs.utexas.edu, huangqx@cs.utexas.edu + +# Abstract + +We introduce HybridPose, a novel 6D object pose estimation approach. HybridPose utilizes a hybrid intermediate representation to express different geometric information in the input image, including keypoints, edge vectors, and symmetry correspondences. Compared to a unitary representation, our hybrid representation allows pose regression to exploit more and diverse features when one type of predicted representation is inaccurate (e.g., because of occlusion). Different intermediate representations used by HybridPose can all be predicted by the same simple neural network, and outliers in predicted intermediate representations are filtered by a robust regression module. Compared to state-of-the-art pose estimation approaches, HybridPose is comparable in running time and is significantly more accurate. For example, on Occlusion Linemod [3] dataset, our method achieves a prediction speed of 30 fps with a mean $ADD(-S)$ accuracy of $79.2\%$ , representing a $67.4\%$ improvement from the current state-of-the-art approach. The implementation of HybridPose is available at https://github.com/chensong1995/HybridPose. + +# 1. Introduction + +Estimating the 6D pose of an object from an RGB image is a fundamental problem in 3D vision and has diverse applications in object recognition and robot-object interaction. Advances in deep learning have led to significant breakthroughs in this problem. While early works typically formulate pose estimation as end-to-end pose classification [39] or pose regression [16, 42], recent pose estimation methods usually leverage keypoints as an intermediate representation [38, 34], and align predicted 2D keypoints with ground-truth 3D keypoints. In addition to ground-truth pose labels, these methods incorporate keypoints as an intermediate supervision, facilitating smooth model training. Keypoint-based methods are built upon two assumptions: (1) a machine learning model can accurately predict 2DKeypoint locations; and (2) these predictions provide suf + +![](images/333795d6010f8ee7088032fccfad1b3ea8071c5fb9f3e448d16027737b2a03a6.jpg) +(a) Input image + +![](images/6c98c18c10add8ce366e5a3528e6f73be6e6dce00321a0e4ee16d61cdd9927f1.jpg) +(b) Keypoints + +![](images/4e8d2215f4c1ce55223691adaad6febfccdd187962080dcbe7b0363b2faeb64f.jpg) +(c) Edge vectors + +![](images/4e55b47402db3e2e374b3647bf182b6f3149607a345defdada5ae2bfbdcfe8ce.jpg) +(d) Symmetry correspondences + +![](images/75d5fe07ccb7b59b32c5883fd2456711225c47cdb46013d2ea66e9ad72ea1cb1.jpg) +(e) Groud-truth pose + +![](images/ce5bc0a42c04e791c88ba347789a537fb40f02a900c343854b87680559bcf465.jpg) +(f) Predicted pose +Figure 1. HybridPose predicts keypoints, edge vectors, and symmetry correspondences. In (a), we show the input RGB image, in which the object of interest (driller) is partially occluded. In (b), red markers denote predicted 2D keypoints. In (c), edge vectors are defined by a fully-connected graph among all keypoints. In (d), symmetry correspondences connect each 2D pixel on the object to its symmetric counterpart. For illustrative purposes, we only draw symmetry correspondences of 50 random samples from 5755 detected object pixels in this example. The predicted pose (f) is obtained by jointly aligning all predictions with the 3D template, which involves solving a non-linear optimization problem. + +ficient constraints to regress the underlying 6D pose. Both assumptions easily break in many real-world settings. Due to object occlusions and representational limitations of the prediction network, it is often impossible to accurately predict 2D keypoint coordinates from an RGB image alone. + +In this paper, we introduce HybridPose, a novel 6D pose estimation approach that leverages multiple intermediate representations to express the geometric information in the input image. In addition to keypoints, HybridPose integrates a prediction network that outputs edge vectors between adjacent keypoints. As most objects possess a (partial) reflection symmetry, HybridPose also utilizes predicted dense pixel-wise correspondences that reflect the underlying symmetric relations between pixels. Compared to a unitary representation, this hybrid representation enjoys a multitude of advantages. First, HybridPose integrates more signals in the input image: edge vectors encode spa + +cial relations among object parts, and symmetry correspondences incorporate interior details. Second, HybridPose offers more constraints than using keypoints alone for pose regression, enabling accurate pose prediction even if a significant fraction of predicted elements are outliers (e.g., because of occlusion). Finally, it can be shown that symmetry correspondences stabilize the rotation component of pose prediction, especially along the normal direction of the reflection plane (details are provided in the supp. material). + +Given the intermediate representation predicted by the first module, the second module of HybridPose performs pose regression. In particular, HybridPose employs trainable robust norms to prune outliers in predicted intermediate representation. We show how to combine pose initialization and pose refinement to maximize the quality of the resulting object pose. We also show how to train HybridPose effectively using a training set for the pose prediction module, and a validation set for the pose regression module. + +We evaluate HybridPose on two popular benchmark datasets, Linemod [12] and Occlusion Linemod [3]. In terms of accuracy (under the ADD(-S) metric), HybridPose leads to considerable improvements from all state-of-the-art methods that merely utilize keypoints. On Occlusion Linemod [3], HybridPose achieves an accuracy of $79.2\%$ , which represents a $67.4\%$ improvement from DPOD [44], the current state-of-the-art method on this benchmark dataset. + +Despite the gain in accuracy, our approach is efficient and runs at 30 frames per second on a commodity workstation. Compared to approaches which utilize sophisticated network architecture to predict one single intermediate representation (such as Pix2Pose [30]), HybridPose achieves considerably better performance by using a relative simple network to predict hybrid representations. + +# 2. Related Works + +Intermediate representation for pose. To express the geometric information in an RGB image, a prevalent intermediate representation is keypoints, which achieves state-of-the-art performance [34, 32, 36]. The corresponding pose estimation pipeline combines keypoint prediction and pose regression initialized by the PnP algorithm [18]. Keypoint predictions are usually generated by a neural network, and previous works use different types of tensor descriptors to express 2D keypoint coordinates. A common approach represents keypoints as peaks of heatmaps [28, 48], which becomes sub-optimal when keypoints are occluded, as the input image does not provide explicit visual cues for their locations. Alternative keypoint representations include vector-fields [34] and patches [14]. These representations allow better keypoint predictions under occlusion, and eventually lead to improvement in pose estimation accuracy. However, keypoints alone are a sparse representation of the + +object pose, whose potential in improving estimation accuracy is limited. + +Besides keypoints, another common intermediate representation is the coordinate of every image pixel in the 3D physical world, which provides dense 2D-3D correspondences for pose alignment, and is robust under occlusion [3, 4, 30, 20]. However, regressing dense object coordinates is much more costly than keypoint prediction. They are also less accurate than keypoints due to the lack of corresponding visual cues. In addition to keypoints and pixel-wise 2D-3D correspondences, depth is another alternative intermediate representation in visual odometry settings, which can be estimated together with pose in an unsupervised manner [47]. In practice, the accuracy of depth estimation is limited by the representational power of neural networks. + +Unlike previous approaches, HybridPose combines multiple intermediate representations, and exhibits collaborative strength for pose estimation. + +Multi-modal input. To address the challenges for pose estimation from a single RGB image, several works have considered inputs from multiple sensors. A popular approach is to leverage information from both RGB and depth images [47, 40, 42]. In the presence of depth information, pose regression can be reformulated as the 3D point alignment problem, which is then solved by the ICP algorithm [42]. Although HybridPose utilizes multiple intermediate representations, all intermediate representations are predicted from an RGB image alone. HybridPose handles situations in which depth information is absent. + +Edge features. Edges are known to capture important image features such as object contours [2], salient edges [23], and straight line segments [45]. Unlike these low-level image features, HybridPose leverages semantic edge vectors defined between adjacent keypoints. This representation, which captures correlations between keypoints and reveals underlying structure of object, is concise and easy to predict. Such edge vectors offer more constraints than keypoints alone for pose regressions and have clear advantages under occlusion. Our approach is similar to [5], which predicts directions between adjacent keypoints to link keypoints into a human skeleton. However, we predict both the direction and the magnitude of edge vectors, and use these vectors to estimate object poses. + +Symmetry detection from images. Symmetry detection has received significant attention in computer vision. We refer readers to [22, 27] for general surveys, and [1, 41] for recent advances. Traditional applications of symmetry detection include face recognition [31], depth estimation [21], and 3D reconstruction [13, 43]. In the context of object pose estimation, people have studied symmetry from the perspective that it introduces ambiguities for pose estimation (c.f. [25, 36, 42]), since symmetric objects with different poses can have the same appearance in image. Several + +![](images/93b67adac92551a1be15a92d4c1b9ac601cc94574ee26f6b7677869b626c8d25.jpg) +Figure 2. Approach overview. HybridPose consists of intermediate representation prediction networks and a pose regression module. The prediction networks take an image as input, and output predicted keypoints, edge vectors, and symmetry correspondences. The pose regression module consists of an initialization sub-module and a refinement sub-module. The initialization sub-module solves a linear system with predicted intermediate representations to obtain an initial pose. The refinement sub-module utilizes GM robust norm and optimizes (9) to obtain the final pose prediction. + +works [36, 42, 6, 25, 30] have explored how to address such ambiguities, e.g., by designing loss functions that are invariant under symmetric transformations. + +Robust regression. Pose estimation via intermediate representation is sensitive to outliers in predictions, which are introduced by occlusion and cluttered backgrounds [37, 32, 40]. To mitigate pose error, several works assign different weights to different predicted elements in the 2D-3D alignment stage [34, 32]. In contrast, our approach additionally leverages robust norms to automatically filter outliers in the predicted elements. + +Besides the reweighting strategy, some recent works propose to use deep learning-based refiners to boost the pose estimation performance [19, 26, 44]. [44, 19] use point matching loss and achieve high accuracy. [26] predicts pose updates using contour information. Unlike these works, our approach considers the critical points and the loss surface of the robust objective function, and does not involve a fixed pre-determined iteration count used in recurrent network based approaches. + +# 3. Approach + +The input to HybridPose is an image $I$ containing an object in a known class, taken by a pinhole camera with known intrinsic parameters. Assuming that the class of objects has a canonical coordinate system $\Sigma$ (i.e. the 3D point cloud), HybridPose outputs the 6D camera pose ( $R_{I} \in SO(3)$ , $t_{I} \in \mathbb{R}^{3}$ ) of the image object under $\Sigma$ , where $R_{I}$ is the rotation and $t_{I}$ is the translation component. + +# 3.1. Approach Overview + +As illustrated in Figure 2, HybridPose consists of a prediction module and a pose regression module. + +Prediction module (Section 3.2). HybridPose utilizes three prediction networks $f_{\theta}^{\mathcal{K}}$ , $f_{\phi}^{\mathcal{E}}$ , and $f_{\gamma}^{\mathcal{S}}$ to estimate a set of keypoints $\mathcal{K} = \{p_k\}$ , a set of edges between keypoints $\mathcal{E} = \{v_e\}$ , and a set of symmetry correspondences between image pixels $S = \{(q_{s,1}, q_{s,2})\}$ . $\mathcal{K}$ , $\mathcal{E}$ , and $S$ are all expressed in 2D. $\theta$ , $\phi$ , and $\gamma$ are trainable parameters. + +The keypoint network $f_{\theta}^{\mathcal{K}}$ employs an off-the-shelf prediction network [34]. The other two prediction networks, $f_{\phi}^{\mathcal{E}}$ , and $f_{\gamma}^{\mathcal{S}}$ , are introduced to stabilize pose regression when keypoint predictions are inaccurate. Specifically, $f_{\phi}^{\mathcal{E}}$ predicts edge vectors along a pre-defined graph of keypoints, which stabilizes pose regression when keypoints are cluttered in the input image. $f_{\gamma}^{\mathcal{S}}$ predicts symmetry correspondences that reflect the underlying (partial) reflection symmetry. A key advantage of this symmetry representation is that the number of symmetry correspondences is large: every image pixel on the object has a symmetry correspondence. As a result, even with a large outlier ratio, symmetry correspondences still provide sufficient constraints for estimating the plane of reflection symmetry for regularizing the underlying pose. Moreover, symmetry correspondences incorporate more features within the interior of the underlying object than keypoints and edge vectors. + +Pose regression module (Section 3.3). The second module of HybridPose optimizes the object pose $(R_I, t_I)$ to fit the output of the three prediction networks. This module combines a trainable initialization sub-module and a train- + +able refinement sub-module. In particular, the initialization sub-module performs SVD to solve for an initial pose in the global affine pose space. The refinement sub-module utilizes robust norms to filter out outliers in the predicted elements for accurate object pose estimation. + +Training HybridPose (Section 3.4). We train HybridPose by splitting the dataset into a training set and a validation set. We use the training set to learn the prediction module, and the validation set to learn the hyper-parameters of the pose regression module. We have tried training HybridPose end-to-end using one training set. However, the difference between the prediction distributions on the training set and testing set leads to sub-optimal generalization performance. + +# 3.2. Hybrid Representation + +This section describes three intermediate representations used in HybridPose. + +Keypoints. The first intermediate representation consists of keypoints, which have been widely used for pose estimation. Given the input image $I$ , we train a neural network $f_{\theta}^{\mathcal{K}}(I) \in \mathbb{R}^{2 \times |\mathcal{K}|}$ to predict 2D coordinates of a pre-defined set of $|\mathcal{K}|$ keypoints. In our experiments, HybridPose incorporates an off-the-shelf architecture called PVNet [34], which is the state-of-the-art keypoint-based pose estimator that employs a voting scheme to predict both visible and invisible keypoints. + +Besides outliers in predicted keypoints, another limitation of keypoint-based techniques is that when the difference (direction and distance) between adjacent keypoints characterizes important information of the object pose, incorrect keypoint predictions incur large pose error. + +Edges. The second intermediate representation, which consists of edge vectors along a pre-defined graph, explicitly models the displacement between every pair of keypoints. As illustrated in Figure 2, HybridPose utilizes a simple network $f_{\phi}^{\mathcal{E}}(I) \in \mathbb{R}^{2 \times |\mathcal{E}|}$ to predict edge vectors in the 2D image plane, where $|\mathcal{E}|$ denotes the number of edges in the predefined graph. In our experiments, $\mathcal{E}$ is a fully-connected graph, i.e., $|\mathcal{E}| = \frac{|\mathcal{K}| \cdot (|\mathcal{K}| - 1)}{2}$ . + +Symmetry correspondences. The third intermediate representation consists of predicted pixel-wise symmetry correspondences that reflect the underlying reflection symmetry. In our experiments, HybridPose extends the network architecture of FlowNet 2.0 [15] that combines a dense pixel-wise flow and the semantic mask predicted by PVNet. The resulting symmetry correspondences are given by predicted pixel-wise flow within the mask region. Compared to the first two representations, the number of symmetry correspondences is significantly larger, which provides rich constraints even for occluded objects. However, symmetry correspondences only constrain two degrees of freedom in the rotation component of the object pose (c.f. [24]). It is necessary to combine symmetry correspondences with other intermediate representations. + +A 3D model may possess multiple reflection symmetry planes. For these models, we train HybridPose to predict symmetry correspondences with respect to the most salient reflection symmetry plane, i.e., one with the largest number of symmetry correspondences on the original 3D model. + +Summary of network design. In our experiments, $f_{\theta}^{\mathcal{K}}(I)$ , $f_{\phi}^{\mathcal{E}}(I)$ , and $f_{\gamma}^{S}$ are all based on ResNet [11], and the implementation details are discussed in Section 4.1. Trainable parameters are shared across all except the last convolutional layer. Therefore, the overhead of introducing the edge prediction network $f_{\phi}^{\mathcal{E}}(I)$ and the symmetry prediction network $f_{\gamma}^{S}$ is insignificant. + +# 3.3. Pose Regression + +The second module of HybridPose takes predicted intermediate representations $\{\mathcal{K},\mathcal{E},\mathcal{S}\}$ as input and outputs a 6D object pose $(R_I\in SO(3),t_I\in \mathbb{R}^3)$ for the input image $I$ . Similar to state-of-the-art pose regression approaches [35], HybridPose combines an initialization sub-module and a refinement sub-module. Both sub-modules leverage all predicted elements. The refinement sub-module additionally leverages a robust function to model outliers in the predicted elements. + +In the following, we denote 3D keypoint coordinates in the canonical coordinate system as $\overline{p}_k$ , $1 \leq k \leq |\mathcal{K}|$ . To make notations uncluttered, we denote output of the first module, i.e., predicted keypoints, edge vectors, and symmetry correspondences as $\pmb{p}_k \in \mathbb{R}^2$ , $1 \leq k \leq |\mathcal{K}|$ , $\pmb{v}_e \in \mathbb{R}^2$ , $1 \leq e \leq |\mathcal{E}|$ , and $(\pmb{q}_{s,1} \in \mathbb{R}^2, \pmb{q}_{s,2} \in \mathbb{R}^2)$ , $1 \leq s \leq |\mathcal{S}|$ respectively. Our formulation also uses the homogeneous coordinates $\hat{\pmb{p}}_k \in \mathbb{R}^3$ , $\hat{\pmb{v}}_e \in \mathbb{R}^3$ , $\hat{\pmb{q}}_{s,1} \in \mathbb{R}^3$ and $\hat{\pmb{q}}_{s,2} \in \mathbb{R}^3$ of $\pmb{p}_k$ , $\pmb{v}_e$ , $\pmb{q}_{s,1}$ and $\pmb{q}_{s,2}$ respectively. The homogeneous coordinates are normalized by the camera intrinsic matrix. + +Initialization sub-module. This sub-module leverages constraints between $(R_I, t_I)$ and predicted elements and solves $(R_i, t_I)$ in the affine space, which are then projected to $SE(3)$ in an alternating optimization manner. To this end, we introduce the following difference vectors for each type of predicted elements: + +$$ +\bar {\boldsymbol {r}} _ {R, \boldsymbol {t}} ^ {\mathcal {K}} \left(\boldsymbol {p} _ {k}\right) := \hat {\boldsymbol {p}} _ {k} \times \left(R \bar {\boldsymbol {p}} _ {k} + \boldsymbol {t}\right), \tag {1} +$$ + +$$ +\bar {\boldsymbol {r}} _ {R, \boldsymbol {t}} ^ {\mathcal {E}} \left(\boldsymbol {v} _ {e}, \boldsymbol {p} _ {e _ {s}}\right) := \hat {\boldsymbol {v}} _ {e} \times \left(R \bar {\boldsymbol {p}} _ {e _ {t}} + \boldsymbol {t}\right) + \hat {\boldsymbol {p}} _ {e _ {s}} \times \left(R \bar {\boldsymbol {v}} _ {e}\right) \tag {2} +$$ + +$$ +r _ {R, \mathbf {t}} ^ {\mathcal {S}} \left(\boldsymbol {q} _ {s, 1}, \boldsymbol {q} _ {s, 2}\right) := \left(\hat {\boldsymbol {q}} _ {s, 1} \times \hat {\boldsymbol {q}} _ {s, 2}\right) ^ {T} \boldsymbol {R} \bar {\boldsymbol {n}} _ {r}. \tag {3} +$$ + +where $e_s$ and $e_t$ are end vertices of edge $e$ , $\overline{\pmb{v}}_e = \overline{\pmb{p}}_{e_t} - \overline{\pmb{p}}_{e_s} \in \mathbb{R}^3$ , and $\overline{\pmb{n}}_r \in \mathbb{R}^3$ is the normal of the reflection symmetry plane in the canonical system. + +HybridPose modifies the framework of EPnP [18] to generate the initial poses. By combining these three constraints from predicted elements, we generate a linear system of the form $A\pmb{x} = \mathbf{0}$ , where $A$ is matrix and its dimension is $(3|\mathcal{K}| + 3|\mathcal{E}| + |\mathcal{S}|) \times 12$ . $\pmb{x} = [r_1^{\mathrm{T}}, r_2^{\mathrm{T}}, r_3^{\mathrm{T}}, t^{\mathrm{T}}]_{12 \times 1}^{\mathrm{T}}$ is a vector that contains rotation and translation parameters in + +affine space. To model the relative importance among keypoints, edge vectors, and symmetry correspondences, we rescale (2) and (3) by hyper-parameters $\alpha_{E}$ and $\alpha_{S}$ , respectively, to generate $A$ . + +Following EPnP [18], we compute $\pmb{x}$ as + +$$ +\boldsymbol {x} = \sum_ {i = 1} ^ {N} \gamma_ {i} \boldsymbol {v} _ {i} \tag {4} +$$ + +where $\pmb{v}_i$ is the $i_{\mathrm{th}}$ smallest right singular vector of $A$ . Ideally, when predicted elements are noise-free, $N = 1$ with $\pmb{x} = \pmb{v}_1$ is an optimal solution. However, this strategy performs poorly given noisy predictions. Same as EPnP [18], we choose $N = 4$ . To compute the optimal $\pmb{x}$ , we optimize latent variables $\gamma_i$ and the rotation matrix $R$ in an alternating optimization procedure with following objective function: + +$$ +\min _ {R \in \mathbb {R} ^ {3 \times 3}, \gamma_ {i}} \| \sum_ {i = 1} ^ {4} \gamma_ {i} R _ {i} - R \| _ {\mathcal {F}} ^ {2} \tag {5} +$$ + +where $R_{i}\in \mathbb{R}^{3\times 3}$ is reshaped from the first 9 elements of $\pmb{v}_{i}$ . After obtaining optimal $\gamma_{i}$ , we project the resulting affine transformation $\sum_{i = 1}^{4}\gamma_{i}R_{i}$ into a rigid transformation. Due to space constraint, we defer details to the supp. material. + +Refinement sub-module. Although (5) combines hybrid intermediate representations and admits good initialization, it does not directly model outliers in predicted elements. Another limitation comes from (1) and (2), which do not minimize the projection errors (i.e., with respect to keypoints and edges), which are known to be effective in keypoint-based pose estimation (c.f. [35]). + +Benefited from having an initial object pose $(R^{init},t^{init})$ , the refinement sub-module performs local optimization to refine the object pose. We introduce two difference vectors that involve projection errors: $\forall k,e,s$ + +$$ +\boldsymbol {r} _ {R, \boldsymbol {t}} ^ {\mathcal {K}} \left(\boldsymbol {p} _ {k}\right) := \mathcal {P} _ {R, \boldsymbol {t}} \left(\bar {\boldsymbol {p}} _ {k}\right) - \boldsymbol {p} _ {k}, \tag {6} +$$ + +$$ +\boldsymbol {r} _ {R, \boldsymbol {t}} ^ {\mathcal {E}} (\boldsymbol {v} _ {e}) := \mathcal {P} _ {R, \boldsymbol {t}} \left(\bar {\boldsymbol {p}} _ {e _ {t}}\right) - \mathcal {P} _ {R, \boldsymbol {t}} \left(\bar {\boldsymbol {p}} _ {e _ {s}}\right) - \boldsymbol {v} _ {e}, \tag {7} +$$ + +where $\mathcal{P}_{R,t}:\mathbb{R}^3\to \mathbb{R}^2$ is the projection operator induced from the current pose $(R,t)$ . + +To prune outliers in the predicted elements, we consider a generalized German-Mcclure (or GM) robust function + +$$ +\rho (x, \beta) := \beta_ {1} ^ {2} / \left(\beta_ {2} ^ {2} + x ^ {2}\right). \tag {8} +$$ + +With this setup, HybridPose solves the following non-linear + +optimization problem for pose refinement: + +$$ +\begin{array}{l} \min _ {R, \boldsymbol {t}} \sum_ {k = 1} ^ {| \mathcal {K} |} \rho (\| \boldsymbol {r} _ {R, \boldsymbol {t}} ^ {\mathcal {K}} (\boldsymbol {p} _ {k}) \|, \beta_ {\mathcal {K}}) \| \boldsymbol {r} _ {R, \boldsymbol {t}} ^ {\mathcal {K}} (\boldsymbol {p} _ {k}) \| _ {\Sigma_ {k}} ^ {2} \\ + \frac {| \mathcal {K} |}{| \mathcal {E} |} \sum_ {e = 1} ^ {| \mathcal {E} |} \rho \left(\left\| \boldsymbol {r} _ {R, t} ^ {\mathcal {E}} (\boldsymbol {v} _ {e}) \right\|, \beta_ {\mathcal {E}}\right) \| \boldsymbol {r} _ {R, t} ^ {\mathcal {E}} (\boldsymbol {v} _ {e}) \| _ {\Sigma_ {e}} ^ {2} \\ + \frac {| \mathcal {K} |}{| \mathcal {S} |} \sum_ {s = 1} ^ {| \mathcal {S} |} \rho \left(r _ {R, t} ^ {\mathcal {S}} \left(\boldsymbol {q} _ {s, 1}, \boldsymbol {q} _ {s, 2}\right), \beta_ {\mathcal {S}}\right) \tag {9} \\ \end{array} +$$ + +where $\beta_{\mathcal{K}}$ , $\beta_{\mathcal{E}}$ , and $\beta_{S}$ are separate hyper-parameters for keypoints, edges, and symmetry correspondences. $\Sigma_{k}$ and $\Sigma_{e}$ denote the covariance information attached to the keypoint and edge predictions. $\| \pmb {x}\| _A = (\pmb{x}^T\pmb {A}\pmb {x})^{\frac{1}{2}}$ . When covariances of predictions are unavailable, we simply set $\Sigma_{k} = \Sigma_{e} = I_{2}$ . The above optimization problem is solved by Gauss-Newton method starting from $R^{init}$ and $\pmb{t}^{init}$ . + +In the supp. material, we provide a stability analysis of (9), and show how the optimal solution of (9) changes with respect to noise in predicted representations. We also show collaborative strength among all three intermediate representations. While keypoints significantly contribute to the accuracy of $t$ , edge vectors and symmetry correspondences can stabilize the regression of $R$ . + +# 3.4. HybridPose Training + +This section describes how to train the prediction networks and hyper-parameters of HybridPose using a labeled dataset $\mathcal{T} = \{I, (\mathcal{K}_I^{gt}, \mathcal{E}_I^{gt}, S_I^{gt}, (R_I^{gt}, t_I^{gt}))\}$ . With $I, \mathcal{K}_I^{gt}, \mathcal{E}_I^{gt}, S_I^{gt}$ , and $(R_I^{gt}, t_I^{gt})$ , we denote the RGB image, labeled keypoints, edges, symmetry correspondences, and groundtruth object pose, respectively. A popular strategy is to train the entire model end-to-end, e.g., using recurrent networks to model the optimization procedure and introducing loss terms on the object pose output as well as the intermediate representations. However, we found this strategy suboptimal. The distribution of predicted elements on the training set differs from that on the testing set. Even by carefully tuning the trade-off between supervisions on predicted elements and the final object pose, the pose regression model, which fits the training data, generalizes poorly on the testing data. + +Our approach randomly divides the labeled set $\mathcal{T} = \mathcal{T}_{train} \cup \mathcal{T}_{val}$ into a training set and a validation set. $\mathcal{T}_{train}$ is used to train the prediction networks, and $\mathcal{T}_{val}$ trains the hyper-parameters of the pose regression model. Implementation and training details of the prediction networks are presented in Section 4.1. In the following, we focus on training the hyper-parameters using $\mathcal{T}_{val}$ . + +Initialization sub-module. Let $R_{I}^{init}$ and $t_{I}^{init}$ be the output of the initialization sub-module. We obtain the optimal hyper-parameters $\alpha_{E}$ and $\alpha_{S}$ by solving the following opti + +mization problem: + +$$ +\min _ {\alpha_ {E}, \alpha_ {S}} \sum_ {I \in \mathcal {T} _ {\text {p o s e}}} \left(\| R _ {I} ^ {\text {i n i t}} - R _ {I} ^ {\text {g t}} \| _ {\mathcal {F}} ^ {2} + \| \boldsymbol {t} _ {I} ^ {\text {i n i t}} - \boldsymbol {t} _ {I} ^ {\text {g t}} \| ^ {2}\right). \tag {10} +$$ + +Since the number of hyper-parameters is rather small, and the pose initialization step does not admit an explicit expression, we use the finite-difference method to compute numerical gradient, i.e., by fitting the gradient to samples of the hyper-parameters around the current solution. We then apply back-track line search for optimization. + +Refinement sub-module. Let $\beta = \{\beta_{\mathcal{K}},\beta_{\mathcal{E}},\beta_{\mathcal{S}}\}$ be the hyper-parameters of this sub-module. For each instance $(I,(\mathcal{K}_I^{gt},\mathcal{E}_I^{gt},\mathcal{S}_I^{gt},(R_I^{gt},t_I^{gt})))\in \mathcal{T}_{val}$ , denote the objective function in (9) as $f_{I}(\pmb {c},\beta)$ , where $\pmb {c} = (\pmb {c}^T,\overline{\pmb{c}}^T)^T\in$ $\mathbb{R}^6$ is a local parameterization of $R_{I}$ and $\pmb {t}_I$ , i.e., $R_{I} =$ $\exp (c\times)R_I^{gt},t_I = t_I^{gt} + \overline{c}$ . $\pmb{c}$ encodes the different the current estimated pose and the ground-truth pose in $SE(3)$ . + +The refinement module solves an unconstrained optimization problem, whose optimal solution is dictated by its critical points and the loss surface around the critical points. We consider two simple objectives. The first objective forces $\frac{\partial f_I}{\partial c}(\mathbf{0}, \beta) \approx 0$ , or in other words, the groundtruth is approximately a critical point. The second objective minimizes the condition number $\kappa\left(\frac{\partial^2 f_I}{\partial^2 c}(\mathbf{0}, \beta)\right) = \lambda_{\max}\left(\frac{\partial^2 f_I}{\partial^2 c}(\mathbf{0}, \beta)\right) / \lambda_{\min}\left(\frac{\partial^2 f_I}{\partial^2 c}(\mathbf{0}, \beta)\right)$ . This objective regularizes the loss surface around each optimal solution, promoting a large converge radius for $f_I(c, \beta)$ . With this setup, we formulate the following objective function to optimize $\beta$ : + +$$ +\min _ {\beta} \sum_ {I \in \mathcal {T} _ {v a l}} \| \frac {\partial f _ {I}}{\partial \boldsymbol {c}} (\boldsymbol {0}, \beta) \| ^ {2} + \gamma \kappa \left(\frac {\partial^ {2} f _ {I}}{\partial^ {2} \boldsymbol {c}} (\boldsymbol {0}, \beta)\right) \tag {11} +$$ + +where $\gamma$ is set to $10^{-4}$ . The same strategy used in (10) is then applied to optimize (11). + +# 4. Experimental Evaluation + +This section presents an experimental evaluation of the proposed approach. Section 4.1 describes the experimental setup. Section 4.2 quantitatively and qualitatively compares HybridPose with other 6D pose estimation methods. Section 4.3 presents an ablation study to investigate the effectiveness of symmetry correspondences, edge vectors, and the refinement sub-module. + +# 4.1. Experimental Setup + +Datasets. We consider two popular benchmark datasets that are widely used in the 6D pose estimation problem, Linemod [12] and Occlusion Linemod [3]. In comparison to Linemod, Occlusion Linemod contains more examples where the objects are under occlusion. Our keypoint annotation strategy follows that of [34], i.e., we choose $|\mathcal{K}| = 8$ + +keypoints via the farthest point sampling algorithm. Edge vectors are defined as vectors connecting each pair of keypoints. In total, each object has $|\mathcal{E}| = \frac{|\mathcal{K}|\cdot(|\mathcal{K}| - 1)}{2} = 28$ edges. We further use the algorithm proposed in [8] to annotate Linemod and Occlusion Linemod with reflection symmetry labels. On each dataset, we randomly select $80\%$ of the examples for training, 20 instances for validation, and the rest for testing. + +Implementation details. We use ResNet [11] with pretrained weights on ImageNet [7] to build the prediction networks $f_{\theta}^{\mathcal{K}}$ , $f_{\phi}^{\mathcal{E}}$ , and $f_{\gamma}^{\mathcal{S}}$ . The prediction networks take an RGB image $I$ of size $(3, H, W)$ as input, and output a tensor of size $(C, H, W)$ , where $(H, W)$ is the image resolution, and $C = 1 + 2|\mathcal{K}| + 2|\mathcal{E}| + 2$ is the number of channels in the output tensor. + +The first channel in the output tensor is a binary segmentation mask $M$ . If $M(x,y) = 1$ , then $(x,y)$ corresponds to a pixel on the object of interest in the input image $I$ . The segmentation mask is trained using the cross-entropy loss. + +The $2|\mathcal{K}|$ channels afterwards in the output tensor give $x$ and $y$ components of all $|\mathcal{K}|$ keypoints. A voting-based keypoint localization scheme [34] is applied to extract the coordinates of 2D keypoints from this $2|\mathcal{K}|$ -channel tensor and the segmentation mask $M$ . + +The next $2|\mathcal{E}|$ channels in the output tensor give the $x$ and $y$ components of all $|\mathcal{E}|$ edges, which we denote as Edge. Let $i$ $(0\leq i < |\mathcal{E}|)$ be the index of an edge. Then + +$$ +E d g e _ {i} = \left\{\left(E d g e (2 i, x, y), E d g e (2 i + 1, x, y)\right) \mid M (x, y) = 1 \right\} +$$ + +is a set of 2-tuples containing pixel-wise predictions of the $i^{th}$ edge vector in $Edge$ . The mean of $Edge_{i}$ is extracted as the predicted edge. + +The final 2 channels in the output tensor define the $x$ and $y$ components of symmetry correspondences. We denote this 2-channel "map" of symmetry correspondences as Sym. Let $(x, y)$ be a pixel on the object of interest in the input image, i.e. $M(x, y) = 1$ . Assuming $\Delta x = Sym(0, x, y)$ and $\Delta y = Sym(1, x, y)$ , we consider $(x, y)$ and $(x + \Delta x, y + \Delta y)$ to be symmetric with respect to the reflection symmetry plane. + +We train all three intermediate representations using the smooth $\ell_1$ loss described in [9]. Network training employs the Adam [17] optimizer for 500 epochs. The learning rate is 0.02 before the $200^{th}$ epoch, and 0.002 after the $200^{th}$ epoch. Training weights of the segmentation mask, keypoints, edge vectors, and symmetry correspondences are 1.0, 10.0, 0.1, and 0.1, respectively. + +The architecture described above achieves good performance in terms of detection accuracy. Nevertheless, it should be emphasized that the framework of HybridPose can incorporate future improvements in keypoint, edge vector, and symmetry correspondence detection techniques. Besides, Hybridpose can be extended to handling multiple objects within an image. One approach is to pre + +![](images/37a0ed3a7f9c4f47be4ed159e618b796c0296ee185eb6bddba65e706fe4fb498.jpg) +Figure 3. Pose regression results. HybridPose is able to accurately predict 6D poses from RGB images. HybridPose handles situations where the object has no occlusion (a, d, f, h), light occlusion (b, c), and severe occlusion (e, g). For illustrative purposes, we only draw 50 randomly selected symmetry correspondences in each example. + +dict instance-level rather than semantic-level segmentation masks by methods such as Mask R-CNN [10]. Intermediate representations are then extracted from each instance, and fed to the pose regression module in 3.3. + +Evaluation protocols. We use two metrics to evaluate the performance of HybridPose: + +1. ADD(-S) [12, 42] first calculates the distance between two point sets transformed by predicted pose and ground-truth pose respectively, and then extracts the mean distance. When the object possesses symmetric pose ambiguity, the mean distance is computed from the closest points between two transformed sets. ADD(-S) accuracy is defined as the percentage of examples whose calculated mean distance is less than $10\%$ of the model diameter. +2. In the ablation study, we compute and report the the angular rotation error $\| \frac{\log(R_{gt}^T R_I)}{2}\|$ and the relative translation error $\frac{\|\pmb{t}_I - \pmb{t}_{gt}\|}{d}$ between the predicted pose $(R_I, t_I)$ and the ground-truth pose $(R_{gt}, t_{gt})$ , where $d$ is object diameter. + +# 4.2. Analysis of Results + +As shown in Table 1, Table 2, and Figure 3, HybridPose leads to accurate pose estimation. On Linemod and Occlusion Linemod, HybridPose has an average ADD(-S) accuracy of 94.5 and 79.2, respectively. The result on Linemod outperforms all except one state-of-the-art approaches that + +
objectTekinBB8Pix2PosePVNetCDPNDPODOurs
ape21.640.458.143.664.487.777.6
benchvise81.891.891.099.997.898.599.6
cam36.655.760.986.991.796.195.9
can68.864.184.495.595.999.793.6
cat41.862.665.079.383.894.793.5
driller63.574.476.396.496.298.897.2
duck27.244.343.852.666.886.387.0
eggbox†69.657.896.899.299.799.999.6
glue†80.041.279.495.799.696.898.7
holepuncher42.667.274.881.985.886.992.5
iron75.084.783.498.997.9100.098.1
lamp71.176.582.099.397.996.896.9
phone47.754.045.092.490.894.798.3
average56.062.772.486.389.995.294.5
+ +Table 1. Quantitative evaluation: ADD(-S) accuracy on Linemod. Baseline approaches: Tekin et al. [38], BB8 [36], Pix2Pose [30], PVNet [34], CDPN [20], and DPOD [44]. Objects annotated with $(\dagger)$ possess symmetric pose ambiguity. + +regress poses from intermediate representations. The result on Occlusion-Linemod outperforms all state-of-the-art approaches. + +Baseline comparison on Linemod. HybridPose outperforms PVNet [34], the backbone model we use to predict keypoints. The improvement is consistent across all except one object classes, which demonstrates clear advantage of using a hybrid as opposed to unitary intermediate representation. HybridPose shows competitive results against + +
objectPoseCNNOberwegerHuPix2PosePVNetDPODOurs
ape9.612.117.622.015.8-53.3
can45.239.953.944.763.3-86.5
cat0.938.23.322.716.7-73.4
driller41.445.262.444.765.7-92.8
duck19.617.219.215.025.2-62.8
eggbox†22.022.125.925.250.2-95.3
glue†38.535.839.632.449.6-92.5
holepuncher22.136.021.349.539.7-76.7
average24.927.027.032.040.847.379.2
+ +Table 2. Quantitative evaluation: ADD(-S) accuracy on Occlusion Linemod. Baseline approaches: PoseCNN [42], Oberweger et al. [29], Hu et al. [14], PVNet [34], and DPOD [44]. Objects annotated with $(\dagger)$ possess symmetric pose ambiguity. + +DPOD [44], winning on six object classes. The advantage of DPOD comes from data augmentation and explicit modeling of dense correspondences between input and projected images, both of which cater to situations without object occlusion. A detailed analysis reveals that the classes of objects on which HybridPose exhibits sub-optimal performance are among the smallest objects in Linemod. It suggests that pixel-based descriptors used in our pipeline are limited by image resolution. + +Baseline comparison on Occlusion Linemod. HybridPose outperforms all baselines by a considerable margin. In terms of ADD(-S), our approach improves PVNet [34] from 40.8 to 79.2, representing a $94.1\%$ enhancement, which clearly shows the advantage of HybridPose on occluded objects, where predictions of invisible keypoints can be noisy, and visible keypoints may not provide sufficient constraints for pose regression alone. HybridPose also outperforms DPOD, the state-of-the-art model on this dataset, by $67.4\%$ . One explanation is that rendering-based approaches like DPOD work less well on occluded objects, due to the difficulty in modeling occlusions in data augmentation and correspondence computation. + +Running time. On a desktop with 16-core Intel(R) Xeon(R) E5-2637 CPU and GeForce GTX 1080 GPU, HybridPose takes 0.6 second to predict the intermediate representations, 0.4 second to regress the pose. Assuming a batch size of 30, this gives an an average processing speed of around 30 fps, enabling real-time analysis. + +# 4.3. Ablation Study + +Table 3 summarizes the performance of HybridPose using different predicted intermediate representations on the Occlusion Linemod dataset. Ablation study on Linemod is deferred to the supp. material. + +With keypoints. As a baseline approach, we estimate object poses by only utilizing keypoint information. As shown in Table 3, this gives a mean absolute rotation error of $1.648^{\circ}$ , and a mean relative translation error of 0.100. + +With keypoints and symmetry. Adding symmetry correspondences to keypoints leads to noticeable performance gains in rotation. The relative performance gain is $3.52\%$ , + +
keypointskeypoints + symmetriesfull model
Rot.Trans.Rot.Trans.Rot.Trans.
ape1.914°0.1071.809°0.1131.543°0.092
can1.472°0.0591.710°0.0730.912°0.041
cat1.039°0.1190.888°0.1170.751°0.055
driller1.180°0.0571.180°0.0570.803°0.027
duck1.773°0.1161.679°0.1151.439°0.068
eggbox1.675°0.1071.587°0.1051.052°0.052
glue1.796°0.0971.681°0.0991.224°0.066
holepuncher2.319°0.1412.192°0.1401.704°0.051
mean1.648°0.1001.590°0.1021.179°0.057
+ +Table 3. Quantitative evaluation with different intermediate representations. We report errors using two metrics: the median of absolute angular error in rotation, and the median of relative error in translation with respect to object diameter. + +and such improvement is almost consistent across all object categories, which demonstrates the effectiveness of symmetry correspondences. On the other hand, the translation error of using keypoints and using keypoints + symmetry remains almost the same. One explanation is that symmetry correspondences only constrain two degrees of freedom in a total of three rotation parameters, and provide no constraint on translation parameters (see (3)). + +Full model. Adding edge vectors to keypoints and symmetry correspondences leads to salient performance gain in both rotation and translation estimations. The relative performance gains in rotation and translation are $25.85\%$ and $44.12\%$ , respectively. One explanation is that edge vectors provide more constraints on both translation and rotation (see (2)). Edge vectors provide more constraints on translation than keypoints as they represent adjacent keypoints displacement and provide gradient information for regression. Unlike symmetry correspondences, edge vectors constrain 3 degrees of freedom on rotation parameters which further boosts the performance of rotation estimation. + +# 5. Conclusions and Future Work + +In this paper, we introduce HybridPose, a 6D pose estimation approach that utilizes keypoints, edge vectors, and symmetry correspondences. Experiments show that HybridPose enjoys real-time prediction and outperforms current state-of-the-art pose estimation approaches in accuracy. HybridPose is robust to occlusion and extreme poses. In the future, we plan to extend HybridPose to include more intermediate representations such as shape primitives, normals, and planar faces. Another possible direction is to enforce consistency across different representations in a similar way to [46] as a self-supervision loss in network training. + +# 6. Acknowledgement + +We would like to acknowledge the support of this research from NSF DMS-1700234, a Gift from Snap Research, and a hardware donation from NVIDIA. + +# References + +[1] Ibragim R. Atadjanov and Seungkyu Lee. Reflection symmetry detection via appearance of structure descriptor. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part III, pages 3-18, 2016. 2 +[2] Gedas Bertasius, Jianbo Shi, and Lorenzo Torresani. Deepedge: A multi-scale bifurcated deep network for top-down contour detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4380-4389, 2015. 2 +[3] Eric Brachmann, Alexander Krull, Frank Michel, Stefan Gumhold, Jamie Shotton, and Carsten Rother. Learning 6d object pose estimation using 3d object coordinates. In European conference on computer vision, pages 536-551. Springer, 2014. 1, 2, 6 +[4] Eric Brachmann, Frank Michel, Alexander Krull, Michael Ying Yang, Stefan Gumhold, et al. Uncertainty-driven 6d pose estimation of objects and scenes from a single rgb image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3364-3372, 2016. 2 +[5] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 1302-1310, 2017. 2 +[6] Enric Corona, Kaustav Kundu, and Sanja Fidler. Pose estimation for objects with rotational symmetry. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 7215-7222. IEEE, 2018. 3 +[7] J. Deng, W. Dong, R. Socher, L. Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255, June 2009. 6 +[8] Aleksandris Ecins, Cornelia Fermüller, and Yiannis Aloimonos. Seeing behind the scene: Using symmetry to reason about objects in cluttered environments. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 7193-7200. IEEE, 2018. 6 +[9] Ross Girshick. Fast r-cnn. 2015 IEEE International Conference on Computer Vision (ICCV), Dec 2015. 6 +[10] Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. 2017 IEEE International Conference on Computer Vision (ICCV), Oct 2017. 7 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. 4, 6 +[12] Stefan Hinterstoisser, Vincent Lepetit, Slobodan Ilic, Stefan Holzer, Gary Bradski, Kurt Konolige, and Nassir Navab. Model based training, detection and pose estimation of texture-less 3d objects in heavily cluttered scenes. In Proceedings of the 11th Asian Conference on Computer Vision - Volume Part I, ACCV'12, pages 548-562, Berlin, Heidelberg, 2013. Springer-Verlag. 2, 6, 7 +[13] Wei Hong, Allen Yang Yang, Kun Huang, and Yi Ma. On symmetry and multiple-view geometry: Structure, pose, and calibration from a single image. International Journal of Computer Vision, 60(3):241-265, 2004. 2 + +[14] Yinlin Hu, Joachim Hugonot, Pascal Fua, and Mathieu Salzmann. Segmentation-driven 6d object pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3385-3394, 2019. 2, 8 +[15] 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 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 1647-1655, 2017. 4 +[16] Alex Kendall, Matthew Grimes, and Roberto Cipolla. Posenet: A convolutional network for real-time 6-dof camera relocalization. In Proceedings of the IEEE international conference on computer vision, pages 2938-2946, 2015. 1 +[17] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014. 6 +[18] Vincent Lepetit, Francesc Moreno-Noguer, and Pascal Fua. Epnp: An accurate o (n) solution to the pnp problem. International journal of computer vision, 81(2):155, 2009. 2, 4, 5 +[19] Yi Li, Gu Wang, Xiangyang Ji, Yu Xiang, and Dieter Fox. Deepim: Deep iterative matching for 6d pose estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 683-698, 2018. 3 +[20] Zhigang Li, Gu Wang, and Xiangyang Ji. Cdpn: Coordinates-based disentangled pose network for real-time rgb-based 6-dof object pose estimation. In Proceedings of the IEEE International Conference on Computer Vision, pages 7678-7687, 2019. 2, 7 +[21] Guilin Liu, Chao Yang, Zimo Li, Duygu Ceylan, and Qixing Huang. Symmetry-aware depth estimation using deep neural networks. arXiv preprint arXiv:1604.06079, 2016. 2 +[22] Yanxi Liu, Hagit Hel-Or, Craig S. Kaplan, and Luc Van Gool. Computational symmetry in computer vision and computer graphics. Foundations and Trends in Computer Graphics and Vision, 5(1-2):1-195, 2010. 2 +[23] Yu Liu and Michael S Lew. Learning relaxed deep supervision for better edge detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 231-240, 2016. 2 +[24] Yi Ma, Stefano Soatto, Jana Kosecka, and S. Shankar Sastry. An Invitation to 3-D Vision: From Images to Geometric Models. SpringerVerlag, 2003. 4 +[25] Fabian Manhardt, Diego Martin Arroyo, Christian Rupprecht, Benjamin Busam, Tolga Birdal, Nassir Navab, and Federico Tombari. Explaining the ambiguity of object detection and 6d pose from visual data. In Proceedings of the IEEE International Conference on Computer Vision, pages 6841-6850, 2019. 2, 3 +[26] Fabian Manhardt, Wadim Kehl, Nassir Navab, and Federico Tombari. Deep model-based 6d pose refinement in rgb. In Proceedings of the European Conference on Computer Vision (ECCV), pages 800-815, 2018. 3 +[27] Niloy J. Mitra, Mark Pauly, Michael Wand, and Duygu Ceylan. Symmetry in 3d geometry: Extraction and applications. Comput. Graph. Forum, 32(6):1-23, Sept. 2013. 2 +[28] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In Computer Vi + +sion - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part VIII, pages 483-499, 2016. 2 +[29] Markus Oberweger, Mahdi Rad, and Vincent Lepetit. Making deep heatmaps robust to partial occlusions for 3d object pose estimation. Lecture Notes in Computer Science, page 125141, 2018. 8 +[30] Kiru Park, Timothy Patten, and Markus Vincze. Pix2pose: Pixel-wise coordinate regression of objects for 6d pose estimation. In Proceedings of the IEEE International Conference on Computer Vision, pages 7668-7677, 2019. 2, 3, 7 +[31] Georgios Passalis, Panagiotis Perakis, Theoharis Theoharis, and Ioannis A Kakadiaris. Using facial symmetry to handle pose variations in real-world 3d face recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(10):1938-1951, 2011. 2 +[32] Georgios Pavlakos, Xiaowei Zhou, Aaron Chan, Konstantinos G Derpanis, and Kostas Daniilidis. 6-dof object pose from semantic keypoints. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 2011-2018. IEEE, 2017. 2, 3 +[33] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournaepau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825-2830, 2011. +[34] Sida Peng, Yuan Liu, Qixing Huang, Hujun Bao, and Xiaowei Zhou. Pynet: Pixel-wise voting network for 6dof pose estimation. CoRR, abs/1812.11788, 2018. 1, 2, 3, 4, 6, 7, 8 +[35] Mikael Persson and Klas Nordberg. Lambda twist: An accurate fast robust perspective three point (p3p) solver. In The European Conference on Computer Vision (ECCV), September 2018. 4, 5 +[36] Mahdi Rad and Vincent Lepetit. Bb8: A scalable, accurate, robust to partial occlusion method for predicting the 3d poses of challenging objects without using depth. In Proceedings of the IEEE International Conference on Computer Vision, pages 3828-3836, 2017. 2, 3, 7 +[37] Martin Sundermeyer, Zoltan-Csaba Marton, Maximilian Durner, Manuel Brucker, and Rudolph Triebel. Implicit 3d orientation learning for 6d object detection from rgb images. In Proceedings of the European Conference on Computer Vision (ECCV), pages 699-715, 2018. 3 +[38] Bugra Tekin, Sudipta N. Sinha, and Pascal Fua. Real-time seamless single shot 6d object pose prediction. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 292-301, 2018. 1, 7 +[39] Shubham Tulsiani and Jitendra Malik. Viewpoints and keypoints. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, Boston, MA, USA, June 7-12, 2015, pages 1510-1519, 2015. 1 +[40] Chen Wang, Danfei Xu, Yuke Zhu, Roberto Martin-Martin, Cewu Lu, Li Fei-Fei, and Silvio Savarese. Densefusion: 6d object pose estimation by iterative dense fusion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3343–3352, 2019. 2, 3 + +[41] Zhaozhong Wang, Zesheng Tang, and Xiao Zhang. Reflection symmetry detection using locally affine invariant edge correspondence. IEEE Trans. Image Processing, 24(4):1297-1301, 2015. 2 +[42] 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 XIV, Carnegie Mellon University, Pittsburgh, Pennsylvania, USA, June 26-30, 2018, 2018. 1, 2, 3, 7, 8 +[43] Tianfan Xue, Jianzhuang Liu, and Xiaou Tang. Symmetric piecewise planar object reconstruction from a single image. In CVPR 2011, pages 2577-2584. IEEE, 2011. 2 +[44] Sergey Zakharov, Ivan Shugurov, and Slobodan Ilic. Dpod: 6d pose object detector and refiner, 2019. 2, 3, 7, 8 +[45] Ziheng Zhang, Zhengxin Li, Ning Bi, Jia Zheng, Jinlei Wang, Kun Huang, Weixin Luo, Yanyu Xu, and Shenghua Gao. Ppgnet: Learning point-pair graph for line segment detection. arXiv preprint arXiv:1905.03415, 2019. 2 +[46] Zaiwei Zhang, Zhenxiao Liang, Lemeng Wu, Xiaowei Zhou, and Qixing Huang. Path-invariant map networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11084-11094, 2019. 8 +[47] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and ego-motion from video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1851-1858, 2017. 2 +[48] Xingyi Zhou, Arjun Karpur, Linjie Luo, and Qixing Huang. Starmap for category-agnostic keypoint and viewpoint estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 318–334, 2018. 2 \ No newline at end of file diff --git a/hybridpose6dobjectposeestimationunderhybridrepresentations/images.zip b/hybridpose6dobjectposeestimationunderhybridrepresentations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..971d3fb74d6242ebda4c57af775c8b6ce50c2b39 --- /dev/null +++ b/hybridpose6dobjectposeestimationunderhybridrepresentations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfe16581278af74ea1277c96768a3c8e5ec92e69e492b616a94d3a5ec90fe801 +size 617583 diff --git a/hybridpose6dobjectposeestimationunderhybridrepresentations/layout.json b/hybridpose6dobjectposeestimationunderhybridrepresentations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..86eb94c7da8b7d7d891205d5381dbe0bde51fb56 --- /dev/null +++ b/hybridpose6dobjectposeestimationunderhybridrepresentations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13876267c5c365437656b3b3d05faa0746739832ab78397380938806d531e3d2 +size 478432 diff --git a/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_content_list.json b/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4ca97eca70b7421e739d071a32f18e48d2a47792 --- /dev/null +++ b/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85ad6f5ba2fc0b066c312f34bc8a4f495b3f268b961ae64a7a6c490d04630e78 +size 81138 diff --git a/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_model.json b/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b958b44331b0bd25a53bfea6838aabe8a3816453 --- /dev/null +++ b/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d72e2c194e816eeeb347b64c898d6a989227e105b5ca09a339fb975ec19e8e5 +size 101657 diff --git a/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_origin.pdf b/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8fcd2d769c73b27307cf02e0821cf2458e9108db --- /dev/null +++ b/hyperbolicimageembeddings/8616f11c-c79a-4939-a687-0d28511b7a43_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f991ea4c7ebfd0f7ebd153bcf1b50bc7ef4e7a64d84b98695f9978369d4d8fa +size 1600925 diff --git a/hyperbolicimageembeddings/full.md b/hyperbolicimageembeddings/full.md new file mode 100644 index 0000000000000000000000000000000000000000..52f637e04c512708711fa3449203639d14d8b573 --- /dev/null +++ b/hyperbolicimageembeddings/full.md @@ -0,0 +1,332 @@ +# Hyperbolic Image Embeddings + +# Valentin Khrulkov1,4* Leyla Mirvakhabova1* Evgeniya Ustinova1 Ivan Oseledets1,2 Victor Lempitsky1,3 + +Skolkovo Institute of Science and Technology (Skoltech), Moscow1 +Institute of Numerical Mathematics of the Russian Academy of Sciences, Moscow2 +Samsung AI Center, Moscow3 +Yandex, Moscow4 + +{valentin.khrulkov, leyla.mirvakhabova, evgeniya.ustinova, i.oseledets, lempitsky}@skoltech.ru + +# Abstract + +Computer vision tasks such as image classification, image retrieval, and few-shot learning are currently dominated by Euclidean and spherical embeddings so that the final decisions about class belongings or the degree of similarity are made using linear hyperplanes. Euclidean distances, or spherical geodesic distances (cosine similarity). In this work, we demonstrate that in many practical scenarios, hyperbolic embeddings provide a better alternative. + +# 1. Introduction + +Learned high-dimensional embeddings are ubiquitous in modern computer vision. Learning aims to group together semantically-similar images and to separate semantically-different images. When the learning process is successful, simple classifiers can be used to assign an image to classes, and simple distance measures can be used to assess the similarity between images or image fragments. The operations at the end of deep networks imply a certain type of geometry of the embedding spaces. For example, image classification networks [19, 22] use linear operators (matrix multiplication) to map embeddings in the penultimate layer to class logits. The class boundaries in the embedding space are thus piecewise-linear, and pairs of classes are separated by Euclidean hyperplanes. The embeddings learned by the model in the penultimate layer, therefore, live in the Euclidean space. The same can be said about systems where Euclidean distances are used to perform image retrieval [31, 44, 58], face recognition [33, 57] or one-shot learning [43]. + +Alternatively, some few-shot learning [53], face recognition [41], and person re-identification methods [52, 59] + +![](images/04171cde71a5267cda99595958cf088e4aa993603dc2e727d179130d40f734c7.jpg) +Figure 1: An example of two-dimensional Poincaré embeddings computed by a hyperbolic neural network trained on MNIST, and evaluated additionally on Omniglot. Ambiguous and unclear images from MNIST, as well as most of the images from Omniglot, are embedded near the center, while samples with clear class labels (or characters from Omniglot similar to one of the digits) lie near the boundary. *For inference, Omniglot was normalized to have the same background color as MNIST. Omniglot images are marked with black crosses, MNIST images with colored dots. + +learn spherical embeddings, so that sphere projection operator is applied at the end of a network that computes the embeddings. Cosine similarity (closely associated with + +![](images/663895d9400edb182a81aceecae6ab5f1593c848e1292596ac62026879a5d94c.jpg) +Figure 2: In many computer vision tasks, we want to learn image embeddings that obey the hierarchical constraints. E.g., in image retrieval (left), the hierarchy may arise from whole-fragment relation. In recognition tasks (right), the hierarchy can arise from image degradation, when degraded images are inherently ambiguous and may correspond to various identities/classes. Hyperbolic spaces are more suitable for embedding data with such hierarchical structure. + +sphere geodesic distance) is then used by such architectures to match images. + +Euclidean spaces with their zero curvature and spherical spaces with their positive curvature have certain profound implications on the nature of embeddings that existing computer vision systems can learn. In this work, we argue that hyperbolic spaces with negative curvature might often be more appropriate for learning embedding of images. Towards this end, we add the recently-proposed hyperbolic network layers [11] to the end of several computer vision networks, and present a number of experiments corresponding to image classification, one-shot, and few-shot learning and person re-identification. We show that in many cases, the use of hyperbolic geometry improves the performance over Euclidean or spherical embeddings. + +Our work is inspired by the recent body of works that demonstrate the advantage of learning hyperbolic embeddings for language entities such as taxonomy entries [29], common words [50], phrases [8] and for other NLP tasks, such as neural machine translation [12]. Our results imply that hyperbolic spaces may be as valuable for improving the performance of computer vision systems. + +Motivation for hyperbolic image embeddings. The use of hyperbolic spaces in natural language processing [29, 50, 8] is motivated by the ubiquity of hierarchies in NLP tasks. Hyperbolic spaces are naturally suited to embed hierarchies (e.g., tree graphs) with low distortion [40, 39]. Here, we argue that hierarchical relations between images are common in computer vision tasks (Figure 2): + +- In image retrieval, an overview photograph is related + +to many images that correspond to the close-ups of different distinct details. Likewise, for classification tasks in-the-wild, an image containing the representatives of multiple classes is related to images that contain representatives of the classes in isolation. Embedding a dataset that contains composite images into continuous space is, therefore, similar to embedding a hierarchy. + +- In some tasks, more generic images may correspond to images that contain less information and are therefore more ambiguous. E.g., in face recognition, a blurry and/or low-resolution face image taken from afar can be related to many high-resolution images of faces that clearly belong to distinct people. Again natural embeddings for image datasets that have widely varying image quality/ambiguity calls for retaining such hierarchical structure. + +- Many of the natural hierarchies investigated in natural language processing transcend to the visual domain. E.g., the visual concepts of different animal species may be amenable for hierarchical grouping (e.g. most felines share visual similarity while being visually distinct from pinnipeds). + +Hierarchical relations between images call for the use of Hyperbolic spaces. Indeed, as the volume of hyperbolic spaces expands exponentially, it makes them continuous analogues of trees, in contrast to Euclidean spaces, where the expansion is polynomial. It therefore seems plausible that the exponentially expanding hyperbolic space will be able to capture the underlying hierarchy of visual data. + +In order to build deep learning models which operate on the embeddings to hyperbolic spaces, we capitalize on recent developments [11], which construct the analogues of familiar layers (such as a feed-forward layer, or a multinomial regression layer) in hyperbolic spaces. We show that many standard architectures used for tasks of image classification, and in particular in the few-shot learning setting can be easily modified to operate on hyperbolic embeddings, which in many cases also leads to their improvement. + +The main contributions of our paper are twofold: + +- First, we apply the machinery of hyperbolic neural networks to computer vision tasks. Our experiments with various few-shot learning and person re-identification models and datasets demonstrate that hyperbolic embeddings are beneficial for visual data. +- Second, we propose an approach to evaluate the hyperbolicity of a dataset based on the concept of Gromov $\delta$ -hyperbolicity. It further allows estimating the radius of Poincaré disk for an embedding of a specific dataset and thus can serve as a handy tool for practitioners. + +# 2. Related work + +Hyperbolic language embeddings. Hyperbolic embeddings in the natural language processing field have recently been very successful [29, 30]. They are motivated by the innate ability of hyperbolic spaces to embed hierarchies (e.g., tree graphs) with low distortion [39, 40]. However, due to the discrete nature of data in NLP, such works typically employ Riemannian optimization algorithms in order to learn embeddings of individual words to hyperbolic space. This approach is difficult to extend to visual data, where image representations are typically computed using CNNs. + +Another direction of research, more relevant to the present work, is based on imposing hyperbolic structure on activations of neural networks [11, 12]. However, the proposed architectures were mostly evaluated on various NLP tasks, with correspondingly modified traditional models such as RNNs or Transformers. We find that certain computer vision problems that heavily use image embeddings can benefit from such hyperbolic architectures as well. Concretely, we analyze the following tasks. + +Few-shot learning. The task of few-shot learning is concerned with the overall ability of the model to generalize to unseen data during training. Most of the existing state-of-the-art few-shot learning models are based on metric learning approaches, utilizing the distance between image representations computed by deep neural networks as a measure of similarity [53, 43, 48, 28, 4, 6, 23, 2, 38, 5]. In contrast, other models apply meta-learning to few-shot learning: e.g., MAML by [9], Meta-Learner LSTM by [35], SNAIL by [27]. While these methods employ either Euclidean or spherical geometries (like in [53]), there was no extension to hyperbolic spaces. + +Person re-identification. The task of person re-identification is to match pedestrian images captured by possibly non-overlapping surveillance cameras. Papers [1, 13, 56] adopt the pairwise models that accept pairs of images and output their similarity scores. The resulting similarity scores are used to classify the input pairs as being matching or non-matching. Another popular direction of work includes approaches that aim at learning a mapping of the pedestrian images to the Euclidean descriptor space. Several papers, e.g., [46, 59] use verification loss functions based on the Euclidean distance or cosine similarity. A number of methods utilize a simple classification approach for training [3, 45, 17, 60], and Euclidean distance is used in test time. + +# 3. Reminder on hyperbolic spaces and hyperbolicity estimation. + +Formally, $n$ -dimensional hyperbolic space denoted as $\mathbb{H}^n$ is defined as the homogeneous, simply connected $n$ -dimensional Riemannian manifold of constant negative sec + +tional curvature. The property of constant negative curvature makes it analogous to the ordinary Euclidean sphere (which has constant positive curvature); however, the geometrical properties of the hyperbolic space are very different. It is known that hyperbolic space cannot be isometrically embedded into Euclidean space [18, 24], but there exist several well-studied models of hyperbolic geometry. In every model, a certain subset of Euclidean space is endowed with a hyperbolic metric; however, all these models are isomorphic to each other, and we may easily move from one to another base on where the formulas of interest are easier. We follow the majority of NLP works and use the Poincaré ball model. + +The Poincaré ball model $(\mathbb{D}^n,g^{\mathbb{D}})$ is defined by the manifold $\mathbb{D}^n = \{\mathbf{x}\in \mathbb{R}^n\colon \| \mathbf{x}\| < 1\}$ endowed with the Riemannian metric $g^{\mathbb{D}}(\mathbf{x}) = \lambda_{\mathbf{x}}^{2}g^{E}$ , where $\lambda_{\mathbf{x}} = \frac{2}{1 - \| \mathbf{x} \|^{2}}$ is the conformal factor and $g^{E}$ is the Euclidean metric tensor $g^{E} = \mathbf{I}^{n}$ . In this model the geodesic distance between two points is given by the following expression: + +$$ +d _ {\mathbb {D}} (\mathbf {x}, \mathbf {y}) = \operatorname {a r c c o s h} \left(1 + 2 \frac {\| \mathbf {x} - \mathbf {y} \| ^ {2}}{(1 - \| \mathbf {x} \| ^ {2}) (1 - \| \mathbf {y} \| ^ {2})}\right). \tag {1} +$$ + +![](images/0dd6238040db033cf18ba0cc6693bde44554f743259b6b91d51b3f5ffd232730.jpg) +Figure 3: Visualization of the two-dimensional Poincaré ball. Point $\mathbf{z}$ represents the Möbius sum of points $\mathbf{x}$ and $\mathbf{y}$ . HypAve stands for hyperbolic averaging. Gray lines represent geodesics, curves of shortest length connecting two points. In order to specify the hyperbolic hyperplanes (bottom), used for multiclass logistic regression, one has to provide an origin point $\mathbf{p}$ and a normal vector $\mathbf{a} \in T_{\mathbf{p}}\mathbb{D}^2 \setminus \{\mathbf{0}\}$ . For more details on hyperbolic operations see Section 4. + +In order to define the hyperbolic average, we will make use of the Klein model of hyperbolic space. Similarly to the Poincaré model, it is defined on the set $\mathbb{K}^n = \{\mathbf{x}\in \mathbb{R}^n:\| \mathbf{x}\| < 1\}$ , however, with a different metric, not relevant for further discussion. In Klein coordinates, + +the hyperbolic average (generalizing the usual Euclidean mean) takes the most simple form, and we present the necessary formulas in Section 4. + +From the viewpoint of hyperbolic geometry, all points of Poincaré ball are equivalent. The models that we consider below are, however, hybrid in the sense that most layers use Euclidean operators, such as standard generalized convolutions, while only the final layers operate within the hyperbolic geometry framework. The hybrid nature of our setups makes the origin a special point, since, from the Euclidean viewpoint, the local volumes in Poincaré ball expand exponentially from the origin to the boundary. This leads to the useful tendency of the learned embeddings to place more generic/ambiguous objects closer to the origin while moving more specific objects towards the boundary. The distance to the origin in our models, therefore, provides a natural estimate of uncertainty, that can be used in several ways, as we show below. + +This choice is justified for the following reasons. First, many existing vision architectures are designed to output embeddings in the vicinity of zero (e.g., in the unit ball). Another appealing property of hyperbolic space (assuming the standard Poincaré ball model) is the existence of a reference point – the center of the ball. We show that in image classification which construct embeddings in the Poincaré model of hyperbolic spaces the distance to the center can serve as a measure of confidence of the model — the input images which are more familiar to the model get mapped closer to the boundary, and images which confuse the model (e.g., blurry or noisy images, instances of a previously unseen class) are mapped closer to the center. The geometrical properties of hyperbolic spaces are quite different from the properties of the Euclidean space. For instance, the sum of angles of a geodesic triangle is always less than $\pi$ . These interesting geometrical properties make it possible to construct a "score" which for an arbitrary metric space provides a degree of similarity of this metric space to a hyperbolic space. This score is called $\delta$ -hyperbolicity, and we now discuss it in detail. + +# 3.1. $\delta$ -Hyperbolicity + +Let us start with an illustrative example. The simplest discrete metric space possessing hyperbolic properties is a tree (in the sense of graph theory) endowed with the natural shortest path distance. Note the following property: for any three vertices $a, b, c$ , the geodesic triangle (consisting of geodesics — paths of shortest length connecting each pair) spanned by these vertices (see Figure 4) is slim, which informally means that it has a center (vertex $d$ ) which is contained in every side of the triangle. By relaxing this condition to allow for some slack value $\delta$ and considering so-called $\delta$ -slim triangles, we arrive at the following general definition. + +![](images/ffe0d6f171f42cbd6f4d5842a387f4bd28a6dfb0c868be46959da09eb02596ef.jpg) +Figure 4: Visualization of a geodesic triangle in a tree. Such a tree endowed with a natural shortest path metric is a 0-Hyperbolic space. + +Table 1: Comparison of the theoretical degree of hyperbolicity with the relative delta $\delta_{rel}$ values estimated using Equations (2) and (4). The numbers are given for the two-dimensional Poincaré ball $\mathbb{D}^2$ , the 2D sphere $S_2$ , the upper hemisphere $S_2^+$ , and a (random) tree graph. + +
D2S2+S2Tree
Theory0110
δrel0.18 ± 0.080.86 ± 0.110.97 ± 0.130.0
+ +Table 2: The relative delta $\delta_{rel}$ values calculated for different datasets. For image datasets we measured the Euclidean distance between the features produced by various standard feature extractors pretrained on ImageNet. Values of $\delta_{rel}$ closer to 0 indicate a stronger hyperbolicity of a dataset. Results are averaged across 10 subsamples of size 1000. The standard deviation for all the experiments did not exceed 0.02. + +
EncoderDataset
CIFAR10CIFAR100CUBMiniImageNet
Inception v3 [49]0.250.230.230.21
ResNet34 [14]0.260.250.250.21
VGG19 [42]0.230.220.230.17
+ +Let $X$ be an arbitrary (metric) space endowed with the distance function $d$ . Its $\delta$ -hyperbolicity value then may be computed as follows. We start with the so-called Gromov product for points $x, y, z \in X$ : + +$$ +(y, z) _ {x} = \frac {1}{2} (d (x, y) + d (x, z) - d (y, z)). \tag {2} +$$ + +Then, $\delta$ is defined as the minimal value such that the following four-point condition holds for all points $x,y,z,w\in X$ : + +$$ +(x, z) _ {w} \geq \min ((x, y) _ {w}, (y, z) _ {w}) - \delta . \tag {3} +$$ + +The definition of hyperbolic space in terms of the Gromov product can be seen as saying that the metric relations between any four points are the same as they would be in a tree, up to the additive constant $\delta$ . $\delta$ -Hyperbolicity captures + +the basic common features of "negatively curved" spaces like the classical real-hyperbolic space $\mathbb{D}^n$ and of discrete spaces like trees. + +For practical computations, it suffices to find the $\delta$ value for some fixed point $w = w_0$ as it is independent of $w$ . An efficient way to compute $\delta$ is presented in [10]. Having a set of points, we first compute the matrix $A$ of pairwise Gromov products using Equation (2). After that, the $\delta$ value is simply the largest coefficient in the matrix $(A \otimes A) - A$ , where $\otimes$ denotes the min-max matrix product + +$$ +A \otimes B = \max _ {k} \min \left\{A _ {i k}, B _ {k j} \right\}. \tag {4} +$$ + +Results. In order to verify our hypothesis on hyperbolicity of visual datasets we compute the scale-invariant metric, defined as $\delta_{rel}(X) = \frac{2\delta(X)}{\mathrm{diam}(X)}$ , where $\mathrm{diam}(X)$ denotes the set diameter (maximal pairwise distance). By construction, $\delta_{rel}(X) \in [0,1]$ and specifies how close is a dataset to a hyperbolic space. Due to computational complexities of Equations (2) and (4) we employ the batched version of the algorithm, simply sampling $N$ points from a dataset, and finding the corresponding $\delta_{rel}$ . Results are averaged across multiple runs, and we provide resulting mean and standard deviation. We experiment on a number of toy datasets (such as samples from the standard two-dimensional unit sphere), as well as on a number of popular computer vision datasets. As a natural distance between images, we used the standard Euclidean distance between feature vectors extracted by various CNNs pretrained on the ImageNet (ILSVRC) dataset [7]. Specifically, we consider VGG19 [42], ResNet34 [14] and Inception v3 [49] networks for distance evaluation. While other metrics are possible, we hypothesize that the underlying hierarchical structure (useful for computer vision tasks) of image datasets can be well understood in terms of their deep feature similarity. + +Our results are summarized in Table 2. We observe that the degree of hyperbolicity in image datasets is quite high, as the obtained $\delta_{rel}$ are significantly closer to 0 than to 1 (which would indicate complete non-hyperbolicity). This observation suggests that visual tasks can benefit from hyperbolic representations of images. + +Relation between $\delta$ -hyperbolicity and Poincaré disk radius. It is known [50] that the standard Poincaré ball is $\delta$ -hyperbolic with $\delta_P = \log (1 + \sqrt{2}) \approx 0.88$ . Formally, the diameter of the Poincaré ball is infinite, which yields the $\delta_{rel}$ value of 0. However, from computational point of view we cannot approach the boundary infinitely close. Thus, we can compute the effective value of $\delta_{rel}$ for the Poincaré ball. For the clipping value of $10^{-5}$ , i.e., when we consider only the subset of points with the (Euclidean) norm not exceeding $1 - 10^{-5}$ , the resulting diameter is equal to $\sim 12.204$ . + +This provides the effective $\delta_{rel} \approx 0.144$ . Using this constant we can estimate the radius of Poincaré disk suitable for an embedding of a specific dataset. Suppose that for some dataset $X$ we have found that its $\delta_{rel}$ is equal to $\delta_X$ . Then we can estimate $c(X)$ as follows. + +$$ +c (X) = \left(\frac {0 . 1 4 4}{\delta_ {X}}\right) ^ {2}. \tag {5} +$$ + +For the previously studied datasets, this formula provides an estimate of $c \sim 0.33$ . In our experiments, we found that this value works quite well; however, we found that sometimes adjusting this value (e.g., to 0.05) provides better results, probably because the image representations computed by deep CNNs pretrained on ImageNet may not have been entirely accurate. + +# 4. Hyperbolic operations + +Hyperbolic spaces are not vector spaces in a traditional sense; one cannot use standard operations as summation, multiplication, etc. To remedy this problem, one can utilize the formalism of Möbius gyrovector spaces allowing to generalize many standard operations to hyperbolic spaces. Recently proposed hyperbolic neural networks adopt this formalism to define the hyperbolic versions of feed-forward networks, multinomial logistic regression, and recurrent neural networks [11]. In Appendix A, we discuss these networks and layers in detail, and in this section, we briefly summarize various operations available in the hyperbolic space. Similarly to the paper [11], we use an additional hyperparameter $c$ which modifies the curvature of Poincaré ball; it is then defined as $\mathbb{D}_c^n = \{\mathbf{x} \in \mathbb{R}^n : c\| \mathbf{x}\|^2 < 1, c \geq 0\}$ . The corresponding conformal factor now takes the form $\lambda_{\mathbf{x}}^{c} = \frac{2}{1 - c\|\mathbf{x}\|^2}$ . In practice, the choice of $c$ allows one to balance between hyperbolic and Euclidean geometries, which is made precise by noting that with $c \to 0$ , all the formulas discussed below take their usual Euclidean form. The following operations are the main building blocks of hyperbolic networks. + +Mobius addition. For a pair $\mathbf{x},\mathbf{y}\in \mathbb{D}_c^n$ , the Mobius addition is defined as follows: + +$$ +\mathbf {x} \oplus_ {c} \mathbf {y} := \frac {(1 + 2 c \langle \mathbf {x} , \mathbf {y} \rangle + c \| \mathbf {y} \| ^ {2}) \mathbf {x} + (1 - c \| \mathbf {x} \| ^ {2}) \mathbf {y}}{1 + 2 c \langle \mathbf {x} , \mathbf {y} \rangle + c ^ {2} \| \mathbf {x} \| ^ {2} \| \mathbf {y} \| ^ {2}}. \tag {6} +$$ + +Distance. The induced distance function is defined as + +$$ +d _ {c} (\mathbf {x}, \mathbf {y}) := \frac {2}{\sqrt {c}} \operatorname {a r c t a n h} \left(\sqrt {c} \| - \mathbf {x} \oplus_ {c} \mathbf {y} \|\right). \tag {7} +$$ + +Note that with $c = 1$ one recovers the geodesic distance (1), while with $c\to 0$ we obtain the Euclidean distance $\lim_{c\to 0}d_c(\mathbf{x},\mathbf{y}) = 2\| \mathbf{x} - \mathbf{y}\|$ + +Exponential and logarithmic maps. To perform operations in the hyperbolic space, one first needs to define a bijective map from $\mathbb{R}^n$ to $\mathbb{D}_c^n$ in order to map Euclidean vectors to the hyperbolic space, and vice versa. The so-called exponential and (inverse to it) logarithmic map serves as such a bijection. + +The exponential map $\exp_{\mathbf{x}}^{c}$ is a function from $T_{\mathbf{x}}\mathbb{D}_c^n\cong \mathbb{R}^n$ to $\mathbb{D}_c^n$ , which is given by + +$$ +\exp_ {\mathbf {x}} ^ {c} (\mathbf {v}) := \mathbf {x} \oplus_ {c} \left(\tanh \left(\sqrt {c} \frac {\lambda_ {\mathbf {x}} ^ {c} \| \mathbf {v} \|}{2}\right) \frac {\mathbf {v}}{\sqrt {c} \| \mathbf {v} \|}\right). \tag {8} +$$ + +The inverse logarithmic map is defined as + +$$ +\log_ {\mathbf {x}} ^ {c} (\mathbf {y}) := \frac {2}{\sqrt {c} \lambda_ {\mathbf {x}} ^ {c}} \operatorname {a r c t a n h} (\sqrt {c} \| - \mathbf {x} \oplus_ {c} \mathbf {y} \|) \frac {- \mathbf {x} \oplus_ {c} \mathbf {y}}{\| - \mathbf {x} \oplus_ {c} \mathbf {y} \|}. \tag {9} +$$ + +In practice, we use the maps $\exp_0^c$ and $\log_0^c$ for a transition between the Euclidean and Poincaré ball representations of a vector. + +Hyperbolic averaging. One important operation common in image processing is averaging of feature vectors, used, e.g., in prototypical networks for few-shot learning [43]. In the Euclidean setting this operation takes the form $(\mathbf{x}_1,\ldots ,\mathbf{x}_N)\to \frac{1}{N}\sum_i\mathbf{x}_i$ . Extension of this operation to hyperbolic spaces is called the Einstein midpoint and takes the most simple form in Klein coordinates: + +$$ +\operatorname {H y p A v e} \left(\mathbf {x} _ {1}, \dots , \mathbf {x} _ {N}\right) = \sum_ {i = 1} ^ {N} \gamma_ {i} \mathbf {x} _ {i} / \sum_ {i = 1} ^ {N} \gamma_ {i}, \tag {10} +$$ + +where $\gamma_{i} = \frac{1}{\sqrt{1 - c\|\mathbf{x}_{i}\|^{2}}}$ are the Lorentz factors. Recall from the discussion in Section 3 that the Klein model is supported on the same space as the Poincaré ball; however, the same point has different coordinate representations in these models. Let $\mathbf{x}_{\mathbb{D}}$ and $\mathbf{x}_{\mathbb{K}}$ denote the coordinates of the same point in the Poincaré and Klein models correspondingly. Then the following transition formulas hold. + +$$ +\mathbf {x} _ {\mathbb {D}} = \frac {\mathbf {x} _ {\mathbb {K}}}{1 + \sqrt {1 - c \| \mathbf {x} _ {\mathbb {K}} \| ^ {2}}}, \tag {11} +$$ + +$$ +\mathbf {x} _ {\mathbb {K}} = \frac {2 \mathbf {x} _ {\mathbb {D}}}{1 + c \| \mathbf {x} _ {\mathbb {D}} \| ^ {2}}. \tag {12} +$$ + +Thus, given points in the Poincaré ball, we can first map them to the Klein model, compute the average using Equation (10), and then move it back to the Poincaré model. + +Numerical stability. While implementing most of the formulas described above is straightforward, we employ some tricks to make the training more stable. In particular, to ensure numerical stability, we perform clipping by norm after applying the exponential map, which constrains the norm not to exceed $\frac{1}{\sqrt{c}} (1 - 10^{-3})$ . + +# 5. Experiments + +Experimental setup. We start with a toy experiment supporting our hypothesis that the distance to the center in Poincaré ball indicates a model uncertainty. To do so, we first train a classifier in hyperbolic space on the MNIST dataset [21] and evaluate it on the Omniglot dataset [20]. We then investigate and compare the obtained distributions of distances to the origin of hyperbolic embeddings of the MNIST and Omniglot test sets. + +In our further experiments, we concentrate on the few-shot classification and person re-identification tasks. The experiments on the Omniglot dataset serve as a starting point, and then we move towards more complex datasets. Afterwards, we consider two datasets, namely: MiniImageNet [35] and Caltech-UCSD Birds-200-2011 (CUB) [54]. Finally, we provide the re-identification results for the two popular datasets: Market-1501 [61] and DukeMTMD [36, 62]. Further in this section, we provide a thorough description of each experiment. Our code is available at github1. + +Table 3: Kolmogorov-Smirnov distances between the distributions of distance to the origin of the MNIST and Omniglot datasets embedded into the Poincaré ball with the hyperbolic classifier trained on MNIST, and between the distributions of $p_{\mathrm{max}}$ (maximum probability predicted for a class) for the Euclidean classifier trained on MNIST and evaluated on the same sets. + +
n = 2n = 8n = 16n = 32
dD(x,0)0.8680.8320.8530.859
pmax(x)0.8340.8350.8400.846
+ +# 5.1. Distance to the origin as the measure of uncertainty + +In this subsection, we validate our hypothesis, which claims that if one trains a hyperbolic classifier, then the distance of the Poincaré ball embedding of an image to the origin can serve as a good measure of confidence of a model. We start by training a simple hyperbolic convolutional neural network on the MNIST dataset (we hypothesized that such a simple dataset contains a very basic hierarchy, roughly corresponding to visual ambiguity of images, as demonstrated by a trained network on Figure 1). The output of the last hidden layer was mapped to the Poincaré ball using the exponential map (8) and was followed by the hyperbolic multi-linear regression (MLR) layer [11]. + +After training the model to $\sim 99\%$ test accuracy, we evaluate it on the Omniglot dataset (by resizing its images to $28 \times 28$ and normalizing them to have the same background color as MNIST). We then evaluated the hyperbolic + +![](images/e15c4e410e1303c5bc6b176ba4adaa508d8f38ace7e047fcc45ba97e77986fbb.jpg) +Figure 5: Distributions of the hyperbolic distance to the origin of the MNIST (red) and Omniglot (blue) datasets embedded into the Poincaré ball; parameter $n$ denotes embedding dimension of the model trained for MNIST classification. Most Omniglot instances can be easily identified as out-of-domain based on their distance to the origin. + +distance to the origin of embeddings produced by the network on both datasets. The closest Euclidean analogue to this approach would be comparing distributions of $p_{\mathrm{max}}$ , maximum class probability predicted by the network. For the same range of dimensions, we train ordinary Euclidean classifiers on MNIST and compare these distributions for the same sets. Our findings are summarized in Figure 5 and Table 3. We observe that distances to the origin represent a better indicator of the dataset dissimilarity in three out of four cases. + +We have visualized the learned MNIST and Omniglot embeddings in Figure 1. We observe that more "unclear" images are located near the center, while the images that are easy to classify are located closer to the boundary. + +# 5.2. Few-shot classification + +We hypothesize that a certain class of problems — namely the few-shot classification task can benefit from hyperbolic embeddings, due to the ability of hyperbolic space to accurately reflect even very complex hierarchical relations between data points. In principle, any metric learning approach can be modified to incorporate the hyperbolic embeddings. We decided to focus on the classical approach called prototypical networks (ProtoNets) introduced in [43]. This approach was picked because it is simple in general and simple to convert to hyperbolic geometry. ProtoNets use the so-called prototype representation of a class, which is defined as a mean of the embedded support set of a class. Generalizing this concept to hyperbolic space, we substitute the Euclidean mean operation by HypAve, defined earlier in (10). We show that Hyperbolic ProtoNets can achieve results competitive with many recent state-of-the-art models. Our main experiments are conducted on MiniImageNet and Caltech-UCSD Birds-200-2011 (CUB). Additional experiments on the Omniglot dataset, as well as the implementation details and hyperparameters, are provided in Appendix B. For a visualization of learned embeddings see Appendix C. + +MiniImageNet. MiniImageNet dataset is the subset of ImageNet dataset [37] that contains 100 classes represented + +Table 4: Few-shot classification accuracy results on MiniImageNet on 1-shot 5-way and 5-shot 5-way tasks. All accuracy results are reported with $95\%$ confidence intervals. + +
BaselinesEmbedding Net1-Shot 5-Way5-Shot 5-Way
MatchingNet [53]4 Conv43.56 ± 0.84%55.31 ± 0.73%
MAML [9]4 Conv48.70 ± 1.84%63.11 ± 0.92%
RelationNet [48]4 Conv50.44 ± 0.82%65.32 ± 0.70%
REPTILE [28]4 Conv49.97 ± 0.32%65.99 ± 0.58%
ProtoNet [43]4 Conv49.42 ± 0.78%68.20 ± 0.66%
Baseline* [4]4 Conv41.08 ± 0.70%54.50 ± 0.66%
Spot&learn [6]4 Conv51.03 ± 0.78%67.96 ± 0.71%
DN4 [23]4 Conv51.24 ± 0.74%71.02 ± 0.64%
Hyperbolic ProtoNet4 Conv54.43 ± 0.20%72.67 ± 0.15%
SNAIL [27]ResNet1255.71 ± 0.99%68.88 ± 0.92%
ProtoNet+ [43]ResNet1256.50 ± 0.40%74.2 ± 0.20%
CAML [16]ResNet1259.23 ± 0.99%72.35 ± 0.71%
TPN [25]ResNet1259.46%75.65%
MTL [47]ResNet1261.20 ± 1.8%75.50 ± 0.8%
DN4 [23]ResNet1254.37 ± 0.36%74.44 ± 0.29%
TADAM [32]ResNet1258.50%76.70%
Qiao-WRN [34]Wide-ResNet2859.60 ± 0.41%73.74 ± 0.19%
LEO [38]Wide-ResNet2861.76 ± 0.08%77.59 ± 0.12%
Dis. k-shot [2]ResNet3456.30 ± 0.40%73.90 ± 0.30%
Self-Jig(SVM) [5]ResNet5058.80 ± 1.36%76.71 ± 0.72%
Hyperbolic ProtoNetResNet1859.47 ± 0.20%76.84 ± 0.14%
+ +by 600 examples per class. We use the following split provided in the paper [35]: the training dataset consists of 64 classes, the validation dataset is represented by 16 classes, and the remaining 20 classes serve as the test dataset. We test the models on tasks for 1-shot and 5-shot classifications; the number of query points in each batch always equals to 15. Similarly to [43], the model is trained in the 30-shot regime for the 1-shot task and the 20-shot regime for the 1-shot task. We test our approach with two different backbone CNN models: a commonly used four-block CNN [43, 4] (denoted '4 Conv' in the table) and ResNet18 [14]. To find the best values of hyperparameters, we used the grid search; see Appendix B for the complete list of values. + +Table 4 illustrates the obtained results on the MiniImageNet dataset (alongside other results in the literature). Interestingly, Hyperbolic ProtoNet significantly improves accuracy as compared to the standard ProtoNet, especially in the one-shot setting. We observe that the obtained accuracy values, in many cases, exceed the results obtained by more advanced methods, sometimes + +even in the case of architecture of larger capacity. This partly confirms our hypothesis that hyperbolic geometry indeed allows for more accurate embeddings in the few-shot setting. + +Caltech-UCSD Birds. The CUB dataset consists of 11,788 images of 200 bird species and was designed for fine-grained classification. We use the split introduced in [51]: 100 classes out of 200 were used for training, 50 for validation and 50 for testing. Due to the relative simplicity of the dataset, we consider only the 4-Conv backbone and do not modify the training shot values as was done for the MiniImageNet case. The full list of hyperparameters is provided in Appendix B. + +Our findings are summarized in Table 5. Interestingly, for this dataset, the hyperbolic version of ProtoNet significantly outperforms its Euclidean counterpart (by more than $10\%$ in both settings), and outperforms many other algorithms. + +Table 5: Few-shot classification accuracy results on CUB dataset [55] on 1-shot 5-way task, 5-shot 5-way task. All accuracy results are reported with $95\%$ confidence intervals. For each task, the best-performing method is highlighted. + +
BaselinesEmbedding Net1-Shot 5-Way5-Shot 5-Way
MatchingNet [53]4 Conv61.16 ± 0.8972.86 ± 0.70
MAML [9]4 Conv55.92 ± 0.95%72.09 ± 0.76%
ProtoNet [43]4 Conv51.31 ± 0.91%70.77 ± 0.69%
MACO [15]4 Conv60.76%74.96%
RelationNet [48]4 Conv62.45 ± 0.98%76.11 ± 0.69%
Baseline++ [4]4 Conv60.53 ± 0.83%79.34 ± 0.61%
DN4-DA [23]4 Conv53.15 ± 0.84%81.90 ± 0.60%
Hyperbolic ProtoNet4 Conv64.02 ± 0.24%82.53 ± 0.14%
+ +# 5.3. Person re-identification + +The DukeMTMC-reID dataset [36, 62] contains 16,522 training images of 702 identities, 2,228 query images of 702 identities and 17,661 gallery images. The Market1501 dataset [61] contains 12,936 training images of 751 identities, 3,368 queries of 750 identities and 15,913 gallery images respectively. We report Rank1 of the Cumulative matching Characteristic Curve and Mean Average Precision for both datasets. The results (Table 6) are reported after the 300 training epochs. The experiments were performed with the ResNet50 backbone, and two different learning rate schedulers (see Appendix B for more details). The hyperbolic version generally performs better than the Euclidean baseline, with the advantage being bigger for smaller dimensionality. + +# 6. Discussion and conclusion + +We have investigated the use of hyperbolic spaces for image embeddings. The models that we have considered + +Table 6: Person re-identification results for Market-1501 and DukeMTMC-reID for the classification baseline (Euclidean) and its hyperbolic counterpart (Hyperbolic). (See 5.3 for the details). The results are shown for the three embedding dimensionalities and for two different learning rate schedules. For each dataset and each embedding dimensionality value, the best results are bold, they are all given by the hyperbolic version of classification (either by the schedule sch#1 or sch#2). The second-best results are underlined. + +
Market-1501DukeMTMC-reID
dim, lr scheduleEuclidean r1mAPHyperbolic r1mAPEuclidean r1mAPHyperbolic r1mAP
32, sch#171.449.769.845.956.135.656.534.9
32, sch#268.043.475.951.957.235.762.239.1
64, sch#180.360.383.160.169.948.570.848.6
64, sch#280.557.884.462.768.345.570.748.6
128, sch#186.067.387.868.474.153.376.555.4
128, sch#286.568.586.466.271.551.574.052.2
+ +use Euclidean operations in most layers, and use the exponential map to move from the Euclidean to hyperbolic spaces at the end of the network (akin to the normalization layers that are used to map from the Euclidean space to Euclidean spheres). The approach that we investigate here is thus compatible with existing backbone networks trained in Euclidean geometry. + +At the same time, we have shown that across a number of tasks, in particular in the few-shot image classification, learning hyperbolic embeddings can result in a substantial boost in accuracy. We speculate that the negative curvature of the hyperbolic spaces allows for embeddings that are better conforming to the intrinsic geometry of at least some image manifolds with their hierarchical structure. + +Future work may include several potential modifications of the approach. We have observed that the benefit of hyperbolic embeddings may be substantially bigger in some tasks and datasets than in others. A better understanding of when and why the use of hyperbolic geometry is warranted is therefore needed. Finally, we note that while all hyperbolic geometry models are equivalent in the continuous setting, fixed-precision arithmetic used in real computers breaks this equivalence. In practice, we observed that care should be taken about numeric precision effects. Using other models of hyperbolic geometry may result in a more favourable floating point performance. + +# Acknowledgements + +This work was funded by the Ministry of Science and Education of Russian Federation as a part of Mega Grant Research Project 14.756.31.000. + +# References + +[1] Ejaz Ahmed, Michael J. Jones, and Tim K. Marks. An improved deep learning architecture for person re-identification. In Conf. Computer Vision and Pattern Recognition, CVPR, pages 3908–3916, 2015. 3 +[2] Matthias Bauer, Mateo Rojas-Carulla, Jakub Bartlomiej Swiatkowski, Bernhard Scholkopf, and Richard E Turner. Discriminative k-shot learning using probabilistic models. arXiv preprint arXiv:1706.00326, 2017. 3, 7 +[3] Xiaobin Chang, Timothy M Hospedales, and Tao Xiang. Multi-level factorisation net for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2109-2118, 2018. 3 +[4] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In ICLR, 2019. 3, 7, 8 +[5] Zitian Chen, Yanwei Fu, Kaiyu Chen, and Yu-Gang Jiang. Image block augmentation for one-shot learning. In AAAI, 2019. 3, 7 +[6] Wen-Hsuan Chu, Yu-Jhe Li, Jing-Cheng Chang, and Yu-Chiang Frank Wang. Spot and learn: A maximum-entropy patch sampler for few-shot image classification. In CVPR, pages 6251–6260, 2019. 3, 7 +[7] 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. 5 +[8] Bhuwan Dhingra, Christopher J Shallue, Mohammad Norouzi, Andrew M Dai, and George E Dahl. Embedding text in hyperbolic spaces. arXiv preprint arXiv:1806.04313, 2018. 2 +[9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pages 1126–1135. JMLR, 2017. 3, 7, 8 +[10] Hervé Fournier, Anas Ismail, and Antoine Vigneron. Computing the Gromov hyperbolicity of a discrete metric space. Information Processing Letters, 115(6-8):576-579, 2015. 5 +[11] Octavian Ganea, Gary Bécigneul, and Thomas Hofmann. Hyperbolic neural networks. In Advances in Neural Information Processing Systems, pages 5350-5360, 2018. 2, 3, 5, 6, 12 +[12] Caglar Gulcehre, Misha Denil, Mateusz Malinowski, Ali Razavi, Razvan Pascanu, Karl Moritz Hermann, Peter Battaglia, Victor Bapst, David Raposo, Adam Santoro, and Nando de Freitas. Hyperbolic attention networks. In International Conference on Learning Representations, 2019. 2, 3 + +[13] Yiluan Guo and Ngai-Man Cheung. Efficient and deep person re-identification using multi-level similarity. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2335–2344, 2018. 3 +[14] 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. 4, 5, 7, 13 +[15] Nathan Hilliard, Lawrence Phillips, Scott Howland, Artem Yankov, Courtney D Corley, and Nathan O Hodas. Few-shot learning with metric-agnostic conditional embeddings. arXiv preprint arXiv:1802.04376, 2018.8 +[16] Xiang Jiang, Mohammad Havaei, Farshid Varno, Gabriel Chartrand, Nicolas Chapados, and Stan Matwin. Learning to learn with conditional class dependencies. In ICLR, 2019. 7 +[17] Mahdi M Kalayeh, Emrah Basaran, Muhittin Gökmen, Mustafa E Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1062–1071, 2018. 3 +[18] Dmitri Krioukov, Fragkiskos Papadopoulos, Maksim Kitsak, Amin Vahdat, and Marián Boguná. Hyperbolic geometry of complex networks. Physical Review E, 82(3):036106, 2010. 3 +[19] 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. 1 +[20] Brenden M Lake, Ruslan R Salakhutdinov, and Josh Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in Neural Information Processing Systems, pages 2526-2534, 2013. 6 +[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. 6 +[22] Yann LeCun et al. Generalization and network design strategies. In _Connectionism in perspective_, volume 19. CiteSeer, 1989. 1 +[23] 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. 3, 7, 8 + +[24] Nathan Linial, Avner Magen, and Michael E Saks. Low distortion Euclidean embeddings of trees. *Israel Journal of Mathematics*, 106(1):339–348, 1998. 3 +[25] Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sungju Hwang, and Yi Yang. Learning To Propagate Labels: Transductive Propagation Network For Few-Shot Learning. In ICLR, 2019. 7 +[26] Leland McInnes, John Healy, and James Melville. Umap: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426, 2018. 13, 14 +[27] Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive meta-learner. arXiv preprint arXiv:1707.03141, 2017. 3, 7 +[28] Alex Nichol and John Schulman. Reptile: a scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2, 2018. 3, 7 +[29] Maximillian Nickel and Douwe Kiela. Poincaré embeddings for learning hierarchical representations. In Advances in Neural Information Processing Systems, pages 6338-6347, 2017. 2, 3 +[30] Maximilian Nickel and Douwe Kiela. Learning continuous hierarchies in the Lorentz model of Hyperbolic geometry. In Proc. ICML, pages 3776-3785, 2018. 3 +[31] Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4004–4012, 2016. 1 +[32] Boris Oreshkin, Pau Rodríguez López, and Alexandre Lacoste. Tadam: Task dependent adaptive metric for improved few-shot learning. In NeurIPS, pages 719–729, 2018. 7 +[33] O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In *British Machine Vision Conference*, 2015. 1 +[34] 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. 7 +[35] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. 2016. 3, 6, 7 +[36] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for multi-target, multi-camera tracking. In European Conference on Computer Vision workshop on Benchmarking Multi-Target Tracking, 2016. 6, 8 +[37] 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. International Journal of Computer Vision, 115(3):211-252, 2015. 7 +[38] 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. 3, 7 +[39] Frederic Sala, Chris De Sa, Albert Gu, and Christopher Ré. Representation tradeoffs for hyperbolic embeddings. In International Conference on Machine Learning, pages 4457-4466, 2018. 2, 3 +[40] Rik Sarkar. Low distortion Delaunay embedding of trees in hyperbolic plane. In International Symposium on Graph Drawing, pages 355-366. Springer, 2011. 2, 3 +[41] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 815-823, 2015. 1 +[42] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 4, 5 +[43] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, pages 4077-4087, 2017. 1, 3, 6, 7, 8 +[44] Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In Advances in Neural Information Processing Systems, pages 1857-1865, 2016. 1 +[45] Chi Su, Jianing Li, Shiliang Zhang, Junliang Xing, Wen Gao, and Qi Tian. Pose-driven deep convolutional model for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 3960-3969, 2017. 3 +[46] Yumin Suh, Jingdong Wang, Siyu Tang, Tao Mei, and Kyoung Mu Lee. Part-aligned bilinear representations for person re-identification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 402–419, 2018. 3 +[47] Qianru Sun, Yaoyao Liu, Tat-Seng Chua, and Bernt Schiele. Meta-transfer learning for few-shot learning. In CVPR, pages 403–412, 2019. 7 +[48] 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. 3, 7, 8 +[49] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. + +Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1-9, 2015. 4, 5 +[50] Alexandru Tifrea, Gary Bécigneul, and Octavian-Eugen Ganea. Poincaré GloVe: Hyperbolic word embeddings. arXiv preprint arXiv:1810.06546, 2018. 2, 5 +[51] Eleni Triantafillou, Richard Zemel, and Raquel Urtasun. Few-shot learning through an information retrieval lens. In Advances in Neural Information Processing Systems, pages 2255–2265, 2017. 8 +[52] Evgeniya Ustinova and Victor Lempitsky. Learning deep embeddings with histogram loss. In Advances in Neural Information Processing Systems, pages 4170-4178, 2016. 1 +[53] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NeurIPS, pages 3630-3638, 2016. 1, 3, 7, 8 +[54] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The Caltech-UCSD Birds-200-2011 dataset. 2011. 6 +[55] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. 8 +[56] Yicheng Wang, Zhenzhong Chen, Feng Wu, and Gang Wang. Person re-identification with cascaded pairwise convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1470–1478, 2018. 3 +[57] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In European Conference on Computer Vision, pages 499-515. Springer, 2016. 1 +[58] Chao-Yuan Wu, R Manmatha, Alexander J Smola, and Philipp Krahenbuhl. Sampling matters in deep embedding learning. In Proceedings of the IEEE International Conference on Computer Vision, pages 2840-2848, 2017. 1 +[59] Dong Yi, Zhen Lei, and Stan Z Li. Deep metric learning for practical person re-identification. arXiv preprint arXiv:1407.4979, 2014. 1, 3 +[60] Haiyu Zhao, Maoqing Tian, Shuyang Sun, Jing Shao, Junjie Yan, Shuai Yi, Xiaogang Wang, and Xiaou Tang. Spindle net: Person re-identification with human body region guided feature decomposition and fusion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1077–1085, 2017. 3 + +[61] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Computer Vision, IEEE International Conference on, 2015. 6, 8 +[62] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In Proceedings of the IEEE International Conference on Computer Vision, 2017. 6, 8 \ No newline at end of file diff --git a/hyperbolicimageembeddings/images.zip b/hyperbolicimageembeddings/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..346862d5cd360393e96071b54fd0f20d95dd8c14 --- /dev/null +++ b/hyperbolicimageembeddings/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1b00e9bdc46a5f7dac5ac7f1ef4448de0b8e696ec7a48aa77a3ff50bbee6de6 +size 426743 diff --git a/hyperbolicimageembeddings/layout.json b/hyperbolicimageembeddings/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b6bc4acbfe277e8a74a802b77ba0e1c7b1f4f07f --- /dev/null +++ b/hyperbolicimageembeddings/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:965b1058a60c73a573047b6bce7ece47f564fdafb5f9ebb0c3ed7d7f4ea03214 +size 399967 diff --git a/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_content_list.json b/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..02ab634d1ff761050139835d89b2c3c205e60758 --- /dev/null +++ b/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d50a192c575287ea38e41bb15c31fa23ca04b69ed1d99a8df976471b8c28a29a +size 79515 diff --git a/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_model.json b/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_model.json new file mode 100644 index 0000000000000000000000000000000000000000..de72ca1657c78a32432c9b62cd5f4d45e67f2569 --- /dev/null +++ b/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbd86edd99217e747b5f95187e573f5ebd0e9e4bb5c76d20165a387ac79587f0 +size 95069 diff --git a/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_origin.pdf b/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4c0dfe0835d2b96ecf2ea2af6263979c6769bb51 --- /dev/null +++ b/hyperbolicvisualembeddinglearningforzeroshotrecognition/f56e5cbb-be8b-40e2-be0e-a4832ead8e87_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cf747acb44a34977ddd105f7371873b4a0ef65120470f5bdea4cb8413070bac +size 2300213 diff --git a/hyperbolicvisualembeddinglearningforzeroshotrecognition/full.md b/hyperbolicvisualembeddinglearningforzeroshotrecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..75ae1cb9f96906a7afbb4055ac6bde1c17af2f68 --- /dev/null +++ b/hyperbolicvisualembeddinglearningforzeroshotrecognition/full.md @@ -0,0 +1,309 @@ +# Hyperbolic Visual Embedding Learning for Zero-Shot Recognition + +Shaoteng Liu $^{1,2}$ Jingjing Chen $^{1\dagger}$ Liangming Pan $^{3}$ Chong-Wah Ngo $^{4}$ Tat-Seng Chua $^{3}$ Yu-Gang Jiang $^{1}$ $^{1}$ Shanghai Key Lab of Intelligent Information Processing, School of Computer Science, Fudan University + $^{2}$ Xi'an Jiaotong University $^{3}$ National University of Singapore $^{4}$ City University of Hong Kong + +# Abstract + +This paper proposes a Hyperbolic Visual Embedding Learning Network for zero-shot recognition. The network learns image embeddings in hyperbolic space, which is capable of preserving the hierarchical structure of semantic classes in low dimensions. Comparing with existing zero-shot learning approaches, the network is more robust because the embedding feature in hyperbolic space better represents class hierarchy and thereby avoid misleading resulted from unrelated siblings. Our network outperforms exiting baselines under hierarchical evaluation with an extremely challenging setting, i.e., learning only from 1,000 categories to recognize 20,841 unseen categories. While under flat evaluation, it has competitive performance as state-of-the-art methods but with five times lower embedding dimensions. Our code is publicly available *. + +# 1. Introduction + +Real-world image recognition applications are usually faced with thousands of object classes. Collecting sufficient training data for each class is time-consuming and sometimes infeasible. Therefore, Zero-Shot Learning (ZSL) [34, 35, 9], which aims to recognize the novel categories which are unseen during the training phase, has become an important research problem that needs to study. + +Nevertheless, zero-shot learning is generally regarded as a difficult problem. As reported in [17], for generalized large-scale zero-shot image recognition, the best performance attained on the ImageNet dataset (with 2,2841 class) is less than $10\%$ in terms of top-5 accuracy, which is far away from real-world applications. On the one hand, the class defined in the ImageNet is organized according to the WordNet hierarchy, including both general and fine-grained objects. For example, there are hundreds of species of dogs; distinguishing them with sufficient labeled training data is difficult, not mentioning the situation when the training sample is unavailable. Therefore, learning a model aim + +![](images/0b8444399a784f669af7edc46a60a5417a01882061833f7aa5d2d0c7cf2346fd.jpg) +Figure 1. Given an unseen image from "Arctic Squirrel" (bounded in green), the proposed hyperbolic visual embedding learning networks will tend to predict to its immediate parent class "ground squirrel"(bounded in blue) while existing methods will predict it to its wrong sibling class "rock squirrel". + +ing to predict correct specific classes is not practical under large-scale zero-shot settings. To make ZSL more applicable in real-world applications, we notice that when the ZSL system cannot make a specific prediction targeted to the leaf class, users tend to tolerate a relative general but correct predictions rather than a specific but wrong prediction. For example, Figure 1 shows a part of the class hierarchy in the ImageNet. Given an unseen image of "red squirrel", users may prefer to have the prediction "tree squirrel" rather than "Kangaroo". Besides, making a slightly general but correct prediction makes it convenient to design the user interface for improving the results. Therefore, in this paper, we argue that a robust ZSL system should have the ability to output a correct but less fine-grained label (e.g., the direct parent of the ground-truth label). + +Existing works, however, are not designed to optimize the robustness of the zero-shot recognition systems. Generally, most of the existing works are implicit models that directly learn a mapping from visual space to semantic space [9] [29]. The semantic space are usually represented by semantic vectors, such as word vectors obtained from GloVe [28] or Word2Vec [24] models. As hierarchical relations among categories are not encoded in the semantic space, these models are unlikely to fulfill the robust recognition. More recent works propose to introduce class hierarchy by modeling the hierarchical relation with graph neural net- + +![](images/0ec2ad0ba2f771b1bcaea31f0fa5f21da226e3d3612bf53d2c7b1d5372c085c1.jpg) +Figure 2. The general model framework. For a given image, our model first extracts its visual features using deep ConvNet. The extracted features are then projected to the hyperbolic space via the exponential map and the Möbius transformation to align with the class embeddings, which is learned by combining two kinds of embeddings in the hyperbolic space (Poincaré embeddings and Poincaré Glove). + +work [34] [17]. With graph propagation, the classifier weights of well-trained seen classes are propagated to the unseen ones. Compared to the implicit methods, these models which explicitly utilize the hierarchy structure (explicit models) are more robust and effective. However, as the hierarchical relationship is reflected in the classifier learned in the Euclidean space, it cannot guarantee that the class is closer to its immediate parent node compared to its unrelated siblings. This becomes even harder when the number of unseen classes increases. + +In this paper, we find that hyperbolic space is well-suited to address the aforementioned problems, leading to a more robust ZSL model. Hyperbolic space is a kind of manifold space studied in the Riemannian Geometry, in which basic mathematical operations (e.g., distance measurement) are defined differently from the Euclidean space. It has been shown that Hyperbolic space is particularly suitable for modeling hierarchical data [26, 13]. For example, we can represent a tree with a branching factor of $b$ with a two-dimensional embedding in hyperbolic space such that its structure is reflected in the embeddings. This property enables us to encode the hierarchical structure of classes in low dimensional space, resulting in a light-weight ZSL model. More importantly, in hyperbolic space, a class is closer to its immediate ancestors while distant from its siblings, which perfectly meet our requirements on the robustness. With the image embeddings learned in the hyperbolic space, our model is naturally endowed with robustness. + +Therefore, we propose a novel ZSL framework (shown in Figure 2) that learns the hierarchy-aware image embedding features in the hyperbolic space. In our framework, image labels are projected into the hyperbolic space with Poincaré hierarchy embedding model [26] and Poincaré Glove [33]. Poincaré hierarchy embedding model [26] learns the label embeddings that preserve the hierarchical + +information, while Poincaré Glove [33] captures the semantic information. Meanwhile, image features extracted from DCNN in the Euclidean space are firstly projected into hyperbolic space with the exponential map and then aligned with the corresponding hyperbolic label embeddings through learning a Möbius version transformer network. The objective of the Möbius version transformer network is to minimize the Poincaré distance from image embeddings to their label embeddings in the hyperbolic space. During testing, the label of an unseen image can be obtained by searching the label embeddings that have the minimum Poincaré distance with its image embeddings. The contributions of this work are summarized as follows: + +- We propose the Hyperbolic Visual Embedding Learning Network that learns hierarchical-aware image embeddings in hyperbolic space for ZSL. As far as we know, this is the first attempt to introduce Non-Euclidean Space for zero-shot learning problem. +- We conduct both empirical and analytic studies to demonstrate that introducing hyperbolic space into ZSL problem results in a model that produces more robust predictions. + +# 2. Related Work + +As image recognition systems have achieved near-human accuracy when training samples are ample [15], recent research focus has shifted to the problem of zero-shot image recognition [16, 38, 22, 8, 14, 12, 37], a challenging but more practical setting where the recognition is performed on categories that were unseen during the training. + +Early works on zero-shot learning mostly rely on semantic attributes including both user-defined attributes [18, 19] and data-driven attributes [10, 23], which are automatically + +discovered from visual data. These attributes are then used as the intermediate representations for knowledge transfer across classes, supporting zero-shot recognition of unseen classes. Recent works on zero-shot learning are mostly based on deep learning technologies and basically can be grouped into two major paradigms. The first paradigm is based on semantic embeddings (implicit knowledge) which directly learn a mapping from visual space to semantic space [4, 5, 11, 9, 36, 29, 31], represented by semantic vectors such as word vectors. For example, Socher et al., [32] proposed to learn a linear mapping to align the image embeddings and the label embeddings learned from two different neural networks. Motivated by this work, Frome et al., [9] proposed the DeViSE model to train this mapping using a ConvNet and a transformation layer, which showed that this paradigm can be exploited to make predictions about tens of thousands of unseen image labels. Instead of training a ConvNet to match the image features and the category embeddings, Norouzi et al. [27] proposed to map image features into the semantic embedding space via convex combination, which requires no additional training. + +Instead of representing image categories as semantic embeddings, the second paradigm directly models the relations between categories for zero-shot recognition. For example, Salakhutdinov et al., [30] used WordNet hierarchy structure to share knowledge among different classifiers so that the knowledge of seen categories can be propagated to unseen categories. Knowledge graph are found to be effective to perform this knowledge propagation. Deng et al., [6] applied knowledge graph to organize the attributes relations between objects and use it to propagate knowledge of seen categories to unseen categories. + +Recently, it has been demonstrated in [34] [17] that combining both implicit knowledge and explicit knowledge enables the model to achieve better recognition performance. As illustrated in [34], by leveraging Graph Convolutional Network (GCN) to combine semantic embedding and class hierarchy, it achieves the state-of-the-art results for zero-shot recognition on the ImageNet dataset (e.g. "2-hops","3-hops" and "All"), which almost doubles the performance of the model with only semantic embedding. Similar to [34] and [17], our work also utilizes both semantic embedding and class hierarchy, taking advantages of both implicit knowledge and explicit knowledge for zero-shot recognition. However, different to [34] and [17], our work models the implicit knowledge and explicit knowledge in the hyperbolic space. The explicit knowledge — the WordNet hierarchy is encoded with hierarchical-aware Poincaré embeddings, which better captures the class hierarchy with fewer dimensions. Meanwhile, the semantic embeddings are learned in hyperbolic space with Poincaré GloVe. As hyperbolic space is more suitable for modeling the hierarchical data, which endows our model with better robustness + +than existing models working in the Euclidean Space. + +# 3. Preliminary + +Hyperbolic space is an important concept in hyperbolic geometry, which is considered as a special case in the Riemannian geometry. Before presenting our proposed model, this section introduces the basic information of Riemannian geometry and hyperbolic space. + +# 3.1. Basics of Riemannian Geometry + +Manifolds are the generalization of curved surfaces that are studied in differential geometry. Riemannian geometry is one of the branches of differential geometry that studies with a Riemannian metric. Each point on the manifold can be assigned a curvature. When the curvature is a negative constant, the geometry becomes hyperbolic geometry. For a point $x$ in a manifold $\mathcal{M}$ , one can define the tangent space $T_x\mathcal{M}$ of $\mathcal{M}$ at $x$ as a vector space that contains all possible directions in which one can tangentially pass through. An inner product can be defined on $T_x\mathcal{M}$ . A Riemannian metric $g$ on $\mathcal{M}$ is a collection of inner products $g_x: T_x\mathcal{M} \times T_x\mathcal{M} \to \mathbb{R}$ , $x \in \mathcal{M}$ . A Riemannian manifold $(\mathcal{M}, g)$ is a manifold $\mathcal{M}$ together with a Riemannian metric $g$ . Based on these concepts, we introduce the following definitions: + +- Geodesic is the shortest curve between two points, analogous to a straight line in the Euclidean space. +- Parallel Transport is a way of transporting tangent vectors along smooth curves, such as geodesic, in a manifold, which can be formulated as $P_{x \to y}: T_{x}\mathcal{M} \to T_{y}\mathcal{M}$ . +- Exponential Map is a map from a subset of a tangent space $T_x\mathcal{M}$ of a Riemannian manifold $\mathcal{M}$ at point $x$ to $\mathcal{M}$ itself, which provides a way to project a vector in Euclidean space to hyperbolic space. For any tangent vector $v \in T_0\mathcal{M} \setminus \{\mathbf{0}\}$ , the exponential map $\exp_{\mathbf{0}} \colon T_0\mathcal{M} \to \mathcal{M}$ is formally defined as follows: + +$$ +\exp_ {\mathbf {0}} (v) = \tanh (\| v \|) \frac {v}{\| v \|}, \tag {1} +$$ + +where we choose $\mathbf{0}$ as the reference point. We use exponential map to project image features learned in the Euclidean space to the hyperbolic space, which will be elaborated later. The reverse process of exponential map is the logarithmic map $\log_{\mathbf{0}}(y)\colon \mathcal{M}\to T_{\mathbf{0}}\mathcal{M}$ . Obviously, $\log_0(\exp_0(v)) = v$ + +# 3.2. Poincaré Ball. + +There are 5 common models for hyperbolic space. Among them, the Poincaré ball model and the Lorentz model are most commonly used in machine learning. Similar to [26], we choose Poincaré Ball as the embedding model because its distance function is differentiable and + +it has a relatively simple constraint on the representations. Poincaré ball is a model in which the points are inside a unit ball. It can be defined as a manifold $(\mathbb{D}^n,g^{\mathbb{D}})$ , where $\mathbb{D}^n = \{x\in \mathbb{R}^n\colon \| x\| < 1\}$ is the $n$ -dimensional hyperbolic space within the Poincaré ball. The Riemannian metric of a Poincaré ball is given as: + +$$ +g _ {x} ^ {\mathbb {D}} = \lambda_ {x} ^ {2} g ^ {E}, \text {w h e r e} \lambda_ {x} = \frac {1}{1 - \| x \| ^ {2}} \tag {2} +$$ + +where $g^{E} = I_{n}$ is the Euclidean metric tensor and $x$ is a point on Poincaré ball. The Poincaré distance between two points $(x, y)$ can be induced with the Riemannian metric as follows: + +$$ +d _ {\mathbb {D}} (x, y) = \cosh^ {- 1} (1 + 2 \frac {\| x - y \| ^ {2}}{(1 - \| x \|) (1 - \| y \|)}) \quad (3) +$$ + +Because the Poincaré ball is conformal to the Euclidean space, the definition of angle is the same for these two spaces. Formally, the angle between two vectors $(u,v)$ in the Poincaré ball is defined as: + +$$ +\cos (\angle (u, v)) = \frac {g _ {x} ^ {\mathbb {D}} (u , v)}{\sqrt {g _ {x} ^ {\mathbb {D}} (u , u)} \sqrt {g _ {x} ^ {\mathbb {D}} (v , v)}} \tag {4} +$$ + +# 4. Approach + +The proposed framework aims to learn the embeddings of both images and labels in the hyperbolic space such that the hierarchical information, as well as semantic information, can be well preserved with a few dimensions for zero-shot recognition. As shown in Figure 2, the proposed framework consists of two modules: (1) Hyperbolic Label Embedding Learning, which embeds image labels $\mathcal{C}$ into a Hyperbolic space, denoted as $\mathcal{H}$ , encoding both hierarchical information (via Poincaré Embedding) and semantic information (via Poincaré Glove) among classes; (2) Poincaré Image Feature Embedding learning, which learns the image embeddings in hyperbolic space $\mathcal{H}$ that are nearest to the corresponding poincaré label embeddings. + +# 4.1. Hyperbolic Label Embedding Learning + +For text labels, two hyperbolic embedding models are investigated for embedding learning: Poincaré hierarchy embedding model [26] and Poincaré Glove [33]. The former one learns the hyperbolic word embeddings with WordNet hierarchy [25] while the latter one embeds labels with a hyperbolic version of the GloVe [28]. The final label embeddings are obtained by combining the embeddings learned from both models. + +Poincaré Embedding. Following [26], we embed the WordNet Noun hierarchy into the Poincaré ball. WordNet Noun hierarchy includes 82,115 synsets (nodes) and + +743,241 hypernymy relations (edges). We learn the embeddings for each synset such that the distances of synset pairs are preserved in the Poincaré ball. To this end, we employ a training objective to ensure that the distance between nodes with hypernymy relationship is minimized, while the distance is maximized for nodes without a relationship. Formally, let $\mathcal{E} = \{(u,v)\}$ be the set of observed hypernymy relations between two classes $u,v\in \mathcal{C}$ , we minimize the following objective in the hyperbolic space. + +$$ +\mathcal {L} = - \sum_ {(u, v) \in \mathcal {E}} \log \frac {e ^ {- d _ {\mathbb {D}} (u , v)}}{\sum_ {v ^ {\prime} \in \mathcal {N} (u)} e ^ {- d _ {\mathbb {D}} (u , v ^ {\prime})}} \tag {5} +$$ + +where $\mathcal{N}(u) = \{v\mid (u,v)\notin \mathcal{E}\} \cup \{u\}$ is the set of negative examples for $u$ (including $u$ ). Same to [26], we randomly sample 10 negative examples per positive example during the training. As we train in the hyperbolic space, the distance metric is replaced with the Poincaré distance defined in Equation 3. After training, we obtain the embedding for each WordNet synset that can be mapped to an image class. + +Poincaré GloVe. Besides the hierarchy structure, semantic relations between image classes also play a vital role in ZSL. Semantic information for an image class is often obtained by learning the word embedding of the class label. GloVe [28] is a commonly-used method to learn word embeddings in the Euclidean space based on word co-occurrences in a large text corpus. Semantic relations between words are then reflected by their distances in the embedding space. To capture the semantic relations among image classes, we train a GloVe model in Poincaré ball following the method of [33]. In case when an image class has multiple senses, we only select the first sense in the WordNet synset to learn semantic embedding. The major challenge of training the Poincaré GloVe is that there is no clear definition for inner-product in hyperbolic space. Following [33], we replace the inner-product in the original GloVe loss function with the Poincaré distance defined in Equation 3, resulting in a hyperbolic version of GloVe loss function $J$ as follows. + +$$ +J = \sum_ {i, j = 1} ^ {V} f \left(X _ {i j}\right) \left(- \frac {1}{2} d _ {\mathbb {D}} ^ {2} \left(w _ {i}, \tilde {w} _ {j}\right) + b _ {i} + \tilde {b} _ {j} - \log X _ {i j}\right) ^ {2}, \tag {6} +$$ + +where $V$ is the size of the text corpus, $X_{ij}$ is the number of times that words $i$ and $j$ occur in the same window context, $w_i$ is an embedding of word $i$ , $\tilde{w}_j$ is an embedding of a context word $j$ , and $d_{\mathbb{D}}$ is the Poincaré distance in Equation 3. For the training corpus, we use the English Wikipedia dump with 1.4 billion tokens provided by [21] and [20]. + +Feature Fusion. We concatenate Poincaré embedding $p_c$ and Poincaré GloVe embedding $q_c$ to form the final class embedding $t_c$ in the Poincaré ball. The embedding contains both the structural and semantic information of the class. + +However, although the norms of $p_c$ and $q_c$ are both smaller than 1 (the radius of Poincaré ball), the norm of the concatenated vector $t_c$ may be greater than one, which may move it outside of the Poincaré ball. To address this problem, we use the exponential map to project the vector back to the ball. This gives the final representation of $t_c$ as follows. + +$$ +t _ {c} = \exp_ {\mathbf {0}} ([ p _ {c}; q _ {c} ]) \tag {7} +$$ + +where $\exp_0$ is the exponential map defined in Equation 1. + +# 4.2. Hyperbolic Image Embedding Learning + +ResNet [15] is employed to extract feature $v_{\mathcal{I}}$ from unseen image $\mathcal{I}$ . $v_{\mathcal{I}}$ is a 2,048-dimensional vector in the Euclidean space. The hyperbolic visual feature transform network is proposed to project $v_{\mathcal{I}}$ to the hyperbolic space and align with its class label. The transformation network consists of an exponential map for projecting image features into the hyperbolic space, and a Möbius transformation network for aligning images to labels. + +Exponential Map. Using the exponential map in Equation 1, we first project the image features $v_{\mathcal{I}}$ into the Poincaré Ball. By choosing the Euclidean space as the tangent space of hyperbolic space, Exponential map can project the image features in Euclidean space into the hyperbolic space, as shown below: + +$$ +\tilde {v} _ {\mathcal {I}} = \exp_ {\mathbf {0}} (v _ {\mathcal {I}}) \tag {8} +$$ + +where $\tilde{v}_{\mathcal{I}}$ is the projected image feature of image $\mathcal{I}$ . + +Mobius Transformation. We then train a Möbius transformer to align the projected image features $\tilde{v}_{\mathcal{I}}$ with the corresponding label embeddings $t_{c_{\mathcal{I}}}$ . Our Möbius transformer is essentially a two-layer feed forward neural network implemented in hyperbolic space. For an arbitrary function $f\colon \mathbb{R}^n\to \mathbb{R}^m$ in the Euclidean space, the Möbius version of $f$ is a function that maps from $\mathbb{D}^n$ to $\mathbb{D}^m$ in the hyperbolic space: + +$$ +f ^ {\otimes} (x) = \exp_ {\mathbf {0}} \left(f \left(\log_ {\mathbf {0}} (x)\right)\right) \tag {9} +$$ + +where $\exp_{\mathbf{0}}\colon T_{0_m}\mathbb{D}^m\to \mathbb{D}^m$ and $\log_{\mathbf{0}}\colon \mathbb{D}^n\to T_{0_n}\mathbb{D}^n$ When $M\colon \mathbb{R}^n\to \mathbb{R}^m$ is a linear map and $Mx\neq 0$ , substituting $M$ into Equation 9 obtains the Mobius matrix-vector multiplication $M^{\otimes}(x)$ as follows. + +$$ +M ^ {\otimes} (x) = \tanh (\frac {\| M x \|}{\| x \|} \tanh ^ {- 1} (\| x \|)) \frac {M x}{\| M x \|} \tag {10} +$$ + +Based on Equation 10, we can implement a feed forward layer in hyperbolic space, and our Möbius Transformation is a two-layer network constructed by stacking two feed forward layers. After the Möbius transformation, the projected image features $\tilde{v}_{\mathcal{I}}$ are transformed to image embedding features (denoted as $h_{\mathcal{I}}$ ), which have the same dimension with + +the label embeddings in hyperbolic space. With this, a class label that is nearest to the image feature is assigned. + +Model Training. Rank loss is employed as the loss function for model training, with the objective of minimizing the distance between the image embeddings $h_{\mathcal{I}}$ learned from Möbius transformer and its label embeddings $t_{c_{\mathcal{I}}}$ . As the model is trained in hyperbolic space, we use the Poincaré distance defined in Equation 3 as the distance metric. The input of the loss function is a triplet $\langle h_{\mathcal{I}}, t_{c_{\mathcal{I}}}, t_{c_{\mathcal{I}}}^{-} \rangle$ , in which $t_{c_{\mathcal{I}}}^{-}$ denote a random sample with negative label. Let the margin as $\delta \in (0, +\infty)$ , the loss function is defined as + +$$ +L = \max \left[ 0, \delta + d _ {\mathbb {D}} \left(t _ {c _ {\mathcal {I}}}, h _ {\mathcal {I}}\right) - d _ {\mathbb {D}} \left(t _ {c _ {\mathcal {I}}}, t _ {c _ {\mathcal {I}}} ^ {-}\right) \right]. \tag {11} +$$ + +For optimization, we adopt different optimization tools in hyperbolic space. The training of Poincaré Glove is optimized by RADAGRAD [1]. For Poincaré embedding, RADAGRAD is not suitable as it requires the hyperbolic space to be a product of Riemannian manifolds. Therefore, we train the Poincaré embedding using full Riemannian stochastic gradient descent (RSGD) [2, 13] and set the learning rate to 0.01. + +# 5. Experiment + +# 5.1. Datasets + +The experiments are conducted on ImageNet [7], which is a popular benchmark for ZSL [27, 9, 34, 17]. The benchmark includes 1,000 known classes from the ImageNet 2012 1K dataset. The unseen classes are distributed into three datasets of "2-hops", "3-hops" and "All" concepts from the 1K known concepts based on WordNet hierarchy. For example, the "2-hops" unseen concepts are within 2 hops of known concepts, totaling to 1,589 classes. The "3-hops" dataset has 7,860 classes, while the "All" dataset includes all the 20,841 classes in ImageNet. Note that there is no overlap between the seen and unseen classes in the three datasets. The difficulty of a dataset is proportional to the number of unseen classes. + +We evaluate our model on these three datasets for both the Zero-Shot Learning (ZSL) setting and the Generalized Zero-Shot Learning (GZSL) setting. In ZSL, we only evaluate the model performance on the unseen classes, i.e., the model recognizes which unseen class that a testing sample belongs to. However, in GZSL, we use all classes (the union of seen and unseen classes) as the candidate set to evaluate the model. We name the GZSL setting of the above 3-datasets as: "2-hops + 1K", "3-hops + 1K", and "All + 1K". GZSL is a more challenging setting. We adopt the same train/test split settings as [9, 34]. + +# 5.2. Baselines + +We compare our model against several state-of-the-art ZSL baselines on both ZSL and GZSL settings. The base + +lines are listed as follows. DeViSE [9]: It is a typical implicit knowledge transfer method that linearly maps visual features to the semantic word-embedding space by learning a transformation using the hinge ranking loss. DeViSE*: We enhance the original DeViSE by concatenating hierarchical embeddings of texts with semantic embeddings during joint space learning. The hierarchical embeddings are with the same dimension with concatenating the same dimensional hierarchical embeddings with Poincaré embeddings for a fair comparison, and are learned by using the loss function in [26] which encourages semantically similar objects to be close in the embedding space according to their Euclidean distance.ConSE [27]: ConSE changes the feature transformation of DeViSE to a convex combination of the semantic embeddings from the $T$ -closest seen classes, weighted by the probabilities that the image belongs to the seen classes. SYNC [3]: SYNC is another implicit knowledge transfer method that aligns the semantic space with the visual model by adding a set of phantom object classes, based on which new embedding is derived as a convex combination of these phantom classes. GCNZ [34]: GCNZ leverages both implicit knowledge and explicit knowledge by using Word2vec embeddings to represent class labels and leveraging GCN to model the class relations for unseen class prediction. The Word2vec embeddings are used as the inputs of GCN, and classifier weights of seen classes are transferred to unseen classes during graph propagation. DGP [17]: As an improved version of GCNZ, DGP proposes a dense graph propagation module to alleviate the dilution of knowledge from distant nodes. + +# 5.3. Experimental Settings + +For Poincaré embedding, we use the 100-dimensional vector trained on the transitive closure of the WordNet Noun hierarchy by [26]. For Poincaré Glove, we train a 100-dimensional vector for each image class based on the English Wikipedia dump (containing 1.4 billion tokens) provided by [21] and [20]. At last, we obtain a combined class embedding of 200 dimension. The Möbius feature transformation is trained for 2000 epochs with a learning rate of 0.01 using RSGD [2, 13], with the input as a 2,048-dimensional projected image feature vector and output as a 200-dimensional vector. The margin $\delta$ in Equation 11 is set as 1 through cross-validation. The model is implemented by PyTorch, training on four GTX 1080Ti GPUs. + +# 5.4. Hierarchical Evaluation + +The standard evaluation metric for ZSL is the Top-k Hit Ratio (Hit@k), which measures the percentage of hitting the ground-truth labels among the top- $k$ positions of prediction. However, this metric does not reflect the robustness of a ZSL model. Therefore, we propose a hierarchical evaluation metric that expands the GT label with its immediate + +Table 1. Top-k accuracy for different models on the ImageNet dataset for hierarchical evaluation. The candidates become the categories in "hops" test set and the parent of them. The baseline models are re-implemented by us. For all models, the image features are extracted with ResNet-101. + +
Data SetModelHierarchical precision@k(%)
1251020
2-hops & Their ParentsDeViSE3.25.39.515.621.2
DeViSE*4.57.09.915.622.0
ConSE4.26.812.318.525.1
GCNZ9.215.627.536.844.5
Ours16.624.343.858.670.3
3-hops & Their ParentsDeViSE1.32.13.34.97.3
DeViSE*1.72.64.46.69.3
ConSE1.92.64.47.29.7
GCNZ2.74.68.212.515.1
Ours7.912.521.428.737.5
AllDeViSE0.91.52.94.46.5
DeViSE*1.01.62.94.46.5
ConSE1.52.44.26.59.7
GCNZ2.23.87.210.513.9
Ours5.16.912.916.519.3
+ +parent class. The ability to predict the immediate parent class accurately reflects the robustness of a ZSL model. To illustrate this, Figure 1 shows a part of the class hierarchy in ImageNet. Given an image of "red squirrel", when the model cannot make the correct prediction, a more robust ZSL model should be able to output the second-best prediction, i.e., classifying the image as its parent class "tree squirrel", which is more acceptable than assigning a wrong label from another branch of the hierarchy, such as "Kangaroo". A ZSL system equipped with this ability is more applicable in real-world applications, as a simple UI can be designed to help users select the correct leaf class. + +Under the hierarchical evaluation, given a test image $\mathcal{I}$ whose class label is $c$ (e.g., red squirrel), we set both $c$ and the immediate parent class of $c$ (e.g., tree squirrel) as the ground-truth and evaluate the score of Hit@k. Table 1 lists the performance comparison results. Compared to DeViSE, DeViSE* achieves better performances, showing the advantages of introducing hierarchical embedding in ZSL under the hierarchical evaluation. Besides, it is obvious that our model significantly outperforms all baselines, even triples the performances of DeViSE* and doubles the performance of another strong baseline - GCNZ. The results demonstrate that hyperbolic space can better capture the class hierarchy, resulting in a robust ZSL model that tends to assign a general class (e.g., squirrel) to an unseen image even if it cannot locate its exact specific class (in this case, red squirrel). The superior performance of our method is due to the nature of the class distribution in the hyperbolic space; a class tends to be close to its parent while distant from its sibling in the hyperbolic space. We believe this properly achieved by + +![](images/c19b967a734fb4668a8120f150d94cca8915d3cdfed5984ffaef1f2c62253905.jpg) + +![](images/b87e28a55594833ec32e22752bd3417f4f599f1d7242c0cfcb3adf585d543bb3.jpg) + +![](images/30d15bfc2d461c596ba90be65ded157566a00b187994238012bf2d07a1d93812.jpg) +Figure 3. Qualitative result comparison. The true category is highlighted in bold. The direct parent category of the true category is highlighted in bold and with a “*”. We list the top-5 predictions. + +DeViSE: teddy, orangutan, valley, langur, cliff + +GCNZ: phalanger, red squirrel, kangaroo, lemur, tree wallaby + +Ours: red squirrel, tree squirrel*, squirrel, kangaroo, phalanger + +DeViSE: rugby ball, soccer ball, golf ball, basketball, cricket + +GCNZ: volleyball, basketball, golf ball, punching bag, rugby ball + +Ours: volleyball, ball*, basketball, rugby ball, soccer ball + +DeViSE: bullet train, freight car, school bus, police van, minibus + +GCNZ: mail train, express, passenger train, cargo ship, shuttle bus + +Ours: passenger train, railroad train*, bus, school bus, trolleybus + +hyperbolic embedding is well-suited for a real-world ZSL system. We further show some prediction examples in Figure 3. For an image of "red squirrel", although both GCNZ and our model rank the true label into top-2, our model successfully ranks the direct parent "tree squirrel" into the top-2. For an image of "volleyball", our model successfully ranks the direct parent "ball" into top-2. + +# 5.5. Performance Comparison + +We then conduct the performance comparison on the standard ZSL and GZSL settings, respectively. The results are summarized in Table 2 and Table 3, based on which we have four major observations. + +First, the methods that consider both implicit knowledge and explicit knowledge basically outperform the method with implicit knowledge only. GCNZ, DGP and our method outperform DeViSE, ConSE, and SYNC in terms of all evaluation metrics with a large margin on both ZSL and GZSL settings. In the ZSL setting, when using ResNet-50 for image feature extraction, our model outperforms DeViSE, ConSE, and SYNC by $98.5\%$ , $74.3\%$ and $38.5\%$ in terms of Hit@1, respectively. It is worthwhile to note that compared to DeViSE, DeViSE* that concatenates both hierarchical embeddings and semantic embeddings for joint embedding space learning preforms even worse, which suggests that directly concatenating different types of word embeddings in Euclidean space for may not be the correct way to make use of different types of knowledge. + +Second, our method shows more stable results compared with other implicit methods. For example, when using ResNet-50 for image feature extraction, the performance drop of Hit@1 for DeViSE, ConSE, and SYNC are $74.6\%$ , $71.4\%$ , and $75.9\%$ , when changing the test set from "2-hops" to "3-hops". Our method only suffers from a $51.1\%$ drop in Hit@1. In Section 5.4, we have shown that in the hyperbolic space, a class is close to its parent while distant from its sibling. This makes it hard for our model to misclassify an image to its sibling. However, this error is easy + +Table 2. Top-k accuracy of different methods on ZSL setting. + +
Test SetModelConvNetsFlat Hit@k(%)
1251020
2-hopsDeViSE (us)ResNet-506.711.219.428.138.3
DeViSE* (us)ResNet-506.110.618.827.437.2
ConSE [3]Inception-v18.312.921.830.941.7
ConSE [3]ResNet-507.63----
SYNC [3]Inception-v110.516.728.640.152.0
SYNC [3]ResNet-509.6----
GCNZ [34]ResNet-5019.833.353.265.474.6
DGP [17]ResNet-5026.240.460.271.981.0
OursResNet-5013.320.839.252.762.4
OursResNet-10114.222.140.753.763.2
3-hopsDeViSE (us)ResNet-502.13.56.39.514.1
DeViSE* (us)ResNet-501.93.36.09.113.6
ConSE [3]Inception-v12.64.17.311.116.4
ConSE [3]ResNet-502.18----
SYNC [3]Inception-v12.94.99.214.220.9
SYNC [3]ResNet-502.31----
GCNZ [34]ResNet-504.17.514.220.227.7
DGP [17]ResNet-506.010.418.927.236.9
OursResNet-506.510.618.825.835.2
OursResNet-1017.311.319.626.335.7
AllDeViSE (us)ResNet-501.01.83.04.67.1
DeViSE* (us)ResNet-500.91.72.94.36.8
ConSE [3]Inception-v11.32.13.85.88.7
ConSE [3]ResNet-500.95----
SYNC [3]Inception-v11.42.44.57.110.9
SYNC [3]ResNet-500.98----
GCNZ [34]ResNet-501.83.36.39.112.7
DGP [17]ResNet-502.84.99.113.519.3
OursResNet-503.75.910.313.016.4
OursResNet-1014.26.310.813.316.6
+ +Table 3. Top-k accuracy of different models on GZSL setting. + +
Test SetModelConvNetsFlat Hit@k(%)
1251020
2-hops (+1K)DeViSE (us)ResNet-501.13.18.41523.8
DeViSE* (us)ResNet-501.02.98.214.723.4
ConSE [34]ResNet-500.111.224.329.132.7
GCNZ [34]ResNet-509.720.442.657.068.2
DGP [17]ResNet-5011.927.050.865.175.9
OursResNet-506.411.927.235.345.2
OursResNet-1016.812.227.435.445.2
3-hops (+1K)DeViSE (us)ResNet-500.61.63.86.510.5
DeViSE* (us)ResNet-500.51.53.66.310.2
ConSE [34]ResNet-500.23.27.310.012.2
GCNZ [34]ResNet-502.25.111.918.025.6
DGP [17]ResNet-503.27.116.124.634.6
OursResNet-503.68.715.320.529.1
OursResNet-1013.78.815.320.529.1
All (+1K)DeViSE (us)ResNet-500.30.92.23.65.8
DeViSE* (us)ResNet-500.30.82.03.45.5
ConSE [34]ResNet-500.11.53.54.96.2
GCNZ [34]ResNet-501.02.35.38.111.7
DGP [17]ResNet-501.53.47.812.318.2
OursResNet-502.24.69.212.715.5
OursResNet-1012.34.69.212.715.5
+ +to happen in the Euclidean space, as classes sharing a common ancestor tend to be clustered together. + +Third, compared with state-of-the-arts explicit knowledge transfer methods based on GCN, including GCNZ and DGP, our model has lower performance on "2-hops" test set. However, on "3-hops" and "All", our model achieves comparable results with them, with better Hit@1, Hit@2, and Hit@5 but slightly worse Hit@10 and Hit@20. As + +Table 4. Effect of different hyperbolic label embeddings. Image features are extracted with ResNet-101. The testing is done on unseen categories. + +
Test Set (# Categories)ModelFlat Hit@k(%)
1251020
2-hops (1,589)PH Only12.118.534.446.553.6
PG Only10.615.432.643.151.7
PH + PG14.222.140.753.763.2
3-hops (7,860)PH Only6.29.716.123.531.5
PG Only3.77.313.118.826.3
PH + PG7.311.319.626.335.7
All (20,841)PE Only3.64.68.810.013.7
PG Only2.43.36.58.610.7
PE + PG4.26.310.813.316.6
+ +classifier weights are directly shared among nearby classes, knowledge transfer methods that base on graph propagation tend to perform better when the seen classes and unseen classes are similar. However, their performance is less robust when the unseen classes are dominant in number and also distant from the seen classes (the cases of "3-hops" and "All"). For example, the Hit@1 of DGP drops significantly from 26.2 to 6.0 when changing the dataset from "2-hops" to "3-hops". The main reason could be the dilution of knowledge in long-distance graph propagation. On the contrary, our model performs more stable when it comes to "3-hops" and "All" as our model is based on feature mapping rather than weight propagation within an explicit graph. + +Lastly, the performance drops for all the methods in GZSL as seen classes are mixed in the candidates. Similar results can be observed in this setting. Our model outperforms DeViSE and ConSE on all test sets, while achieving comparable performance with GCNZ and DGP on the "3-hops+1K" and "All+1K" test sets. + +# 5.6. Ablation Study + +We further perform ablation studies to show the effectiveness of combining structural information and semantic information. As shown in Table 4, we evaluate three versions of our model: the model with only Poincaré Hierarchy Embedding (PH Only), the model with only Poincaré GloVe (PG Only), and the model with both $(\mathrm{PH} + \mathrm{PG})$ . It shows that the performances of PH+PG are consistently better than the model using only Poincaré Embedding or only Poincaré GloVe across all test sets. This demonstrates the complementary role of hierarchy information and semantic information in ZSL. We use a specific example to explain how these two embeddings complement each other. Take the images of Red Squirrel (Figure 1) for example, the top-5 predicted labels for Poincaré Embedding are: "Red Squirrel", "Tree Squirrel", "Squirrel", "Tree Wallaby", and "Kangaroo"; while the top-5 predicted labels for Poincaré GloVe are: "Red Squirrel", "Kangaroo", "Tree Wallaby", "Tree Squirrel", and "Lemur". We find that Poincaré Em + +![](images/82eca6447bed256159f44f4781fff8cce42d11ca3eab3bea4cea28d31820f482.jpg) +Figure 4. Performance comparison under different dimensions of semantic embeddings. The testing is performed on "2-hops" set. + +bedding tends to predict the general labels, such as "Tree Squirrel" and "Squirrel", as it mainly captures the class hierarchy. Conversely, Poincaré Glove tends to predict similar and specific labels (e.g., "Kangaroo"), since it models the semantic similarity between different classes. + +# 5.7. Dimension Analysis + +As the volume of hyperbolic space increases exponentially with the radius, the embedding dimension needed to represent the feature embeddings can be much lower than that in Euclidean space. To demonstrate this, we investigate the performance of our model regarding different semantic embedding dimensions. In Figure 4, we compare the performance of our model with DeViSE and ConSE. The Hit@1 on the "2-hops" dataset is reported for different embedding dimensions. As shown in the Figure, when the dimension of the semantic embedding decreases to 10, our model still achieves a satisfactory Hit@1 of 8.3. On the contrary, the performance DeViSE and ConSE, which learns the embeddings in Euclidean space, decreases to 0 as both models cannot converge in training with 10-dimensional semantic embeddings. The results clearly show the advantages of learning embeddings in hyperbolic space. + +# 6. Conclusion + +In this paper, we proposed the Hyperbolic Visual Embedding Learning Networks. As far as we know, this is the first attempt to introduce Non-Euclidean Space for ZSL problem. Furthermore, we conducted both empirical and analytic studies to demonstrate that introducing hyperbolic space into ZSL problem results in a more robust model. Under hierarchical evaluation, our framework outperforms existing baseline methods by a large margin. + +# 7. Acknowledgement + +This research is part of NExT++ research, which is supported by the National Research Foundation, Prime Minister's Office, Singapore under its IRC@SG Funding Initiative. + +# References + +[1] Gary Bécigneul and Octavian-Eugen Ganea. Riemannian adaptive optimization methods. In ICLR, 2019. +[2] Silvere Bonnabel. Stochastic gradient descent on riemannian manifolds. IEEE Transactions on Automatic Control, 58(9):2217-2229, 2013. +[3] Soravit Changpinyo, Wei-Lun Chao, Boqing Gong, and Fei Sha. Synthesized classifiers for zero-shot learning. In CVPR, 2016. +[4] Soravit Changpinyo, Wei-Lun Chao, and Fei Sha. Predicting visual exemplars of unseen classes for zero-shot learning. In ICCV, 2017. +[5] Long Chen, Hanwang Zhang, Jun Xiao, Wei Liu, and Shih-Fu Chang. Zero-shot visual recognition using semantics-preserving adversarial embedding network. In CVPR, 2018. +[6] Jia Deng, Nan Ding, Yangqing Jia, Andrea Frome, Kevin Murphy, Samy Bengio, Yuan Li, Hartmut Neven, and Hartwig Adam. Large-scale object classification using label relation graphs. In ECCV, 2014. +[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. +[8] Zhengming Ding and Hongfu Liu. Marginalized latent semantic encoder for zero-shot learning. In CVPR, 2019. +[9] Andrea Frome, Gregory S. Corrado, Jonathon Shlens, Samy Bengio, Jeffrey Dean, Marc'Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In NIPS, 2013. +[10] Yanwei Fu, Timothy M Hospedales, Tao Xiang, and Shaogang Gong. Attribute learning for understanding unstructured social activity. In ECCV, 2012. +[11] Yanwei Fu and Leonid Sigal. Semi-supervised vocabulary-informed learning. In CVPR, 2016. +[12] Yanwei Fu, Xiaomei Wang, Hanze Dong, Yu-Gang Jiang, Meng Wang, Xiangyang Xue, and Leonid Sigal. Vocabulary-informed zero-shot and open-set learning. IEEE transactions on pattern analysis and machine intelligence, 2019. +[13] Octavian-Eugen Ganea, Gary Bécigneul, and Thomas Hofmann. Hyperbolic entailment cones for learning hierarchical embeddings. In ICML, 2018. +[14] Tristan Hascoet, Yasuo Ariki, and Tetsuya Takiguchi. On zero-shot recognition of generic objects. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9553-9561, 2019. +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[16] He Huang, Changhu Wang, Philip S. Yu, and Chang-Dong Wang. Generative dual adversarial network for generalized zero-shot learning. In CVPR, 2019. +[17] Michael Kampffmeyer, Yinbo Chen, Xiaodan Liang, Hao Wang, Yujia Zhang, and Eric P. Xing. Rethinking knowledge graph propagation for zero-shot learning. In CVPR, 2019. +[18] Christoph H Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In CVPR, 2009. + +[19] Christoph H Lampert, Hannes Nickisch, and Stefan Harmeling. Attribute-based classification for zero-shot visual object categorization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(3):453-465, 2014. +[20] Omer Levy and Yoav Goldberg. Linguistic regularities in sparse and explicit word representations. In CoNLL, 2014. +[21] Omer Levy, Yoav Goldberg, and Ido Dagan. Improving distributional similarity with lessons learned from word embeddings. Transactions of the Association for Computational Linguistics, 3:211-225, 2015. +[22] Jin Li, Xuguang Lan, Yang Liu, Le Wang, and Nanning Zheng. Compressing unknown images with product quantizer for efficient zero-shot classification. In CVPR, 2019. +[23] Jingen Liu, Benjamin Kuipers, and Silvio Savarese. Recognizing human actions by attributes. In CVPR, 2011. +[24] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013. +[25] George A. Miller. Wordnet: A lexical database for english. Communications of the ACM, 38(11):39-41, 1995. +[26] Maximilian Nickel and Douwe Kiela. Poincaré embeddings for learning hierarchical representations. In NIPS, 2017. +[27] Mohammad Norouzi, Tomas Mikolov, Samy Bengio, Yoram Singer, Jonathon Shlens, Andrea Frome, Greg Corrado, and Jeffrey Dean. Zero-shot learning by convex combination of semantic embeddings. In ICLR, 2014. +[28] Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In EMNLP, 2014. +[29] Bernardino Romera-Paredes and Philip Torr. An embarrassingly simple approach to zero-shot learning. In ICML, 2015. +[30] Ruslan Salakhutdinov, Antonio Torralba, and Joshua B. Tenenbaum. Learning to share visual appearance for multiclass object detection. In CVPR, 2011. +[31] Richard Socher, Milind Ganjoo, Christopher D Manning, and Andrew Ng. Zero-shot learning through cross-modal transfer. In NIPS, 2013. +[32] Richard Socher, Milind Ganjoo, Christopher D. Manning, and Andrew Y. Ng. Zero-shot learning through cross-modal transfer. In NIPS, 2013. +[33] Alexandru Tifrea, Gary Bécigneul, and Octavian-Eugen Ganea. Poincare glove: Hyperbolic word embeddings. In ICLR, 2019. +[34] Xiaolong Wang, Yufei Ye, and Abhinav Gupta. Zero-shot recognition via semantic embeddings and knowledge graphs. In CVPR, 2018. +[35] Yongqin Xian, Bernt Schiele, and Zeynep Akata. Zero-shot learning - the good, the bad and the ugly. In CVPR, 2017. +[36] Ziming Zhang and Venkatesh Saligrama. Zero-shot learning via semantic similarity embedding. In ICCV, 2015. +[37] Bo Zhao, Xinwei Sun, Yanwei Fu, Yuan Yao, and Yizhou Wang. Msplit lbi: Realizing feature selection and dense estimation simultaneously in few-shot and zero-shot learning. arXiv preprint arXiv:1806.04360, 2018. +[38] Pengkai Zhu, Hanxiao Wang, and Venkatesh Saligrama. Generalized zero-shot recognition based on visually semantic embedding. In CVPR, 2019. \ No newline at end of file diff --git a/hyperbolicvisualembeddinglearningforzeroshotrecognition/images.zip b/hyperbolicvisualembeddinglearningforzeroshotrecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..21c93396432240dfff9bbd5bfcb229272d2fb1de --- /dev/null +++ b/hyperbolicvisualembeddinglearningforzeroshotrecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8b0b10c42051fe2d564586a8156a4c5e0019f334306bc333d8a4de69b03c32e +size 472965 diff --git a/hyperbolicvisualembeddinglearningforzeroshotrecognition/layout.json b/hyperbolicvisualembeddinglearningforzeroshotrecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b489d3658af40d4c6ac0facf83b8d069d5d69a7d --- /dev/null +++ b/hyperbolicvisualembeddinglearningforzeroshotrecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8938ea7f31c96744e40e6c9c5b99bae31098c24c7e767f632f30027b433c2452 +size 374451 diff --git a/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_content_list.json b/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..46cca9f4a658dab9c940fce88e21943b173cf745 --- /dev/null +++ b/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b612e96d5764eca3dd1fa84d66b0d5c87f3b32be52afe71540f4b133dc10935 +size 81742 diff --git a/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_model.json b/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0b2682f285329add4a19dd97d38e5ec3b8141f4c --- /dev/null +++ b/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5063986f27c4e9f73ce80d734c2ba2568b85f30faea60e326dfea64ea9a715c6 +size 97434 diff --git a/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_origin.pdf b/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1276930b905e3326f0d14ca4b09d3bd3596fa8ab --- /dev/null +++ b/hypergraphattentionnetworksformultimodallearning/3abe9e14-823b-48b9-801b-134d492b3b3f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:184fef51ec50dd5529c4e9e48437f6735a11ab60f583e1eee72e98224b9c96c7 +size 1464216 diff --git a/hypergraphattentionnetworksformultimodallearning/full.md b/hypergraphattentionnetworksformultimodallearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f66ad9e580cca9f345f3b74f32cd10a90e26615f --- /dev/null +++ b/hypergraphattentionnetworksformultimodallearning/full.md @@ -0,0 +1,343 @@ +# Hypergraph Attention Networks for Multimodal Learning + +Eun-Sol $\mathrm{Kim}^{1*,\dagger}$ Woo Young Kang $^{1*}$ Kyoung-Woon On $^{2}$ Yu-Jung Heo $^{2\dagger}$ Byoung-Tak Zhang $^{2,3}$ + +$^{1}$ Kakao Brain + +$^{2}$ Department of Computer Science and Engineering, Seoul National University + +$^{3}$ AI Institute (AIIS), Seoul National University + +# Abstract + +One of the fundamental problems that arise in multimodal learning tasks is the disparity of information levels between different modalities. To resolve this problem, we propose Hypergraph Attention Networks (HANs), which define a common semantic space among the modalities with symbolic graphs and extract a joint representation of the modalities based on a co-attention map constructed in the semantic space. HANs follow the process: constructing the common semantic space with symbolic graphs of each modality, matching the semantics between sub-structures of the symbolic graphs, constructing co-attention maps between the graphs in the semantic space, and integrating the multimodal inputs using the co-attention maps to get the final joint representation. From the qualitative analysis with two Visual Question and Answering datasets, we discover that 1) the alignment of the information levels between the modalities is important, and 2) the symbolic graphs are very powerful ways to represent the information of the low-level signals in alignment. Moreover, HANs dramatically improve the state-of-the-art accuracy on the GQA dataset from $54.6\%$ to $61.88\%$ only using the symbolic information in quantitatively. + +# 1. Introduction + +In this work, we address multimodal learning tasks, which deal with relating information from multiple sources, such as Visual Question and Answering tasks (with image and text), visual captioning (with image and text), and video understanding (with image, text, and sound). As neural network-based methods have been successively used to deal with large-scale unimodal data, such as images, natural lan + +guages, and audio signal inputs, those methods have been applied to multimodal learning. However, there is a severe lack of consideration regarding the adequate form of the input representations of the multimodal data to learn by using the neural network-based methods. + +Most of the previous researches on learning multimodal inputs commonly take the following steps: to make input features of each modality as vector forms after applying pre-trained pre-processing methods, to integrate the multiple input features into a common vector space, and to apply problem-specific modules usually implemented with fully connected neural networks. Specifically, in the integration step, the feature vectors from different modalities are considered as abstracted information on the equivalent level, even though those are obtained from totally different preprocessing steps. In this conventional process, we argue that aligning the information level of heterogeneous modalities is a fundamental problem of multimodal learning and suggest a novel method to bind the modalities in a common semantic level. + +To tackle this problem, we suggest using the symbolic graphs as the common semantic representation for multimodal learning. We define the symbolic graphs as directed graphs which contain nodes and edges, the nodes present semantic units with textual form and edges present the relationship between them. For example, scene graphs [19] can be used as the symbolic graphs for the image modality and dependency trees in natural sentences for the text modality. By extracting the symbolic graphs from each low-level inputs, we can compare the semantics between modalities in the same abstraction level. + +Based on the symbolic graphs which are on the same semantic space, multimodal inputs can be effectively integrated. Here, we suggest a new graph neural net-based algorithm, called Hypergraph Attention Networks (HANs), which exploit the sub-structure of the graph to integrate symbolic information. The main idea of HANs is to construct the co-attention maps between multimodal inputs and to + +integrate the inputs with the co-attention maps. While conventional attention methods usually compare node values independently to make attention maps, HANs consider structural similarity to consider high-level semantic similarity. + +We show the effectiveness of the suggested method with the most popular application in a multimodal learning task, i.e., Visual Question Answering. We demonstrate the performance of HANs on two recent Visual Question Answering (VQA) datasets: VQA2.0 [39] and GQA [11] which focus on real-world visual reasoning and multi-step question answering. From the qualitative analysis of the suggested method with two datasets, we argue that 1) the symbolic graphs are a very powerful way to represent the information of the low-level signals, and 2) to align the information level between modalities is the fundamental problem. Quantitatively, also, the suggested method dramatically improves the state-of-the-art on the GQA dataset from $54.6\%$ to $61.88\%$ only using the symbolic information. + +# 2. Related Work + +In this section, previous works related to structural learning with neural networks and Visual Question Answering (VQA) tasks are summarized. + +# 2.1. Graph Matching Algorithms + +In our knowledge, there are a few studies exactly related to the suggested method, which deal with the problem of integrating multimodal inputs in graph forms. For this reason, instead, we review the studies of learning similarity of graphs and connect it to attention mechanism, which partially related to the suggested method. + +The similarity between the two graphs can be defined by graph Weisfeiler-Lehman isomorphism test [4]. Recently, Xu et al. [34] showed that the representations learned by Graph Neural Networks (GNNs) could be at most as powerful as the Weisfeiler-Lehman graph isomorphism test. That is, the representations with sufficient message passing can be used to determine whether two graphs are isomorphic or not. Based on [34], Li et al. [21] proposed Graph Matching Networks (GMNs) to learn the similarity between two graphs. In GMNs, node representations are updated not only with message passing in each graph but also cross-graph attention mechanism to learn the similarity between two graphs. Because the message passing can capture the dependence of the graph, the cross-graph attention used in GMNs can grasp structural similarity in two graphs. + +# 2.2. Visual Question Answering + +Visual Question Answering (VQA) is one of the representative multimodal learning tasks to answer a textual question about an image scene. The conventional VQA models [1, 36, 16, 17, 23, 6, 38, 15] learn the joint embedding of a pair of the question and the image with two stages. First, it + +learns image features and question embeddings based on pretrained models (e.g., pre-trained CNNs models for an image and Word2Vec models for a question). Second, it combines the learned visual features with question embeddings using a multimodal pooling and an attention mechanism. Kim et al. [17] proposed multi-modal low-rank bilinear pooling (MLB), which approximates bilinear pooling between two input embeddings with efficient computation, by enforcing the rank of the weight tensor to be 1. Yu et al. [38] generalized MLB to Multi-modal Factorized Bilinear Pooling (MFB), as the rank of the weight tensor larger than 1. Bilinear Attention Network (BAN) [15] extends MLB in the respect that it considers bilinear interactions between two input groups, such as multiple feature sets of the question and the image. Also, based on a powerful self-attention mechanism [30], Tan & Bansal proposed a cross-modal Transformer to learn vision-and-language interactions [27]. + +# 2.3. VQA with Graph Structure + +The approaches modeling object interactions through graph representations have been getting a growing interest in the computer vision field. For the VQA task, Teney et al. [28] initially proposed a method combining graph representations of questions and abstract images with Graph Neural Networks (GNNs). Also, the methods to model interactions between objects through implicit and explicit graph structure are proposed for counting problem [40, 29]. High-level semantic information such as attribute and the visual relationship was also exploited with [20, 37, 32, 31] to make the model more powerful and interpretable. Norcliffe-Brown et al. [24] introduced a method to construct a semantic structure in image conditioned on a question. Later, Cadene et al. [5] extend this idea to modeling spatial semantic pairwise relations between all pairs of regions. Recently, a conditional iterative message passing algorithm for VQA and GQA datasets was proposed to learn context-aware node representations conditioned on a given question [9]. Also, Hudson et al. [12] suggested the Neural State Machine (NSM) to address vision and language information on a symbolic level. To solve the GQA task, NSM first predicts a probabilistic scene graph. Then, to answer a given question, they perform sequential reasoning over the graph based on an iterative node traversing algorithm. + +# 3. Hypergraph Attention Networks + +The main purpose of the suggested method is to align information levels between multimodal inputs and to integrate the inputs within the same information level. We define the common semantic space between the modalities with the symbolic graphs. After extracting symbolic graphs of each modality, the semantics between two graphs are compared, and then the co-attention maps are constructed based on the semantic similarities. Then, the joint representation of the + +![](images/1f095357abc6d50814ba4d04dba633b3370a2d922663d67961ce5d2001693dd9.jpg) +Image i + +# Question q + +What color is the thing under the food left of the little girl with the yellow shirt? + +# Answer $\pmb{a}$ + +red + +![](images/247e0a200d670100bf890037a5a4f870acc8a5b104ffcbe13f637b4e8d3ea3fd.jpg) + +![](images/b540eb4e5bb43912add9d798db3087fa91f383d27edc4a243247d9c96341dbdb.jpg) + +![](images/23b555ca1608c266e72570b33473a6187c8e086e75ba6270a9a2563ec9a2dfe1.jpg) + +![](images/f347381e30204ec03f26ef2ddbb33a8d0d2b8bb89760801559d95e0b673ff583.jpg) + +![](images/01ab308f0acbf4f969c420c862bc61fd44f3989559272638314f2efee0512002.jpg) +Figure 1. The overall architecture of the suggested model. For a given pair of image and question, two symbolic graphs are constructed. After constructing the symbolic graphs $G^{i}$ and $G^{q}$ , two hypergraphs $HG^{i}$ and $HG^{q}$ with random-walk based hyperedge are constructed. By comparing the semantics of each hyperedges, a co-attention map $\mathcal{A}$ is constructed. The two hypergraphs are combined by the co-attention map $\mathcal{A}$ , and the final representation $z_{s}$ is used to predict an answer for the given question. + +![](images/f1b6e092c38f0760cd350fefac89f51acbfe9f44fffef00abcb69c9377192e79.jpg) + +multimodal inputs is constructed based on the co-attention maps. + +The suggested method, called Hypergraph Attention Networks (HANs), consists of four components: (1) constructing symbolic graphs, (2) sampling random-walk paths on the symbolic graphs to construct the hypergraphs, (3) matching semantics between hyperedges to construct co-attention maps, and (4) integrating the hypergraphs to get the final representation of the multimodal inputs. The overall architecture of the proposed approach is shown in Figure 1. + +To make clear the further discussion, HANs is explained with a specific multimodal learning task, Visual Question and Answering that has a different level of information in vision modality (image) and language modality (text question). + +# 3.1. Constructing Symbolic Graphs + +The symbolic representations of the two modalities are defined with graph forms. + +For the image modality, symbolic graphs of the images $G^{i} = \{V^{i},E^{i}\}$ are constructed based on the scene graph information [14]. $V^{i}$ is the set of nodes that correspond to words of object labels, attributes, and the relations between the objects. The object labels and attributes represent the name of the object and color, the shape of the object, respectively. In addition, the relationships between two objects are described with predicate phrases, e.g. to the left of. + +From that information, the symbolic graph $G^{i} = (V^{i}, E^{i})$ of an image is defined with a set of nodes $V^{i} = \{v_{1}^{i}, v_{2}^{i}, \dots, v_{S}^{i}\}$ correspond to the set of words for labels, attributes, and predicates. Furthermore, the set of edges $E^{i}$ are defined as following rules: (1) if a object node $v_{j}^{i}$ has an attribute $v_{k}^{i}$ , then $(j, k) \in E^{i}$ , (2) if two objects $v_{j}^{i}$ and $v_{k}^{i}$ have a relationship $v_{l}^{i}$ , then $(j, l) \in E^{i}$ and $(l, k) \in E^{i}$ . The reason to make edge-labeled scene graphs flat is to align the structure between $G^{q}$ and $G^{i}$ . + +For the text modality, we obtain the dependency tree of the question sentence by using the Spacy library1. The symbolic representation of the question $G^{q} = \{V^{q}, E^{q}\}$ consists of the set of tokens $(V^{q})$ and the dependency between the tokens $(E^{q})$ . In detail, $(i,j) \in E^{q}$ if $v_{i}^{q}$ and $v_{j}^{q}$ has the dependency. + +As both $V^i$ and $V^q$ correspond to word representations, we consider two symbolic graphs are in the common (same) information level. + +# 3.2. Constructing the Hypergraphs + +After building two symbolic graphs $G^q$ and $G^i$ , the coattention map $\mathcal{A}$ is constructed by matching semantics of their sub-graphs. As the sub-graph matching problem is one of the NP-hard problems, we suggest a simple but very + +powerful approximate algorithm, HANs. We consider each hyperedge (a sequence of nodes sampled by random-walk algorithm along with directed edges) as a sub-graph, so $\mathcal{A}$ is constructed by calculating the similarity between the hyperedges from the $G^{i}$ and $G^{q}$ . + +From $G^q$ and $G^i$ , two probability distributions are defined to construct the hypergraphs. The initial probability that a node $v_i$ will be selected is defined with, + +$$ +P _ {v _ {i}} ^ {0} = \frac {d e g ^ {+} (v _ {i}) + \epsilon}{\sum_ {j = 1} ^ {N} d e g ^ {+} (v _ {j})} +$$ + +where $N$ and $\deg^{+}(v_{i})$ represent the number of total nodes and out-going edges from node $v_{i}$ , respectively. In addition, the transition probability for both $P^q$ and $P^i$ is defined with, + +$$ +P _ {v, u} = \left\{ \begin{array}{l l} \frac {1 - \epsilon}{d e g ^ {+} (v)}, & \text {i f} (v, u) \in E \\ \epsilon , & \text {i f} (v, u) \notin E \end{array} \right. +$$ + +where $v$ and $u$ are arbitrary nodes of a graph. + +Along with $P^q$ and $P^i$ , $S^q$ and $S^i$ random work steps for $G^q$ and $G^i$ are conducted. In other words, a random-walk path is defined by a transition sequence $v_0 \to v_1 \to \ldots \to v_k$ , which starts from a random node $v_0 \in \text{sample}(P^0)$ and samples $k$ nodes to transition to next node as $v_{i+1} := \text{sample}(P_{v_i})$ . + +Now, the nodes in a random-walk path are connected in a hyperedge, and then two hypergraphs $HG^{i} = (V^{i}, M^{i})$ and $HG^{q} = (V^{q}, M^{q})$ can be obtained, where a $m^{i} \in M^{i}$ corresponds to $v_{0}^{i} \to v_{1}^{i} \to \ldots \to v_{k}^{i}$ . + +# 3.3. Building Co-attention Maps between Hypergraphs + +Now, the sub-graph matching problem to get the coattention map is approximated with the method which matches the semantics between the hyperedges. In this section, we define the semantics of each hyperedge $M$ and explain the method to compare the semantics between the hyperedges. + +As each node $v$ represents a symbol in word level, the semantic of each hyperedge $M$ can be defined by combining the word representations within the same hyperedge. We suggest a simple but powerful way to define the semantics by using pre-defined word vectors, such as GloVe [25]. + +$$ +y (m) := f \left(g _ {0}, g _ {1}, \dots , g _ {k}\right) \tag {1} +$$ + +where $g \in \mathbb{R}^{300}$ represents a 300 dimensional GloVe vector [25] of a node $v$ . A simple mean function is used for $f$ , so $y(m)$ can be represented with a real-valued vector in $\mathbb{R}^{300}$ . + +Now, the co-attention map $\mathcal{A}$ is built by measuring similarities between semantics of two hyperedges $y(m^{i})$ and $y(m^{q})$ . For the similarity measure, the low-rank bilinear pooling method is used as follows. + +$$ +\mathcal {A} = \operatorname {s o f t m a x} \left(W \circ \left(Y _ {q} W _ {q}\right) \left(Y _ {i} W _ {i}\right) ^ {\top}\right) \tag {2} +$$ + +where $Y_{q} \in \mathbb{R}^{N^{q} \times 300}$ , $Y_{i} \in \mathbb{R}^{N^{i} \times 300}$ represent $k$ -step hyperedges sampled from a dependency tree and a scene graph. $W_{q}, W_{i} \in \mathbb{R}^{300 \times h}$ and $W \in \mathbb{R}^{N^{q} \times N^{i}}$ represent linear mappings which are all learnable parameters. + +Here, the co-attention map has two interesting characteristics. First, the co-attention map $\mathcal{A}$ is based on comparing the semantics with the symbolic representations, while previous works on the neural representations having different information levels. Second, the suggested method considers not only unitary relationships between two nodes, but also the inherent structures by constructing the hypergraphs, while most of the previous researches on the graph matching compare the (neural) representations between two nodes. + +Furthermore, in terms of the semantics of the hyperedges $y(m)$ , we can consider utilizing the structural information of the symbolic graphs. To get the informative node representations by considering the information of neighboring nodes, message passing based Graph Neural Network (GNN) [7] is designed2. + +For the node feature matrix with GloVe vector $X \in \mathbb{R}^{S \times d}$ , where $S$ is the number of nodes and $d$ is the dimension of GloVe vector, the new node feature matrix $X_{new} \in \mathbb{R}^{S \times d}$ can be obtained as follows: + +$$ +\begin{array}{l} Z _ {\text {i n}} = \sigma \left(D _ {i n} ^ {- 1} A X W _ {\text {i n}} + X W _ {\text {i n}}\right) \\ Z _ {\text {o u t}} = \sigma \left(D _ {\text {o u t}} ^ {- 1} A ^ {\top} X W _ {\text {o u t}} + X W _ {\text {o u t}}\right) \tag {3} \\ X _ {n e w} = \sigma \left(\left(Z _ {\text {i n}} \circ Z _ {\text {o u t}}\right) W _ {\text {m r g}}\right) \\ \end{array} +$$ + +where $A \in \{0,1\}^{S \times S}$ is an adjacency matrix corresponding to $E$ , i.e., $A_{i,j} = 1$ if $(i,j) \in E$ and $A_{i,j} = 0$ otherwise. $D_{in}, D_{out} \in \mathbb{R}^{N \times N}$ are indegree, outdegree (diagonal) matrix of $A$ , respectively. All $W_{in}, W_{out}, W_{msg}$ are learnable parameters. Also, $\circ$ is the element-wise multiplication. We also employ a residual connection [8] followed by layer normalization [3]. Now, $y(m)$ can be newly defined with $X_{new}$ . In Tabel 1, the effectiveness of using $X_{new}$ will be analysed. + +# 3.4. Getting Final Representations + +As the equation (2) provides the co-attention matrix $\mathcal{A} \in \mathbb{R}^{N^q \times N^i}$ , we can integrate two hypergraphs $HG^i = (V^i, M^i)$ and $HG^q = (V^q, M^q)$ using any bilinear operator $B$ , such as BAN [15] or MFB [38]. + +Formally, a final representation $\mathbf{z}_s$ for integrating $G^q$ and $G^i$ is inferred by applying a bilinear operator $B$ to $Y_{q} \in \mathbb{R}^{N^{q} \times 300}$ , $Y_{i} \in \mathbb{R}^{N^{i} \times 300}$ and $\mathcal{A} \in \mathbb{R}^{N^{q} \times N^{i}}$ . If we choose BAN as $U_{q}, U_{i} \in \mathbb{R}^{300 \times h}$ , $\mathbf{z}_s$ can be represented as follows: + +$$ +\mathbf {z} _ {s} = \left(Y _ {q} U _ {q}\right) ^ {\top} \mathcal {A} \left(Y _ {i} U _ {i}\right) \tag {4} +$$ + +Then, $\mathbf{z}_s$ is used to predict an answer word with a fully connected layer. + +One thing that should be noted is that the integration of the image and the question sentence is only through indirect means, soft co-attention maps. Consequently, the interaction between these two modalities is mediated through probability distributions only. + +# 3.5. Merging Visual Features + +In addition to the integration of the symbolic level information discussed at Section 3.4, here we show a simple way to utilize given visual features with the integrated symbolic features. Firstly, we define the visual feature for each object in an image as $V_{i} \in \mathbb{R}^{N^{v} \times d}$ . In this work, the visual features for each object are extracted from the pre-trained BUTD model [1]. Then, we project the $V_{i}$ and $Y_{q}$ onto same dimensional space using two one-layered fully connect layers. Now, we get $\hat{Y}_{q} \in \mathbb{R}^{N^{q} \times \hat{d}}$ and $\hat{V}_{i} \in \mathbb{R}^{N^{v} \times \hat{d}}$ . Next, co-attention map $\mathcal{A}^*$ for $\hat{Y}_{q}$ and $\hat{V}_{i}$ can be predicted by using equation (2) and the visual-semantic feature $\mathbf{z}_v$ can be represented as follows: + +$$ +\mathbf {z} _ {v} = \left(\hat {Y} _ {q} \hat {U} _ {q}\right) ^ {\top} \mathcal {A} ^ {*} \left(\hat {V} _ {i} \hat {U} _ {i}\right) \tag {5} +$$ + +where $\hat{U}_q, \hat{U}_i \in \mathbb{R}^{\hat{d} \times h}$ . Finally, we combine the $\mathbf{z}_s$ and $\mathbf{z}_v$ by using two blocks of MRN [16] and the final output is used to predict an answer word with a fully connected layer. + +# 4. Experimental Results + +# 4.1. Two Visual Question Answering Datasets + +In this work, two kinds of VQA dataset are used for experiments, which are Graph Question Answering (GQA, [11]) and VQA v2 [2, 39]. + +GQA dataset [11] is a new question and answering dataset featuring compositional questions over real-world images, with more than 110K images and 22M questions. Each question is associated with a structured representation of its semantics and a functional program that specifies the reasoning steps has to be taken to answer it. Each image is associated with a scene graph of the image's objects, attributes, and predicates. 1,740 objects, 620 attributes, and 330 predicate labels are defined as a semantic ontology for GQA. Each image contains 16.4 distinct objects, and each object has 0.54 attributes and 3.08 relationships on average. The dataset is split up roughly into proportions of $87\%$ , $12\%$ , $1\%$ for train, validation, and test-dev sets, respectively. All scene graph annotations on the training and validation sets are publicly available. + +The VQA v2 [2, 39] contains 204,721 natural images from COCO and 1,105,904 free-form questions obtained by crowdsourcing. Each question in the dataset is associated with 10 different answers. Accuracy on this dataset (VQA + +score) is computed so as to be robust to inter-human variability as $acc(a) = \min\{\frac{\text{the number of times a is chosen}}{3}, 1\}$ . The dataset is split up roughly into proportions of $40\%$ , $20\%$ , $40\%$ for train, validation, and test sets, respectively, and we report the VQA score on the validation split as the experimental results in Section 4.4. + +# 4.1.1 Data Preprocessing + +Question and Image features We consider pairs of a question sentence and an image as inputs and the pairs are transformed into symbolic representations as preprocessing steps. As the symbolic representation of each question, a dependency tree is constructed by using the Spacy library. Each token from dependency parsing is mapped into 300-dimensional pre-trained GloVe word embeddings [25] and the dependencies between the tokens are represented by a directed adjacency matrix. + +For image modality, scene graphs are used as a symbolic representation. Originally, the scene graph [19] consists of three components, which are the objects (names), their attributes, and the relations between the objects. In terms of graph notations, object names and the attributes are represented by nodes, and relations are annotated at edges between the corresponding nodes. In this paper, to make graph structures of two modalities be equal, all three components are represented by nodes, and the edges have only binary value. + +Scene Graph Generation (SGG) The scene graph annotations for images are partially provided for the train and validation split of GQA. For the images of GQA test-dev and all splits of VQA, we generated scene graphs as follows. + +Following the works [1], bounding boxes of objects in images are detected by the Faster R-CNN method, and the name and attributes of the objects are predicted based on the ResNet-101 features from the detected bounding boxes. We keep up to 100 objects with a confidence threshold of 0.3 and predict the relations between the objects from the frequency prior knowledge which is constructed from the GQA scene graphs3. + +Answer Vocabulary For the GQA dataset, we extract 1,853 possible answers vocabulary words from the train and validation sets. GQA dataset tightly controls the answer distribution by generating questions using question program. For the VQA task, following previous studies in VQA, we consider the 2,000 most common answers in the training dataset as possible answer vocabulary for our network to predict. + +![](images/9fdd8c085df4d6b7dab6f2d7364f401fb6cdbfdb66f7e8f5657bcedb48e5e9a7.jpg) +Figure 2. Test-dev accuracies with various hyper-parameter combinations. Left: Test-dev accuracy with various number of image hyperedges when the number of hyperedges for questions are fixed to 50. Middle: Accuracy with various number of steps $(k)$ of image hyperedges with three-step question hyperedges. Right: Accuracy with various number of steps $(k)$ of question hyperedges with three step image hyperedges. + +![](images/8b355f51119f2f32503466b04619bcc321fef5394add86a773f79d810d807890.jpg) + +![](images/a71b64a45f00740de6461b11016a6629b61cd78def2f698bac245a72594c14f1.jpg) + +Table 1. As a plug-in module for the attention (Att.), HANs are combined with state-of-the-arts VQA algorithms, BAN [15] and MFB [38]. Those are used as bilinear module $B$ . For the most of the metrics, HANs improves the GQA performance. For the distribution (Dist.) metric, the lower score, the better. + +
MethodPerformance Measures with Test-dev Split
No.FeatureHEAtt.BBinaryOpenPlaus.Valid.Dist.Overall Acc.
1SymbolNoNoMFB [38]60.0247.2481.8695.090.7453.22
2SymbolYesHANMFB [38]61.7047.4981.8395.020.6854.14
3SymbolNoNoBAN [15]60.2750.0682.8095.940.8654.84
4SymbolYesHANBAN [15]65.8958.3683.3996.500.4961.88
5ImageNoNoMAC [10]71.2338.9184.4896.165.3454.06
6ImageNoNoBAN [15]76.0040.4185.5896.1610.5257.10
7ImageNoNoNSM [12]78.9449.2584.2896.413.7163.17
8Symbol+ImageYes+GNNHANBAN [15]71.8763.0382.9595.792.4969.46
+ +# 4.2. Implementation details + +For the GQA, we firstly project the $Y_{i}$ , $Y_{q}$ , and $V_{i}$ onto 256-dimensional space with a single fully-connected layer, respectively. Then, we use BAN based on a concatenated 8 glimpses setting to get 2048 dimensional feature vectors for $\mathbf{z}_s$ and $\mathbf{z}_v$ . After that, for the Symbol+Image experiment described at Table 1, we stack 2 MRN blocks. Each block has two fully connected layers with Batch Normalization [13] and hyperbolic tangent activation functions. After each block, we apply Dropout [26] with 0.2 and 0.5 probabilities, respectively. Finally, one fully-connected layer is used for classification. For training, we use Adam [18] optimizer with initial learning rate 3e-4 and the exponential learning rate scheduler with gamma 0.9. Using these settings, we totally run 30 epochs and report the best result. + +For the VQA 2.0, we firstly project the $Y_{i}$ , $Y_{q}$ , and $V_{i}$ onto 1024 dimensional space with a single fully-connected layer, respectively. Then, we use 8 glimpses BAN with residual summations of the glimpses. Thus, we get 1024 dimensional + +feature vectors $\mathbf{z}_s$ and $\mathbf{z}_v$ . Instead of using MRN for fusing the $\mathbf{z}_s$ and $\mathbf{z}_v$ , it was enough to concatenate them. Finally, one fully-connected layer is used for classification. For training, we use the Adamax [18] optimizer with initial learning rate 1e-3. We decrease the learning rate by a factor of 4 per 2 epochs after the initial 10 epochs. Using these settings, we totally run 30 epochs and report the best result. + +# 4.3. Quantitative Results on GQA + +For the GQA evaluation metric, we report top-1 accuracy on the test-dev split. Furthermore, new metrics proposed in [11] such as plausibility, validity, and distribution measures are also applied to complement the accuracy metric4. + +We compare HANs against state-of-the-art methods to evaluate the effectiveness. HANs show consistent improvement over all state-of-the-arts methods previously suggested. + +For the bilinear operator $B$ explained in Section 3.4, two + +![](images/bbd5399fa4b75a55bfbd3ac8e14d25b3bd20d6a88e602e67b06130a392b9716f.jpg) +Q: Who is sitting on the bench? A: girl + +
Hyperedge on QuestionHyperedge on ImageAtt. Val.
Who – sittingbench – sitting on – girl0.9929
sitting on – benchbench – sitting on – girl0.7127
on – the benchTeddy bear – brown0.4580
+ +![](images/536dc8d5c76b6d5e22a8d4b49bb1d393f40f6dc81a75cff61437aa086f44e464.jpg) +Q: What kind of animal holds the stick? A: elephant + +
Hyperedge on QuestionHyperedge on ImageAtt. Val
of - animalstanding - elephant0.9725
hold - the - stickpole - metal0.8017
what - kind - holdspole - metal0.6573
+ +![](images/26208c649b97af1cdd1d9feab5aa9e2611ed1eab9061c4826a70cdd68f28b63b.jpg) +Q: Is he wearing glasses? A: Yes + +
Hyperedge on QuestionHyperedge on ImageAtt. Val.
he - wearingman - wearing - glasses0.9177
wearing - glassesglasses - black0.8668
he - wearingjacket - leather0.8422
+ +![](images/906a52803a9b4f059499b71fc36befefca048b0c952cf22aadddf676ada50270.jpg) +Q: Who is sitting in the forest? A: woman + +
Hyperedge on QuestionHyperedge on ImageAtt. Val.
who - sittingwoman - in front of - forest0.8248
who - sittingwoman - sitting in - chair0.5531
the - forestchair - brown0.5224
+ +![](images/4045522c400319e693cd2aad5b7b5f2403de847a98ae9ee5e7516a7439ebe286.jpg) +Q: what color is the sweater that the girl is wearing? A: gray + +
Hyperedge on QuestionHyperedge on ImageAtt. Val.
what - colorpillow - green0.7478
sweater - that - wearingsweater - gray0.6568
what - colorsweater - gray0.6444
+ +![](images/4154a7367c092cc9f9168eb62e48b70d91a0f811ef7558ff3ac86e0a0279f218.jpg) +Q: Do you see either buses or vehicles in this photograph? A: No +Figure 3. The visualization for co-attention maps $\mathcal{A}$ of HANs with six examples. Among the all pairs of images and question hyperedges, three hyperedge pairs with top-3 attention-value are presented. The question is shown on the top of the image and the hyperedge pairs are on the bottom. Corresponding regions attended by HANs are represented on the image. + +
Hyperedge on QuestionHyperedge on ImageAtt. Val.
buses - vehiclesboat - white0.7447
Buses - vehiclesbuilding - to the right of - brick0.7431
the - forestchair - brown0.4954
+ +state-of-the-arts methods on VQA tasks are used, which are BAN[15] and MFB [38]. From the comparison between experiments from No.1 to 4 in Table 1, we can argue that the co-attention maps $\mathcal{A}$ learned by HANs are very effective in this task. The reason might be that BAN considers the co-attention for every pair of two modalities (random-walk-based hyperedges in our case) while, MFB fuses the two modalities based on the Hadamard product of two compressed feature vectors followed by projection with low-rank matrices. As the GQA dataset requires a model to capture multiple facts for answering a given question, BAN architecture was more effective than MFB in this problem. For a reason, we think that any pair-wise bilinear attention method will show significant improvement when combined with HANs. + +In experiments 5, 6, and 7, we summarized the state-of-the-art accuracy of the GQA dataset. Those methods utilized image features, not using symbolic representations. MAC network [10] is the baseline method, which is suggested by the authors of the GQA dataset. As the benchmark performance, accuracy with BAN [15] is also provided in the leaderboard5. One thing that should be noted is that the results in the leaderboard are based on all datasets, but our results in Table 1 only use the balanced set. + +Effects of the Symbolic Representations We compare HANs' performance (just use the symbolic graphs) with the conventional VQA methods which use the image features. From the experimental results Table 1, we confirm that symbolic representations are very crucial. + +Hyper-parameter Search First of all, we analyze the characteristics of HANs with various hyper-parameter combinations. The test-dev accuracy with varying three parameters, which are the number of hyperedges, the number of random-walk steps $(k)$ of question graphs, and the number of random-walk steps $(k)$ of image graphs, are summarized in Figure 2. + +The hyperedges can be thought of as sub-structures of the given graphs. Therefore, HANs with a large number of hyperedges are closer to the exact sub-graph matching problem. From Figure 2, we could check this point with the fact that the more sampling hyperedges, the better test-dev accuracy. + +The critical characteristic of HANs is to integrate multimodal symbolic graphs by comparing the semantics of their sub-structures, while most of the existing approaches use the similarity of only node features. We use the random-walk algorithm to approximate sub-structures of the graph. We define a single random-walk path as a hyperedge and a hypergraph as the set of the random-walk paths. By comparing the semantics between two hypergraphs, the sub-graph matching + +problem can be efficiently resolved. Here, the semantics of a hyperedge is defined by a simple average function of node feature vectors. It is worthwhile to note that because the random-walk paths are relatively short, the simple average function was enough, and we empirically found that it performs well compared with other options (such as summation, maximization, or more complicated functions). + +# 4.4. Quantitative Results on VQA + +In this section, we show the comparative results on VQA v2 dataset. Similar to section 4.2, we show the effectiveness of HANs with BAN. For this experiment, VQA scores on the validation set are reported as the accuracies. + +Table 2. VQA scores on validation set for VQA v2 dataset are summarized. Likewise the GQA task, HANs combined with BAN improves VQA performance. Here, we report both reported and reproduced results of BAN to validate the effectiveness of HANs without any additional module. + +
No.Use HEMethodAcc.
9NoBottom-Up [1]63.37
10NoMFH [38]64.31
11NoBAN [15] (reported)66.04
12NoBAN [15] (reproduced)64.85
13YesHAN (ours)65.05
+ +Here, we note that we reproduced the validation score of BAN based on the official implementation for a fair comparison with our model; data sampling strategy and same initial word embedding vectors. From Table 2, we observed that using hyperedges information extracted from a symbolic level scene graph can improve the VQA performance compared to the reproduced BAN. Importantly, the improvement was achieved without heavy engineering such as data augmentation with Visual Genome dataset [19] and enhancing word embedding [15]. + +# 4.5. Qualitative Results + +We now visualize some co-attention maps generated by HANs with the GQA dataset in Figure 3. Among the all pairs of $M^i$ and $M^q$ , three pairs of hyperedges with top 3 attention values out of eight-glimpse are presented. + +Figure 3 shows the promising results achieved by the proposed method. We highlight the regions according to the image hyperedges with high attention weights. Since questions of GQA dataset are generated by a rule-based question generation program based on a scene graph, it is important for a model to focus on not only objects but also their relationship. For example, at the top-left example of Figure 3, our model successfully focuses on the triplet bench + +- sitting on -girl. Thus, our model can predict the correct answer instead of the Teddy bear which is being behind of the bench. + +# 5. Discussion and Conclusion + +We have shown an interesting approach to multimodal learning, which transforms the low-level multimodal inputs into symbolic graph forms and integrates the multiple symbolic graphs with the co-attention maps. To construct the co-attention maps, a novel sub-structure matching method based on the hypergraph structure is suggested. + +From the experimental results with the GQA and VQA v2 dataset, we showed that the symbolic graph is a very powerful way to represent the information of the low-level signals. The method to integrate two graphs by matching semantics between sub-structures works well. Also, HANs show a new state-of-the-art performance on the GQA task. Furthermore, we observe that our model can focus on both objects and relations between them by using the trained co-attention map. + +Compared to get a dependency tree as the inherent structure of the sentences, to get scene graphs of images might hard. Interestingly, we showed that approximated scene graphs using question sets are powerful. + +# 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6077-6086, 2018. +[2] 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. +[3] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. +[4] Stefano Berretti, Alberto Del Bimbo, and Enrico Vicario. Efficient matching and indexing of graph models in content-based retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23(10):1089-1105, 2001. +[5] Remi Cadene, Hedi Ben-Younes, Matthieu Cord, and Nicolas Thome. Murel: Multimodal relational reasoning for visual question answering. arXiv preprint arXiv:1902.09487, 2019. +[6] 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. arXiv preprint arXiv:1606.01847, 2016. +[7] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1263–1272. JMLR.org, 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] Ronghang Hu, Anna Rohrbach, Trevor Darrell, and Kate Saenko. Language-conditioned graph networks for relational reasoning. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2019. +[10] Drew Arad Hudson and Christopher D. Manning. Compositional attention networks for machine reasoning. In International Conference on Learning Representations, 2018. +[11] Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. Conference on Computer Vision and Pattern Recognition (CVPR), 2019. +[12] Drew A Hudson and Christopher D Manning. Learning by abstraction: The neural state machine. arXiv preprint arXiv:1907.03950, 2019. +[13] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. +[14] Justin Johnson, Ranjay Krishna, Michael Stark, Li-Jia Li, David Shamma, Michael Bernstein, and Li Fei-Fei. Image retrieval using scene graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3668-3678, 2015. +[15] Jin-Hwa Kim, Jaehyun Jun, and Byoung-Tak Zhang. Bilinear attention networks. In Advances in Neural Information Processing Systems, pages 1564-1574, 2018. +[16] Jin-Hwa Kim, Sang-Woo Lee, Donghyun Kwak, Min-Oh Heo, Jeonghee Kim, Jung-Woo Ha, and Byoung-Tak Zhang. Multimodal residual learning for visual qa. In Advances in neural information processing systems, pages 361-369, 2016. +[17] Jin-Hwa Kim, Kyoung-Woon On, Woosang Lim, Jeonghee Kim, Jung-Woo Ha, and Byoung-Tak Zhang. Hadamard product for low-rank bilinear pooling. 2017. +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[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] Linjie Li, Zhe Gan, Yu Cheng, and Jingjing Liu. Relation-aware graph attention network for visual question answering. arXiv preprint arXiv:1903.12314, 2019. +[21] Yujia Li, Chenjie Gu, Thomas Dullien, Oriol Vinyals, and Pushmeet Kohli. Graph matching networks for learning the similarity of graph structured objects. arXiv preprint arXiv:1904.12787, 2019. +[22] Yikang Li, Wanli Ouyang, Bolei Zhou, Kun Wang, and Xiaogang Wang. Scene graph generation from objects, phrases and region captions. In Proceedings of the IEEE International Conference on Computer Vision, pages 1261-1270, 2017. + +[23] 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. +[24] Will Norcliffe-Brown, Stathis Vafeias, and Sarah Parisot. Learning conditioned graph structures for interpretable visual question answering. In Advances in Neural Information Processing Systems, pages 8334-8343, 2018. +[25] 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. +[26] 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. +[27] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, 2019. +[28] Damien Teney, Lingqiao Liu, and Anton van den Hengel. Graph-structured representations for visual question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2017. +[29] Alexander Trott, Caiming Xiong, and Richard Socher. Interpretable counting for visual question answering. 2017. +[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] 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. +[32] Qi Wu, Chunhua Shen, Peng Wang, Anthony Dick, and Anton van den Hengel. Image captioning and visual question answering based on attributes and external knowledge. IEEE transactions on pattern analysis and machine intelligence, 40(6):1367-1381, 2017. +[33] Danfei Xu, Yuke Zhu, Christopher B Choy, and Li Fei-Fei. Scene graph generation by iterative message passing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5410-5419, 2017. +[34] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018. +[35] Jianwei Yang, Jiasen Lu, Stefan Lee, Dhruv Batra, and Devi Parikh. Graph r-cnn for scene graph generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 670-685, 2018. +[36] Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 21-29, 2016. + +[37] 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. +[38] Zhou Yu, Jun Yu, Chenchao Xiang, Jianping Fan, and Dacheng Tao. Beyond bilinear: Generalized multimodal factorized high-order pooling for visual question answering. IEEE transactions on neural networks and learning systems, (99):1-13, 2018. +[39] Peng Zhang, Yash Goyal, Douglas Summers-Stay, Dhruv Bartra, and Devi Parikh. Yin and Yang: Balancing and answering binary visual questions. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. +[40] Yan Zhang, Jonathon Hare, and Adam Prügel-Bennett. Learning to count objects in natural images for visual question answering. 2018. \ No newline at end of file diff --git a/hypergraphattentionnetworksformultimodallearning/images.zip b/hypergraphattentionnetworksformultimodallearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1053304e06caa662312b9e8d104f184dd90ce043 --- /dev/null +++ b/hypergraphattentionnetworksformultimodallearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80c5bd8626a1e2e013171a4b88ae113650c09c831b610c8ca5cc4d76fa1584c9 +size 510551 diff --git a/hypergraphattentionnetworksformultimodallearning/layout.json b/hypergraphattentionnetworksformultimodallearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..cc0ca5d382624c9272dd2a7dd1444d4b8f6c8416 --- /dev/null +++ b/hypergraphattentionnetworksformultimodallearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5107c19e2540c546a22623cee2fe805add49afe58ee299fc947108601496474c +size 461127 diff --git a/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_content_list.json b/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2cb8efee7c66b96fddf1402ac5c3202ecf8799f4 --- /dev/null +++ b/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:679714b20f7748b903bc2f44e3db89fae8185f44a31e94c75c799842be0eab15 +size 79599 diff --git a/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_model.json b/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5d8cf5b22fc797ab29f85ad8ce658beebb12ba84 --- /dev/null +++ b/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a1e22932e4923c16c51bdfe535126b442be46d6098bd53cdc6245fc23a664b8 +size 97262 diff --git a/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_origin.pdf b/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e2543b756261c2c94859cd86f7baefccbff3aac9 --- /dev/null +++ b/hyperstartaskawarehyperparametersfordeepnetworks/4f5137a7-7ed0-4333-8416-b2fbe1f0de05_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f8a730660d814ac456262ab86b8035311af3d92bc206dbafeb32be922234c71 +size 1147631 diff --git a/hyperstartaskawarehyperparametersfordeepnetworks/full.md b/hyperstartaskawarehyperparametersfordeepnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5f5989c341b5ecdf50354b47623e91eaf57e15a4 --- /dev/null +++ b/hyperstartaskawarehyperparametersfordeepnetworks/full.md @@ -0,0 +1,302 @@ +# HyperSTAR: Task-Aware Hyperparameters for Deep Networks + +Gaurav Mittal\* Chang Liu\* Nikolaos Karianakis \* Victor Fragoso \* Mei Chen \* Yun Fu\* Microsoft Northeastern University + +{gaurav.mittal, nikos.karianakis, victor.fragoso, mei.chen}@microsoft.com +liu.chang6@husky.neu.edu yunfu@ece.neu.edu + +# Abstract + +While deep neural networks excel in solving visual recognition tasks, they require significant effort to find hyperparameters that make them work optimally. Hyperparameter Optimization (HPO) approaches have automated the process of finding good hyperparameters but they do not adapt to a given task (task-agnostic), making them computationally inefficient. To reduce HPO time, we present HyperSTAR (System for Task Aware Hyperparameter Recommendation), a task-aware method to warm-start HPO for deep neural networks. HyperSTAR ranks and recommends hyperparameters by predicting their performance conditioned on a joint dataset-hyperparameter space. It learns a dataset (task) representation along with the performance predictor directly from raw images in an end-to-end fashion. The recommendations, when integrated with an existing HPO method, make it task-aware and significantly reduce the time to achieve optimal performance. We conduct extensive experiments on 10 publicly available large-scale image classification datasets over two different network architectures, validating that HyperSTAR evaluates $50\%$ less configurations to achieve the best performance compared to existing methods. We further demonstrate that HyperSTAR makes Hyperband (HB) task-aware, achieving the optimal accuracy in just $25\%$ of the budget required by both vanilla HB and Bayesian Optimized HB (BOHB). + +# 1. Introduction + +Transfer learning has become a de-facto practice to push the performance boundary on several computer vision tasks [8, 49], most notably image classification [16, 19, 38]. Although transfer learning improves performance on new tasks, it requires machine learning (ML) experts to spend hours finding the right hyperparameters (e.g., learning rate, layers to fine-tune, optimizer, etc.) that can achieve the best performance. Researchers have relied on Hyperpa + +![](images/3b63ff6620b71ce8e4e002d52aebf4a5eb0fc9be390a73804f3b388a00bedbc0.jpg) +Figure 1. HyperSTAR learns to recommend optimal hyperparameter configurations for an unseen task by learning end-to-end over a joint dataset-hyperparameter space. These recommendations can accelerate existing HPO methods leading to state-of-the-art performance for resource-constrained budgets. + +rameter Optimization (HPO), ranging from simple random search [3] to sophisticated Bayesian Optimization [39] and Hyperband [29], to reduce manual effort and automate the process of finding the optimal hyperparameters. Though more effective than manual search, these approaches are still slow since most of them trigger the same procedure for any new task and do not leverage any information from past experiences on related tasks. + +Many approaches accelerate HPO [24, 27, 41] including "warm-start" techniques which exploit the correlation among tasks [41, 36, 12, 2, 47]. Some of these use meta-learning to warm-start HPO by exploiting the task information (meta-features) from past searches [12]. These methods either guide the search policy for hyperparameters using a learned prior over hand-crafted dataset statistics [12, 48, 2], or pick the search policy of the most similar task from a database [47, 10]. Although these methods accelerate HPO, there is no method that leverages visual-based priors or learns deep feature representations to jointly encode dataset and hyperparameters to expedite HPO on + +large-scale image classification tasks. Having such a representation can help systems warm-start and tailor an HPO method based on the task to optimize. While Kim et al. [25] and Wong et al. [44] suggest using image features to understand the task, their efforts lack a joint representation for the tasks and hyperparameters. We argue that a joint dataset-hyperparameter representation is crucial for large-scale, real-world image classification problems. + +With the advent of AutoML [20], there is a strong interest for systems [11, 23] to fully automate the process of training a model on a customer image dataset. To cater to a large number of users, it is essential for AutoML systems to be efficient in searching for the optimal hyperparameters. Given the diversity of real-world image datasets, it is also necessary to prioritize the hyperparameter configurations in a task-aware manner rather than being task-agnostic. A task-aware mechanism understands a given dataset and recommends configurations that can operate well on that dataset. On the other hand, a task-agnostic mechanism treats all datasets equally and sets off the same configuration search regardless of the task. + +In order to enable task-aware HPO, we introduce HyperSTAR (System for Task-Aware Recommendation), a warm-start algorithm that prioritizes optimal hyperparameter configurations for an unseen image classification problem. HyperSTAR learns to recommend hyperparameter configurations for a new task from a set of previously-seen datasets and their normalized performance over a set of hyperparameter configurations. It comprises of two phases: an offline meta-learning phase and an online recommendation phase. In the meta-learning phase, HyperSTAR trains a network to first learn a task representation for a given dataset directly from its training images. Then, it uses the representation to learn an accuracy predictor for a given configuration. In the recommendation phase, HyperSTAR predicts the accuracy for each hyperparameter configuration given the task representation of an unseen dataset. It then exploits these predictions to generate a ranking which can be used to accelerate different HPO approaches by prioritizing the most promising configurations for evaluation. See Fig. 1 for an illustration of HyperSTAR. + +Our extensive ablation studies demonstrate the effectiveness of HyperSTAR in recommending configurations for real-world image classification tasks. We also formulate a task-aware variant of Hyperband (HB) [29] using the recommendation from HyperSTAR and show that it outperforms previous variations [29, 9, 47] in limited time budget HPO settings. To the best of our knowledge, HyperSTAR is the first warm-starting method that learns to accelerate HPO for large-scale image classification problems from hyperparameters and raw images in an end-to-end fashion. + +In sum, the contributions of this work are the following: + +- A meta-learning framework, HyperSTAR, that recom + +mends task-specific optimal hyperparameters for unseen real-world image datasets. + +- The first method to recommend hyperparameters based on a task-representation learned jointly with a performance predictor end-to-end from raw images. +- HyperSTAR can warm-start and accelerate task-agnostic HPO approaches. We demonstrate this by integrating HyperSTAR with Hyperband which outperforms existing methods in limited budget setting. + +# 2. Related Work + +The simplest solution to find hyperparameters for an algorithm is via a grid search over all the possible parameters [3]. Since it is slow and computationally expensive, the community introduced methods such as Bayesian Optimization (BO) [39, 40, 26] that use Gaussian processes for probabilistic sampling and Hyperband [29] which uses random configuration selection and successive halving [22] to speed up HPO. Falkner et al. [9] proposed BOHB, a Bayesian optimization and Hyperband hybrid that exploits the tradeoff between performance and time between BO and HB. For low time budgets, BOHB and Hyperband are equally better than BO while for large time budgets, BOHB outperforms all BO, Hyperband, and random search [20]. + +To accelerate HPO approaches, there are methods that model learning curves [42, 27], use multi-fidelity methods for cheap approximations [24], use gradient-based methods[13, 33, 35], or train on a subset of training data and extrapolate the performance [26] to reduce the overall search time. An alternative way to speed up HPO is via "warm-start" techniques [41, 36, 12, 2, 47]. These techniques exploit correlation between tasks to accelerate HPO. Swersky et al. [41] learns to sample hyperparameters based on multi-task Gaussian processes. Xue et al. [47] clusters previously-evaluated tasks based on the accuracy on certain benchmark models. Both approaches, while exploiting HPO knowledge from multiple tasks, incur a time overhead as they need to evaluate the new task every time over a certain pool of configurations in order to speed up the search. + +To avoid evaluating benchmark configurations, other approaches learn a function to map the trend in performance of a task over the configuration space with some task-based representation [2, 12, 30, 48, 10]. This function is based on multi-task Gaussian processes [2, 48] or random forests [12]. The task representations employed in these methods are based on hand-crafted features such as meta data (e.g., number of samples and labels in the dataset), or first and second order statistics (e.g., PCA, skewness, kurtosis, etc.) [20]. Since these features are neither visual-based nor learned jointly with the HPO module, they prove to be inefficient for large-scale vision tasks (see Section 4). + +![](images/84d430da6a78cf41a5910bb0d3b3dde76872df67447bf7bf12dd7a6c111af0e6.jpg) +(a) Offline Meta Learning Phase + +![](images/fa9ca86ce94a96526c117662d60c9c3d7317a478e31463acf2c122d5a1ef9d5d.jpg) +(b) Online Recommendation Phase +Figure 2. HyperSTAR Model Overview. (a) Offline Meta-Learning Phase. This phase jointly learns the functions for task representation and hyperparameter representation, and uses them as input to a performance predictor that estimates the performance of a CNN given a dataset (task) and a hyperparameter configuration. (b) Online Recommendation Phase. In this phase, HyperSTAR predicts the performance over the hyperparameter space for a new dataset and generates a task-aware ranking of the configurations. + +Achille et al. [1] introduced task2vec, a visual-inspired task representation but its computational cost makes it ill-suited as conditional input for hyperparameter recommendation. With respect to neural architectures [52], Kokiopoulou et al. [28] suggests conditioning the architecture search for natural language tasks over globally averaged features obtained from raw language based data. However, being restricted to low dimensional language tasks and without any dedicated performance based similarity regularization, these methods are not directly applicable to and effective on large scale vision tasks. For vision tasks, Wong et al. and Kim et al. [44, 25] condition the search of architectures and/or hyperparameters over deep visual features globally averaged over all images. Unlike these methods where features are either not learned or are aggregated via simple statistics (i.e., a global mean), HyperSTAR is the first method that learns an end-to-end representation over a joint space of hyperparameters and datasets. By doing so, HyperSTAR learns features that are more actionable for recommending configurations and for task-aware warm-start of HPO for large-scale vision datasets. + +# 3. HyperSTAR + +The goal of HyperSTAR is to recommend tailored hyperparameter configurations for an unseen dataset (task). To introduce this task-awareness, HyperSTAR comprises of a supervised performance predictor operating over a joint space of real-world image classification datasets and hyperparameter configurations. Given a dataset and a hyperparameter configuration, our model learns to predict the performance of the dataset for the given configuration in an offline meta-learning phase. Once the model has learned this mapping, we use HyperSTAR on an unseen dataset in an online recommendation phase to predict scores and rank the hyperparameter configurations. This ranking is beneficial to warm + +start task-agnostic HPO approaches, as we demonstrate via our formulation of task-aware Hyperband. Figure 2 provides a detailed illustration of HyperSTAR. + +# 3.1. Offline Meta-Learning Phase + +Performance Predictor. The objective of the performance predictor is to estimate the accuracy of a hyperparameter configuration given a task representation and an encoding of the hyperparameters (e.g., learning rate, number of layers to fine-tune, optimizer). Mathematically, the performance predictor $f$ is a function that regresses the performance $v$ of a deep-learning based image classifier given a dataset or task $\mathcal{D}$ and a hyperparameter configuration encoding $\mathcal{C}$ . + +Because deriving this function $f$ analytically is challenging for real-world vision tasks, we instead learn it using a deep network architecture $f_{\theta}$ parameterized with weights $\theta$ . Learning $f_{\theta}$ requires a tensor-based representation of the dataset $\mathcal{D}$ and hyperparameter configuration $\mathcal{C}$ . To learn the representation of the task $\mathbf{t} \in \mathbb{R}^d$ , we search for a function $\mathbf{t} = g_{w_t}(\mathcal{D})$ parameterized by weights $w_t$ . Similarly, we learn the representation $\mathbf{s} \in \mathbb{R}^d$ of a hyperparameter configuration encoded as one-hot vector $\mathbf{c}$ by searching for a function $\mathbf{s} = h_{w_s}(\mathbf{c})$ parameterized by the weights $w_s$ . Mathematically, this is formulated as $v = f_{\theta}(g_{w_t}(\mathcal{D}), h_{w_s}(\mathbf{c}))$ . + +We learn the task representation $\mathbf{t}$ in an end-to-end manner directly from raw training images of dataset $\mathcal{D}$ by using a convolutional neural network followed by a transformer layer inside $g_{w_t}(\cdot)$ . This enables the use of visual information into the task representation $\mathbf{t}$ , leading to improved generalization over unseen vision tasks and making the method end-to-end differentiable. Jointly learning the performance predictor and the representations in an end-to-end fashion constitutes a departure from previous meta-learning approaches that represent a task using hand-crafted metadata [2] (e.g., total number of training samples, number of classes, number of samples per class, etc.), performance- + +based features [47] or globally averaged features from a frozen deep network [44]. This allows our performance predictor $f_{\theta}(\cdot)$ to inform the feature extractors $g_{w_t}(\cdot)$ and $h_{w_s}(\cdot)$ during training about the most useful features for estimating the performance of an image classifier given a task and a hyperparameter configuration. + +Meta Dataset. To jointly learn the performance predictor $f_{\theta}(\cdot)$ , task representation $g_{w_t}(\cdot)$ , and hyperparameter embedding $h_{w_s}(\cdot)$ in a supervised manner, we construct a meta dataset (i.e., a dataset of datasets) $\mathcal{T}$ over the joint space of $M$ datasets and $H$ hyperparameter configurations. We define $\mathcal{T} = \{(\mathcal{D}_i, \mathbf{c}_j, v_{ij}) \mid i \in \{1, \dots, M\}, j \in \{1, \dots, H\}\}$ , where $v_{ij}$ is the target performance score (e.g., top-1 accuracy) achieved for an image classifier using the hyperparameter configuration $\mathbf{c}_j$ on a dataset $\mathcal{D}_i = \{(x_i^k, y_i^k) \mid k = 0, \dots, N_i\}$ (each $(x_i^k, y_i^k)$ being an image-label pair in $\mathcal{D}_i$ ). + +Performance Regression. We first find the optimal parameters for $\theta, w_t, w_s$ that minimize the difference between the estimated performance of our performance predictor and the ground-truth performance score using the loss function: + +$$ +\mathcal {L} _ {\text {p e r f}} \left(w _ {t}, w _ {s}, \theta\right) = \frac {1}{B} \sum_ {i = 1} ^ {B} \left\| v _ {i j} - f _ {\theta} \left(g _ {w _ {t}} \left(\mathcal {D} _ {i}\right), h _ {w _ {s}} \left(\mathbf {c} _ {j}\right)\right) \right\| _ {2} ^ {2}, \tag {1} +$$ + +where $B$ is the number of instances in a batch. + +The raw ground truth performance scores $v_{ij}$ across datasets can have a large variance due to the diversity of task difficulty. To alleviate the effect of this variance on our predictor, we normalize the performance scores as, $v_{ij} \gets (v_{ij} - \mu_i)\sigma_i^{-1}$ , where $\mu_i$ and $\sigma_i$ are the mean and standard deviation over the performance scores of dataset $\mathcal{D}_i$ for all hyperparameter configurations, respectively. + +Although formulating the objective function using a ranking loss [5] seems more intuitive for recommending hyperparameters, Yogatama et al. [48] showed that applying the above normalization over $v_{ij}$ makes the regression-based optimization in Eq. (1) equivalent to a rank-based optimization. A regression-based formulation has the advantage of being more time-efficient than rank-based optimization. The time complexity of learning a rank-based predictor is $\mathcal{O}(MH^2)$ while that of a regression-based predictor is $\mathcal{O}(MH)$ . Consequently, our regression-based performance predictor can scale favorably to many more datasets. + +Similarity-based inter-task regularization. To learn a more meaningful task representation, we add a regularizer that imposes that two tasks must have similar representations if they have similar hyperparameter-configuration rankings. The goal of this regularizer, $\mathcal{L}_{\mathrm{sim}}(w_t)$ , is to penalize our model when the similarity of two task representations differs from a pre-computed task similarity between the two datasets. This regularizer is defined as + +$$ +\mathcal {L} _ {\operatorname {s i m}} \left(w _ {t}\right) = \left\| r _ {i j} - d \left(g _ {w _ {t}} \left(\mathcal {D} _ {i}\right), g _ {w _ {t}} \left(\mathcal {D} _ {j}\right)\right) \right\| _ {2} ^ {2}, \tag {2} +$$ + +where $r_{ij}$ is a pre-computed similarity between the $i$ -th and $j$ -th datasets, and $d(g_{w_t}(\mathcal{D}_i), g_{w_t}(\mathcal{D}_j))$ is the cosine similarity between the two task representations $g_{w_t}(\mathcal{D}_i)$ and $g_{w_t}(\mathcal{D}_j)$ . We pre-compute $r_{ij}$ as $AP@K$ [51] with $k = 10$ . Intuitively, $r_{ij}$ is high when the top- $k$ configurations of the two datasets have a large number of entries in common. $\mathcal{L}_{\mathrm{sim}}(w_t)$ thus helps $g_{w_t}(.)$ push an unseen dataset close to a "similar" seen dataset in the manifold, thereby improving hyperparameter recommendation for this new dataset. + +Reducing intra-task representation variance. In order to optimize Eq. (1), we leverage stochastic gradient descent with mini-batch size B. Consequently, this imposes the constraint that a dataset representation $\mathbf{t}_i$ computed from a batch sampled from a dataset $\mathcal{D}_i$ has to be representative of that dataset. In other words, a dataset representation $\mathbf{t}_i^a$ computed from a batch $a$ sampled from $\mathcal{D}_i$ has to be similar to a representation $\mathbf{t}_i^b$ computed from a batch $b$ of the same dataset. Therefore, our model has to ensure that the variance among the task representations computed from any batch of the same dataset has to be small. Inspired by domain adaptation techniques [14, 43, 17], we devise an adversarial training component with the goal of keeping the dataset representations computed from batches $(\mathbf{t}_i^l)$ close to the global representation of the dataset $(\mathbf{t}_i^G)$ . We compute the global representation of the dataset as follows $\mathbf{t}_i^G = \frac{1}{L}\sum_{l=1}^{L}\mathbf{t}_i^l$ , where the index $l$ runs through up to last $L$ sampled image batches of a dataset (like a sliding window). We use a discriminator $d_{w_d}(\cdot)$ to ensure that the batch-wise dataset representations $\mathbf{t}_i^l$ are close to the global representation $\mathbf{t}_i^G$ . To penalize deviations, we formulate the following loss: + +$$ +\left. \mathcal {L} _ {\mathrm {a d v}} \left(w _ {t}, w _ {d}\right) = \mathbb {E} \left[ \log \left(d _ {w _ {d}} \left(\mathbf {t} _ {i} ^ {G}\right)\right) \right] + \mathbb {E} \left[ \log \left(1 - d _ {w _ {d}} \left(\mathbf {t} _ {i} ^ {l}\right)\right) \right], \right. \tag {3} +$$ + +where $\mathbb{E}[\cdot ]$ is the expectation operator. We chose to use an adversarial training component to ensure semantic consistency between batch-wise representations $\mathbf{t}_i^l$ and the global representation $\mathbf{t}_i^G$ as suggested by Hoffman et al. [17]. + +Overall objective function. The overall task representation problem is thus the following + +$$ +\min _ {w _ {t}, w _ {s}, \theta} \max _ {w _ {d}} \quad \mathcal {L} _ {\text {p e r f}} \left(w _ {t}, w _ {s}, \theta\right) + \alpha \mathcal {L} _ {\text {s i m}} \left(w _ {t}\right) + \beta \mathcal {L} _ {\text {a d v}} \left(w _ {t}, w _ {d}\right) \tag {4} +$$ + +where $\alpha$ and $\beta$ are loss coefficients. We solve this problem by alternating between optimizing feature extractors $g_{w_t}(\cdot)$ , $h_{w_s}(\cdot)$ and discriminator $d_{w_d}(\cdot)$ until convergence. + +Implementation details of offline meta-learning phase. Algorithm 1 shows the training process for the offline meta-learning phase. The offline meta-learning phase requires two loops. The outer-most for-loop (steps 3 - 12) samples a meta-batch $\mathcal{C}_m$ for the $m$ -th dataset $\mathcal{D}_m$ containing hyperparameter configurations and their performances. The innermost for-loop (steps 6 - 11) samples image batches from $\mathcal{D}_m$ to update the parameters of the predictor and simultaneously aggregate the global representation $\mathbf{t}_m$ considering + +up to the $L$ last image batches. In addition to leveraging stochastic gradient descent as described above, sampling image batches to represent a dataset, compared to a single-point estimate [44], helps the dataset (task) to be modeled as a richer distribution in the dataset-configuration space by effectively acting as data augmentation. + +# 3.2. Online Recommendation Phase + +Once the performance predictor of our HyperSTAR learns to effectively map a dataset-configuration pair to its corresponding performance score in the offline meta learning phase, we can use it for online recommendation on an unseen dataset $\mathcal{D}_{\mathrm{new}}$ as shown in Algorithm 2 and Figure 2b. HyperSTAR first extracts a task representation $\mathbf{t}_{\mathrm{new}} = g_{w_t}(\mathcal{D}_{\mathrm{new}})$ for the new dataset and then along with a batch of previously-seen hyperparameter configuration encodings, feeds it into the offline-trained performance predictor $f_{\theta}(\cdot)$ to predict a sequence of performance scores corresponding to the sequence of configurations. Based on these performance scores, we can rank the configurations to prioritize which ones to evaluate. + +Task-Aware HPO. This task-aware recommendation list generated by HyperSTAR can be used to warm-start and guide any of the existing HPO approaches. We prove this by proposing a task-aware variant of Hyperband [29]. In this variant of Hyperband, in each stage, we replace the random configuration sampling by evaluating the top $n$ configurations based on the recommendation list suggested by HyperSTAR. We experiment with a thresholded list of top $n$ configurations with Hyperband, but it can be hybridized (without much effort) to either mix a certain ratio of random configurations or sample configurations based on a probability defined over the ranked configuration list. + +Implementation details of online phase. Algorithm 2 summarizes the online recommendation phase. The outermost for-loop (steps 2 - 9) iterates over all the possible $H$ configurations. For each configuration, the inner-most loop (steps 4 - 7) samples $B$ batches and predicts the performance for each batch at step 6. At the end of this inner-most loop, we average all the performance predictions and use it as the performance estimate for the $n$ -th configuration. Lastly, the algorithm ranks all the configurations based on their estimated performances and returns the ranking. + +# 4. Experiments + +This section presents a series of experiments designed to evaluate the performance predictor, the generated recommendation (see Sec. 4.1), and the end-to-end HPO performance of HyperSTAR (see Sec. 4.3). + +Datasets. We evaluate HyperSTAR on 10 publicly available large-scale image classification datasets: BookCover30 [21], Caltech256 [15], DeepFashion [31], Food101 [4], MIT Indoor Scene Recognition [37], IP102 In + +Algorithm 1: Offline Meta-learning Phase +1 Input meta-dataset $\mathcal{T}$ $M$ datasets, hyperparameter batch size $\hat{O}_{\mathrm{hyper}}$ , image batch size $N_{\mathrm{img}}$ , number of sampled image batches per dataset $B_{\mathrm{img}}$ , window size $L$ +2 while Not converge do +3 for $m = 1$ to $M$ do +4 Initialize global task embedding ${\bf t}_m^G = {\bf 0}$ +5 Sample hyperparameter batch $\mathcal{C}_m$ from $\mathcal{T}$ for dataset $\mathcal{D}_m$ +6 for $i = 1$ to $B_{\mathrm{img}}$ do +7 Sample an image batch $\mathcal{B}_m^i$ from $\mathcal{D}_m$ +8 Update $\theta ,w_t,w_s$ by minimizing Eq. (4) +9 Compute $\mathfrak{t}_m^G$ as mean of up to last $L$ image batches +10 Update $w_{d}$ by maximizing Eq. (4); +11 end +12 end +13 end + +Algorithm 2: Online Recommendation Phase +1 Input Unseen dataset $\mathcal{D}_{\mathrm{new}}$ , meta-dataset $\mathcal{T}$ , batch sampling iterations $B$ , number of hyperparameter configurations $H$ +2 for $n = 1$ to $H$ do +3 Get the $n$ -th hyperparameter configuration $\mathbf{c}_n$ from $\mathcal{T}$ +4 for $i = 1$ to $B$ do +5 Randomly sample an image batch $\mathcal{B}_\mathrm{new}^i$ from $\mathcal{D}_{\mathrm{new}}$ . +6 $v_{n,i} = f_{\theta}\left(g_{wt}\left(\mathcal{B}_{\mathrm{new}}^{i}\right),h_{ws}(\mathbf{c}_{n})\right)$ +7 end +8 $v_{n} = \frac{1}{B}\sum_{i}^{B}v_{n,i}$ +9 end +10 Return ranked configurations $\mathbf{c}_1,\dots ,\mathbf{c}_H$ based on $v_{1},\ldots ,v_{H}$ + +sects Pests [45], Oxford-III Pets [34], Places365 [50], SUN397 [46] and Describable Texture Dataset (DTD) [6]. + +Architectures. To ensure that our empirical study reflects the performance of our method on state-of-the-art network architectures, we choose SE-ResNeXt-50 [18], a powerful and large architecture; and ShuffleNet-v2-x1 [32], a compact and efficient architecture. For both networks, we operate in a transfer-learning setting [8] where we initialize the weights of the network from a model pre-trained on ImageNet [7] and fine-tune certain layers of the network while minimizing the multi-class cross entropy loss. The hyperparameter space for SE-ResNeXt-50 consists of 40 configurations varying in learning rate, choice of optimizer, number of layers to fine tune, and data augmentation policy. As ShuffleNet-v2-x1 takes less time to train, we explore a larger search space of 108 configurations over the aforementioned hyperparameter dimensions. + +Meta-dataset for training the performance predictor. To construct the meta-dataset over the joint dataset-hyperparameter space, we train both SE-ResNeXt-50 and ShuffleNet-v2-x1 for every configuration in their respective hyperparameter space on each of the 10 datasets. This generates a set of 400 training samples for SE-ResNeXt-50 and 1,080 data samples for ShuffleNet-v2-x1. The meta-dataset thus contains triplets holding a one-hot encoding represent + +Table 1. AP@10 comparison for SE-ResNeXt-50 for 10 public image classification datasets across different methods. + +
Test DatasetBookCover30Caltech256DeepFashionFood101MIT IndoorIP102 (Pests)Oxford-IIIT PetsPlaces365SUN397Textures (DTD)Average
Feurer et al. [12]38.7160.5933.2748.0167.8168.1571.9849.2072.6359.3859.67
Feurer et al. [10]37.1349.5528.6749.6043.2750.7154.5054.7854.7851.9742.49
Task-Agnostic45.6365.9031.9655.2843.5163.2353.9031.9645.5860.0749.70
Meta-data42.1072.5746.6963.3272.3173.0978.1151.7888.5960.1364.87
Global Mean61.6485.2644.6463.9579.4189.0578.3362.3293.3674.6673.24
AblationsBatchwise Mean (BM)68.1682.3462.3970.9872.5184.9481.4388.0593.7482.59
BM + GAN64.0283.8387.6367.2776.4587.4978.4293.4192.9277.21
BM + Similarity62.6080.9782.3967.3178.7983.6479.5290.3794.4781.63
BM + Similarity + GAN68.2786.7291.5168.2077.9787.5279.6491.7291.8581.46
+ +Table 2. AP@10 comparison for ShuffleNet-v2-x1 for 10 public image classification datasets across different methods. + +
Test DatasetBookCover30Caltech256DeepFashionFood101MIT IndoorIP102 (Pests)Oxford-IIIT PetsPlaces365SUN397Textures (DTD)Average
Feurer et al. [12]14.303.416.7512.579.1114.212.1125.8118.4559.3811.72
Feurer et al. [10]21.7410.950.0011.8125.740.011.9527.8727.870.015.25
Task-Agnostic Baseline0.002.1115.7444.693.1126.1131.240.000.0018.6514.16
Meta-data33.2715.3531.9733.4435.6854.7325.4640.4837.8934.8834.32
Global Mean35.3016.4517.7047.4134.8749.8724.9858.2843.7940.7136.94
Batchwise Mean (BM)76.8121.6933.8280.9839.5656.3044.8669.8850.4946.7052.11
BM + GAN69.7124.2934.3484.8846.9354.9653.8462.8943.9851.4352.72
BM + Similarity80.2320.5135.2887.1038.2157.7354.6971.7844.7846.5253.68
BM + Similarity + GAN76.9221.5140.1084.6047.7455.3447.2075.2546.0946.5654.13
+ +ing the hyperparameter configuration, training images of the dataset and corresponding Top-1 accuracy (to be used as performance score that HyperSTAR estimates). We normalize these Top-1 accuracies using the mean and standard deviation computed for each dataset separately over the accuracy scores across the configuration space (Section 3.1). + +Evaluation metric. We use Average Precision @ 10 $(AP@10)$ [51] metric (as described in Section 3.1) to assess the ranking of configurations that HyperSTAR produces. This metric reflects the quantity and relative ranking of the relevant configurations predicted by HyperSTAR. We first build a ground-truth hyperparameter recommendation list based on decreasing order of actual Top-1 accuracies. We then compute $AP@10$ by comparing this list with the predicted recommendation list generated based on the decreasing order of the predicted accuracies from HyperSTAR. + +# 4.1. Performance Predictions and Rankings + +We present a quantitative study comparing the task representation, regularization functions and the performance predictor introduced by HyperSTAR with existing methods. + +Task Representation Comparison. For this comparison, we use meta-data based task representation as the first baseline. The representation is a subset of statistics used in previous methods [12, 2] which are applicable to our vision datasets (such as number of images, classes and images per class in the dataset). As the second baseline, we consider global mean features based task representation. The global mean is computed by taking an average of the deep visual features obtained from the penultimate layer of ResNet-50 pretrained on ImageNet [44] over all training images of a dataset. In comparison, our task representation is a batchwise mean (BM) taken as mean over end-to-end learned features over a batch of $N_{\mathrm{img}} = 64$ training images. We take $B_{\mathrm{img}} = 10$ of these batches and take an average to obtain the task representation. For training, the size of the hyperpa + +rameter batch is $O_{\mathrm{hyper}} = 10$ . For each setting, we train our performance predictor and compute $AP@10$ averaged over 10 trials. We can observe from Tables 1 and 2 that our end-to-end learned task representation (BM) outperforms metadata-based and global-mean-based task representations by $17.62\%$ and $9.25\%$ , respectively, for SE-ResNeXt-50. The performance gains are similar for ShuffleNet-v2-x1 (see Table 2). This suggests that learning end-to-end visually inspired task representation helps HyperSTAR to recommend better task-aware configurations. It further suggests that representing the dataset as a distribution over a large number of randomly sampled batches is better than representing it as a point estimate using global mean. + +Regularization Ablation Study. We perform an internal ablation study comparing AP@10 achieved when using batchwise mean (BM) in HyperSTAR with and without imposing similarity and adversarial based regularization. We can observe from Tables 1 and 2 that imposing the regularizations improves the AP@10 for 6 out of 10 datasets for SE-ResNeXt-50 and 9 out of 10 dataset for ShuffleNet-v2-x1. This suggests that, on expectation, imposing regularization allows the task representations to learn meaningful features over the joint dataset-configuration space. Although there is a time cost associated with introducing regularizations, they provide an added dimension for the user to explore and further improve the configuration recommendation compared to the plain batch-wise mean setting. + +Performance Predictor Comparison. We compare HyperSTAR and existing meta-learning based warm-starting HPO methods. We first compare HyperSTAR with Feurer et al. [12] that uses random forest regression over a joint vector of meta-data and one-hot encoding of hyperparameters to predict the corresponding Top-1 accuracy and use that to build a recommendation list of configurations. We also compare HyperSTAR with Feurer et al. [10] that finds the most sim + +![](images/2ca7d829c7d7724e651c8d58310b7f3c21dc2a5b44f84a294da3ad2c2779649f.jpg) +Figure 3. End-to-End performance comparison of task-aware HyperSTAR based Hyperband with existing methods for SE-ResNeXt-50. HyperSTAR outperforms other methods when performing on low epoch budgets (100, 250, 450). + +![](images/7d9879fcafc847df17106fd1120508dcd00c2745ec74250d1ae182326b72c73e.jpg) + +![](images/1b47973b2d815f64d244d99da964849e2d695768df134cdab926a446b8ac7d98.jpg) + +![](images/f5ade095508ce4815020f60c875084cc5ff6d3eb67f861e3a106de3cbf7acaa8.jpg) + +![](images/2b40c620082a4b9d300f29144ea573864e43ec26d1e76bc9fa5b569018dc5d2b.jpg) + +![](images/caafbef35054af6110674e8c77d249611fe7f899e125ca938966a861e5020d72.jpg) +Figure 4. End-to-End performance comparison of task-aware HyperSTAR based Hyperband with existing methods for ShuffleNet-v2-x1. HyperSTAR outperforms other methods when performing on low epoch budgets (100, 250, 450). + +![](images/46cf8a44b420ceb8aa5336292f68bdabeb438d1351977a0617e7467a23ddf435.jpg) + +![](images/20c567a9e8547a482f8c605da4e13eb35b046a47b7aa8878cacd17b3d11e4403.jpg) + +![](images/f68a270f1f7e416648375f902a6a0786d4193919570beacc8d242ebad422408c.jpg) + +![](images/812054c4cfdd8a7dcf7f2dd9a2deeabbd9530dbd8e56460e85f905d772294600.jpg) + +ilar training dataset for a given test dataset with respect to meta-data features and use the ground truth list of recommended configurations for the training dataset as the prediction for test dataset. We further set up a task-agnostic baseline to compare the effectiveness of our task-aware recommendations. For this baseline, we disregard the characteristics of the test dataset and build a predicted list of recommended configurations by sorting the configurations in decreasing order of their average Top-1 accuracy over the training datasets. From Table 1 and 2, we can observe that HyperSTAR surpasses each of the baselines with average AP@10 margin of at least $25\%$ for SE-ResNeXt-50 and $37\%$ for ShuffleNet-v2-x1. We also observe from the Tables that similarity based approaches (task-agnostic and Feurer et al. [10]) have a higher variance in performance across datasets compared to task-representation-based approaches (HyperSTAR and Feurer et al. [12]). + +# 4.2. Warm-Starting with Recommendations + +We test the configurations recommended by HyperSTAR and other baseline methods by evaluating their ranking or + +der. We plot a curve showing the best Top-1 accuracy achieved after $k$ hyperparameter configurations for $k = 1 \ldots H$ as shown in Figure 5a. We can observe that using the recommendation from HyperSTAR achieves the same performance in just $50\%$ of evaluated configurations as needed by baseline recommendations. This suggests that compared to other baseline methods and task representations, raw-pixel based end-to-end learned task representations of HyperSTAR are more informative for prioritizing hyperparameter configurations. HyperSTAR takes $422ms$ on an Nvidia 1080Ti to generate configuration recommendations which is negligible compared to multiple GPU hours required to evaluate even a single configuration. + +# 4.3. Task-Aware Hyperband + +We warm-start Hyperband (HB) [29] using the task-aware hyperparameter recommendation from HyperSTAR and compare it with the vanilla Hyperband [29] and BOHB [9]. We design the experiment to demonstrate a common scenario where the time available to search for the optimal hyperparameters for an unseen dataset is limited. + +![](images/0b567c515685f813d562724c3bdcb79b464fd12147ccf2223eb652b5c0244075.jpg) + +![](images/bd460082e3ba7119ec28f9c741e0c7b3db8b3d412b88bc9e27ec990e5535fe8f.jpg) + +![](images/31e3e490ec68cdbdc6f7bdfcfb7d672fd1ed7e6eae18ba4fa17966b00350122f.jpg) +Figure 5. (a) Comparison of evaluating configurations recommended by HyperSTAR with baseline methods in ranked order. Compared to baselines, HyperSTAR achieves the best performance by evaluating $50\%$ less configurations. (b) Comparison of warm-starting Hyperband (HB) with HyperSTAR vs. baseline approaches across different epoch budgets. HyperSTAR achieves optimal accuracy in $25\%$ of the budget required by other methods. It also achieves $1.5\%$ higher best Top-1 accuracy on average for the smallest budget setting on both network architectures. + +![](images/bf8eccd21e7f30934c38dd39f27d23c532a52c0aa6eaa7bdaae6513a82183b9f.jpg) + +We run all the methods for different amounts of total budget. The budget is defined in terms of epochs to keep the evaluation time consistent across different hyperparameter configurations, datasets and architectures. The maximum number of epochs for any given configuration is $R = 100$ . We consider a budget of 1600 epochs ( $\eta = 3$ , large-budget setting) and smaller budgets of 450, 200 and 100 epochs ( $\eta = 2$ , low-budget settings). Figs. 3 and 4 show the best Top-1 accuracy achieved by the different methods for different budgets for all 10 test datasets for SE-ResNeXt-50 and Shufflent-v2-x1, respectively. Fig. 5b further shows the average over all the test datasets for the two network architectures. We observe that HyperSTAR outperforms vanilla HB and BOHB in the low-budget settings for all datasets achieving around $1.5\%$ higher best Top-1 accuracy on average for the smallest budget setting on both network architectures. In fact, HyperSTAR achieves the optimal accuracy in just $25\%$ of the budget required by the other two methods. This happens because the initial set of hyperparameters suggested by both vanilla HB and BOHB do not follow any prior and are chosen randomly, i.e., they are task agnostic. + +The difference in the Top-1 accuracy achieved by all three methods gradually diminish with increasing time budget and eventually becomes negligible for the largest budget setting. The accuracy is also at par with the best Top-1 accuracy achievable for the given hyperparameter space. This happens for vanilla HB and BOHB because over time, + +they explore the hyperparameter space sufficiently enough to be able to discover the best possible configuration. Although HyperSTAR-based Hyperband has been designed to improve HPO efficiency for low-budget setting, being able to achieve the best possible performance suggests that it is also sound for large-budget setting. Given sufficient budget, our method can achieve at par (if not better) performance compared to other HPO methods. Our plots also show BOHB being comparable to vanilla HB for low-budget setting while being better than vanilla HB in the large-budget setting. This is because of the Bayesian sampling prior of BOHB that gets better than random sampling over time, thus helping BOHB outperform vanilla HB. + +We also compare our task-aware Hyperband with Tr-AutoML [47]. For a fair comparison, we considered the time Tr-AutoML spends to group the 9 training datasets as part of offline training and exclude it from the time comparison. We randomly choose 10 configurations to group the datasets and evaluate on the test dataset for finding the most similar training dataset. We consider the more time efficient scenario of Tr-AutoML where we do not run Hyperband and compute the Top-1 accuracy achieved over the unseen dataset using the best configuration for the most similar training dataset. As shown in Figures 3, 4 and 5b, since the total evaluation time comprises of running on the benchmark 10 configurations and then finally on the best found configuration, the Top-1 accuracy is reported as achieved after 1100 epochs. From the figures, we can observe that, on expectation, our task-aware HB is able to achieve the same performance in as little as 10 times less budget. This reinforces that learning a dataset embedding from raw pixels significantly reduces the time required to predict the optimal hyperparameters compared to Tr-AutoML. + +# 5. Conclusion + +We present HyperSTAR, the first efficient task-aware warm-start algorithm for hyperparameter optimization (HPO) for vision datasets. It operates by learning an end-to-end task representation and a performance predictor directly over raw images to produce a ranking of hyperparameter configurations. This ranking is useful to accelerate HPO algorithms such as Hyperband. Our experiments on 10 real-world image classification datasets show that HyperSTAR achieves the optimal performance in half the number of evaluated hyperparameter configurations compared to state-of-the-art warm-start methods. Our experiments also show that HypterSTAR combined with Hyperband achieves an optimal performance in $25\%$ of the budget of other HB variants. HyperSTAR is especially helpful in performing HPO without requiring large computational time budgets. + +# 6. Acknowledgements + +Special thanks to Microsoft Custom Vision team for their valuable feedback and support. + +# References + +[1] Alessandro Achille, Michael Lam, Rahul Tewari, Avinash Ravichandran, Subhransu Maji, Charless C Fowlkes, Stefano Soatto, and Pietro Perona. Task2vec: Task embedding for meta-learning. In Proc. of the IEEE International Conference on Computer Vision, pages 6430-6439, 2019. 3 +[2] Rémi Bardenet, Mátyás Brendel, Balázs Kégl, and Michele Sebag. Collaborative hyperparameter tuning. In Proc. of the International Conference on Machine Learning, pages 199-207, 2013. 1, 2, 3, 6 +[3] James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(Feb):281-305, 2012. 1, 2 +[4] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101 – mining discriminative components with random forests. In Proc. of the European Conference on Computer Vision, 2014. 5 +[5] Wei Chen, Tie-Yan Liu, Yanyan Lan, Zhi-Ming Ma, and Hang Li. Ranking measures and loss functions in learning to rank. In Proc. of the Advances in Neural Information Processing Systems, pages 315-323, 2009. 4 +[6] M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, , and A. Vedaldi. Describing textures in the wild. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. 5 +[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009. 5 +[8] Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Proc. of the International Conference on Machine Learning, pages 647-655, 2014. 1, 5 +[9] Stefan Falkner, Aaron Klein, and Frank Hutter. BOHB: Robust and efficient hyperparameter optimization at scale. In Proc. of the International Conference on Machine Learning, 2018. 2, 7 +[10] Matthias Feurer, Aaron Klein, Katharina Eggensperger, Jost Springenberg, Manuel Blum, and Frank Hutter. Efficient and robust automated machine learning. In Proc. of the Advances in Neural Information Processing Systems, pages 2962-2970, 2015. 1, 2, 6, 7 +[11] Matthias Feurer, Aaron Klein, Katharina Eggensperger, Jost Springenberg, Manuel Blum, and Frank Hutter. Efficient and robust automated machine learning. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Proc. of the Advances in Neural Information Processing Systems, pages 2962-2970. Curran Associates, Inc., 2015. 2 +[12] Matthias Feurer, Jost Tobias Springenberg, and Frank Hutter. Initializing bayesian hyperparameter optimization via meta-learning. In Proc. of the Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. 1, 2, 6, 7 +[13] Luca Franceschi, Michele Donini, Paolo Frasconi, and Massimiliano Pontil. Forward and reverse gradient-based hyperparameter optimization. In Proc. of the International Con + +ference on Machine Learning, pages 1165-1173. JMLR.org, 2017. 2 +[14] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. 4 +[15] Gregory Griffin, Alex Holub, and Pietro Perona. Caltech-256 object category dataset. 2007. 5 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 1 +[17] 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 Proc. of the 35th International Conference on Machine Learning, 2018. 4 +[18] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7132-7141, 2018. 5 +[19] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4700-4708, 2017. 1 +[20] Frank Hutter, Lars Kotthoff, and Joaquin Vanschoren, editors. Automatic Machine Learning: Methods, Systems, Challenges. Springer, 2018. In press, available at http://automl.org/book. 2 +[21] Brian Kenji Iwana, Syed Tahseen Raza Rizvi, Sheraz Ahmed, Andreas Dengel, and Seiichi Uchida. Judging a book by its cover. arXiv preprint arXiv:1610.09204, 2016.5 +[22] Kevin Jamieson and Ameet Talwalkar. Non-stochastic best arm identification and hyperparameter optimization. In Proc. of the Artificial Intelligence and Statistics, pages 240-248, 2016. 2 +[23] Haifeng Jin, Qingquan Song, and Xia Hu. Auto-keras: An efficient neural architecture search system. In Proc. of the ACM International Conference on Knowledge Discovery & Data Mining, pages 1946-1956, 2019. 2 +[24] Kirthevasan Kandasamy, Gautam Dasarathy, Jeff Schneider, and Barnabas Poczos. Multi-fidelity bayesian optimisation with continuous approximations. In Proc. of the 34th International Conference on Machine Learning, pages 1799-1808. JMLR.org, 2017. 1, 2 +[25] Jungtaek Kim, Saehoon Kim, and Seungjin Choi. Learning to warm-start bayesian hyperparameter optimization. arXiv preprint arXiv:1710.06219, 2017. 2, 3 +[26] Aaron Klein, Stefan Falkner, Simon Bartels, Philipp Hennig, and Frank Hutter. Fast bayesian optimization of machine learning hyperparameters on large datasets. In Proc. of the Artificial Intelligence and Statistics, pages 528-536, 2017. 2 +[27] Aaron Klein, Stefan Falkner, Jost Tobias Springenberg, and Frank Hutter. Learning curve prediction with bayesian neural networks. *ICLR*, 2016. 1, 2 +[28] Efi Kokiopoulou, Anja Hauth, Luciano Sbaiz, Andrea Gesmundo, Gabor Bartok, and Jesse Berent. Fast task-aware architecture inference. arXiv preprint arXiv:1902.05781, 2019.3 + +[29] Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hyperband: A novel bandit-based approach to hyperparameter optimization. J. Mach. Learn. Res., 18(1):6765-6816, Jan. 2017. 1, 2, 5, 7 +[30] Marius Lindauer and Frank Hutter. Warmstarting of model-based algorithm configuration. In Proc. of the Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 2 +[31] Ziwei Liu, Ping Luo, Shi Qiu, Xiaogang Wang, and Xiaouu Tang. Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In Proc. of IEEE Conference on Computer Vision and Pattern Recognition, June 2016. 5 +[32] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In Proc. of the European Conference on Computer Vision, pages 116-131, 2018. 5 +[33] Dougal Maclaurin, David Duvenaud, and Ryan Adams. Gradient-based hyperparameter optimization through reversible learning. In Proc. of the International Conference on Machine Learning, pages 2113-2122, 2015. 2 +[34] Omkar M. Parkhi, Andrea Vedaldi, Andrew Zisserman, and C. V. Jawahar. Cats and dogs. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, 2012. 5 +[35] Fabian Pedregosa. Hyperparameter optimization with approximate gradient. In Proc. of the International Conference on Machine Learning, 2016. 2 +[36] Valerio Perrone, Rodolphe Jenatton, Matthias W Seeger, and Cédric Archambeau. Scalable hyperparameter transfer learning. In Proc. of the Advances in Neural Information Processing Systems, pages 6845-6855, 2018. 1, 2 +[37] Ariadna Quattoni and Antonio Torralba. Recognizing indoor scenes. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 413-420, 2009. 5 +[38] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. 1 +[39] Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Proc. of the Advances in Neural Information Processing Systems, pages 2951-2959, 2012. 1, 2 +[40] Jasper Snoek, Oren Rippel, Kevin Swersky, Ryan Kiros, Nadathur Satish, Narayanan Sundaram, Mostofa Patwary, Mr Prabhat, and Ryan Adams. Scalable bayesian optimization using deep neural networks. In Proc. of the International Conference on Machine Learning, pages 2171-2180, 2015. 2 +[41] Kevin Swersky, Jasper Snoek, and Ryan P Adams. Multi-task bayesian optimization. In Proc. of the Advances in Neural Information Processing Systems, pages 2004–2012, 2013. 1, 2 +[42] Kevin Swersky, Jasper Snoek, and Ryan Prescott Adams. Freeze-thaw bayesian optimization. arXiv preprint arXiv:1406.3896, 2014. 2 +[43] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7167-7176, 2017. 4 + +[44] Catherine Wong, Neil Houlsby, Yifeng Lu, and Andrea Gesmundo. Transfer learning with neural automl. In Proc. of the Advances in Neural Information Processing Systems, pages 8356-8365, 2018. 2, 3, 4, 5, 6 +[45] Xiaoping Wu, Chi Zhan, Yu-Kun Lai, Ming-Ming Cheng, and Jufeng Yang. Ip102: A large-scale benchmark dataset for insect pest recognition. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8787-8796, 2019. 5 +[46] Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3485-3492, 2010. 5 +[47] Chao Xue, Junchi Yan, Rong Yan, Stephen M Chu, Yonggang Hu, and Yonghua Lin. Transferable automl by model sharing over grouped datasets. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9002-9011, 2019. 1, 2, 4, 8 +[48] Dani Yogatama and Gideon Mann. Efficient transfer learning method for automatic hyperparameter tuning. In Proc. of the Artificial intelligence and statistics, pages 1077-1085, 2014. 1, 2, 4 +[49] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Proc. of the Advances in Neural Information Processing Systems, pages 3320-3328, 2014. 1 +[50] 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, 2017. 5 +[51] Mu Zhu. Recall, precision and average precision. 2004. 4, 6 +[52] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.3 \ No newline at end of file diff --git a/hyperstartaskawarehyperparametersfordeepnetworks/images.zip b/hyperstartaskawarehyperparametersfordeepnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..601fc986c807934078b15d975381148313e33c15 --- /dev/null +++ b/hyperstartaskawarehyperparametersfordeepnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f19c493d1b601b2e0ac62376c86010a497543cbe846c8e9e516c3eea5f9b93a +size 532912 diff --git a/hyperstartaskawarehyperparametersfordeepnetworks/layout.json b/hyperstartaskawarehyperparametersfordeepnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d1d6b99ed5a7dc3cd1de81b3591fae641f6504ed --- /dev/null +++ b/hyperstartaskawarehyperparametersfordeepnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b418a15dc005f136becdb178a3f0890d63b2ecf2100149acf3b04bca44fedcc +size 439301 diff --git a/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_content_list.json b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9d5115ae9cc1e65dfe69bdb803ec740facf45ba2 --- /dev/null +++ b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5b6a19f638dd36982f6401cde238edc75ae1d7ed8a82df23b0317eac9e44078 +size 66983 diff --git a/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_model.json b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4efc5054dac191151ac1c2486075e87500e46a10 --- /dev/null +++ b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c444aeb612254b1ecd1ab0b3fea27d8b7567d950efe163605fa8f51adce1be29 +size 79958 diff --git a/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_origin.pdf b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4664d8f24a8cf17a6dfce21c981979cbc46344cf --- /dev/null +++ b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/702452fc-3454-45fd-aba1-61a7c129e2dc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b41dba2b57fc63bba08e94768b5f83cca345ccbed461e5458589f78dbc8147d +size 1090876 diff --git a/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/full.md b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f0f00909ff8b44ae77b60ba7202230df294645bf --- /dev/null +++ b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/full.md @@ -0,0 +1,257 @@ +# IDA-3D: Instance-Depth-Aware 3D Object Detection from Stereo Vision for Autonomous Driving + +Wanli Peng* Hao Pan* He Liu Yi Sun† + +Dalian University of Technology, China + +{1136558142, panhao15320, lhiceu} $@$ mail.dlut.edu.cn, lslwf@dlut.edu.cn + +# Abstract + +3D object detection is an important scene understanding task in autonomous driving and virtual reality. Approaches based on LiDAR technology have high performance, but LiDAR is expensive. Considering more general scenes, where there is no LiDAR data in the 3D datasets, we propose a 3D object detection approach from stereo vision which does not rely on LiDAR data either as input or as supervision in training, but solely takes RGB images with corresponding annotated 3D bounding boxes as training data. As depth estimation of object is the key factor affecting the performance of 3D object detection, we introduce an Instance-Depth-Aware (IDA) module which accurately predicts the depth of the 3D bounding box's center by instance-depth awareness, disparity adaptation and matching cost reweighting. Moreover, our model is an end-to-end learning framework which does not require multiple stages or postprocessing algorithm. We provide detailed experiments on KITTI benchmark and achieve impressive improvements compared with the existing image-based methods. Our code is available at https://github.com/swords123/IDA-3D. + +# 1. Introduction + +Three-dimensional object detection is one of the most important scene understanding tasks that has many applications such as autonomous driving and virtual reality. It classifies objects and estimates oriented 3D bounding boxes of physical objects from input sensor data. According to the type of sensor, 3D object detection can be divided into point cloud-based methods [6, 5, 11, 21, 30, 24, 16, 15, 28, 13], monocular image-based methods [3, 20, 19, 27, 12, 22, 1, 25, 18] and binocular image-based methods [4, 14, 23, 25]. Three-dimensional object detection based on point clouds such as those from LiDAR can achieve the best performance, but LiDAR sensors are the most expensive. More + +over, some 3D datasets do not provide LiDAR data, such as PASCAL3D+ [26], which annotates 3D bounding boxes by means of the CAD model. Monocular cameras are the cheapest and most convenient to install, but 3D detection using only a single image inherently lacks reliable depth information. Binocular cameras are not expensive and can provide denser information for small objects in the distance compared to LiDAR and inherently provide absolute depth information compared to monocular cameras. We therefore focus on stereo-based 3D object detection in this paper. + +Stereo-based 3D object detection takes stereo pairs of images as input and oriented 3D bounding boxes of objects as output. Since the depth error from stereo vision increases quadratically with distance, 3D object detection without depth maps in the training process is a difficult task if solely relying on the annotated 3D bounding boxes [4, 14]. Currently, stereo-based 3D object detection without supervised depth still lags behind in localizing objects. We hope to bridge the gap between two kinds of methods, with and without depth-data supervision, so that the performance of 3D object detection with only annotated 3D bounding boxes of physical objects can approach the performance of those that use depth images as supervision. + +In this work, we propose a 3D object detection approach from stereo vision that does not rely on LiDAR data either as input or as supervision during training but solely takes RGB images with corresponding annotated 3D bounding boxes as training data. It first extracts the objects from the background by stereo Region Proposal Network (RPN) to remove its interference on 3D object detection. Because depth estimation of an object instance is the key factor affecting the performance of 3D object detection, we design a separate instance-depth-aware (IDA) module that predicts the center depth of an object's 3D bounding box. Unlike previous stereo-based methods that compute the correspondence of each pixel between two images [10, 2], we measure the correspondence of each instance, paying more attention to the global spatial information of the object. To reduce the error of depth estimation for a distant object, we adaptively adjust the range of disparity levels in the cost volume + +according to the location of the object and transform the uniform quantization of the disparity level into nonuniform quantization. The matching cost is also reweighted to make depth estimation more discriminative by penalizing the depth levels that are not unique for an object instance and promoting the depth levels that have high probabilities. The overview of the proposed architecture is illustrated in Fig. 1. + +Our main contributions are listed as follows: + +- We propose a stereo-based end-to-end learning framework for 3D object detection that does not rely on depth images either as input or for training and does not require multistage or postprocessing algorithms. +- We introduce an instance-depth-aware (IDA) module that accurately predicts the depth of the 3D bounding box's center by instance-depth awareness, disparity adaptation and matching cost reweighting, thus improving the accuracy of 3D object detection. +- We provide detailed experiments on the KITTI 3D dataset [7] and achieve state-of-the-art performance compared with the stereo-based methods without depth map supervision. + +# 2. Related Work + +There are two scenarios for 3D object detection: indoor and outdoor. This work briefly reviews the recent literature on outdoor autonomous driving based on LiDAR point clouds, monocular images and stereo images. + +Point Clouds for 3D Object Detection. Because LiDAR can provide the three-dimensional information of objects, it is naturally used as input to detect 3D objects and is currently the most accurate method for 3D object detection. LiDAR data on 3D object detection can be represented in various ways, including direct 3D point clouds [21, 24], 3D volumetric forms [30, 6], and 2D-front-view or bird's-eye-view images [13, 11, 16, 15, 28, 5]. Point clouds and volumetric forms can fully utilize the 3D information of the object and have a one-to-one relation with the 3D pose. However, they are both high-dimensional and computational inefficient methods. To reduce the high dimensionality of 3D representations, some works project 3D point clouds to front-view or birds-eye-view images, leveraging mature convolutional networks for 3D object localization. + +Monocular Images for 3D Object Detection. Because monocular cameras are cheaper and more flexible to install than LiDAR or stereo cameras, 3D object detection using monocular cameras naturally becomes a requirement for industry and academia. Some recent techniques [3, 19, 12, 20] extend the state-of-the-art 2D object detector to regress the orientation of the object's 3D bounding box and its dimensions by transferring 2D detection, orientation, and scale + +estimation into 3D space. Others [27, 22, 1] localize 3D objects from a monocular RGB image via geometric reasoning in both the observed 2D projection and the unobserved depth dimension. Because monocular image inherently has scale ambiguity in depth estimation and the error in depth estimation increases greatly with distance, its performance is not as good as the other two methods. + +Stereo Pairs of Images for 3D Object Detection. 3D object detection relying on LiDAR has achieved high accuracy. However, LiDAR sensors are expensive and therefore cannot enable intelligent driving systems to be used by millions of users. With the development of deep learning methods, there is hope that the accuracy of 3D object detection based on stereo vision will be improved. Stereobased 3D object detection methods usually create 2D or 3D object proposals with extra geometric constraints [4, 14], which are then used to regress the object pose. 3DOP [4] makes use of the 3D point cloud features estimated from a stereo camera pair to estimate each 3D candidate proposal by a greedy algorithm; then, a 3D object detection network taking 3D object proposals as input is presented to predict accurate 3D bounding boxes. Stereo R-CNN [14] uses a coarse-to-fine 3D bounding box estimation method, where a stereo RPN is exploited to predict 2D left-right boxes, s-parse keypoints, viewpoints, and object dimensions for calculating a coarse 3D object bounding box; then, the Stereo R-CNN recovers the accurate 3D bounding box by a region-based photometric alignment using left and right RoIs. + +The accuracy of depth-based 3D object detection relies heavily on the quality of depth estimation. Some works have focused on stereo-based depth estimation to obtain the true 3D bounding box of objects. For example, LiDAR data have been incorporated into the training step as supervision for depth estimation [25, 29], which is called pseudo-LiDAR [25]. Pseudo-LiDAR introduces a two-step approach for stereo-based 3D object detection. It first estimates the depth map from stereo vision using the supervised depth information generated by LiDAR and then converts the depth map into a 3D point cloud and takes advantage of existing LiDAR-based models for 3D object detection. + +Different from the above methods, considering that some 3D datasets, such as PASCAL3D+ [26], do not have LiDAR data, we only take RGB images with corresponding annotated 3D bounding boxes as training data, and propose an entire instance depth aware 3D object detection approach. Our approach is closely related to recent work [14] that uses solely training data of RGB images and corresponding annotated 3D bounding boxes. This prior work defines four semantic keypoints indicating the four corners at the bottom of the 3D bounding box. The 3D box can be solved by minimizing the reprojection error of the 2D boxes by perspective keypoints in the first stage; then, the method + +![](images/8959390e972cbb997282fa10be610eac2d5e71e95f75149921481ee4ad8183c3.jpg) +Figure 1. Overview of the proposed IDA-3D. Top: Stereo RPN takes a pair of left and right images as input and outputs corresponding left-right proposal pairs. After stereo RPN, we predict position, dimensions and orientation of 3D bounding box. Bottom: Instance-depth-aware module builds a 4D cost volume and performs 3DCNN to estimate the depth of a 3D bounding box center. + +solves the disparity of the 3D bounding box center for further dense 3D-box alignment in the second stage. In contrast to this prior work, our approach achieves better performance in 3D object detection by designing a novel end-to-end instance-depth-aware module that directly predicts the single-variable depth $z$ of the 3D bounding box's center, rather than making predictions by additional keypoints and dense 3D box alignment. Instead of pixel-level post-processing, our instance depth estimation module makes the features extracted by the 3D convolution focus on the object by end-to-end training, reducing the interference of cluttered background on the depth estimation of object. + +# 3. Method + +We propose a stereo 3D object detection approach where the training data are solely RGB images with corresponding annotated 3D bounding boxes, without taking depth obtained from LiDAR as input or as intermediate supervision. Rather than design any step of the stereo algorithm by hand, we learn an end-to-end mapping from an image pair to object 3D bounding boxes using deep learning. Instead of constructing a machine learning architecture as a black box, we recognize that the 3D object detection error stems entirely from the error in depth estimation $z$ of a 3D bounding box center, thus we separately design a regression model to obtain the instance depth. In this paper, the coordinate $z$ of a 3D bounding box center is also called instance depth. + +Furthermore, we guide architecture design of object depth estimation by instance-depth awareness, disparity adaptation and matching cost reweighting. Therefore, we learn an effective Instance-Depth-Aware 3D Object Detection model (IDA-3D). Our architecture is illustrated in Fig. 1. In the remainder of this section, we discuss each component in detail. + +# 3.1. Overview of Object Instance Detection + +We first extract a pair of Regions of Interest (RoI) for each object in the left and right images with the stereo RPN module inspired by [14], the purpose of which is to avoid the complex matching of all pixels between the left and right images and eliminate the adverse effect of background on object detection. The stereo RPN creates an union RoI for each object whose size and location are the same on the left and right images so that the union RoI ensures the starting points of each pair of RoIs. After applying RoIAlign [8] on left and right feature maps respectively, the left and right RoI features are then concatenated and fed into the stereo regression network to predict position, orientation and dimensions of 3D bounding box respectively, where the position of the 3D bounding box can be represented by its center position $(x,y,z)$ . Since the 3D depth of object center has a large dynamic range and its deviation accounts for the majority of the difference in 3D object detection, we separately design the IDA module to obtain the depth of a 3D bound- + +
NameLayer SettingOutput Dimension
inputD × 16 × 16 × 96
conv03 × 3 × 3, 64D × 16 × 16 × 128
3 × 3 × 3, 128
maxpool0maxpooling stride=(1,2,2)D × 8 × 8 × 128
conv13 × 3 × 3, 128D × 8 × 8 × 128
3 × 3 × 3, 128
maxpool1maxpooling stride=(1,2,2)D × 4 × 4 × 128
conv23 × 3 × 3, 64D × 4 × 4
3 × 3 × 3, 1
avgpoolavgpooling stride=(4, 4)D × 1 × 1
+ +Table 1. Parameters of the proposed IDA model. D denotes the number of depth levels. + +ing box center which is also called instance depth in this paper. In stereo regression network, we also predict the 2D bounding box as the input of IDA module during inference. + +# 3.2. Instance Disparity (Depth) Estimation + +Unlike previous stereo networks that regress the disparity of each pixel between a rectified stereo images, we are specifically interested in computing the disparity of each instance to locate its position. Instead of computing the correspondence of each pixel between two images, we measure the correspondence of the same instance between two images, paying more attention to the global spatial information of the object. Therefore, after forming a cost volume of dimensionality $\text{disparity} \times \text{height} \times \text{width} \times \text{feature size}$ by concatenating the left and right feature maps across each disparity level, we employ two consecutive 3D convolution layers, each followed by a 3D max-pooling layer, to learn and perform down sampling on feature representations from the cost volume. Since disparity is inversely proportional to depth and both represent the position of an object, we transform the disparity into depth representation after formulating cost volume. Relying on the networks regularization, the down sampled features by 3D CNN are finally merged into depth probability of the 3D box center. By performing the sum of each depth $z$ weighted by its normalized probability, the depth of a 3D box center is finally obtained, as shown in Eq. 1, where $N$ denotes the number of depth levels and $P(i)$ the normalized probability. + +$$ +\hat {z} = \sum_ {i = 0} ^ {N} z _ {i} \times P (i) \tag {1} +$$ + +We train our model with supervised learning using ground truth depth of 3D box center, where supervised regression loss is defined using the error between the ground + +![](images/2ccb1595e2a029029a680a34722c2fad0ac2a32c95f5a3c9ecbfcde8f31c61f5.jpg) +Figure 2. Relation between disparity and depth. + +truth depth $(z)$ and the model's predicted depth $(\hat{z})$ in Eq. 2: + +$$ +L (z, \hat {z}) = \operatorname {s m o o t h} _ {L 1} (\hat {z} - z) \tag {2} +$$ + +As shown in IDA module in Fig. 1, if the disparity level of a car is $d_{i}$ , when its left and right feature maps shift to the opposite direction, the two feature maps match exactly at $d_{i}$ , as shown by the red mark in 4D cost volume. The IDA module output the maximum probability at $Z_{i}$ , where $Z_{i}$ is the depth value corresponding to $d_{i}$ . + +Our model parameters are shown in Table 1. Fig. 3 takes the depth estimation of a car as an example to visualize this process, where the bright yellow and dark blue color in the feature maps indicate stronger activation and the lower activation respectively. Given the features of cost volume as input, it can be seen that the feature maps extracted by our network are gradually changed from low-level features of the car to high-level global features of its center depth probability. Meanwhile, the depth level that is unique for the car results in the highest probability as shown at the bottom of the figure. This phenomenon illustrates that the proposed model is effective to learn the probability of correct depth level for an object instance. + +# 3.3. Instance Disparity (Depth) Adaptation + +Most previous works optimize the accuracy of disparity estimation. However, for the same disparity error, the error in depth increases quadratically with distance. It means that the influence of the disparity error in depth estimation of a far-away object is greater than a nearby one. This is the key factor that leads to poor 3D object detection. In order to adapt the model and loss function to lay more emphasis on a far-away object, we change the disparity level in cost volume from uniform quantization to nonuniform quantization where the farther the object is, the less the partition cell between two consecutive disparity levels. In this way, the depth of a distant object can be more precisely estimated. The nonuniform quantization or disparity is shown in Fig. 2. We take advantage of nonuniform disparity quantization + +![](images/72669da3030fd0d3ac65f6e7d27c4bcf9d37b559291b79c39bd0710256ab2a6b.jpg) +Figure 3. Global spatial information extraction process. Feature maps are sampled at a channel and sorted by the depth level. The bright yellow color in the feature map indicates stronger activation, while dark blue indicates the lower activation. + +![](images/cb23af74dcf7aef67d3d5f6652c55c20eb5ef742f8012899187d53531069fca1.jpg) +Figure 4. A graphical depiction of the matching cost reweighting which we propose in this work. The two cost curves along each depth level before and after reweighting are respectively shown in black and red. + +converted from uniform depth quantization via the following transform ( $f_{u}$ : horizontal focal length, $b$ : baseline of binocular camera), + +$$ +D = \frac {f _ {u} \times b}{z} \tag {3} +$$ + +In addition to the nonuniform quantization, we don't have to estimate the depth in the range of $0 - 80\mathrm{m}$ since the depth of a car is inversely proportional to its size in the image. Given camera intrinsic parameters, we can roughly calculate the range according to the width of the union box in the image. We therefore reduce the searching range in depth estimation to $[z_{\min}, z_{\max}]$ , where $z_{\min}$ and $z_{\max}$ represent the minimum and maximum depth values of each object respectively. Such depth adaption minimizes the average partition cell of quantization for a fixed number of disparity levels, thus improving depth estimation. + +# 3.4. Matching Cost Reweighting + +As Eq. 1 indicates that the depth of a 3D box center is a weighted average of all depth levels, not the most likely, which may lead to non-discriminative depth estimation. To penalize the depth levels that are not unique for an object instance and promote the depth levels that have high probabilities, we reweight the matching cost. The reweighting + +is split into two parts, with the first part (shown in the 4D cost volume of Fig. 1) in 4D volume packing a difference feature map between the left and right feature maps across each disparity level and second part (shown in the 3DCNN in Fig. 1) in 3DCNN employing attention mechanism on depth. The 4D volume with these residual feature maps will make the subsequent 3D CNN take into account the difference between left and right feature maps in a certain depth level and refine depth estimation, while disparity attention mechanism sets the weight $r_i$ for each channel. The correlation score $r_i$ that is obtained by calculating the correlation between left and right feature maps on each disparity is defined as: + +$$ +r _ {i} = \cos < F _ {i} ^ {l}, F _ {i} ^ {r} > = \frac {F _ {i} ^ {l} \cdot F _ {i} ^ {r}}{\left\| F _ {i} ^ {l} \right\| \cdot \left\| F _ {i} ^ {r} \right\|} \tag {4} +$$ + +where $r_i$ is the weight for the $i^{th}$ channel, $\cos$ is the cosine similarity function, and $F_i^l$ , $F_i^r$ are the $i^{th}$ pair of feature maps in the cost volume. The two cost curves along each depth level before and after reweighting are respectively shown in black color and red color in Fig. 4. We can see that the gradient of the reweighted curve is steeper than that of the non-weighted curve which shows the increased probability of correct instance depth. + +# 3.5. 3D Object Detection + +In addition to the instance depth estimation, we also need to estimate the horizontal and vertical coordinates $(x,y)$ of the object center, object stereo bounding boxes, dimensions and viewpoint angle to complete the task of 3D object detection. We design a six-parallel fully-connected network with the concatenated left and right RoI features as input. After the depth of the instance is determined, the coordinates $(x,y)$ of the object center in the left cameras coordinate system can be calculated according to its projections + +![](images/d85d979182e581b25dd10bed2b2341313475eb339277a5f7bea6348b40405e9f.jpg) +Figure 5. Relation between object orientation $\theta$ and the viewpoint angle $\alpha$ . + +$(u,v)$ on the left and right image pairs as follows, + +$$ +x = \frac {\left(u - c _ {u}\right) \times z}{f _ {u}} \quad y = \frac {\left(v - c _ {v}\right) \times z}{f _ {v}} \tag {5} +$$ + +where $(c_u, c_v)$ denotes the camera center and $f_u, f_v$ are the horizontal and vertical focal length. From Eq. 5, we can observe that the estimation of the horizontal and vertical position of the 3D box center is affected by the result of depth estimation, which indicates the significant role of depth estimation in object detection. Because of no translation in the vertical coordinate $(y)$ between the left and right center of an object instance, this branch estimates the offset $(\Delta u^l, \Delta v, \Delta u^r)$ to the groundtruth directly. + +For the orientation regression as shown in Fig. 5, we estimate the viewpoint angle which accounts for the change in appearance using the method similar to Multibin in [20]. The orientation angle $\theta$ can be calculated by Eq. 6, which illustrates that the result of depth estimation affects the orientation as well. + +$$ +\theta = \alpha + \tan^ {- 1} \frac {x}{z} \tag {6} +$$ + +For the dimension regression, we produce dimension offsets $(\Delta h, \Delta w, \Delta l)$ to the mean class sizes $(\bar{h}, \bar{w}, \bar{l})$ , which are the mean dimensions over all objects of the given class. The dimensions of 3D bounding box can be calculated via the following transformation, + +$$ +h = \bar {h} e ^ {\Delta h} \quad w = \bar {w} e ^ {\Delta w} \quad l = \bar {l} e ^ {\Delta l} \tag {7} +$$ + +# 3.6. Implementation Details + +The whole multi-task loss can be formulated as: + +$$ +\begin{array}{l} L = w _ {1} L _ {r p n} + w _ {2} L _ {2 D b o x} + w _ {3} L _ {3 D} ^ {(u, v)} + w _ {4} L _ {3 D} ^ {z} \tag {8} \\ + w _ {5} L _ {d i m} + w _ {6} L _ {\alpha} \\ \end{array} +$$ + +where the $L_{rpn}$ and $L_{2Dbox}$ denote the loss of 2D boxes on stereo RPN module and stereo regression module respectively, $L_{3D}^{(u,v)}$ is the regression loss for the projection of object instance centers and $L_{3D}^{z}$ the instance depth of objects, + +$L_{dim}$ the offset regression loss for the 3D bounding box dimensions, $L_{\alpha}$ the orientation loss which includes a classification loss for the discrete angle bins and a regression loss for the angle bin offsets, $w_{1} - w_{6}$ the trade-off parameters to balance the whole multi-task loss. + +We employ two weight-share ResNet50 [9] with FPN [17] architecture as the feature extractor. In the training stage, we flip the images in the training set, exchange the left and right image and mirror the 2D boxes annotation, viewpoint angle and 2D projection of centroid at the same time for data augmentation. For the IDA module, we divide the depth between $z_{\mathrm{max}}$ and $z_{\mathrm{min}}$ into 24 levels for the estimation of the object center depth. We use the 2D boxes obtained from the RPN module as the input to the IDA module, as this module can provide more samples for training. While during inference, we use the 2D boxes obtained from the 2D regression module as input of IDA module because it provides fewer boxes with more precision which can reduce the computation cost. We train our network using SGD optimizer with the initial learning rate 0.02, the momentum 0.9 and the weight decay 0.0005. Meanwhile, we set the batch size to 4 on two NVIDIA 2080Ti GPUs and train 80000 iterations with about 26 hours. + +# 4. Experiment + +We evaluate our approach on the KITTI 3D object detection dataset which contains 7481 training images and 7581 testing images. We follow the same training and validation splits as [4], each contains 3712 and 3769 images respectively. We report 3D average precision $(AP_{3D})$ and birds-eye-view average precision $(AP_{bev})$ on car category with the IoU thresholds at 0.5 and 0.7, where each category is divided into easy, moderate, and hard case according to the 2D box height, occlusion and truncation levels. In Sec. 4.1, we give our results and make comparisons to monocular-based [3, 1, 18] and stereo-based methods [4, 23, 14] quantitively. Qualitative results are given in Sec. 4.2. + +# 4.1. Results of Instance-Depth-Aware Approach + +We conduct experiments both qualitatively and quantitatively. For comparison, we summarize the main results from monocular to binocular methods in Table 2. Our method outperforms previous monocular-based methods across all IoU thresholds by a significant margin in easy, moderate and hard cases. Comparing to stereo-based methods, we obtain the highest $AP_{3D}$ and $AP_{bev}$ at 0.5 IoU and 0.7 IoU. Taking an $AP_{3D}$ of $60.04\%$ using IoU $= 0.5$ in hard case as an example, our method yields consistent improvement over other methods, 3DOP $(30.09\%)$ , TLNet $(37.99\%)$ and Stereo R-CNN $(57.24\%)$ . Results in other cases follow similar trends which indicate the consistent detection performance of our approach. Specifically, the result of our method $AP_{bev} = 67.3\%$ in hard case at 0.5 IoU outperform- + +
MethodSensorIoU = 0.5IoU = 0.7
EasyModeHardEasyModeHard
Mono3D [3]M30.50/25.1922.39/18.2019.16/15.525.22/2.535.19/2.314.13/2.31
M3D-RPN [1]M55.37/48.9642.49/39.5735.29/33.0125.94/20.2721.18/17.0617.90/15.21
Xinzhu et al. [18]M72.64/68.8651.82/49.1944.21/42.2443.75/32.2328.39/21.0923.87/17.26
3DOP [4]S55.04/46.0441.25/34.6334.55/30.0912.63/6.559.49/5.077.59/4.10
TLNet [23]S62.46/59.5145.99/43.7141.92/37.9929.22/18.1521.88/14.2618.83/13.72
Stereo R-CNN [14]S87.13/85.8474.11/66.2858.93/57.2468.50/54.1148.30/36.6941.47/31.07
oursS88.05/87.0876.69/74.5767.29/60.0170.68/54.9750.21/37.4542.93/32.23
+ +Table 2. ${AP}_{bev}/{AP}_{3D}$ (in %) of the car category on KITTI validation set,where S denotes binocular image pair as input and M denotes monocular image as input. + +
MethodAPbev / AP3d (IoU = 0.7)
EasyModeHard
ours70.68/54.9750.21/37.4542.93/32.23
PL+FP [25]69.7/54.948.1/36.441.8/31.1
PL+AVOD [25]74.0/56.754.7/37.947.3/34.3
+ +s Stereo R-CNN (58.93%), achieving significant improvement over 8.37%. Similar observation can be seen in $AP_{3D}$ (ours/Stereo R-CNN = 74.57%/66.28%) with 8.29% performance improvement. This may be due to the nonuniform quantization strategy in IDA module which makes our method more robust for the distant objects by reducing the depth estimation error. + +We also compare our approach to the Pseudo-LiDAR [25] of stereo version which follows a two-stage network: i) depth map estimation via PSMNet [2], ii) 3D bounding box regression via F-PointNet [21] or AVOD [11]. However, it is unfair to compare our approach with Pseudo-LiDAR since we do not use the depth map as intermediate supervision. Our method still achieves comparable performance as shown in Table 3. Besides, our method has less complexity because we form an end-to-end network with a light-weight IDA module compared to PSMNet and obtains a high speed of $>12$ frames per second on one NVIDIA 2080Ti GPU. + +Ablation Study on the Disparity Adaptation. In order to verify the benefits of our disparity adaptation strategy, we evaluate the depth estimation error according to the distance using different disparity quantization strategies. The results of depth error are shown in Fig. 6. The error is calculated as the mean differences between the predicted 3D locations and the ground truth for detections with 2D IoU $>0.5$ . As expected, using nonuniform quantization strategy leads to more reduction of depth estimation error as the distance in + +![](images/ec893a5d716ae678a48a3b5f068dfd1c643cb1b9a6ec08ca45365c0ac659c5f8.jpg) +Figure 6. The depth estimation error from different disparity quantization strategies. + +Table 3. ${AP}_{bev}/{AP}_{3D}$ (in %) of the car category on KITTI validation set between Pseudo-LiDAR [25] and our method. + +
MethodMetricIoU = 0.7
EasyModeHard
UniformAPbev46.5932.3529.58
AP3D34.5723.4021.19
NonuniformAPbev67.0149.1742.23
AP3D52.1636.4030.93
Nonuniform + AdaptionAPbev70.6850.2142.93
AP3D54.9737.4532.23
+ +Table 4. The benefits of the disparity quantization strategy. + +crease. For the objects $50\mathrm{m}$ away, it can be seen from the histogram that nonuniform quantization has a greater impact on the accuracy of depth estimation. This phenomenon proves our analysis that the distant objects, which have less interval between two consecutive disparity levels, can achieve better results of depth estimation. Since the depth estimation of object instance is the key factor affecting the performance of 3D object detection, our nonuniform quantization strategy performs significant improvements compared to uniform quantization strategy. The detailed statistics can be found in the first two rows of Table 4. + +![](images/8f6254e53f8a6fe590608891ffb518cf37605c7efc4fec7e0f9508533238033c.jpg) +Figure 7. Quantitative results on several scenes in KITTI dataset. At the first row are the ground truth 3D boxes and the predicted 3D boxes projected to the image plane. We also show the detection results on point cloud in order to facilitate observation. The predicted results are shown in yellow and the ground truth are shown in blue. + +![](images/84f1ca418985f33c911cafac320f3fa5d872f4552aa312ec112174f6f3a863da.jpg) + +![](images/315faecb6c8055b2a453cae16e9ec94b5a05d14e5c79deaac82ae63dfa9efce8.jpg) + +
Diff.Att.APbev / AP3d (IoU = 0.7)
EasyModeHard
✓✓70.68/54.9750.21/37.4542.93/32.23
✓×67.08/52.1749.90/36.8542.65/31.99
×✓67.52/52.0348.51/35.4741.86/29.88
××66.25/51.8247.41/35.6040.88/30.18
+ +Table 5. Improvements of the matching cost reweighting. + +Applying the same amount of depth quantization levels, smaller search range means better performance in instance depth estimation. Therefore, we adaptively reduce the search range of disparity via the size of objects in 2D images as described in Sec. 3.3. As expected, the adaptive strategy provides more precise disparity quantization and thus achieves better performance in 3D bounding box estimation as shown in the last row of the Table 4. + +Ablation Study on the Matching Cost Reweighting. Table 5 shows the effect of the matching cost reweighting strategy. In our approach, we use two strategies to control and promote the peak of depth probability. The first strategy is concatenating a difference feature map between a left and right feature map with original cost volume, which is represented by Diff. in Table 5. And the second strategy is employing attention mechanism in 3DCNN, which is represented by Att. in Table 5. We conduct ablation experiments within our framework to verify the contributions of each strategy. Through Att. and Diff., we penalize the depth levels that are not unique for an object instance and promote the depth levels that have high probability. As a result, our method obtains performance improvements by combining two strategies together. + +# 4.2. Qualitative Results + +Fig. 7 shows qualitative detection results on several scenes in KITTI dataset. It can be observed that in the com + +mon street scenes, our method can accurately detect objects in the scene and the detected 3D boxes are well aligned on both the front-view images and point cloud. Especially when the objects are very far-away from the cameras, our method is still able to obtain accurate detection results as shown in (a) and (b), which benefits from our IDA module. In the cases that too many vehicles are occurred in the scene or heavily occluded by others, our method also has the potential to successfully locate these objects as shown in (c). + +# 5. Conclusion + +In this work, we propose an end-to-end learning framework for 3D object detection based on stereo images in autonomous driving. It does not rely on depth images either as input or for training and does not require multistage or postprocessing algorithms. A stereo RPN module is introduced to produce a pair of union RoI to avoid complex matching of the same object in a left-right image pair and reduce the interference of background on depth estimation. Without dense depth maps as supervision, the specially designed instance-depth-aware (IDA) module focuses on objects and directly performs the instance depth regression. Moreover, our approach pays more attention on far-away objects by disparity adaptation and matching cost reweighting. Our approach has a lightweight network architecture and achieves impressive improvements over the existing image-based performance. Comparing to some methods with depth map supervision, our approach obtains comparable performance as well. + +# Acknowledgments + +The work was supported by NSFC Grant (U1708263). We also thank Super-computing Center of Dalian University of Technology for providing a high performance computing platform. + +# References + +[1] Garrick Brazil and Xiaoming Liu. M3d-rpn: Monocular 3d region proposal network for object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 9287-9296, 2019. +[2] 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. +[3] Xiaozhi Chen, Kaustav Kundu, Ziyu Zhang, Huimin Ma, Sanja Fidler, and Raquel Urtasun. Monocular 3d object detection for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2147-2156, 2016. +[4] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals using stereo imagery for accurate object class detection. IEEE transactions on pattern analysis and machine intelligence, 40(5):1259-1272, 2017. +[5] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1907-1915, 2017. +[6] Martin Engelcke, Dushyant Rao, Dominic Zeng Wang, Chi Hay Tong, and Ingmar Posner. Vote3deep: Fast object detection in 3d point clouds using efficient convolutional neural networks. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1355-1361. IEEE, 2017. +[7] 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. +[8] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. +[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. +[10] 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. +[11] Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven L Waslander. Joint 3d proposal generation and object detection from view aggregation. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1-8. IEEE, 2018. +[12] Jason Ku, Alex D Pon, and Steven L Waslander. Monocular 3d object detection leveraging accurate proposals and shape reconstruction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11867-11876, 2019. +[13] Bo Li. 3d fully convolutional network for vehicle detection in point cloud. In 2017 IEEE/RSJ International Conference + +on Intelligent Robots and Systems (IROS), pages 1513-1518. IEEE, 2017. +[14] 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. +[15] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-task multi-sensor fusion for 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7345-7353, 2019. +[16] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In Proceedings of the European Conference on Computer Vision (ECCV), pages 641-656, 2018. +[17] 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. +[18] Xinzhu Ma, Zhihui Wang, Haojie Li, Pengbo Zhang, Wanli Ouyang, and Xin Fan. Accurate monocular 3d object detection via color-embedded 3d reconstruction for autonomous driving. In Proceedings of the IEEE International Conference on Computer Vision, pages 6851–6860, 2019. +[19] Fabian Manhardt, Wadim Kehl, and Adrien Gaidon. Roi10d: Monocular lifting of 2d detection to 6d pose and metric shape. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2069-2078, 2019. +[20] Arsalan Mousavian, Dragomir Anguelov, John Flynn, and Jana Kosecka. 3d bounding box estimation using deep learning and geometry. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7074-7082, 2017. +[21] Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum pointnets for 3d object detection from rgb-d data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 918-927, 2018. +[22] Zengyi Qin, Jinglu Wang, and Yan Lu. Monogrnet: A geometric reasoning network for monocular 3d object localization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8851-8858, 2019. +[23] Zengyi Qin, Jinglu Wang, and Yan Lu. Triangulation learning network: From monocular to stereo 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7615-7623, 2019. +[24] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Poincarnn: 3d object proposal generation and detection from point cloud. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-779, 2019. +[25] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8445-8453, 2019. +[26] Yu Xiang, Roozbeh Mottaghi, and Silvio Savarese. Beyond pascal: A benchmark for 3d object detection in the wild. In + +IEEE Winter Conference on Applications of Computer Vision, pages 75-82. IEEE, 2014. +[27] Bin Xu and Zhenzhong Chen. Multi-level fusion based 3d object detection from monocular images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2345-2353, 2018. +[28] Bin Yang, Wenjie Luo, and Raquel Urtasun. Pixor: Realtime 3d object detection from point clouds. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 7652-7660, 2018. +[29] 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. arXiv preprint arXiv:1906.06310, 2019. +[30] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4490-4499, 2018. \ No newline at end of file diff --git a/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/images.zip b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..03866d8b06216dc853339509067c9754878f8cae --- /dev/null +++ b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0c5e8477a6c5c247ee8d061524898183497ad1fd8bc7664d116a5c3197fff25 +size 579854 diff --git a/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/layout.json b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0ab847b4acc5b0b8164cbb36d08756f964525f54 --- /dev/null +++ b/ida3dinstancedepthaware3dobjectdetectionfromstereovisionforautonomousdriving/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:971332627ae6640fe61d6a31e68ebe7285457f4ff9ec71fa54536b5e13376633 +size 302762 diff --git a/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_content_list.json b/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..44d24150bf0527358262e1ee3dbeaea35c9d720e --- /dev/null +++ b/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:904e396c1e63b1f4a8c527d482c95b3a23a00ba64808976920d95dd7c92ad508 +size 68381 diff --git a/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_model.json b/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fd84e8ac5ddf49468f169f3356bf8fab31344f6e --- /dev/null +++ b/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:324f9f18b051e8fede52d436f4aeeb0e8ce2f2daab13ae8a576926f0d758e310 +size 82117 diff --git a/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_origin.pdf b/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b98bf145406260ac0d29e1723304f457197cbda7 --- /dev/null +++ b/ilfoadversarialattackonadaptiveneuralnetworks/3d11da24-bf9f-43dd-9555-8603bca50192_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17cfb2375dbbaab1561f10420d9e8127a6ece9669e7fbe3d817602633ed40867 +size 1414386 diff --git a/ilfoadversarialattackonadaptiveneuralnetworks/full.md b/ilfoadversarialattackonadaptiveneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3145c24d292b941840abbf44714abb6c9102b595 --- /dev/null +++ b/ilfoadversarialattackonadaptiveneuralnetworks/full.md @@ -0,0 +1,276 @@ +# ILFO: Adversarial Attack on Adaptive Neural Networks + +Mirazul Haque Anki Chauhan Cong Liu Wei Yang The University of Texas at Dallas + +{mirazul.haque, axcl70043, cong, wei.yang}@utdallas.edu + +# Abstract + +With the increasing number of layers and parameters in neural networks, the energy consumption of neural networks has become a great concern to society, especially to users of handheld or embedded devices. In this paper, we investigate the robustness of neural networks against energy-oriented attacks. Specifically, we propose ILFO (Intermediate Output-Based Loss Function Optimization) attack against a common type of energy-saving neural networks. Adaptive Neural Networks (AdNN). AdNNs save energy consumption by dynamically deactivating part of its model based on the need of the inputs. ILFO leverages intermediate output as a proxy to infer the relation between input and its corresponding energy consumption. ILFO has shown an increase up to $100\%$ of the FLOPs (floating-point operations per second) reduced by AdNNs with minimum noise added to input images. To our knowledge, this is the first attempt to attack the energy consumption of an AdNN. + +# 1. Introduction + +Deep neural networks (DNNs) have enabled impressive accuracy improvements over traditional machine learning techniques in a variety of tasks, such as object and speech recognition, and machine translation. However, these accuracy improvements depend on the availability of powerful computational resources that necessitate substantial energy consumption [25]. The computation required for deep learning research doubles every few months, resulting in an estimated 300,000x increase from 2012 to 2018 [23]. The ResNet152 architecture [12] with 152 layers, increases the accuracy by $4.4\%$ over GoogLeNet [26] on the ImageNet dataset but the test-time becomes 14 times slower. The increasing test-time cost has become a problem, especially in cases where faster inference is required (e.g. mobile apps). For example, a visually impaired user may use an app based on DNNs for object detection. The prolonged response time of DNNs will cause fatal issues for the user relying on the app. + +To address these issues, extensive research has studied and proposed models called energy-saving models. There are two types of energy-saving models: On-Device Neural Networks (ODNNs) and Adaptive Neural Networks (AdNNs). ODNN models [16, 15, 30] use lower dimensions of filters or change the dimension of input to the filters to decrease the number of computations, while AdNNs dynamically deactivate a certain part of the model based on different inputs to reduce the number of computations. + +Due to aforementioned damaging consequences, attackers are motivated to attack the energy-saving models. For example, SkipNet [29], an AdNN model, can reduce 50 % of floating-point operations in a ResNet model for the CIFAR-10 dataset. If an attack on the input can increase 35 - 40 % of the reduced flops, the purpose of the SkipNet model would not be served. This type of decrease in performance will eventually jeopardize the reputation of the app or software, which uses the energy-saving model. + +Investigating the robustness of these energy-saving models in terms of energy consumption is needed. The robustness of a machine learning model can be defined as the stability of the model accuracy after adding some noise to input data, i.e., a robust model's accuracy will not deteriorate against noisy inputs. We define a new term energy robustness as the stability of the model's energy consumption after getting a perturbed input. Traditional adversarial machine learning techniques formulate their attacks based on the relation between input and output. However, energy robustness considers the relation between input and its corresponding energy consumption. In Section 4.1 we show that the attack formulation for energy robustness requires detailed knowledge about the model and needs to define the target values for different AdNNs. Before this work, there has not been any technique that can investigate the energy-robustness of a model. In this paper, we are motivated to investigate the robustness of the energy-saving models by generating perturbed images to increase the energy consumption of these models. Specifically, we use AdNN as an example to perform such investigation. In our knowledge, this is the first attempt in this direction. + +However, attacking a model with respect to energy consumption is complicated because it is impossible to find a trail from input to energy consumption during inference. There are multiple systems (e.g., Nvidia TX2 server, FogN-ode, Raspberry Pi), which can measure the energy consumption of machine learning model inference. Although the energy consumption measured using these systems is not dependent on only the model. The measurement is also dependent on the system environment. This also makes it impossible to find out the pattern in energy consumption in different images. If an image inference consumes less amount of energy, then it is difficult to conclude if it is because of the input or the system environment. + +Due to the difficulty of relating input and energy consumption, we attack the energy-saving models by increasing the number of computations during inference. For traditional DNNs and ODNNs, the number of computations during inference is constant i.e., we can not relate the number of computations with input. Although AdNNs change the number of computations based on intermediate layer-wise outputs. Creating a relation between input and intermediate outputs relates input and the number of computations. In this paper, we have explored the relation between inputs and intermediate outputs of AdNNs and attack these models. + +We are proposing ILFO (Intermediate Output-Based Loss Function Optimization) to attack AdNNs. Using the gradient between intermediate outputs and inputs, we create a loss function and optimize that function. Function optimization changes the intermediate outputs and the changed intermediate outputs activate the deactivated part of the AdNN model, increasing the number of computations. In this paper, after giving a brief idea about the different AdNN models (Section 3), we have formulated the idea of ILFO (Section 4.1). In Section 4.2 we have explained the approach ILFO. We have evaluated ILFO based on three characteristics - effectiveness, quality, and efficiency. Our results show that ILFO could increase the reduced Floating-Point Operations (FLOPs) by AdNNs during inference of the input up to $100\%$ . + +Our paper makes the following contributions: + +(i) This is the first work investigating the robustness of neural networks in terms of energy consumption. +(ii) ILFO could increase the reduced FLOPs by AdNNs during inference up to $100\%$ . +(iii) ILFO tries to formulate a generic approach towards attacking all types of AdNNs. + +# 2. Related Works + +AdNNs. There has been an extensive amount of research in the field of decreasing energy consumption during the test-time of CNNs. AdNNs are part of that research. Before proposing AdNNs, many of the earlier works use mod + +![](images/b36624f4e3393dca32db6b33883a88b45e48600dd4861d3ec092b159c3d55059.jpg) +Figure 1. Working mechanism of an AdNN + +els [6, 11, 13, 20, 14] to transfer knowledge to shallower networks. These techniques are not used in training but as the post-processing. Although these networks are not dynamic with respect to the changing inputs. Recently, there has been a number of AdNN models proposed. A few versions of the AdNNs have modified the traditional AdNN model to save energy. Graves et al. [9] explore the halts in Recurrent Neural Networks while Figurnov et al. [7] and Teerapittayanon et al. [28] propose the use of early termination in CNNs. Recently, Wang et al. [29] propose SkipNet that uses gates between the layers to skip a particular layer. Few of the AdNNs are constructed by cascading multiple networks through a simple computation unit. Bolukbasi et al. [2] train a termination policy for cascades of pre-trained CNNs arranged in order of increasing costs. Guan et al. [10] use reinforcement learning to choose between multiple classifiers. Nan et al. [22] use gating techniques to choose a high-cost or low-cost model. + +Adversarial Examples. Adversarial Examples are the input that is fed to machine learning models to change the prediction of the model. In earlier works [4, 21, 5], 'good word attacks' or spelling modifications have long been used to bypass the spam filters. More recently, Szegedy et al. [27] and Goodfellow et al. [8] propose adversarial attacks on deep computer vision models. Karmon et al. [19] propose a technique to attack CNNs in which a localized patch is introduced in an image instead of adding noise to the full image. With a similar approach, adversarial attacks have been extended to various fields like text and speech processing [3, 18], and graph models [31, 1]. Although, all these attacks focus on changing the prediction and do not concentrate on increasing test-time. Our approach is the first to explore that direction. + +# 3. Background + +In this paper, we focus on attacking AdNNs. Figure represents the working mechanism of an AdNN. The main goal of this type of network is to refrain from executing a few layers in a DNN. The AdNNs generate intermedi + +ate outputs before each layer or block. To calculate these outputs, generally, a shallow computing unit (simple CNN, RNN, or linear classifier) is added between two layers or blocks, as shown in the Figure [1]. These intermediate outputs are evaluated against predefined conditions and if the output reaches a certain threshold, the condition is fulfilled. Fulfilling the condition can result in two ways. First, AdNN determines that certain layers or blocks are not required for the inference, and those layers or blocks are skipped. That type of AdNN is called Conditional-skipping AdNN [29]. Second, AdNN terminates the operations within a block or network early by deciding that later part of the operations are not required. We call those AdNNs as Early-termination AdNNs [7, 2]. + +The two AdNNs we have attacked are SkipNet [29] and SACT [7]. Both models are created by modifying ResNet model architecture. In the following Section [4.1], we will discuss the working mechanism of these two models. SkipNet uses gate-based computing units to selectively choose residual blocks. To decide if a block will be skipped or not, SkipNet relies on the gate output corresponding to the block. SACT examines each position of the block input and decides if that position is needed to be processed in the next layer within the block. Halting scores are calculated for each position of the input after each layer for this purpose. + +# 4. ILFO + +# 4.1. Problem Formulation + +Our objective is to attack AdNNs by creating modified inputs which will increase the number of computations of AdNNs during inference. The attack should concentrate on two factors. First, the attacked image should increase the number of computations during inference. Second, the attacked image and original image can not be differentiated. For every AdNN, we define two states of the intermediate outputs - desirable state (des) and current state (cur). State des defines the state of the intermediate outputs for which computations during inference will be maximum. State cur is the current state of the intermediate outputs. For an input $x$ , we search for the perturbation $\delta$ for which $f(x + \delta)$ is minimum. $f(x + \delta)$ is a loss function which represents the difference between $des$ and $cur$ . The optimization function can be represented as, + +$$ +\text {m i n i m i z e} (\delta + c \cdot f (x + \delta)) \text {s u c h t h a t ,} (x + \delta) \in [ 0, 1 ] ^ {n} \tag {1} +$$ + +where $c$ is a suitably chosen positive constant. Our approach formulates the attack for both types of AdNNs and converts the attack in the form of equation (1). + +# 4.1.1 Attacking Early-termination AdNN + +Figure 2 represents the working mechanism of a residual block in SACT. SACT calculates halting scores as the intermediate outputs. Within a residual block, these halting scores are calculated for each position after each layer. In SACT, the condition is the cumulative halting score for a position within a block should be less than 1 to make the position active. In Figure 2 Deep green positions are active while light green positions are inactive. To increase the energy consumption in SACT, the principle approach should be minimizing the halting scores generated at each layer for each position. In that way, the position will be active for more number of layers. Formulating an attack based on the halting score would require a large number of intermediate outputs upon which the computations will depend. Because of this reason, we would use the ponder cost of each position to formulate the attack. Ponder cost $(\rho)$ of a position is the summation of the number of residual units (layers) for which the position is active and the remainder value of the cumulative halting score after exceeding 1. The ponder cost map will store the ponder costs of all input positions for a residual block. In Figure 2 P0, P1, P2, P3 are four spatial positions, $\rho_0, \rho_1, \rho_2, \rho_3$ are the ponder costs of those four positions. The value of $\rho_0$ will be 1 because P0 is active for only one layer, and there is no remainder of the cumulative halting score after exceeding 1. Similarly for $\rho_2$ , the value will be 3.1 because P2 is active for 3 layers and the remainder is 0.1 $(0.2 + 0.1 + 0.8 - 1.0 = 0.1)$ . $\rho_1$ and $\rho_3$ will be 1.0 and 2.1 respectively. Increasing the ponder cost of each position will increase the computation of each position. + +Creating an attack using the ponder cost maps can be complex because the ponder cost maps are multidimensional arrays, which the dimensions can be different for depending on residual blocks. Using resizing and addition, we create a smaller size 2D array to represent the ponder costs. As shown in Figure $\S$ $\rho_{arr}$ represents the generated array and $\rho_{arr}[i][j]$ represents the ponder cost in the $i^{th}$ row and $j^{th}$ column of the $\rho_{arr}$ . To represent our formulated attack using (1), we need to define the ideal behavior of $\rho_{arr}$ . We want each ponder cost of the $\rho_{arr}$ to get increased and reach a certain predefined threshold represented by $\rho_T$ . With each iteration, Perturbation can be added to the input such that, each ponder cost in $\rho_{arr}$ exceeds $\rho_T$ at the end of the iterations. Before inserting perturbation at an iteration, if $\rho_{arr}[i][j]$ has exceeded $\rho_T$ , then the value at $\rho_{arr}[i][j]$ should remain the same after adding perturbation. Otherwise, the value at $\rho_{arr}[i][j]$ should increase. We represent the principle for each iteration in the following way. + +![](images/9a80ccc24b5154f72ffed17955fe3fcf6a28b855c7a87d397c0e59910f07c7ba.jpg) +Figure 2. Working mechanism of a residual block in SACT. + +$$ +\rho_ {a r r} [ i ] [ j ] (x + \delta^ {\prime} + \Delta) = \left\{ \begin{array}{l} \rho_ {a r r} [ i ] [ j ] (x + \delta^ {\prime}), \text {i f} \\ \rho_ {a r r} [ i ] [ j ] (x + \delta^ {\prime}) > = \rho_ {T} \\ \rho_ {a r r} [ i ] [ j ] (x + \delta^ {\prime}) + \Delta \rho , \text {o t h e r w i s e} \end{array} \right. \tag {2} +$$ + +Here, $\delta^{\prime}$ represents accumulative perturbation before the current iteration, $\Delta$ is the perturbation being added at the current iteration, $x$ is input, $\Delta \rho$ is the value added at position $\rho_{arr}[i][j]$ . Figure 3 represents the approach through example. + +We can represent this maximization problem in equation (2) in the form of equation (1). For this problem, the current state $(cur)$ can be represented by $\rho_{arr}$ . For desirable state $(des)$ , we define another array $\rho_{max}$ with the same dimension as $\rho_{arr}$ , where, $\rho_{max}[i][j] = \rho_T$ for $i = 0,1,2\dots R$ and $j = 0,1,2\dots C$ . $R$ and $C$ represent the dimension of $\rho_{max}$ . Minimizing the difference between $des$ and $cur$ would increase the number of computations. We represent loss function $f(x + \delta)$ as, + +$$ +f (x + \delta) = \sum_ {i = 0} ^ {R} \sum_ {j = 0} ^ {C} \max \left(\rho_ {\max } [ i ] [ j ] - \rho_ {a r r} [ i ] [ j ], 0\right) +$$ + +The max function ensures that any value in $\rho_{arr}$ does not get decreased. We can represent the formulation problem using equation (1) replacing $f(x + \delta)$ . + +# 4.1.2 Attacking Conditional-skipping AdNN + +Figure 4 represents the working mechanism of a SkipNet model containing $N + 1$ residual blocks and gates corresponding to the blocks. A block becomes active if the corresponding gate output exceeds threshold $G_{T}$ . In Figure 4, the gates are represented as $G_{i}$ where $i \in [0, N]$ . $\alpha_{i}(x)$ is a boolean variable which becomes true when $Output(G_{i}) > = G_{T}$ , where $x$ is the input and $G_{T}$ is the threshold value to make a gate active. $\alpha_{i}(x) = Output(G_{i}) > = G_{T}$ + +In the model shown in Figure 4 $\alpha_0(x)$ and $\alpha_N(x)$ are True while $\alpha_{1}(x)$ is False. All the residual blocks will be + +![](images/d0cc9cac81cfaea8d54404c810ba53a79697b0a1330cce7685b7cd09be94a5d5.jpg) +Figure 3. Attack mechanism for SACT. $\rho_{arr}$ values less than $\rho_{T}$ (37 in the example) try to exceed $\rho_{T}$ after each iteration. Values greater than $\rho_{T}$ try to remain the same. + +![](images/a3733a0d48deb48670a15049e9c0e8c8cee1344b8b6b04ec2729d271ebbf0573.jpg) +Figure 4. Working mechanism of SkipNet. $B_0, B_1\ldots, B_N$ represents residual blocks. + +active if $\alpha_0(x)\wedge \alpha_1(x).....\wedge \alpha_N(x)$ is true. If the input image is $x$ and attacked image is $x + \delta$ , then we can formulate the attack in two ways. The first way is to represent it as an optimization problem with constraints. + +$$ +\text {m i n i m i z e} (\delta), \tag {3} +$$ + +such that, $\alpha_0(x + \delta) \wedge \alpha_1(x + \delta) \dots \wedge \alpha_N(x + \delta) = True$ + +Although equation (3) can fulfill our objective, nonlinearity of the constraints can increase the complexity. The other way is to represent the attack using equation (1). We define $G_{arr}$ , a 1D array representing the gate outputs. $G_{arr}[i]$ represents $i^{th}$ gate output. In an iterative way, we add perturbation to the input $x$ such that the gate outputs, which have a value lower than $G_{T}$ , reach $G_{T}$ , and other outputs remain the same. The representation of the principle is, + +![](images/1fa14553f846255a1c87c6066fce903f5626222945becd8faf39a50e31c00233.jpg) +Figure 5. Attack mechanism for SkipNet. $G_{arr}$ values less than $G_{T}$ try to exceed $G_{T}$ after each iteration. Values greater than $G_{T}$ try to remain the same. $G_{T}$ is 0.5 in this example. + +$$ +G _ {a r r} [ i ] \left(x + \delta^ {\prime} + \Delta\right) = \left\{ \begin{array}{l} G _ {a r r} [ i ] \left(x + \delta^ {\prime}\right), \text {i f} G _ {a r r} [ i ] \left(x + \delta^ {\prime}\right) \\ > = G _ {T} \\ G _ {a r r} [ i ] \left(x + \delta^ {\prime}\right) + \Delta g, \text {o t h e r w i s e} \end{array} \right. \tag {4} +$$ + +Here, $\delta^{\prime}$ is the accumulative perturbation before the current iteration, $\Delta$ is the perturbation being added at the current iteration, $\Delta g$ is the value added at position $G_{arr}[i]$ . Figure 5 shows the attack process by an example. + +To formulate the attack in the form of equation (1), we define $G_{arr}[i]$ as current state (cur). We define array $G_{max}$ with same dimension as $G_{arr}$ . $G_{max}$ can be represented as $G_{max}[i] = G_T$ for $i = 0, 1, 2, \dots, N$ and we define $G_{max}$ as $des$ . We define loss function $f(x + \delta)$ as, + +$$ +f (x + \delta) = \sum_ {i = 0} ^ {N} \max (0, G _ {\text {m a x}} [ i ] - G _ {\text {a r r}} [ i ]) +$$ + +By replacing loss function, we formulate the attack using equation (1). + +# 4.2. Algorithm + +We propose ILFO based on the equation (1). ILFO is an iterative technique that generates the best possible perturbation for which the loss function value (mentioned in 4.1) will be minimum. ILFO needs a pre-defining stage before the procedure, which helps to formulate the loss function. Figure 6 represents the pre-defining stage and the overview of ILFO. Sub-figure (a) represents the pre-defining stage. In this stage, desirable (des) and current (cur) states are defined based on the intermediate outputs of AdNN, and a single or multi-dimensional array is used to represent the states. The loss function is defined based on the difference between these two states. Sub-figure (b) represents an overview of ILFO. ILFO takes an image as input and generates the perturbed image using optimizing the loss function, which was defined in the pre-defining stage. + +After adding perturbation to the image, it is important to make sure that the generated values are within the max + +![](images/95a4fa8c05c4fcd99bab62b083fe8c5139cc179a3bc9a899186bfeca7458260f.jpg) +Figure 6. (a) Pre-defining the loss function. (b) Overview of ILFO. + +imum and minimum limit for the inference. We use tanh function for such purpose. The tanh function can convert a value to a new value within the range -1 and 1. We use this property of tanh function and send the distorted image values to a tanh function. The optimization function for ILFO is a modified version of equation (D). + +$$ +\begin{array}{l} \text {m i n i m i z e} \left\| \frac {1}{2} \cdot (\tanh (w) + 1) - I \right\| _ {2} ^ {2} + \tag {5} \\ c \cdot f (\frac {1}{2} \cdot (t a n h (w) + 1)) \\ \end{array} +$$ + +Where, $w$ is the generated perturbation and $I$ is the input. + +# Algorithm 1: ILFO Technique + +![](images/0dc2180e37793caefc5c455a52456e047759c3948568c95eb4bc073afe467754.jpg) + +Steps mentioned in Figure(b) can be explained through Algorithm I. The algorithm takes an image to perturb as input $(I)$ and returns the perturbed image $(F)$ . + +Initializing Perturbation: This step is used for initializing variables. We initialize perturbation $(\delta)$ , minimum loss recorded $(L_{min})$ , most successful perturbation $(\delta_{best})$ and the desired state $(des)$ (Line 2). The desired state is formulated manually using steps of $\Theta$ (a). Number of iterations $(T)$ is also initialized (Line 3). This step is performed only once in the algorithm. + +Optimizing Loss Function: This is a step which gets executed for each iteration. A perturbed image $(I^{\prime})$ is generated by adding perturbation $(\delta)$ to the input image $(I)$ (Line 6). scale method re-scales the $I^{\prime}$ using tanh function. Current output state $(cur)$ is generated from intermediate outputs method using inference of $I^{\prime}$ (Line 7). Two types of loss function values are generated. First loss function $(L_{dist})$ measures Euclidean distance between input image $(I)$ and perturbed image $(I^{\prime})$ (Line 8). Second loss function $(L_{compute})$ measures distance between current $(cur)$ and desirable (des) intermediate output states using loss method (Line 9). loss method is defined during last step of Figure 6(a). The main loss function $(L)$ is created using both $L_{dist}$ and $L_{compute}$ (Line 10). The main loss function is optimized and updated perturbation $(\delta_{new})$ and optimized loss function $(L_{new})$ is generated (Line 11). + +Update Perturbation and Record Most Successful Perturbation: Perturbation variable $(\delta)$ is updated using $\delta_{-new}$ (Line 12). If updated loss $(L_{-new})$ is lesser than the recorded minimum loss $(L_{-min})$ (Line 13), $L_{-min}$ variable is updated (Line 15) and the current solution is recorded as most successful perturbation $(\delta_{-best})$ (Line 14). When the iterations are finished, $F$ is returned as the perturbed output image by adding the most successful perturbation $(\delta_{-best})$ with input image $(I)$ (Line 19). + +# 5. Evaluation + +We investigate the three characteristics of our attacks in this Section: Effectiveness (Increase of computation after attacks), Quality (Image feature preservation after attacks) and Efficiency(Cost comparison of attacks). + +# 5.1. Baseline Technique + +We use Constraint-based technique as one of the baseline techniques. Constraint-based technique is designed based on the equation (3) and it uses an optimization technique with non-linear constraints. We only add perturbation to the border area pixels in this technique. We use this algorithm to attack only SkipNet because attacking SACT in this technique would be resource consuming. Before this attack, we define the minimum number of gates that must be activated $(G_{Max})$ using the attack. The constraint can be defined as $N_G > = G_{Max}$ where $N_G$ is the number of current active gates. The detailed implementation of this technique is mentioned in Appendix A + +Table 1. Different parameters used for Constraint-based technique. + +
ParamsSkipNet
CIFAR-10ImageNet
GMax4229
Iterations30010
Tolerance1e-061e-06
+ +Table 2. Different parameters used for ILFO. + +
ParamsSkipNetSACT
CIFAR-10ImageNetCIFAR-10ImageNet
Iteration1,0003001,000300
Constant100,000100,000100,000100,000
learning rate0.010.010.010.01
+ +Table 3. Different selection parameters used for AdNNs. + +
ThresholdSkipNetSACT
CIFAR-10ImageNetCIFAR-10ImageNet
ρ Threshold for selection--11.525.0
Active gate threshold for selection3624--
+ +# 5.2. Experimental Setup + +Datasets. We evaluated our techniques on the CIFAR10 and ImageNet datasets for SkipNet and SACT models. The reason for selecting the specific datasets was to maintain consistency as both the models have been previously evaluated on the same datasets. + +Models. SkipNet and SACT models can be built using ResNet models. SkipNet uses a modified ResNet-110 model to classify the CIFAR-10 images and a modified ResNet-101 model to classify the ImageNet images. SkipNet models are trained using supervised learning. SACT uses a modified ResNet-32 model to classify the CIFAR-10 images and a modified ResNet-101 model to classify the ImageNet dataset. + +Table 1 and Table 2 represent the parameters used by Constraint-based technique and ILFO respectively. Tolerance is the acceptable relative error in satisfying constraint. The number of iterations for the Constraint-based technique is 10 for thr ImageNet data and 300 for the CIFAR-10 data. Due to the higher time consumption of Constraint-based technique, we have used a less number of iterations. Due to lower cost of ILFO attack, we can use 300 iterations for the ImageNet and 1,000 iterations for the CIFAR-10 dataset. The constant $(c)$ used here is static and kept high because we are more concerned about $f(x + \delta)$ than $\delta$ (equation 1). + +# 5.3. Experimental Results + +# 5.3.1 Effectiveness + +We measure the effectiveness of the attacks by measuring the total increase in FLOPs and increase in AdNN reduced FLOPs during the inference of attacked images. For this purpose, we process all the images from the CIFAR-10 dataset and choose the images with lower inference FLOPs + +count. Similarly, for the ImageNet dataset, we choose 700 images with lower inference FLOPs count. For both the models (SACT and SkipNet), we set a threshold to know if the inference FLOPs count of the image is low or not. For SkipNet, this threshold is dependent on the number of active gates, while for SACT, the threshold relies on ponder cost $(\rho)$ . The threshold values can be found in Table 3. As part of pre-processing, ImageNet images are converted into shape, $224 \times 224 \times 3$ . We compare ILFO with the other two baseline approaches (Gaussian noise and Constraint-based) to measure effectiveness. We have used Constraint-based attacks only on conditional-skipping AdNN (SkipNet) because creating Constraint-based technique for early-termination AdNN (SACT) is time and resource consuming. Figure 7 represents the percentage of the total increase in FLOPs after attacks. ILFO has outperformed Constraint-based technique and could increase the number of FLOPs by $28 - 45\%$ in all the scenarios. + +![](images/9586efd3f16c6cb3e8065decaddebef238d90e9478b78e087c1b6c15c8b69324.jpg) +(d) + +![](images/3f222590cfb54de6257ce902d022b668bd4fb946b205335b75f24a06e398a597.jpg) +(d) + +![](images/610e41e21d9e584de9a54a1f55975ab2401655797b375b9bbcefe28a26bd7b91.jpg) +Figure 7. Percentage of FLOPs increased by two attacks. (a) Results after attacking SkipNet using CIFAR-10 images. (b) Results after attacking SACT using CIFAR-10 images. (c) Results after attacking SkipNet using ImageNet images. (d) Results after attacking SACT using ImageNet images. + +![](images/4c45a9b01f28f4cef8f3bcdca8f4fdd74b8c133506546d8ba4efaf4c89d8969e.jpg) + +The effectiveness of an attack for AdNN can also be shown by the increase in the percentage of reduced FLOPs during inference. AdNN decreases the number of computations of a traditional DNN during inference. We measure the percentage of the reduced FLOPs that is increased using ILFO and show the results in Figure [3] (in Appendix) and Table 4. ILFO has been able to increase up to $100\%$ of the reduced FLOPs in all four scenarios (For two models and two datasets). The average percentage of increasing the reduced FLOPs is between $72 - 91\%$ . These results also explain that not having greater scope to increase the FLOPs is the reason why ILFO could only increase $30 - 35\%$ of FLOPs on average for the ImageNet dataset. + +Table 4. Average increase of reduced AdNN FLOPs by ILFO. + +
EvalSkipNetSACT
CIFAR-10ImageNetCIFAR-10ImageNet
Inc in %84.2981.3672.4991.06
+ +Our results indicate that higher coverage of perturbation is more likely to increase the effectiveness of the attack. Constraint-based technique is less effective than ILFO for both the datasets. Coverage of perturbation is one of the reasons for this. Constraint-based technique changes only 3 -4% of the total number of image pixels. For the CIFAR-10 dataset, the total number of pixels changed by Constraint-based technique is lower than the total pixels changed for the ImageNet dataset. This affects Constraint-based technique's effectiveness against the CIFAR-10 images. In another experiment, we have tried to change pixels of a small patch $(5\times 5)$ on the CIFAR-10 images. The increase in computation does not increase beyond $5 - 10\%$ irrespective of the positions of the patches. + +Based on performance, ILFO is more effective on the CIFAR-10 dataset than the ImageNet dataset. The reason for this effect is that the scope of increasing computations is higher for the CIFAR-10 dataset than the ImageNet dataset. Another noticeable point is that the range of change in FLOPs after the attack for the CIFAR-10 images is larger than the range for the ImageNet images. The initialization of perturbation can be one of the reasons behind this. We use randomized initialization of perturbation, and for few inputs, the optimization can get stuck at a local minima. However, we can refer to the results that there is fewer number of inputs (represented as outliers) for which the increment of computation is low. + +# 5.3.2 Quality + +![](images/9ab41f3889677a024d996c129fb8383b07dee5b02224245f30b3fd801b972ac6.jpg) +Figure 8. (a) Difference in number of edges detected in an perturbed image and original images after different attacks. (b) Difference in Euclidean distances between generated and perturbed images after different attacks. + +![](images/140d2729e2a0b861e4d476476b1f14c9a1e9cba67e37d8bdad749cffe8733c84.jpg) + +We have measured the quality of an image by the syntactic and semantic values of an image. While implementing + +Table 5. Time consumption of the attacks. + +
EvalCIFAR-10ImageNet
ILFOConstraint-basedILFOConstraint-based
Time(sec)229278800560
+ +ILFO, we apply more weightage on increasing computation than minimizing perturbation by choosing a high constant value $(c)$ . Because of this reason, the difference in quality between original and ILFO generated images can be higher than the Constraint-based technique generated image. To measure quality, we select 100 generated images by ILFO and Constraint-based technique. These images are generated by attacking SkipNet model, and the images are taken from the ImageNet dataset. + +We have followed two types of measurement: syntactic difference and semantic difference. Euclidean distance of pixels between two images explains the syntactic difference between images. Canny Edge Detection (CED) and Fast Fourier Transform (FFT) have been used to measure the semantic difference of images. CED and FFT are traditional computer-vision algorithms that have been used by Jang et al. [17] to find out the effect of adversarial attacks on the features of the image. Canny Edge Detection (CED) is used to detect the change in the number of edges in the image after the attack. Fast Fourier Transform is used to convert signals from spatial or temporal domain to the frequency domain and to know change in the detailed feature after the attack (Details in Section B in Appendix). + +Figure 8 and Figure 9 (in Appendix) show the comparison between quality of the original image and attack-generated images. Our results show that, in spite of having syntactic differences in generated images, the effects of both attacks on semantic values of the image are similar. In terms of Euclidean distance between image pixels of the original and generated image, the average change in pixel value for ILFO is highest (Figure 8 (b)). However, the difference in detected edges between the original and the attacked images (Figure 8 (a)) is similar for ILFO and Constraint-based technique (average difference of 616 and 582 respectively). Euclidean distance between generated FFTs also shows the difference in features in the images (Figure 9 in Appendix). The average distance measured with generated FFTs for ILFO is higher by a magnitude of 2 than the Constraint-based technique. All these results con + +clude that, in terms of semantic difference of the generated and original images, both attacks perform similarly. + +# 5.3.3 Efficiency + +We measure efficiency of an attack by measuring time consumption, and power consumption per second of the attack. We select ten CIFAR-10 and ImageNet images from the selected images during efficiency measurement experiments and attacked using ILFO and Constraint-based technique for SkipNet model. We use powerstat tool to measure CPU power consumption during both attacks, ensuring no other process uses CPU during the experiment. The number of iterations used for each technique is mentioned in Table 2. We have noticed that the attacks on the first image in the dataset are more time consuming than the attacks performed on later images. Because of this reason, we show the power consumption of both the attacks on the third image. Table 5 and Figure 10 (In Appendix) show the efficiency of two techniques for one image. Results in Figure 10 show that, with a similar amount of time and power consumption, ILFO performs larger number of iterations (700 more for CIFAR-10 and 290 more for ImageNet). Discussed results suggest that ILFO is more efficient than Constraint-based technique. + +# 6. Conclusion + +This paper presents ILFO [3] the first work investigating the robustness of neural networks in terms of energy consumption. ILFO opens intriguing new problems. First, formulation about the relation between input and its corresponding energy consumption can be further investigated given ILFO uses only the intermediate output as the proxy to formulate such relation. Second, ILFO can be used to develop universal defense for adversarial attacks. Instead of increasing the energy consumption, we can use ILFO to optimize images to the format that the energy consumption is minimum. Last, locating features affecting the energy consumption remains to be an open problem. One plausible solution is to divide the input data space into different regions and use genetic algorithm to search the most impactful features. + +# References + +[1] A. Bojchevski and S. Gunnemann, "Adversarial Attacks on Node Embeddings via Graph Poisoning," in Proceedings of the International Conference on Machine Learning, 2019, pp. 695-704. +[2] T. Bolukbasi, J. Wang, O. Dekel, and V. Saligrama, "Adaptive Neural Networks for Efficient Inference," in Proceedings of the International Conference on Machine Learning, 2017, pp. 527-536. +[3] N. Carlini, P. Mishra, T. Vaidya, Y. Zhang, M. Sherr, C. Shields, D. Wagner, and W. Zhou, "Hidden Voice Commands," in Proceedings of the USENIX Security Symposium, 2016, pp. 513-530. +[4] N. Dalvi, P. Domingos, S. Sanghai, D. Verma et al., "Adversarial Classification," in Proceedings of the International Conference on Knowledge Discovery and Data Mining, 2004, pp. 99-108. +[5] D.Lowd and C.Meek, "Good Word Attacks on Statistical Spam Filters," in Proceedings of the Second Conference on Email and Anti-Spam, 2005. +[6] X. Dong, J. Huang, Y. Yang, and S. Yan, "More is Less: A More Complicated Network with Less Inference Complexity," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017, pp. 5840-5848. +[7] M. Figurnov, M. D. Collins, Y. Zhu, L. Zhang, J. Huang, D. Vetrov, and R. Salakhutdinov, "Spatially Adaptive Computation Time for Residual Networks," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017, pp. 1039-1048. +[8] I. J. Goodfellow, J. Shlens, and C. Szegedy, "Explaining and Harnessing Adversarial Examples," arXiv preprint arXiv:1412.6572, 2014. +[9] A. Graves, "Adaptive Computation Time for Recurrent Neural Networks," arXiv preprint arXiv:1603.08983, 2016. +[10] J. Guan, Y. Liu, Q. Liu, and J. Peng, "Energy-efficient Amortized Inference with Cascaded Deep Classifiers," arXiv preprint arXiv:1710.03368, 2017. +[11] S. Han, H. Mao, and W. J. Dally, "Deep Compression: Compressing Deep neural Networks with Pruning, Trained Quantization and Huffman Coding," arXiv preprint arXiv:1510.00149, 2015. +[12] K. He, X. Zhang, S. Ren, and J. Sun, "Deep Residual Learning for Image Recognition," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770-778. + +[13] Y. He, X. Zhang, and J. Sun, "Channel Pruning for Accelerating Very Deep Neural Networks," in Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 1389-1397. +[14] G. Hinton, O. Vinyals, and J. Dean, "Distilling the knowledge in a neural network," arXiv preprint arXiv:1503.02531, 2015. +[15] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam, "Mobilenes: Efficient convolutional neural networks for mobile vision applications," arXiv preprint arXiv:1704.04861, 2017. +[16] F. N. Iandola, S. Han, M. W. Moskewicz, K. Ashraf, W. J. Dally, and K. Keutzer, "Squeezezenet: Alexnet-level accuracy with 50x fewer parameters and < 0.5 mb model size," arXiv preprint arXiv:1602.07360, 2016. +[17] U. Jang, X. Wu, and S. Jha, "Objective Metrics and Gradient Descent Algorithms for Adversarial Examples in Machine Learning," in Proceedings of the Annual Computer Security Applications Conference, 2017, pp. 262-277. +[18] R. Jia and P. Liang, "Adversarial Examples for Evaluating Reading Comprehension Systems," arXiv preprint arXiv:1707.07328, 2017. +[19] D. Karmon, D. Zoran, and Y. Goldberg, "LaVAN: Localized and Visible Adversarial Noise," arXiv preprint arXiv:1801.02608, 2018. +[20] H. Li, A. Kadav, I. Durdanovic, H. Samet, and H. P. Graf, "Pruning Filters for Efficient Convnets," arXiv preprint arXiv:1608.08710, 2016. +[21] D. Lowd and C. Meek, "Adversarial Learning," in Proceedings of the International Conference on Knowledge Discovery and Data Mining, 2005, pp. 641-647. +[22] F. Nan and V. Saligrama, "Adaptive Classification for Prediction Under a Budget," in Proceedings of the Advances in Neural Information Processing Systems, 2017, pp. 4727-4737. +[23] OpenAI, "AI and Compute," https://openai.com/blog/ai-and-compute/. +[24] H. Qi, E. R. Sparks, and A. Talwalkar, "Paleo: A performance model for deep neural networks," in Proceedings of the International Conference on Learning Representations, 2017. + +[25] E. Strubell, A. Ganesh, and A. McCallum, "Energy and Policy Considerations for Deep Learning in NLP," arXiv preprint arXiv:1906.02243, 2019. +[26] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, "Going Deeper with Convolutions," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2015, pp. 1-9. +[27] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus, "Intriguing Properties of Neural Networks," arXiv preprint arXiv:1312.6199, 2013. +[28] S. Teerapittayanon, B. McDanel, and H.-T. Kung, "Branchynet: Fast Inference via Early Exiting from Deep Neural Networks," in Proceedings of the International Conference on Pattern Recognition, 2016, pp. 2464-2469. + +[29] X. Wang, F. Yu, Z.-Y. Dou, T. Darrell, and J. E. Gonzalez, "Skipnet: Learning Dynamic Routing in Convolutional Networks," in Proceedings of the European Conference on Computer Vision, 2018, pp. 409-424. +[30] X. Zhang, X. Zhou, M. Lin, and J. Sun, "Shufflenet: An Extremely Efficient Convolutional Neural Network for Mobile Devices," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 6848-6856. +[31] D. Zügner, A. Akbarnejad, and S. Gunnemann, "Adversarial Attacks on Neural Networks for Graph Data," in Proceedings of the International Conference on Knowledge Discovery and Data Mining, 2018, pp. 2847-2856. \ No newline at end of file diff --git a/ilfoadversarialattackonadaptiveneuralnetworks/images.zip b/ilfoadversarialattackonadaptiveneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6b92f8f1c71085f91f0618aa7f110c6f31703d10 --- /dev/null +++ b/ilfoadversarialattackonadaptiveneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84636666cec46cf400c535b7c8d3cb13719e136c6349d213eb30b9a483697dff +size 335265 diff --git a/ilfoadversarialattackonadaptiveneuralnetworks/layout.json b/ilfoadversarialattackonadaptiveneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c0d6c839b1b1659990c1d983cda1be3eaf64b8e2 --- /dev/null +++ b/ilfoadversarialattackonadaptiveneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eab4d8e22ca93269e5d6eb546d3e6bb34205f59933b2186c964b4023312a664e +size 391427 diff --git a/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_content_list.json b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..416825d24b8f989d16356c96ff5f280d94c6d782 --- /dev/null +++ b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b286f9ec16882f639fc2c83022d979dc378277201bfaccb7925e296a60289e0 +size 85620 diff --git a/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_model.json b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fc630ea384f3c671b3c9b4a3eec6a96deed7baf3 --- /dev/null +++ b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95c40da8ccb787ec755034e9a0b4a10da02437023760ffe685d92149824647e3 +size 102874 diff --git a/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_origin.pdf b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0b4c1e80b6ffc30fa9327be32abeaeb22e3bd96e --- /dev/null +++ b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/2f7bda4b-8afa-4727-9961-814a0e08e93b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:184a86913eae5e53772e3b576d9ee664342195db650f4dcc38e5dae72aba514b +size 1026956 diff --git a/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/full.md b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bdd34190d193a310158da3476ef2698bcae810e3 --- /dev/null +++ b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/full.md @@ -0,0 +1,409 @@ +# IMRAM: Iterative Matching with Recurrent Attention Memory for Cross-Modal Image-Text Retrieval* + +Hui Chen $^{1}$ , Guiguang Ding $^{1*}$ , Xudong Liu $^{2}$ , Zijia Lin $^{3}$ , Ji Liu $^{4}$ , Jungong Han $^{5}$ $^{1}$ School of Software, BNRist, Tsinghua University + $^{2}$ Kwai Ads Platform; ${}^{3}$ Microsoft Research + $^{4}$ Kwai Seattle AI Lab, Kwai FeDA Lab, Kwai AI Platform + ${}^{5}$ WMG Data Science, University of Warwick + +{jichenhui2012, ji.liu.uwisc, jungonghan77}@gmail.com dinggg@tsinghua.edu.cn, liuxudong@kuaishou.com, zijlin@microsoft.com + +# Abstract + +Enabling bi-directional retrieval of images and texts is important for understanding the correspondence between vision and language. Existing methods leverage the attention mechanism to explore such correspondence in a fine-grained manner. However, most of them consider all semantics equally and thus align them uniformly, regardless of their diverse complexities. In fact, semantics are diverse (i.e. involving different kinds of semantic concepts), and humans usually follow a latent structure to combine them into understandable languages. It may be difficult to optimally capture such sophisticated correspondences in existing methods. In this paper, to address such a deficiency, we propose an Iterative Matching with Recurrent Attention Memory (IMRAM) method, in which correspondences between images and texts are captured with multiple steps of alignments. Specifically, we introduce an iterative matching scheme to explore such fine-grained correspondence progressively. A memory distillation unit is used to refine alignment knowledge from early steps to later ones. Experiment results on three benchmark datasets, i.e. Flickr8K, Flickr30K, and MS COCO, show that our IMRAM achieves state-of-the-art performance, well demonstrating its effectiveness. Experiments on a practical business advertisement dataset, named KWAI-AD, further validates the applicability of our method in practical scenarios. + +# 1. Introduction + +Due to the explosive increase of multimedia data from social media and web applications, enabling bi-directional + +*This work was supported by the National Natural Science Foundation of China (Nos. U1936202, 61925107). Corresponding author: Guiguang Ding + +cross-modal image-text retrieval is in great demand and has become prevalent in both academia and industry. Meanwhile, this task is challenging because it requires to understand not only the content of images and texts but also their inter-modal correspondence. + +In recent years, a large number of researches have been proposed and achieved great progress. Early works attempted to directly map the information of images and texts into a common latent embedding space. For example, Wang et al. [26] adopted a deep network with two branches to, respectively, map images and texts into an embedding space. However, these works coarsely capture the correspondence between modalities and thus are unable to depict the fine-grained interactions between vision and language. + +To gain a deeper understanding of such fine-grained correspondences, recent researches further explored the attention mechanism for cross-modal image-text retrieval. Karpathy et al. [11] extracted features of fragments for each image and text (i.e. image regions and text words), and proposed a dense alignment between each fragment pair. Lee et al. [13] proposed a stacked cross attention model, in which attention was used to align each fragment with all fragments from another modality. It can neatly discover the fine-grained correspondence and thus achieves state-of-the-art performance on several benchmark datasets. + +However, due to the large heterogeneity gap between images and texts, existing attention-based models, e.g. [13], may not well seize the optimal pairwise relationships among a number of region-word fragments pairs. Actually, semantics are complicated, because they are diverse (i.e. composed by different kinds of semantic concepts with different meanings, such as objects (e.g. nouns), attributes (e.g. adjectives) and relations (e.g. verbs)). And there generally exist strong correlations among different concepts, e.g. relational terms (e.g. verbs) usually indicate relation- + +ships between objects (e.g. nouns). Moreover, humans usually follow a latent structure (e.g. a tree-like structure [25]) to combine different semantic concepts into understandable languages, which indicates that semantics shared between images and texts exhibit a complicated distribution. However, existing state-of-the-art models treat different kinds of semantics equally and align them together uniformly, taking little consideration of the complexity of semantics. + +In reality, when humans perform comparisons between images and texts, we usually associate low-level semantic concepts, e.g. objects, at the first glimpse. Then, higher-level semantics, e.g. attributes and relationships, are mined by revisiting images and texts to obtain a better understanding [21]. This intuition is favorably consistent with the aforementioned complicated semantics, and meanwhile, it indicates that the complicated correspondence between images and texts should be exploited progressively. + +Motivated by this, in this paper, we propose an iterative matching framework with recurrent attention memory for cross-modal image-text retrieval, termed IMRAM. Our way of exploring the correspondence between images and texts is characterized by two main features: (1) an iterative matching scheme with a cross-modal attention unit to align fragments across different modalities; (2) a memory distillation unit to dynamically aggregate information from early matching steps to later ones. The iterative matching scheme can progressively update the cross-modal attention core to accumulate cues for locating the matched semantics, while the memory distillation unit can refine the latent correspondence by enhancing the interaction of cross-modality information. Leveraging these two features, different kinds of semantics are treated distributively and well captured at different matching steps. + +We conduct extensive experiments on several benchmark datasets for cross-modal image-text retrieval, i.e. Flickr8K, Flickr30K, and MS COCO. Experiment results show that our proposed IMRAM can outperform the state-of-the-art models. Subtle analyses are also carried out to provide more insights about IMRAM. We observe that: (1) the fine-grained latent correspondence between images and texts can be well refined during the iterative matching process; (2) different kinds of semantics, respectively, play dominant roles at different matching steps in terms of contributions to the performance improvement. + +These observations can account for the effectiveness and reasonableness of our proposed method, which encourages us to validate its potential in practical scenarios. Hence, we collect a new dataset, named KWAI-AD, by crawling about 81K image-text pairs on an advertisement platform, in which each image is associated with at least one advertisement textual title. We then evaluate our proposed method on the KWAI-AD dataset and make comparisons with the state-of-the-art models. Results show that our method per + +forms considerably better than compared models, further demonstrating the effectiveness of our method in the practical business advertisement scenario. The source code is available at: https://github.com/HuiChen24/IMRAM. + +The contributions of our work are three folds: 1) First, we propose an iterative matching method for cross-modal image-text retrieval to handle the complexity of semantics. 2) Second, we formulate the proposed iterative matching method with a recurrent attention memory which incorporates a cross-modal attention unit and a memory distillation unit to refine the correspondence between images and texts. 3) Third, we verify our method on benchmark datasets (i.e. Flickr8K, Flickr30K, and MS COCO) and a real-world business advertisement dataset (i.e. our proposed KWAI-AD dataset). Experimental results show that our method outperforms compared methods in all datasets. Thorough analyses on our model also well demonstrate the superiority and reasonableness of our method. + +# 2. Related work + +Our work is concerned about the task of cross-modal image-text retrieval which essentially aims to explore the latent correspondence between vision and language. Existing matching methods can be roughly categorized into two lines: (1) coarse-grained matching methods aiming to mine the correspondence globally by mapping the whole images and the full texts into a common embedding space, (2) fine-grained matching ones aiming to explore the correspondence between image fragments and text fragments at a fine-grained level. + +Coarse-grained matching methods. Wang et al. [26] used a deep network with two branches of multilayer perceptrons to deal with images and texts, and optimized it with intra- and inter-structure preserving objectives. Kiros et al. [12] adopted a CNN and a Gate Recurrent Unit (GRU) with a hinge-based triplet ranking loss to optimize the model by averaging the individual violations across the negatives. Alternatively, Faghri et al. [5] reformed the ranking objective with a hard triplet loss function parameterized by only hard negatives. + +Fine-grained matching methods. Recently, several works have been devoted to exploring the latent fine-grained vision-language correspondence for cross-modal imagedtext [1, 11, 20, 8, 18, 13]. Karpathy et al. [11] extracted features for fragments of each image and text, i.e. image regions and text words, and aligned them in the embedding space. Niu et al. [20] organized texts as a semantic tree with each node corresponding to a phrase, and then used a hierarchical long short term memory (LSTM, a variant of RNN) to extract phrase-level features for text. Huang et al. [8] presented a context-modulated attention scheme to selectively attend to salient pairwise image-sentence instances. Then a + +![](images/1f42a597b8f980dce1fe9b7a15ba4a879875a7b151a8e9e9d6f9a2a34586bc09.jpg) +Figure 1. Framework of the proposed model. + +multi-modal LSTM was used to sequentially aggregate local similarities into a global one. Nam et al. [18] proposed a dual attention mechanism in which salient semantics in images and texts were obtained by two attentions, and the similarity was computed by aggregating a sequence of local similarities. Lee et al. [13] proposed a stacked cross attention model which aligns each fragment with all other fragments from the other modality. They achieved state-of-the-art performance on several benchmark datasets for cross-modal retrieval. + +While our method targets the same as [11, 13], differently, we apply an iterative matching scheme to refine the fragment alignment. Besides, we adopt a memory unit to distill the knowledge of matched semantics in images and texts after each matching step. Our method can also be regarded as a sequential matching method, as [18, 8]. However, within the sequential computations, we transfer the knowledge about the fragment alignment to the successive steps with the proposed recurrent attention memory, instead of using modality-specific context information. Experiments also show that our method outperforms those mentioned works. + +We also noticed that some latest works make use of large-scale external resources to improve performance. For example, Mithun et al. [17] collected amounts of image-text pairs from the Internet and optimized the retrieval model with them. Moreover, inspired by the recent great success of contextual representation learning for languages in the field of natural language processing, researchers also explored to apply BERT into cross-modal understanding field [2, 14]. However, such pre-trained cross-modal BERT models require large amounts of annotated image-text pairs, which are not easy to obtain in the practical scenarios. On the contrary, our method is general and unlimited to the amount of data. We leave the exploration of large-scale external data to future works. + +# 3. Methodology + +In this section, we will elaborate on the details of our proposed IMRAM for cross-modal image-text retrieval. Figure 1 shows the framework of our model. We will first describe the way of learning the cross-modal feature representations in our work in section 3.1. Then, we will introduce the proposed recurrent attention memory as a module in our matching framework in section 3.2. We will also present how to incorporate the proposed recurrent attention memory into the iterative matching scheme for cross-modal image-text retrieval in section 3.3. Finally, the objective function is discussed in section 3.4. + +# 3.1. Cross-modal Feature Representation + +Image representation. Benefiting from the development of deep learning in computer vision [4, 7, 24], different convolution neural networks have been widely used in many tasks to extract visual information for images. To obtain more descriptive information about the visual content for image fragments, we employ a pretrained deep CNN, e.g. Faster R-CNN. Specifically, given an image $I$ , a CNN detects image regions and extracts a feature vector $\pmb{f}_i$ for each image region $\pmb{r}_i$ . We further transform $\pmb{f}_i$ to a $d$ -dimensional vector $\pmb{v}_i$ via a linear projection as follows: + +$$ +\boldsymbol {v} _ {i} = W _ {v} \boldsymbol {f} _ {i} + b _ {v} \tag {1} +$$ + +where $W_{v}$ and $b_{v}$ are to-be-learned parameters. + +For simplicity, we denote the image representation as $V = \{\pmb{v}_i | i = 1, \dots, m, \pmb{v}_i \in \mathbb{R}^d\}$ , where $m$ is the number of detected regions in $\pmb{I}$ . We further normalize each region feature vector in $\pmb{V}$ as [13]. + +Text representation. Basically, texts can be represented at either sentence-level or word-level. To enable the fine-grained connection of vision and language, we extract the word-level features for texts, which can be done through a bi-directional GRU as the encoder. + +Specifically, for a text $S$ with $n$ words, we first represent each word $w_{j}$ with a contiguous embedding vector $e_{j} = W_{e}w_{j}, \forall j \in [1, n]$ , where $W_{e}$ is a to-be-learned embedding matrix. Then, to enhance the word-level representation with context information, we employ a bi-directional GRU to summarize information from both forward and backward directions in the text $S$ : + +$$ +\overrightarrow {\boldsymbol {h}} _ {j} = \overrightarrow {G R U} (\boldsymbol {e} _ {j}, \overrightarrow {\boldsymbol {h}} _ {j - 1}); \tag {2} +$$ + +$$ +\overleftarrow {\boldsymbol {h}} _ {j} = \overleftarrow {\boldsymbol {G R U}} (e _ {j}, \overleftarrow {\boldsymbol {h}} _ {j + 1}) +$$ + +where $\overrightarrow{h}_j$ and $\overleftarrow{h}_j$ denote hidden states from the forward GRU and the backward GRU, respectively. Then, the representation of the word $w_j$ is defined as $t_j = \frac{\overrightarrow{h}_j + \overleftarrow{h}_j}{2}$ . + +Eventually, we obtain a word-level feature set for the text $S$ , denoted as $T = \{t_j | j = 1, \dots, n, t_j \in \mathbb{R}^d\}$ , where each $t_j$ encodes the information of the word $w_j$ . Note that each $t_j$ shares the same dimensionality as $v_i$ in Eq. 1. We also normalize each word feature vector in $T$ as [13]. + +# 3.2. RAM: Recurrent Attention Memory + +The recurrent attention memory aims to align fragments in the embedding space by refining the knowledge about previous fragment alignments in a recurrent manner. It can be regarded as a block that takes in two sets of feature points, i.e. $\mathbf{V}$ and $\mathbf{T}$ , and estimates the similarity between these two sets via a cross-modal attention unit. A memory distillation unit is used to refine the attention result in order to provide more knowledge for the next alignments. For generalization, we denote the two input sets of features as a query set $\mathbf{X} = \{\pmb{x}_i | i \in [1, m'], \pmb{x}_i \in \mathbb{R}^d\}$ and a response set $\mathbf{Y} = \{\pmb{y}_j | j \in [1, n'], \pmb{y}_j \in \mathbb{R}^d\}$ , where $m'$ and $n'$ are the numbers of feature points in $\mathbf{X}$ and $\mathbf{Y}$ , respectively. Note that $\mathbf{X}$ can be either of $\mathbf{V}$ and $\mathbf{T}$ , while $\mathbf{Y}$ will be the other. + +Cross-modal Attention Unit (CAU). The cross-modal attention unit aims to summarize context information in $\mathbf{Y}$ for each feature $\mathbf{x}_i$ in $\mathbf{X}$ . To achieve this goal, we first compute the similarity between each pair $(\mathbf{x}_i, \mathbf{y}_j)$ using the cosine function: + +$$ +z _ {i j} = \frac {\boldsymbol {x} _ {i} ^ {T} \boldsymbol {y} _ {j}}{\left\| \boldsymbol {x} _ {i} \right\| \cdot \left\| \boldsymbol {y} _ {j} \right\|}, \forall i \in [ 1, m ^ {\prime}], \forall j \in [ 1, n ^ {\prime} ] \tag {3} +$$ + +As [13], we further normalize the similarity score $z$ as: + +$$ +\bar {z} _ {i j} = \frac {\operatorname {r e l u} \left(z _ {i j}\right)}{\sqrt {\sum_ {i = 1} ^ {m ^ {\prime}} \operatorname {r e l u} \left(z _ {i j}\right) ^ {2}}} \tag {4} +$$ + +where $\mathrm{relu}(x) = \max (0,x)$ + +Attention is performed over the response set $\mathbf{Y}$ given a feature $x_{i}$ in $\mathbf{X}$ : + +$$ +\boldsymbol {c} _ {i} ^ {x} = \sum_ {j = 1} ^ {n ^ {\prime}} \alpha_ {i j} \boldsymbol {y} _ {j}, \quad s. t. \quad \alpha_ {i j} = \frac {\exp (\lambda \bar {z} _ {i j})}{\sum_ {j = 1} ^ {n ^ {\prime}} \exp (\lambda \bar {z} _ {i j})} \tag {5} +$$ + +where $\lambda$ is the inverse temperature parameter of the softmax function [3] to adjust the smoothness of the attention distribution. + +We define $C^x = \{c_i^x |i\in [1,m'],c_i^x\in \mathbb{R}^d\}$ as $X$ - grounded alignment features, in which each element captures related semantics shared by each $\pmb{x}_i$ and the whole $\pmb{Y}$ + +Memory Distillation Unit (MDU). To refine the alignment knowledge for the next alignment, we adopt a memory distillation unit which updates the query features $\mathbf{X}$ by aggregating them with the corresponding $\mathbf{X}$ -grounded alignment feature $C^x$ dynamically: + +$$ +\boldsymbol {x} _ {i} ^ {*} = f \left(\boldsymbol {x} _ {i}, \boldsymbol {c} _ {i} ^ {x}\right) \tag {6} +$$ + +where $f()$ is a aggregating function. We can define $f()$ with different formulations, such as addition, multilayer perceptron (MLP), attention and so on. Here, we adopt a modified gating mechanism for $f()$ : + +$$ +\boldsymbol {g} _ {i} = \operatorname {g a t e} \left(W _ {g} \left[ \boldsymbol {x} _ {i}, \boldsymbol {c} _ {i} ^ {x} \right] + b _ {g}\right) +$$ + +$$ +\boldsymbol {o} _ {i} = \tanh \left(W _ {o} \left[ \boldsymbol {x} _ {i}, \boldsymbol {c} _ {i} ^ {x} \right] + b _ {o}\right) \tag {7} +$$ + +$$ +\boldsymbol {x} _ {i} ^ {*} = \boldsymbol {g} _ {i} * \boldsymbol {x} _ {i} + (1 - \boldsymbol {g} _ {i}) * \boldsymbol {o} _ {i} +$$ + +where $W_{g}, W_{o}, b_{g}, b_{o}$ are to-be-learned parameters. $o_{i}$ is a fused feature which enhances the interaction between $x_{i}$ and $c_{i}^{x}$ . $g_{i}$ performs as a gate to select the most salient information. + +With the gating mechanism, information of the input query can be refined by itself (i.e. $\boldsymbol{x}_i$ ) and the semantic information shared with the response (i.e. $\boldsymbol{o}_i$ ). The gate $\boldsymbol{g}_i$ can help to filter trivial information in the query, and enable the representation learning of each query fragment (i.e. $\boldsymbol{x}_i$ in $\boldsymbol{X}$ ) to focus more on its individual shared semantics with $\boldsymbol{Y}$ . Besides, the $\boldsymbol{X}$ -grounded alignment features $C^x$ summarize the context information of $\boldsymbol{Y}$ with regard to each fragment in $\boldsymbol{X}$ . And in the next matching step, such context information will assist to determine the shared semantics with respect to $\boldsymbol{Y}$ , forming a recurrent computation process as described in the subsequent section 3.3. Therefore, with the help of $C^x$ , the intra-modality relationships in $\boldsymbol{Y}$ are implicitly involved and re-calibrated during the recurrent process, which would enhance the interaction among cross-modal features and thus benefit the representation learning. + +RAM block. We integrate the cross-modal attention unit and the memory distillation unit into a RAM block, formulated as: + +$$ +\boldsymbol {C} ^ {x}, \boldsymbol {X} ^ {*} = \mathbf {R A M} (\boldsymbol {X}, \boldsymbol {Y}) \tag {8} +$$ + +where $C^x$ and $X^{*}$ are derived by Eq. 5 and 6. + +# 3.3. Iterative Matching with Recurrent Attention Memory + +In this section, we describe how to employ the recurrent attention memory introduced above to enable the iterative matching for cross-modal image-text retrieval. + +Table 1. Comparison with the state-of-the-art models on Flickr8K. As results of SCAN [13] are not reported on Flickr8K, here we show our experiment results by running codes provided by authors. + +
MethodText RetrievalImage RetrievalR@sum
R@1R@5R@10R@1R@5R@10
DeViSE [6]4.816.527.35.920.129.6104.2
DVSA [11]16.540.654.211.832.144.7199.9
m-CNN [16]24.853.767.120.347.661.7275.2
SCAN*52.281.089.238.367.878.9407.4
Image-IMRAM48.578.185.332.061.473.9379.2
Text-IMRAM52.181.590.140.269.079.2412.1
Full-IMRAM54.784.291.041.069.279.9420.0
+ +Specifically, given an image $\mathbf{I}$ and a text $S$ , we derive two strategies for iterative matching grounded on $\mathbf{I}$ and $S$ , respectively, using two independent RAM blocks: + +$$ +\begin{array}{l} \boldsymbol {C} _ {k} ^ {v}, \boldsymbol {V} _ {k} = \mathbf {R A M} _ {v} (\boldsymbol {V} _ {k - 1}, \boldsymbol {T}) \\ \boldsymbol {C} _ {k} ^ {t}, \boldsymbol {T} _ {k - 1} = \mathbf {R A M} _ {v} (\boldsymbol {T} _ {k - 1}, \boldsymbol {U}) \end{array} \tag {9} +$$ + +$$ +\boldsymbol {C} _ {k} ^ {t}, \boldsymbol {T} _ {k} = \mathbf {R A M} _ {t} (\boldsymbol {T} _ {k - 1}, \boldsymbol {V}) +$$ + +where $V_{k}, T_{k}$ indicate the step-wise features of the image $\pmb{I}$ and the text $\pmb{S}$ , respectively. And $k$ is the matching step, and $\pmb{V}_{0} = \pmb{V}, \pmb{T}_{0} = \pmb{T}$ . + +We iteratively perform RAM() for a total of $K$ steps. And at each step $k$ , we can derive a matching score between $I$ and $S$ : + +$$ +F _ {k} (\boldsymbol {I}, \boldsymbol {S}) = \frac {1}{m} \sum_ {i = 1} ^ {m} F _ {k} \left(\boldsymbol {r} _ {i}, \boldsymbol {S}\right) + \frac {1}{n} \sum_ {j = 1} ^ {n} F _ {k} \left(\boldsymbol {I}, \boldsymbol {w} _ {j}\right) \tag {10} +$$ + +where $F(\boldsymbol{r}_i, \boldsymbol{S})$ and $F(\boldsymbol{I}, \boldsymbol{w}_j)$ are defined as the region-based matching score and the word-based matching score, respectively. They are derived as follows: + +$$ +\begin{array}{l} F _ {k} \left(\boldsymbol {r} _ {i}, \boldsymbol {S}\right) = \operatorname {s i m} \left(\boldsymbol {v} _ {i}, \boldsymbol {c} _ {k i} ^ {v}\right); \\ F _ {k} \left(\overline {{\boldsymbol {r}}} _ {i}, \dots , \overline {{\boldsymbol {c}}} _ {k i} ^ {t}, \dots , \overline {{\boldsymbol {v}}} _ {i} ^ {t}\right) \end{array} \tag {11} +$$ + +$$ +F _ {k} (\boldsymbol {I}, \boldsymbol {w} _ {j}) = \operatorname {s i m} \left(\boldsymbol {c} _ {k j} ^ {t}, \boldsymbol {t} _ {j}\right) +$$ + +where $\operatorname{sim}()$ is the cosine function that measures the similarity between two input features as Eq. 3. And $\pmb{v}_i \in \pmb{V}$ corresponds to the region $\pmb{r}_i$ . $\pmb{t}_j \in \pmb{T}$ corresponds to the word $\pmb{w}_j$ . $\pmb{c}_{ki}^v \in \pmb{C}_k^v$ and $\pmb{c}_{kj}^t \in \pmb{C}_k^t$ are, respectively, the context feature corresponding to the region $\pmb{r}_i$ and the word $\pmb{w}_j$ . $m$ and $n$ are the numbers of image regions and text words, respectively. + +After $K$ matching steps, we derive the similarity between $\pmb{I}$ and $\pmb{S}$ by summing all matching scores: + +$$ +F (\boldsymbol {I}, \boldsymbol {S}) = \sum_ {k = 1} ^ {K} F _ {k} (\boldsymbol {I}, \boldsymbol {S}) \tag {12} +$$ + +# 3.4. Loss Function + +In order to enforce matched image-text pairs to be clustered and unmatched ones to be separated in the embedding spaces, triplet-wise ranking objectives are widely used in previous works [12, 5] to train the model in an end-to-end + +manner. Following [5], instead of comparing with all negatives, we only consider the hard negatives within a minibatch, i.e. the negative that is closest to a training query: + +$$ +\begin{array}{l} \mathcal {L} = \sum_ {b = 1} ^ {B} [ \Delta - F (I _ {b}, S _ {b}) + F (I _ {b}, S _ {b ^ {*}}) ] _ {+} \tag {13} \\ + \sum_ {b = 1} ^ {B} [ \Delta - F (I _ {b}, S _ {b}) + F (I _ {b ^ {*}}, S _ {b}) ] _ {+} \\ \end{array} +$$ + +where $[x]_{+} = \max(x, 0)$ , and $F(I, S)$ is the semantic similarity between $I$ and $S$ defined by Eq. 12. Images and texts with the same subscript $b$ are matched examples. Hard negatives are indicated by the subscript $b^{*}$ . $\Delta$ is a margin value. + +Note that in the loss function, $F(\mathbf{I}, \mathbf{S})$ consists of $F_{k}(\mathbf{I}, \mathbf{S})$ at each matching step (i.e. Eq. 12), and thus optimizing the loss function would directly supervise the learning of image-text correspondences at each matching step, which is expected to help the model to yield higher-quality alignment at each step. With the employed triplet-wise ranking objective, the whole model parameters can be optimized in an end-to-end manner, using widely-used optimizers like SGD, etc. + +# 4. Experiment + +# 4.1. Datasets and Evaluation Metric + +Three benchmark datasets are used in our experiments, including: (1) Flickr8K: contains 8,000 images and provides 5 texts for each image. We adopt its standard splits as [20, 16], using 6,000 images for training, 1,000 images for validation and another 1,000 images for testing. (2) Flickr30K: consists of 31,000 images and 158,915 English texts. Each image is annotated with 5 texts. We follow the dataset splits as [13, 5] and use 29,000 images for training, 1,000 images for validation, and the remaining 1,000 images for testing. (3) MS COCO: is a large-scale image description dataset containing about 123,287 images with at least 5 texts for each. As previous works [13, 5], we use 113,287 images to train all models, 5,000 images for validation and another 5,000 images for testing. Results on MS + +Table 2. Comparison with state-of-the-art models on Flickr30K. + +
MethodText RetrievalImage RetrievalR@sum
R@1R@5R@10R@1R@5R@10
DPC [27]55.681.989.539.169.280.9416.2
SCO [9]55.582.089.341.170.580.1418.5
SCAN* [13]67.490.395.848.677.785.2465.0
VSRN* [15]71.390.696.054.781.888.2482.6
Image-IMRAM67.090.595.651.278.285.5468.0
Text-IMRAM68.891.696.053.079.087.1475.5
Full-IMRAM74.193.096.653.979.487.2484.2
+ +Table 3. Comparison with state-of-the-art models on MS COCO. + +
MethodText RetrievalImage RetrievalR@sum
R@1R@5R@10R@1R@5R@10
1K
DPC [27]65.689.895.547.179.990.0467.9
SCO [9]69.992.997.556.787.594.8499.3
SCAN* [13]72.794.898.458.888.494.8507.9
PVSE [23]69.291.696.655.286.593.7492.8
VSRN* [15]76.294.898.262.889.795.1516.8
Image-IMRAM76.195.398.261.088.694.5513.7
Text-IMRAM74.095.698.460.688.994.6512.1
Full-IMRAM76.795.698.561.789.195.0516.6
5K
DPC [27]41.270.581.125.353.466.4337.9
SCO [9]42.872.383.033.162.975.5369.6
SCAN* [13]50.482.290.038.669.380.4410.9
PVSE [23]45.274.384.532.463.075.0374.4
VSRN* [15]53.081.189.440.570.681.1415.7
Image-IMRAM53.282.590.438.968.579.2412.7
Text-IMRAM52.081.890.138.668.179.1409.7
Full-IMRAM53.783.291.039.769.179.8416.5
+ +![](images/0f440fa25ea65da0dd34515f1a7411a11bdcf4c97ad2391d2bdbdcbb4622613a.jpg) +Figure 2. Difference between our KWAI-AD dataset and standard datasets, e.g. MS COCO. + +Affective: Do not make us alone! + +V.S. + +Factual: A yellow dog lies on the grass. + +COCO are reported by averaging over 5 folds of 1K test images and testing on the full 5K test images as [13]. + +To further validate the effectiveness of our method in practical scenarios, we build a new dataset, named KWAI-AD. We collect 81,653 image-text pairs from a real-world business advertisement platform, and we randomly sample 79,653 image-text pairs for training, 1,000 for validation and the remaining 1,000 for testing. The uniqueness of our dataset is that the provided texts are not detailed textual descriptions of the content in the corresponding images, but maintain weakly associations with them, conveying strong affective semantics instead of factual semantics (seeing Figure 2). And thus our dataset is more challenging than conventional datasets. However, it is of great importance in the practical business scenario. Learning subtle links of adver + +tisement images with related well-designed titles could not only enrich the understanding of vision and language but also benefit the development of recommender systems and social networks. + +Evaluation Metric. To compare our proposed method with the state-of-the-art methods, we adopt the same evaluation metrics in all datasets as [17, 13, 5]. Namely, we adopt Recall at K (R@K) to measure the performance of bi-directional retrieval tasks, i.e. retrieving texts given an image query (Text Retrieval) and retrieving images given a text query (Image Retrieval). We report R@1, R@5, and R@10 for all datasets as in [13]. And to well reveal the effectiveness of the proposed method, we also report an extra metric “R@sum”, which is the summation of all evaluation metrics as [8]. + +# 4.2. Implementation Details + +To systematically validate the effectiveness of the proposed IMRAM, we experiment with three of its variants: (1) Image-IMRAM only adopts the RAM block grounded on images (i.e. only using the first term in Eq. 10); (2) Text-IMRAM only adopts the RAM block grounded on texts (i.e. only using the first term in Eq. 10); (3) Full-IMRAM. All models are implemented by Pytorch v1.0. In all datasets, + +for each word in texts, the word embedding is initialized by random weights with a dimensionality of 300. We use a bi-directional GRU with one layer and set its hidden state (i.e. $\overrightarrow{h}_j$ and $\overleftarrow{h}_j$ in Eq. 2) dimensionality as 1,024. The dimensionality of each region feature (i.e. $v_i$ in $V$ ) and and each word feature (i.e. $t_j$ in $T$ ) is set as 1,024. On three benchmark datasets, we use Faster R-CNN pre-trained on Visual Genome to extract 36 region features for each image. For our KWAI-AD dataset, we simply use Inception v3 to extract 64 features for each image. + +# 4.3. Results on Three Benchmark Datasets + +We compare our proposed IMRAM with published state-of-the-art models in the three benchmark datasets2. We directly cite the best-reported results from respective papers when available. And for our proposed models, we perform 3 steps of iterative matching by default. + +Results. Comparison results are shown in Table 1, Table 2 and Table 3 for Flickr8K, Flickr30K and MS COCO, respectively. \* indicates the performance of an ensemble model. -' means unreported results. We can see that our proposed IMRAM can consistently achieve performance improvements in terms of all metrics, compared to the stateof-the-art models. + +Specifically, our Full-IMRAM can outperform one of the previous best model, i.e. SCAN* [13], by a large margin of $12.6\%$ , $19.2\%$ , $8.7\%$ and $5.6\%$ in terms of the overall performance R@sum in Flickr8K, Flickr30K, MS COCO (1K) and MS COCO (5K), respectively. And among recall metrics for the text retrieval task, our Full-IMRAM can obtain a maximal performance improvement of $3.2\%$ (R@5 in Flickr8K), $6.7\%$ (R@1 in Flickr30K), $4.0\%$ (R@1 in MS COCO (1K)) and $3.3\%$ (R@1 in MS COCO (5K)), respectively. As for the image retrieval task, the maximal improvements are $2.7\%$ (R@1 in Flickr8K), $5.3\%$ (R@1 in Flickr30K), $2.9\%$ (R@1 in MS COCO (1K)) and $1.1\%$ (R@1 in MS COCO (5K)), respectively. And compared with VSRN* [15], our single model can achieve competitive results in both Flickr30K and MS COCO. These results well demonstrate that the proposed method exhibits great effectiveness for cross-modal image-text retrieval. Besides, our models can consistently achieve state-of-the-art performance not only in small datasets, i.e. Flickr8K and Flickr30K, but also in the large-scale dataset, i.e. MS COCO, which well demonstrates its robustness. + +# 4.4. Model Analysis + +Effect of the total steps of matching, $K$ . For all three variants of IMRAM, we gradually increase $K$ from 1 to 3 to train and evaluate them on the benchmark datasets. Due to the limited space, we only report results on MS COCO (5K + +Table 4. The effect of the total steps of matching, $K$ ,on variants of IMRAM in MS COCO (5K). + +
ModelKText RetrievalImage Retrieval
R@1R@10R@1R@10
Image140.885.734.676.2
251.589.537.778.3
-IMRAM353.290.438.979.2
Text146.287.034.475.9
250.489.237.478.3
-IMRAM351.489.939.279.2
Full149.788.935.476.7
253.190.239.179.5
-IMRAM353.791.039.779.8
+ +Table 5. The effect of the aggregating function in the proposed memory distillation unit of Text-IMRAM ( $K = 3$ ) in Flickr30K. + +
MemoryText RetrievalImage Retrieval
R@1R@10R@1R@10
add64.595.149.284.9
mlp66.696.452.886.2
att66.195.552.186.2
gate66.296.452.586.1
ours68.896.053.087.1
+ +Table 6. Statistical results of salient semantics at each matching step, $k$ ,in Text-IMRAM $\left( {K = 3}\right)$ in MS COCO. + +
knouns (%)verbs (%)adjectives (%)
199.032.035.3
299.038.837.9
399.040.239.1
+ +test) in Table 4. We can observe that for all variants, $K = 2$ and $K = 3$ can consistently achieve better performance than $K = 1$ . And $K = 3$ performs better or comparatively, compared with $K = 2$ . This observation well demonstrates that the iterative matching scheme effectively improves model performance. Besides, our Full-IMRAM consistently outperforms Image-IMRAM and Text-IMRAM for different values of $K$ . + +Effect of the memory distillation unit. The aggregation function $f(\pmb{x}, \pmb{y})$ in Eq. 6 is essential for the proposed iterative matching process. We enumerate some basic aggregation functions and compare them with ours: (1) add: $\pmb{x} + \pmb{y}$ ; (2) mlp: $\pmb{x} + \tanh(W\pmb{y} + b)$ ; (3) att: $\alpha \pmb{x} + (1 - \alpha)\pmb{y}$ where $\alpha$ is a real-valued number parameterized by $\pmb{x}$ and $\pmb{y}$ ; (4) gate: $\beta \pmb{x} + (1 - \beta)\pmb{y}$ where $\beta$ is a real-valued vector parameterized by $\pmb{x}$ and $\pmb{y}$ . We conduct the analysis with Text-IMRAM ( $K = 3$ ) in Flickr30K in Table 5. We can observe that the aggregation function we use (i.e. Eq. 7) achieves substantially better performance than baseline functions. + +# 4.5. Qualitative Analysis + +We intend to explore more insights for the effectiveness of our models here. For the convenience of the explanation, + +![](images/4d8e55cfe18a276b536be816f0d1266abb0b5b70236d0588d2973c782edabefa.jpg) +A woman in an orange coat and jeans is squatting on a rock wall. + +![](images/fa76184cea677b36a2e16b4e934a489ad47e1151c3d241b4b4c2bcd8dcaab850.jpg) +jeans(0.374) +A woman and girl dressed up in beautiful dresses. + +![](images/b596e81045966c7247fd2581d7f242cc1643975a9e86f90763e1863410eb1328.jpg) +jeans(0.546) + +![](images/dcfda093a24d782451cd9916d34a8b36773b6f85f9f6890709117e4b0d9df9f7.jpg) +jeans(0.507) + +![](images/96b03cfbd129c00852985a7128c08c920455bf156103bb1b24b63f1ddbd543d5.jpg) + +![](images/bc96350f2b3c76362332b026a199c1dd70a85fa85aa47f624ceed21c9858dc80.jpg) + +![](images/3e3e488911c2fda10b3bd395976b9641e9b838d897cb2814795afcdf8c80ca03.jpg) +An open book laid on top of a bed. + +![](images/b6fe6c46ef59c25e31b68b3b15e247dfd0f7cbe639e6fead5639c643794f1bbe.jpg) +beautiful(0.336) + +![](images/461bf21d6bae2c57349001ca03b24c540ec495160921b30f4f08a411e69ed37b.jpg) +beautiful(0.404) + +![](images/213aa507f1c8976e265e2f2cc7a923a92b58e7363c4f3a6994eebddf673bd199.jpg) +beautiful(0.423) + +![](images/b14280dbb9a8f3c38ccd95b650b7f983a8f4833b4befffcc57e2221d35ae1de7.jpg) +Figure 3. Visualization of attention at each matching step in Text-IMRAM. Corresponding matched words are in blue, followed by the matching similarity. + +![](images/dfb4f644a253829205e64144cd464258657f132c6e7e41b2b3dea831ee0f781d.jpg) +laid(0.241) +$k = 1$ + +![](images/eb813860518194dc361ad30ca8f457ea2e7d803ec1f7f3ff91d1063f556cf545.jpg) +$k = 2$ +laid(0.421) + +![](images/3c0b3cf8aa2e6dd2ba4036ca2df66aa23c41461232c73c246f1058efc3cb4dd8.jpg) +$k = 3$ + +we mainly analyze semantic concepts from the view of language, instead of from the view of vision, i.e. we treat each word in the text as one semantic concept. Therefore, we conduct the qualitative analysis on Text-IMRAM. + +We first visualize the attention map at each matching step in Text-IMRAM ( $K = 3$ ) corresponding to different semantic concepts in Figure 3. We can see that the attention is refined and gradually focuses on the matched regions. + +To quantitatively analyze the alignment of semantic concepts, we first define a semantic concept in Text-IMRAM as a salient one at the matching step $k$ as follows: 1) Given an image-text pair, at the matching step $k$ , we derive the word-based matching score by Eq. 11 for each word with respect to the image, and derive the image-text matching score by averaging all the word-based scores (see Eq. 10). 2) A semantic concept is salient if its corresponding word-based score is greater than the image-text score. For a set of image-text pairs randomly sampled from the testing set, we can compute the percentage of such salient semantic concepts for each model at different matching steps. + +Then we analyze the change of the salient semantic concepts captured at different matching steps in Text-IMRAM $(K = 3)$ . Statistical results are shown in Table 6. We can see that at the 1st matching step, nouns are easy to be recognized and dominant to help to match. While during the subsequent matching steps, contributions of verbs and adjectives increase. + +# 4.6. Results on the Newly-Collected Ads Dataset + +We evaluate our proposed IMRAM on our KWAI-AD dataset. We compare our models with the state-of-the-art SCAN models in [13]. Comparison results are shown in Table 7. We can see that the overall performance on this + +![](images/d0e3010f3bfaf2da621338e44d38d542b90bcf2cf9c39a75b153c40ef7dded08.jpg) +Two people standing outside of a beautiful oriental building. +A person in a green and white jacket and green pants is practicing on + +![](images/79729a421179e2936d952a10f98cb9caefba3e784b76d5544540e977968817e9.jpg) +building(0.376) + +![](images/58e0abb092161390dc3d1635e37bb87b228ffe52a93e88738dd58fd51c5d699d.jpg) +building(0.424) + +![](images/0d11b6e0e0eef3f0e664ea4bc5e12ab59fb06a162816cb815e695352af3719c9.jpg) +building(0.424) + +![](images/b99682e078cab79c45e6fa16a00dc25e57d9fd3f873c0608c9a278274fec1e55.jpg) +his snowboard. +A child holding a flowered umbrella and petting a yak. + +![](images/4bd204c4581da03cdf2384bb0a3d865cf71931136356da3a2006fbb636542d6e.jpg) +green(0.671) + +![](images/0f7d3c7f9507060e107053e4a37f627166abf00abe50d67c46645bdfc9e2f146.jpg) +green(0.728) + +![](images/9d4b320840ffdc1f08956c40046bec34c3252283513333601f5e728f0b9880a9.jpg) + +![](images/f54f07532a8651809765511712465513938f0159a95854fa54f750d725a0a508.jpg) +ting(0.223) +$k = 1$ + +![](images/3be45716c4045a1d1dc7893a1023dfd05cc77e6fad73c5b2c0655ee7f852812b.jpg) +petting(0.360) +$k = 2$ + +![](images/8ebe0f143d8a03a1b413202c49b687b29e738bd75b20010fb176c6bc9c66ef66.jpg) +petting(0.351) +$k = 3$ + +Table 7. Results on the Ads dataset. + +
MethodText RetrievalImage Retrieval
R@1R@10R@1R@10
i-t AVG [13]7.421.12.19.3
Image-IMRAM10.725.13.416.8
t-i AVG [13]6.820.82.09.9
Text-IMRAM8.421.52.315.9
i-t + t-i [13]7.322.52.711.5
Full-IMRAM10.227.73.421.7
+ +dataset is greatly lower than those on benchmark datasets, which indicates the challenges of cross-modal retrieval in real-world business advertisement scenarios. Results also show that our models can obtain substantial improvements over compared models, which demonstrates the effectiveness of the proposed method in this dataset. + +# 5. Conclusion + +In this paper, we propose an Iterative Matching method with a Recurrent Attention Memory network (IMRAM) for cross-modal image-text retrieval to handle the complexity of semantics. Our IMRAM can explore the correspondence between images and texts in a progressive manner with two features: (1) an iterative matching scheme with a cross-modal attention unit to align fragments from different modalities; (2) a memory distillation unit to refine alignments knowledge from early steps to later ones. We validate our models on three benchmarks (i.e. Flickr8K, Flickr30K and MS COCO) as well as a new dataset (i.e. KWAI-AD) for practical business advertisement scenarios. Experiment results on all datasets show that our IMRAM outperforms compared methods consistently and achieves state-of-the-art performance. + +# References + +[1] Hui Chen, Guiguang Ding, Zijia Lin, Sicheng Zhao, and Jungong Han. Cross-modal image-text retrieval with semantic consistency. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1749-1757, 2019. +[2] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Learning universal image-text representations. ArXiv, abs/1909.11740, 2019. +[3] Jan K Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attention-based models for speech recognition. In Advances in neural information processing systems, pages 577-585, 2015. +[4] Guiguang Ding, Wenshuo Chen, Sicheng Zhao, Jungong Han, and Qiaoyan Liu. Real-time scalable visual tracking via quadrangle kernelized correlation filters. IEEE Transactions on Intelligent Transportation Systems, 19(1):140-150, 2017. +[5] Fartash Faghri, David J Fleet, Jamie Ryan Kiros, and Sanja Fidler. Vse++: Improving visual-semantic embeddings with hard negatives. arXiv preprint arXiv:1707.05612, 2017. +[6] Andrea Frome, Greg S Corrado, Jon Shlens, Samy Bengio, Jeff Dean, Tomas Mikolov, et al. Devise: A deep visual-semantic embedding model. In Advances in neural information processing systems, pages 2121–2129, 2013. +[7] Yuchen Guo, Guiguang Ding, Xiaoming Jin, and Jianmin Wang. Learning predictable and discriminative attributes for visual recognition. In Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. +[8] Yan Huang, Wei Wang, and Liang Wang. Instance-aware image and sentence matching with selective multimodal LSTM. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2310-2318, 2017. +[9] Yan Huang, Qi Wu, Chunfeng Song, and Liang Wang. Learning semantic concepts and order for image and sentence matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6163-6171, 2018. +[10] Zhong Ji, Haoran Wang, Jungong Han, and Yanwei Pang. Saliency-guided attention network for image-sentence matching. In Proceedings of the IEEE International Conference on Computer Vision, pages 5754-5763, 2019. +[11] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3128-3137, 2015. +[12] Ryan Kiros, Ruslan Salakhutdinov, and Richard S Zemel. Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539, 2014. +[13] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In Proceedings of the European Conference on Computer Vision (ECCV), pages 201-216, 2018. +[14] Gen Li, Nan Duan, Yuejian Fang, Ming Gong, Daxin Jiang, and Ming Zhou. Unicoder-vl: A universal encoder for vision and language by cross-modal pre-training, 2019. + +[15] Kunpeng Li, Yulun Zhang, Kai Li, Yuanyuan Li, and Yun Fu. Visual semantic reasoning for image-text matching. In Proceedings of the IEEE International Conference on Computer Vision, pages 4654-4662, 2019. +[16] Lin Ma, Zhengdong Lu, Lifeng Shang, and Hang Li. Multimodal convolutional neural networks for matching image and sentence. In Proceedings of the IEEE international conference on computer vision, pages 2623-2631, 2015. +[17] Niluthpol Chowdhury Mithun, Rameswar Panda, Evangelos E. Papalexakis, and Amit K. Roy-Chowdhury. Webly supervised joint embedding for cross-modal image-text retrieval. In Proceedings of the 26th ACM International Conference on Multimedia, pages 1856-1864, 2018. +[18] 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. +[19] Duy-Kien Nguyen and Takayuki Okatani. Multi-task learning of hierarchical vision-language representation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[20] Z. Niu, M. Zhou, L. Wang, X. Gao, and G. Hua. Hierarchical multimodal LSTM for dense visual-semantic embedding. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 1899–1907, 2017. +[21] Leonid Perlovsky. Language and cognition interaction neural mechanisms. Computational Intelligence and Neuroscience, 2011, 2011. +[22] Botian Shi, Lei Ji, Pan Lu, Zhendong Niu, and Nan Duan. Knowledge aware semantic concept expansion for imagetext matching. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 5182-5189, 7 2019. +[23] Yale Song and Mohammad Soleymani. Polysemous visual-semantic embedding for cross-modal retrieval. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[24] 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. +[25] Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics, pages 1556–1566, Beijing, China, July 2015. +[26] Liwei Wang, Yin Li, and Svetlana Lazebnik. Learning deep structure-preserving image-text embeddings. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5005-5013, 2016. +[27] Zhedong Zheng, Liang Zheng, Michael Garrett, Yi Yang, and Yi-Dong Shen. Dual-path convolutional image-text embedding with instance loss. arXiv preprint arXiv:1711.05535, 2017. \ No newline at end of file diff --git a/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/images.zip b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f504a201e7055b4298fb671ee425fd04776a4b4d --- /dev/null +++ b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27e626d0e5e8dbc2d99ccb788f1e5f660e0ac53a854635f5733cb88c606ae68c +size 553702 diff --git a/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/layout.json b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..dfdc659ee58e9d4a05dfd552248e5c71faa19418 --- /dev/null +++ b/imramiterativematchingwithrecurrentattentionmemoryforcrossmodalimagetextretrieval/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef1a8f3f8a5a6d54bcb2e0887d0a6b8d59489bdbfe1e363afeff8ecb20f8feb3 +size 506173