diff --git a/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_content_list.json b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2eb9944fd5dedb902445da7826f4a3ab5dcecf88 --- /dev/null +++ b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91ba4136567d52980458086fe0672f84774e1548cea212864ccf85a8a7c95d03 +size 82899 diff --git a/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_model.json b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c5b5e0f5e8823d1eb0757d328ee4739472f8a9cb --- /dev/null +++ b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af3bb955b3bb3341248a6169b3b4980bebfb29bfdace2b6eab2f7fae12757305 +size 100673 diff --git a/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_origin.pdf b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eb18ab6a63e5c2cf5757b7f2e85ab2c1caab87dd --- /dev/null +++ b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/4d439c26-525e-495d-aebd-d8b88234e1dd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:293be9d903803bb0544e0f80caabb1108a9b917ed6ae10cead0143885dce4a77 +size 1338555 diff --git a/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/full.md b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/full.md new file mode 100644 index 0000000000000000000000000000000000000000..afefb63bc7fe7155bace7411e0f0c837b01cd992 --- /dev/null +++ b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/full.md @@ -0,0 +1,359 @@ +# $\beta$ -DARTS: Beta-Decay Regularization for Differentiable Architecture Search + +Peng Ye $^{1*}$ , Baopu Li $^{2}$ , Yikang Li $^{3}$ , Tao Chen $^{1\dagger}$ , Jiayuan Fan $^{1}$ , Wanli Ouyang $^{4}$ + +$^{1}$ Fudan University, $^{2}$ BAIDU USA LLC, $^{3}$ Shanghai AI Laboratory, + +4The University of Sydney, SenseTime Computer Vision Group, Australia + +yepeng20@fudan.edu.cn + +# Abstract + +Neural Architecture Search (NAS) has attracted increasingly more attention in recent years because of its capability to design deep neural network automatically. Among them, differential NAS approaches such as DARTS, have gained popularity for the search efficiency. However, they suffer from two main issues, the weak robustness to the performance collapse and the poor generalization ability of the searched architectures. To solve these two problems, a simple-but-efficient regularization method, termed as Beta-Decay, is proposed to regularize the DARTS-based NAS searching process. Specifically, Beta-Decay regularization can impose constraints to keep the value and variance of activated architecture parameters from too large. Furthermore, we provide in-depth theoretical analysis on how it works and why it works. Experimental results on NAS-Bench-201 show that our proposed method can help to stabilize the searching process and makes the searched network more transferable across different datasets. In addition, our search scheme shows an outstanding property of being less dependent on training time and data. Comprehensive experiments on a variety of search spaces and datasets validate the effectiveness of the proposed method. The code is available at https://github.com/Sunshine-Ye/Beta-DARTS. + +# 1. Introduction + +Neural architecture search (NAS) has attracted lots of interests for its potential to automatize the process of architecture design. Previous reinforcement learning [26, 33] and evolutionary algorithm [25] based methods usually incur massive computation overheads, which hinder their practical applications. To reduce the search cost, a variety of approaches are proposed, including performance estimation [17], network morphisms [2] and one-shot architecture search [13, 21]. In particular, one-shot methods resort to + +![](images/04ec9ff44c0b9cbf44ffcab85ab8d80a81577effe48d5b8da3e89eab1badb240.jpg) +Figure 1. Schematic illustration about (a) DARTS [21] and our proposed $\beta$ -DARTS, (b) DARTS- [5]. DARTS- adds an auxiliary skip connection with a decay rate $\beta_{skip}$ to alleviate the performance collapse problem. $\beta$ -DARTS introduces the Beta-Decay regularization to improve both the robustness of the searching process and the generalization ability of the searched architecture. + +weight sharing technique, which only needs to train a supernet covering all candidate sub-networks once. Based on this weight sharing strategy, differentiable architecture search [21] (namely DARTS, as shown in Fig. 1) relaxes the discrete operation selection problem to learn differentiable architecture parameters, which further improves the search efficiency by alternately optimizing supernet weights and architecture parameters. + +Although differentiable method has the advantages of simplicity and computational efficiency, its robustness and architecture generalization challenges still needs to be fully resolved. Firstly, lots of studies have shown that DARTS frequently suffers from performance collapse, that is the searched architecture tends to accumulate parameter-free operations especially for skip connection, leading to the performance degradation [1, 5]. To handle this robustness challenge, lots of instructive works are proposed: directly restricting the number of skip connections [4, 20]; exploiting or regularizing relevant indicators such as the norm of Hessian regarding the architecture parameters [1, 3]; changing the searching and/or discretization process [5, 6, 12]; implicitly regularizing the learned architecture parameters [1]. However, the explicit regularization of architecture parameters optimization receives little attention, as previous works (including above methods) adopt L2 or + +weight decay regularization by default on learnable architecture parameters (i.e., $\alpha$ ), without exploring solution along this direction. Secondly, several works have pointed out that the optimal architecture obtained on the specific dataset cannot guarantee its good performance on another dataset [19,22], namely the architecture generalization challenge. To improve the generalization of searched model, AdaptNAS [19] explicitly minimizes the generalization gap of architectures between domains via the idea of cross domain, MixSearch [22] searches a generalizable architecture by mixing multiple datasets of different domains and tasks. However, both methods solve this issue by leveraging larger datasets, while how to use a single dataset to learn a generalized architecture remains challenging. + +This paper is dedicated to simultaneously solve the above-mentioned two challenges in an efficient way. Inspired by the widely-used L2 [7] or weight decay regularization [18] approaches, we intend to design a customized regularization for DARTS-based methods, which can explicitly regularize the optimizing process of architecture parameters. However, different from the regularization on the learnable architecture parameter set, $\alpha$ (before the nonlinear activation of softmax), commonly used in standard DARTS and its subsequent variants, we propose a novel and generic Beta-Decay regularization, imposing regularization on the activated architecture parameters $\beta$ (after softmax), where $\beta_{k} = \frac{\exp(\alpha_{k})}{\sum_{k^{\prime} = 1}^{|\mathcal{O}|}\exp(\alpha_{k^{\prime}})}$ . On one hand, the proposed Beta-Decay regularization is very simple to implement, achieved with only additional one line of PyTorch code in DARTS (Alg 1). On the other hand, this simple implementation is grounded by in-depth theoretical support. We provide theoretical analysis to show that, Beta-decay regularization not only mitigates unfair competition advantage among operations and solve the domination problem of parameter-free operations, but also minimizes the Lipschitz constraint defined by architecture parameters and make sure the generalization ability of searched architecture. In addition, we mathematically and experimentally demonstrate that, commonly-used L2 or weight decay regularization on $\alpha$ may not be effective or even counterproductive for improving robustness and generalization of DARTS. + +Algorithm 1 PyTorch Implementation in DARTS +1: $\mathcal{L}_{Beta} =$ torch.mean(torch.logsumexp( self.model._arch_parameters, dim=-1)) +2: loss $=$ self._val_loss(self.model, input_valid, target_valid) $+\lambda \mathcal{L}_{Beta}$ + +DARTS with Beta-Decay regularization ( $\beta$ -DARTS) is illustrated in Fig. 1. Extensive experiments on various search spaces (i.e. NAS-Bench-201, DARTS, NAS-Bench1Shot1) and datasets (i.e. CIFAR-10, CIFAR-100, ImageNet) verify the effectiveness of our method. Besides, our search scheme shows the following outstanding properties: + +- The search trajectories on NAS-Bench-201 and NAS-Bench-1Shot1 show that, the found architecture has continuously rising performance, and the search process can reach its optimal point at an early epoch. +- We only need to search once on the proxy dataset (i.e., CIFAR-10), but the searched architecture can obtain promising performance on various datasets (i.e., CIFAR-10, CIFAR-100 and ImageNet). + +# 2. Related Works + +# 2.1. Robustness of DARTS + +As DARTS is known to chronically suffer from the performance collapse issue caused by the domination of parameter-free operators, lots of works have dedicated to resolving it. P-DARTS [4] and DARTS+ [20] directly limit the number of skip connections. Such handcrafted rules are somewhat suspicious and may mistakenly reject good networks. R-DARTS [1] finds that the Hessian eigenvalues can be regarded as an indicator for the collapse, and employs stronger regularization or augmentation on the training of supernet weights to reduce this value. Then SDARTS [3] implicitly regularizes this indicator by adding perturbations to architecture parameters via random smoothing or adversarial attack. Both methods are indirect solutions and rely heavily on the quality of the indicator. FairDARTS [6] avoids operation competition by weighting each operation via independent sigmoid function, which will be pushed to zero or one by an MSE loss. DropNAS [15] proposes a grouped operation dropout for the co-adaption problem and matthew effect. DOTS [12] further uses the group operation search scheme to decouple the operation and topology search. DARTS- [5] factors out the optimization advantage of skip connection by adding an auxiliary one. However, these methods circumvent the domination effect of parameter-free operations by changing the searching and/or discretization process or adding extra parameters. Different from these works, we explore a more generic solution by explicitly regularizing the architecture parameters optimization, making original DARTS great again. + +# 2.2. Generalization of DARTS + +Improving the generalization ability of deep model has always been the focus of deep learning research. Recent works provide guarantee on model generalization by minimizing loss value and loss sharpness simultaneously [11]. However, the model generalization is not only related to the network weights, but also determined by its architecture. To this end, several methods attempt to improve the generalization of architectures in the field of NAS. AdaptNAS [19] incorporates the idea of domain adaptation into the search process of DARTS, which can minimize the generalization gap of neural architectures between domains. + +MixSearch [22] uses a composited multi-domain multi-task dataset to search a generalizable architecture in a differentiable manner. On one hand, both above methods are built on the assumption of having multiple datasets, while our method is not built on multiple datasets. On the other hand, our focus is on regularizing architecture parameters, which is not investigated in AdaptNAS and MixSearch. + +# 3. Proposed method + +# 3.1. Formulation of DARTS + +Following [34], DARTS searches the structure of normal cell and reduction cell to stack the full network. Typically, a cell is defined as a directed acyclic graph (DAG) with $N$ nodes, where each node denotes a latent representation and the information between every two nodes is transformed by an edge. Each edge $(i,j)$ contains several candidate operations, and DARTS applies continuous relaxation via the learnable architecture parameters set $\alpha$ to mix the outputs of different operations, converting the discrete operation selection into a differentiable parameter optimization problem, + +$$ +\bar {O} ^ {(i, j)} (x) = \sum_ {k = 1} ^ {| \mathcal {O} |} \beta_ {k} ^ {(i, j)} O _ {k} (x), \quad \beta_ {k} ^ {(i, j)} = \frac {\exp \left(\alpha_ {k} ^ {(i , j)}\right)}{\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime}} ^ {(i , j)}\right)} \tag {1} +$$ + +where $x$ and $\bar{O}$ are the input and mixed output of an edge, $\mathcal{O}$ is the candidate operation set, and $\beta$ denotes the softmax-activated architecture parameter set. In this way, we can perform architecture search in a differentiable manner by solving following bi-level optimization objective, + +$$ +\min _ {\alpha} \mathcal {L} _ {v a l} (w ^ {*} (\alpha), \alpha) \tag {2} +$$ + +$$ +\text {s . t .} w ^ {*} (\alpha) = \arg \min _ {w} \mathcal {L} _ {\text {t r a i n}} (w, \alpha) +$$ + +In practice, architecture parameters $\alpha$ and network weights $w$ are alternately updated on the validation and training datasets via gradient descent, and $w^{*}$ is approximated by one-step forward or current $w$ [21]. + +# 3.2. Commonly-used Regularization + +In this paper, we intend to improve the robustness and architecture generalization of DARTS by explicitly regularizing the optimizing process of architecture parameters. Thus, we begin with the default settings of previous methods, namely L2 or weight decay regularization on architecture parameters, $\alpha$ . For convenience of analysing, we consider the single-step update of the architecture parameters, + +$$ +\alpha_ {k} ^ {t + 1} \leftarrow \alpha_ {k} ^ {t} - \eta_ {\alpha} \cdot \nabla_ {\alpha_ {k}} \mathcal {L} _ {v a l} \tag {3} +$$ + +where $\eta_{\alpha}$ and $\mathcal{L}_{val}$ are the learning rate of architecture parameters and the corresponding loss respectively. For multi-step updates, it can be transformed into a single-step update problem through step-wise recursive analysis. + +In standard DARTS and its subsequent variants, Adam optimizer with L2 regularization is commonly used for architecture parameters optimization. However, for adaptive gradient algorithms, the gradients of L2 regularization are normalized $(\mathcal{N})$ by their summed magnitudes, thus the penalty for each element is relatively even, which partly offsets the effect of L2 regularization [23], defined as + +$$ +\bar {\alpha} _ {k} ^ {t + 1} \leftarrow \alpha_ {k} ^ {t} - \eta_ {\alpha} \cdot \nabla_ {\alpha_ {k}} \mathcal {L} _ {v a l} - \eta_ {\alpha} \lambda \mathcal {N} \left(\alpha_ {k} ^ {t}\right) \tag {4} +$$ + +Considering that L2 regularization may not be effective in adaptive gradient algorithms and is not identical to weight decay regularization [23], without loss of generality, we also include architecture parameters optimization with weight decay regularization [14] for comparison, defined as + +$$ +\bar {\alpha} _ {k} ^ {t + 1} \leftarrow \alpha_ {k} ^ {t} - \eta_ {\alpha} \cdot \nabla_ {\alpha_ {k}} \mathcal {L} _ {v a l} - \eta_ {\alpha} \lambda \alpha_ {k} ^ {t} \tag {5} +$$ + +# 3.3. Beta-Decay Regularization + +Since the searching and discretization process of DARTS actually utilize softmax-activated architecture parameter set, $\beta$ , to represent the importance of each operator, we shall pay more attention to the explicit regularization on $\beta$ . As shown in Subsection 3.4, Beta regularization has the ability to improve the robustness and architecture generalization of DARTS, which further denotes its significance. Although important, Beta regularization is typically ignored by previous works. This paper is devoted to filling this gap. Similar to the idea of most regularization methods, the core purpose of Beta regularization is to constrain the value of Beta from changing too much, formulated as + +$$ +\bar {\beta} _ {k} ^ {t + 1} = \theta_ {k} ^ {t + 1} \left(\alpha_ {k} ^ {t}\right) \beta_ {k} ^ {t + 1} \tag {6} +$$ + +For simplicity, we use a $\theta$ function with $\alpha$ as the independent variable to express the total influence of Beta regularization here. To realize above Beta regularization similar to weight decay through $\alpha$ , we firstly study the influence of $\alpha$ regularization on $\beta$ . Recalling Eq. (4) and Eq. (5), we can conclude a unified formula as: + +$$ +\bar {\alpha} _ {k} ^ {t + 1} \leftarrow \alpha_ {k} ^ {t} - \eta_ {\alpha} \nabla_ {\alpha_ {k}} \mathcal {L} _ {v a l} - \eta_ {\alpha} \lambda F \left(\alpha_ {k} ^ {t}\right) \tag {7} +$$ + +Further, we substitute Eq. (7) and Eq. (3) into Eq. (1) to get $\bar{\beta}_k^{t + 1}$ and $\beta_k^{t + 1}$ , and then divide the former by the latter. + +$$ +\frac {\bar {\beta} _ {k} ^ {t + 1}}{\beta_ {k} ^ {t + 1}} = \frac {\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)}{\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \left[ \exp \left(F \left(\alpha_ {k} ^ {t}\right) - F \left(\alpha_ {k ^ {\prime}} ^ {t}\right)\right) \right] ^ {\lambda \eta_ {\alpha}} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)} \tag {8} +$$ + +As we can see in Eq. (8), the mapping function $F$ determines the influence of $\alpha$ on $\beta$ . Thus, all we need is to look for a suitable mapping function, $F$ . Intuitively, a satisfactory $F$ should meet the following two points: (1) $F$ is + +![](images/4d7ef0fa3beaf85d49adf171c97a4230f2d48f74f232ed29a9ad0d0098c7f70a.jpg) +(a) CIFAR10 + +![](images/38d1f73f8ce398cd9b3887a34a4661024ce676ff0fc20e0dfc60ee6e5c1f84e8.jpg) +(b) CIFAR100 + +![](images/001668c7bfd32de0b5670b29435759648700e70fab96a0278149edd846ec40cc.jpg) +(c) ImageNet16 + +not affected by the amplitude of $\alpha$ (to avoid invalid regularization and optimization difficulties). (2) $F$ can reflect the relative amplitude of $\alpha$ (to impose more penalty on larger amplitude). To satisfy the two requirements, we adopt the softmax to normalize $\alpha$ , + +$$ +F \left(\alpha_ {k}\right) = \frac {\exp \left(\alpha_ {k}\right)}{\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime}}\right)} \tag {9} +$$ + +Then we introduce our proposed Beta-Decay regularization loss, whose gradients with respective to $\alpha$ equals to $F(\alpha)$ + +$$ +\mathcal {L} _ {B e t a} = \log \left(\sum_ {k = 1} ^ {| \mathcal {O} |} e ^ {\alpha_ {k}}\right) = \text {s m o o t h m a x} (\{\alpha_ {k} \}) \tag {10} +$$ + +After that, substituting Eq. (9) into Eq. (8), we can obtain following equation, which further accounts for the effect of Beta-Decay regularization, + +$$ +\theta_ {k} ^ {t + 1} \left(\alpha_ {k} ^ {t}\right) = \frac {\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)}{\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \left[ \exp \left(\frac {\exp \left(\alpha_ {k} ^ {t}\right) - \exp \left(\alpha_ {k ^ {\prime}} ^ {t}\right)}{\sum_ {k ^ {\prime \prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime \prime}} ^ {t}\right)}\right) \right] ^ {\lambda \eta_ {\alpha}} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)} \tag {11} +$$ + +Observing the above formula, we can get following conclusions: (1) When $\alpha$ is the largest, $\theta$ is the smallest and less than 1; when $\alpha$ is the smallest, $\theta$ is the largest and greater than 1; and when $\alpha$ is equal, $\theta = 1$ . (2) In current iteration, $\theta$ decreases as $\alpha$ increases. (3) $\theta$ is smaller when $\alpha$ is larger, and $\theta$ is larger when $\alpha$ is smaller. As a result, the variance of $\beta$ is constrained to be smaller, and the value of $\beta$ is constrained to be closer to its mean, achieving the effect similar to weight decay, thus called Beta-Decay regularization. + +# 3.4. Theoretical Analysis + +Stronger Robustness. According to the theorem revealed by recent work [32], the convergence of network weights $w$ can heavily rely on $\beta_{skip}$ in the supernet. In details, supposing that there are three operations (convolution, skip connection and none) in the search space and the training loss is MSE, when fixing architecture parameters to optimize network weights via gradient descent, at one step the training loss can be reduced by ratio $(1 - \eta_w\varphi /4)$ with a probability + +![](images/dcdc2931feec223f924cb8927aa5f6489b6f00469ec249cce71a211d9a82382f.jpg) +Figure 2. Accuracy of different datasets of DARTS with L2, Weight Decay (WD) and Beta-Decay (BD) regularization on NAS-Bench-201 benchmark. The curve is smoothed with a coefficient of 0.5. Note that we only search once on CIFAR-10 dataset. +(a) DARTS, total std=3.1 +Figure 3. The beta distribution of normal cell learned by DARTS and $\beta$ -DARTS, on the original search space in CIFAR-10. The operator indexes $1/2/3$ mean the max pool/avg pool/skip connect, while others are the parametric operators. The total std is calculated by the sum of the standard deviation of all edges under the edge independence assumption. + +![](images/bdbbb027c1273a5c925449083b24fe4d6a2a8f60297e8423a4d4fed2ebf34c78.jpg) +(b) $\beta$ -DARTS, total std=0.63 + +of at least $1 - \sigma$ , where $\eta_w$ is the corresponding learning rate and will be bounded by $\sigma$ , and $\varphi$ obeys + +$$ +\varphi \propto \sum_ {i = 0} ^ {h - 2} \left[ \left(\beta_ {\text {c o n v}} ^ {(i, h - 1)}\right) ^ {2} \prod_ {t = 0} ^ {i - 1} \left(\beta_ {\text {s k i p}} ^ {(t, i)}\right) ^ {2} \right] \tag {12} +$$ + +where $h$ is the number of supernet layers. From Eq. (12), we can see that $\varphi$ depends more on $\beta_{skip}$ than $\beta_{conv}$ , which demonstrates that the supernet weights can converge much faster with large $\beta_{skip}$ . However, by imposing Beta-Decay regularization, we can redefine Eq. (12) as follows + +$$ +\varphi \propto \sum_ {i = 0} ^ {h - 2} \left[ \left(\theta_ {\text {c o n v}} ^ {(i, h - 1)} \beta_ {\text {c o n v}} ^ {(i, h - 1)}\right) ^ {2} \prod_ {t = 0} ^ {i - 1} \left(\theta_ {\text {s k i p}} ^ {(i, h - 1)} \beta_ {\text {s k i p}} ^ {(t, i)}\right) ^ {2} \right] \tag {13} +$$ + +As mentioned before, $\theta$ becomes smaller when $\beta$ is larger and $\theta$ becomes larger when $\beta$ is smaller, which makes the convergence of network weights rely more on $\beta_{conv}$ and less on $\beta_{skip}$ . From the perspective of convergence theorem [32], the Beta-Decay regularization constrains the privilege of $\beta_{skip}$ and ensures the fair competition among architecture parameters. As shown in Fig. 2, DARTS with L2 or weight decay regularization suffers from the performance collapse issue, while DARTS with Beta-Decay regularization has a stable search process. As shown in Fig. 3, original + +![](images/091e7cb995965f58e4f08b17ac39f401d0239baa03d190fb29ee8301be14457a.jpg) +(a) L2 regularization + +![](images/6ab4afe4107434c737de7b4d977bf169d85fe117628513c79849a8a80dafb6c3.jpg) +(b) weight decay regularization + +![](images/4077674bdc701b3ef0b99dd93c156846464fb36e1a2f565f23959f4ac576b604.jpg) +(c) Beta-Decay regularization +Figure 4. The alpha statistical characteristics (i.e. mean, median and standard deviation) of different edges of each epoch when searching on NAS-Bench-201 benchmark with (a) L2 regularization, (b) weight decay regularization, and (c) Beta-Decay regularization. + +DARTS is dominated by skip connections while $\beta$ -DARTS tends to favor parametric operators. + +Stronger Generalization. Referring to [24] and [10], Lipschitz constraint is commonly used to measure and improve the generalization ability of trained deep model. Specifically, suppose the function fitted by a deep model is $f_{w}(x)$ where $x$ is the input, when $\| x_1 - x_2\|$ is very small, a well-trained model should meet the following constraint. + +$$ +\left\| f _ {w} \left(x _ {1}\right) - f _ {w} \left(x _ {2}\right) \right\| \leq C (w) \cdot \| x _ {1} - x _ {2} \| \tag {14} +$$ + +where $C(w)$ is the Lipschitz constant. The smaller the constant is, the trained model will be less sensitive to input disturbances and have better generalization ability. + +Furthermore, we can extend this theory to differentiable architecture search. For simplicity, we consider a single-layer neural network, and multi-layer neural network can be solved through step-wise recursive analysis. Suppose the single-layer network is mixed by the operation set $F(x) = (f_{1}(x), f_{2}(x), f_{3}(x))$ , with the corresponding architecture parameters $\beta = (\beta_{1}, \beta_{2}, \beta_{3})$ . According to the Cauchy's inequality, we can get the following inequality. + +$$ +\left\| \beta F ^ {\mathrm {T}} \left(x _ {1}\right) - \beta F ^ {\mathrm {T}} \left(x _ {2}\right) \right\| \leq \| \beta \| \left\| F ^ {\mathrm {T}} \left(x _ {1}\right) - F ^ {\mathrm {T}} \left(x _ {2}\right) \right\| \tag {15} +$$ + +where $\| \beta \| = \sqrt{\sum \beta_i^2}$ can be regarded as Lipschitz constant and $\sum \beta_{i} = 1$ . As a result, the smaller the measure $\| \beta \|$ is, the supernet will be less sensitive to the impact of input on the operation set, and the searched architecture will have better generalization ability. As shown in Fig. 2, the model searched by $\beta$ -DARTS on CIFAR-10 can well generalize to the CIFAR-100 and ImageNet16 datasets and achieve excellent results. As shown in Fig. 4 and Fig. 3, the architecture parameter distribution learned by $\beta$ -DARTS maintains a relative small standard deviation, making sure the generalization ability of the searched model. + +# 3.5. Commonly-used Regularization May Not Work + +When using L2 regularization on $\alpha$ , we can obtain its effect on $\beta$ according to Eq. (4) and Eq. (8), defined as + +$$ +\frac {\bar {\beta} _ {k} ^ {t + 1}}{\beta_ {k} ^ {t + 1}} = \frac {\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)}{\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \left[ \exp \left(\mathcal {N} \left(\alpha_ {k} ^ {t}\right) - \mathcal {N} \left(\alpha_ {k ^ {\prime}} ^ {t}\right)\right) \right] ^ {\lambda \eta_ {\alpha}} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)} \tag {16} +$$ + +Similarly, when using weight decay on $\alpha$ , we can obtain its effect on $\beta$ according to Eq. (5) and Eq. (8), as follows + +$$ +\frac {\bar {\beta} _ {k} ^ {t + 1}}{\beta_ {k} ^ {t + 1}} = \frac {\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)}{\sum_ {k ^ {\prime} = 1} ^ {| \mathcal {O} |} \left[ \exp \left(\alpha_ {k} ^ {t} - \alpha_ {k ^ {\prime}} ^ {t}\right) \right] ^ {\lambda \eta_ {\alpha}} \exp \left(\alpha_ {k ^ {\prime}} ^ {t + 1}\right)} \tag {17} +$$ + +From Eq. (16) and Eq. (17), we can find that: (1) When the values in $\alpha$ are all around 0, achieving the purpose of L2 and weight decay regularization, Alpha regularization has little effect on Beta; while when the values in $\alpha$ are all not near 0, it means that both regularization do not work. (2) For L2 and weight decay regularization on $\alpha$ , only when the median of $\alpha$ is equal to 0, Alpha regularization has the same and correct effect as Beta regularization. (3) A large variance of $\alpha$ is undesirable, which conflicts with the purpose of L2 and weight decay regularization, and makes the optimization process more sensitive to the hyperparameters $\lambda$ and $\eta_{\alpha}$ . In addition, we show the alpha statistical characteristics when searching with different regularization in Fig. 4, we can see that for L2 and weight decay regularization: (1) The mean and median of $\alpha$ continue to decrease and gradually move away from 0. (2) The standard deviation of $\alpha$ increases monotonically. These mathematical and experimental results show that L2 or weight decay regularization commonly used in existing gradient-based methods are not identical to Beta regularization, and may not be effective or even counterproductive. As a comparison, with our proposed Beta-Decay regularization: (1) The mean and median + +Table 1. Performance comparison on NAS-Bench-201 benchmark [9]. Note that $\beta$ -DARTS only searches on CIFAR-10 dataset, but can robustly achieve new SOTA on CIFAR-10, CIFAR-100 and ImageNet16-120. Averaged on 4 independent runs of searching. + +
MethodsCost (hours)CIFAR-10CIFAR-100ImageNet16-120
validtestvalidtestvalidtest
DARTS(1st) [21]3.239.77±0.0054.30±0.0015.03±0.0015.61±0.0016.43±0.0016.32±0.00
DARTS(2nd) [21]10.239.77±0.0054.30±0.0015.03±0.0015.61±0.0016.43±0.0016.32±0.00
GDAS [8]8.789.89±0.0893.61±0.0971.34±0.0470.70±0.3041.59±1.3341.71±0.98
SNAS [28]-90.10±1.0492.77±0.8369.69±2.3969.34±1.9842.84±1.7943.16±2.64
DSNAS [16]-89.66±0.2993.08±0.1330.87±16.4031.01±16.3840.61±0.0941.07±0.09
PC-DARTS [29]-89.96±0.1593.41±0.3067.12±0.3967.48±0.8940.83±0.0841.31±0.22
iDARTS [31]-89.86±0.6093.58±0.3270.57±0.2470.83±0.4840.38±0.5940.89±0.68
DARTS- [5]3.291.03±0.4493.80±0.4071.36±1.5171.53±1.5144.87±1.4645.12±0.82
β-DARTS3.291.55±0.0094.36±0.0073.49±0.0073.51±0.0046.37±0.0046.34±0.00
optimal-91.6194.3773.4973.5146.7747.31
+ +of $\alpha$ are basically equal. (2) When the standard deviation of $\alpha$ increases to a certain extent, it will remain unchanged. + +# 4. Experiments + +In this section, we conduct extensive experiments on various search spaces (i.e. NAS-Bench-201, DARTS, NAS-Bench-1Shot1) and datasets (i.e. CIFAR-10, CIFAR-100, ImageNet) to verify the robustness and generalization of $\beta$ -DARTS, and we further give some experimental insights about DARTS' dependence on training and data. The overall process of $\beta$ -DARTS is summarized in Alg 2. + +# Algorithm 2 $\beta$ -DARTS + +# Require: + +Architecture parameters $\alpha$ ; Network weights $w$ ; Number of search epochs $E$ ; Regularization coefficient adjustment scheme $\lambda_{e}, e \in \{1,2,\dots,E\}$ . + +1: Construct a supernet and initialize architecture parameters $\alpha$ and supernet weights $w$ +2: For each $e \in [1, E]$ do +3: Update architecture parameters $\alpha$ by descending $\nabla_{\alpha}\mathcal{L}_{val} + \lambda_{e}\mathcal{L}_{Beta}$ +4: Update network weights w by descending $\nabla_w\mathcal{L}_{train}$ +5: Derive the final architecture based on the learned $\alpha$ . + +# 4.1. Results on NAS-Bench-201 Search Space + +Settings. NAS-Bench-201 [9] is the most widely used NAS benchmark analyzing various NAS methods. NAS-Bench-201 provides a DARTS-like search space, containing 4 internal nodes with 5 associated operations. The search space consists of 15,625 architectures, with the ground truth performance of CIFAR-10, CIFAR-100 and ImageNet16-120 of each architecture provided. On NAS-Bench-201, the searching settings are kept the same as DARTS on [9]. + +Results. The comparison results are shown in Table 1. We only search on CIFAR-10 and use the found genotype to query the performance of various datasets. For robustness, our 4 runs of searching under different random seeds always find the same optimal solution, which is very close + +to the optimal performance of NAS-Bench-201. Moreover, as shown in Fig. 2, the performance collapse issue is well solved and $\beta$ -DARTS has a stable search process. For generalization ability, we can see that the architecture found on CIFAR-10 achieves consistent new SOTA on CIFAR-10, CIFAR-100 and ImageNet. For dependency on training and data, as shown in Fig. 2, the search process reaches its optimal point at an early stage (i.e., before 20 epochs), on different datasets. Such results validate that $\beta$ -DARTS has the ability to find the optimal architecture rapidly. More interestingly, we find that the search process of different datasets reach the optimal point in different epochs, although they belong to the same run of searching on CIFAR-10. More similar results can be found in Appendix A.1. + +# 4.2. Results on DARTS Search Space + +Settings. Common DARTS search space [21] is also popular for evaluating NAS methods. The search space consists of normal cell and reduction cell. Each cell has 4 intermediate nodes with 14 edges, and each edge is associated with 8 candidate operations. On DARTS search space, all the search settings are kept the same as DARTS since our method only introduces the simple regularization. For evaluation settings, the evaluation on CIFAR-10/100 follows DARTS [21] and the evaluation on ImageNet-1K follows P-DARTS [4] and PC-DARTS [29]. + +Results. The comparison results are shown in Table 2. We search on CIFAR-10 or CIFAR-100 while evaluating the inferred architecture on CIFAR-10, CIFAR-100 and ImageNet. For robustness, the average results of multiple independent runs of $\beta$ -DARTS achieve the SOTA performance on both CIFAR-10 and CIFAR-100, namely $97.47 \pm 0.08\%$ and $83.48 \pm 0.03\%$ , without extra changes or any cost. For generalization ability, architectures found on CIFAR-100 can still yield a SOTA result of $97.49 \pm 0.07\%$ on CIFAR-10, and models found on CIFAR-10 obtain a new SOTA of $83.76 \pm 0.22\%$ on CIFAR-100, and networks found on both CIFAR-10 and CIFAR-100 datasets can achieve comparable results on ImageNet with those of directly searching on + +Table 2. Comparison of SOTA models on CIFAR-10/100(left) and ImageNet-1K(right). For CIFAR-10/100, results in the top block are obtained by training the best searched model while the bottom block shows the average results of multiple runs of searching. $\ddagger$ denotes the results of independently searching 3 times on CIFAR-100 and evaluating on both CIFAR-10 and CIFAR-100, while $\dagger$ denotes the results on CIFAR-10. Because of the difference on classifiers, the network parameters on CIFAR-100 is slightly more than that of CIFAR-10 (about 0.05M). For ImageNet, the top block denotes networks are directly searched on ImageNet (Img.), the middle block indicates architectures are searched via the idea of Cross Domain (CD.) using CIFAR-10 and part of ImageNet, models in the bottom block are transferred from the searching results of CIFAR-10 (C10) or CIFAR-100 (C100). \* denotes the model is obtained on a different search space. + +
MethodGPU (Days)CIFAR-10CIFAR-100
Params(M)Acc(%)Params(M)Acc(%)
NASNet-A [33]20003.397.353.383.18
DARTS(1st) [21]0.43.497.00±0.143.482.46
DARTS(2nd) [21]13.397.24±0.09--
SNAS [28]1.52.897.15±0.022.882.45
GDAS [8]0.23.497.073.481.62
P-DARTS [4]0.33.497.503.682.51
PC-DARTS [29]0.13.697.43±0.073.683.10
P-DARTS [4]0.33.3±0.2197.19±0.14--
R-DARTS(L2) [1]1.6-97.05±0.21-81.99±0.26
SDARTS-ADV [3]1.33.397.39±0.02--
DOTS [12]0.33.597.51±0.064.183.52±0.13
DARTS+PT [27]0.83.097.39±0.08--
DARTS- [5]0.43.5±0.1397.41±0.083.482.49±0.25
β-DARTS†0.43.78±0.0897.49±0.073.83±0.0883.48±0.03
β-DARTS†0.43.75±0.1597.47±0.083.80±0.1583.76±0.22
+ +
MethodGPU (Days)Params (M)FLOPs (M)Top1 (%)Top5 (%)
MnasNet-92*(Img.) [26]16674.438874.892.0
FairDARTS*(Img.) [6]34.344075.692.6
PC-DARTS(Img.) [29]3.85.359775.892.7
DOTS(Img.) [12]1.35.359676.092.8
DARTS-*(Img.) [5]4.54.946776.293.0
AdaptNAS-S(CD.) [19]1.85.055274.792.2
AdaptNAS-C(CD.) [19]2.05.358375.892.6
AmoebaNet-C(C10) [25]31506.457075.792.4
SNAS(C10) [28]1.54.352272.790.8
P-DARTS(C100) [4]0.35.157775.392.5
SDARTS-ADV(C10) [3]1.35.459474.892.2
DOTS(C10) [12]0.35.258175.792.6
DARTS+PT(C10) [27]0.84.6-74.592.0
β-DARTS(C100)0.45.459775.892.9
β-DARTS(C10)0.45.560976.193.0
+ +Table 3. Influence of different weighting schemes on $\beta$ -DARTS. + +
Weighting SchemeCIFAR-10 validCIFAR-10 test
0-15/25/50/10091.21/91.55/91.55/91.5593.83/94.36/94.36/94.36
5/10/15/2584.96/90.59/91.55/90.5988.02/93.31/94.36/93.31
25-15/10/5/090.59/87.30/73.58/39.7793.31/90.65/76.88/54.30
+ +![](images/22a50d4a8d5487200851dbc408463c46ed9e81ecd74556ce6635b9c6ea2aa345.jpg) +(a) $\beta$ -DARTS on NAS-Bench-201 + +![](images/1f68c91f37b1bbccc9bbdc8cb20f2a7a9baa1d9509b3ac2806ae20ed0fc8ad31.jpg) +(b) $\beta$ -SDARTS-RS on NAS-Bench-1Shot1 +Figure 5. The effect of different max weight of linear increased weighting schemes on the searching results. + +ImageNet or using cross domain method. + +# 4.3. Ablation Study + +Importance of Increased Weighting Scheme. We firstly explore the influence of different weighting schemes on $\beta$ -DARTS, including linear increased weighting scheme, constant weighting scheme and linear decay weighting scheme. The results are shown in Table 3. As we can see, linear decay weighting scheme impedes the effect of regularization, constant weighting scheme is sensitive to the hyperparameter, while linear increased weighting scheme is not only effective but also insensitive to hyperparameter. Besides, combining with the results of Fig. 2 that the performance on CIFAR-10, CIFAR-100, andImagenet in single run of searching reach the optimal point in order, we conclude that linear increased regularization coefficient can further maximize the generalization ability of inferred model after the + +searching performance on current data is maximized, as evidenced by Eq. (11) and Eq. (15). + +Wide Range of The Optimal Weight. We further investigate the optimal max weight of linear increased weighting scheme. The results on CIFAR-10 of NAS-Bench-201 and search space 1 of NAS-Bench-1Shot1 are provided in Fig. 5. We can see that the best performance is achieved in a wide range of max weights, namely about 25-100 and 1-13 for $\beta$ -DARTS on NAS-Bench-201 and $\beta$ -SDARTS-RS on NAS-Bench-1Shot1 respectively. There are similar results on CIFAR-10 and CIFAR-100 in common DARTS search space, as shown in Appendix A.2. If not mentioned specially, the default values of max weight for NAS-Bench-201, NAS-Bench-1Shot1, CIFAR-10 and CIFAR-100 are set to 50, 7, 0.5, 5 respectively in all our experiments. Furthermore, comparing Eq. (11) with Eq. (16) and Eq. (17), we find that the normalized values of $\alpha$ in Eq. (11) has the ability to make sure that the optimization process is not sensitive to the hyperparameter of $\lambda$ . + +# 4.4. Discussions + +Non-uniqueness. Actually, the idea of Beta regularization is what really matters, and the way to realize it is nonunique. Here, we show two kinds of variants of Beta regularization loss. Recalling Eq. (10), we can naturally figure out an alternative, using the smoothmax of all architecture parameters on the entire supernet, namely Beta-Global loss. + +$$ +\begin{array}{l} \mathcal {L} _ {B e t a - G l o b a l} = \operatorname {s m o o t h m a x} \left( \begin{array}{c} \alpha_ {1} ^ {1}, \dots , \alpha_ {| \mathcal {O} |} ^ {L} \end{array} \right) \\ = \log \left(\sum_ {l = 1} ^ {L} \sum_ {k = 1} ^ {| \mathcal {O} |} e ^ {\alpha_ {k} ^ {l}}\right) \tag {18} \\ \end{array} +$$ + +Table 4. The results of different Beta regularization loss with different weighting schemes on NAS-Bench-201 benchmark. Note that we only search on CIFAR-10 dataset, and perform 2 runs of searching under different random seeds. + +
MethodsWeighting SchemeCIFAR-10CIFAR-100ImageNet16-120
validtestvalidtestvalidtest
DARTS(1st) [21]3.239.77±0.0054.30±0.0015.03±0.0015.61±0.0016.43±0.0016.32±0.00
Beta-Global0-2591.55/91.5594.36/94.3673.49/73.4973.51/73.5146.37/46.3746.34/46.34
Beta-Global0-5091.55/91.5594.36/94.3673.49/73.4973.51/73.5146.37/46.3746.34/46.34
Beta-Global0-7591.55/91.5594.36/94.3673.49/73.4973.51/73.5146.37/46.3746.34/46.34
Beta-Global0-10091.21/91.5593.83/94.3671.60/73.4971.88/73.5145.75/46.3744.65/46.34
Beta-Zero0-2591.21/90.9793.83/93.9171.60/70.4171.88/70.7845.75/43.7744.65/44.78
Beta-Zero0-5091.55/91.2194.36/93.8373.49/71.6073.51/71.8846.37/45.7446.34/44.65
Beta-Zero0-7591.61/91.0594.37/93.6672.75/71.0273.22/71.3845.56/45.2346.71/44.70
Beta-Zero0-10091.21/91.2193.83/93.8371.60/71.6071.88/71.8845.75/45.7544.65/44.65
+ +![](images/1a80e6e631585c362becfa00ee07871cff239fab552cc1d79b58e54d9cd6766e.jpg) +(a) Search Space 1 + +![](images/c5040ab34b5a40b287a2ad1ec0f98cc1d4f3134750f6e8b0be2d9539d6647352.jpg) +(b) Search Space 2 +Figure 6. Error of SDARTS-RS and $\beta$ -SDARTS-RS on 3 search spaces of NAS-Bench-1Shot1 [30]. The curve is smoothed with 0.5. + +![](images/aa27a8f5a13a87c66557fd07ed42d7b3ea24203c9cba7bcf432f36e48358dc25.jpg) +(c) Search Space 3 + +In addition, by introducing a threshold, we can get the smoothmax between the threshold and each architecture parameter. We simply set the threshold as 0 in this paper, namely Beta-Zero loss. + +$$ +\begin{array}{l} \mathcal {L} _ {\text {B e t a - Z e r o}} = \operatorname {s m o o t h m a x} \left(0, \alpha_ {k} ^ {l}\right) \\ = - \log \left(1 + e ^ {- \alpha_ {k} ^ {l}}\right) \tag {19} \\ \end{array} +$$ + +The results of DARTS with Beta-Global and Beta-Zero regularization loss are shown in Table. 4. As we can see, both loss can promote original DARTS by a large margin, while Beta-Global loss that takes the same effect with Beta-Decay loss, can more stably obtain better results than Beta-Zero loss under different weighting schemes. Such results validate that regularizing $\beta$ is important, while the way to achieve it has a lot of room for exploration. + +Generality. Moreover, we utilize NAS-Bench-1Shot1 [30] benchmark and SDARTS-RS [3] baseline to demonstrate the generality of Beta-Decay regularization. NAS-Bench-1Shot1 contains 3 search spaces, which consist of 6,240, 29,160 and 363,648 architectures with the CIFAR-10 performance separately. On NAS-Bench-1Shot1, both the operator of each edge and the topology of the cell need to be determined. We show the search trajectory in Fig. 6. On one hand, $\beta$ -SDARTS-RS can yield much lower test/Validation error than SDARTS-RS across different search spaces. On the other hand, the error of $\beta$ -SDARTS-RS keeps decreasing while the error of SDARTS-RS increases first and then decreases, validating the more stable search process of $\beta$ -SDARTS-RS. Besides, the search process of $\beta$ -SDARTS + +RS also reaches its optimal point at an early stage (i.e., around 10 epochs), on different search spaces. + +# 5. Conclusion + +In this paper, we investigate the explicit regularization on the optimization of architecture parameters of DARTS in depth, which is typically ignored by previous works. Firstly, we identify that L2 or weight decay regularization on alpha commonly used by DARTS and its variants may not be effective or even counterproductive. Then, we propose a novel and generic Beta-Decay regularization loss, for improving DARTS-based methods without extra changes or cost. In addition, we theoretically and experimentally show Beta-Decay regularization can improve both the robustness and the generalization of DARTS. Besides, we find that the proposed search scheme is less dependent on training time and data. Extensive experiments on various search spaces and datasets validate the superiority of our method. + +# Acknowledgements + +This work was supported by National Natural Science Foundation of China (No.62071127), Shanghai Municipal Science and Technology Major Project (No. 2021SHZDZX0103), and Zhejiang Lab Project (No. 2021KH0AB05). Wanli Ouyang was supported by the Australian Research Council Grant (DP200103223), Australian Medical Research Future Fund (MRFAI000085), and CRC-P Smart Material Recovery Facility SMRF-Curby Soft Plastics. + +# References + +[1] Thomas Elsken Arber Zela, Tonmoy Saikia, Yassine Marrakchi, Thomas Brox, and Frank Hutter. Understanding and robustifying differentiable architecture search. In International Conference on Learning Representations, volume 3, page 7, 2020. +[2] Han Cai, Jiacheng Yang, Weinan Zhang, Song Han, and Yong Yu. Path-level network transformation for efficient architecture search. In International Conference on Machine Learning, pages 678-687. PMLR, 2018. +[3] Xiangning Chen and Cho-Jui Hsieh. Stabilizing differentiable architecture search via perturbation-based regularization. In International Conference on Machine Learning, pages 1554-1565. PMLR, 2020. +[4] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1294-1303, 2019. +[5] Xiangxiang Chu, Xiaoxing Wang, Bo Zhang, Shun Lu, Xiaolin Wei, and Junchi Yan. Darts: robustly stepping out of performance collapse without indicators. arXiv preprint arXiv:2009.01027, 2020. +[6] Xiangxiang Chu, Tianbao Zhou, Bo Zhang, and Jixiang Li. Fair darts: Eliminating unfair advantages in differentiable architecture search. In European conference on computer vision, pages 465-480. Springer, 2020. +[7] Corinna Cortes, Mehryar Mohri, and Afshin Rostamizadeh. L2 regularization for learning kernels. arXiv preprint arXiv:1205.2653, 2012. +[8] Xuanyi Dong and Yi Yang. Searching for a robust neural architecture in fourgpu hours. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1761-1770, 2019. +[9] Xuanyi Dong and Yi Yang. Nas-bench-201: Extending the scope of reproducible neural architecture search. arXiv preprint arXiv:2001.00326, 2020. +[10] Chris Finlay, Jeff Calder, Bilal Abbasi, and Adam Oberman. Lipschitz regularized deep neural networks generalize and are adversarially robust. arXiv preprint arXiv:1808.09540, 2018. +[11] Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. arXiv preprint arXiv:2010.01412, 2020. +[12] Yu-Chao Gu, Li-Juan Wang, Yun Liu, Yi Yang, Yu-Huan Wu, Shao-Ping Lu, and Ming-Ming Cheng. Dots: Decoupling operation and topology in differentiable architecture search. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12311-12320, 2021. +[13] 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. In European Conference on Computer Vision, pages 544-560. Springer, 2020. + +[14] Stephen Hanson and Lorien Pratt. Comparing biases for minimal network construction with back-propagation. Advances in neural information processing systems, 1:177-185, 1988. +[15] Weijun Hong, Guilin Li, Weinan Zhang, Ruiming Tang, Yunhe Wang, Zhenguo Li, and Yong Yu. Dropnas: Grouped operation dropout for differentiable architecture search. In IJCAI, pages 2326-2332, 2020. +[16] Shoukang Hu, Sirui Xie, Hehui Zheng, Chunxiao Liu, Jianping Shi, Xunying Liu, and Dahua Lin. Dsnas: Direct neural architecture search without parameter retraining. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12084-12092, 2020. +[17] Aaron Klein, Stefan Falkner, Jost Tobias Springenberg, and Frank Hutter. Learning curve prediction with bayesian neural networks. 2016. +[18] Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in neural information processing systems, pages 950-957, 1992. +[19] Yanxi Li, Zhaohui Yang, Yunhe Wang, and Chang Xu. Adapting neural architectures between domains. Advances in Neural Information Processing Systems, 33, 2020. +[20] Hanwen Liang, Shifeng Zhang, Jiacheng Sun, Xingqiu He, Weiran Huang, Kechen Zhuang, and Zhenguo Li. Darts+: Improved differentiable architecture search with early stopping. arXiv preprint arXiv:1909.06035, 2019. +[21] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. +[22] Luyan Liu, Zhiwei Wen, Songwei Liu, Hong-Yu Zhou, Hongwei Zhu, Weicheng Xie, Linlin Shen, Kai Ma, and Yefeng Zheng. Mixsearch: Searching for domain generalized medical image segmentation architectures. arXiv preprint arXiv:2102.13280, 2021. +[23] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. +[24] Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nathan Srebro. Exploring generalization in deep learning. arXiv preprint arXiv:1706.08947, 2017. +[25] 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. +[26] 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/CVF Conference on Computer Vision and Pattern Recognition, pages 2820-2828, 2019. +[27] Ruochen Wang, Minhao Cheng, Xiangning Chen, Xiaocheng Tang, and Cho-Jui Hsieh. Rethinking architecture selection in differentiable nas. arXiv preprint arXiv:2108.04392, 2021. +[28] Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. Snas: stochastic neural architecture search. arXiv preprint arXiv:1812.09926, 2018. +[29] Yuhui Xu, Lingxi Xie, Xiaopeng Zhang, Xin Chen, Guo-Jun Qi, Qi Tian, and Hongkai Xiong. Pc-darts: Partial channel + +connections for memory-efficient architecture search. arXiv preprint arXiv:1907.05737, 2019. +[30] Arber Zela, Julien Siems, and Frank Hutter. Nas-bench-1shot1: Benchmarking and dissecting one-shot neural architecture search, 2020. +[31] Miao Zhang, Steven Su, Shirui Pan, Xiaojun Chang, Ehsan Abbasnejad, and Reza Haffari. idarts: Differentiable architecture search with stochastic implicit gradients. arXiv preprint arXiv:2106.10784, 2021. +[32] Pan Zhou, Caiming Xiong, Richard Socher, and Steven CH Hoi. Theory-inspired path-regularized differential network architecture search. arXiv preprint arXiv:2006.16537, 2020. +[33] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697-8710, 2018. +[34] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697-8710, 2018. \ No newline at end of file diff --git a/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/images.zip b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..63d4f91a14189f2880ad78ed5fe9a31a47edb734 --- /dev/null +++ b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b16d014f9c3c55cd644a95e0bf51d12711994c1e728dd9e965a7206e77fe42e8 +size 717054 diff --git a/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/layout.json b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2b0bc18f5d0af04b3b200dea57b21aa88ccc0ce9 --- /dev/null +++ b/bdartsbetadecayregularizationfordifferentiablearchitecturesearch/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aec502acc7e9503e6efef1aa83db4a356d2bfeb776e216e09ccb25389c1964c3 +size 457412 diff --git a/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_content_list.json b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cb03d22348c90471756e718d4225e8be75743105 --- /dev/null +++ b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab00ed69f3d3a78cbb4b95adde2450b9eedaf675ed43d8ec57a50472011aa11a +size 77531 diff --git a/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_model.json b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6e60479fd2a5703accfdf84d8986f8ffb9998bb6 --- /dev/null +++ b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b80853a7333851dab446a597a0237cf24e7bce7e6173879ed71bb2319c82cf53 +size 97646 diff --git a/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_origin.pdf b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8b5b15d24c2e47a4aac19e440d9956f8bb8d7762 --- /dev/null +++ b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/55e080fb-2985-46d6-a227-096d51ebcdb4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f5eed7115544f7cb098f9b8145f893d3f1187485d8e1c010b0ae5a829f910db +size 3421897 diff --git a/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/full.md b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b688ef42da6c4481492555f2a3b9fbc1f79d2d25 --- /dev/null +++ b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/full.md @@ -0,0 +1,292 @@ +# $\phi$ -SfT: Shape-from-Template with a Physics-Based Deformation Model + +Navami Kairanda $^{1,2}$ Edith Tretschk $^{1}$ Mohamed Elgharib $^{1}$ Christian Theobalt $^{1}$ Vladislav Golyanik $^{1}$ $^{1}$ Max Planck Institute for Informatics, SIC + $^{2}$ Saarland University, SIC + +# Abstract + +Shape-from-Template (SfT) methods estimate 3D surface deformations from a single monocular RGB camera while assuming a 3D state known in advance (a template). This is an important yet challenging problem due to the under-constrained nature of the monocular setting. Existing SfT techniques predominantly use geometric and simplified deformation models, which often limits their reconstruction abilities. In contrast to previous works, this paper proposes a new SfT approach explaining 2D observations through physical simulations accounting for forces and material properties. Our differentiable physics simulator regularises the surface evolution and optimises the material elastic properties such as bending coefficients, stretching stiffness and density. We use a differentiable renderer to minimise the dense reprojection error between the estimated 3D states and the input images and recover the deformation parameters using an adaptive gradient-based optimisation. For the evaluation, we record with an RGB-D camera challenging real surfaces exposed to physical forces with various material properties and textures. Our approach significantly reduces the 3D reconstruction error compared to multiple competing methods. For the source code and data, see https://4dqv.mpi-inf.mpg.de/phi-SfT/. + +# 1. Introduction + +Reconstructing general deformable, temporally-coherent surfaces in 3D from monocular RGB videos is a longstanding, challenging and ill-posed problem. It was studied under different assumptions, and methods addressing it can be roughly classified into (template-free) non-rigid structure from motion (NRSfM) [8, 14], (template-based) shape-from-template (SfT) [34, 40], and neural 3D mesh regression [27]. The objective of SfT is: Given a known initial 3D state (a template) of an observed deformable scene or an object, reconstruct all its 3D states observed in the entire image sequence [45]. Recent learning-based SfT methods encode prior knowledge in neural network weights [13, 47]. This offers multiple advantages over a vast body of previ + +![](images/4140e2c384e9b724e5a196cefa9cc84efb75b2a4f03058eb09e5cdade71e86a2.jpg) +Figure 1. Our $\phi$ -SfT approach uses a physics simulator to reconstruct challenging deforming 3D surfaces observed in a monocular RGB video. Compared to existing methods, our estimates are significantly more accurate and physically plausible. + +ous, model-based works [34, 36, 38, 40, 45, 46, 61], such as the ability to handle larger deformations, a broader spectrum of supported types of motions and deformations (including highly nonlinear ones), and real-time operation. One of the pivotal limitations of both classical and neural SfT methods is that they capture general 3D states well but not fine local surface deformations. This is a consequence of the non-awareness of the physical fold formation process attributable to the elastic properties of the materials and forces acting on them. As a result, existing methods can only reconstruct predominantly global deformations. + +This paper proposes $\phi$ -SfT (from Greek $\phi \upsilon \sigma \iota \kappa \eta$ meaning physics): A new analysis-by-synthesis SfT method which addresses several limitations of the current state of the art and improves the accuracy of monocular non-rigid 3D reconstruction by a significant margin; see Fig. 1 for an overview. Our approach explicitly models the physical fold formation process, and its parameters are physically meaningful. $\phi$ -SfT does not require training data. We enable gradient-based optimisation by employing two components: A differentiable renderer and a differentiable physics simulator. Our core idea is to use the latter as a regulariser during the optimisation of our objective function. Next, the differentiable renderer ensures that the reprojections of the recovered 3D states accurately match the observed images. In contrast to earlier photometric terms used for SfT [61], + +differentiable rendering allows us for the first time to define the reprojection error densely per pixel and not only per vertex. We can thus exploit the information present in the texture regardless of the mesh resolution. $\phi$ -SfT is significantly more accurate than related methods and supports finer-scale local folds, which is shown on a wide spectrum of deformations in extensive experiments (Sec. 4). In summary, this paper has the following technical contributions: + +- A new optimisation-based SfT approach with a physics-based deformation model that ensures high physical fidelity and realism for the surface evolution, outputting temporally smooth 3D shape sequences that are aware of the forces acting on the object (Sec. 3). +- Differentiable rendering for SfT to encourage the 2D projections of the reconstructed 3D structure to match the observed images. The differentiability allows optimising for the deformation parameters by minimising a dense per-pixel photometric energy (Sec. 3.2). +- A new dataset of real deforming surfaces recorded in a way to facilitate the quantitative evaluation of reconstruction methods against reference depth maps (Sec. 4.1). The dataset contains surfaces of various textures and materials, exposed to different external forces. We release our dataset and source code to encourage future research. + +# 2. Related Work + +The methods for monocular non-rigid 3D reconstruction differ in the assumptions they make about the input, available prior knowledge and how they model the deformations. This section reviews methods that can be classified into non-rigid structure from motion (NRSfM), shape from template (SfT) and monocular 3D mesh reconstruction. + +NRSfM operates on 2D point tracks over the input monocular views. Earlier NRSfM methods were designed for sparse measurements and modelled deformations with linear subspaces along with various priors [2, 8, 12, 37, 53]. More recent techniques [3, 14, 17, 26] allow reconstructing dense image points observed in a reference frame. They impose constraints on spatial point locations to infer smooth and continuous deforming surfaces. A sparse NRSfM method relying on principles of continuum mechanics represents a deformable object using an estimated (not simulated) elastic model and a low-rank force field acting on it [1]. Even though the force prior has a direct physical interpretation, this model still shares most limitations with other methods. Diff-NRSfM [39] assumes the observed structure preserves its differentiable structure and infinitesimal planarity. This method produces impressive results for smooth surfaces but struggles to reconstruct fine-scale folds, unlike our $\phi$ -SfT. + +Recently, neural NRSfM approaches both for sparse [35, 55] and dense [44, 50] cases were proposed in the literature. Some of them need to be trained for each object + +category [35, 44], whereas N-NRSfM [50] and PAUL [55] run on unknown data. Some 2D keypoint lifting approaches for 3D human pose estimation, such as Chen et al. [10], require only 2D data for supervision and share similarities with neural sparse NRSfM. + +SfT algorithms operate directly on images and assume a known 3D surface prior as input [34, 40, 45, 61]. These methods minimise the 3D-2D reprojection error and impose geometric constraints such as surface inextensibility [40, 45] or isometry [5, 34, 61]. Recent neural SfT methods [13, 18, 41, 47] predict 3D surfaces from monocular images relying on datasets with different template states. Our $\phi$ -SfT contrasts with other SfT methods in that it uses temporal information and a differentiable physics simulator as a regulariser for high-fidelity 3D surface tracking instead of approximating the underlying physical properties via geometric constraints. Moreover, none of these methods uses a per-pixel differentiable photometric loss which ensures that 3D estimates accurately reproject into the 2D images. + +Physics-based priors in 3D human performance capture is an emerging field, although there is some early work on it relying on multi-view data [51]. Rempe et al.'s [43] method and PhysCap [48, 49] show that integrating physics laws into an objective for sparse 3D human motion capture improves the accuracy of the 3D estimates. The proposed constraints reduce the artefacts arising from the monocular setting (e.g., unnatural jitter and body leaning, foot sliding and foot-floor penetration). Several methods for 3D human performance capture include clothes deformations, such as Guo et al. [19] and Li et al. [28]. The method of Guo et al. operates on point clouds and optimises the states of the simulated clothes so that they match the inputs. The cloth motion is expressed through a combination of skin friction, gravity and forces attributed to the material (elasticity). Thus, their focus is cloth state recovery from sparse point cloud measurements, which provide a strong 3D shape cues, whereas we assume a single 3D template and operate on monocular videos; this inverse problem is much more ill-posed. Li et al. generate training data with a physics-based simulator on-the-fly and use it to train a neural network for 3D human performance capture, including clothes deformations. Thus, they do not impose hard physics-based constraints as we do with the differentiable physics simulator. Liang et al. [29] use 3D supervision for physics-based cloth simulation. The work by Weiss et al. [58] recovers material parameters of a physics simulator in an analysis-by-synthesis policy to solve an inverse elasticity problem. In contrast to our method, they additionally require depth inputs for a strong 3D cue and do not recover local surface deformations. The idea of combining a differentiable physics and a differentiable graphics engine has been recently explored in contexts different from ours, i.e., estimation of material properties and visuomotor control [21, 23, 31]. + +Monocular 3D mesh reconstruction approaches can be trained on extensive collections of unstructured views in the desired object category. Some works [6, 11, 57] require 3D supervision, while others, similar to ours, do not: In an early work, Cashman et al. [9] show that almost-rigid object categories, like dolphins, can be reconstructed from image collections. Kanazawa et al. [22] relax the need for input annotations. Li et al. [27] extend [22] to video input and estimate a temporally consistent coarse mesh reconstruction for weakly articulated objects. LASR [60] further relaxes the need for an initial coarse template. We differ from these by the usage of a physics-based deformation model, and we focus on recovering local surface deformations. + +# 3. Our Approach + +We propose $\phi$ -SfT, a new method for the 3D reconstruction of a deforming surface (such as cloth) from a monocular RGB video $\{\mathbf{I}_t\}_{t \in [1, \dots, T]}$ with known intrinsics. As is common for SfT methods [34, 61], we assume that the camera is static and take as input a flat rest shape of the target deformable surface $\mathbf{S}_1$ for $t = 1$ with a corresponding texture map $\mathbf{T}$ . We also assume that a segmentation mask separating a foreground object and background is available. To encourage physically plausible deformations, we use a full physical model, described in Sec. 3.1, that explicitly models forces acting on the surface and the underlying elastic properties of the material. Sec. 3.2 presents the objective function we employ to relate the 2D observations to the estimated reconstructions. We then describe how we optimise the objective function for the physical parameters in Sec. 3.3 and provide implementation details in Sec. 3.4. See Fig. 2 for an overview of $\phi$ -SfT. + +Physics-based simulators are widely used in computer graphics for 3D simulations [4, 33], and differentiable versions exist [29]. Our idea is to use a differentiable physics simulator as a regulariser (deformation model prior) in monocular non-rigid 3D reconstruction. Its usage in SfT is, unfortunately, not straightforward. To integrate the physics-based simulator into our framework, we have to make several crucial improvements to it. First, the idealised assumptions of simulated environments cannot account for the variety of forces and effects causing surface deformations in the real world (e.g., wind turbulence). We take inspiration from the recent work on physically plausible 3D human motion capture [49]. This approach uses a virtual force acting on the root joint of a human skeleton to account for the effects the physics model does not consider. We, therefore, introduce corrective forces accounting for mismatched assumptions about the natural scene (Sec. 3.1). Second, while most simulators used in computer graphics are designed to create simulations following 3D reference motions, it now has to be driven by the 2D input images, and the gradients need to be backpropagated from the image-based losses. Hence, + +our energy function includes a dense photometric loss and a silhouette loss (Sec. 3.2). Lastly, the optimisation strategy suitable for 3D simulations is not the best choice for our analysis-by-synthesis $\phi$ -SfT approach—optimising for deformed surface states, material properties and forces—and we propose an adaptive training strategy instead (Sec. 3.3). + +# 3.1. Deformation Model + +We seek to reconstruct a sequence of deforming surfaces as 2D manifold meshes in 3D space with fixed topology (edges $\mathbf{E}$ ), thereby providing temporal correspondences. A surface in this sequence can be parameterised as a triangular mesh $\mathbf{S}_t = \{\mathbf{V}_t, \mathbf{E}\}$ where the state of the $i$ -th vertex in $\mathbf{V}_t$ comprises its 3D position $\mathbf{x}_t^i \in \mathbb{R}^3$ and its velocity $\mathbf{v}_t^i \in \mathbb{R}^3$ . + +Surface Parametrisation At the core of our method, we model deformations of the non-rigid surface as a physical process, i.e., as elastic deformations resulting from internal stretching and bending forces as well as external forces acting on the surface. We thus do not treat the mesh states $\mathbf{S}_t$ as parameters but instead use a physical parametrisation. + +We initialise the differentiable cloth simulator from the template $\mathbf{S}_1$ and generate $\mathbf{S}_t$ with physics simulation $PS$ according to the material parameters and external forces: + +$$ +\mathbf {S} _ {t} = P S \left(\mathbf {S} _ {t - 1}; \phi_ {t - 1}\right), \tag {1} +$$ + +where $\phi_{t - 1}$ are the estimated physics parameters, i.e., + +$$ +\phi_ {t - 1} = \{d, \mathcal {S}, \mathcal {B}, w, \mathcal {F} _ {t - 1} \}. \tag {2} +$$ + +Here, material density $d\in \mathbb{R}$ , stretching stiffness $\mathcal{S}\in \mathbb{R}^{24}$ (resistance to stretching), and bending stiffness $\mathcal{B}\in \mathbb{R}^{15}$ (resistance to bending and folding) all together describe the elastic properties of the material and, hence, determine the cloth's internal forces. We also optimise for the wind force $w\in \mathbb{R}^3$ . However, the wind model is not sufficient to fully describe all the external forces in the scene, such as hand contacts and wind turbulence. We seek to correct for these model insufficiencies by additionally defining a set of corrective forces $\mathcal{F} = \{\mathcal{F}_t\in \mathbb{R}^{|\mathbf{V}_t|\times 3}\}_{t\in [1,\dots,T - 1]}$ . Note that these vary across vertices and across time. They can, in principle, account for any physical force that the simulator does not explicitly model. In the following, we use the shorthand $\phi = \{d,S,\mathcal{B},w,\mathcal{F}\}$ . + +Physics Simulator For $PS$ , we follow the cloth simulation pipeline introduced by Narain et al. [4, 32, 33]. In the continuous domain, physics-based simulation can be formulated as a time-varying partial differential equation [4]: + +$$ +\frac {\partial^ {2} \mathbf {x}}{\partial t} = \mathbf {M} ^ {- 1} \mathbf {f} (\mathbf {x}, \mathbf {v}), \tag {3} +$$ + +![](images/f161b3aefd0121733a83df3012a50fd5948c5c340dc67feb86036bcb9f6848ad.jpg) +Figure 2. Given a sequence of monocular input images $\{\mathbf{I}_t\}_t$ , a template at the rest position $\mathbf{S}_1$ and the corresponding texture map $\mathbf{T}$ , our technique solves for the unknown physical parameters $\phi$ that describe the deforming 3D surface $\{\mathbf{S}_t\}_t$ . We optimise for the per-sequence physical parameters of $\{d, S, B, w\}$ as well as the per-frame corrective forces $\{\mathcal{F}_t\}_t$ in a gradient-based manner. We utilise (1) a physics-based differentiable simulator $PS$ for reconstructing meshes with a physical deformation model and (2) a differentiable renderer $R$ for projecting the reconstructions into image space, which allows us to define a reprojection error over all pixels (instead of vertices) during optimisation. The differentiable nature of both components enables us to back-propagate the gradients of the total energy $E$ all the way back to the unknown physics parameters. Note that the gradients are calculated automatically and provided here for completeness. + +where $(\mathbf{x},\mathbf{v})$ is the vertex state, and $\mathbf{M}$ is a diagonal matrix of the mass distribution derived from the material density $d$ and surface area. $\mathbf{f}(\cdot)$ are the forces, i.e., internal forces which are a function of cloth elastic properties $\mathcal{S}$ and $\mathcal{B}$ as well as external forces such as wind $w$ and corrective forces $\mathcal{F}_t$ . We follow the elastic model for cloth material of Wang et al. [56] for describing the effects of $d$ , $\mathcal{S}$ and $\mathcal{B}$ . This model approximates various nonlinear and anisotropic behaviours seen in cloths when subject to external forces. + +In practice, we are given the known position $\mathbf{x}_{t - 1}$ and velocity $\mathbf{v}_{t - 1}$ of the system at time $t - 1$ . Our goal is to determine the new position $\mathbf{x}_t = \mathbf{x}_{t - 1} + \Delta \mathbf{x}$ and velocity $\mathbf{v}_t = \mathbf{v}_{t - 1} + \Delta \mathbf{v}$ at time $t$ with a time step size $h = 1$ . To that end, (3) can be transformed into a first-order differential equation and solved for $\Delta \mathbf{x}$ and $\Delta \mathbf{v}$ with the implicit, backward Euler method [4]: + +$$ +\binom {\Delta \mathbf {x}} {\Delta \mathbf {v}} = h \binom {\mathbf {v} _ {t}} {\mathbf {M} ^ {- 1} \mathbf {f} \left(\mathbf {x} _ {t}, \mathbf {v} _ {t}\right)}, \tag {4} +$$ + +which is nonlinear due to $\mathbf{f}$ . To turn (4) into a linear system, $\mathbf{f}$ can be approximated via linearisation: + +$$ +\mathbf {f} \left(\mathbf {x} _ {t}, \mathbf {v} _ {t}\right) = \mathbf {f} _ {t - 1} + \frac {\partial \mathbf {f}}{\partial \mathbf {x}} h \left(\mathbf {v} _ {t - 1} + \Delta \mathbf {v}\right) + \frac {\partial \mathbf {f}}{\partial \mathbf {v}} \Delta \mathbf {v}, \tag {5} +$$ + +where the Jacobians $\frac{\partial\mathbf{f}}{\partial\mathbf{x}}$ and $\frac{\partial\mathbf{f}}{\partial\mathbf{v}}$ are evaluated at $\mathbf{f}_{t - 1}$ . Thus, a simple cloth simulation process involves solving for $\mathbf{v}_t$ + +using (4) and (5), and computing the subsequent simulation state as $\mathbf{x}_t = \mathbf{x}_{t - 1} + h\mathbf{v}_t$ + +There can additionally be self-collisions and collisions with a dynamic obstacle mesh $(\mathbf{x}_t^{obs},\mathbf{v}_t^{obs})$ during simulation. Harmon et al. [20] determine the collision response at the impact zones to update the vertex positions accordingly: + +$$ +\mathbf {x} _ {t} = \mathbf {x} _ {t} + \text {c o l l i s i o n - r e s p o n s e} \left(\mathbf {x} _ {t}, \mathbf {v} _ {t}, \mathbf {x} _ {t} ^ {\text {o b s}}, \mathbf {v} _ {t} ^ {\text {o b s}}\right). \tag {6} +$$ + +Since we want to use end-to-end gradient-based optimisation, we need to backpropagate gradients through this extra step. However, due to the high dimensionality of the dynamical system when modelling cloth, a naive gradient computation for the general system (4) and (6) (the collision response) can become impractical. Liang et al. [29] propose a solution for this problem, and we proceed with their approach. Specifically, they use implicit differentiation for (4) and (6), where the gradient of the latter is approximated via QR decomposition of a much smaller constraint matrix. For more details on the backward pass, please refer to [29]. We next describe the objective function we use to optimise for the parameters $\phi$ of the differentiable simulator. + +# 3.2. Our Objective Function + +We now have a physical deformation model that is parametrised by $\phi$ , and that outputs a 3D mesh $\mathbf{S}_t$ for time + +$t$ . We solve for the optimal parameters $\phi^{*}$ by minimising the objective function $E = E_{p} + \lambda E_{s}$ (with $\lambda \in \mathbb{R}$ ): + +$$ +\phi^ {*} = \underset {\phi} {\arg \min } E (\phi). \tag {7} +$$ + +Since we are only given RGB images for time $t > 1$ , we define a photometric energy term $E_{p}$ in the image space. Specifically, $E_{p}$ is an $\ell_{1}$ RGB data term to encourage photometric consistency between the reconstructed surface rendered into 2D and the input frames: + +$$ +E _ {p} = \sum_ {t = 2} ^ {T} \| R (\mathbf {S} _ {t}, \mathbf {T}) - \mathbf {I} _ {t} \| _ {1}, \tag {8} +$$ + +where $R(\cdot)$ is a differentiable renderer outputting a perspective projection of the input mesh (textured with $\mathbf{T}$ ) onto the image plane with known intrinsic. We implement $R$ with Soft Rasterizer [30], which introduces useful gradients by composing probability maps of rendered triangles into the final image. This allows us 1) to define $E_{p}$ densely over all pixels, instead of just the vertices; 2) use the information in the high-resolution $\mathbf{T}$ that would have been ignored if we had used a photometric term only at the vertices. + +While the photometric energy term works well for local corrections, it does not provide a signal for mismatches that are farther apart in the image space. To get a signal even for larger, coarser errors, we add a silhouette energy term that encourages consistency between the foreground segmentation mask of the input frames and the rendered 2D surface: + +$$ +E _ {s} = \sum_ {t = 2} ^ {T} \| G (B _ {t}; \sigma) - G (\hat {B} _ {t}; \sigma) \| _ {1}. \tag {9} +$$ + +Here, $B$ and $\hat{B}$ are the foreground binary segmentation masks of the reconstructed and the input images, respectively. $G(\cdot, \sigma)$ represents a Gaussian filter of standard deviation $\sigma$ . The Gaussian filter smooths the binary masks, extending the spatial area where informative gradients are obtainable. Without it, non-zero gradients would be obtained only at pixels located immediately next to the silhouettes of both binary masks. Thus, if the silhouettes do not match almost perfectly at a pixel, the gradient would be zero there, providing no signal to the network as to the target direction to move the mesh's triangles. Importantly, both the groundtruth mask $B$ and the rendered mask $\hat{B}$ are processed in the same way, ensuring that $E_{s}$ is well-behaved. + +Given our model and the objective function, we next look at how we solve the optimisation problem. + +# 3.3. Optimisation + +Our goal is to obtain the optimal physical parameters $\phi^{*}$ via (7). We use iterative, gradient-based optimisation to that end. Since both the simulator $PS$ and the renderer $R$ are + +differentiable, we can back-propagate gradients from the objective function $E$ through the rendering to $\mathbf{S}_t$ and from there further through the physics simulation to the physical parameters $\phi$ and further to all earlier meshes (see Fig. 2). + +Initialisation To obtain a sufficiently accurate initial guess for the elastic properties $d$ , $\mathcal{S}$ , and $\mathcal{B}$ , we set them to the average values of ten different real fabrics [56]. The wind and corrective forces $\mathcal{F}$ are initialised to $\mathbf{0}$ , i.e., a zero vector. Note that this initialisation leads $PS$ to initially generate surfaces $\{\mathbf{S}_t\}_t$ that are identical to the template $\mathbf{S}_1$ . + +![](images/d52692ed63eb7710d250b2cd46e80eb05437ef5886070454c334e3cd3741e502.jpg) +Figure 3. Our adaptive optimisation scheme. + +Adaptive Optimisation Scheme Since simulation is a temporal process, $\phi$ for the early frames directly influence the reconstructions of the later frames. In addition, later frames are initially reconstructed at lower fidelity than earlier ones. Therefore, similar to + +tracking a surface, we exploit the temporal frame order and do not optimise for all $t \geq 1$ from the start. Instead, we adaptively grow the active temporal window, i.e., the latest time $t_a$ up to which all earlier frames $t \leq t_a$ participate in the optimisation. We start with the first five frames as active and optimise $E(7)$ for them. Once the energy of the latest frame decreases below a threshold $b$ , we add the next frame to the optimisation; see Fig. 3. $b$ is set to the energy that the fifth frame has when the sixth frame is added. We assume the fifth frame to be well-reconstructed since it is early in the sequence. (In case the optimisation cannot reach the threshold, we set a maximum number of iterations, after which we progress regardless.) This adaptive scheme speeds up optimisation by converging to a reasonable guess for $\phi$ before later frames become active. Moreover, it allocates more iterations to frames with more challenging deformations. We evaluate the adaptive optimisation scheme experimentally in Sec. 4.3. + +# 3.4. Implementation Details + +We implement $\phi$ -SfT in Pytorch [42]. (7) is solved with the Adam optimiser [25] with learning rate $10^{-3}$ . The adaptive optimisation scheme leads to several hundred iterations in most cases, which takes 16-24 hours on an Nvidia RTX 8000 GPU. Due to the sequential nature of the simulator, we compute the objective function for all active times $t$ for each optimisation iteration. We set $\sigma = 7px$ , $\lambda = 0.5$ for $E_{s}$ and apply the corrective forces $\mathcal{F}$ by modifying the velocity of vertex $i$ at time $t$ : $v_{t}^{i} = v_{t}^{i} + \mathcal{F}_{t}^{i}$ (because both mass and time steps are constant). We keep the wind air density fixed at $1\mathrm{kg / m^3}$ and optimise only for the wind velocity. + +The images in our real scenes have resolution $1920 \times 1080$ pixels. We also pre-process the real scenes (recorded with an RGB-D camera): We first segment out the background from the captured images and point clouds by depth thresholding. We next use Poisson surface reconstruction [24] on the template (at $t = 1$ ), which yields $\sim 300$ vertices on average. We then determine the initial rigid pose relative to a flat sheet (which is required by the simulator) using iterative closest point (ICP) [7], and initialise the simulator with it. We obtain the texture map $\mathbf{T}$ by projecting the vertices of the template mesh $\mathbf{S}_1$ onto the image space of the first image $\mathbf{I}_1$ with known camera intrinsics. + +# 4. Experimental Results + +We evaluate our technique on real and synthetic data. We recorded the $\phi$ -SfT real dataset (Sec. 4.1) of natural sequences using a monocular RGB camera and the depth camera Azure Kinect. The latter is used to obtain pseudoground-truth segmentations and deformations. Qualitative and quantitative results on this dataset in Sec. 4.2 show our technique clearly outperforms the state of the art by capturing a wider variety of deformations and local folds. In addition, we generate a new $\phi$ -SfT synthetic dataset of four monocular RGB sequences of naturally deforming surfaces using physics-based simulation; see our supplement for further details and evaluations, likewise demonstrating the superior performance of $\phi$ -SfT. We also perform an ablation study in Sec. 4.3 that demonstrates the importance of corrective forces and other design choices. + +# 4.1. The $\phi$ -SfT Real Dataset + +We have recorded a new dataset of deforming surfaces to allow quantitative evaluations of reconstruction methods on real data against pseudo ground truth. The dataset includes nine sequences of various surface shapes and textures, including differing material properties due to differences in the cloths' fabric and weaving (e.g., there are more and less elastic and more and less dense materials). The texture pattern varies from fine-grained and regular to more global and irregular patterns; the cloth size ranges from $55 \times 55 \mathrm{~cm}$ to $95 \times 95 \mathrm{~cm}$ . The surfaces are exposed to external forces, i.e., gravity, wind, and hand contacts. Each sequence is simultaneously recorded using a monocular RGB and depth camera and has a length of about 40 frames, such that they focus on challenging folds. To obtain the texture map $\mathbf{T}$ under the same lighting conditions as the recorded sequence, we start with a flat rest state for $t = 1$ and obtain $\mathbf{T}$ from it. Then, pseudo-ground-truth deformations for each frame are reconstructed as point clouds through backprojection, using the depth images and known camera intrinsics. The point clouds are provided in absolute distance units (meters). Fig. 4 shows an overview of the recorded sequences. + +![](images/b5921067abc1bfd9b404bbd1568fc6fa2e96d4facc6f57d08ad8ebfbadd25662.jpg) +Figure 4. We record a new $\phi$ -SfT real dataset of nine sequences with reference depth data to facilitate quantitative comparisons of monocular 3D surface reconstruction methods. Our setup consists of a synchronised RGB camera and an Azure Kinect. The depth camera provides depth maps serving as pseudo ground truth. + +# 4.2. Comparison with Existing Methods + +We compare our technique to SfT methods, namely Yu et al.'s Direct, Dense, Deformable (DDD) [61], Ngo et al.'s Ngo2015 [34] and Shimada et al.'s IsMo-GAN [47], as well as Sidhu et al.'s Neural NRSfM (N-NRSfM) [50] and Parashar et al.'s Diff-NRSfM [39]. + +Since NRSfM methods accept 2D point correspondences, we track 2D points densely across the input images with multi-frame subspace flow (MFSF) [15, 16], as suggested in [50]. The first frame of the sequence is selected as a keyframe for tracking. We provide DDD with the required hierarchy of coarse-to-fine templates and Ngo2015 with the same template as ours. To demonstrate the necessity for the physical simulation based on the internal stretching and bending forces, we show results of the "Only $\mathcal{F}$ " baseline where the only forces are the correctives $\{\mathcal{F}_t\}_t$ . As other forces and parameters are omitted, we implement this baseline as optimisation of per-vertex offsets over time. + +Due to the monocular scale and depth ambiguities, we align reconstructions of all methods to the ground truth in a rigid-body fashion. For the first frame, we determine the transformation matrix using Procrustes alignment [54], which is further refined with rigid ICP [7] for later frames. + +For quantitative evaluation, we compute the Chamfer distance between the pseudo-ground-truth point cloud from Kinect $G = \{\mathbf{g}_i\in \mathbb{R}^3\}_{i}$ and points $M = \{\mathbf{m}_j\in \mathbb{R}^3\}_{j}$ sampled from the reconstructed mesh: + +$$ +C h _ {G, M} = \frac {1}{| G |} \sum_ {\mathbf {g} \in G} \min _ {\mathbf {m} \in M} \| \mathbf {g} - \mathbf {m} \| _ {2} ^ {2} + \frac {1}{| M |} \sum_ {\mathbf {m} \in M} \min _ {\mathbf {g} \in G} \| \mathbf {m} - \mathbf {g} \| _ {2} ^ {2}. \tag {10} +$$ + +We report average Chamfer distance per sequence $\tilde{C} h_{G,M}$ . Figs. 1 and 6 show that $\phi$ -SfT substantially outperforms all tested methods qualitatively; see the supplement for more visualisations of our results. Tab. 1 shows that $\tilde{C} h_{G,M}$ of $\phi$ -SfT is on average lower than $\tilde{C} h_{G,M}$ of competing methods. + +Our results confirm that SfT and NRSfM, both relying on simple geometric prior assumptions (such as surface smoothness, isometry or small local deformations), cannot cope with the elaborate fold patterns present in our dataset. The results of N-NRSfM follow the silhouettes of the input images better than DDD and IsMO-GAN, thanks to 2D point tracking, even though its $\tilde{C} h_{G,M}$ is the highest (due to rigidity assumption for the initialisation [50, 52]). Its 3D surfaces are somewhat rugged, and the surface pattern allows to recognise the observed texture in the second row. Moreover, as expected, more fine-grained textures result in more accurate 2D point tracking by MFSF. DDD does not track large deformations and silhouettes well in our tests. IsMo-GAN, trained on rather smooth surfaces, cannot reproduce local folds and barely captures the contours. Diff-NRSfM produces reasonable reconstructions in smooth regions owing to its differentiable structure-preserving formulation. However, it is sensitive to noise in 2D measurements, which leads to visual artefacts in the regions with challenging folds. Ngo2015 failed on three scenes (partially on S7 and entirely on S8 and S9). Ngo2015 mostly produces physically implausible results but achieves lower $\tilde{C} h_{G,M}$ on a few scenes; qualitative observations, however, remain the same for all sequences (Figs. 1 and 6). This suggests that an isometry prior [34] is less effective compared to our physics-based elastic model, which can even express non-isometric deformations (depending on the parameters). When removing all forces from the model except for the correctives, the results degrade in quality and average error increases $>50\%$ , see "Only $\mathcal{F}$ " in Fig. 6 and Tab. 1. This experiment demonstrates that the accuracy of the full $\phi$ -SfT model does not rely solely on the corrective forces. In contrast, $\phi$ -SfT estimates temporally coherent surfaces and captures all significant folds while missing only small nuances. As seen in Fig. 1, our physics-based model provides a reasonable prior for self-occluded surface parts. Moreover, our method is not sensitive to initialisation. We empirically find no issue with always initialising with our default material parameters. + +See Fig. 5 for depth maps reconstructed by $\phi$ -SfT. This alternative way to visualise the results allows us to study and perceive even smaller surface details. We also strongly encourage the readers to watch our supplementary video. + +# 4.3. Ablative Study + +We conduct an ablative study on the various design choices to integrate the physics simulator into the SfT setting. We test the following modes: 1) Operation without corrective forces $\mathcal{F}$ , 2) Influence of the adaptive training by considering all frames from the start (Sec. 3.3), and 3) Disabling the silhouette term (9). On average across all sequences, we obtain $\tilde{C} h_{G,M} = 10.69$ , 6.21, 5.33, and 4.48 for w/o $\mathcal{F}$ , w/o adaptive, w/o $E_{s}$ , and the full model, re + +![](images/72b128ae252d5ba474e625ed20b287fdfb90e92751780b55b3bbfe8b0342b13d.jpg) +Figure 5. We show qualitative results as colour-coded depth maps. For (a) the given RGB image, (b) the ground-truth depth map exhibits similar features as (c) our reconstructed depth. Both the coarse shape and local folds are well captured. + +
Seq.IsMo-GANN-NRSfMDDDDiff-NRSfMNgo2015Only Fφ-SFT
S119.698.252.9517.142.192.590.79
S222.1833.621.694.461.511.602.75
S333.54104.603.804.402.173.233.54
S490.3077.0225.7341.3715.9014.957.60
S592.7872.6610.4626.9210.7221.326.15
S657.628.736.9714.023.013.083.14
S749.27129.4415.6412.497.95*6.034.73
S824.4538.067.619.91fail3.782.52
S953.1219.8111.775.29fail4.392.36
Avg.49.2254.6910.8715.115.92*6.773.93
+ +Table 1. We quantitatively compare $\phi$ -SfT to the state of the art on the real dataset. The average Chamfer distance $\bar{C} h_{G,M}$ is multiplied by $10^{4}$ for readability. \*\*: Ngo2015 failed on the last few frames of S7, which we exclude from the error computation. + +spectively. Omitting $\mathcal{F}$ always leads to a significant error increase, and abandoning our adaptive training policy increases it by $39\%$ . Fig. 7 shows qualitative results confirming the statistics over all sequences, i.e., the largest errors are present in the colour-coded error maps when $\mathcal{F}$ is disabled. The second most crucial component of $\phi$ -SfT is the adaptive training strategy. Note that $E_{s}$ helps when the structure deforms and significantly changes its shape in the re-projection. See our supplement for the complete report. + +# 4.4. Discussion and Future Directions + +We use PyTorch3D [42] for rendering; it only supports a single light source, which can differ from the illumination during the recording. There is, therefore, a systematic mismatch between the rendered reconstructions during training and the input images. Still, $\phi$ -SfT achieves high accuracy, as our differentiable rendering loss is empirically robust to small noise and mismatches in colour and shading. The runtime of our approach is comparably high (i.e., twice as long as N-NRSfM [50]). This is due to single-threading + +![](images/a6b6cb95cff1b3866a138e2963097471f5233b268ef28c0fa7ae2e1095a0d05c.jpg) +Figure 6. Qualitative comparisons of several tested methods [34, 39, 47, 50, 61] and $\phi$ -SfT for a representative frame of the S1, S3 and S4 sequences. Our results are significantly more accurate and, unlike the other methods, capture the folds well (especially for S3). + +![](images/864714b4d204f0c13f109642b8d3a2a8f7cf7a721ee96342992ddb075d9a219e.jpg) +Figure 7. In the ablative study, we remove corrective forces, the adaptive scheme, or the silhouette energy term. The corrective forces are the most crucial component to make our method work. + +![](images/0ba65cd70fc8d78d84214711d3f2f7d63f46c433ffedd46c8a2ea9401e8a40aa.jpg) +Figure 8. Limitation: Due to the high runtime of the simulator, we use a lower-resolution mesh, which suffices to capture local folds but limits the reconstruction of very fine wrinkles (dashed area). + +when resolving collisions which can be improved through parallelisation. Next, we use lower-resolution meshes for all sequences, with $\sim 300$ vertices, as optimising model parameters with higher resolutions is not feasible. This limits the reconstruction accuracy as we cannot capture very fine wrinkles, as shown in Fig. 8. However, note that our photometric energy is defined densely over all pixels, instead of just the vertices, and thus uses the information in the high-resolution texture map. Therefore, the lower number of vertices does not impede $\phi$ -SfT's ability to capture folds. Moreover, even more sophisticated physics simula + +tors could be implemented, taking into account more physical laws (e.g., wind turbulence or electrostatic forces). Such requirements depend on downstream applications such as game and movie production or industrial quality control. + +In this first work of its kind, we focus on investigating how a physics-based deformation model can be leveraged in classical SfT. Accurate inference of deformation forces and materials remains a difficult problem that deserves more investigation in the future. Nonetheless, $\phi$ -SfT infers them well enough to enable intuitive editing; see the supplement. While we do not target complex objects or new scenarios—such as the separate field of virtual garment and dress simulations [19, 59]—this can be an interesting future avenue. + +# 5. Conclusion + +We introduced $\phi$ -SfT, a new optimisation-based SfT method that models deformations with a physical simulator and uses differentiable rendering to define a reprojection energy term over all pixels, exploiting texture information independent of the mesh resolution. Experiments on the new dataset demonstrate that our approach improves the reconstructions qualitatively and quantitatively by a significant margin over competing techniques of several method classes. Especially remarkable is $\phi$ -SfT's accuracy in folded surface regions. We believe that the proposed technique has a high potential for future research, and we hope to see more improvements on physically principled methods for monocular non-rigid 3D reconstruction. + +Acknowledgements. We thank Shaifali Parashar for her help with the source code of Diff-NRSfM [39]. This work was supported by the ERC Consolidator Grant 4DRepLy (770784). + +# References + +[1] Antonio Agudo and Francesc Moreno-Noguer. Learning shape, motion and elastic models in force space. In International Conference on Computer Vision (ICCV), 2015. 2 +[2] Ijaz Akhter, Yaser Sheikh, Sohaib Khan, and Takeo Kanade. Nonrigid structure from motion in trajectory space. In Advances in Neural Information Processing Systems (NeurIPS), 2009. 2 +[3] Mohammad Dawud Ansari, Vladislav Golyanik, and Didier Stricker. Scalable dense monocular surface reconstruction. In International Conference on 3D Vision (3DV), 2017. 2 +[4] David Baraff and Andrew Witkin. Large steps in cloth simulation. ACM Transactions on Graphics, page 43-54, 1998. 3, 4 +[5] Adrien Bartoli, Yan Gérard, François Chadebecq, Toby Collins, and Daniel Pizarro. Shape-from-template. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 37(10):2099-2118, 2015. 2 +[6] Jan Bednarik, Vladimir G. Kim, Siddhartha Chaudhuri, Shaifali Parashar, Mathieu Salzmann, Pascal Fua, and Noam Aigerman. Temporally-coherent surface reconstruction via metric-consistent atlases. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10458-10467, October 2021. 3 +[7] Paul J Besl and Neil D McKay. Method for registration of 3-d shapes. In Sensor fusion IV: control paradigms and data structures, volume 1611, pages 586-606. Spie, 1992. 6 +[8] Christoph Bregler, Aaron Hertzmann, and Henning Biermann. Recovering non-rigid 3d shape from image streams. In Computer Vision and Pattern Recognition (CVPR), 2000. 1, 2 +[9] Thomas J. Cashman and Andrew W. Fitzgibbon. What shape are dolphins? building 3d morphable models from 2d images. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 35(1):232-244, 2013. 3 +[10] Ching-Hang Chen, Ambrish Tyagi, Amit Agrawal, Dylan Drover, Rohith MV, Stefan Stojanov, and James M. Rehg. Unsupervised 3d pose estimation with geometric self-supervision. In Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[11] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In European Conference on Computer Vision (ECCV), 2016. 3 +[12] Yuchao Dai, Hongdong Li, and Mingyi He. A simple prior-free method for non-rigid structure-from-motion factorization. In Computer Vision and Pattern Recognition (CVPR), 2014. 2 +[13] David Fuentes-Jimenez, Daniel Pizarro, David Casillas-Perez, Toby Collins, and Adrien Bartoli. Texture-generic deep shape-from-template. IEEE Access, 9:75211-75230, 2021. 1, 2 +[14] Ravi Garg, Anastasios Roussos, and Lourdes Agapito. Dense variational reconstruction of non-rigid surfaces from monocular video. In Computer Vision and Pattern Recognition, 2013. 1, 2 + +[15] Ravi Garg, Anastasios Roussos, and Lourdes Agapito. A variational approach to video registration with subspace constraints. International Journal of Computer Vision (IJCV), 104(3):286-314, 2013. 6 +[16] Ravi Garg, Anastasios Roussos, and Lourdes Agapito. Source code of Multi-Frame Subspace Flow (MFSF). http://www0.cs.ucl.ac.uk/staff/lagapito/subspace_flow/, 2015.6 +[17] Vladislav Golyanik, André Jonas, and Didier Stricker. Consolidating segmentwise non-rigid structure from motion. In Machine Vision Applications (MVA), 2019. 2 +[18] Vladislav Golyanik, Soshi Shimada, Kiran Varanasi, and Didier Stricker. Hdm-net: Monocular non-rigid 3d reconstruction with learned deformation model. In EuroVR, 2018. 2 +[19] Jingfan Guo, Jie Li, Rahul Narain, and Hyun Soo Park. Inverse simulation: Reconstructing dynamic geometry of clothed humans via optimal control. In Computer Vision and Pattern Recognition (CVPR), pages 14698-14707, 2021. 2, 8 +[20] David Harmon, Etienne Vouga, Rasmus Tamstorf, and Eitan Grinspun. Robust treatment of simultaneous collisions. SIGGRAPH (ACM Transactions on Graphics), 27(3):1-4, 2008. 4 +[21] Miguel Jaques, Michael Burke, and Timothy Hospedales. Physics-as-inverse-graphics: Unsupervised physical parameter estimation from video. In International Conference on Learning Representations, 2020. 2 +[22] Angjoo Kanazawa, Shubham Tulsiani, Alexei A. Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. In European Conference on Computer Vision (ECCV), 2018. 3 +[23] Rama Kandukuri, Jan Achterhold, Michael Moeller, and Joerg Stueckler. Learning to identify physical parameters from video using differentiable physics. In Proc. of the 42th German Conference on Pattern Recognition (GCPR), 2020. 2 +[24] Michael Kazhdan and Hugues Hoppe. Screenedoisson surface reconstruction. ACM Trans. Graph., 32(3), 2013. 6 +[25] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv e-prints, 2017. 5 +[26] Suryansh Kumar, Anoop Cherian, Yuchao Dai, and Hongdong Li. Scalable dense non-rigid structure-from-motion: A grassmannian perspective. In Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[27] Xueting Li, Sifei Liu, Shalini De Mello, Kihwan Kim, Xiaolong Wang, Ming-Hsuan Yang, and Jan Kautz. Online adaptation for consistent mesh reconstruction in the wild. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 1, 3 +[28] Yue Li, Marc Habermann, Bernhard Thomaszewski, Stelian Coros, Thabo Beeler, and Christian Theobalt. Deep Physics-aware Inference of Cloth Deformation for Monocular Human Performance Capture. In 3D Vision (3DV), 2021. 2 +[29] Junbang Liang, Ming Lin, and Vladlen Koltun. Differentiable cloth simulation for inverse problems. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019. 2, 3, 4 + +[30] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. International Conference on Computer Vision (ICCV), 2019. 5 +[31] J. Krishna Murthy, Miles Macklin, Florian Golemo, Vikram Voleti, Linda Petrini, Martin Weiss, Breandan Considine, Jérôme Parent-Lévesque, Kevin Xie, Kenny Erleben, Liam Paull, Florian Shkurti, Derek Nowrouzezahrai, and Sanja Fidler. gradsim: Differentiable simulation for system identification and visuomotor control. In International Conference on Learning Representations (ICLR), 2021. 2 +[32] Rahul Narain, Tobias Pfaff, and James F. O'Brien. Folding and crumpling adaptive sheets. ACM Trans. Graph., 32(4), 2013. 3 +[33] Rahul Narain, Armin Samii, and James F. O'Brien. Adaptive anisotropic remeshing for cloth simulation. ACM Transactions on Graphics, pages 147:1-10, 2012. 3 +[34] Dat Tien Ngo, Sanghyuk Park, Anne Jorstad, Alberto Crivellaro, Chang D. Yoo, and Pascal Fua. Dense image registration and deformable surface reconstruction in presence of occlusions and minimal texture. In International Conference on Computer Vision (ICCV), 2015. 1, 2, 3, 6, 7, 8 +[35] David Novotny, Nikhila Ravi, Benjamin Graham, Natalia Neverova, and Andrea Vedaldi. C3dpo: Canonical 3d pose networks for non-rigid structure from motion. In International Conference on Computer Vision (ICCV), 2019. 2 +[36] Jonas Östlund, Aydin Varol, Dat Tien Ngo, and Pascal Fua. Laplacian meshes for monocular 3d shape recovery. In European Conference on Computer Vision (ECCV), 2012. 1 +[37] Marco Paladini, Alessio Del Bue, Marko Stosic, Marija Dodig, Jo ao Xavier, and Lourdes Agapito. Factorization for non-rigid and articulated structure using metric projections. In Computer Vision and Pattern Recognition (CVPR), 2009. +[38] Shaifali Parashar, Daniel Pizarro, Adrien Bartoli, and Toby Collins. As-rigid-as-possible volumetric shape-from-template. In International Conference on Computer Vision (ICCV), 2015. 1 +[39] Shaifali Parashar, Mathieu Salzmann, and Pascal Fua. Local non-rigid structure-from-motion from diffeomorphic mappings. In Computer Vision and Pattern Recognition (CVPR), 2020. 2, 6, 8 +[40] Mathieu Perriollat, Richard Hartley, and Adrien Bartoli. Monocular template-based reconstruction of inextensible surfaces. International Journal of Computer Vision (IJCV), 95(2):124-137, 2011. 1, 2 +[41] Albert Pumarola, Antonio Agudo, Lorenzo Porzi, Alberto Sanfeliu, Vincent Lepetit, and Francesc Moreno-Noguer. Geometry-Aware Network for Non-Rigid Shape Prediction from a Single View. In Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[42] Nikhila Ravi, Jeremy Reizenstein, David Novotny, Taylor Gordon, Wan-Yen Lo, Justin Johnson, and Georgia Gkioxari. Accelerating 3d deep learning with pytorch3d. arXiv:2007.08501, 2020. 5, 7 +[43] Davis Rempe, Leonidas J. Guibas, Aaron Hertzmann, Bryan Russell, Ruben Villegas, and Jimei Yang. Contact and hu + +man dynamics from monocular video. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. 2 +[44] Mihir Sahasrabudhe, Zhixin Shu, Edward Bartrum, Riza Alp Güler, Dimitris Samaras, and Iasonas Kokkinos. Lifting AutoEncoders: Unsupervised Learning of a Fully-Disentangled 3D Morphable Model Using Deep Non-Rigid Structure From Motion. In International Conference on Computer Vision Workshops (ICCVW), 2019. 2 +[45] Mathieu Salzmann, Julien Pilet, Slobodan Ilic, and Pascal Fua. Surface deformation models for nonrigid 3d shape recovery. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 29(8):1481-1487, 2007. 1, 2 +[46] Mathieu Salzmann, Raquel Urtasun, and Pascal Fua. Local deformation models for monocular 3d shape recovery. In Computer Vision and Pattern Recognition (CVPR), 2009. 1 +[47] 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. 1, 2, 6, 8 +[48] Soshi Shimada, Vladislav Golyanik, Weipeng Xu, Patrick Pérez, and Christian Theobalt. Neural monocular 3d human motion capture with physical awareness. ACM Transactions on Graphics, 40(4), 2021. 2 +[49] Soshi Shimada, Vladislav Golyanik, Weipeng Xu, and Christian Theobalt. Physcap: Physically plausible monocular 3d motion capture in real time. ACM Transactions on Graphics, 39(6), 2020. 2, 3 +[50] Vikramjit Sidhu, Edgar Tretschk, Vladislav Golyanik, Antonio Agudo, and Christian Theobalt. Neural dense non-rigid structure from motion with latent space constraints. In European Conference on Computer Vision (ECCV), 2020. 2, 6, 7, 8 +[51] Carsten Stoll, Juergen Gall, Edilson de Aguiar, Sebastian Thrun, and Christian Theobalt. Video-based reconstruction of animatable human characters. In ACM SIGGRAPH Asia, 2010. 2 +[52] Carlo Tomasi and Takeo Kanade. Shape and motion from image streams under orthography: a factorization method. International Journal of Computer Vision (IJCV), (2):137-154, 1992. 7 +[53] Lorenzo Torresani, Aaron Hertzmann, and Chris Bregler. Nonrigid structure-from-motion: Estimating shape and motion with hierarchical priors. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 30(5):878-892, 2008. 2 +[54] Shinji Umeyama. Least-squares estimation of transformation parameters between two point patterns. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 13(04):376-380, 1991. 6 +[55] Chaoyang Wang and Simon Lucey. Paul: Procrustean autoencoder for unsupervised lifting. In Computer Vision and Pattern Recognition (CVPR), pages 434-443, 2021. 2 +[56] Huamin Wang, Ravi Ramamoorthi, and James F. O'Brien. Data-driven elastic models for cloth: Modeling and measurement. ACM Transactions on Graphics, pages 71:1-11, 2011. 4, 5 +[57] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh + +models from single rgb images. In European Conference on Computer Vision (ECCV), 2018. 3 +[58] Sebastian Weiss, Robert Maier, Daniel Cremers, Rüdiger Westermann, and Nils Thuerey. Correspondence-free material reconstruction using sparse surface constraints. Computer Vision and Pattern Recognition (CVPR), pages 4685-4694, 2020. 2 +[59] Ryan White, Keenan Crane, and David A. Forsyth. Capturing and animating occluded cloth. ACM Trans. Graph., 26(3), 2007. 8 +[60] Gengshan Yang, Deqing Sun, Varun Jampani, Daniel Vlasic, Forrester Cole, Huiwen Chang, Deva Ramanan, William T. Freeman, and Ce Liu. Lasr: Learning articulated shape reconstruction from a monocular video. In Computer Vision and Pattern Recognition (CVPR), 2021. 3 +[61] Rui Yu, Chris Russell, Neill D. F. Campbell, and Lourdes Agapito. Direct, dense, and deformable: Template-based non-rigid 3d reconstruction from rgb video. In International Conference on Computer Vision (ICCV), 2015. 1, 2, 3, 6, 8 \ No newline at end of file diff --git a/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/images.zip b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..739c6175d18007bb6dac9c2b3d28befda3a7445c --- /dev/null +++ b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f1de82b9ac19db2acbdfc407b2cfa5b10c86def3d18fe83df83dc20db517fb4 +size 465034 diff --git a/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/layout.json b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c0d84c6860001fc326555ac641ed7fd6d9fddcda --- /dev/null +++ b/fsftshapefromtemplatewithaphysicsbaseddeformationmodel/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f1142beeac8ae81cdb5824e9f9237109d54bce3fcf94a8b1dd5e2052df1567e +size 454403 diff --git a/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_content_list.json b/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..099c516f1f5ab57fbeed9b3404cc315cf6f46b50 --- /dev/null +++ b/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dd488375a0de07258fd3906f71bb32ef4d5379293f54e502c67227d9a854d8d +size 84408 diff --git a/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_model.json b/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b651c77b7f1f90889aae114c4ca4ca81df8b1cfe --- /dev/null +++ b/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a7b96b6d1647d3ec310bdd6f2a18334b9f84666265bd80260e31409353455ff +size 107581 diff --git a/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_origin.pdf b/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..991b2a9ce8df582f6f313d3d640fce6f7aa0f7a1 --- /dev/null +++ b/gdnatowardsgenerativedetailedneuralavatars/5b871270-4ff2-47df-8cb0-b27bb123a295_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27f52badaeb77383635c92ec2510a0239cdd6676c2163534ce1eff2b2469e714 +size 6574059 diff --git a/gdnatowardsgenerativedetailedneuralavatars/full.md b/gdnatowardsgenerativedetailedneuralavatars/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6ff5cd4c735fe2694c65c36ab93ddd5e3a7cdad9 --- /dev/null +++ b/gdnatowardsgenerativedetailedneuralavatars/full.md @@ -0,0 +1,408 @@ +# gDNA: Towards Generative Detailed Neural Avatars + +Xu Chen $^{1,3}$ Tianjian Jiang $^{1}$ Jie Song $^{1}$ Jinlong Yang $^{3}$ + +Michael J. Black3 Andreas Geiger2,3 Otmar Hilliges1 + +$^{1}$ ETH Zürich, Department of Computer Science $^{2}$ University of Tübingen + +3Max Planck Institute for Intelligent Systems, Tübingen + +https://xuchen-ethz.github.io/gdna + +![](images/a72d48fe4481bbe04d57ac1757d8ec7ae430b892ea7e7ccd4cf1073ee426080f.jpg) +Figure 1. Generative Detailed Neural Avatars. We propose a method to generate 1) a diverse set of 3D virtual humans of 2) varied identity, gender and shapes, appearing in 3) different clothing styles and poses, with 4) realistic and stochastic details such as wrinkles in garments. Our multi-subject method learns shape, articulation and clothing details from few posed scans without requiring skinning weight supervision. The method is able to synthesize novel identities that are not in the training set and generalizes to unseen poses. + +# Abstract + +To make 3D human avatars widely available, we must be able to generate a variety of 3D virtual humans with varied identities and shapes in arbitrary poses. This task is challenging due to the diversity of clothed body shapes, their complex articulations, and the resulting rich, yet stochastic geometric detail in clothing. Hence, current methods that represent 3D people do not provide a full generative model of people in clothing. In this paper, we propose a novel method that learns to generate detailed 3D shapes of people in a variety of garments with corresponding skinning weights. Specifically, we devise a multi-subject forward skinning module that is learned from only a few posed, un-rigged scans per subject. To capture the stochastic nature of high-frequency details in garments, we leverage an adversarial loss formulation that encourages the model to capture the underlying statistics. We provide empirical evidence that this leads to realistic generation of local details such as wrinkles. We show that our model is able to generate natural human avatars wearing diverse and detailed clothing. Furthermore, we show that our method can be used on the task of fitting human models to raw scans, outperforming the previous state-of-the-art. + +# 1. Introduction + +The ability to easily create diverse high-quality virtual humans with full control over their pose has many applications in movie production, games, VR/AR, architecture, and computer vision. While modern computer graphics techniques achieve photorealism, they typically require a lot of expertise and extensive manual effort. Our goal is to make 3D human avatars widely accessible by learning a generative model of people. Towards this goal, we propose the first method that can generate 1) diverse 3D virtual humans with 2) various identities and shapes, appearing in 3) different clothing styles and poses, with 4) realistic and stochastic high-frequency details such as wrinkles in garments. + +Generative modeling of 3D rigid objects has recently seen rapid progress, fueled by continuous and resolution-independent neural 3D representations [13, 40, 43, 48, 54]. However, modeling clothed humans and their articulation is more difficult due to the complex interaction of garments, their topology, and pose-driven deformations. Recent work leverages neural implicit surfaces to learn high-quality articulated avatars for a single subject [12, 15, 52, 58] but these methods are not generative, i.e. they cannot synthesize novel human identities and shapes. Generative models of clothing exist that augment SMPL by predicting displacements from the body mesh (CAPE [36]), or by drap + +ing an implicit garment representation on a T-posed body (SMPLicit [14]), and relying on SMPL's learned skinning for reposing. We show empirically that holistic modeling of identity, shape, articulation and clothing leads to higher fidelity generation and animation of virtual humans and to higher accuracy in fitting to 3D scans. + +Taking a step towards fully generative modeling of detailed neural avatars, we propose gDNA, a method that synthesizes 3D surfaces of novel human shapes, with control over the clothing style and pose, and that produces realistic high-frequency details of the garments. To leverage raw (posed) 3D scans, we build a multi-subject implicit generative representation. We build upon SNARF [12], a recent method for learning single-subject articulation-dependent effects that has been shown to generalize well to unseen poses. SNARF [12] requires many poses of a single subject for training. In contrast, our multi-subject method can be learned from very few posed scans (1-3) of many different subjects. This is achieved via the addition of a latent space for the conditional generation of shape and skinning weights for clothed humans. Furthermore, a learned warping field yields accurate deformations, using the same skinning field, independent of body size. + +Clothing wrinkles are produced by an underlying stochastic process. To capture these effects, we propose a method that learns the underlying statistics of 3D clothing details via an adversarial loss. Previous mesh-based approaches formulate this in UV-space [28], which is not directly applicable to implicit surfaces due to the lack of mesh connectivity. To learn high-frequency details, we first predict a 3D normal field, conditioned on the coarse shape features. To backpropagate the adversarial loss to the 3D normal field we establish 3D-2D correspondences by augmenting forward skinning with an implicit surface renderer. We show that adversarial training leads to significantly improved fidelity of 3D geometric details, see Fig. 9. + +Trained from posed scans only, we demonstrate the first method that can generate a large variety of 3D clothed human shapes with detailed wrinkles under pose control. The generated samples can be reposed via the learned skinning weights. We evaluate gDNA quantitatively, qualitatively, and through a perceptual study; gDNA strongly outperforms baselines. Furthermore, we show that gDNA can be used for fitting and re-animation of 3D scans, outperforming the state of the art (SOTA). In summary, we contribute: + +- The first method to generate a large variety of animatable 3D human shapes in detailed garments; that +- learns from raw posed 3D scans without requiring canonical shapes, detailed surface registration, or manually defined skinning weights, and +- a technique to significantly improve the geometric detail in clothing deformation, based on recovering the underlying statistics of cloth deformation. + +# 2. Related Work + +2D and 3D Generative Models: Most modern methods for synthesizing natural images leverage generative adversarial networks (GANs) [18] or variational auto-encoders (VAEs) [27]. These methods have achieved a high level of photorealism [24-26] and can yield impressive results on the task of synthesizing 2D images of humans [4,11,19,29, 34,53]. However, such methods reason in 2D and hence 3D consistency cannot be guaranteed [11,29,34] nor is extracting 3D geometry from such approaches straightforward. + +Several methods for the task of learning rigid 3D shapes exist. Early methods rely on voxel [61] or point cloud [3] representations. More recently, several methods represent object shapes by learning an implicit function using neural networks [13, 40, 48]. Such representations have also been proposed for the task of generative modeling of 3D shapes [10, 13, 16, 40, 42, 43, 48, 54]. However, these methods are typically not easily extended to non-rigid clothed humans. In this paper, we study the problem of 3D implicit generative modeling of non-rigid human shape. + +3D Human Models: Parametric 3D human body models [7,23,33,46,64] can synthesize 3D human shapes from a set of low-dimensional control parameters by deforming a template mesh. This idea has also been extended to model clothed humans [5, 36]. However, geometric expressivity is limited due to the fixed mesh topology and the bounded resolution of the template mesh. + +To overcome the topology and resolution limitations of meshes, other representations, including point clouds [35, 37,65], implicit surfaces [12,47,52,55,58,60], and radiance fields [32, 45, 49, 56, 63], have been explored. In particular, neural implicit surface representations have emerged as a powerful tool to model 3D (clothed) human shapes [6, 15, 17, 20, 21, 30, 41, 50, 51, 62, 66, 67] due to their topological flexibility and resolution independence. Recent work [12, 52, 58] uses implicit surfaces to learn human avatars for a single subject, wearing a specific garment. These methods model clothing details such as wrinkles as a deterministic function of the body poses. However, due to hysteresis and complex material properties, garment folds and wrinkles are stochastic and existing methods struggle to capture these effects. In contrast, we propose a multi-subject generative model of 3D humans that provides separate control over poses, garments and can synthesize realistic geometric details. + +CAPE [36] and SMPLicit [14] are generative models of clothing only, based on meshes and implicit surfaces respectively. Both methods are purely additive, that is they drape an implicit garment over the SMPL body [14] or predict the displacement parameters of a SMPL+D template mesh [36]. We experimentally show that this leads to lower fidelity in generated samples and higher error when fitting + +![](images/57948e5cbf8524429be9b6d39b50c8626ea92af795e4a422bbeaa252ee9aca5d.jpg) +Figure 2. Method Overview. We represent clothed humans using coarse shapes and detailed normals in a pose- and body-size-independent canonical space. This canonical representation can then be deformed to target body poses and sizes via a multi-subject forward skinning module. The deformed shapes are compared to raw posed scans via a 3D reconstruction loss to learn canonical shapes and skinning. To improve surface details, we augment the forward skinning module with an implicit surface renderer to generate 2D normal maps and learn detailed 3D normal fields by applying a 2D adversarial loss formulation. + +to 3D scans. NPMs [47] provide a latent space of multiple subjects for fitting to RGB-D depth maps or 3D scans. + +A common problem of all aforementioned approaches is the specific training data requirements these models impose: They either require synthetic data in canonical space [14, 47], or precise registration of a template mesh to posed scans [36, 47]. The former are rare and suffer from a domain gap, while the latter is challenging to attain. Our method overcomes this issue by requiring only a few training samples of each subject in posed space. We show that our method learns complex shape and clothing details and models realistic deformation even from such limited data. + +Adversarial Training of Clothing Details: Adversarial loss formulations have been used to learn detailed cloth wrinkles by optimizing 2D representations such as UV normal maps [28] or depth images [59]. It is noteworthy that implicit surfaces lack a notion of connectivity and therefore, incorporating 2D representations that have been designed to augment explicitly parametrized meshes is not straightforward. In contrast, we propose a formulation that leverages a 2D adversarial loss computed with posed images to optimize a 3D implicit representation in canonical space. Finally, our focus is the generation of human shapes appearing in varied clothing styles and diverse identities while previous methods focus on reconstruction [59] or single garment pose-dependent wrinkle enhancement [28]. + +# 3. Method + +Our goal is to build a model that generates diverse 3D clothed humans with varying identities and fine-grained geometric details in arbitrary poses. Our model is learned from a sparse set of static scans without assuming surface correspondences. Our method is summarized Fig. 2. + +First, we formulate a pose- and body-size-independent canonical representation of clothed human shapes (Section 3.1). Second, to learn the canonical shape and defor + +mation properties from very few posed scans of each of the subjects, we extend a single-subject differentiable forward skinning method [12] to multiple subjects via a latent space of shape, articulation and garment (Section 3.2). Finally, to learn rich yet stochastic geometric details, we learn a detailed 3D normal field via a 2D adversarial loss formulation. To achieve this, we augment the forward skinning module with an implicit surface renderer (Section 3.3). Training details are discussed in Section 3.4. + +# 3.1. Canonical Representation + +Our method is based on neural implicit representations, leveraging their topological flexibility and resolution independence. We model the clothed human shape and geometric clothing details jointly. + +Coarse Shape: We model the shape in canonical space as the $\tau = 0.5$ level set of a neural occupancy function: + +$$ +\mathcal {S} (\mathbf {z} _ {\text {s h a p e}}) = \{\mathbf {x} \mid \mathcal {O} (\mathbf {x}, \mathbf {z} _ {\text {s h a p e}}) = \tau \}, \tag {1} +$$ + +where $\mathcal{O}$ is a neural network that predicts the occupancy probability $o$ for any 3D point $\mathbf{x}$ in canonical space. The prediction is conditioned on a shape code $\mathbf{z}_{\mathrm{shape}} \in \mathbb{R}^{L_{\mathrm{shape}}}$ : + +$$ +\mathcal {O}: \mathbb {R} ^ {3} \times \mathbb {R} ^ {L _ {\text {s h a p e}}} \rightarrow [ 0, 1 ] \times \mathbb {R} ^ {L _ {\mathbf {f}}} \tag {2} +$$ + +$$ +\left(\mathbf {x}, \mathbf {z} _ {\text {s h a p e}}\right) \mapsto (o, \mathbf {f}) +$$ + +This occupancy network also outputs a feature vector $\mathbf{f}$ of dimension $L_{\mathbf{f}}$ for each surface point. This feature carries coarse shape information and is used to predict fine details. + +We combine a 3D CNN-based feature generator and a locally conditioned MLP to model $\mathcal{O}$ . A 3D style-based [25, 42] generator, illustrated in Fig. 3 first produces a 3D feature volume conditioned on $\mathbf{z}_{\mathrm{shape}}$ via adaptive instance normalization [22]. The final occupancy is obtained via trilinear sampling of the feature volume and by feeding the feature and the 3D coordinate into an MLP. + +![](images/25d6dfec0464a39d08c00c54abaf2581e145916176d6fd43d28cb3b246cd4291.jpg) +Figure 3. Canonical Implicit Model. Given latent codes $\mathbf{z}_{\mathrm{shape}}$ and $\mathbf{z}_{\mathrm{detail}}$ , this module predicts the occupancy probability $o$ and the normals $\mathbf{n}$ for 3D points in canonical space. To predict $o$ , a 3D style-based generator first produces a 3D feature volume conditioned on $\mathbf{z}_{\mathrm{shape}}$ . The final occupancy of a 3D point is obtained via trilinear sampling of the feature volume and by feeding the feature and the 3D coordinate into an MLP. To predict normals $\mathbf{n}$ , we use an MLP conditioned on feature $\mathbf{f}$ and latent code $\mathbf{z}_{\mathrm{detail}}$ . + +Detailed Surface Normals: Learning an occupancy field for multiple subjects and garment types with accurate and detailed normals is challenging and we empirically show that a naive implementation leads to artifacts on the surface (cf. Fig. 9). Analogous to normal mapping for polygon meshes [8, 28], we model surface details via normals in canonical 3D space. Such surface normals can be represented by the gradient of the implicit function, but this results in considerable computational complexity. Therefore, we use an MLP to predict surface normals similar to [58]. However, because implicit surfaces have no notion of connectivity, we propose a geometry-aware approach to link coarse geometry and the detailed normal field. More specifically, we condition the surface normal prediction on the underlying shape, leveraging the feature $\mathbf{f}$ from the occupancy network. We further condition the field on a latent $\mathbf{z}_{\mathrm{detail}} \in \mathbb{R}^{L_{\mathrm{detail}}}$ to enable generation of controllable details for the same coarse shape: + +$$ +\mathcal {N}: \mathbb {R} ^ {3} \times \mathbb {R} ^ {L _ {\text {d e t a i l}}} \times \mathbb {R} ^ {L _ {f}} \rightarrow \mathbb {R} ^ {3} \tag {3} +$$ + +$$ +\left(\mathbf {x}, \mathbf {z} _ {\text {d e t a i l}}, \mathbf {f}\right) \mapsto \mathbf {n} +$$ + +# 3.2. Multi-Subject Forward Skinning + +We additionally model the deformation properties and define the body size $(\beta)$ and pose $(\theta)$ parameters to be consistent with SMPL, enabling use of existing datasets (e.g. AMASS [38]) for animation. The body size parameter $\beta$ is a 10-dimensional vector, and the body pose parameter $\theta$ represents the joint angles of SMPL's skeleton. + +Single-Subject Skinned Representation: To animate implicit human shapes in controllable body poses $\theta$ , recent work [12, 41, 52, 58] generalizes mesh-based linear blend skinning algorithms to neural implicit surfaces. The skeletal deformation of each 3D point is modeled as the weighted average of a set of bone transformations, with weights at each point predicted by an MLP. A key difference is whether this skinning weight field is defined in canonical space or in + +![](images/e5e00b1dcd494d9cf76b1d1710eace239cbe89db5e2915a7a39d179724408d55.jpg) +Figure 4. Multi-subject Forward Skinning. This module deforms the canonical occupancy and normal field to the target pose $\theta$ and size $\beta$ by establishing correspondences from posed space $\mathbf{x}'$ to canonical space $\mathbf{x}^*$ . First, given a deformed point $\mathbf{x}'$ , we find its correspondence in resized canonical space $\hat{\mathbf{x}}^*$ by iteratively finding the root of (9). Subsequently, we map $\hat{\mathbf{x}}^*$ to $\mathbf{x}^*$ in size-neutral canonical space using the warping field. + +posed space. We follow Chen et al. [12] who define the skinning field in canonical space: + +$$ +\mathcal {W}: \mathbb {R} ^ {3} \rightarrow \mathbb {R} ^ {n _ {b}} \tag {4} +$$ + +$$ +\mathbf {x} \mapsto \mathbf {w}, +$$ + +where $n_b$ denotes the number of bones and the weights $\mathbf{w} = \{w_1, \dots, w_{n_b}\}$ of each point $\mathbf{x}$ are enforced to satisfy $w_i \geq 0$ and $\sum_i w_i = 1$ by a softmax activation function. As shown in [12], defining the skinning weights field in canonical space is desirable because the skinning weights are then pose-independent, thus easier to learn and enabling generalization to out-of-distribution poses. + +Multi-Subject Skinned Representation: We extend this forward skinning idea to multiple subjects. Since the skinning weight field is defined in canonical space, the model can aggregate information over multiple training instances. Importantly, this enables us to learn skinning from one or a few poses of multiple subjects, instead of requiring many poses of the same subject. + +To achieve this, we decouple the effects originating from the body size variation $\beta$ and the clothed human shape $\mathbf{z}_{\mathrm{shape}}$ . We model the skinning field in a body-size-neutral space, analogously to the canonical surface representations. To capture diverse clothed human shapes, we condition the field on the latent shape code $\mathbf{z}_{\mathrm{shape}}$ : + +$$ +\mathcal {W}: \mathbb {R} ^ {3} \times \mathbb {R} ^ {L _ {\text {s h a p e}}} \rightarrow \mathbb {R} ^ {n _ {b}} \tag {5} +$$ + +$$ +\left(\mathbf {x}, \mathbf {z} _ {\text {s h a p e}}\right) \mapsto \mathbf {w} +$$ + +We then model body size change with an additional warping field. Given a point $\hat{\mathbf{x}}$ in $\beta$ -size space, the warping field maps it back to the mean size by predicting its canonical correspondence $\mathbf{x}$ (see Fig. 4): + +$$ +\mathcal {M}: \mathbb {R} ^ {3} \times \mathbb {R} ^ {L _ {\beta}} \rightarrow \mathbb {R} ^ {3} \tag {6} +$$ + +$$ +(\hat {\mathbf {x}}, \boldsymbol {\beta}) \mapsto \mathbf {x} +$$ + +In this formulation, $\beta$ captures body shape variations analogously to SMPL, e.g. body height. Therefore, the canonical shape network only needs to model the remaining shape variations beyond SMPL, e.g. clothing and hair, controlled by $\mathbf{z}_{\mathrm{shape}}$ . The final resized canonical surface is defined by: + +$$ +\hat {S} (\mathbf {z} _ {\text {s h a p e}}, \boldsymbol {\beta}) = \left\{\hat {\mathbf {x}} \mid \mathcal {O} \left(\mathcal {M} (\hat {\mathbf {x}}, \boldsymbol {\beta}), \mathbf {z} _ {\text {s h a p e}}\right) = \tau \right\} \tag {7} +$$ + +Given the target body pose $\theta$ , a point $\hat{\mathbf{x}}$ in $\beta$ -size space is transformed to posed space $\mathbf{x}'$ via + +$$ +\begin{array}{l} \mathbf {x} ^ {\prime} = \mathbf {d} (\mathbf {x}, \boldsymbol {\beta}, \boldsymbol {\theta}, \mathbf {z} _ {\text {s h a p e}}) \\ = \sum_ {i = 1} ^ {n _ {\mathrm {b}}} \mathcal {W} _ {i} (\mathcal {M} (\hat {\mathbf {x}}, \boldsymbol {\beta}), \mathbf {z} _ {\text {s h a p e}}) \cdot \boldsymbol {B} _ {i} (\boldsymbol {\beta}, \boldsymbol {\theta}) \cdot \hat {\mathbf {x}}, \tag {8} \\ \end{array} +$$ + +where $B_{i}(\beta, \theta)$ are the bone transformation matrices obtained from the parametric skeleton of SMPL. + +Implicit Differentiable Forward Skinning: While our model learns a canonical representation, its supervision is provided in posed space. Given a point $\mathbf{x}'$ in posed space we need to determine its correspondence in canonical space $\mathbf{x}$ to compare the predicted occupancy and normals to groundtruth. We first find the correspondence $\hat{\mathbf{x}}^*$ of $\mathbf{x}'$ in resized canonical space and then map $\hat{\mathbf{x}}^*$ to canonical space $\mathbf{x}^*$ . An overview is provided in Fig. 4. While the goal is to determine $\mathbf{x}' \mapsto \hat{\mathbf{x}}$ , we only have direct access to the inverse mapping defined by forward skinning Eq. (8), which is not invertible. Following [12], we determine the correspondence numerically by finding the root of the equation: + +$$ +\mathbf {d} (\hat {\mathbf {x}}, \boldsymbol {\beta}, \boldsymbol {\theta}, \mathbf {z} _ {\text {s h a p e}}) - \mathbf {x} ^ {\prime} = \mathbf {0}, \tag {9} +$$ + +using Broyden's method [9]. Subsequently, the canonical correspondence $\mathbf{x}^*$ is given by: + +$$ +\mathbf {x} ^ {*} = \mathcal {M} (\hat {\mathbf {x}} ^ {*}, \boldsymbol {\beta}) \tag {10} +$$ + +We can now determine the occupancy at $\mathbf{x}'$ as $o' = \mathcal{O}(\mathbf{x}^*,\mathbf{z}_{\mathrm{shape}})$ and the normal $\mathbf{n}'$ as + +$$ +\mathbf {n} ^ {\prime} = \left(\sum_ {i = 1} ^ {n _ {\mathrm {b}}} \mathcal {W} _ {i} \left(\mathbf {x} ^ {*}, \mathbf {z} _ {\text {s h a p e}}\right) \cdot \mathbf {R} _ {i}\right) ^ {- T} \mathcal {N} \left(\mathbf {x} ^ {*}, \mathbf {f}, \mathbf {z} _ {\text {d e t a i l}}\right) \tag {11} +$$ + +where $\mathbf{R}_i$ denotes the rotational component of $B_{i}$ + +For convenient future reference, we define the occupancy field $\mathcal{O}'$ and normal function $\mathcal{N}'$ in posed space as: + +$$ +\mathcal {O} ^ {\prime}: \left(\mathbf {x} ^ {\prime}, \mathbf {z} _ {\text {s h a p e}}, \boldsymbol {\beta}, \boldsymbol {\theta}\right) \mapsto o ^ {\prime}, \mathbf {f} \tag {12} +$$ + +$$ +\mathcal {N} ^ {\prime}: \left(\mathbf {x} ^ {\prime}, \mathbf {z} _ {\text {d e t a i l}}, \mathbf {f}, \beta , \theta\right) \mapsto \mathbf {n} ^ {\prime} \tag {13} +$$ + +# 3.3. Implicit Surface Rendering + +Geometric clothing details are challenging to learn due to their stochastic nature. In 2D image generation tasks, GANs have achieved impressive results on learning high fidelity local textures. We propose to learn better geometric details $\mathcal{N}$ using an adversarial loss. Towards this goal, we + +augment the forward skinning module with an implicit renderer to establish direct correspondences between 2D projections of 3D points in posed space and corresponding 3D points in canonical space, enabling end-to-end training. + +Implicit Rendering with Skinning: Given a pixel $\mathbf{p}$ in the 2D posed normal map, its correspondence in deformed 3D space $\mathbf{x}'$ can be determined by the intersection between the ray through $\mathbf{p}$ and the forward skinned surface: + +$$ +\mathcal {O} ^ {\prime} \left(\mathbf {x} ^ {\prime}, \mathbf {z} _ {\text {s h a p e}}, \boldsymbol {\beta}, \boldsymbol {\theta}\right) = \tau , \text {w i t h} \mathbf {x} ^ {\prime} = \mathbf {r} _ {c} + t \cdot \mathbf {r} _ {d} \tag {14} +$$ + +where $\mathbf{r}_d$ and $\mathbf{r}_c$ denote the ray direction and origin, and $t$ is the scalar distance along the ray. Following [44], we determine the intersection point $\mathbf{x}'$ by finding the first change of occupancy $\mathcal{O}'$ along the ray using the Secant method. We also obtain the canonical correspondence point $\mathbf{x}$ of $\mathbf{p}$ via forward skinning. Solving the 3D canonical correspondence for each pixel, yields the 2D normal map $I$ : + +$$ +I _ {\mathbf {p}} = \mathcal {N} ^ {\prime} \left(\mathbf {x} ^ {\prime}, \mathbf {z} _ {\text {d e t a i l}}, \mathbf {f}, \beta , \boldsymbol {\theta}\right) \tag {15} +$$ + +# 3.4. Training + +We train our method via a set of posed scans and their corresponding SMPL parameters $\theta, \beta$ . We follow the autodecoding framework of [48], and assign one shape code $\mathbf{z}_{\mathrm{shape}}$ and one details code $\mathbf{z}_{\mathrm{detail}}$ to each training sample. These are initialized to be zero and optimized jointly with the network weights. To enable sampling, we fit a Gaussian distribution to the latent codes after training. + +We split training into two stages: We first train the coarse shape, skinning, and warping networks and then train the normal network. This two-stage training is essential. Otherwise, the normal supervision will be back-propagated to wrong locations in canonical space due to wrong correspondences before training of shape and skinning converges. + +For the first stage, we use the binary cross entropy loss $\mathcal{L}_{\mathrm{BCE}}$ between predicted occupancy $\mathcal{O}'(\mathbf{x}', \mathbf{z}_{\mathrm{shape}}, \boldsymbol{\beta}, \boldsymbol{\theta})$ and ground-truth $o_{\mathrm{gt}}$ . Following [12], we add auxiliary losses $\mathcal{L}_{\mathrm{bone}}$ and $\mathcal{L}_{\mathrm{joint}}$ to guide learning during early iterations: + +$$ +\mathcal {L} _ {\text {b o n e}} = B C E \left(\mathcal {O} \left(\mathbf {x} _ {\text {b o n e}}, \mathbf {z} _ {\text {s h a p e}}\right), 1\right) \tag {16} +$$ + +$$ +\mathcal {L} _ {\text {j o i n t}} = \left\| \mathbf {w} \left(\mathbf {x} _ {\text {j o i n t}}, \mathbf {z} _ {\text {s h a p e}}\right) - \mathbf {w} _ {\text {j o i n t , t a r g e t}} \right\| _ {2} ^ {2} \tag {17} +$$ + +where $\mathbf{x}_{\mathrm{bone}}$ are randomly sampled points on canonical bones, $\mathbf{x}_{\mathrm{joint}}$ are randomly sampled canonical joints, and $\mathbf{w}_{\mathrm{joint},\mathrm{target}}$ is a vector that is 0.5 for the neighboring bones and 0 elsewhere (for details see Sup. Mat.). To ensure that the warping field changes body size consistently, we enforce the warping field to warp SMPL vertices $\mathbf{v}(\beta)$ to the corresponding location in neutral shape $\mathbf{v}(\beta_0)$ : + +$$ +\mathcal {L} _ {\text {w a r p}} = \left\| \mathcal {M} (\mathbf {v} (\boldsymbol {\beta}), \boldsymbol {\beta}) - \mathbf {v} \left(\boldsymbol {\beta} _ {0}\right) \right\| _ {2} ^ {2} \tag {18} +$$ + +Finally, we regularize the latent code to be close to the origin of the latent space via $\mathcal{L}_{\mathrm{reg,shape}} = \| \mathbf{z}_{\mathrm{shape}}\| _2^2$ + +![](images/bac003eec446e99acd255f30f4463e40236a9682ea97a175e10e4af925f04a92.jpg) +Figure 5. Clothed Human Generation. We show randomly sampled clothed human shapes generated by our method. Top: generated canonical shapes with detailed normals and skinning weights. Bottom: generated shapes reposed (2 poses each). Shapes are visualized as normal maps to highlight the detailed geometry synthesized by our method. For shaded results, see other figures, e.g. Fig. 1. + +The normal prediction network is trained subsequently. Here we penalize differences between the predicted and GT normal $\mathbf{n}_{\mathrm{gt}}^{\prime}$ for randomly sampled surface points: + +$$ +\mathcal {L} _ {\text {n o r m}} = 1 - \mathbf {n} _ {\mathrm {g t}} ^ {\prime} ^ {T} \cdot \mathcal {N} ^ {\prime} \left(\mathbf {x} ^ {\prime}, \mathbf {z} _ {\text {d e t a i l}}, \mathbf {f}, \boldsymbol {\beta}, \boldsymbol {\theta}\right) \tag {19} +$$ + +In addition, we apply non-saturating adversarial losses [18] $\mathcal{L}_{\mathrm{adv}} = -\log (1 + \exp (D(I)))$ with $R_{1}$ gradient penalty [39] on the predicted 2D normal maps $I$ and the real normal maps rendered from the posed scans $I_{\mathrm{real}}$ . $D$ is a jointly trained discriminator (see Sup. Mat. for details). We further regularize $\mathbf{z}_{\mathrm{detail}}$ with $\mathcal{L}_{\mathrm{reg,detail}} = \| \mathbf{z}_{\mathrm{shape}}\| _2^2$ . + +# 3.5. Inference + +We generate human avatars by randomly sampling $\mathbf{z}_{\mathrm{shape}}$ and $\mathbf{z}_{\mathrm{detail}}$ from the estimated Gaussian distribution. We then extract meshes in resized canonical space using MISE [40] from the implicit representation $\hat{S} (\mathbf{z}_{\mathrm{shape}},\beta)$ and predict the vertex normal with our normal field. Finally, we pose the meshes to desired poses $\pmb{\theta}$ following Eq. (8). + +# 4. Experiments + +Our main goal is to generate 3D human avatars. Since we are the first to tackle this problem setting, we compare our method to carefully designed ablative baselines, enabling analysis of each component of our method. We also evaluate the expressiveness of our model by fitting it to unseen scans and compare the accuracy to SOTA 3D human shape modeling methods. We outline the evaluation protocols in the following and refer the readers to Sup. Mat. for details. + +# Datasets: + +3D Scans: We train our model on commercial scans [1, 2]. + +SIZER: Following [14], we use the SIZER dataset [57] to evaluate fitting. This dataset contains 3D scans of humans in 21 garments, including shirts, T-shirts, coats and pants. + +# Metrics: + +Fréchet Inception Distance (FID): To evaluate generation quality, we compute FID between 2D normal maps of training scans and those of randomly generated 3D shapes. + +User Preference: We conduct a perceptual study among 44 subjects and report how often participants preferred a particular method over ours. + +Surface Distance: To evaluate fitting accuracy, we measure the one-directional Chamfer distance between predicted surfaces and the target scans, following SMPLicit [14]. + +# Baselines: + +NPMs [47]: NPMs learn the latent space of human shapes and deformation from ground-truth canonical shapes and vertex displacements, obtained from synthetic 3D animations [31] and real scans with registered surfaces [36]. + +SMPLicit [14]: SMPLicit learns a generative model of 3D garments, and drapes these over the SMPL T-pose. This model is trained with a collection of 3D synthetic garments. + +# 4.1. Quality of Generated Samples + +Random Generation of Canonical Shapes: We show random samples generated by our method in Fig. 5 (top). While trained with posed scans only, our method learns plausible canonical shapes with surface details. + +Disentangled Pose and Shape: The generated shapes can be reposed as desired, even to poses far beyond the training pose distribution (cf. Fig. 5 bottom and Fig. 1). + +Interpolation: Interpolating the shape and details codes, yields smooth transitions of shapes and details between two very different samples, as shown in Fig. 6. + +![](images/8cf91a3922215ff588f6f61e3d5fcbe3f5479c3ba58643c10225e8e034d02569.jpg) +Figure 6. Interpolation. We interpolate the pose and shape code and the detail code between the leftmost and rightmost sample. + +![](images/39b396b98878d39b433e3baefda96cfa0fb1e27f1f2b523e859a3e2810688d71.jpg) +Figure 7. Disentangled Generation of Shape and Details. We generate samples with the same coarse shape and different detail codes. Note that the details appear noticeably different from each other while all match the underlying coarse shape. + +![](images/7c71922675aabfeaa3f1c612a5ff9e23fbb3380a266e0ba545618f9f0fbe6b1b.jpg) +Figure 8. Nearest Training Samples. Note that the pose and clothing of the generated shape is noticeably different from that of the nearest training sample. + +Disentangled Shape and Details: Our disentangled formulation allows us to generate diverse clothing details for the same coarse shape. Fig. 7 shows results with the same coarse shape $\mathbf{z}_{\mathrm{shape}}$ but different details codes $\mathbf{z}_{\mathrm{detail}}$ . While the coarse shape remains the same, gDNA generates varied plausible wrinkles that match the underlying coarse shape. + +Extrapolation Beyond Training Distribution: To further illustrate generalization, we show the training samples with the most similar pose and latent code to the generated sample in Fig. 8. The nearest neighbors are noticeably different from our generation, demonstrating that our method generalizes and is able to generate novel shapes in novel poses. + +# 4.2. Ablation Study + +We now ablate our design choices. The results are summarized in Tab. 1 and Fig. 9. + +Canonical Space Modeling: We verify the necessity to model shapes in canonical space and joint learning of skinn- ing weights. Towards this goal, we implement a baseline that generates posed shapes directly given the latent code and the body pose as input. As shown in Fig. 9 (first row), the individual samples lack details as the baseline must capture a large shape space caused by the pose change. Since the method does not reason about articulation, the sampled shapes suffer from invalid pose configurations, leading to high FID values as shown in Tab. 1 (Pose ONet). + +Adversarial Learning: The adversarial loss plays an important role in improving the perceptual realism of the generated samples, as evidenced by the FID improvement from Detailed Normal (w/o Adversarial) to Ours in Tab. 1. The normals estimated directly from the occupancy field suffer from artifacts on the surface (Fig. 9 (second row)). Training without adversary leads to overly smooth geometry (Fig. 9 (third row)), as the reconstruction loss induces a bias that averages out details. In contrast, our method produces realistic high-frequency details (Fig. 9 (bottom)). Notably, in $21.3\%$ of the cases, users consider our generated shapes to be even more realistic than real scans. + +# 4.3. Comparison with SOTA on Model Fitting + +While our main goal is to generate clothed human shapes, our model can be fit to raw observations, just like existing 3D parametric human or clothing models. We consider two recent SOTA methods, i.e. NPMs [47] and SMPLicit [14]. We follow SMPLicit [14] and fit ours and the baselines to scans from the SIZER dataset. + +Accuracy: While not designed for fitting, our method achieves better accuracy than previous special purpose methods, as demonstrated in Tab. 2. Our method captures the person identity and clothing shapes more faithfully than NPMs and SMPLlicit, and our results exhibit more details such as wrinkles (Fig. 10 top). Since the model is trained directly from posed scans, disentangling pose and shape, it learns about real clothing details and can reproduce them. + +
MethodFID↓User Preference↑
Pose ONet43.808.11%
Coarse Shape29.3426.1%
Detailed Normal (w/o Adv.)42.1815.4%
Ours11.54-
Ground-truth ScansN/A78.7%
+ +![](images/53db5b9d7281837b8d5c274b855c13a6de5ca2d10bf685026cda1e687d088c9f.jpg) +Figure 9. Generation Comparison. We show random samples from ablative baselines and our method. Without adversarial loss, the generated shapes appear either bumpy (Coarse Shape) or oversmooth (Detailed Normal w/o Adv.). + +Reposing Scans: During fitting we also recover skinning weights. This enables reposing of the shape as demonstrated in Fig. 10 bottom. + +# 5. Conclusion + +We propose gDNA, a generative model of 3D clothed humans that can produce a large variety of clothed people with detailed wrinkles and explicit pose control. Using implicit multi-subject forward skinning enables learning from only a few posed scans per subject. To model the stochastic details of garments, we exploit a 2D adversarial loss to update a 3D normal field. We demonstrate that gDNA can be used in various applications such as animation and 3D fitting, outperforming state-of-the-art methods. + +Table 1. Ablation Study. We report FID and user preference. The user preference score indicates how often participants of our user study preferred a particular method over ours. + +
MethodPred-to-Scan ↓Scan-to-Pred ↓
SMPLicit [14]N/A0.0240
NPMs [47]0.01560.0215
Ours0.01340.0123
+ +Table 2. Fitting Comparison. We report the distance between the target scan and 3D shapes fit by SOTA methods and ours. Pred-to-Scan metric does not apply to multi-layer surfaces from SMPLicit. + +![](images/d92ff418a18136181881d5e72ef829a839a70182d55982c1c4d1db96f847bb40.jpg) +Figure 10. Fitting and Reposing. We compare model fitting results on the SIZER dataset with SMPLicit [14] and NPMs [47]. We also show the fitted shapes reposed into target poses. As NPMs do not allow specifying target pose, random poses are shown. + +Limitations: Learning loose clothing (e.g. skirts) from deformed observations remains challenging due to the topology ambiguity and the large pose-dependent non-linear cloth deformation. Please refer to Sup. Mat. for more discussions about limitations and societal impact. + +Acknowledgements: Xu Chen was supported by the Max Planck ETH Center for Learning Systems. Andreas Geiger was supported by the DFG EXC number 2064/1 - project number 390727645. We thank Alex Zicong Fan, Marcel C. Bühler, Priyanka Patel, Qianli Ma, Sai Kumar Dwivedi, Thomas Langerak and Yuliang Xiu for their feedback, Garvita Tiwari for her suggestions about the SIZER dataset, and Tsvetelina Alexiadis for her help with the user study. + +Disclosure: MJB has received research gift funds from Adobe, Intel, Nvidia, Meta/Facebook, and Amazon. MJB has financial interests in Amazon, Datagen Technologies, and Meshcapade GmbH. MJB's research was performed solely at, and funded solely by, the Max Planck. + +# References + +[1] https://3dpeople.com/. 6 +[2] https://renderpeople.com/. 6 +[3] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3D point clouds. In Proc. of the International Conf. on Machine learning (ICML), 2018. 2 +[4] Badour AlBahar, Jingwan Lu, Jimei Yang, Zhixin Shu, Eli Shechtman, and Jia-Bin Huang. Pose with Style: Detail-preserving pose-guided image synthesis with conditional StyleGAN. ACM Transactions on Graphics, 2021. 2 +[5] Thiemo Alldieck, Marcus Magnor, Weipeng Xu, Christian Theobalt, and Gerard Pons-Moll. Video based reconstruction of 3D people models. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[6] Thiemo Alldieck, Hongyi Xu, and Cristian Sminchisescu. imghum: Implicit generative models of 3D human shape and articulated pose. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2 +[7] Dragomir Anguelov, Praveen Srinivasan, Daphne Koller, Sebastian Thrun, Jim Rodgers, and James Davis. SCAPE: shape completion and animation of people. ACM Trans. on Graphics, 2005. 2 +[8] James F Blinn. Simulation of wrinkled surfaces. ACM Trans. on Graphics, 1978. 4 +[9] Charles G Broyden. A class of methods for solving nonlinear simultaneous equations. Mathematics of computation, 1965. 5 +[10] Xu Chen, Zijian Dong, Jie Song, Andreas Geiger, and Otmar Hilliges. Category level object pose estimation via neural analysis-by-synthesis. In Proc. of the European Conf. on Computer Vision (ECCV), 2020. 2 +[11] Xu Chen, Jie Song, and Otmar Hilliges. Unpaired pose guided human image generation. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR) Workshops, 2019. 2 +[12] Xu Chen, Yufeng Zheng, Michael J Black, Otmar Hilliges, and Andreas Geiger. SNARF: Differentiable forward skimming for animating non-rigid neural implicit shapes. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 1, 2, 3, 4, 5 +[13] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2 +[14] Enric Corona, Albert Pumarola, Guillem Alenyà, Gerard Pons-Moll, and Francesc Moreno-Noguer. SMPLicit: Topology-aware generative model for clothed people. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 3, 6, 7, 8 +[15] Boyang Deng, JP Lewis, Timothy Jeruzalski, Gerard Pons-Moll, Geoffrey Hinton, Mohammad Norouzi, and Andrea Tagliasacchi. Neural articulated shape approximation. In European Conference on Computer Vision (ECCV), 2020. 1, 2 +[16] Terrance DeVries, Miguel Angel Bautista, Nitish Srivastava, Graham W Taylor, and Joshua M Susskind. Unconstrained + +scene generation with locally conditioned radiance fields. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2 +[17] Zijian Dong, Chen Guo, Jie Song, Xu Chen, Andreas Geiger, and Otmar Hilliges. PINA: Learning a personalized implicit neural avatar from a single RGB-D video sequence. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2022. 2 +[18] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems (NeurIPS), 2014. 2, 6 +[19] Artur Grigorev, Karim Iskakov, Anastasia Iinina, Renat Bashirov, Ilya Zakharkin, Alexander Vakhitov, and Victor Lempitsky. *StylePeople: A generative model of fullbody human avatars. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021.* 2 +[20] Tong He, John Collomosse, Hailin Jin, and Stefano Soatto. Geo-PIFu: Geometry and pixel aligned implicit functions for single-view human reconstruction. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 2 +[21] Tong He, Yuanlu Xu, Shunsuke Saito, Stefano Soatto, and Tony Tung. $\mathrm{ARCH}++$ : Animation-ready clothed human reconstruction revisited. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[22] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2017. 3 +[23] Hanbyul Joo, Tomas Simon, and Yaser Sheikh. Total Capture: A 3D deformation model for tracking faces, hands, and bodies. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[24] Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Alias-free generative adversarial networks. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[25] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 3 +[26] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[27] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In Proc. of the International Conf. on Learning Representations (ICLR), 2014. 2 +[28] Z. Lähner, D. Cremers, and T. Tung. Deep Wrinkles: Accurate and realistic clothing modeling. In European Conference on Computer Vision (ECCV), 2018. 2, 3, 4 +[29] Christoph Lassner, Gerard Pons-Moll, and Peter V. Gehler. A generative model for people in clothing. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2017. + +[30] Ruilong Li, Yuliang Xiu, Shunsuke Saito, Zeng Huang, Kyle Olszewski, and Hao Li. Monocular real-time volumetric performance capture. In Proc. of the European Conf. on Computer Vision (ECCV), 2020. 2 +[31] Yang Li, Hikari Takehara, Takafumi Taketomi, Bo Zheng, and Matthias Nießner. 4DComplete: Non-rigid motion estimation beyond the observable surface. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 6 +[32] Lingjie Liu, Marc Habermann, Viktor Rudnev, Kripasindhu Sarkar, Jiatao Gu, and Christian Theobalt. Neural Actor: Neural free-view synthesis of human actors with pose control. ACM Trans. on Graphics, 2021. 2 +[33] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. SMPL: A skinned multiperson linear model. ACM Trans. on Graphics, 2015. 2 +[34] Liqian Ma, Xu Jia, Qianru Sun, Bernt Schiele, Tinne Tuyte-laars, and Luc Van Gool. Pose guided person image generation. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 2 +[35] Qianli Ma, Shunsuke Saito, Jinlong Yang, Siyu Tang, and Michael J. Black. SCALE: Modeling clothed humans with a surface codec of articulated local elements. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[36] Qianli Ma, Jinlong Yang, Anurag Ranjan, Sergi Pujades, Gerard Pons-Moll, Siyu Tang, and Michael J. Black. Learning to dress 3D people in generative clothing. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2, 3, 6 +[37] Qianli Ma, Jinlong Yang, Siyu Tang, and Michael J Black. The power of points for modeling humans in clothing. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2 +[38] Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, and Michael J. Black. AMASS: Archive of motion capture as surface shapes. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 4 +[39] Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for GANs do actually converge? In Proc. of the International Conf. on Machine learning (ICML), 2018. 6 +[40] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3D reconstruction in function space. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 6 +[41] Marko Mihajlovic, Yan Zhang, Michael J Black, and Siyu Tang. LEAP: Learning articulated occupancy of people. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 4 +[42] Thu Nguyen-Phuoc, Chuan Li, Lucas Theis, Christian Richardt, and Yong-Liang Yang. HoloGAN: Unsupervised learning of 3D representations from natural images. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2, 3 +[43] Michael Niemeyer and Andreas Geiger. GIRAFFE: Representing scenes as compositional generative neural feature + +fields. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 2 +[44] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Differentiable volumetric rendering: Learning implicit 3D representations without 3D supervision. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2020. 5 +[45] Atsuhiro Noguchi, Xiao Sun, Stephen Lin, and Tatsuya Harada. Neural articulated radiance field. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2 +[46] Ahmed A. A. Osman, Timo Bolkart, and Michael J. Black. STAR: Sparse trained articulated human body regressor. In Proc. of the European Conf. on Computer Vision (ECCV), 2020. 2 +[47] Pablo Palafox, Aljaž Božić, Justus Thies, Matthias Nießner, and Angela Dai. Neural parametric models for 3D deformable shapes. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2, 3, 6, 7, 8 +[48] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 5 +[49] Sida Peng, Junting Dong, Qianqian Wang, Shangzhan Zhang, Qing Shuai, Xiaowei Zhou, and Hujun Bao. Animatable neural radiance fields for modeling dynamic human bodies. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2 +[50] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. PIFu: Pixel-aligned implicit function for high-resolution clothed human digitization. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[51] Shunsuke Saito, Tomas Simon, Jason Saragih, and Hanbyul Joo. PIFuHD: Multi-level pixel-aligned implicit function for high-resolution 3D human digitization. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[52] Shunsuke Saito, Jinlong Yang, Qianli Ma, and Michael J. Black. SCANimate: Weakly supervised learning of skinned clothed avatar networks. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 2, 4 +[53] Kripasindhu Sarkar, Lingjie Liu, Vladislav Golyanik, and Christian Theobalt. HumanGAN: A generative model of humans images. In Proc. of the International Conf. on 3D Vision (3DV), 2021. 2 +[54] Katja Schwarz, Yiyi Liao, Michael Niemeyer, and Andreas Geiger. GRAF: Generative radiance fields for 3D-aware image synthesis. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 1, 2 +[55] Ruizhi Shao, Hongwen Zhang, He Zhang, Yanpei Cao, Tao Yu, and Yebin Liu. DoubleField: Bridging the neural surface and radiance fields for high-fidelity human rendering. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2022. 2 +[56] Shih-Yang Su, Frank Yu, Michael Zollhoefer, and Helge Rhodin. A-NeRF: Surface-free human 3D pose refinement + +via neural rendering. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[57] Garvita Tiwari, Bharat Lal Bhatnagar, Tony Tung, and Gerard Pons-Moll. SIZER: A dataset and model for parsing 3D clothing and learning size sensitive 3D clothing. In Proc. of the European Conf. on Computer Vision (ECCV), 2020. 6 +[58] Garvita Tiwari, Nikolaos Sarafianos, Tony Tung, and Gerard Pons-Moll. Neural-GIF: Neural generalized implicit functions for animating people in clothing. In International Conference on Computer Vision (ICCV), October 2021. 1, 2, 4 +[59] Lizhen Wang, Xiaochen Zhao, Tao Yu, Songtao Wang, and Yebin Liu. NormalGAN: Learning detailed 3D human from a single RGB-D image. In European Conference on Computer Vision (ECCV), 2020. 3 +[60] Shaofei Wang, Marko Mihajlovic, Qianli Ma, Andreas Geiger, and Siyu Tang. MetaAvatar: Learning animatable clothed human models from few depth images. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[61] Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a probabilistic latent space of object shapes via 3D generative-adversarial modeling. In Advances in Neural Information Processing Systems (NeurIPS), 2016. 2 +[62] Yuliang Xiu, Jinlong Yang, Dimitrios Tzionas, and Michael J Black. ICON: Implicit Clothed humans Obtained from Normals. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2022. 2 +[63] Hongyi Xu, Thiemo Alldieck, and Cristian Sminchisescu. H-NeRF: Neural radiance fields for rendering and temporal reconstruction of humans in motion. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[64] Hongyi Xu, Eduard Gabriel Bazavan, Andrei Zanfir, William T. Freeman, Rahul Sukthankar, and Cristian Sminchisescu. GHUM & GHUML: Generative 3D human shape and articulated pose models. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[65] Ilya Zakharkin, Kirill Mazur, Artur Grigorev, and Victor Lempitsky. Point-based modeling of human clothing. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2021. 2 +[66] Yufeng Zheng, Victoria Fernández Abrevaya, Xu Chen, Marcel C Bühler, Michael J Black, and Otmar Hilliges. IMAvatar: Implicit morphable head avatars from videos. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2022. 2 +[67] Zerong Zheng, Tao Yu, Yebin Liu, and Qionghai Dai. PaMIR: Parametric model-conditioned implicit representation for image-based human reconstruction. IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 2021. 2 \ No newline at end of file diff --git a/gdnatowardsgenerativedetailedneuralavatars/images.zip b/gdnatowardsgenerativedetailedneuralavatars/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3a9c10cb9896526848f39f9754b377d0b0861bc2 --- /dev/null +++ b/gdnatowardsgenerativedetailedneuralavatars/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a07582fc085baf1e698fd53ceba35fa17bbe934697be1a35c613ee3e657ed323 +size 542480 diff --git a/gdnatowardsgenerativedetailedneuralavatars/layout.json b/gdnatowardsgenerativedetailedneuralavatars/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..150a5524b18a7a6bad233fba577d398e72ee7b04 --- /dev/null +++ b/gdnatowardsgenerativedetailedneuralavatars/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7ad8e6b76bdac191331d892b7e1a430229a16955aaa4bef26dec339ecb0b699 +size 455277 diff --git a/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_content_list.json b/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5c659c5c5d09585f5202026a64a127e7aff478a2 --- /dev/null +++ b/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2be33e790602a24c17186544a85527619ea1dc564d51b825bac18969cc0ce5c8 +size 77296 diff --git a/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_model.json b/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..76dac14e9316346db51b2a5c02b304431c352b3c --- /dev/null +++ b/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f4e08c264b8016d50687d8cfc13bae90a004f2bff12bf26ae2d5987863340df +size 93556 diff --git a/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_origin.pdf b/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fd9df72c73a9781adfc5daf2432fff5e24fbfb43 --- /dev/null +++ b/ifsrcnnanincrementalfewshotinstancesegmenter/402935f7-6482-4023-bf9c-d4b161ccf52d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b76f11421b416d0c778ca8888eeeca8698ffb61b6a6ad35c61eb3fda0b3e89e9 +size 9944947 diff --git a/ifsrcnnanincrementalfewshotinstancesegmenter/full.md b/ifsrcnnanincrementalfewshotinstancesegmenter/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7dbc898bde5a181ddc0a243c7133119ba2bb4485 --- /dev/null +++ b/ifsrcnnanincrementalfewshotinstancesegmenter/full.md @@ -0,0 +1,324 @@ +# iFS-RCNN: An Incremental Few-shot Instance Segmenter + +Khoi Nguyen +VinAI Research, Ha Noi, Vietnam +ducminhkhoi@gmail.com + +Sinisa Todorovic +Oregon State University, Oregon, USA +sinisa@oregonstate.edu + +# Abstract + +This paper addresses incremental few-shot instance segmentation, where a few examples of new object classes arrive when access to training examples of old classes is not available anymore, and the goal is to perform well on both old and new classes. We make two contributions by extending the common Mask-RCNN framework in its second stage – namely, we specify a new object class classifier based on the probit function and a new uncertainty-guided bounding-box predictor. The former leverages Bayesian learning to address a paucity of training examples of new classes. The latter learns not only to predict object bounding boxes but also to estimate the uncertainty of the prediction as a guidance for bounding box refinement. We also specify two new loss functions in terms of the estimated object-class distribution and bounding-box uncertainty. Our contributions produce significant performance gains on the COCO dataset over the state of the art – specifically, the gain of +6 on the new classes and +16 on the old classes in the AP instance segmentation metric. Furthermore, we are the first to evaluate the incremental few-shot setting on the more challenging LVIS dataset. + +# 1. Introduction + +This paper addresses the two related problems of incremental few-shot object detection (iFSOD) and instance segmentation (iFSIS). Initially, we are given a large training set of base object classes, which can be used for pre-training an instance segmenter. After this pre-training, access to training examples of the base classes becomes unavailable. With an arrival of a few training examples of new classes, the goal is to achieve successful object detection and instance segmentation on both new and base classes. Our key challenges include: how to address a paucity of data for new classes, and how to train on the new classes such that the base classes are not "forgotten". + +Tab. 1 compares iFSOD and iFSIS with other related problems. iFSOD and iFSIS are important problems arising in many applications, where access to old training data + +![](images/faff38a87248ea73f1a101f4087d60335661ce12d441eb8af36df909849ac779.jpg) + +![](images/c1667023e324c33d45c6ce5acab3b3e9e044814c4ecb93c01a0a955fb3177662.jpg) +Figure 1. Our iFS-RCNN is first pre-trained on abundant examples of base classes, and then fine-tuned on a few examples of new classes. iFS-RCNN modifies the classification head of Mask-RCNN by estimating the class-weight distribution via Bayesian learning. iFS-RCNN modifies the bounding-box head of Mask-RCNN by computing uncertainty of predicting the left (L), right (R), top (T), and bottom (B) sides of the bounding boxes. For testing, the last layers learned on the new classes (diagonal stripes) are concatenated with the corresponding ones learned on the base classes (solid color). + +becomes unavailable, due to, e.g., privacy and security issues or new legal regulations of data access. Also, they are critical in applications where limited time budgets prohibit retraining on both base and new classes. + +There is scant work on iFSOD and iFSIS. Following recent FSIS approaches, we use Mask-RCNN [13], and modify its prediction heads, as shown in Fig. 1. Mask-RCNN is first pre-trained with abundant examples of base classes, and then fine-tuned on new classes by "freezing" all mod + +
SettingsPretrained onFine-tuned onTested on
FSOD - FSISbasenewnew
gFSOD - gFSISbasebase + newbase + new
CLbasenewbase + new
iFSOD - iFSISbasenewbase + new
+ +Table 1. A comparison of related problems. The blue and red indicate abundant and a few examples, respectively, of base and new classes. FSOD (FSIS): few-shot object detection (instance segmentation), gFSOD (gFSIS): generalized FSOD (FSIS), CL: continual learning, iFSOD (iFSIS): incremental FSOD (FSIS). iFSOD (iFSIS) are more challenging than: FSOD (FSIS), since we test on both classes; gFSOD (gFSIS), since our training cannot access the base classes; CL, since they work with more examples. + +ules except for the classification head, bounding-box head, and segmentation-mask head. Finally, for testing on both base and new classes, weights learned on the new classes are concatenated with weights learned on the base classes to make the corresponding last layers in the classification, bounding-box, and segmentation-mask heads. + +As shown in Fig. 1 and depicted in more detail in Fig. 2, we make two contributions aimed at addressing overfitting of Mask-RCNN in few-shot fine-tuning and improving its generalization to query images with large appearance-shape-scale variations of both base and new classes. + +Inspired by deep Bayesian learning [2], our first contribution is about learning a distribution of the classification head's weights on the new classes, and using the estimated distribution for regularization of the fine-tuning. Instead of using the standard Monte Carlo sampling of weights for this Bayesian learning, our key technical novelty is in casting the weight-distribution learning as a Bayesian logistic regression problem, and specifying an efficient approximation to this intractable problem using the probit function. From our ablation studies, our probit-based approximation gives a significantly better performance than the Monte Carlo sampling, even under a reasonable training-time budget. + +Our second contribution is about estimating the uncertainty of bounding-box localization on the new classes, and using the estimated uncertainty for two purposes – to refine the bounding-box prediction and to appropriately weight the loss of bounding-box prediction. As shown in Fig. 2, we use the estimated uncertainty along with the ROI-aligned-pooled feature map as input to a new bounding-box refinement module. The refined bounding box is subsequently input to the segmentation head. Also, we define a new loss between the ground truth and predicted bounding box, such that the loss becomes smaller for highly uncertain predictions, i.e., our fine-tuning stronger penalizes errors on training examples with highly certain bounding-box predictions. + +It is worth noting that we neither use Bayesian learning nor explicitly estimate uncertainty for fine-tuning of the segmentation head of Mask-RCNN. This is because fine + +tuning of the segmentation head on a few examples of the new classes does not face the common challenges of few-shot learning. Recall that the segmentation head predicts pixel labels independently with a $1 \times 1$ convolution. Consequently, every (pixel, label) pair is an independent training example, giving rise to a sufficiently large training set for fine-tuning of the segmentation mask. + +Our extension of Mask-RCNN for incremental few-shot setting gives the name to our approach - iFS-RCNN. iFS-RCNN is evaluated on the COCO dataset [24] for few-shot object detection and instance segmentation with the iFSOD, iFSIS, FSOD, and FSIS tasks. iFS-RCNN significantly outperforms a recent approach [11]. In comparison with the standard Mask-RCNN trained in the gFSOD and gFSIS settings, iFS-RCNN shows a considerable improvement on the new classes while retaining the same performance on the base classes. On iFSOD and iFSIS, we also achieve the higher COCO AP rates by $+6$ and $+16$ for the new and base classes, respectively, relative to the state of the art. + +In addition, we are the first to report the results of iFSOD, FSIS, and iFSIS on the more challenging LVIS dataset [12] having significantly more classes and long-tailed class distributions. + +In the following, Sec. 2 reviews prior work; Sec. 3 specifies iFS-RCNN; and Sec. 4 presents our implementation details and experimental results. + +# 2. Related Work + +This section reviews closely related work. + +FSOD approaches [6, 8, 9, 16, 17, 19, 32, 33, 35, 36, 38] typically adapt Faster-RCNN [29], YOLO [28], or DETR [5] for standard object detection to few-shot setting. These approaches can be divided into two subgroups based on: episodic training [8, 16, 35, 36, 38] and fine-tuning [6, 9, 32, 33]. The former uses episodic training to mimic the setting of few-shot learning, by limiting access to a few annotated support images for each base class. The latter fine-tunes the weights of some layers while freezing the rest to preserve knowledge learned on the base classes. + +FSIS approaches typically use Mask-RCNN [13] as their backbone network. As in FSOD, these methods either train episodically [10, 25, 26, 37] or pretrain on the base classes then fine-tune the last layers of each head [32] on the new classes. Our iFS-RCNN follows the second training strategy and applies it to all three heads – the classification, bounding-box, and segmentation heads – of Mask-RCNN. + +iFSOD approaches [20, 21, 27] typically use Faster-RCNN as their backbone network. In [20], knowledge distillation ensures the prediction of the base classes, after finetuning on the new classes, to match its pretrained prediction. In [27], weights of the box head are generated on the fly, based on a class-specific code extracted from examples of the target classes. In this way, each class has a distinct box + +![](images/08199517f042255fa3206de9915033c70ebb8f0ec0daeaadbbb89227a159c4fe.jpg) +Figure 2. iFS-RCNN extends Mask-RCNN with two contributions: probit classifier and uncertainty-guided box predictor. The former uses Bayesian learning to estimate a probability distribution of the classifier head's weights (red diagonal stripes). Our contribution 1 is the efficient, analytical formulation of this Bayesian learning using the probit function. The latter explicitly estimates uncertainty of predicting bounding boxes (blue diagonal stripes), and uses the estimated uncertainty (violet) as input features along with the ROI-align-pooled features (dark yellow) for refining the boxes. The colored stripes depict the last layers of the classification, box, and segmentation heads learned in the few-shot setting during fine-tuning of the new classes. + +head for object detection. Our iFS-RCNN also uses for each class a distinct set of the classification, bounding-box, and segmentation heads of Mask-RCNN, where the difference between the respective heads is in the last layer fine-tuned for each new class separately. + +iFSIS: A recent approach to iFSIS [11] replaces the standard fully-connected classifier in Mask-RCNN with the cosine-similarity classifier. Unlike our iFS-RCNN, they do not use Bayesian learning and do not estimate bounding-box uncertainty. They convert activations of the classification head to a softmax distribution, and train the head with cross-entropy loss. In this way, the activation scores of all classes compete with each other to determine the class of the bounding box. As training examples of the new classes are scarce, their activation scores are likely to be smaller than those of the base classes in the softmax function. Consequently, their classifier is likely to be biased toward favoring the base classes. They address this bias by using the cosine-similarity classifier, where both the box feature and class weights are normalized to have unit length before the dot product for reducing a statistical difference between the base and new classes. In contrast, we directly use sigmoid activation of the classification head for predicting the class + +of the bounding box, and train our fully-connected classifier with the focal loss [23]. Our iFS-RCNN uses the sigmoid activation to predict each class independently, and thus alleviate the aforementioned bias. + +# 3. Specification of iFS-RCNN + +# 3.1. Problem Statement + +We address N-way K-shot iFSOD and iFSIS, where abundant training examples of $N_{b}$ base classes are provided for pre-training. After that, access to training examples of the base classes is not available. When a few training examples $K$ of additional $N_{n}$ new classes are arbitrarily provided, our goal is to detect and segment all object instances belonging to all $N = N_{b} + N_{n}$ classes in a query image. + +In the following, we specify our two contributions – the probit classifier and uncertainty-guided box predictor. + +# 3.2. The Probit Classifier + +As mentioned in Sec. 2, our iFS-RCNN uses sigmoid activation instead of softmax activation for predicting the class of a bounding box. With sigmoid activation, the scores for all classes are independently predicted, and thus our classi + +fication head effectively addresses the statistical difference between the base and new classes. However, in the FSOD and FSIS settings, our experiments (see Tab. 2) demonstrate that the classification head with the sigmoid activation usually gives a lower performance than that with the softmax activation, when weights of the classifier head (also referred to as class weights) are learned as point estimation. + +To address this problem, we resort to Bayesian learning of a distribution of the class weights, and adopt the common variational framework. Formally, the class weights $w$ are characterized by the normal distribution, $w \sim \mathcal{N}(\mu, \Sigma)$ , with mean $\mu \in \mathbb{R}^D$ and diagonal covariance matrix $\Sigma \in \mathbb{R}_{+}^{D \times D}$ . Our goal is to learn $\mu$ and $\Sigma$ by minimizing the following variational objective: + +$$ +L _ {c} = l _ {d} \left(p \left(c | f, \mu , \Sigma\right), c ^ {*}\right) + \mathrm {K L} \left(\mathcal {N} (\mu , \Sigma) | | \mathcal {N} (\mathbf {0}, \mathbf {1})\right), \tag {1} +$$ + +where $f \in \mathbb{R}^D$ is a feature extracted from the bounding box; $c$ and $c^*$ are the predicted and ground-truth classes; $l_d$ is the incurred sigmoid focal loss [23] for predicting $c$ ; KL stands for the Kullback-Leibler divergence; and $p(c|f, \mu, \Sigma)$ is the posterior predictive distribution defined as + +$$ +p (c | f, \mu , \Sigma) = \int \sigma (f ^ {\top} w) \mathcal {N} (w | \mu , \Sigma) d w, \tag {2} +$$ + +where $\sigma (\cdot)$ denotes the sigmoid activation. + +Once $\mu$ and $\Sigma$ are learned, class prediction amounts to the MAP problem: $c = \arg \max_{c'} p(c'|f, \mu, \Sigma)$ . However, the integral in (2) is intractable. Prior work typically approximates the MAP problem with Monte Carlo sampling: $p(c|f, \mu, \Sigma) \approx \frac{1}{T} \sum_{w_t \sim \mathcal{N}(\mu, \Sigma)} \sigma(f^\top w_t)$ where $T$ is the number of Monte-Carlo samples. The Monte Carlo approximation, however, has a poor trade off between efficiency and accuracy, where using a sufficiently large $T$ would make our training and testing prohibitively slow. + +Instead of the stochastic Monte Carlo sampling, we specify a more efficient deterministic approximation of the posterior predictive distribution. We first observe that our fine-tuning of the classification head's last layer using Bayesian learning is equivalent to learning a Bayesian logistic regression (BLR). Conveniently, the well-known probit function $\Phi(x)$ [30], [1, p. 219] provides a deterministic approximation to BLR. The probit function approximates the sigmoid function as $\sigma(x) \approx \Phi(\lambda x) = \frac{1}{2}\left[1 + \mathrm{erf}\left(\frac{\lambda x}{\sqrt{2}}\right)\right]$ , where $\mathrm{erf}(\cdot)$ is the error function, and $\lambda^2 = \pi/8$ ensures that the two functions have the same slope at the origin. An important property of the probit function is that its convolution with a Gaussian function can be expressed analytically. Let $a = f^\top w \in \mathbb{R}$ be a random variable whose expectation and variance can be expressed as $\mathbb{E}[a] = \mu_a = f^\top \mu \in \mathbb{R}$ and $\mathbb{V}[a] = \Sigma_a = f^\top \Sigma f \in \mathbb{R}$ . Then the posterior predictive distribution given by (2) can be efficiently approximated as + +$$ +p (c \mid f, \mu , \Sigma) = \int \sigma (a) \mathcal {N} (a \mid \mu_ {a}, \Sigma_ {a}) d a, \tag {3} +$$ + +$$ +\approx \int \Phi (\lambda a) \mathcal {N} (a | \mu_ {a}, \Sigma_ {a}) d a = \Phi \left(\frac {\lambda \mu_ {a}}{\left(1 + \lambda^ {2} \Sigma_ {a}\right) ^ {\frac {1}{2}}}\right), \tag {4} +$$ + +$$ +\approx \sigma \left(\frac {f ^ {\top} \mu}{\left(1 + \frac {\pi}{8} f ^ {\top} \Sigma f\right) ^ {\frac {1}{2}}}\right). \tag {5} +$$ + +As our classifier head uses the probit function for the MAP class prediction, we call it the probit classifier. It is suitable for iFSOD and iFSIS for two reasons. It leverages Bayesian learning to address the paucity of training data. Also, it predicts a score for each class independently to address the incremental-learning setting. + +# 3.3. Uncertainty-Guided Bounding Box Predictor + +Object appearances, shapes, and scales in test images may significantly differ from a few training examples available. Also, target objects in query images may be subject to partial occlusion. All this gives rise to uncertainty in bounding box prediction. We seek to explicitly model this uncertainty when predicting four offset values $\{m_k\}_{k = 1..4} \in \mathbb{R}^4$ that initially identify the location of bounding boxes. Specifically, as shown in Fig. 2, our box predictor additionally estimates four uncertainty values $\{u_k\}_{k = 1..4} \in \mathbb{R}_+^4$ of the bounding box prediction, one for each of the $\{m_k\}$ predictions. The estimated uncertainty $\{u_k\}$ is then used as input along with the ROI-align-pooled features - extracted from the initially predicted box $m$ - to the box refinement module for the final offset bounding-box prediction $\{b_k\}_{k = 1..4} \in \mathbb{R}^4$ . + +To learn how to predict uncertainty $\{u_k\}$ , initial bounding-box $\{m_k\}$ , and refined bounding-box $\{b_k\}$ on a few training examples, we specify the following box loss: + +$$ +L _ {b} = L _ {\mathrm {u}} + L _ {\text {r e f i n e}}, \tag {6} +$$ + +where $L_{\mathrm{u}}$ is our new uncertainty-weighted box loss and $L_{\mathrm{refine}}$ is loss incurred by the box refinement module. + +We define $L_{\mathrm{u}}$ as + +$$ +L _ {\mathrm {u}} = \sum_ {k = 1} ^ {4} \frac {1}{2} \left(\frac {\left(m _ {k} - b _ {k} ^ {*}\right) ^ {2}}{u _ {k} ^ {2}} + u _ {k} ^ {2}\right), \tag {7} +$$ + +where $b^{*}$ is the ground-truth box. The first term in (7) is aimed at minimizing a weighted difference between the ground-truth and predicted boxes. The weighting is inversely proportional to the predicted uncertainty $u_{k}$ such that the lower loss is incurred for box predictions with high uncertainty. The second term in (7) is aimed at minimizing uncertainty values such that the network incurs a penalty for predicting high uncertainty when trying to reduce the first term in (7). + +When the box refinement module makes the final prediction $b$ , it incurs the following loss: + +$$ +L _ {\text {r e f i n e}} = \sum_ {k = 1} ^ {4} \text {s m o o t h L 1} \left(b _ {k}, b _ {k} ^ {*}\right). \tag {8} +$$ + +It is worth noting that our loss formulation fundamentally differs from other recent approaches aimed at estimating uncertainty in object detection. For example, recent approaches [15, 18] make the assumption that the bounding-box location and its uncertainty are governed by a Gaussian distribution. In contrast, we do not explicitly specify any probability distribution of box locations. iFS-RCNN appears related to Cascade-RCNN [3, 4] which also refines the initial box. However, these approaches do not explicitly predict uncertainty and thus cannot use uncertainty as an input feature for the box refinement as we do. By contrast, our uncertainty estimation in training serves to transfer "knowledge" from the base classes to the new testing classes. In experiments, these approaches show worse performance than our uncertainty-guided box refinement module. + +# 3.4. Our Training and Testing Strategies + +# Training on the base classes + +1. Obtain a variant of Mask-RCNN named Mask+Sigmoid by replacing the standard softmax classifier with the sigmoid classifier. Train Mask+Sigmoid with the following loss functions: sigmoid focal loss, $L_{\mathrm{refine}}$ in (8), and mask-BCE loss. +2. Obtain a variant of Mask+Sigmoid named Mask+Sigmoid+Uncertainty by replacing the box predictor with the uncertainty-guided box predictor (contribution 2 in Fig. 2). While freezing other modules, train the uncertainty-guided box predictor of Mask+Sigmoid+Uncertainty with loss $L_{b}$ in (6). +3. Store the class weights $\mu_{b}$ of the base classes for the sigmoid classifier of $\mathrm{Mask + Sigmoid + Uncertainty}$ . + +# Fine-tuning on the new classes + +1. Obtain a variant of Mask+Sigmoid+Uncertainty named iFS-RCNN by replacing the sigmoid classifier with the probit classifier (contribution 1 in Fig. 2). +2. While freezing other modules, train the probit classifier with loss $L_{c}$ in (1) to obtain the class weights $\mu_{n}, \Sigma_{n}$ of the new classes. Also, train the last layer of the box predictor with $L_{b}$ in (6); and the last layer of the segmentation head with the mask-BCE loss. + +# Testing on the base and new classes + +1. Set $\mu = [\mu_b; \mu_n]$ and $\Sigma = [\mathbf{0}; \Sigma_n]$ for the probit classifier, where $[\cdot; \cdot]$ is a concatenation. Also, concatenate the weights estimated for the base and new classes to obtain the box and segmentation-mask heads. +2. Run iFS-RCNN on query images. + +# 4. Experimental Results + +Datasets & Metrics: We evaluate iFS-RCNN on the modified version of the COCO 2014 dataset [24] introduced by [16] for FSIS and FSOD. Also, we are the first to evaluate iFSOD, FSIS, and iFSIS on a new split of the LVIS dataset [12] introduced by [32] for FSOD. We report the common COCO-style evaluation metrics of both object detection and instance segmentation – namely, the average precision (AP) at multiple intersection-over-union (IoU) thresholds ranging from 0.5 to 0.95. + +For COCO, the 20 categories shared with PASCAL VOC [7] are used as new classes while the remaining 60 classes are used as the base classes. We vary the number of examples for the new classes, i.e. $K = \{1,2,3,5,10,30\}$ , and report average results with $95\%$ confidence interval over 10 runs with different sets of few-shot examples for each $K$ . This paper reports results for $K = \{1,5,10\}$ for brevity. Other results are in the supplementary material. + +LVIS has 1230 classes where some have a large number of examples and some other, called rare classes, have only a few examples (less than 10 examples per class). Hence, the number of images for each class in LVIS has a long-tail distribution. We take the frequent (appearing in more than 100 images) classes and the common classes (10-100 images) in LVIS as the base classes, while the 454 rare classes (appearing less than 10 images) as the new classes. Due to the small number of training examples for the rare classes in LVIS, we cannot have multiple runs as in COCO, thus we follow [32] on their split with $K \leq 10$ . + +# 4.1. Implementation Details + +Our backbone CNN is ResNet-50 [14] with the FPN of [22], as in recent work on FSIS. All variants of iFSRCNN are implemented using the detectron2 toolbox [34] with the codebase of [32]. All variants of our approach, specified in Sec. 4.2, are trained using SGD and a batch size of 16 on 8 NVIDIA GPUs V100s, with two images per GPU. The learning rate is set to 0.02 and 0.01 for the pre-training and fine-tuning stages respectively. The number of iterations for the pre-training stage is 110000 with two weight decay steps with the rate of 10 at 80000 and 100000 iterations. The number of iterations for fine-tuning stage depends on the number of examples ranging from 500 iterations (with $K = 1$ ) to 6000 iterations (with $K = 30$ ). The hyper-parameters of the focal loss are $\gamma = 0.25$ , $\alpha = 2$ . + +The threshold for filtering predictions before the NMS is 0.05. To select proposals for training the uncertainty-guided box predictor, we choose the predicted boxes with IoU larger than 0.7 with their closest ground-truth boxes. The threshold for deciding foreground and background in the segmentation mask head is 0.5. We use the softplus function $f(x) = \ln (1 + \exp (x))$ to ensure the class variances $\Sigma$ and box uncertainty $u$ are non-negative. + +
Object DetectionInstance Segmentation
Number of shots1235103012351030
Mask-RCNN3.585.075.797.818.5912.683.715.245.297.668.4611.09
Mask+Cosine3.394.875.196.877.9612.523.405.004.756.687.7211.03
Mask+Sigmoid3.604.495.637.067.6811.403.924.635.637.157.6710.94
Mask+Probit5.185.907.829.4510.4313.485.156.037.679.349.5212.07
Mask+MC4.525.457.028.859.5713.054.545.196.918.268.9811.55
Mask+Sig+Uncert4.485.326.768.499.1612.854.845.887.008.629.2211.98
Mask+Sig+Gauss3.744.775.897.337.8611.653.944.725.877.247.7611.02
Mask+Sig+Refine3.874.575.787.488.2311.953.994.775.687.407.8711.01
iFS-RCNN6.346.938.9310.5311.2714.665.546.337.809.4110.2313.08
+ +Table 2. Our ablation study on FSOD and FSIS with different $K = \{ 1,2,3,5,{10},{30}\}$ on COCO. The best results are in red, second-best results are in blue. Mask-RCNN and Mask+Cosine use the softmax activation with cross-entropy loss for training. The remaining ablations use the sigmoid activation with the focal loss for training. + +
Object DetectionInstance Segmentation
Tested onNew classesBase classesAll classesNew classesBase classesAll classes
Number of shots15101510151015101510
TFA [32]2.907.009.1031.9032.3032.403.6011.5014.20------
FSDetView [35]3.358.5312.5025.7525.0524.8220.1520.9221.74------
GIFSOD [21]--8.50--28.10--23.20------
ONCE [27]0.701.001.2017.9017.9017.9013.6013.7013.70------
LEAST [20]4.409.4012.5024.6025.2023.107.5013.7016.20------
iMTFA [11]3.236.076.9727.8124.1323.3621.6719.6219.262.815.195.8825.9022.5621.87
Mask+Sigmoid2.856.348.0438.5538.5338.5329.6230.4930.913.066.528.0035.7035.6935.69
iFS-RCNN4.549.9112.5540.0840.0640.0531.1932.5233.023.958.8010.0636.3536.3336.32
+ +Table 3. iFSOD and iFSIS results on COCO with different $K = \{ 1,5,{10}\} .{}^{\prime } - {}^{\prime }$ indicates no results are reported. Best results are in bold. + +Our segmentation head is the same as in Mask-RCNN [13]. It is trained with the binary cross-entropy (BCE) loss. Our box refinement module has the same architecture as the box head. The final layers of the uncertainty-guided box predictor and segmentation head are class-specific, and obtained by concatenating the class weights learned for the base and new classes. + +# 4.2. Ablation Study + +The following ablations are evaluated on the first run of COCO for studying how each component of iFS-RCNN affects the final performance. + +- Mask-RCNN: the original Mask-RCNN [13] with the softmax classifier. +- Mask+Cosine: replace the dot product with the cosine-similarity classifier in Mask-RCNN as in [11]. +- Mask+Sigmoid: replace the softmax classifier with the sigmoid classifier in Mask-RCNN (our strong baseline). +- Mask+Probit: replace the sigmoid classifier with the probit classifier in Mask+Sigmoid, our contribution 1 in Fig. 2. +- Mask+MC: replace the probit approximation with the Monte Carlo (MC) sampling in $\mathrm{Mask + Probit}$ , where the number of samplings is $T = 10$ . + +- Mask+Sig+Uncert: replace the box predictor in Mask+Sigmoid with the uncertainty-guided box predictor, our contribution 2 in Fig. 2. +- Mask+Sig+Gauss: a variant of Mask+Sigmoid which additionally predicts box uncertainty (similar to [15]) with Gaussian distribution assumption. +- Mask+Sig+Refine: similar to Cascade RCNN [3] as it does not explicitly predict uncertainty when refining the initial box prediction +- Our iFS-RCNN in Fig. 2. + +Tab. 2 shows our evaluation of the above ablations on FSOD and FSIS (see Tab. 1). From Tab. 2, Mask-RCNN with the softmax activation outperforms other pointestimation-based ablations with the sigmoid activation. However, Mask-RCNN gives worse performance than the ablations which use the sigmoid activation with Bayesian learning for the Probit or MC. This justifies our choice of Bayesian-based classifiers with the sigmoid activation. Also, our probit classifier outperforms the MC classifier, suggesting that MC requires longer stochastic sampling $T \gg 10$ , which would be prohibitively slow in practice. Importantly, our modeling of uncertainty in $\text{Mask} + \text{Sig} + \text{Uncert}$ gives a substantial performance gain over $\text{Mask} + \text{Sigmoid}$ , $\text{Mask} + \text{Sig} + \text{Gauss}$ , and $\text{Mask} + \text{Sig} + \text{Refine}$ . This justifies our contribution 2. Finally, our full approach, iFS-RCNN yields + +
SettingsFSODFSISObject DetectionInstance Segmentation
Tested onNewNewNewBase-cBase-fAllNewBase-cBase-fAll
TFA [32] (gFSOD)18.35-16.9024.3027.9024.40----
Mask-RCNN [13] (gFSOD & gFSIS)16.5018.3112.1124.5428.5924.0412.7525.3527.7524.36
Mask+Sigmoid (iFSOD & iFSIS)16.9319.1815.0223.3327.2323.5517.3925.2627.0524.75
iFS-RCNN (iFSOD & iFSIS)20.7621.0618.3826.1130.1226.4618.2626.2928.4625.90
+ +Table 4. Object detection and instance segmentation results with AP metric for FSOD, FSIS, iFSOD, and iFSIS tasks on LVIS. The best results are in bold. TFA and Mask-RCNN are trained with more supervision than Mask+Sigmoid and iFS-RCNN as described in Tab. 1. Base-c and Base-f indicate the common classes (≥ 100 images) and frequent classes (10-100 images) among the base classes. + +the best performance, about +2.5 performance gain over the strong baseline Mask+Sigmoid and +2 over Mask-RCNN. In the following experiments, we choose Mask+Sigmoid and iFS-RCNN to compare with prior work. + +# 4.3. Comparison with Prior Work on COCO + +Tab. 3 compares our results on COCO in iFSOD and iFSIS with the strong baseline Mask+Sigmoid, approaches designed for FSOD and FSIS (TFA [32], FSDetView [35]), and approaches designed for iFSOD and iFSIS (GIFSOD [21], ONCE [27], LEAST [20], MTFA, and iMTFA [11]). + +TFA (a fine-tuning-based approach) and FSDetView (an episodic-training-based approach) are adapted to the iFSOD setting as follows. TFA is first trained on the base classes, resulting in model 1. Then, TFA is fine-tuned on the new classes, resulting in model 2. Finally, we run the models 1 and 2 on the same test images and select the top 100 predictions, as in the COCO evaluation protocol. For FSDetView, after pre-training the model on training examples of the base classes, we use the pretrained model to estimate the prototype for each base class, and then run the pretrained model on the new classes to extract their prototypes. FSDetView uses the prototypes of both new and base classes for object detection in test images. As TFA and FSDetView were not originally designed for iFSOD, their aforementioned adaptation from FSOD to iFSOD has two limitations: (1) Storage and running of two distinct models/prototypes for predicting the base and new classes; (2) The two distinct models may independently each yield a high score on a base and new class in the test image, which is then hard to resolve. + +Among the approaches aimed at iFSOD, ONCE is based on YOLO [28], and LEAST and GIFSOD are based on Faster-RCNN [29]. iMTFA is a variant of Mask+Cosine, where the weight $\mu_{n}$ is set to the box feature $f$ extracted from an example of the new class. + +For the comparison in Tab. 3, results are averaged over 10 runs with different sets of few-shot examples. From this table, for the iFSOD setting, iFS-RCNN outperforms state of the art (SOTA) approaches slightly on new classes $(+0.05)$ while significantly on the base classes $(+12)$ for $K = 10$ . For the iFSIS setting, iFS-RCNN outperforms the SOTA iMTFA with significant margins. Specifically, for $K = 10$ , our performance gains are about $+6$ for the new + +classes and +16 for the base classes on segmentation. Our performance gains are very large, especially for the challenging COCO dataset. + +# 4.4. Results on LVIS + +Tab. 4 reports our results on LVIS with $K \leq 10$ on iFSIS and FSIS. Although Mask+Sigmoid uses less supervision than Mask-RCNN and TFA, they give comparable results. iFS-RCNN significantly outperforms Mask-RCNN with the gains of +3 on FSIS and +6 on iFSIS on the new classes. These results demonstrate the effectiveness of our iFS-RCNN on the more challenging dataset LVIS. + +# 4.5. Qualitative Evaluation + +Fig. 3 illustrates some of our results. The top two rows show success cases while the bottom row shows failure cases. For the failure cases from left to right: the train is misclassified as bus due to very similar appearance, the bird detection has a large bounding box due to the occlusion, the human leg is segmented as a part of the motorbike due to similar appearance, and the small boats far behind are not detected. Fig. 4 shows our box refinement results. As can be seen, high uncertainty about the box prediction gives a considerable box refinement. + +# 5. Conclusion and Discussion + +We have specified iFS-RCNN to address N-way K-shot incremental few-shot object detection (iFSOD) and instance segmentation (iFSIS). iFS-RCNN leverages Mask-RCNN, but modifies the standard softmax classifier and bounding-box prediction head. The softmax classifier has been replaced with the sigmoid classifier for alleviating a statistical imbalance of the base and new classes. The sigmoid classifier has been further improved via Bayesian learning to robustly estimate a distribution of the classifier head's weights on a few examples of the new classes. For this Bayesian learning, we have proposed an analytical approximation using the probit function. Also, the standard box predictor of Mask-RCNN has been extended to explicitly predict uncertainty of box prediction, and use the estimated uncertainty as input to a bounding-box refinement module. iFS-RCNN significantly outperforms iMTFA – the state of + +![](images/22e770d1f503147f7a48f03afaa9b6371b49b926d3cfa0532bf6775afd0c3170.jpg) + +![](images/4819c6bf50fa96a72deab1fbe2c62ede079b9c180848b55db20fb76b3d343a0c.jpg) + +![](images/8e3732362065f5de74e60e9c76bf43ad638ebd4661bbd7a769e594d634469560.jpg) + +![](images/7c869f6dae5dfeba21784b65cfba62103da3ce27e4c5cff7750d638977bcb24c.jpg) + +![](images/039c20ea7b18f8df53fe5b746e264456c150e4331355280cf5c5edbf4e79a491.jpg) + +![](images/40e24b45f4b6c8d19bd11fa73317566b77c32c585ef952a2de0d772dc137a1ad.jpg) + +![](images/2739a54fead598d8d07efcce255d7155a2a005a22809ff8def623094a136ee99.jpg) + +![](images/a5f8a48d02c38c4f746d733426ed6f0a2c3d7e14a660251d3b324a192ef5018a.jpg) + +![](images/14f94e9d2b09c002fab05baffdb7788fa8c81c8e669b5386a9bd86df2f64ca4f.jpg) +Figure 3. Representative results of iFS-RCNN on COCO-new with $K = 30$ . The top two rows show success cases while the bottom row shows failure cases. In the last row, from left to right: the train is detected as bus, bonding-box is too large for the bird, the human leg is segmented as a part of the motorbike, the small boats far behind are not detected. + +![](images/c18972a0b751cf70a2ba71b56a2261ef0c36441cad140a30398b34f0efcafd35.jpg) + +![](images/996e61372dac99ddf5f608d9ee69835cd0dc1e1113a25a552a73dbffa49ab709.jpg) + +![](images/1d6a6eac26cc816e6426ef1e14626cf6b1deee5802c4fd687f3af97250575b6e.jpg) + +![](images/e7956e4734498575ac01cc1f958dce8fdfc7b0e502b7c43150bba6b6bd8b1a8a.jpg) + +![](images/e4a1c49ba67fd690caf558ede811459a57096f14080ad818542cd395d6606d24.jpg) + +![](images/01d237d0e366e181f573aa81689845cb40a959f9d2a7c90247b3fc8a194f6967.jpg) +Figure 4. Bounding-box refinement with our uncertainty-guided box predictor on COCO-new with $K = 1$ . For each pair, left: initial box, right: refined box. The box labels show left (L), top (T), right (R), and bottom (B) side uncertainties; red text indicates high uncertainty ( $\geq 10$ ) that lead to large refinements. Yellow arrows indicate the refined direction of each box side. + +![](images/b0dda1ca990fe7d63a85ef80be031d40667fa30777762e790a35c99847481a40.jpg) + +![](images/f4b9c198a0d3e4630511b2e4700000b03da16c572268ab416d6735da3f8aa685.jpg) + +the art in iFSIS - with very large performance gains on the COCO dataset, $+6$ on the new classes and $+16$ on the base classes with 10 training examples. Moreover, we are + +the first to report the results on the LVIS dataset for the iFSOD, FSIS, and iFSIS problems, where we outperform strong baselines. + +As for potential limitations, our contribution 1, in general, could be applied to any object detector, including RPN-based ones like Faster-RCNN [29] and Mask-RCNN [13]), point-based ones like FCOS [31] and Center-Net [39]), and transformer-based ones like DETR [5]. However, in our experiments, we have succeeded in applying it only to the RPN-based detector. This might be due to the pre-selected balanced training examples of background and foreground classes in the second stage of Faster-RCNN, which is absent in the other two detector frameworks. Also, while our estimation of uncertainty of box prediction and our new uncertainty-weighted box loss have enabled significant performance gains, our contribution 2 lacks a theoretical underpinning as to why our formulation outperforms a Gaussian-based uncertainty estimation. + +As any system for object detection and segmentation, ours could be weaponized and misused for malicious violations of privacy, as well as used for efficiently discovering and fighting against such misuses due to its few-shot learning capabilities. + +Acknowledgement. This work was supported in part by DARPA MCS Award N66001-19-2-4035. + +# References + +[1] Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. +[2] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International Conference on Machine Learning, pages 1613-1622. PMLR, 2015. +[3] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6154-6162, 2018. +[4] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: high quality object detection and instance segmentation. IEEE transactions on pattern analysis and machine intelligence, 2019. +[5] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European Conference on Computer Vision, pages 213-229. Springer, 2020. +[6] Hao Chen, Yali Wang, Guoyou Wang, and Yu Qiao. Lstd: A low-shot transfer detector for object detection. In Proceedings of the AAAI conference on artificial intelligence, 2018. +[7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The Pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303-338, June 2010. +[8] Qi Fan, Wei Zhuo, Chi-Keung Tang, and Yu-Wing Tai. Few-shot object detection with attention-rpn and multi-relation detector. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4013–4022, 2020. +[9] Zhibo Fan, Yuchen Ma, Zeming Li, and Jian Sun. Generalized few-shot object detection without forgetting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4527-4536, 2021. +[10] Zhibo Fan, Jin-Gang Yu, Zhihao Liang, Jiarong Ou, Changxin Gao, Gui-Song Xia, and Yuanqing Li. Fgn: Fully guided network for few-shot instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9172-9181, 2020. +[11] Dan Andrei Ganea, Bas Boom, and Ronald Poppe. Incremental few-shot instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1185-1194, June 2021. +[12] Agrim Gupta, Piotr Dollar, and Ross Girshick. LVIS: A dataset for large vocabulary instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[13] 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. +[14] 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. +[15] Yihui He, Chenchen Zhu, Jianren Wang, Marios Savvides, and Xiangyu Zhang. Bounding box regression with un + +certainty for accurate object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2888-2897, 2019. +[16] Bingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu, Jiashi Feng, and Trevor Darrell. Few-shot object detection via feature reweighting. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8420-8429, 2019. +[17] Leonid Karlinsky, Joseph Shtok, Sivan Harary, Eli Schwartz, Amit Aides, Rogerio Feris, Raja Giryes, and Alex M Bronstein. Repmet: Representative-based metric learning for classification and few-shot object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5197-5206, 2019. +[18] Youngwan Lee, Joong-won Hwang, Hyung-II Kim, Kimin Yun, and Joungyoul Park. Localization uncertainty estimation for anchor-free object detection. arXiv preprint arXiv:2006.15607, 2020. +[19] Aoxue Li and Zhenguo Li. Transformation invariant few-shot object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3094-3102, 2021. +[20] Pengyang Li, Yanan Li, and Donghui Wang. Class incremental few-shot object detection. arXiv preprint arXiv:2105.07637, 2021. +[21] Yiting Li, Haiyue Zhu, Jun Ma, Chek Sing Teo, Cheng Xiang, Prahlad Vadakkepat, and Tong Heng Lee. Towards generalized and incremental few-shot object detection. arXiv preprint arXiv:2109.11336, 2021. +[22] 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. +[23] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980-2988, 2017. +[24] Tsung-Yi Lin, Michael Maire, Serge Belongie, Lubomir Bourdev, Ross Girshick, James Hays, Pietro Perona, Deva Ramanan, C. Lawrence Zitnick, and Piotr Dólar. Microsoft coco: Common objects in context. In European conference on computer vision (ECCV), June 2016. +[25] Claudio Michaelis, Ivan Ustyuzhaninov, Matthias Bethge, and Alexander S. Ecker. One-shot instance segmentation. arXiv preprint arXiv:1811.11507, 2018. +[26] Khoi Nguyen and Sinisa Todorovic. Fapis: A few-shot anchor-free part-based instance segmenter. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11099-11108, 2021. +[27] Juan-Manuel Perez-Rua, Xiatian Zhu, Timothy M Hospedales, and Tao Xiang. Incremental few-shot object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13846-13855, 2020. +[28] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. +[29] 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. +[30] David J Spiegelhalter and Steffen L Lauritzen. Sequential updating of conditional probabilities on directed graphical structures. Networks, 20(5):579-605, 1990. +[31] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 9627-9636, 2019. +[32] Xin Wang, Thomas E Huang, Trevor Darrell, Joseph E Gonzalez, and Fisher Yu. Frustratingly simple few-shot object detection. arXiv preprint arXiv:2003.06957, 2020. +[33] Jiaxi Wu, Songtao Liu, Di Huang, and Yunhong Wang. Multi-scale positive sample refinement for few-shot object detection. In European Conference on Computer Vision, pages 456-472. Springer, 2020. +[34] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019. +[35] Yang Xiao and Renaud Marlet. Few-shot object detection and viewpoint estimation for objects in the wild. In European Conference on Computer Vision, pages 192-210. Springer, 2020. +[36] Xiaopeng Yan, Ziliang Chen, Anni Xu, Xiaoxi Wang, Xiaodan Liang, and Liang Lin. Meta r-cnn: Towards general solver for instance-level low-shot learning. In Proc. of IEEE International Conference on Computer Vision (ICCV), 2019. +[37] Xiaopeng Yan, Ziliang Chen, Anni Xu, Xiaoxi Wang, Xiaodan Liang, and Liang Lin. Meta r-cnn: Towards general solver for instance-level low-shot learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9577-9586, 2019. +[38] Gongjie Zhang, Zhipeng Luo, Kaiwen Cui, and Shijian Lu. Meta-detr: Few-shot object detection via unified image-level meta-learning. arXiv preprint arXiv:2103.11731, 2021. +[39] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. arXiv preprint arXiv:1904.07850, 2019. \ No newline at end of file diff --git a/ifsrcnnanincrementalfewshotinstancesegmenter/images.zip b/ifsrcnnanincrementalfewshotinstancesegmenter/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..62fb117a001ed7ebe8ee0f43b27ff6259e35e055 --- /dev/null +++ b/ifsrcnnanincrementalfewshotinstancesegmenter/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51a338d30419380748f12d1a01dd391a0956dbcbac98b7b4418b7b6ec4bb14eb +size 743256 diff --git a/ifsrcnnanincrementalfewshotinstancesegmenter/layout.json b/ifsrcnnanincrementalfewshotinstancesegmenter/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0565ab0854f79234bc387585d619122c011ecc46 --- /dev/null +++ b/ifsrcnnanincrementalfewshotinstancesegmenter/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb413938823dbbc00710ce534ca340a4b83d15d42120849deb000d20a1587f3b +size 385743 diff --git a/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_content_list.json b/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dd9fcb4862976d1605550508392e8bdcf41194b4 --- /dev/null +++ b/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07373a1b0935cd655d3f253b1f480993cde799a05df3c07ecbc0d5784783ad5c +size 79831 diff --git a/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_model.json b/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ae1ccd109898641f421c8a755c668ef16151e048 --- /dev/null +++ b/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:636e1c7267fa0de473cdee45c4e50b8c03352ff87e88a4f6ae1ecea3e1ed3be8 +size 97249 diff --git a/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_origin.pdf b/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b044ff9515997fee75f1f1fdaaeffda1918d9597 --- /dev/null +++ b/iplaninteractiveandprocedurallayoutplanning/4333387e-d5ca-4e37-9160-40bbef0e58f8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48853d47deb332363ae953398a93ae4ab4f31dd280c6af6501c12becf6e37b17 +size 1402202 diff --git a/iplaninteractiveandprocedurallayoutplanning/full.md b/iplaninteractiveandprocedurallayoutplanning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..300768b8b133976f95745ef35c3a1dfb38bdf8bd --- /dev/null +++ b/iplaninteractiveandprocedurallayoutplanning/full.md @@ -0,0 +1,307 @@ +# iPLAN: Interactive and Procedural Layout Planning + +Feixiang He +University of Leeds, UK +scfh@leeds.ac.uk + +Yanlong Huang +University of Leeds, UK +y.l.huang@leeds.ac.uk + +He Wang * +University of Leeds, UK +h.e.wang@leeds.ac.uk + +# Abstract + +Layout design is ubiquitous in many applications, e.g. architecture/urban planning, etc, which involves a lengthy iterative design process. Recently, deep learning has been leveraged to automatically generate layouts via image generation, showing a huge potential to free designers from laborious routines. While automatic generation can greatly boost productivity, designer input is undoubtedly crucial. An ideal AI-aided design tool should automate repetitive routines, and meanwhile accept human guidance and provide smart/proactive suggestions. However, the capability of involving humans into the loop has been largely ignored in existing methods which are mostly end-to-end approaches. To this end, we propose a new human-in-the-loop generative model, iPLAN, which is capable of automatically generating layouts, but also interacting with designers throughout the whole procedure, enabling humans and AI to co-evolve a sketchy idea gradually into the final design. iPLAN is evaluated on diverse datasets and compared with existing methods. The results show that iPLAN has high fidelity in producing similar layouts to those from human designers, great flexibility in accepting designer inputs and providing design suggestions accordingly, and strong generalizability when facing unseen design tasks and limited training data. + +# 1. Introduction + +Layout generation has recently spiked research interests in computer vision/graphics, aiming to automate the design process and boost the productivity. The traditional design process follows a diagram of iteratively adjusting/finalizing details from coarse to fine and global to local, which imposes repetitive and laborious routines on designers. Very recently, it has been shown that automatic image generation of such designs (with minimal human input) is possible through learning from data [12, 26, 27, 36]. This new line of research combines deep learning with design and has + +demonstrated a new avenue for AI-aided design. + +To achieve full automation, current research tends to learn from existing designs in an end-to-end fashion, and then to generate new ones with qualitative similarity and sufficient diversity. Taking floorplan as an example, automated generation can be based on simple human input, such as the boundary of the floor space [36], the relations among rooms [26, 27], or both [12]. While fully automated generation is important, design is in nature a procedural process, which involves alternations between repetitive routines and creative thinking at multiple intermediate stages [29]. Therefore, an ideal AI-aided system should automate the routine part while allowing the designer to impart creativity. This requires the system to be able to interact with the designer, in the sense that it should accept designer's guidance, then actively suggest possible solutions accordingly, completing a feed-back loop. So far, the human-in-the-loop element is largely missing, which prevents a closer integration of AI and existing design practice. + +Designing such an AI model faces several intrinsic challenges. In practice, learning how to interact with the designer requires a full observation of the decisions made at every intermediate stage. However, existing datasets, such as RPLAN [36] and LIFULL [22], usually only include the final designs, without the stage-to-stage design process. One potential solution to overcome this issue is to reverse-engineer intermediate stages from final designs, which however leads to another difficulty: the order of stages depends on the specific task/goal and could vary dramatically even for the same final design. Further, the order uncertainty is exacerbated by the strong personal styles and preferences of designers. Thus, how to design an AI system that can account for the above factors is a key research question, which is under-explored to date. + +In this paper, we propose a new human-in-the-loop generative model for layout generation, which is referred to as interactive planning (iPLAN). Unlike previous work, iPLAN is equipped with a user-friendly interaction mechanism, which is achieved by letting the AI model learn the multi-stage design process, aiming to accommodate freeform user interactions and propose design suggestions at + +every stage. This allows designer inputs at different stages across a wide range of levels of detail, while offering the capability of fully automated generation. To address the challenge of missing procedural design data, we reverse-engineer the final design to obtain the stage-to-stage process, based on principles that are widely adopted by professional designers [29]. This enables us to design a Markov chain model to capture the full design procedure. Since there is more than one way to reverse-engineer the final designs (i.e., the stage order can vary), our model is designed with the capacity of accepting inputs with an arbitrary order, and consequently can learn the style variations implicitly from the data. + +While iPLAN is general, we focus on floorplan design in this paper. iPLAN has been validated on two large-scale benchmark datasets, i.e., RPLAN [36] and LIFULL [22], under diverse scenarios. The experiments show that our model is versatile in accepting designer inputs at various levels of detail, from minimal input and automatic generation, to stage-to-stage human guidance and interactive design. By learning from designs augmented by reverse-engineered processes, our model exhibits high fidelity in generating new designs with close style similarity and sufficient diversity. Finally, our model is highly flexible and generalizable when trained on varying amounts of data and facing unseen spaces and design requirements that are categorically different from the training data. + +Contributions: (i) We propose a novel human-in-the-loop generative model iPLAN which respects design principles and mimics the design styles of professional designers implicitly. (ii) We demonstrate a successful fine-grained stage-to-stage generative model for floorplan, as opposed to existing end-to-end approaches. (iii) We show a variety of design scenarios, including fully automated generation, interactive planning with user instructions, and generalization for unseen tasks; (iv) We conduct extensive evaluations on diverse benchmark datasets and demonstrate that iPLAN outperforms the state of the art under multiple metrics. + +# 2. Related Work + +Layout generation has been an active research area in computer vision, e.g., indoor scene synthesis [6, 24, 37, 39, 40] and floorplan generation [2, 9, 12, 25, 28, 36], image composition [1, 15], etc. Existing approaches can be generally grouped into two categories: handcrafted rule-based methods and data-driven methods. We mainly review the latter as they are closely related to our research. + +Indoor scene synthesis. The synthesis of indoor scenes typically involves the placement of furniture models from an existing database into a given room. Convolutional neural networks can be trained to iteratively insert one object at a time into a room for indoor scene generation [31, 35]. High-level scene semantics can also be employed, + +e.g., scene graphs, as a prior for a more controlled generation [34]. The biggest difference between indoor scene synthesis and floorplan generation is their requirements on the space partitioning. While indoor scene synthesis places objects in a room where the room itself does not need to be divided, floorplan normally requires explicit space division for different functionalities. + +Image composition from scene graphs. Another related field is image composition from scene graphs, where the task is to derive the scene from a layout graph that describes the locations and features of the objects. Such generation can be achieved by Generative Adversarial Networks (GANs) based on graph convolution [15]. Further improvements can be obtained by separating the layout from the appearance of the objects [1]. For more controllability, Li et al. [21] synthesize images from a scene graph and the corresponding image crops. In contrast to the floorplan, the challenge in image composition is how to compose different objects into an image rather than partitioning the space. + +Floorplan generation Floorplan generation can be formulated as an image synthesis problem which is one active research area in computer vision. Due to the surge of deep learning, the most promising approaches are GANs [3,7,16-19,38]. Image-based GANs have been proven effective in floorplan generation [4,13,14,30,41-43]. Graph-based GANs can also produce floorplans by only taking spacial constraints, such as room connections, room types, in the form of graph [26,27]. However, all these methods are end-to-end approaches, and therefore provide limited interactivity to the designer. + +More recently, some human-in-the-loop approaches are proposed. Wu et al. [36] propose a two-phase approach to produce floorplans of residential buildings. The model successively predicts locations of rooms and walls given a building boundary, and converts the predicted layout into a vector graphics format. Graph2Plan [12] combines the topology information in the form of graphs with spatial constraints, to instantiate rooms accordingly. These methods enable human interactions at certain stages, e.g., modifying room locations and retrieving the graph. Different from the existing methods, we propose a fine-grained generative model which enables interactions with the designer at different levels, from providing high-level design requirements to low-level instructions at a step. + +# 3. Methodology + +The overview of iPLAN is presented in Fig. 1. Without loss of generality, our model takes the space boundary as input, and decomposes the design procedure into: acquiring room types, locating rooms, and finalizing room partitions. Such workflow aims to mimic human designers [29] and accept designer inputs at any stage. The workflow is modeled as a joint probability distribution of all the afore + +![](images/37584f6b8e345164c61e064344d6ab5d28b4e6686977a205c1b078390d18edfb.jpg) +Figure 1. Overview of our framework iPLAN. Room types are predicted at a time, while room locations and partitions are predicted iteratively. + +mentioned factors, which is then factorized into stages and later formulated as a Markov chain (Sec. 3.1). Next, each factorized distribution provides a flexible entry point to incorporate user input or can be used for automatic generation (Sec. 3.2–Sec. 3.3). + +# 3.1. Problem Formulation + +A dataset of $H$ layouts is denoted by $\pmb{D} = \{\pmb{D}_i\}_{i=1}^H$ with the $i$ -th layout $\pmb{D}_i = (\pmb{B}_i, \pmb{R}_i, \pmb{T}_i, N_i, \pmb{C}_i)$ . $\pmb{B}_i \in \mathbb{R}^{128 \times 128}$ is the boundary, $N_i$ denotes the total number of rooms. We use $j$ to index a specific room. $\pmb{R}_i = \{\pmb{r}_{i,j}\}_{j=1}^{N_i}$ denotes the room regions with $\pmb{r}_{i,j} \in \mathbb{R}^4$ indicating the top-left and bottom-right corners of the bounding box of the room. $\pmb{T}_i = \{t_{i,j}\}_{j=1}^{N_i}$ is a set of room types $t_{i,j} \in \mathbb{Z}^+$ . $\pmb{C}_i = \{\pmb{c}_{i,j}\}_{j=1}^{N_i}$ is a set of room centers $c_{i,j} \in \mathbb{R}^2$ . Given $\pmb{D}$ , we aim to design a generative model for $\mathcal{P}(\pmb{D}) = \prod_{i=1}^H \mathcal{P}(\pmb{D}_i)$ . + +Similarly to existing methods, we also formulate floor-plan design as an image generation problem, but with our focus on proposing a fine-grained generative model to enable human-in-the-loop interaction, through decomposing $\mathcal{P}(D)$ appropriately. From a mathematical perspective, there are many ways to decompose $\mathcal{P}(D)$ . In order to allow human inputs across various levels of detail, we rely on design principles and widely adopted practice [29] to mimic the human design workflow, and naturally divide a floorplan design procedure into several stages. First, the desired number of rooms and their types are determined. Next, locations of areas with specific functionality (e.g., living rooms, bedrooms) are roughly estimated. Finally, room partitioning is conducted to finalize the design. This design diagram serves as a strong inductive bias in our model, following which $\mathcal{P}(D)$ is decomposed into: + +$$ +\begin{array}{l} \mathcal {P} (\boldsymbol {D}) = \prod_ {i = 1} ^ {H} \mathcal {P} (\boldsymbol {D} _ {i}) = \prod_ {i = 1} ^ {H} \mathcal {P} (\boldsymbol {R} _ {i}, \boldsymbol {C} _ {i}, \boldsymbol {T} _ {i}, N _ {i}, \boldsymbol {B} _ {i}) \\ = \prod_ {i = 1} ^ {H} \mathcal {P} \left(\boldsymbol {R} _ {i} \mid \boldsymbol {C} _ {i}, \boldsymbol {T} _ {i}, N _ {i}, \boldsymbol {B} _ {i}\right) \mathcal {P} \left(\boldsymbol {C} _ {i} \mid \boldsymbol {T} _ {i}, N _ {i}, \boldsymbol {B} _ {i}\right) \tag {1} \\ \mathcal {P} (\boldsymbol {T} _ {i}, N _ {i} | \boldsymbol {B} _ {i}) \mathcal {P} (\boldsymbol {B} _ {i}) \\ \end{array} +$$ + +where $\mathcal{P}(\pmb {B}_i)$ accounts for the boundary known a priori; $\mathcal{P}(\pmb {T}_i,N_i|\pmb {B}_i)$ is to infer the desired number of rooms and + +room types; $\mathcal{P}(\pmb {C}_i|\pmb {T}_i,N_i,\pmb {B}_i)$ and $\mathcal{P}(\pmb {R}_i|\pmb {C}_i,\pmb {T}_i,N_i,\pmb {B}_i)$ respectively correspond to the coarse and fine designs of the layout, where the former estimates the room locations while the latter predicts the exact partitions. A visualization of Eq. (1) is provided in Figure 1, where the second, third and fourth blocks correspond to $\mathcal{P}(\pmb {T}_i,N_i|\pmb {B}_i)$ $\mathcal{P}(\pmb {C}_i|\pmb {T}_i,N_i,\pmb {B}_i)$ and $\mathcal{P}(\pmb {R}_i|\pmb {C}_i,\pmb {T}_i,N_i,\pmb {B}_i)$ , respectively. + +Inspired by indoor scene synthesis where objects are placed iteratively [31, 35], we assume rooms are designed one by one. Formally, we model $P(\pmb{R}_i | \pmb{C}_i, \pmb{T}_i, N_i, \pmb{B}_i)$ and $\mathcal{P}(\pmb{C}_i | \pmb{T}_i, N_i, \pmb{B}_i)$ as Markov chains, i.e., designs are conducted in a step-wise manner and early decisions will affect later ones, which allows a designer to focus on one room at a time and give guidance at any step: + +$$ +\begin{array}{l} \mathcal {P} \left(\boldsymbol {C} _ {i} \mid \boldsymbol {T} _ {i}, N _ {i}, \boldsymbol {B} _ {i}\right) = \prod_ {j = 1} ^ {N _ {i}} \mathcal {P} \left(\boldsymbol {c} _ {i, j} \mid \boldsymbol {c} _ {i, < j}, t _ {i, j}, N _ {i}, \boldsymbol {B} _ {i}\right) (2) \\ \mathcal {P} \left(\boldsymbol {R} _ {i} \mid \boldsymbol {C} _ {i}, \boldsymbol {T} _ {i}, N _ {i}, \boldsymbol {B} _ {i}\right) = \prod_ {j = 1} ^ {N _ {i}} \mathcal {P} \left(\boldsymbol {r} _ {i, j} \mid \boldsymbol {r} _ {i, < j}, \boldsymbol {c} _ {i, j}, t _ {i, j}, N _ {i}, \boldsymbol {B} _ {i}\right) (3) \\ \end{array} +$$ + +where $\pmb{r}_{i, < j} = \{\pmb{r}_{i,1}, \dots, \pmb{r}_{i,j-1}\}$ and $\pmb{c}_{i, < j} = \{\pmb{c}_{i,1}, \dots, \pmb{c}_{i,j-1}\}$ denote the set of allocated room partitioning and centers before the $j$ -th room, respectively. + +Connections to existing research. Eq. (1)-(3) is a generalization of existing methods and is more fine-grained. Graph2Plan [12] simultaneously determines $C_i$ , $T_i$ and $N_i$ given $B_i$ , and then $\mathcal{P}(R_i|C_i, T_i, N_i, B_i)$ is predicted. RPLAN [36] estimates $\mathcal{P}(C_i, T_i, N_i|B_i)$ via predicting $\mathcal{P}(c_{i,j}, t_{i,j}|c_{i,j+1}, t_{i,j+1}, B_i)$ consecutively, and then indirectly estimates room areas $R_i$ by locating walls. In contrast, we further decompose $\mathcal{P}(C_i, T_i, N_i|B_i)$ into $\mathcal{P}(T_i, N_i|B_i)$ and $\mathcal{P}(C_i|T, N_i, B_i)$ , and further decompose the latter using Eq. (2). Moreover, $\mathcal{P}(R_i|C_i, T_i, N_i, B_i)$ is also decomposed into multiple steps by Eq. (3). Our decompositions bring a more fine-grained procedural generative model that allows for user interactions at arbitrary steps. This enables more flexible and closer human-AI interactions. For the sake of brevity, we omit the subscripts $i$ of $T_i, N_i, B_i$ and $C_i$ in the following sections. + +# 3.2. The Number and Types of Rooms + +$\pmb{T}$ and $N$ are normally given beforehand. However, given a specific $\pmb{B}$ , the design might not be unique, e.g., the same space can be designed as a 2-bed or 3-bed flat. In other words, there exists a distribution of possible designs. Thus, we propose to learn their distributions $\mathcal{P}(\pmb{T}, N|\pmb{B})$ from real designs by professional designers to enable automatic exploration. $\{\pmb{T}, N\}$ can be replaced by a random variable $\pmb{Q} = \{q_k\}_{k=1}^K$ , where $K$ denotes the number of room types in $\pmb{D}$ and $q_k$ corresponds to the number of rooms + +![](images/4961a483f9ae1fb89b21844359426462000af9fb8ae6b6d720d0a8de611c5f53.jpg) +Figure 2. Prediction of a room center at one step + +under the $k$ -th type. So, we model $P(\mathbf{Q}|\mathbf{B})$ instead. + +We propose a boundary-conditioned Variational Autoencoder (BCVAE) based on VAE [32] where $B$ serves as a condition. The model consists of an embedding module $\mathcal{F}_{ed}$ , an encoder $\mathcal{F}_{en}$ and a decoder $\mathcal{F}_{de}$ . By feeding $\mathcal{F}_{ed}$ with $B$ , it outputs an embedded vector $\boldsymbol{\gamma} \in \mathbb{R}^{128}$ . Also, $\{\pmb{\mu}, \pmb{\Sigma}\} = \mathcal{F}_{en}(\pmb{Q}, \boldsymbol{\gamma})$ where $\pmb{\mu} \in \mathbb{R}^{32}$ and $\pmb{\Sigma} \in \mathbb{R}^{32 \times 32}$ are the mean and covariance of a Gaussian distribution. Furthermore, a latent variable $z$ is sampled from $\mathcal{N}(\pmb{\mu}, \pmb{\Sigma})$ using the reparameterization trick [20]. Given $z$ and $\boldsymbol{\gamma}$ , we reconstruct $\pmb{Q}$ by $\hat{\pmb{Q}} = \mathcal{F}_{de}(z, \boldsymbol{\gamma})$ . We employ a standard VAE loss for training. The detailed network architecture and the training loss are discussed in the supplementary material. + +During inference, for a new boundary $\pmb{B}$ , we sample $\pmb{z}$ from $\mathcal{N}(\mathbf{0},\pmb{I})$ and predict $\hat{\pmb{Q}}$ by $\hat{\pmb{Q}} = \mathcal{F}_{de}(\pmb{z},\mathcal{F}_{ed}(\pmb{B}))$ which is then used to recover $\hat{T}$ and $\hat{N}$ . + +# 3.3. Locating Rooms + +Locating room regions $\mathcal{P}(\pmb {C}|\pmb {T},\pmb {N},\pmb {B})$ plays an essential role in the design process. Similarly to [36], we model room region prediction as a step-wise classification task. At each step, given a multi-channel image representation of the current design state and the next desired room type $t_j$ , we predict the center of the next room. The multi-channel image encodes the boundary $\pmb{B}$ and all previously predicted room centers $c_{< j}$ . The image consists of $K + 4$ binary channels, three of which label $\pmb{B}$ , i.e., the boundary, the front door and the interior area pixels. $K$ channels represent the predicted room centers, with each channel corresponding to a room type. For each room, its center is represented by a $9\times 9$ square of pixels with value 1. We also use a channel to summarize the centers of all predicted rooms. Regarding the desired room type $t_j$ , we convert it into a one-hot vector. + +We feed the multi-channel representation to a Resnet-18 [10] network and the one-hot vector of the desired room type to an embedding network to extract features. The embedding network has three fully-connected layers, followed by four convolution blocks, a Batch Normalization Layer and a LeakyReLU Layer. The extracted features are concatenated and subsequently fed to a decoder module that contains 4 atrous spatial pyramid pooling (ASPP) [5], a Convolutional block and a Deconvolutional block. The output is $\mathbf{O} \in \mathbb{R}^{(K + 3)\times 128\times 128}$ , giving a probability vector of + +![](images/a20d9f50019a6de6656860b6f67d301c41321dbf907c9180ab1e41774c5eaf85.jpg) +Figure 3. Procedural room shape generation + +all pixels. For each pixel, we predict $K + 3$ labels, i.e., $K$ room types and EXISTING, FREE, and OUTSIDE, where EXISTING, FREE and OUTSIDE indicate whether a pixel belongs to an existing room, a free space (in the interior of the boundary) and the exterior, respectively. The whole model is shown in Figure 2. + +For training, we predict one room at a time, by decomposing the final design into a series of design states with one room added at each stage. However, there are multiple possible sequences for a given final design and the ground-truth step-to-step decisions are unavailable. Therefore, we employ a stochastic training process to learn all possible sequences by randomly removing rooms from a design. We propose a pixel-wise cross-entropy loss: + +$$ +\mathcal {L} = \sum_ {h = 1} ^ {1 2 8} \sum_ {w = 1} ^ {1 2 8} - \omega_ {y} \log \frac {\exp \left(O _ {y , h , w}\right)}{\sum_ {k = 1} ^ {K + 3} \exp \left(O _ {k , h , w}\right)}, \tag {4} +$$ + +where $y$ is the ground-truth class index for the pixel located at $(h, w)$ . $\omega_y$ represents the weight of $y$ -th label, we set it to be 2 for $K$ room types and 1.25 for the other three labels. + +During the inference phase, for a sequence of room types $\pmb{T} = \{t_1,t_2,\dots ,t_N\}$ we first predict the room center for $t_1$ , i.e., $\mathcal{P}(c_{1}|t_{1},N,B)$ , then we update the current design state using this predicted center $\hat{c}_1$ and continue to predict the next room center for $t_2$ , i.e., $\mathcal{P}(c_2|\hat{c}_1,t_2,N,B)$ . This procedure is repeated until all centers $\hat{C}$ are determined. Note that when the order of elements in $T$ varies, its corresponding layout can also change, thus providing design diversity. Also, at any intermediate step, user input (e.g., adjust a room center) can be incorporated into our model before it predicts the next room center. + +# 3.4. Predicting Room Partitioning + +After predicting the room centers $\hat{C}$ , we are ready for detailed room partitioning $\mathcal{P}(\boldsymbol{R}|\hat{\boldsymbol{C}},\hat{\boldsymbol{T}},\hat{\boldsymbol{N}},\boldsymbol{B})$ , where we need to consider the room size and the room shape. The room size is directly related to the specific functionality of the room, e.g., living rooms are normally larger than bathrooms for social interactions. The shape is affected by the functionality too but also strongly affected by the boundary geometry and the inner walls. Further, there is usually no 'optimal' solution but a distribution of near-optimal solutions + +when looking at the final designs. Since the distribution can be arbitrary, we propose a new Generative Adversarial Network (GAN) to model the step-wise prediction of room partitioning. The general model is shown in Figure 3. Instead of directly predicting the shape of each room, we first predict its bounding box. This allows the bounding box predicted at a later stage to grab the space that is already allocated. We find this is a straightforward yet effective way to generate non-box rooms. + +Generator: The generator begins with a bounding-box regressor $\mathcal{F}_b$ that outputs the top-left and bottom-right corners of the box. $\mathcal{F}_b$ consists of six convolutional units and two fully connected layers, each unit with a Convolution layer, a Layer-Normalization layer and a ReLU layer. $\mathcal{F}_b$ enables the designer to interact with the system easily, e.g., relocating a room, modifying a room bounding box. However, only predicting the corners of bounding boxes is not convenient. We want to label all the pixels within the box so that we can work in the image space consistently. So we design a tailor-made masking module $\mathcal{F}_m$ to map each room bounding box into a room mask image. $\mathcal{F}_m$ contains six convolution layers with $3\times 3$ kernel, followed by a Sigmoid activation function. + +For a given sequence of room centers and types $\{(c_1,t_1),(c_2,t_2),\ldots ,(c_N,t_N)\}$ , we use $\mathcal{F}_b$ to predict the coordinates $\hat{\pmb{r}}_1$ of the bounding box of the first room specified by $c_{1}$ and $t_1$ , where $\hat{r}_1 = \mathcal{F}_b(S_0,c_1,t_1)$ with $S_0 =$ $\pmb{B}$ . Furthermore, we obtain the room mask using $\hat{M}_{1} =$ $\mathcal{F}_m(\hat{r}_1)\in \mathbb{R}^{128\times 128}$ . The output of the generator at the first step is computed by + +$$ +\hat {\boldsymbol {S}} _ {1} = \boldsymbol {S} _ {0} \times (\mathbf {1} - \hat {\boldsymbol {M}} _ {1}) + \hat {\boldsymbol {M}} _ {1} \times t _ {1}, \tag {5} +$$ + +where $\mathbf{1} \in \mathbb{R}^{128 \times 128}$ represents a matrix with all elements being 1. During the prediction in the second step, the generator takes as input $\hat{\pmb{S}}_1$ , $\pmb{c}_2$ , $t_2$ and outputs $\hat{\pmb{S}}_2 = \hat{\pmb{S}}_1 \times (\mathbf{1} - \hat{\pmb{M}}_2) + \hat{\pmb{M}}_2 \times t_2$ with $\hat{\pmb{M}}_2 = \mathcal{F}_m(\hat{\pmb{r}}_2) = \mathcal{F}_m\big(\mathcal{F}_b(\hat{\pmb{S}}_1,\pmb{c}_2,t_2)\big)$ . The same procedure is iterated (for totally $\hat{N}$ steps) until the entire design is accomplished. + +Discriminator: The discriminator retains the similar backbone as $\mathcal{F}_b$ in the generator, except that the last two convolution layers are dropped. The discriminator is employed to distinguish whether a sequence of design states comes from the generator or the ground truth. Specifically, a sequence of predicted design states $\hat{\pmb{S}} = \{\hat{\pmb{S}}_1,\hat{\pmb{S}}_1,\dots ,\hat{\pmb{S}}_{\hat{N}}\}$ should be recognized as 'FALSE', while a sequence from the ground truth with the same order of room types (i.e., $\{t_1,t_2,\ldots ,t_{\hat{N}}\}$ ) should be predicted as 'TRUE'. + +For training, we define a loss on top of WGAN-GP [8] loss, i.e., + +$$ +\begin{array}{l} \mathcal {L} = \mathbb {E} _ {\hat {\boldsymbol {S}} \sim \mathbb {P} _ {g}} [ D (\hat {\boldsymbol {S}}) ] - \mathbb {E} _ {\boldsymbol {S} \sim \mathbb {P} _ {r}} [ D (\boldsymbol {S}) ] \tag {6} \\ + \lambda_ {1} \mathbb {E} _ {\bar {S} \sim \mathbb {P} _ {\bar {S}}} (| | \bigtriangledown_ {\bar {S}} D (\bar {S}) | | _ {2} - 1) ^ {2} + \lambda_ {2} \mathcal {L} _ {s}, \\ \end{array} +$$ + +where $\mathbb{P}_g$ and $\mathbb{P}_r$ represent the generated and real data distribution, respectively. $\bar{\boldsymbol{S}}\sim \mathbb{P}_{\bar{\boldsymbol{S}}}$ denotes a random interpolation between $\hat{\boldsymbol{S}}$ and $S$ , and is used for a gradient penalty with $\lambda_1 = 10$ . $||\cdot ||_2$ is the $\ell_2$ -norm. The last term is introduced to explicitly regularize the bounding boxes with $\lambda_{2} = 100$ : + +$$ +\mathcal {L} _ {s} = \sum_ {j = 1} ^ {N} l _ {j}, \quad l _ {j} = \left\{ \begin{array}{c c} 0. 5 \left(\boldsymbol {r} _ {j} - \hat {\boldsymbol {r}} _ {j}\right), & \text {i f} \| \boldsymbol {r} _ {j} - \hat {\boldsymbol {r}} _ {j} \| _ {1} < 1 \\ \| \boldsymbol {r} _ {j} - \hat {\boldsymbol {r}} _ {j} \| _ {1} - 0. 5, & \text {o t h e r w i s e} \end{array} \right. \tag {7} +$$ + +where $\boldsymbol{r}_j$ is the ground truth and $||\cdot||_1$ is the $\ell_1$ -norm. + +At the inference stage, our procedural model predicts room areas in a step-wise manner, which hence allows user input at an arbitrary intermediate step, such as modifying room types, changing room centers or even the already predicted room areas. Gaps may exist between the predicted rooms. Thus, we employ a simple post-processing step as in [33] and detail it in the supplementary material. + +# 4. Experiments + +# 4.1. Datasets + +We conduct experiments on two commonly used datasets, RPLAN [36] and LIFULL [22]. RPLAN is collected from the real-world residential buildings in the Asian real estate market, which contains over 80k floorplans and 13 types of rooms1. All floorplans in RPLAN are axis-aligned and pre-processed to the same scale. The training-validation-test split of the dataset is $70\% - 15\% - 15\%$ [12]. LIFULL HOME's dataset offers approximately five million apartment floorplans from the Japanese house market. The original dataset is given in the form of images, but a subset has been parsed into vector format by [23]. We select a subset with 4–10 rooms. This specific dataset consists of approximately 54k floorplans and 9 room types2, among which $85\%$ (randomly sampled) of the data serves as the training set while the remaining for testing. + +# 4.2. Metrics + +Although each floorplan only contains one design (i.e., one boundary corresponds to one design), our model can predict the distribution of plausible designs, offering design diversity and alternative choices. To evaluate the predicted distribution, we employ the Fréchet Inception Distance (FID) [11] to calculate the distance between two distributions, which was also used in floorplan generation [26,27]. Built on FID, we introduce three metrics $FID_{img}$ , $FID_{area}$ and $FID_{type}$ : (i) $FID_{img}$ : computed on rendered images to evaluate the distributional differences of + +
DatasetMethodFIDimgFIDareaFIDtype
RPLANHouseGAN++51.331.36 × 1080.038
Rplan4.12.29 × 1050.58
OurIII1.223.13 × 1040.05
OurII0.721.09 × 1040.03
Rplan*0.118.62 × 1036.4 × 10-3
Graph2Plan0.628.82 × 1032.70 × 10-4
OurI0.164.89 × 1024.44 × 10-6
LIFULLRplan50.194.29 × 1065.15
OurIII37.359.81 × 1052.52
OurII32.657.75 × 1052.14
Rplan*1.435.62 × 1050.064
Graph2Plan0.642.87 × 1032.63 × 10-5
OurI0.382.07 × 1033.59 × 10-6
+ +Table 1. FID-based metrics on RPLAN and LIFULL. + +the generated and true images. (ii) $FID_{area}$ : to evaluate the distributional differences of room areas. Each layout is represented by a $1 \times K$ vector $area_i$ , with its $k$ -th element $area_{i,k}$ representing the average area of the $k$ -th type of rooms in the $i$ -th floorplan. $K$ denotes the number of room types. (iii) $FID_{type}$ : to calculate the distributional differences of room numbers against room types. Each layout is represented by a $1 \times K$ vector $type_i$ , whose element $type_{i,k}$ represents the number of rooms under the $k$ -th type in the $i$ -th floorplan. It is worthwhile to mention that the above three metrics are not biased towards our method as they are not involved in the training process at all. + +# 4.3. Baselines + +We choose three methods as baselines. Rplan3 [36] is an image-based method, which outputs a floorplan given a boundary. We further use a variant of Rplan, named Rplan*, which also takes as input the room types and centers. HouseGAN++ [27] is a graph-constrained approach, which treats rooms as nodes and requires node types and connectivity as input. It generates mask images for all nodes according to the graph, then blends them to form the layout. Graph2plan [12] requires a boundary and a room relation graph as input, where the graph includes information on room size, room center, room type and their connections. All floorplans are rendered in the same way as [12], including door and window placements. + +# 4.4. Quantitative Evaluations + +Ablation Study. iPLAN is capable of fully automated generation while allowing for user interactions at different stages. Based on the amount of information received from the designer, three variants are evaluated: (v1) $\text{Our}_I$ takes as input the boundary, room types, and room centers; (v2) $\text{Our}_{II}$ takes as input the boundary and room + +types; (v3) $\text{Our}_{II}$ takes as input only the boundary. The variants show different levels of automation/user interactivity, demonstrating iPLAN's flexibility when the depth of human involvement varies, from little human input (e.g., iPLAN freely explores designs), to step-to-step guidance (e.g., where to put each room). The implementation details are in the supplementary document. Table 1 shows the results. iPLAN achieves good results on all three settings, among which $\text{Our}_I$ achieves the best results and $\text{Our}_{II}$ is better than $\text{Our}_{III}$ . This is natural as more prior information helps for better prediction. Considering RPLAN and LIFULL are significantly different in terms of the overall shapes of boundaries and rooms, iPLAN can indeed handle different data distributions well. + +Comparisons on RPLAN iPLAN in general outperforms all baseline methods by large margins shown in Table 1. Looking closely, HouseGAN++ achieves worse results, except $FID_{type}$ with a small margin, than other methods. The reason is that its layouts are not bounded by boundaries. By taking the boundary as input, both Rplan and Our $_{III}$ predict room centers and regions successively, but Our $_{III}$ outperforms Rplan on all three metrics. Furthermore, when both the boundary and room types are given, Our $_{II}$ outperforms the first three methods. Finally, Rplan*, Graph2Plan and Our $_{I}$ are given the full information (boundary, room types and centers). Our $_{I}$ further improves on all metrics, where Rplan* achieves a slightly better score on $FID_{img}$ . We observe that the step-wise prediction in iPLAN is less likely to generate partitioning ambiguity (allocating a space to multiple rooms), while is observed in Rplan*. Also, learning conditional probabilities (as iPLAN does) as oppose to a joint probability of multiple factors from final designs (as Rplan* and Graph2Plan do) is easier, where the decomposition of final designs can be seen as a data augmentation strategy. + +Comparisons on LIFULL Similar comparisons have been done on LIFULL (Table 1). We skip HouseGAN++ because it needs door locations in the input but there is no such data in LIFULL. Compared with Rplan*, Our $_I$ and Graph2Plan, room centers are not provided as priors for Rplan, Our $_{III}$ and Our $_{II}$ , leading to a large performance gap between these two groups. It is understandable because LIFULL is more challenging/heterogeneous with multi-scale samples and nested rooms. Next, Our $_{II}$ outperforms Our $_{III}$ on all three metrics because more prior knowledge (i.e., room types) is given, and both are better than Rplan. Furthermore, when the room centers are provided, inaccurate wall prediction affects Rplan*. Different from the results on RPLAN, Graph2Plan outperforms Rplan* on LIFULL. This is because Graph2Plan takes spacial room relations as input which is more robust for such a multi-scale dataset. Our $_I$ is still better than Rplan* and Graph2Plan. Therefore, we can conclude that, when the + +![](images/044cd633abd665c037af10f5b086ac1ac619a10064ab4c7c124651d4abeec9fe.jpg) +Figure 4. Qualitative comparisons. Shaded areas indicate design choices that are questionable and unobserved in data. + +same amount of prior knowledge is given, iPLAN achieves the best performance. + +# 4.5. Qualitative Evaluation + +To show intuitive results, qualitative comparisons are given in Figure 4. Each color represents one room type (see color indication in Fig. 5). The shaded boxes indicate questionable design areas. Specifically, in the first row, Rplan designs an isolated bathroom at a corner in the first image, which is a strange design and not observed in the data. In the second row, the first image by Rplan allocates an unreasonable space (shaded) to the public area, which however should be assigned to the neighboring bedroom. Similarly, the layout produced by Graph2Plan consists of 3 bedrooms (second row), but the bathroom is embedded among them (shaded), which means people need to pass through one bedroom to go to the toilet. Besides, the bathroom is too small. As for the last row, the room area is not properly predicted by Graph2plan because the region (shaded) at the bottom-left corner is too narrow. + +By comparing $\mathrm{Our}_I$ , $\mathrm{Our}_{II}$ and $\mathrm{Our}_{III}$ , it is apparent that $\mathrm{Our}_I$ is closest to GT as a result of the strong input constraints. In contrast, when less constraints are imposed, the diversity is significant, as depicted in $\mathrm{Our}_{II}$ and $\mathrm{Our}_{III}$ . More results and analysis are shown in the supplementary material. + +# 4.6. User Interactions + +The performance of iPLAN under different levels of human interactions is showcased in Figure 5. Figure $5(a)$ is fully automated generation without human input other than a boundary. iPLAN can generate diverse layouts, with a varying number of rooms and different room types/areas. Figure $5(b)$ shows the user can decide the room types, where the final layouts are different when the order of room types varies, showing the flexibility of iPLAN. We further provide iPLAN with more priors in Fig. $5(c)$ , i.e., the bound- + +
DatasetMethodFIDimgFIDareaFIDtype
RPLANOur8I1.21.36 × 1040.06
Our8I0.22.69 × 1021.25 × 10-5
Our8I~82.284.87 × 1040.18
Our8I~80.246.89 × 1021.54 × 10-5
+ +Table 2. Generalization results on RPLAN. + +ary, room types and centers, leading to a planned layout that is nearly the same as the ground truth. We also evaluate iPLAN by introducing a user input at an intermediate step (Fig. 5(d)), where the balcony is moved to the left and consequently a different layout is obtained. Figure 5 demonstrates the interactive ability of iPLAN, which is crucial in settings where the designer leads the design. + +# 4.7. Generalizability + +Quantitative results To further push iPLAN, we quantitatively evaluate the generalizability of iPLAN by setting up two groups of experiments on RPLAN. In the first group, we select 51322 layouts consisting of $4 \sim 7$ rooms for training and randomly choose 12,000 8-room layouts for testing. In the second group, we consider a more challenging task by randomly selecting 26574 layouts containing $4 \sim 6$ rooms for training and 12000 layouts containing $7 \sim 8$ rooms for testing. Note that in both experiments, the layouts for test include more rooms than the ones used for training. + +Quantitative results are reported in Table 2. Again, we can observe that $\mathrm{Our}_I$ outperforms $\mathrm{Our}_{II}$ , which is consistent with our intuition since more prior knowledge is provided to $\mathrm{Our}_I$ . Further, the results in first group are better than those in the second group, which is reasonable because the generalization setting in the second group is more challenging. However, both groups achieve comparable performance to Table 1 and still outperform the baselines. + +Qualitative Results An interesting test is to see if iPLAN trained on RPLAN can be generalized to unseen types of boundaries. The qualitative results are also pro + +![](images/4d5a1c3f8a727cd9a4f2bdfba095abfb38a3bc79ae1aca06a6109d62531d22da.jpg) +Input + +GT +![](images/145811a11126359456102d7d6acdf3613c9b22c46271ccab074ea4aa061381b5.jpg) +: Human input + +![](images/e3daa94d0107ef83c95ef85eafb455929c566d840bb5ae088959fc199bce4bc3.jpg) + +![](images/8b2883f6b78c480a7ea5a89b55cae49754c2d99704814ccd5f599496df3a7292.jpg) + +![](images/676d243be4f2d581ebe51f4e75de43e98b75b884515d4406484e05d7446c519a.jpg) + +![](images/a86f8bcfdf66c57d40794ab19e02b93fc1502c8e3f0935cfe60b8a05d7f6b46f.jpg) + +![](images/bb532270882e5052abd62deba3f7795622212905e55a36256ccc854a02244f5b.jpg) + +![](images/89da12fd151930aa1de4906073841f211f4e58bdaa796f19591706fb6f5ab9dd.jpg) +Public Area + +![](images/69dde06f1b07307519c8fc6112621621719486f75779a0df671c501acf9ab00a.jpg) + +![](images/462f4444365c75cf507575c0a62ce1b972de5822013f7dcb115bd60dd6cddcb7.jpg) + +Figure 5. User interactions. (a)-(c) indicate interactions via providing different levels of human input; (d) shows fine-grained interaction in a step-wise generation. +![](images/b24f995b59a761e1471806cd609a36fe78ef21cc718b7585eb7089562b6266e1.jpg) +$\odot$ Bedroom +Kitchen +$\odot$ Bathroom +$\odot$ Balcony +Storage + +![](images/c832f3a99ebff10e314afb49073c83da7de50a3da794e419df674a60c8cca92a.jpg) +Figure 6. Layouts with non-axis aligned edges. Left: successful examples. Right: Rplan fails but our model succeeds. + +vided to verify the generalizability of iPLAN. Note that RPLAN only contains layouts with straight axis-aligned edges in the boundaries, so we consider the boundaries with non-axis aligned edges and curves. Since HouseGAN++ cannot design a layout for a specific building boundary and Graph2Plan is restricted to boundaries with axis-aligned edges, we only compare iPLAN with Rplan. + +Figure 6 shows several examples of non-axis aligned design produced by Rplan and iPLAN. The left lists four successful cases on both approaches and the right shows two examples where Rplan fails but iPLAN succeeds. Even when successful, Rplan often predicts isolated rooms which divide the public areas into strange shapes and reduce their usability (the first two examples), while iPLAN utilizes the space better. As for the failures of Rplan, we give two examples of room center estimation and wall prediction, where it fails to reasonably fill and partition the space, a problem from which iPLAN does not suffer. Please refer to the supplementary document for more examples. + +# 5. Limitation & Conclusion + +While iPLAN is able to handle some irregular boundaries, it cannot cope with extremely irregular ones. One important future direction would be to handle complex environments, e.g., non-axis aligned boundaries and compound and nested rooms, which is crucial to generalize iPLAN to public spaces such as train stations and shopping malls. + +In this paper, we proposed a novel human-in-the-loop generative model iPLAN to learn professional designs in a stage-to-stage fashion while respecting design principles. While being capable of fully automated generation, iPLAN allows close interactions with humans by accepting user guidance at every stage and automatically suggesting possible designs accordingly. Comprehensive evaluations on two benchmark datasets RPLAN and LIFULL show that iPLAN outperforms the state-of-the-art methods, both quantitatively and qualitatively. Importantly, iPLAN has exhibited strong generalization capability to unseen design tasks and boundary inputs. + +Acknowledgements: In this paper, we used "LIFULL HOME'S Snapshot Data of Rentals" provided by LIFULL Co., Ltd. via IDR Dataset Service of National Institute of Informatics. We thank Jing Li for her input on the design practice. This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 899739 CrowdDNA and the Marie Skłodowska-Curie grant agreement No 101018395. Feixiang He has been supported by UKRI PhD studentship [EP/R513258/1, 2218576]. + +# References + +[1] Oron Ashual and Lior Wolf. Specifying object attributes and relations in interactive scene generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4561-4569, 2019. 2 +[2] Fan Bao, Dong-Ming Yan, Niloy J Mitra, and Peter Wonka. Generating and exploring good building layouts. ACM Transactions on Graphics (TOG), 32(4):1-10, 2013. 2 +[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018. 2 +[4] Stanislas Chaillou. Archigan: Artificial intelligence x architecture. In Architectural intelligence, pages 117-127. Springer, 2020. 2 +[5] 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. 4 +[6] Matthew Fisher, Daniel Ritchie, Manolis Savva, Thomas Funkhouser, and Pat Hanrahan. Example-based synthesis of 3d object arrangements. ACM Transactions on Graphics (TOG), 31(6):1-11, 2012. 2 +[7] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014. 2 +[8] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. 5 +[9] Mikako Harada, Andrew Witkin, and David Baraff. Interactive physically-based manipulation of discrete/continuous models. In Proceedings of the 22nd annual conference on Computer graphics and interactive techniques, pages 199-208, 1995. 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. 4 +[11] 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. Advances in neural information processing systems, 30, 2017. 5 +[12] Ruizhen Hu, Zeyu Huang, Yuhan Tang, Oliver Van Kaick, Hao Zhang, and Hui Huang. Graph2plan: Learning floor-plan generation from layout graphs. ACM Transactions on Graphics (TOG), 39(4):118-1, 2020. 1, 2, 3, 5, 6 +[13] 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. 2 +[14] 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 +[15] Justin Johnson, Agrim Gupta, and Li Fei-Fei. Image generation from scene graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1219–1228, 2018. 2 +[16] 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. 2 +[17] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. arXiv preprint arXiv:2006.06676, 2020. 2 +[18] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4401-4410, 2019. 2 +[19] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8110-8119, 2020. 2 +[20] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 4 +[21] Yikang Li, Tao Ma, Yeqi Bai, Nan Duan, Sining Wei, and Xiaogang Wang. Pastegan: A semi-parametric method to generate image from scene graph. Advances in Neural Information Processing Systems, 32:3948-3958, 2019. 2 +[22] Ltd. LIFULL Co. Lifull home's snapshot data of rentals, nov 2015. 1, 2, 5 +[23] Chen Liu, Jiajun Wu, Pushmeet Kohli, and Yasutaka Furukawa. Raster-to-vector: Revisiting floorplan transformation. In Proceedings of the IEEE International Conference on Computer Vision, pages 2195-2203, 2017. 5 +[24] Paul Merrell, Eric Schkufza, Zeyang Li, Maneesh Agrawala, and Vladlen Koltun. Interactive furniture layout using interior design guidelines. ACM transactions on graphics (TOG), 30(4):1-10, 2011. 2 +[25] Pascal Müller, Peter Wonka, Simon Haegler, Andreas Ulmer, and Luc Van Gool. Procedural modeling of buildings. In ACM SIGGRAPH 2006 Papers, pages 614-623. 2006. 2 +[26] Nelson Nauata, Kai-Hung Chang, Chin-Yi Cheng, Greg Mori, and Yasutaka Furukawa. House-gan: Relational generative adversarial networks for graph-constrained house layout generation. In European Conference on Computer Vision, pages 162-177. Springer, 2020. 1, 2, 5 +[27] Nelson Nauata, Sepidehsadat Hosseini, Kai-Hung Chang, Hang Chu, Chin-Yi Cheng, and Yasutaka Furukawa. Housegan++: Generative adversarial layout refinement networks. arXiv preprint arXiv:2103.02574, 2021. 1, 2, 5, 6 +[28] Chi-Han Peng, Yong-Liang Yang, and Peter Wonka. Computing layouts with deformable templates. ACM Transactions on Graphics (TOG), 33(4):1-11, 2014. 2 +[29] Roberto J Rengel. The interior plan: Concepts and exercises. A&C Black, 2011. 1, 2, 3 +[30] Elad Richardson, Yuval Alaluf, Or Patashnik, Yotam Nitzan, Yaniv Azar, Stav Shapiro, and Daniel Cohen-Or. Encoding + +in style: a stylegan encoder for image-to-image translation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2287-2296, 2021. 2 +[31] Daniel Ritchie, Kai Wang, and Yu-an Lin. Fast and flexible indoor scene synthesis via deep convolutional generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6182-6190, 2019. 2, 3 +[32] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. Advances in neural information processing systems, 28:3483-3491, 2015. 4 +[33] Chun-Yu Sun, Qian-Fang Zou, Xin Tong, and Yang Liu. Learning adaptive hierarchical cuboid abstractions of 3d shape collections. ACM Transactions on Graphics (TOG), 38(6):1-13, 2019. 5 +[34] Kai Wang, Yu-An Lin, Ben Weissmann, Manolis Savva, Angel X Chang, and Daniel Ritchie. Planit: Planning and instantiating indoor scenes with relation graph and spatial prior networks. ACM Transactions on Graphics (TOG), 38(4):1-15, 2019. 2 +[35] Kai Wang, Manolis Savva, Angel X Chang, and Daniel Ritchie. Deep convolutional priors for indoor scene synthesis. ACM Transactions on Graphics (TOG), 37(4):1-14, 2018. 2, 3 +[36] Wenming Wu, Xiao-Ming Fu, Rui Tang, Yuhan Wang, YuHao Qi, and Ligang Liu. Data-driven interior plan generation for residential buildings. ACM Transactions on Graphics (SIGGRAPH Asia), 38(6), 2019. 1, 2, 3, 4, 5, 6 +[37] Lap Fai Yu, Sai Kit Yeung, Chi Keung Tang, Demetri Terzopoulos, Tony F Chan, and Stanley J Osher. Make it home: automatic optimization of furniture arrangement. ACM Transactions on Graphics (TOG)-Proceedings of ACM SIGGRAPH 2011, v. 30,(4), July 2011, article no. 86, 30(4), 2011. 2 +[38] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In International conference on machine learning, pages 7354–7363. PMLR, 2019. 2 +[39] Xi Zhao, Ruizhen Hu, Paul Guerrero, Niloy Mitra, and Taku Komura. Relationship templates for creating scene variations. ACM Transactions on Graphics (TOG), 35(6):1-13, 2016. 2 +[40] Xi Zhao, He Wang, and Taku Komura. Indexing 3d scenes using the interaction bisector surface. ACM Trans. Graph., 33(3):22:1-22:14, June 2014. 2 +[41] 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. 2 +[42] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darrell, Alexei A Efros, Oliver Wang, and Eli Shechtman. Multimodal image-to-image translation by enforcing bi-cycle consistency. In Advances in neural information processing systems, pages 465-476, 2017. 2 + +[43] Peihao Zhu, Rameen Abdal, Yipeng Qin, and Peter Wonka. Sean: Image synthesis with semantic region-adaptive normalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5104-5113, 2020. 2 \ No newline at end of file diff --git a/iplaninteractiveandprocedurallayoutplanning/images.zip b/iplaninteractiveandprocedurallayoutplanning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..15b1b8dfbb4d2bd6286ff8ee7a52274b46b8b87a --- /dev/null +++ b/iplaninteractiveandprocedurallayoutplanning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89622cebdb93dac4b22f3eda63cbae049acc49f72c563f88885d40637ea78331 +size 325333 diff --git a/iplaninteractiveandprocedurallayoutplanning/layout.json b/iplaninteractiveandprocedurallayoutplanning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c9027938bf33cdd3744300fae590ae23d7538e3b --- /dev/null +++ b/iplaninteractiveandprocedurallayoutplanning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0228b14e28b24c3c020e6539337af1cf4fb0c3f903b8f25263282f01a6e61abc +size 471355 diff --git a/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_content_list.json b/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ee964949a9f641345381983c60cef6f951786706 --- /dev/null +++ b/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e82fa38fb5aab55eca374bc1f752a059fd67002dc0dd55294136dabfc89fe7f +size 75347 diff --git a/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_model.json b/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e58b17db157cebc8bf557b7a0d13f87232d94847 --- /dev/null +++ b/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f61af02c60eae9bb9a89d46ffe0470ae29338126404ec655d8692f050e6ec11 +size 89936 diff --git a/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_origin.pdf b/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9523786c784e042a07279beed98058dbe7631b26 --- /dev/null +++ b/vclimbanovelvideoclassincrementallearningbenchmark/1b4d8d91-de36-4ca4-9514-61701fe7ed59_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a451f7010240b46fb02efdedeb28c4a17a4befbb7c034c8b7c75cbf449740eec +size 438197 diff --git a/vclimbanovelvideoclassincrementallearningbenchmark/full.md b/vclimbanovelvideoclassincrementallearningbenchmark/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3538f14b74dca6deae572c8f7ca9d2333e44db37 --- /dev/null +++ b/vclimbanovelvideoclassincrementallearningbenchmark/full.md @@ -0,0 +1,234 @@ +# vCLIMB: A Novel Video Class Incremental Learning Benchmark + +Andrés Villa $^{1,2*}$ , Kumail Alhamoud $^{2}$ , Victor Escorcia $^{3}$ , Fabian Caba Heilbron $^{4}$ , Juan León Alcazar $^{2}$ , Bernard Ghanem $^{2}$ + +1Pontificia Universidad Católica de Chile, 2King Abdullah University of Science and Technology (KAUST), + +$^{3}$ Samsung AI Center Cambridge, $^{4}$ Adobe Research + +afvilla@uc.cl, kumail.hamoud@kaust.edu.sa, v.castillo@samsung.com + +caba@adobe.com, {juancarlo.alcazar, bernard.ghanem}@kaust.edu.sa + +# Abstract + +Continual learning (CL) is under-explored in the video domain. The few existing works contain splits with imbalanced class distributions over the tasks, or study the problem in unsuitable datasets. We introduce vCLIMB, a novel video continual learning benchmark. vCLIMB is a standardized test-bed to analyze catastrophic forgetting of deep models in video continual learning. In contrast to previous work, we focus on class incremental continual learning with models trained on a sequence of disjoint tasks, and distribute the number of classes uniformly across the tasks. We perform in-depth evaluations of existing CL methods in vCLIMB, and observe two unique challenges in video data. The selection of instances to store in episodic memory is performed at the frame level. Second, untrimmed training data influences the effectiveness of frame sampling strategies. We address these two challenges by proposing a temporal consistency regularization that can be applied on top of memory-based continual learning methods. Our approach significantly improves the baseline, by up to $24\%$ on the untrimmed continual learning task. The code of our benchmark can be found at: https://vclimb.netlity.app/. + +# 1. Introduction + +Deep neural networks rely on large-scale datasets to achieve state-of-the-art performance on modern computer vision tasks [6, 10, 18, 20]. A significant result of such pretraining is enabling feature reuse [12, 41], by means of finetuning the learned weights for smaller downstream tasks [3, 22, 28]. Due to legal or technical constraints, and the fact that labeling data is expensive and time-consuming [34], real-world deep-learning pipelines would rarely involve a single fine-tuning stage. Instead, these pipelines could require the sequential fine-tuning of large models in a set + +of independent tasks that are learned sequentially. Under these conditions, deep neural networks suffer from what is known as catastrophic forgetting [13], where the fine-tuning on novel tasks significantly reduces the performance of the model in a previously learned task, and drift [29], where unseen training data does not fit the previously estimated class distribution. Continual learning [11] directly models such a scenario, by adapting a neural network model into a sequential series of tasks. We focus on a special case of CL: class incremental learning (CIL), where the labels and data are mutually exclusive between tasks, training data is available only for the current task, and there are no tasks ids. + +With 500 hours of video from diverse categories uploaded to YouTube every minute and a billion people actively using TikTok every month [4, 36], video content of varying quality is available at an unprecedented scale. With such large volumes of data, it is important to develop models that can effectively learn from continuous streams of untrimmed video data. Remarkably, few research efforts have addressed continual learning with video [24, 26, 44]. Despite these current works, video continual learning methods still show a large variability in their experimental protocols, making direct comparisons hard to establish. These protocols present the following limitations. (1) They are not publicly available. (2) They do not explore a realistic setup with untrimmed videos. (3) Most of them leverage a large pretraining step, which warms up the model by learning a sample of classes from the same distribution and is not always available in a real continual learning scenario. + +We directly address these limitations and propose vCLIMB (video CLass IncreMental Learning Benchmark), a novel benchmark devised for the evaluation of continual learning in video. Our test-bed defines a fixed task split on the original training and validation sets of three well known video datasets: UCF101 [33], ActivityNet [5] and Kinetics [6]. vCLIMB follows the standard class incremental continual learning scenario, but includes some modifications to better fit the nature of video data in human ac + +tion recognition tasks. First, to achieve fair comparisons between video CIL methods that use memory, we re-define memory size [27, 38] to be the total number of frames, instead of the total number of video instances, that the memory can store. We report this as Memory Frame Capacity in our tables to avoid confusion with the memory size defined in image CIL. This means we are not only concerned about selecting the best videos to store in memory, but we also want to identify the best set of frames to keep in memory. Second, since fine-grained temporal video annotations are expensive (especially for long videos), we analyze the effect of using trimmed and untrimmed video data in continual learning. To the best of our knowledge, this is the first work to explore continual learning with untrimmed videos. + +Using vCLIMB's data splits, we establish an initial set of baselines by adapting well-known continual learning methods [1, 17, 27, 38] from the image recognition domain into the activity recognition domain. After benchmarking these baseline methods, we propose a novel strategy for video continual learning that leverages the inherent temporal consistency in video data to better approach the continual action recognition problem. We believe that vCLIMB's standardized approach to prototyping and evaluating video continual learning will enable future works in this area. + +Contributions. This paper proposes vCLIMB, a novel benchmark for continual learning in video, which focuses on the activity classification task. Our work brings the following contributions: (1) A standardized benchmark for continual learning in video action recognition, which defines the training protocols and associated metrics for three video datasets; this novel continual learning setup includes a more realistic combination of trimmed and untrimmed videos. (2) We re-purpose and evaluate four baseline methods from the image domain into the video domain. (3) We present a novel strategy based on consistency regularization that can be built on top of memory-based methods to reduce memory consumption while improving performance. + +# 2. Related Work + +Continual Learning (CL) studies methods that can learn novel concepts continually without forgetting previous knowledge. In the class incremental learning (CIL) setting, models are trained sequentially on a set of tasks. Each incremental task consists of labeled data from novel classes, which are learned individually without considering the data from previous tasks. CIL approaches can be grouped into two broad categories: regularization-based and memory-based methods. While regularization-based methods penalize abrupt changes in the most relevant parameters learned from previous tasks, memory-based methods mitigate catastrophic forgetting by retaining a limited amount of training instances from previous tasks. Although there is extensive literature on continual learning + +[1, 7, 8, 15, 17, 21, 25, 27, 31, 42], we restrict our review to a sample of the most widely adopted baselines. + +Regularization-Based Methods. Regularization techniques try to keep constant the weights that are important for the previous tasks. They differ in how they estimate the importance value of the model parameters learned in previous tasks. These values are commonly updated and stored in an importance matrix at the end of each task. Elastic Weight Consolidation (EWC) [17] uses the Fisher Information Matrix to make that estimation. Memory Aware Synapses (MAS) [1] estimates the importance of each parameter in a self-supervised manner by measuring how small changes in the parameters affect the output of the model. MAS is of particular interest in the video domain because it can handle weakly labeled instances. These methods include a regularization factor $\lambda_{reg}$ , which controls how relevant the previously learned tasks are. For a large factor, the model will prioritize the previous tasks over the current one. + +Memory-Based Methods. Memory-based methods select and store samples into a memory buffer for future replay. This memory has a limited size and is available when learning a new task. While a naive baseline randomly chooses instances from previously learned classes, current strategies attempt to select the best subset of training samples per class to move into the buffer. We focus on two representative methods that have been shown to work well with high-resolution image datasets. Incremental Classifier and Representation Learning (iCaRL) [27] combines rehearsal and distillation strategies. During training, it selects the most representative instances per class following a nearest-mean-of-exemplars rule. The Bias Correction method (BiC) [38] follows iCaRL's instance sampling approach, but augments the classification layer with a bias correction layer. Bias correction mitigates the imbalance between the large amount of data from the new task and the relatively scarce data from previous tasks, which is only available in memory. + +Consistency Regularization. Consistency regularization techniques are used to ensure that a model's output is invariant to various augmentations, which is common in semisupervised learning [2, 19, 30, 32, 39]. For example, such methods have been shown to improve the generation of images from a few samples [43, 45]. Our work investigates catastrophic forgetting in video continual learning and proposes a consistency loss to help memory-replay methods significantly alleviate this impeding nuisance. + +Continual Learning in Video. Despite the growing interest in CL in the image domain, the first three works to report results on video data were only recently published. Zhao et al. [44] proposed a spatio-temporal knowledge transfer strategy to mitigate catastrophic forgetting. A concurrent work [26] estimated the subset of feature channels that contributes the most to the predictions of the previous tasks, + +
SetIn-distribution PretrainingTasksVideos Per TaskClasses Per TaskAvg. Frames Per VideoUntrimmed Video
TrainValTest
i-Something-Something-B0 [44]None4---10-X
i-Something-Something-B20 [44]20 classes5---4-X
i-Kinetics-B0 [44]None4---10-X
i-Kinetics-B20 [44]20 classes5---4-X
UCF101-50 [26]51 classes5/10/25---10/5/2-X
HMDB51-25 [26]26 classes5/25---5/1-X
Something-Something V2-90 [26]84 classes9/18---10/5-X
vCLIMB UCF101None1092813127210183X
vCLIMB UCF101None20464651365183X
vCLIMB KineticsNone10246281988397740250X
vCLIMB KineticsNone2012314994198820250X
vCLIMB ActivityNet-Untrim.None101001492-203542✓
vCLIMB ActivityNet-Untrim.None20500246-103542✓
vCLIMB ActivityNet-Trim.None101541765-203879X
vCLIMB ActivityNet-Trim.None20770383-103879X
+ +Table 1. CIL Benchmark Statistics. In vCLIMB we provide 8 splits for class incremental learning, each split contains 10 or 20 tasks. Our Kinetics and ActivityNet setups contain large-scale video data and provide long sequences of tasks with no video pretraining. This makes our splits more suitable for measuring forgetting. We highlight that ActivityNet-Untrim provides a realistic challenge to test a model's ability to continually learn from weakly labeled video streams. + +and introduced a temporal mask that keeps this subset stable while learning a new task. It also included a distillation loss, which allows only the least relevant feature maps to be updated while learning a new task. Finally, Ma et al. [24] also approached the class incremental video classification problem by regularizing the feature space in consecutive tasks. + +Although existing works bootstrapped the study of continual learning in video data, all of them use different evaluation protocols, making direct comparisons between methods difficult. Moreover, these works propose to pretrain the model with a large set of classes of the same data distribution (up to half of the total), as shown in Table 1. Such an arrangement is unnatural for continual learning, as it makes it difficult to disentangle the effects of catastrophic forgetting. In contrast, our benchmark presents a more challenging and realistic setup. Our splits contain up to 20 tasks, with a balanced number of classes per task. Furthermore, vCLIMB includes three video datasets, which enables the study of the continual learning problem in more diverse scenarios. Finally, previous works do not provide a detailed analysis of the proposed video continual learning setups. In our benchmark, we provide extensive empirical evaluations to analyze individual splits and identify unique properties of continual learning in video, including the memory size and the adoption of untrimmed video configurations. + +# 3. vCLIMB: A Video Class Incremental Learning Benchmark + +Notation & Problem Definition Similar to the image domain, we train a single neural network $(F_{\omega})$ with parameter set $(\omega)$ over a sequence of tasks $(R_{n})$ . Each task in the sequence contains its own training data $R_{i} =$ + +$\{(X_0,Y_0),(X_1,Y_1)\dots (X_n,Y_n)\}$ , with $X_{n}$ the input data and $Y_{n}$ its corresponding ground truth. We optimize the parameter set $\omega$ in $F$ sequentially over $R_{n}$ , searching for $\bar{F}_{\omega}$ that maximizes the average accuracy over $R_{n}$ . + +Datasets and Tasks. The bottom half of Table 1 summarizes the main attributes of vCLIMB. We design vCLIMB on top of three well-known datasets for action recognition: (1) UCF101 [33], which has 13.3K videos from 101 classes, (2) Kinetics [6], a large-scale video dataset with over 300K short clips distributed over 400 action classes, and (3) ActivityNet [5], which can be used for trimmed and untrimmed activity classification and contains 20K videos from 200 activity classes. We utilize the diversity of videos in ActivityNet and provide two subsets: ActivityNet-Trim, in which every part of the videos when an action happens is considered as an independent video, and ActivityNet-Untrim, which is more challenging and labels a whole video with its most representative action class. We create two different CIL sequences of tasks for each dataset. The first sequence contains ten tasks, and the second sequence contains twenty tasks. Statistics about the number of classes per task, the number of videos per task, and the average number of frames in each split are provided in Table 1. + +Metrics for Video Continual Learning (CL). In vCLIMB, we use the standard CL metrics: Final Average Accuracy (Acc) and Backward Forgetting (BWF). Acc is the average classification accuracy of the model evaluated on all learned tasks, including the last task it was trained on [23, 37]. This metric is essential to show how the average performance of the model degrades as it learns new tasks. BWF complements Acc and measures the influence of the learned task $i$ + +![](images/6f22481846e23a9f9b8aece716c8f372d6da552a9eba1923a790ee6c896f1199.jpg) +Figure 1. Outline of our Memory-based CIL setting. In video CIL, a model sequentially learns a set of video classification tasks. Memory-based methods define a limited episodic memory to store a few temporally down-sampled examples of previous tasks. We propose a consistency regularization that helps the model to better remember previous tasks from down-sampled examples in memory. + +in the performance of the previous tasks [23], as: + +$$ +B W F _ {i} = \frac {1}{N _ {i} - 1} \sum_ {j = 1} ^ {N _ {i} - 1} \left(R _ {j, j} - R _ {N _ {i}, j}\right) \tag {1} +$$ + +where $N_{i}$ is the number of learned tasks after learning the task $i$ , and $R_{j,j}$ and $R_{N_i,j}$ represents the accuracy on the task $j$ after learning the task $j$ , and learning a new task the task $i$ , respectively. Given a total of $N$ tasks, we report the final Backward Forgetting $BWF = BWF_{N}$ in our tables. + +# 3.1. Unique Challenges of Video CL + +Video CIL comes with unique challenges. (1) Memory-based methods developed in the image domain are not scalable to store full-resolution videos, so novel methods are needed to select representative frames to store in memory. (2) Untrimmed videos have background frames that contain less helpful information, thus making the selection process more challenging. (3) The temporal information is unique to video data, and both memory-based and regularization-based methods need to mitigate forgetting while also integrating key information from this temporal dimension. These challenges informed the design choices of vCLIMB. + +Re-defining Memory Size. Unlike image benchmarks for class incremental learning (CIL), our video instances contain a temporal dimension whose size could show large variability. To favor fair comparisons between methods, we define the working memory size in terms of stored frames. This design choice avoids a scenario where longer videos are preferred (or even trivially selected) to maximize the amount of data stored in the working memory. Moreover, it creates a new unique aspect of CIL in video data, as methods must decide first what subset of frames should be selected, and then decide what video to store according to the sub-sampled videos. We follow the same instance per class ratio as [27], which is 20 when the model has learned all training classes. Therefore, we define a memory that can save at most 8000, 4000, and 2020 videos for Kinetics, ActivityNet, and UCF101, respectively. If we store videos in memory without down-sampling them, this would correspond to saving $3.25\%$ , $25.95\%$ , and $21.76\%$ of the total frames in Kinetics, ActivityNet, and UCF101. As we + +show later, these storage requirements can be significantly reduced using temporal consistency regularization. + +Untrimmed Video Data for CIL. In the untrimmed classification setting, the action of interest may occur at any time in the video and its boundaries are not known. This problem formulation has no direct counterpart in the image classification domain. The annotation scheme of ActivityNet allows us to analyze this scenario for class incremental learning. In ActivityNet, videos contain one or multiple temporal segments defining the occurrence of an action instance, while unlabeled segments constitute a background set where no relevant action takes place [5]. + +We leverage this unique property of video data and define two independent setups for video CIL. In the trimmed setup, we only use frames that belong to a labeled action segment. In the untrimmed setup, we freely sample frames from the whole video, regardless of whether they belong to the main action or the background. For consistency in the untrimmed scenario, we give every frame in the video the same label. We select a primary label as the action with the longest temporal support in the video, and discard any video that contains instances of 2 or more different labels. We empirically find that this assignment only discards $0.15\%$ of the ActivityNet dataset. This untrimmed learning task more closely resembles the real world scenario of CIL, where a model learns from a continuous stream of diverse videos. Given the scale of current video services and the costly nature of fine-grained labels, real models would likely be learning from a stream with weak video-level annotations. + +Baselines We implement and evaluate these four continual learning methods to serve as baselines [1, 17, 27, 38] because they are widely used and easily scalable to the video domain. We also compare with a naive memory-based strategy, which selects samples randomly for memory creation. We provide the implementations for these methods as part of our video CIL benchmark. + +# 3.2. A Stronger Baseline with Temporal-consistency Regularization + +We present a novel strategy for CIL in the video domain. Our approach relies on one of the unique characteristics of + +![](images/87e8bb28cf799fe6b81770db50ee906e5d8c67315e066e2d3c5257c0441a69ba.jpg) +Figure 2. Temporal Consistency Loss. Our consistency loss encourages learning representations that are robust to frame sampling, enabling the CIL model to remember old tasks by looking only at down-sampled versions of those videos. + +video data, temporal resolution consistency. Figure 1 illustrates our pipeline for memory-based video CIL methods. After completing the training on videos from the first task, the model has the option to select a few temporally subsampled examples to store in the episodic memory. When learning the second task, the model is trained on both the new task videos and a few past-task examples it retained in memory. We introduce a regularization loss, represented by the dashed arrow in Figure 1, during the fine-tuning phase of every new task. This loss constrains the network to estimate similar feature representations for the original video clip and a temporally down-sampled version of it. + +This constraint aims to optimize the effectiveness of the data stored in the episodic memory, by enforcing a similar representation between the original clip and its temporally down-sampled version. As shown in Figure 2, the most relevant aspects of our loss is that it reduces the drift between the samples stored in memory and the original samples used at training time. While simple, our constraint directly addresses one of the key aspects of CIL in video: its episodic memory is composed of frame sets instead of full-resolution video clips. In practice, we enforce similar representations by adding a regularization term to the loss function. + +Temporal Consistency Loss. When training on a new task, each video $(X)$ will have an augmented version $(X^{d})$ by means of temporal down-sampling. We use pairs of $X$ and $X^{d}$ to calculate a consistency loss $L_{c}$ over a single forward pass of the network $F$ : + +$$ +L _ {c} = (1 - \lambda) L _ {c l s} (F (X), Y) + \lambda L _ {c l s} (F (X ^ {d}), Y), \tag {2} +$$ + +where $L_{cls}$ is the cross-entropy loss, $Y$ is the ground truth label of $X$ , and $\lambda$ is the consistency regularization factor. + +Our consistency regularization strategy is model agnostic and thus can be adapted to any backbone and CIL memory-replay strategy. Since we use the same set of weights $(F)$ for both loss terms, our method only introduces a linear time increase in the total number of FLOPs. + +# 4. Experimental Evaluation + +We now proceed with the experimental assessment of the class incremental continual learning task in vCLIMB. In this section, we first discuss the details of the reimplementation of image methods for continual learning in the video domain. Then, we proceed with the empirical assessment of these baseline methods on the three datasets included in the vCLIMB benchmark: UFC101 [33], Kinetics [6] and ActivityNet [5]. For the ActivityNet dataset, we also evaluate the CIL task in the presence of trimmed and untrimmed video annotations. Moreover, we assess the effectiveness of the proposed regularization method in all the previous scenarios and datasets. + +Implementation Details. The memory-based [27,38] and regularization-based [1, 17] baselines are trained for 50 and 20 epochs, respectively, following a fully-supervised setup on each CIL task. We use TSN [35] with a ResNet-34 backbone pretrained on ImageNet. We follow the same temporal data augmentation proposed in [35], using $N = 8$ segments per video. We optimize our model using Adam [16] with a learning rate of $1 \times 10^{-3}$ . For the temporal consistency loss factor, we use $\lambda = 0.5$ . We run MAS [1] with a regularization factor $\lambda_{reg}$ of $3 \times 10^{5}$ . We found EWC [17] to be more challenging to tune for video CIL. The best results are obtained by picking a different regularization factor $\lambda_{reg}$ for EWC on each individual dataset: $3 \times 10^{3}$ for UCF101, $5 \times 10^{2}$ for Kinetics, and $3 \times 10^{5}$ for ActivityNet. + +# 4.1. Baselines for Video CIL + +As outlined in 3.1 the datasets in vCLIMB differ in scale, so we set a different working memory limit for each dataset according to their total number of frames. For each dataset, we perform experiments on two different splits: a 10-task split and a 20-task split. In Table 2, we report the results obtained using the best hyper-parameters for each method. + +Consistent with image class incremental learning [14], the regularization-based methods EWC [17] and MAS [1] lag significantly behind replay-based methods, regardless of the difficulty of the dataset or the number of tasks. This is because regularization methods only penalize changes to the model parameters, and thus experience an unavoidable trade-off between learning new tasks and forgetting older tasks. If a larger regularization parameter is used to emphasize learning new tasks, forgetting increases and the average accuracy on old tasks is compromised. If a smaller regularization parameter is used to emphasize remembering old tasks, the accuracy on newer tasks is impaired. Given the difficulty of video CIL, this limitation highlights the importance of future exploration of more sophisticated strategies of memory-free approaches. + +Surprisingly, no memory-based approach is superior across all video datasets. While the naive baseline, which + +
ModelNum. TaskKineticsActivityNet-TrimUCF101
Mem. Video InstancesMem. Frame CapacityAcc ↑BWF ↓Mem. Video InstancesMem. Frame CapacityAcc ↑BWF ↓Mem. Frame CapacityMem. Frame CapacityAcc ↑BWF ↓
EWC10NoneNone5.81%16.05%NoneNone4.02%5.32%NoneNone9.51%98.94%
MAS10NoneNone7.81%10.12%NoneNone8.11%0.18%NoneNone10.89%11.11%
EWC20NoneNone2.95%32.70%NoneNone1.28%3.77%NoneNone4.71%92.12%
MAS20NoneNone4.25%5.54%NoneNone4.61%0.1%NoneNone5.90%5.31%
Naive1080002 × 10^630.14%41.30%400015.5 × 10^647.20%20.64%20203.69 × 10^591.42%7.43%
iCaRL1080002 × 10^632.04%38.74%400015.5 × 10^648.53%19.72%20203.69 × 10^580.97%18.11%
BiC1080002 × 10^627.90%51.96%400015.5 × 10^651.96%24.27%20203.69 × 10^578.16%18.49%
Naive2080002 × 10^623.47%48.05%400015.5 × 10^640.78%23.18%20203.69 × 10^587.40%10.96%
iCaRL2080002 × 10^626.73%42.25%400015.5 × 10^643.33%21.57%20203.69 × 10^576.59%21.83%
BiC2080002 × 10^623.06%58.97%400015.5 × 10^646.53%15.95%20203.69 × 10^570.69%24.90%
+ +Table 2. Baseline Video CIL Results. We report the average accuracy (Acc) and the backward forgetting (BWF) at 10 and 20 tasks from three action recognition benchmarks. Regularization-based methods (at the top of the table), under-perform memory-based methods, shown at the bottom. Consistent with results in the image domain, the longer 20-task sequences are more challenging for all methods across all dataset. We highlight that the reported improvements in the image domain do not directly translate to the video domain, as no single method obtains the best performance in every setup. + +randomly samples instances for memory, outperforms the other baselines on UCF101, iCaRL and BiC are better on Kinetics and ActivityNet. We believe that fixing this discrepancy by finding memory-based methods designed specifically for video is an important research direction. + +Number of Tasks and Forgetting. We observe that the longer (20-task) sequence is a more challenging setup, where the average accuracy is always lower for any method on any of the three datasets. Following this trend, all memory-based methods forget more as the number of tasks in the sequence increases. Similar to the image domain, evaluating on long sequences of tasks accentuates the shortcomings of CIL methods, and is thus suitable for the study of strategies that mitigate forgetting. We pose closing the forgetting gap between the 10-task and 20-task scenarios as an important research direction. + +Relevance of Memory Size in Video. UCF101 stands out in Table 2, since memory-based methods perform surprisingly well in this dataset. In fact, the $91.42\%$ accuracy obtained by the naive rehearsal baseline on the UCF101 10-task CIL is almost on par with the $94.9\%$ accuracy reported for training TSN [35], which is the backbone in our experiments, on all UCF101 classes simultaneously. This creates a sharp contrast with Kinetics and ActivityNet results, where the best CIL baseline achieve $32.04\%$ and $51.96\%$ respectively. In comparison, TSN trained on all the action classes of the whole dataset at once achieves $73.9\%$ on Kinetics [40] and $88\%$ on ActivityNet [35]. + +Park et al. [26] conducted experiments on UCF101 and made the observation that storing a subset of frames in memory results in a similar performance to storing the whole video [26]. Our hypothesis is that such good performance and apparent invariance to frame sampling is an artifact specific to the UCF101 dataset, and that it is not the norm in video class incremental learning. Our experi + +ments on Kinetics and ActivityNet in Table 3 show that this is indeed not the case for more challenging video datasets. In particular for ActivityNet, storing four frames per video in memory, results in an overall decrease of accuracy by $27\%$ compared to storing all frames. We hypothesize that the temporal dependencies in Kinetics and ActivityNet are more complex and more relevant for the task, thus models with naive sampling strategies struggle to remember older tasks from severely down-sampled videos. + +# 4.2. Remembering from Down-sampled Videos. + +To avoid incurring large memory requirements, it is favorable for video CIL models to down-sample videos before storing them for future replay. This means the model will learn a new task with full-resolution videos, but its memory will be composed of temporally sub-sampled versions of videos belonging to older tasks. Unfortunately, the distribution shift from the original training data to the modified stored exemplars causes a decline in the accuracy, which is evident from the Kinetics and ActivityNet results in Table 3. + +To mitigate forgetting, continual video action recognition models must learn robust action embeddings, which are invariant to the temporal resolution of the video. We use our temporal consistency loss to train the CIL model jointly on both full-resolution videos and temporally down-sampled videos. Our proposed strategy helps achieve this desirable invariance. Table 3 reports the results of using our consistency loss, which is explained in Section 3.2, to mitigate forgetting in models that remember from down-sampled videos. Since no single memory-based method consistently outperforms the other methods across all datasets, we choose the more established baseline iCaRL [27] to perform the sub-sampled memory experiments. + +Consistency Regularization on Kinetics. The last three rows of Table 3 summarize the effect of applying our temporal regularization on limited size memories. Temporal + +
ModelFrames per videoKineticsActivityNet-TrimUCF101
Mem. Frame CapacityAcc ↑BWF ↓Frame CapacityAcc ↑BWF ↓Mem. Frame CapacityAcc ↑BWF ↓
iCaRL43.2 × 10430.73%40.36%1.6 × 10421.63%36.98%8.08 × 10380.32%17.13%
iCaRL86.4 × 10432.04%38.48%3.2 × 10421.54%33.41%16.16 × 10381.12%18.25%
iCaRL1612.8 × 10431.36%38.74%6.4 × 10425.27%29.71%32.32 × 10381.06%18.23%
iCaRLALL2 × 10632.04%38.74%15.5 × 10648.53%19.72%3.69 × 10580.97%18.11%
iCaRL+TC43.2 × 10435.32%34.07%1.6 × 10442.99%23.82%8.08 × 10373.85%26.35%
iCaRL+TC86.4 × 10436.24%33.83%3.2 × 10445.73%18.90%16.16 × 10374.25%25.27%
iCaRL+TC1612.8 × 10436.54%33.53%6.4 × 10444.04%22.82%32.32 × 10375.84%23.23%
+ +Table 3. Ablation study results with different memory sizes. We compare iCaRL [27] with and without Temporal Consistency (iCaRL+TC) on the 10-task trimmed action recognition setups. iCaRL experiences a loss of accuracy as the memory size decreases in the challenging Kinetics and ActivityNet-Trim setups. Applying TC allows us to reduce the memory size by 2 orders of magnitude while retaining the performance in ActivityNet-Trim, and it even outperforms the version of iCaRL that uses all frames in Kinetics. + +consistency regularization (labeled TC in the table) reduces forgetting on the 10-task Kinetics split regardless of how many frames per video are stored. In particular, our best baseline (iCaRL) tested on a memory of 16, 8, or 4 frames per video is significantly improved when our temporal consistency term is added to iCaRL's loss objective. For example, the accuracy is improved by more than $4.5\%$ in the scenario where 4 frames per video are stored. It is worth highlighting that adding temporal consistency enables us to store as few as 4 frames per video and yet achieve more than $3\%$ accuracy improvement over storing full videos, which requires about 100 times greater memory frame capacity. + +Consistency Regularization on Trimmed ActivityNet. We observe a similar trend on ActivityNet with temporal consistency resulting in even more sizable improvements. Specifically, adding the regularization term with a model that has access to a memory consisting of 8 frames per video results in a massive $24\%$ improvement. Moreover, with 4 frames per video stored in memory, our temporally consistent model comes close to achieving similar performance to the model that uses full-resolution videos. In fact, this significantly closes the $27\%$ accuracy gap between storing full-resolution videos in memory and storing 4 frames per video when our regularization is not used. Our results show that our method is most relevant for datasets that require more sophisticated temporal reasoning like ActivityNet. + +How Many Frames Should be Stored in Memory? A major challenge for adapting continual learning methods to video is that videos consume significantly more memory than images due to the added temporal dimension. Our experiments in Table 3 show that a consistency-based training framework makes it possible to down-sample videos before storing them for future replay, resulting in remarkably small memories and minor performance degradation. In particular on the challenging dataset Kinetics, iCaRL without TC trained with full-resolution memory achieves an average accuracy of $32.04\%$ . Yet, adding the TC loss and training on + +memory of only 8 frames per video exemplar results in an even better average performance of $36.24\%$ . This is impressive, since the average number of frames per video in Kinetics is 250, which translates to only $3.2\%$ of the average Kinetics video being stored in memory. + +Our experiments on ActivityNet-Trim also show a similar trend towards alleviating large memory requirements. Since 8 frames represent $0.21\%$ of the average ActivityNet video, naively storing 8-frame exemplars with no temporal consistency in training results in a $27\%$ drop in accuracy. Using consistency regularization and 8 frames per memory sample, we are able to reduce the difference in accuracy from $27\%$ to only $3\%$ . + +Frame Sampling in UCF101. We revisit our assertion that remembering old tasks in UCF101 is unaffected by the number of frames stored in memory. We vary the number of frames per video used: from storing all frames to storing 16, 8, and 4 frames. The results reported in Table 3 clearly show that the performance of iCaRL is almost the same in all these different scenarios, validating the claim that UCF101 is not a prototypical dataset to evaluate CIL methods. For completeness, we also run the same set of experiments using the proposed consistency regularization scheme. We notice that it does not help increase the performance. This is unsurprising for two reasons. (i) Class incremental learning on UCF101 is already not that much more challenging than training on the whole dataset in one task, as we showed in Section 4.1. (ii) As the first half of Table 3 shows, class incremental learning with a memory buffer on UCF101 is invariant to the number of frames per video stored in memory. This can be explained by the strong scene bias exhibited in UCF101 [9]. Thus, incorporating the TC loss in this dataset, which has a very small accuracy gap between CIL training and fully-supervised training, is not expected to improve accuracy. + +UCF101 for video CIL. In conclusion, we still recommend using the UCF101 splits for prototyping video CIL methods. However, due to its simplicity, we encourage the + +
ModelFrames per videoMem. Frame CapacityActivityNet-UntrimActivityNet-Trim
Acc ↑BWF ↓Acc ↑BWF ↓
iCaRL41.6 × 10416.28%32.75%21.63%36.98%
iCaRL83.2 × 10416.67%31.96%21.54%33.41%
iCaRL166.4 × 10421.27%28.94%25.27%29.71%
iCaRL+TC41.6 × 10436.07%22.39%42.99%23.82%
iCaRL+TC83.2 × 10440.29%20.80%45.73%18.90%
iCaRL+TC166.4 × 10440.45%21.21%44.04%22.82%
+ +Table 4. Ablation study results with trimmed and untrimmed videos. All the experiments involve sequentially training on 10 tasks. ActivityNet-Untrim provides a more realistic and challenging setup to evaluate CIL models. We impose the strict resource constraint of 4, 8, and 16 frames per video stored in memory. Our temporal consistency approach significantly improves the accuracy of the baseline method trained on both ActivityNet setups with limited memory. The best performing setting for each data split is highlighted in the table. + +community to evaluate new video CIL methods on the more challenging splits from Kinetics and ActivityNet. + +Class Incremental Learning from Untrimmed Videos. As observed in Table 4, we perform a set of experiments to evaluate the realistic class incremental learning scenario with untrimmed videos and make a few interesting observations. First, ActivityNet-Untrim is more challenging than ActivityNet-Trim. iCaRL baseline [27] achieves a better performance on ActivityNet-Trim regardless of the number of frames per video stored in memory. Second, our temporal consistency regularization improves [27] by large margins in both ActivityNet setups. The progressive performance of iCaRL on the trimmed and untrimmed setups in the 10-task case, where 8 frames are used to represent a memory video, are plotted in Figure 3. Our regularization loss enhances the performance by $24\%$ in both cases. + +Why Does Consistency Regularization Work? We hypothesize that the large accuracy gains garnered by adding the consistency regularization loss are due to two reasons. First, regularization may make the training more stable. When training the model on augmented examples, we expect the model to learn more robust representations that can make learning new tasks easier. Second, consistency regularization forces the backbone to learn action embeddings that are invariant to the number of frames used to represent the video. Current video CIL methods store down-sampled videos in the episodic memory. However, without applying the consistency loss, the model naturally learns completely different features for densely sampled videos and sparsely sampled videos. Thus, the model struggles to remember the old action representations from this memory of down-sampled videos. This distribution shift between videos of different temporal resolution is especially apparent in datasets with more complicated temporal dependencies like ActivityNet. This points to why our approach improves the performance by large margins on this dataset and + +suggests TC loss does not skew the models towards spurious scene features, rather it manages to retain meaningful temporal features. + +![](images/2430802446918b67ad1ef9da4ce67c3e04abe927ab170982b83dae0686e33100.jpg) +Figure 3. Average Accuracy in the Validation Set. We train iCaRL sequentially on 10 tasks and enforce a memory constraint of 8 frames per video. Our temporal consistency (TC) loss significantly improves iCaRL's performance on ActivityNet-Trim and ActivityNet-Untrim + +# 5. Conclusion and Limitations + +In this paper, we propose and analyze vCLIMB, a continual learning benchmark for video action recognition. We expose and tackle the unstudied accuracy drop, which is experienced by memory-based video CIL models and is caused by frame sub-sampling. In our experiments, we sample frames uniformly and leverage a consistency loss to significantly alleviate that accuracy drop, by up to $24\%$ in CIL untrimmed video classification. We think that exploring non-uniform sampling strategies is another promising direction, but we leave that exploration for future work. + +Acknowledgments. This publication is based upon work supported by the King Abdullah University of Science and Technology (KAUST) Office of Sponsored Research (OSR) under Award No. OSR-CRG2021-4648. Authors also thank Centro Nacional de Inteligencia Artificial CENIA, FB210017, BASAL, ANID. + +# References + +[1] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Eur. Conf. Comput. Vis., September 2018. 2, 4, 5 +[2] David Berthelot, Nicholas Carlini, Ian J. Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. In Adv. Neural Inform. Process. Syst., pages 5050-5060, 2019. 2 +[3] Luca Bertinetto, Jack Valmadre, Joao F Henriques, Andrea Vedaldi, and Philip HS Torr. Fully-convolutional siamese networks for object tracking. In Eur. Conf. Comput. Vis., pages 850-865. Springer, 2016. 1 +[4] Jessica Bursztynsky. Tiktok says 1 billion people use the app each month, 2021. 1 +[5] Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In IEEE Conf. Comput. Vis. Pattern Recog., pages 961-970, 2015. 1, 3, 4, 5 +[6] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In IEEE Conf. Comput. Vis. Pattern Recog., pages 6299-6308, 2017. 1, 3, 5 +[7] Fabio Cermelli, Massimiliano Mancini, Samuel Rota Bulo, Elisa Ricci, and Barbara Caputo. Modeling the background for incremental learning in semantic segmentation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 9233-9242, 2020. 2 +[8] Arslan Chaudhry, Puneet K Dokania, Thalaiyasingam Ajthan, and Philip HS Torr. Riemannian walk for incremental learning: Understanding forgetting and intransigence. In Eur. Conf. Comput. Vis., pages 532-547, 2018. 2 +[9] Jinwoo Choi, Chen Gao, C. E. Joseph Messou, and Jia-Bin Huang. Why can't i dance in the mall? learning to mitigate scene bias in action recognition. In Adv. Neural Inform. Process. Syst., 2019. 7 +[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conf. Comput. Vis. Pattern Recog., pages 248-255. IEEE, 2009. 1 +[11] Prithviraj Dhar, Rajat Vikram Singh, Kuan-Chuan Peng, Ziyan Wu, and Rama Chellappa. Learning without memorizing. In IEEE Conf. Comput. Vis. Pattern Recog., pages 5138-5146, 2019. 1 +[12] 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 Int. Conf. Machine learning, pages 647-655. PMLR, 2014. 1 +[13] Robert M French. Catastrophic forgetting in connectionist networks. Trends in cognitive sciences, 3(4):128-135, 1999. 1 +[14] Yen-Chang Hsu, Yen-Cheng Liu, Anita Ramasamy, and Zsolt Kira. Re-evaluating continual learning scenarios: A categorization and case for strong baselines. In NeurIPS Continual learning Workshop, 2018. 5 + +[15] Ronald Kemker and Christopher Kanan. Fearnet: Brain-inspired model for incremental learning. arXiv preprint arXiv:1711.10563, 2017. 2 +[16] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 5 +[17] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521-3526, 2017. 2, 4, 5 +[18] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Adv. Neural Inform. Process. Syst., 25:1097-1105, 2012. 1 +[19] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In Int. Conf. Learn. Represent., 2017. 2 +[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 Eur. Conf. Comput. Vis., pages 740-755. Springer, 2014. 1 +[21] Yaoyao Liu, Yuting Su, An-An Liu, Bernt Schiele, and Qianru Sun. Mnemonics training: Multi-class incremental learning without forgetting. In IEEE Conf. Comput. Vis. Pattern Recog., pages 12245-12254, 2020. 2 +[22] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 3431-3440, 2015. 1 +[23] David Lopez-Paz and Marc' Aurelio Ranzato. Gradient episodic memory for continual learning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Adv. Neural Inform. Process. Syst., volume 30. Curran Associates, Inc., 2017. 3, 4 +[24] Jiawei Ma, Xiaoyu Tao, Jianxing Ma, Xiaopeng Hong, and Yihong Gong. Class incremental learning for video action classification. In IEEE Int. Conf. Image Process., pages 504-508. IEEE, 2021. 1, 3 +[25] Oleksiy Ostapenko, Mihai Puscas, Tassilo Klein, Patrick Johannichen, and Moin Nabi. Learning to remember: A synaptic plasticity driven framework for continual learning. In IEEE Conf. Comput. Vis. Pattern Recog., pages 11321-11329, 2019. 2 +[26] Jaeyoo Park, Minsoo Kang, and Bohyung Han. Class incremental learning for action recognition in videos. In Int. Conf. Comput. Vis., pages 13698-13707, 2021. 1, 2, 3, 6 +[27] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In IEEE Conf. Comput. Vis. Pattern Recog., pages 2001-2010, 2017. 2, 4, 5, 6, 7, 8 +[28] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. Adv. Neural Inform. Process. Syst., 28:91-99, 2015. 1 +[29] Amelie Royer and Christoph H Lampert. Classifier adaptation at prediction time. In IEEE Conf. Comput. Vis. Pattern Recog., pages 1401-1409, 2015. 1 + +[30] Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. In Adv. Neural Inform. Process. Syst., pages 1163-1171, 2016. 2 +[31] Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. Continual learning with deep generative replay. arXiv preprint arXiv:1705.08690, 2017. 2 +[32] Kihyuk Sohn, David Berthelot, Chun-Liang Li, Zizhao Zhang, Nicholas Carlini, Ekin D. Cubuk, Alex Kurakin, Han Zhang, and Colin Raffel. Fixmatch: Simplifying semi-supervised learning with consistency and confidence. In Adv. Neural Inform. Process. Syst., 2020. 2 +[33] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. 1, 3, 5 +[34] Hao Su, Jia Deng, and Li Fei-Fei. Crowdsourcing annotations for visual object detection. In AAAI Conf. Artificial Intelligence Worksh., 2012. 1 +[35] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks for action recognition in videos. IEEE Trans. Pattern Anal. Mach. Intell., 41(11):2740-2755, 2019. 5, 6 +[36] Susan Wojcicki. Youtube at 15: My personal journey and the road ahead, 2020. 1 +[37] Maciej Wolczyk, Michal Zajac, Razvan Pascanu, Łukasz Kuciński, and Piotr Miłos. Continual world: A robotic benchmark for continual reinforcement learning. In Adv. Neural Inform. Process. Syst., 2021. 3 +[38] Yue Wu, Yinpeng Chen, Lijuan Wang, Yuancheng Ye, Zicheng Liu, Yandong Guo, and Yun Fu. Large scale incremental learning. In IEEE Conf. Comput. Vis. Pattern Recog., June 2019. 2, 4, 5 +[39] Qizhe Xie, Zihang Dai, Eduard H. Hovy, Thang Luong, and Quoc Le. Unsupervised data augmentation for consistency training. In Adv. Neural Inform. Process. Syst., 2020. 2 +[40] Saining Xie, Chen Sun, Jonathan Huang, Zhuowen Tu, and Kevin Murphy. Rethinking spatiotemporal feature learning: Speed-accuracy trade-offs in video classification. In Eur. Conf. Comput. Vis., pages 318–335, 2018. 6 +[41] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Z. Ghahramani, M. Welling, C. Cortes, N. Lawrence, and K. Q. Weinberger, editors, Adv. Neural Inform. Process. Syst., volume 27. Curran Associates, Inc., 2014. 1 +[42] Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In Int. Conf. Machine learning, pages 3987-3995. PMLR, 2017. 2 +[43] Han Zhang, Zizhao Zhang, Augustus Odena, and Honglak Lee. Consistency regularization for generative adversarial networks. In Int. Conf. Learn. Represent., 2020. 2 +[44] Hanbin Zhao, Xin Qin, Shihao Su, Zibo Lin, and Xi Li. When video classification meets incremental classes. arXiv preprint arXiv:2106.15827, 2021. 1, 2, 3 +[45] Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient gan training. In Adv. Neural Inform. Process. Syst., 2020. 2 \ No newline at end of file diff --git a/vclimbanovelvideoclassincrementallearningbenchmark/images.zip b/vclimbanovelvideoclassincrementallearningbenchmark/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..750a4bdb7761466408e0ff556ecf7259996f191a --- /dev/null +++ b/vclimbanovelvideoclassincrementallearningbenchmark/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81ef085084b8dfd5c4371e89130ce3f917a76971fd1c7c37d3306e7dfa74d6c +size 373956 diff --git a/vclimbanovelvideoclassincrementallearningbenchmark/layout.json b/vclimbanovelvideoclassincrementallearningbenchmark/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f7c6d36171ffdcf8721f72322df51f64e90323ac --- /dev/null +++ b/vclimbanovelvideoclassincrementallearningbenchmark/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8caafab9c5029332f5acaaeb248e134dfa7fdba1c2e3e4212f02761682228bb +size 310662 diff --git a/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_content_list.json b/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..079d12b9d093a1a9ca21200e2aa15b4db0538193 --- /dev/null +++ b/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed8c67747e42121e2c1532497fc1fdc01444e5b238f1e76032983ab3e69a991b +size 77841 diff --git a/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_model.json b/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_model.json new file mode 100644 index 0000000000000000000000000000000000000000..81403a8fb6da0370f95fd403bd4f04fab5f6b1af --- /dev/null +++ b/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89923abcf422a01798fcddf1216f4a954c339c3e33c42422e744e13ea1cd2bfa +size 96831 diff --git a/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_origin.pdf b/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..654921098bd75359fc8e57298aa960f986eb73fe --- /dev/null +++ b/voxelfieldfusionfor3dobjectdetection/1cd840ca-b9d3-4e68-9883-68f15e891614_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51a898178160d8d19261488fde61c0b0a268363c7c268ddf1aa39b302034d5d3 +size 2351492 diff --git a/voxelfieldfusionfor3dobjectdetection/full.md b/voxelfieldfusionfor3dobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..27ee9e45e7cd6eb807cb8821e7ecc7d51d67711c --- /dev/null +++ b/voxelfieldfusionfor3dobjectdetection/full.md @@ -0,0 +1,309 @@ +# Voxel Field Fusion for 3D Object Detection + +Yanwei Li $^{1}$ Xiaojuan Qi $^{2}$ Yukang Chen $^{1}$ Liwei Wang $^{1}$ Zeming Li $^{3}$ Jian Sun $^{3}$ Jiaya Jia $^{1,4}$ + +The Chinese University of Hong Kong1 The University of Hong Kong2 +MEGVII Technology3 SmartMore4 + +# Abstract + +In this work, we present a conceptually simple yet effective framework for cross-modality 3D object detection, named voxel field fusion. The proposed approach aims to maintain cross-modality consistency by representing and fusing augmented image features as a ray in the voxel field. To this end, the learnable sampler is first designed to sample vital features from the image plane that are projected to the voxel grid in a point-to-ray manner, which maintains the consistency in feature representation with spatial context. In addition, ray-wise fusion is conducted to fuse features with the supplemental context in the constructed voxel field. We further develop mixed augmentor to align feature-variant transformations, which bridges the modality gap in data augmentation. The proposed framework is demonstrated to achieve consistent gains in various benchmarks and outperforms previous fusion-based methods on KITTI and nuScenes datasets. Code is made available at https://github.com/dvlab-research/VFF. + +# 1. Introduction + +Object detection in 3D scenes is regarded as a vital task to provide accurate perception for real-world applications. Over the past decades, research attentions [15,27,38,40,51] have been dedicated to 3D object detection from raw point clouds. Due to the inherent properties of LiDAR sensors, the captured point clouds are usually sparse and cannot provide sufficient context to distinguish among hard cases in distant or occluded regions, which consequently yields inferior performance in such scenarios. However, in safety-critical applications like autonomous driving, the frequently occurred miss-detection is unacceptable. + +To address this issue, previous studies introduce image features in the cross-modality fusion [13, 32, 33]. The main challenge is to maintain the cross-modality consistency in this process that might be damaged in feature representation. + +![](images/eded8e72ac91c26741194ee0125774e46f6ddfece2a07a384c75869ff60bc2f0.jpg) +(a) Point-to-point manner + +![](images/8ff250ba4d63aa6c0c79237451bdf5e3ff39d5c820c82a0c40eb71acdb676cdd.jpg) +(b) Point-to-ray manner +Figure 1. Compared with previous work [17,50] in 1a that projects feature from raw image to voxel and represents in a point-to-point manner, the proposed method in 1b projects feature from augmented image to voxel field and represents in a point-to-ray manner. Dotted and solid arrow denote point- and ray-level projection. + +tion considering context deficiency and density variance, and data augmentation for cross-modality misalignment. In particular, previous work represents image features in a point-to-point manner in Figure 1a, which conducts fusion in each single point, constrained by the sparsity of point clouds. In this case, the rich context cues from images cannot be well utilized because adjacency in the image plane cannot be guaranteed in 3D space. Meanwhile, given augmented point clouds, traditional approaches [17, 50] usually keep raw images unchanged and reverse transformations in point clouds for pairwise correspondence. However, because of the flipping and scaling variance in 2D convolutions, the asynchronous augmentation brings cross-modality misalignment and instability. + +In this paper, we propose a new cross-modality framework, called voxel field fusion (VFF). Mixed augmentation for both modalities is first applied for data-level preprocessing. As briefly illustrated in Figure 1b, VFF projects augmented image features to the voxel grid and represents it in a point-to-ray manner, called voxel field similar to that in neural rendering [19, 20]. In this way, representations of both modalities are well aligned, and surrounding spatial context is replenished in voxel field. In short, the key idea of VFF is to maintain modality consistency by representing and fusing augmented image feature as a ray in voxel field. + +The image-to-voxel dense rendering is usually resource-intensive or requires extra models for depth prediction [25, 47]. To facilitate this process, we draw inspiration from recent advances in neural rendering [19, 20, 48] and propose a learnable sampler and ray-wise fusion for efficient ray construction and cross-modality fusion. In particular, instead of random sampling [20], learnable sampler is designed to select image features for interaction within the activated area with high responses, where features are represented in a point-to-ray manner as aforementioned. Then, ray-wise fusion is conducted in the voxel field according to the predicted score of each voxel along the ray. For the misalignment in augmentation, the mixed augmentor is further proposed to bridge this gap by aligning feature-variant augmentation (flipping and scaling) in image level. + +With the above designs, the cross-modality consistency can be maintained from the aspect of feature representation and data augmentation in an end-to-end manner. Generally, the proposed VFF is distinguished from two aspects. First, it projects image features in a point-to-ray manner and represents, as well as fuses them, in the voxel field, which eliminates the modality gap and provides accurate 3D context to detect hard cases. Second, it efficiently samples high-responded features from augmented images, which enables the network to construct each ray on the fly. + +The overall framework, called voxel field fusion, can be easily instantiated with various voxel-based backbones for 3D object detection, which is fully elaborated in Section 3. Extensive empirical studies of the designed workflow are conducted in Section 4 to reveal the effect of each component. We further report experimental results on two widely-adopted datasets, namely KITTI [10] and nuScenes [2]. The proposed VFF is proved to achieve consistent increases over various benchmarks and attains significant gain with $2.2\%$ AP over strong baselines on hard cases of KITTI test set. Meanwhile, it surpasses previous fusion-based methods by a large margin and achieves leading performance on nuScenes test set with $68.4\%$ mAP and $72.4\%$ NDS. + +# 2. Related Work + +LiDAR-based 3D Detection. Given point clouds as input, traditional LiDAR-based approaches are usually distinguished by their representation for irregular data, e.g., grid and point. Grid-based methods project the point clouds to regular grids and process them by 2D or 3D networks. The methods with 2D networks usually construct 2D bird-view grids [6, 39, 40] or pseudo image [15] and generating 3D bonding boxes on top of it. Meanwhile, the approaches with 3D networks construct 3D voxels from the divided point clouds and predict boxes with detection heads [8, 38, 44]. Point-based methods directly handle raw point cloud with set abstraction [24] and generate 3D proposals on top of it [21, 22, 28, 42]. Given the sparse property of point cloud, + +the recognition ability is limited due to lack of texture features, especially in real scenes with multiple categories like nuScenes [2] dataset. + +Image-based 3D Detection. Previous image-based methods construct the network and extract features from pure monocular or multiple images for 3D box prediction. Given a single image, several monocular-based approaches [1, 31, 35] try to regress and predict 3D boxes directly, while others propose to construct middle-level representation and perform detection on top of it [36, 47]. Because of the depth requirement in 3D detection, previous work also tries to enhance the ability from depth estimation [5, 25, 30]. Another stream for relatively accurate depth is utilizing stereo or multi-view images to construct 3D geometry volume [4, 7, 43] and conduct object detection on top of it. Although depth estimated from multi-view is much better than that from a single image, it still lags behind the accurate point cloud from LiDAR. + +Cross-modality Fusion. With inherent limitation of every single modality, there are several methods to combine the strength of image and LiDAR with cross-modality fusion. In particular, point- and proposal-level fusion are introduced to combine features from different modalities. Point-level fusion [13, 17, 33] is usually applied in early stage of the network, while the proposal-based manner [6, 14, 46] is often adopted in the late stage for instance-level fusion. There are also methods that combine these two fusion manners, such as MVX-Net [32]. Compared with proposal-level fusion, the point-level one is a more subtle manner, which is also adopted in our method for deep fusion. Previous point-level fusion approaches [13, 33] usually enhance the point feature from image semantics in a point-to-point manner, ignoring the surrounding context in 3D space. Different from them, the proposed voxel field fusion represents the augmented image feature in a point-to-ray manner in the voxel field, which makes further use of merits from both modalities with sufficient context. + +# 3. Voxel Field Fusion + +The overall framework is conceptually simple: mixed augmentor is designed to align data augmentation across modalities; learnable sampler is introduced to efficiently select key features for interaction; and ray-wise fusion is proposed to fuse and combine features along the ray. + +# 3.1. Mixed Augmentor + +Given inputs captured from the camera and LiDAR, we first process the data with correspondence, as presented in Figure 2. To this end, a joint strategy, called mixed augmentor, is proposed to handle the aforementioned augmentation misalignment during training from two aspects, namely sample-added and sample-static augmentation. + +![](images/c134d46344e8ed036e64cd2b642ef1edebb595d7cd74a53cf71e2e48d1836419.jpg) +Figure 2. The framework for 3D object detection with voxel field fusion. In particular, inputs with different modalities are firstly processed with the mixed augmentor that is adopted for training only. Then, features of both modalities are respectively extracted in feature encoder, where the correspondence is established in ray constructor. In voxel field fusion, the vital image feature for interaction is selected with the designed sampler. And the ray-wise fusion is then conducted with the high-responded feature along each ray. With the fused and newly generated feature in the voxel field, the following detection backbone and head are applied to predict the final 3D proposals. + +Table 1. Corresponding operations in the mixed augmentor. + +
typePoint operationImage operation
Sample-addedGT-samplingCopy-paste
Sample-staticFlipImage-flip
RescaleImage-rescale
RotateReproject
+ +Sample-added. The sample-added augmentation is defined to increase samples in each scene from the whole database, i.e., GT-sampling [38]. In this case, we supplement the RGB data of sampled 3D objects in a copy-paste manner [9, 49]. That means for each sampled object, we crop data within the projected 2D box and paste it onto the input image, where the crops are reorganized according to the actual depth or the cropping order. In this process, the occluded points covered by near samples are filtered to avoid the cross-modality ambiguity in nuScenes dataset, similar to that of [34]. + +Sample-static. The sample-static augmentation includes a set of transformations without new sample added, e.g., flipping, rescaling, and rotation. Different from previous work [34, 50], which uses reprojection to find the pairwise correspondence across modalities, we utilize image-level operations for augmentations that affect pretrained 2D convolutions, as summarized in Table 1. Specifically, due to inherent properties like flipping and scaling variance of convolution, the asynchronous augmentation across modalities brings the misalignment. For example, if a flipping operation is applied to point cloud $\mathcal{C}$ but not corresponding images $\mathcal{P}$ , the left-right context of point $p_i$ projected from point $c_i$ would be malposed. We further validate effectiveness of the proposed workflow in Tables 2 and 3. + +# 3.2. Voxel Field Construction + +With the above designed augmentor, we have input image $\mathbf{X}^I\in \mathbb{R}^{H\times W\times 3}$ and voxelized point cloud $\mathbf{X}^V\in$ $\mathbb{R}^{X\times Y\times Z\times 4}$ , as depicted in Figure 2. The feature encoder with stacked convolutions is applied to extract feature $\mathbf{F}_l^I$ and $\mathbf{F}_l^V$ for image and voxel in the $l$ -th stage, where $l$ is set to 1 by default and further investigated in Table 7. With the ray constructor, the correspondence between voxel bin $v_{i}$ and image pixel $p_i$ is established in voxel field with the given projection matrix $\mathbf{T}_{\mathrm{Voxel}}\to \mathrm{Image}$ . + +Voxel Field. In voxel representation, point clouds of a scene are captured within a voxel space $\mathcal{V}$ that contains several bins. Every single voxel $v$ in it can be represented by the function $\mathcal{F}$ , called voxel field. Specifically, for the feature $\mathrm{F}_{l,v}^{V}$ in voxel bin $v$ with coordinates $(x,y,z)$ , we have $\mathrm{F}_{l,v}^{V} = \mathcal{F}(x,y,z)$ . In the voxel field, the ray $\mathcal{R}_i\in \mathcal{V}$ from the point $p_i$ through the voxel space $\mathcal{V}$ in a fixed direction is constructed with + +$$ +p _ {i} = v _ {j} \mathbf {T} _ {\mathrm {V o x e l} \rightarrow \mathrm {I m a g e}} ^ {T}, \forall v _ {j} \in \mathcal {R} _ {i}. \tag {1} +$$ + +This means all voxel bins $v_{j}$ with the same projected point $p_i$ are marked to be located in the $i$ -th ray set $\mathcal{R}_i$ . Theoretically, the number of the whole set $\mathcal{R}$ can be up to $W \times H$ if without constraint, which brings huge computational cost that linearly increases with the number of sampled points. + +Learnable Sampler. To reduce the computational burden, learnable sampler is proposed to select $n$ points from the image plane for ray interaction, which brings $n$ rays in total. In particular, we first split the image to several non-overlap windows with size $w \times w$ and filter out the empty windows with no projected point $p_i$ , where $w$ is set to 64 by default. Different from heuristic approaches for sampling, we adopt a learnable strategy to select key features by importance, as illustrated in Figure 3. For heuristic manner, $n$ features from the image plane are randomly sampled + +![](images/f13698a867862433267549673813545ee12a5d84c01c1c27de256f33079acdf5.jpg) +(a) Sample by uniformity + +![](images/a69c035a72daa88cbaee93131a63958e2d8a0b01d79c4218c35db9e596bb0faa.jpg) +(b) Sample by density + +![](images/87c43779856950738058b2569aca051402f9a0b3e1df5cd1f02a126060fa74ce.jpg) +(c) Sample by sparsity + +![](images/3a0c7a4f047429850d88c23b9d93d510f5a436e760350dcc47ec5eea3612b937.jpg) +(d) Sample by importance + +according to uniformity, density, and sparsity of projected LiDAR points. Although the heuristic sampling method reduces the cost for ray construction, it still introduces several useless points that could increase computation in this process. To facilitate the efficiency, a learnable sampler $\mathcal{S}$ is further proposed, which only conducts the sampling procedure from the predicted important sub-region with high responses, as depicted in Figure 3d. Therefore, a set of sampled pixels $\widehat{\mathcal{P}}$ is achieved by + +$$ +\mathcal {S} (\mathcal {P}) = \mathcal {U} \left(\left\{p _ {i}: \mathbb {1} \left(\delta \left(f \left(\mathrm {F} _ {l, i} ^ {I}\right)\right)\right) = 1 \right\}\right), \tag {2} +$$ + +where $f, \delta$ , and $\mathcal{U}$ denote stacked convolutions, sigmoid activation, and uniform sampler, respectively. The indicator $\mathbb{1}$ is set to 1 if the activated response in $p_i$ surpasses the threshold 0.5. Considering the importance of foreground instance in 3D detection, here we set the Gaussian region inside each 2D object box to be the positive area for supervision, which is further explained in Section 3.4. In this way, the amount of sampled pixels $\widehat{\mathcal{P}}$ , as well as the cost, are further reduced. Meanwhile, the high accuracy is still retained thanks to the proposed learnable sampler, as compared in Table 4. + +# 3.3. Ray-voxel Interaction + +Recall from Equation (1), the ray $\mathcal{R}_i$ is constructed with the pixel $\hat{p}_i \in \widehat{\mathcal{P}}$ from the above designed sampler $\mathcal{S}$ . Thus, the cross-modality fusion can be conducted with the ray $\mathcal{R}_i$ in the voxel field. Previous research [17, 33, 34] performs fusion with sparse points from LiDAR sensor only, with no consideration of surrounding 3D context, as presented in Figure 4a. Therefore, a naive solution is to extend the perception region to include points that are located in the nearby region with radius $r$ of the voxel space $\mathcal{V}$ , named local fusion. In this section, we first introduce the basic local fusion and then improve over it to formulate the designed ray-wise fusion. + +![](images/d2265541b9bdc056f2a65a0ee1de5015802f0817737e74c29493e23a246f6d81.jpg) +(a) Single fusion with each point + +![](images/2b04f66efc516a4c3adb04acf1dbde202dca663bd6d645e589652dcd610996b1.jpg) +(b) Local fusion with aggregation + +![](images/90c99ee854a4fd7adad81fc9bb1e70716c0b665943c46fa6c8830cefb23f462f.jpg) +Figure 3. Toy examples of different sampling methods. The blue points denote the sampled pixels for ray interaction. Compared with heuristic manners, our proposed learnable sampler in 3d only considers the important green area with high responses. +Figure 4. Toy examples of different fusion methods. The red point $\hat{v}_j$ denotes the anchor voxel with LiDAR points. Green points in $\mathcal{R}_i$ indicate voxel bins $v_{j}$ within the ball with radius $r$ . The dotted line in 4d represents the assigned existence probability for training. + +![](images/6fd4dd7d1cd1259581bf419455246af77cf6dc00014777e5582b0a8992613b82.jpg) +(c) Local fusion with propagation +(d) Ray-wise fusion along the ray + +Local Fusion. In this case, two types of local fusion are designed as our benchmark. Given the prior that features along the ray are more likely to be located near LiDAR points and the closer features usually contribute more, local fusion is conducted inside each Gaussian ball and ignores outside features along ray $\mathcal{R}_i$ . Here, we call the voxels that contains LiDAR points as anchor voxels. The local fusion is divided into aggregation and propagation according to specific operations. The aggregation manner in Figure 4b aggregates image features to the anchor voxel $\hat{v}_j$ with Gaussian weight $\omega$ , while the propagation one in Figure 4c propagates features in $\hat{v}_j$ to each voxel with weight $\omega$ . + +Ray-wise Fusion. Although the designed local fusion extends the perception region from a single voxel to near area, it still sets a hard boundary in this process. And such an approach cannot fully release the potential of ray-wise representation, especially in most of the voxels without LiDAR points. Thus, besides the anchor voxel $\hat{v}_j$ , we further extend the operation region to the whole ray, called ray-wise fusion. Compared with single fusion in Figure 4a, ours is more robust to sensor jitter due to a larger fault-tolerant space brought by Gaussian ball. Different from local fusion, the ray-wise manner in Figure 4d takes the above local prior to label assign in the training stage only, as elaborated in Section 3.4. Specifically, given the voxel $v_j$ along the ray $\mathcal{R}_i$ , its probability $\omega_{j}$ is calculated by + +$$ +\omega_ {j} = \delta \left(\left\langle \mathbf {F} _ {l, i} ^ {I}, \mathbf {F} _ {l, v _ {j}} ^ {\prime} \right\rangle\right), \tag {3} +$$ + +where $\delta$ denotes sigmoid activation, and the voxel feature $\mathbf{F}_{l,v_j}^{\prime} = \mathrm{MLP}([x_j,y_j,z_j])$ is transformed from the coordinate $(x_{j},y_{j},z_{j})$ of $v_{j}$ with multi-layer perceptron. Here, $\omega_{j}$ can be viewed as the response of image feature $\mathbf{F}_{l,i}^{I}$ to the position of $v_{j}$ . From another perspective, this operation converts the monocular depth estimation with $\mathbf{F}_{l,i}^{I}$ from a + +regression problem to classification in a single ray $\mathcal{R}_i$ . It actually reduces the solution space to a ray. With the predicted score $\omega_{j}$ , we conduct the fusion in voxel $v_{j}$ with + +$$ +\widehat {\mathcal {F}} (x _ {j}, y _ {j}, z _ {j}) = \mathcal {F} (x _ {j}, y _ {j}, z _ {j}) + \omega_ {j} f ([ \mathbf {F} _ {l, i} ^ {I}, \mathbf {F} _ {l, v _ {j}} ^ {\prime} ]). \quad (4) +$$ + +Here, $f$ denotes the convolution. $\widehat{\mathcal{F}}(x_j, y_j, z_j)$ indicates the new generated feature in voxel $v_j$ . In this process, $\mathcal{F}(x_j, y_j, z_j)$ is set to 0 if the original voxel $v_j$ is empty, which can be viewed as completion in empty voxels of $\mathcal{V}$ . For network efficiency, only the voxels with top predicted scores $\omega$ are selected for fusion, which accounts for a quarter of original non-empty voxels in total. As presented in Figure 2, the fused feature $\widehat{F}_l^V$ is obtained for the next stage in the 3D detection backbone and the following detection head. This framework can be instantiated with various voxel-based backbones for experiments in Section 4, e.g., PV-RCNN [27], Voxel R-CNN [8], and CenterPoint [44]. + +# 3.4. Optimization Objectives + +Recall from Equations (2) and (3), there are two learnable factors required supervision. For learnable sampler $S$ , given the prior that foreground objects are usually more important, we draw Gaussian distribution inside each box with + +$$ +\mathbf {Y} _ {l, u, v} = \exp \left(- \frac {\left(u - \hat {u} _ {i}\right) ^ {2} + \left(v - \hat {v} _ {i}\right) ^ {2}}{2 \sigma_ {i} ^ {2}}\right), \tag {5} +$$ + +where $(\hat{u}_i,\hat{v}_i)$ denotes coordinate of the $i$ -th object center, and $\sigma_{i}$ indicates the object size-adaptive standard deviation. For activated probability $\omega_{j}$ , the Gaussian-like supervision $\hat{\omega}_{j}$ of voxel $v_{j}$ is formulated as + +$$ +\hat {\omega} _ {j} = \exp \left(- \frac {(x - \hat {x} _ {j}) ^ {2} + (y - \hat {y} _ {j}) ^ {2} + (z - \hat {z} _ {j}) ^ {2}}{2 \sigma_ {j} ^ {2}}\right), \tag {6} +$$ + +where $(\hat{x}_j,\hat{y}_j,\hat{z}_j)$ denotes the location of anchor voxel $\hat{v}_j$ in Figure 4, and $\sigma_{j}$ indicates the size-adaptive standard deviation. And the voxels with Euclidean distance larger than radius $r$ are assigned as 0, which is investigated in Table 6. In this way, positions of LiDAR points can be utilized to provide supervision for feature selection in the ray. Finally, the objective function of voxel field fusion is defined as + +$$ +\mathcal {L} _ {\mathrm {v f f}} = \lambda_ {\mathrm {s}} \operatorname {B C E} \left(f \left(\mathrm {F} _ {l} ^ {I}\right), \mathbf {Y} _ {l}\right) + \lambda_ {\mathrm {r}} \sum^ {m} \operatorname {F L} (\omega , \hat {\omega}) / m, \tag {7} +$$ + +where $f(\mathrm{F}_l^I)$ represents the convolved feature in Equation (2), and $m$ denotes the size of ray set $\mathcal{R}$ . BCE and FL indicate the binary cross-entropy loss and focal loss [18], respectively. $\lambda_{\mathrm{s}}$ and $\lambda_{\mathrm{r}}$ denote the balanced loss factor for sampler and ray-wise fusion. The optimization target for the whole network is the summation of raw detection loss $\mathcal{L}_{\mathrm{det}}$ and voxel field fusion loss $\mathcal{L}_{\mathrm{vff}}$ . + +# 4. Experiments + +In this section, the experimental setup is first introduced. Then, we give the analysis of each component on KITTI val set with PV-RCNN [27] as the backbone. Comparisons with previous work on nuScenes [2] and KITTI [10] datasets are reported in the end. + +# 4.1. Experimental Setup + +Dataset. KITTI dataset [10] is a widely-adopted multimodality benchmark for 3D object detection, which provides synchronized LiDAR points and front-view camera images. It contains 7,481 samples for training and 7,518 samples for testing, where the training samples are usually split to train set with 3,712 samples and val set with 3,769 samples. nuScenes dataset [2] is a large-scale benchmark for autonomous driving with 1,000 scenes, which are divided into 700, 150, 150 scenes in the train set, val set, and test set, respectively. Here, we use the synchronized data with 10 object categories that are collected from a 32-beam LiDAR and six cameras in a 360-degree field of view. + +Implementation Details. In this work, three different backbones are adopted to validate the proposed framework, i.e., PV-RCNN [27] and Voxel R-CNN [8] on KITTI dataset, and CenterPoint [44] on nuScenes dataset. We follow corresponding architecture and training settings in each network. In the proposed VFF, three convolutions and MLPs are applied to the learnable sampler in Equation (2) and feature transformation in Equation (3), where individual MLP is used for each camera view. For optimization, $\lambda_{\mathrm{s}}$ and $\lambda_{\mathrm{r}}$ in Equation (7) is set to 2 and 5 in all our experiments. Besides the non-empty voxels, we select features along each ray with probability $\omega$ bigger than 0.05 in the inference stage. + +# 4.2. Component-wise Analysis + +Aligned Augmentation. As elaborated in Section 3.1, aligned data plays a vital role in cross-modality consistency. In Table 2, we compare the joint strategy for the sample-static augmentation listed in Table 1, where PV-RCNN and basic single fusion are adopted. As compared in Table 2, the designed image-level transformation contributes significantly to feature-variant augmentations, namely Flip and Rescale. If flip augmentation is adopted only, the performance gain is up to $1.65\%$ AP on moderate cases. + +Mixed Augmentor. The proposed mixed augmentor in Section 3.1 maintains consistency in augmentation from sample-added and sample-static strategies. Here, we investigate the augmentor with VFF in Table 3. In the mixed augmentor, sample-added strategy yields notable gain with $6.28\%$ AP. With the sample-static manner, the network with VFF is further improved to $85.51\%$ AP on moderate cases. For clear comparisons, the following ablation studies are conducted with sample-added strategy only by default. + +Table 2. Comparisons on different augmentations on the KITTI val set. aug type and align type denote the adopted sample-static augmentation and type of cross-modality alignment, respectively. + +
aug typealign typeAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
None-88.6981.8279.91
+ Flipreproject89.2682.5082.27
ours91.3484.1582.48
+ Rescalereproject91.7884.2582.58
ours91.6884.5382.59
+ Rotatereproject91.3084.4582.64
ours91.4384.5782.61
+ +Table 3. Comparisons on different strategies in mixed augmentor on the KITTI val set. strategy and fusion denote the strategy in mixed augmentor and the usage of voxel field fusion, respectively. + +
strategyfusionAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
Original×86.4075.4771.32
✓87.0876.2572.03
+ Added×87.7779.1976.71
✓89.5682.5380.00
+ Static×91.5384.3682.29
✓92.3185.5182.92
+ +Table 4. Comparisons on different sampling types on the KITTI val set. sample type and learn denote the adopted sampler and learnable manner for feature selection in Section 3.2, respectively. + +
sample typelearnAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
UniformityX88.6981.9079.82
SparsityX89.0981.6879.85
DensityX88.7282.0181.42
Importance✓89.1182.1079.98
+ +Learnable Sampler. To facilitate voxel field construction, learnable sampler is proposed in Section 3.2. In Table 4, different sampling methods are compared, which are divided into heuristic and learnable sets. As presented in Figure 3, the heuristic sampler contains the type of uniformity, sparsity, and density. And the network with heuristic sampler achieves peak performance with $82.01\% \mathrm{AP}$ when sampling based on density. As for the learnable sampler, the proposed sampling with importance in Figure 3d attains a superior result than the heuristic one with $82.10\% \mathrm{AP}$ . + +Table 5. Comparisons on different fusion strategies on the KITTI val set. range and operation denote the fusion range and specific operation, respectively. Single fusion is a subset of the others. + +
rangeoperationAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
Single-88.6981.8279.91
Localaggregate89.0082.1281.52
propagate89.1682.0781.17
Ray-wisegenerate89.5682.5380.00
+ +Table 6. Comparisons on different types of supervision on the KITTI val set. radius and gaussian denote the adopted radius $r$ and the usage of Gaussian distribution in Section 3.3, respectively. + +
radiusgaussianAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
0×89.1182.1079.98
1✓89.5682.5380.00
2✓88.3381.7579.54
+ +Table 7. Comparisons on different fusion positions on the KITTI val set. stage and fusion denote the specific fusion stage in the network and the usage of voxel field fusion, respectively. + +
stagefusionAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
-X87.7779.1976.71
Stage-1✓89.5682.5380.00
Stage-2✓89.1280.4379.70
Stage-3✓89.6480.2777.93
Stage-4✓88.6980.2278.10
+ +Ray-voxel Interaction. The interaction between ray and voxel is a core operation of the proposed framework in Section 3.3. Here, we compare different fusion methods presented in Figure 4. As shown in Table 5, the performance improves with fusion range increases from a single point to the whole ray. Compared with single fusion and local fusion, the ray-wise strategy surpasses them with a significant gap, which proves the effectiveness of ray-wise fusion. + +Ray-wise Supervision. Considering noise from sensor jitter or other issues, the Gaussian-like assignment is proposed to provide supervision in Figure 4d and Equation (6). Different supervision strategies are compared in Table 6. It is clear that the Gaussian distribution with radius 1 results in the best performance $82.53\%$ AP. And extra region provides wrong guidance to the ray that goes through each Gaussian ball, which harms feature localization in each ray. + +Table 8. Comparisons on different methods with a single model on the KITTI val set. * denotes our result from official source code. + +
methodAP3D@Car-R40 (IoU=0.7)AP3D@Car-R11 (IoU=0.7)APBEV@Car-R40 (IoU=0.7)
EasyModerateHardEasyModerateHardEasyModerateHard
LiDAR-based
SECOND [38]---87.4376.4869.10---
PointRCNN [28]---88.8878.6377.38---
STD [42]---89.7079.8079.30---
PV-RCNN [27]92.5784.8382.6989.3583.6978.7095.7691.1188.93
Voxel R-CNN [8]92.3885.2982.8689.4184.5278.9395.5291.2588.99
LiDAR+RGB
UberATG-MMF [16]---88.4077.4370.22---
3D-CVF [46]89.6779.8878.47------
EPNet [13]92.2882.5980.14---95.5188.7688.36
PV-RCNN*91.5384.3682.2988.9583.5178.7292.8290.4388.41
+ VFF92.3185.5182.9289.4584.2179.1395.4391.4090.66
Voxel R-CNN*92.2784.8882.5089.4683.6178.8095.5191.1388.85
+ VFF92.4785.6583.3889.5184.7679.2195.6591.7591.39
+ +Table 9. Comparisons on cross-modality fusion of different categories on the KITTI val set. We report results of car, pedestrian, and cyclist with IoU=0.7, 0.5, and 0.5, respectively. + +
categoryfusionAP3D-R40
EasyModerateHard
CarX91.5384.3682.29
✓92.3185.5182.92
PedestrianX66.0459.1954.15
✓73.2665.1160.03
CyclistX91.3172.1867.60
✓89.4073.1269.86
+ +Table 10. Comparisons on different types of pretrained 2D backbone on the KITTI val set. model denotes the adopted pretrained model in feature encoder with corresponding task. + +
modelAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
Cls: ResNet [12]91.9685.3384.24
Det: Faster R-CNN [26]91.9885.1182.52
Seg: DeepLabV3 [3]92.3185.5182.92
+ +Fusion Stage. We further investigate the fusion stage of the proposed VFF in Table 7. Compared with the baseline, the designed fusion yields superior performance in each stage. The early-stage fusion contributes more, which surpasses the baseline with $3.34\%$ AP. Meanwhile, fusion in the later stage brings less gain, which could be attributed to the low + +Table 11. Comparisons on cross-modality fusion of different data on the KITTI val set. beam num and fusion denote LiDAR beam number and the usage of voxel field fusion, respectively. + +
beam numfusionAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
Beam-64X91.5384.3682.29
✓92.3185.5182.92
Beam-32X91.1479.5176.54
✓92.2082.3679.81
+ +resolution for key feature selection and insufficient fusion. + +Different Categories. The ray-wise representation of image features in VFF introduces sufficient context for ambiguous examples. In Table 9, we report comparisons with VFF on various categories. It is clear that the performance of each class has been improved especially for pedestrian, which is up to nearly $6\%$ AP on cases of all difficulties. + +Pretrained Network. In Table 10, we analyze the pretrained 2D backbone, which provides the feature $\mathbf{F}_l^I$ in the feature encoder of Figure 2. Here, we adopt all the augmentations and ResNet-50 based models for different tasks in Table 10, i.e., classification, detection, and semantic segmentation. Compared with other tasks, the network [3] provides better features if pretrained with semantic setting. + +Sparse LiDAR. To verify the effectiveness of VFF with different LiDAR sparsity, we downsample the LiDAR points on the KITTI dataset to 32-beam following [47]. As pre + +Table 12. Comparisons on different methods with single model on the nuScenes test set. + +
methodmAPNDSCarTruckBusTrailerC.V.Ped.Motor.BicycleT.C.Barrier
LiDAR-based
PointPillars [15]30.545.368.423.028.223.44.159.727.41.130.838.9
3DSSD [41]42.656.481.247.261.430.512.670.236.08.631.147.9
CBGS [52]52.863.381.148.554.942.910.580.151.522.370.965.7
CenterPoint [44]60.367.385.253.563.656.020.084.659.530.778.471.1
LiDAR+RGB
PointPainting [33]46.458.177.935.836.237.315.873.341.524.162.460.2
FusionPainting [37]66.370.486.358.566.859.427.787.571.251.784.270.2
MVP [45]66.470.586.858.567.457.326.189.170.049.385.074.8
PointAugmenting [34]66.871.087.557.365.260.728.087.974.350.983.672.6
VFF + CenterPoint68.472.486.858.170.261.032.187.178.552.983.873.9
+ +Table 13. Comparisons on different methods on KITTI test set. + +
methodAP3D@Car-R40 (IoU=0.7)
EasyModerateHard
LiDAR-based
PointPillars [15]82.5874.3168.99
PointRCNN [28]86.9675.6470.70
Part-A2[29]87.8178.4973.51
STD [42]87.9579.7175.09
SA-SSD [11]88.7579.7974.16
PV-RCNN [27]90.2581.4376.82
Voxel R-CNN [8]90.9081.6277.06
LiDAR+RGB
MV3D [6]74.9763.6354.00
F-PointNet [23]82.1969.7960.59
AVOD [14]83.0771.7665.73
UberATG-MMF [16]88.4077.4370.22
EPNet [13]89.8179.2874.59
3D-CVF [46]89.2080.0573.11
VFF + PV-RCNN89.5881.9779.17
VFF + Voxel R-CNN89.5082.0979.29
+ +sented in Table 11, the proposed VFF achieves significant gain with $2.85\%$ AP over the baseline. For hard cases, the gap is enlarged to $3.27\%$ AP. It could attribute to the replenishment of empty voxels that lack LiDAR points. + +# 4.3. Main Results + +nuScenes. We further report results on the large scale nuScenes test set. As shown in Table 12, the proposed method surpasses all previous approaches with $68.4\%$ mAP and $72.4\%$ NDS. Compared with our strong backbone CenterPoint [44], the performance gain brought by VFF is up to + +8.1% mAP and 5.1% NDS. As for ambiguous classes like motorcycle and bicycle, the gain is even up to 19% AP. + +KITTI. In Table 8, we carry out experiments on KITTI val set. Compared with the baseline, our proposed VFF achieves consistent gain on various evaluation metrics and attains $85.51\%$ and $85.65\%$ AP with PV-RCNN [27] and Voxel R-CNN [8], respectively. The result on KITTI test set is reported on Table 13. Compared with previous fusion-based methods, the proposed VFF pushes the top performance to $81.97\%$ AP and $82.09\%$ AP with PV-RCNN and Voxel R-CNN as the backbone, respectively. Thanks to the designed fusion manner, our method outperforms all previous models on hard cases with $79.29\%$ AP, which attains $2.2\%$ AP improvement over the baseline. + +# 5. Conclusion + +We have presented the voxel field fusion, a conceptually simple yet effective framework for cross-modality fusion in 3D object detection. The key difference from prior works lies in that we maintain modality consistency by representing and fusing augmented image features as a ray in the voxel field. In particular, inconsistency in feature representation for multi-modalities is eliminated with learnable sampler and ray-wise fusion. Meanwhile, the mixed aug-mentor is developed to bridge the gap in cross-modality data augmentation. Experiments on KITTI and nuScenes dataset prove the effectiveness of the proposed framework, which achieves consistent gains in various benchmarks and surpasses previous fusion-based models on both datasets. + +# 6. Acknowledgments + +We thank Yilun Chen and Tao Hu for their suggestions. This work is supported by The National Key Research and Development Program of China (No. 2017YFA0700800) and Beijing Academy of Artificial Intelligence (BAAI). + +# References + +[1] Garrick Brazil and Xiaoming Liu. M3d-rpn: Monocular 3d region proposal network for object detection. In ICCV, 2019. +[2] Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuscenes: A multimodal dataset for autonomous driving. In CVPR, 2020. +[3] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv:1706.05587, 2017. +[4] Rui Chen, Songfang Han, Jing Xu, and Hao Su. Point-based multi-view stereo network. In ICCV, 2019. +[5] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Andrew G Berneshawi, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals for accurate object class detection. In NeurIPS, 2015. +[6] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017. +[7] Yilun Chen, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Dsgn: Deep stereo geometry network for 3d object detection. In CVPR, 2020. +[8] Jiajun Deng, Shaoshuai Shi, Peiwei Li, Wengang Zhou, Yanyong Zhang, and Houqiang Li. Voxel r-cnn: Towards high performance voxel-based 3d object detection. In AAAI, 2021. +[9] Nikita Dvornik, Julien Mairal, and Cordelia Schmid. Modeling visual context is key to augmenting object detection datasets. In ECCV, 2018. +[10] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. +[11] Chenhang He, Hui Zeng, Jianqiang Huang, Xian-Sheng Hua, and Lei Zhang. Structure aware single-stage 3d object detection from point cloud. In CVPR, 2020. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[13] Tengteng Huang, Zhe Liu, Xiwu Chen, and Xiang Bai. Epnet: Enhancing point features with image semantics for 3d object detection. In ECCV, 2020. +[14] Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven L Waslander. Joint 3d proposal generation and object detection from view aggregation. In IROS, 2018. +[15] Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In CVPR, 2019. +[16] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-task multi-sensor fusion for 3d object detection. In CVPR, 2019. +[17] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In ECCV, 2018. +[18] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In ICCV, 2017. + +[19] Lingjie Liu, Jiatao Gu, Kyaw Zaw Lin, Tat-Seng Chua, and Christian Theobalt. Neural sparse voxel fields. In NeurIPS, 2020. +[20] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020. +[21] Charles R Qi, Xinlei Chen, Or Litany, and Leonidas J Guibas. Imvotenet: Boosting 3d object detection in point clouds with image votes. In CVPR, 2020. +[22] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. In ICCV, 2019. +[23] Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum pointnets for 3d object detection from rgb-d data. In CVPR, 2018. +[24] Charles R Qi, Li Yi, Hao Su, and Leonidas J Guibas. Point-net++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, 2017. +[25] Cody Reading, Ali Harakeh, Julia Chae, and Steven L. Waslander. Categorical depth distribution network for monocular 3d object detection. In CVPR, 2021. +[26] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: towards real-time object detection with region proposal networks. TPAMI, 2016. +[27] Shaoshuai Shi, Chaoxu Guo, Li Jiang, Zhe Wang, Jianping Shi, Xiaogang Wang, and Hongsheng Li. Pv-rcnn: Point-voxel feature set abstraction for 3d object detection. In CVPR, 2020. +[28] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointr-cnn: 3d object proposal generation and detection from point cloud. In CVPR, 2019. +[29] Shaoshuai Shi, Zhe Wang, Jianping Shi, Xiaogang Wang, and Hongsheng Li. From points to parts: 3d object detection from point cloud with part-aware and part-aggregation network. TPAMI, 2020. +[30] Xuepeng Shi, Zhixiang Chen, and Tae-Kyun Kim. Distance-normalized unified representation for monocular 3d object detection. In ECCV, 2020. +[31] Andrea Simonelli, Samuel Rota Bulo, Lorenzo Porzi, Manuel López-Antequera, and Peter Kontschieder. Disentangling monocular 3d object detection. In ICCV, 2019. +[32] Vishwanath A Sindagi, Yin Zhou, and Oncel Tuzel. Mvxnet: Multimodal voxelnet for 3d object detection. In ICRA, 2019. +[33] Sourabh Vora, Alex H Lang, Bassam Helou, and Oscar Bei-jbom. Pointpainting: Sequential fusion for 3d object detection. In CVPR, 2020. +[34] Chunwei Wang, Chao Ma, Ming Zhu, and Xiaokang Yang. Pointaugmenting: Cross-modal augmentation for 3d object detection. In CVPR, 2021. +[35] Tai Wang, Xinge Zhu, Jiangmiao Pang, and Dahua Lin. Fcos3d: Fully convolutional one-stage monocular 3d object detection. arXiv:2104.10956, 2021. +[36] Yan Wang, Wei-Lun Chao, Divyansh Garg, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar from visual depth estimation: Bridging the gap in 3d object detection for autonomous driving. In CVPR, 2019. + +[37] Shaoqing Xu, Dingfu Zhou, Jin Fang, Junbo Yin, Zhou Bin, and Liangjun Zhang. Fusionpainting: Multimodal fusion with adaptive attention for 3d object detection. In ITSC, 2021. +[38] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 2018. +[39] Bin Yang, Ming Liang, and Raquel Urtasun. Hdnet: Exploiting hd maps for 3d object detection. In CoRL, 2018. +[40] Bin Yang, Wenjie Luo, and Raquel Urtasun. Pixor: Realtime 3d object detection from point clouds. In CVPR, 2018. +[41] Zetong Yang, Yanan Sun, Shu Liu, and Jiaya Jia. 3dssd: Point-based 3d single stage object detector. In CVPR, 2020. +[42] Zetong Yang, Yanan Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Std: Sparse-to-dense 3d object detector for point cloud. In ICCV, 2019. +[43] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In ECCV, 2018. +[44] Tianwei Yin, Xingyi Zhou, and Philipp Krahenbuhl. Center-based 3d object detection and tracking. In CVPR, 2021. +[45] Tianwei Yin, Xingyi Zhou, and Philipp Krahenbuhl. Multimodal virtual point 3d detection. In NeurIPS, 2021. +[46] Jin Hyeok Yoo, Yecheol Kim, Jisong Kim, and Jun Won Choi. 3d-cvf: Generating joint camera and lidar features using cross-view spatial feature fusion for 3d object detection. In ECCV, 2020. +[47] Yurong You, Yan Wang, Wei-Lun Chao, Divyansh Garg, Geoff Pleiss, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar++: Accurate depth for 3d object detection in autonomous driving. In ICLR, 2020. +[48] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelnerf: Neural radiance fields from one or few images. In CVPR, 2021. +[49] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In ICCV, 2019. +[50] Wenwei Zhang, Zhe Wang, and Chen Change Loy. Exploring data augmentation for multi-modality 3d object detection. arXiv:2012.12741, 2020. +[51] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In CVPR, 2018. +[52] Benjin Zhu, Zhengkai Jiang, Xiangxin Zhou, Zeming Li, and Gang Yu. Class-balanced grouping and sampling for point cloud 3d object detection. arXiv:1908.09492, 2019. \ No newline at end of file diff --git a/voxelfieldfusionfor3dobjectdetection/images.zip b/voxelfieldfusionfor3dobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..910f46da225ed86ceb74fa41d314594d5b610a34 --- /dev/null +++ b/voxelfieldfusionfor3dobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09c85162a760117ae569d9de67d5d032e9fea6186f94d20698e84773ff5aa1cf +size 654288 diff --git a/voxelfieldfusionfor3dobjectdetection/layout.json b/voxelfieldfusionfor3dobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e06140dc32d6ed254ddcee1f0a7cf23f76c4f065 --- /dev/null +++ b/voxelfieldfusionfor3dobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddf12e23f8d4cbb8f5a2b07b9bf0942b2105f974325773a3ff2b85680ab97b13 +size 426307 diff --git a/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_content_list.json b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d5ddcf185de1cf3c87f7f23bbab68995c2f077e2 --- /dev/null +++ b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f97776f1df85c0d9d638201ec275566655a5a09f2c44c454a3dcfa98ba038e6d +size 82828 diff --git a/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_model.json b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fc396579526ceed7070c9ca7bea8f773a6251d60 --- /dev/null +++ b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0dca85c9c8e22c93a1dfa6aa7338c68482165f97c20e34a4d14ce818b2addbec +size 101629 diff --git a/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_origin.pdf b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2be91e7cb0c905394a415a1ffc9c1e1295845125 --- /dev/null +++ b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/7df1dff0-eea7-4662-b7e0-2bf4b66b7a32_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e771e050390ed70e69b48feb73cef83c6e828b48d1a85dedcd322ba8c79c9490 +size 1498674 diff --git a/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/full.md b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a65ec9a971778f82be53e16c3cf68fa6ad07b981 --- /dev/null +++ b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/full.md @@ -0,0 +1,335 @@ +# Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds + +Chenhang He, Ruihuang Li, Shuai Li, Lei Zhang* The Hong Kong Polytechnic University + +{csche, csrhli, csshuali, cshzeng}@comp.polyu.edu.hk + +# Abstract + +Transformer has demonstrated promising performance in many 2D vision tasks. However, it is cumbersome to compute the self-attention on large-scale point cloud data because point cloud is a long sequence and unevenly distributed in 3D space. To solve this issue, existing methods usually compute self-attention locally by grouping the points into clusters of the same size, or perform convolutional self-attention on a discretized representation. However, the former results in stochastic point dropout, while the latter typically has narrow attention fields. In this paper, we propose a novel voxel-based architecture, namely Voxel Set Transformer (VoxSeT), to detect 3D objects from point clouds by means of set-to-set translation. VoxSeT is built upon a voxel-based set attention (VSA) module, which reduces the self-attention in each voxel by two cross-attention and models features in a hidden space induced by a group of latent codes. With the VSA module, VoxSeT can manage voxelized point clusters with arbitrary size in a wide range, and process them in parallel with linear complexity. The proposed VoxSeT integrates the high performance of transformer with the efficiency of voxel-based model, which can be used as a good alternative to the convolutional and point-based backbones. VoxSeT reports competitive results on the KITTI and Waymo detection benchmarks. The source codes can be found at https://github.com/skyhehe123/VoxSeT. + +# 1. Introduction + +Object detection from 3D point cloud has been receiving extensive attention as it empowers many applications like autonomous driving, robotics and virtual reality. Unlike 2D images, 3D point clouds are naturally sparse and unevenly distributed in continuous space, impeding the CNN layers from being directly applied. To resolve this issue, some approaches [5, 10, 42, 49, 51] first transform the point cloud + +![](images/75497b0b8dc70c1b96b91e553beca6126402b9aa92fd4139695e96e8de076ad7.jpg) +(a) + +![](images/0ae7a92ed1f8098e739115f7e00ef04991c476ba946440ac00ea81ed991f6408.jpg) +(b) + +![](images/f0e68a2bae6f6f84994cc24cbb06cb2b5f8e22be8f6c1726836d71ed0c3f0505.jpg) +(c) +Figure 1. The illustrations of (a) grouping-based, (b) convolutional-based and (c) our proposed induced set-based attention mechanisms. + +into a discrete representation and then apply CNN models to extract high dimensional features. Another class of approaches [27, 33, 41, 44, 45] model the point cloud in continuous space, where the multi-scale features are extracted through interleaved grouping and aggregation steps. + +Beyond the above two schemes, transformer-based models [9, 21-23, 31, 47] have recently attracted great interest in processing point cloud data as the self-attention used in transformers is invariant to permutation and cardinality of the input components, which makes transformer an appropriate choice for point cloud processing. The main limitation of transformer models, however, lies in that the self-attention computation is quadratic. Each token has to be updated by using all the other tokens from previous layers, making self-attention intractable for long sequence point clouds. Point Transformer [47] builds transformers upon a PointNet [28] architecture, which hierarchically groups the point cloud data into different clusters and computes self-attention in each cluster. CT3D [31] presents a two-stage point cloud detector, where 3D RoIs are extracted to group the raw points in the first stage and transformers are applied to the grouped points in the second stage. + +However, since the distribution of point clouds is extremely uneven, the number of points in each cluster varies a lot. To enable the self-attention to run in parallel, cur + +rent approaches [23, 31, 47] balance the token number in each cluster by stochastically dropping points or padding dummy points (see Figure 1(a)). This results in unstable detection results and redundant computations. Besides, each operation of grouping $n$ points to $m$ clusters will cost $\mathcal{O}(nm)$ complexity, which is relatively intensive. Alternatively, Voxel Transformer [21] performs self-attention on a discrete voxel grid, as depicted in Figure 1(b). It computes self-attention in a convolutional manner and hence is as efficient as sparse convolution with $\mathcal{O}(n)$ complexity. However, since convolutional attention is a point-wise operation, to save the memory, the attention field of the convolutional kernel is typically small, thus hindering the voxel transformer to model long-range dependencies. It is worth mentioning that though Group-free [20] and 3DETR [22] present a promising solution by computing self-attention on a reduced set of seed points, this solution is only applicable to indoor scenes, where the point clouds are relatively dense and concentrated. Considering that the point clouds of outdoor scenes are typically sparse, large-scale ( $e.g., > 20k$ ), and unevenly distributed, the scale and coverage of seed points remain an issue. + +To address the above issues, we introduce a voxel-based set attention (VSA) module. For each VSA, we divide the whole scene into non-overlapping 3D voxels and compute the voxel indices of the input point with instant efficiency. We use these voxels to determine the attentive region which is analogous to the window attention in SwinTransformer [19]. Unlike image, LiDAR has irregular structures, and the resulting attention groups have different lengths, which hinders the parallelization of the model. + +Inspired by the induced set transformer [13], we assign a group of trainable "latent codes" to each voxel. These latent codes build a fixed-length bottleneck for the point cloud, through which the information from input points within the voxel can be compressed to a static hidden space. This formulation is based on the key observation that the self-attention matrix is typically low-rank, and hence we can decompose an intensive full self-attention into two consecutive cross-attention modules. As shown in Figure 1(c), VSA first transforms the latent codes, which serve as queries, to a hidden space by attending to the projected features, i.e., keys and values, from the input points. The transformed hidden features, which encode the context information of the input points in each voxel, are enriched by a convolutional feed-forward network, in which the features across voxels exchange their information in spatial domain. After that, the hidden features are attentively fused with input, producing output features of the input resolution. By leveraging the latent codes, the cross-attention performed in all voxels can be vectorized, making VSA a highly parallel module. Given $n$ $d$ -dimensional input features and $k$ latent codes, VSA has a complexity of $\mathcal{O}(nkd)$ and it can + +be implemented with general matrix multiplications. + +With VSA, we propose a Voxel Set Transformer (VoxSeT) to detect 3D objects by learning point cloud features in a set-to-set translation process. VoxSeT is composed of VSA modules, MLP layers and a shallow CNN for Birds-Eye-View (BEV) feature extraction. To verify the effectiveness of the proposed model, we conduct experiments on two 3D detection benchmarks, KITTI and Waymo open dataset. VoxSeT achieves competitive performance with current state-of-the-arts. In addition, the proposed VSA module can be seamlessly adopted into point-based detectors such as PointRCNN [33], and demonstrates advantages over the set abstraction module. + +In summary, in this work we first invent a voxel-based set attention module, which can model long-range dependencies from the token cluster of arbitrary size, bypassing the limitation of current grouped-based and convolution-based attention modules. We then present a Voxel Set Transformer to learn point cloud features effectively by leveraging the superiority of transformer on large-scale sequential data. Our work provides a novel alternative to the current convolutional and point-based backbones for 3D point cloud data processing. + +# 2. Related work + +# 2.1. 3D object detection from point clouds + +Early approaches on 3D object detection from point cloud can be categorized into two classes. The first class of methods transform the point cloud into more compact representations, e.g., Birds-Eye-View (BEV) images [3,11,34], frontal-view range images [2,7,18], and volumetric features [14,43,51]. Yan et al. [42] developed a sparse convolutional backbone to efficiently process the point clouds by encoding the point clouds into a 3D sparse tensor. Lang et al. [12] further accelerated the detection rate by stacking the voxel features as a "pillar" and using 2D CNN to process. Another class of methods [25,27,33,44,45] process the point cloud in a continuous space by employing a PointNet [29] architecture. The point-wise features in multi-scales are extracted in stages with interleaved grouping and sampling operations. Shi et al. [33] and Yang et al. [45] proposed to generate 3D RoIs from PointNet outputs and apply the RoIs to group point-wise features for further refinement. Qi et al. [26] proposed a deep voting method to cluster the points from objects' surface to detect the object with insufficient points. Unlike compact representations, point-wise features preserve more details and fine-grained structures of original point clouds. Based on this fact, some approaches [10,32] employ a hybrid representation in both point and voxel spaces to achieve more reliable detection outputs. + +Our proposed architecture is largely motivated by voxel + +based approaches. We partition the point cloud into voxel grid and execute self-attention locally, endowing our model with inductive bias and computational efficiency. + +# 2.2. Transformer in point cloud analysis + +Recently, Transformer [38] has demonstrated its great success in many computer vision tasks such as image classification [6, 37], 2D object detection [1, 19], and other dense prediction tasks [30, 48]. For point cloud analysis, Zhao et al. [47] proposed a novel subtraction attention based operator for point cloud classification and segmentation. Guo et al. [9] investigated a dual attention to process the point clouds in feature and edge space. Misra et al. [22] and Liu et al. [20] used transformer to process point clouds as sequential data, preventing the models from stacking hierarchical grouping and sampling modules. Miao et al. [21] embedded self-attention into a sparse convolutional kernel. Sheng et al. [31] built the transformer on top of a two-stage detector and operated attention on the points grouped by RoIs. + +Unlike the above approaches that perform self-attention on a fixed-size token cluster, our proposed Voxel Set Transformer leverages the idea of induced set transformer [13] to decompose self-attention into two cross-attentions, making it possible to perform self-attention on the token clusters of arbitrary size. + +# 3. Methodology + +# 3.1. Preliminary + +It is prohibitive to directly apply self-attention on point cloud data due to its quadratic computational complexity. To bypass the issue, an induced set attention block was proposed in [13], where the full self-attention in a set was approximated by two reduced cross-attentions induced by a group of latent codes. Given an input set $X \in \mathcal{R}^{n \times d}$ of size $n$ with dimension $d$ and $k$ latent codes $L \in \mathcal{R}^{k \times d}$ , the output set $O \in \mathcal{R}^{n \times d}$ from the induced set attention block can be formulated as + +$$ +H = \operatorname {C r o s s A t t e n t i o n} (L, X) \in \mathcal {R} ^ {k \times d}, \tag {1} +$$ + +$$ +\hat {H} = \operatorname {F F N} (H) \in \mathcal {R} ^ {k \times d}, \tag {2} +$$ + +$$ +O = \operatorname {C r o s s A t t e n t i o n} (X, \hat {H}) \in \mathcal {R} ^ {n \times d}. \tag {3} +$$ + +The first cross attention transforms the latent features $L$ into hidden features $H$ by attending to the input set. This step costs $\mathcal{O}(nkd)$ complexity, which is linear to $n$ as the number of latent codes $k$ is fixed and usually very small. The transformed hidden features contain information about the input set $X$ and then they are updated by a pointwise feed-forward network (FFN). This point-wise operation costs $\mathcal{O}(k)$ complexity and it learns highly semantic features from the input set. The second cross attention attends the input set to the resulting hidden features, which + +costs $\mathcal{O}(nkd)$ complexity, producing an output set of length $n$ . The induced set attention is based on the assumption that the self-attention can be approximated with low-rank projections, thus the self-attention can be regarded as performing a $k$ -clustering on the inputs where the latent codes serve as cluster centers. This is also analogous to the clustered attention [39] and Linformer [40], where the input set is explicitly reduced with linear projection. + +# 3.2. Voxel-based Set Attention (VSA) + +Unlike images, point clouds are widely distributed and have weak semantic associations in scene level, while they have strong structural details in the local region. Instead of compressing all the input points into a hidden space, we modify the above induced set attention to be performed locally. Specifically, we partition the scene into a voxel grid and assign a set of latent codes to each voxel. We refer to the module as Voxel-based Set Attention (VSA). + +Scatter kernel function. As mentioned before, VSA is a highly parallel module, where the operations across voxels can be vectorized. This vectorization can be achieved by the scatter function1, which is a CUDA kernel library that performs symmetric reduction, e.g., sum, max and mean, on different segments of a matrix. In our case, we regard the input set as a single matrix, each row of which corresponds to a point-wise feature, and its belonging voxel can be indexed by a table of voxel coordinates. + +Let $\{p_i = (x_i,y_i,z_i):i = 1,\dots n\}$ denote the coordinates of point cloud and $[d_x,d_y,d_z]$ be the voxel size in three dimensions. The voxel coordinates $\mathcal{V}$ can be computed by $\mathcal{V} = \{\mathcal{V}_i = (\lfloor \frac{x_i}{d_x}\rfloor ,\lfloor \frac{y_i}{d_y}\rfloor ,\lfloor \frac{z_i}{d_z}\rfloor):i = 1,\ldots ,n\}$ , where $\lfloor \cdot \rfloor$ is the floor function. Hence, given point-wise input features $\{X_{i}:1 = 1,\dots n\}$ , their reduced voxel-wise form $\{Y_j:j = 1,\dots,m\}$ after a symmetric function $\mathrm{F}(\cdot)$ can be represented as: + +$$ +Y = \left\{\mathrm {F} \left(\left\{X _ {i}: \mathcal {V} _ {i} = j \right\}\right): j = 1, \dots , m \right\} \tag {4} +$$ + +where $m$ is the number of non-empty voxels. With scatter function $\mathbf{F}_{scatter}$ , the above equation can be written in a vectorized form, i.e., + +$$ +Y = \mathrm {F} _ {\text {s c a t t e r}} (X, \mathcal {V}). \tag {5} +$$ + +By deploying VSA, we do not need to stochastically drop or pad the points in each voxel and the complexity of the model is linear. + +In Figure 2, we illustrate the VSA in a matrix-multiplication form for ease of comprehension. As can be seen, the module is analogous to an encoder-decoder architecture, where the input set is encoded to a hidden space, then the hidden features are refined through a ConvFFN and finally decoded to produce the output set. + +![](images/eed3e2ff6d0d30af933baca0de8b4122d8c4d4d880522599d059ec67eeca11ea.jpg) +Figure 2. The matrix multiplication used in implementing the voxel-based set attention (VSA) module. The pseudo codes in PyTorch-stype of each step are presented bellow the diagram. + +Encoder. In the encoder, we first project the input features from the previous module to the key $K \in \mathcal{R}^{n \times d}$ and the value $V \in \mathcal{R}^{n \times d}$ with linear projections, respectively. Next, we perform cross attention between the key and the latent codes (query) $L \in \mathcal{R}^{k \times d}$ , producing the attention matrix $\mathcal{A} \in \mathcal{R}^{n \times k \times d}$ . The attention matrix $\mathcal{A}$ is then normalized voxel-wisely to obtain $\tilde{\mathcal{A}}$ , and multiplied with the value, producing hidden features $\tilde{H}$ . The calculation of $\tilde{H}$ can be formulated as: + +$$ +\tilde {\mathcal {A}} = \operatorname {S o f t m a x} _ {\text {s c a t t e r}} (\mathcal {A}, \mathcal {V}), \mathcal {A} = K L ^ {T}, \tag {6} +$$ + +$$ +H = \tilde {A} ^ {T} V. \tag {7} +$$ + +After that, we perform voxel-wise reduction on the hidden features based on the voxel indices $\nu$ : + +$$ +H _ {r} = \operatorname {S u m} _ {\text {s c a t t e r}} (H, \mathcal {V}). \tag {8} +$$ + +The overall computations in the encoder include two GEMMs and two scatter operations. The overall complexity of the encoder is $\mathcal{O}(2n(k + 1)d)$ . + +It is worth mentioning that the cross-attention based encoding scheme can be viewed as an extension of voxel feature encoding (VFE) used in [12, 42, 51]. The difference is that VFE encodes the points within a voxel into a single feature vector, while our scheme encodes the points based on a codebook consisting of the latent features. Owing to the high expressive power of VSA, we can use a relatively large voxel size to capture the features in a wide range. + +Convolutional feed-forward network. The core idea of VSA is to encode the region-wise features into a hidden space using latent codes. The hidden features work as a bottleneck, through which we apply a ConvFFN to achieve more flexible and complex information update. Unlike conventional FFN that only performs point-wise token update, ConvFFN enables the information exchange across voxels, which is especially important for dense prediction. To adaptively integrate voxel features with global dependencies, we + +scatter the reduced hidden features into a 3D sparse tensor based on their voxel coordinates $C_r$ , and then conduct two depth-wise convolutions (DwConv) on them to enforce the feature interaction in spatial domain. Given convolutional weights $W_1$ and $W_2$ , the enriched hidden features $\hat{H}_r \in \mathcal{R}^{m \times k \times d}$ from ConvFFN can be written as: + +$$ +\hat {H} _ {r} = \operatorname {D w C o n v} \left(\sigma \left(\operatorname {D w C o n v} \left(\mathcal {T} \left(H _ {r}, C _ {r}\right); W _ {1}\right)\right); W _ {2}\right), \tag {9} +$$ + +where $\sigma$ denotes the non-linear activation, $\mathcal{T}$ denotes the formulation of sparse tensor, and the number of groups in DwConv equals to that of latent features. This operation costs $\mathcal{O}(\frac{HWDkd}{d_x d_y d_z})$ complexity, where $H, W, D$ refer to the point cloud range in three directions, respectively, and $[d_x, d_y, d_z]$ specifies the voxel size. The ConvFFN plays an important role in VSA as it introduces desirable inductive bias and global context to the module. More studies on ConvFNN will be discussed in Sec 4.5. + +Decoder. The decoder reconstructs the output set from the enriched hidden features $\hat{H}_r$ . Specifically, we first broadcast the hidden features based on the voxel indices $\mathcal{V}$ , producing $\hat{H} \in \mathcal{R}^{n \times k \times d}$ which has the same length as the input set. Then we generate the query, key-value pair from the input set and the hidden features, respectively, with linear projections. Given matrices of query $Q \in \mathcal{R}^{n \times d}$ , key $K \in \mathcal{R}^{n \times k \times d}$ and value $V \in \mathcal{R}^{n \times k \times d}$ , the decoder output $O$ can be calculated as: + +$$ +\mathcal {A} = \left[ \mathcal {A} _ {1}, \dots , \mathcal {A} _ {n} \right] = \left[ K _ {1} Q _ {1} ^ {T}, \dots , K _ {n} Q _ {n} ^ {T} \right], \tag {10} +$$ + +$$ +\tilde {\mathcal {A}} = \left[ \operatorname {S o f t m a x} \left(\mathcal {A} _ {1}\right), \dots , \operatorname {S o f t m a x} \left(\mathcal {A} _ {n}\right) \right], \tag {11} +$$ + +$$ +O = \left[ O _ {1}, \dots , O _ {n} \right] = \left[ \tilde {\mathcal {A}} _ {1} ^ {T} V _ {1}, \dots , \tilde {\mathcal {A}} _ {n} ^ {T} V _ {n} \right] \tag {12} +$$ + +The overall computational complexity of the decoder is $\mathcal{O}(2nkd)$ . Owing to the flexibility of cross-attention mechanism, VSA formulates the point cloud processing as a set-to-set translation problem. + +Relative position embedding. As discussed in [23, 29], preserving the local structure of point cloud is crucial to + +![](images/bc1ae233982b3623084061b1a337054b0ff5cbfb1a878a0f964253cd67da88a2.jpg) +Figure 3. The overall architecture of the proposed Voxel Set Transformer (VoxSeT). + +improve performance. Therefore, we introduce a Positional Embedding (PE) module to encode the local coordinates of the point clouds within a voxel to a high dimensional feature and inject them into each VSA module. Specifically, the PE module applies the Fourier parameterization to take values $[sin(f_k\pi x),\cos (f_k\pi ,x)]$ , given the normalized local coordinates $x\in [0,1]$ and the $k^{th}$ frequency $f_{k}$ with bandwidth $L$ . The resulted Fourier embedding, which has a dimension of $3L$ , is further mapped to the input dimension of the first MLP module through a learnable linear layer. + +# 3.3. Voxel Set Transformer (VoxSeT) + +The overall architecture of VoxSeT is illustrated in Figure 3. Following the traditional transformer paradigm, the VoxSeT backbone is composed of inter-connected multilayer perception (MLP) and VSA modules. We use batch norm as the normalization layer and wrap each VSA module into a residual block for optimal gradient flow. + +Unlike grouping-based approaches [25, 29] that progressively downsample and aggregate point-wise features for context extraction, our backbone extracts point cloud features as a set-to-set translation process. The semantic level of the features is controlled by the size of voxels in the VSA module. We empirically found that applying large voxels can learn richer context information, and demonstrate better understanding of the objects with sparse points, especially pedestrian and cyclist instances. We will present the settings of VSA modules in Sec. 4.1. + +Birds-eye-view feature encoding. In point cloud detection, a common phenomenon is that models using dense birds-eye-view (BEV) features [4, 5, 42] generally achieve higher recall than those using sparse point-wise features [33, 45]. In this regard, we encode the point-wise features from the backbone into a BEV representation and apply a shallow CNN to increase the feature density. The CNN has only two strides, each involving three convolutions. The convolutional features of two strides are finally concatenated and passed to the detection head for bounding-box prediction. To generate BEV features, we aggregate the point-wise features within a pillar of size $0.36\mathrm{m} \times 0.36\mathrm{m}$ and apply a "soft-pooling" operation to produce features in BEV. Given point-wise output features $X^{j} \in \mathcal{R}^{k \times d}$ in the + +$j^{th}$ pillar, the pillar-wise features after pooling $F^j$ can be formulated as: + +$$ +F ^ {j} = \sum_ {m = 1} ^ {k} X _ {m} ^ {j} * w _ {m} ^ {j}, \quad w _ {m} ^ {j} = \frac {e ^ {X _ {m} ^ {j}}}{\sum_ {m = 1} ^ {k} e ^ {X _ {m} ^ {j}}}. \tag {13} +$$ + +Detection head and training objectives. To enhance the expressiveness of VoxSeT backbone, we follow PointR-CNN [33] to apply the foreground segmentation loss $\mathcal{L}_{seg}$ to the output features. This forces VoxSeT to capture contextual information for generating accurate bounding-boxes. The detection head follows the traditional anchor-based design [12, 42]. The final loss then becomes: + +$$ +\mathcal {L} = \mathcal {L} _ {s e g} + \frac {1}{N _ {p}} \left(\mathcal {L} _ {c l s} + \mathcal {L} _ {r e g}\right) + \mathcal {L} _ {d i r}), \tag {14} +$$ + +where $N_{p}$ is the number of positive samples whose IoU with anchors lies between $[\sigma_1,\sigma_2]$ . $\mathcal{L}_{\mathrm{cls}}$ is the focal loss for bounding-box classification and $\mathcal{L}_{\mathrm{reg}}$ is the Smooth- $L_{l}$ loss for bounding-box offsets regression. $\mathcal{L}_{dir}$ is a binary entropy loss for bounding-box orientation prediction. The readers are referred to [33] and [42] for details. + +Two-stage model. It is worth noting that VoxSeT can be extended to a two-stage detector, in which we employ the efficient RoI head from LiDAR-RCNN [15] as our second-stage module. To more clearly illustrate our contribution, we also report the performance of a single-stage detector, and our VoxSeT demonstrates superior performance over the current single-stage baselines. + +# 4. Experiments + +In this section, we evaluate our proposed VoxSeT on two public detection datasets, KITTI [8] and Waymo [35]. We first introduce the training details of VoxSeT and the evaluation settings, and then compare our models with state-of-the-art detection models. Finally, we conduct an in-depth analysis of each component of VoxSeT. + +# 4.1. Implementation details + +Model setup. On the KITTI dataset, we select the LiDAR points that fall into the ranges [0m, 70.4m], [-40m, + +Table 1. Performance comparison with state-of-the-art methods on the Waymo dataset with 202 validation sequences ( $\sim$ 40k samples) for vehicle detection. + +
MethodBackbone3D mAPBEV mAP
Overall0-30m30-50m50m-infOverall0-30m30-50m50m-inf
LEVEL1 (IoU=0.7):
PointPillar [12] (CVPR19)CNN56.6281.0151.7527.9475.5792.1074.0655.47
MVF [50] (CoRL20)CNN62.9386.3060.0236.0280.4093.5979.2163.09
PV-RCNN [32] (CVPR20)SpCNN70.3091.9269.2142.1782.9697.3582.9964.97
Voxel-RCNN [5] (AAAI21)SpCNN75.5992.4974.0953.1588.1997.6287.3477.70
VoTR-TSD [21] (ICCV21)Transformer74.9592.2873.3651.09----
CT3D [31] (ICCV21)SpCNN76.3092.5175.0755.3690.5097.6488.0678.89
VoxSeT (ours)Transformer76.0291.1375.7554.2389.1295.1287.3677.78
VoxSeT + CT3D (RoI head)Transformer77.8292.7877.2154.4190.3196.1188.1277.98
LEVEL2 (IoU=0.7):
PV-RCNN [32] (CVPR20)SpCNN65.3691.5865.1336.4677.4594.6480.3955.39
Voxel-RCNN [5] (AAAI21)SpCNN66.5991.7467.8940.8081.0796.9981.3763.26
VoTR-TSD [21] (ICCV21)Transformer65.91-------
CT3D [31] (ICCV21)SpCNN69.0491.7668.9342.6081.7497.0582.2264.34
VoxSeT (ours)Transformer68.1691.0367.1342.2376.1394.1381.7858.13
VoxSeT + CT3D (RoI head)Transformer70.2192.0570.1043.2080.5696.7980.4462.37
+ +Table 2. Performance comparison with traditional single-stage baseline models on the KITTI validation set. The results are reported by the mAP with 11 recall points. + +
MethodVehiclePedestrianCyclist
EasyModerateHardEasyModerateHardEasyModerateHard
SECOND [42]88.6178.6277.2256.5552.9847.7380.5867.1563.10
PointPillars [12]86.4677.2874.6557.7552.2947.9080.0462.6159.52
VoxSeT (single-stage)88.4578.4877.0760.6254.7450.3984.0768.1165.14
Improvements-0.16-0.14-0.152.871.762.493.490.962.04
+ +$40\mathrm{m}$ , $[-3\mathrm{m}, 1\mathrm{m}]$ along X, Y, Z axes, respectively, and abandon those points with the frontal view projections out of image. On the Waymo dataset, the points that lie between $[-75.2\mathrm{m}, 75\mathrm{m}]$ in the X and Y axes, and $[-2\mathrm{m}, 4\mathrm{m}]$ in the Z axis are selected. The voxel size of the first VSA layer is $[0.32\mathrm{m}, 0.32\mathrm{m}, 4\mathrm{m}]$ on KITTI and $[0.32\mathrm{m}, 0.32\mathrm{m}, 6\mathrm{m}]$ on Waymo. The voxel size is doubled along the X and Y axes in the next VSA block. The feature dimensions of the four VSA blocks are 16, 32, 64 and 128, respectively. The number of latent codes in each VSA block is 8 and the bandwidth $L$ of the Positional Embedding (PE) module is 64. + +Training and inference. The network is trained end-to-end on four RTX Quodra 8000 GPUs for 100 epochs with the Adam optimizer. The batch size, learning rate, and weight decay are set to 4, 0.003 and 0.01, respectively. The learning rate is decayed with the onecycle policy, where the momentum has a damping range of $[85\%, 95\%]$ . + +We apply the anchor settings in SECOND [42] in our single stage model. For the two-stage model, we sample 512 RoIs in training and 128 RoIs in inference. In the post-processing phase, the bounding-boxes are filtered by NMS with an IoU threshold of 0.1, and those having confidence over 0.3 are selected as final predictions. Data augmenta + +tions [4,42,51] are applied to improve the model generalization performance. For other default settings, the readers are referred to the OpenPCDet toolbox [36] used in this work. + +# 4.2. Dataset and evaluation metrics + +KITTI dataset [8]. KITTI contains 7,481 training samples and 7,518 testing samples. Following the common protocol [3], we split the labeled data into a training set with 3,712 samples and a validation set with 3,769 samples. We conduct experiments on the commonly used car category whose detection IoU threshold is 0.7, and report the results on three difficulty levels (easy, moderate and hard) according to the object size, occlusion state and truncation level. + +Waymo open dataset [35]. This dataset consists of 798 training sequences and 202 validation sequences, where there are 158,361 samples and 40,077 samples, respectively. The evaluation metrics used are 3D mean Average Precision (mAP) with IoU threshold of 0.7 on the vehicle category. The measures are reported based on the distances from objects to sensor, i.e., $0 - 30\mathrm{m}$ , $30 - 50\mathrm{m}$ and $>50\mathrm{m}$ , respectively. Two difficulty levels, LEVEL 1 (boxes with more than five LiDAR points) and LEVEL 2 (boxes with at least one LiDAR point) are considered. + +Table 3. Performance comparison with state-of-the-art methods on the KITTI test set. The results are reported by the mAP with 0.7 IoU threshold and 40 recall points. + +
Method3D
EasyModerateHard
LiDAR + RGB:
MV3D [3] (CVPR17)74.9763.6354.00
ContFuse [17] (ECCV18)83.6868.7861.67
AVOD-FPN [11] (IROS18)83.0771.7665.73
F-PointNet [27] (CVPR18)82.1969.7960.59
MMF [16] (CVPR19)88.4077.4370.22
3D-CVF [46] (ECCV20)89.2080.0573.11
CLOCs [24] (IROS20)88.9480.6777.15
LiDAR only:
VoxelNet [51] (CVPR18)77.4765.1157.73
SECOND [42] (Sensor18)83.3472.5565.82
PointPillars [12] (CVPR19)82.5874.3168.99
STD [45] (ICCV19)87.9579.7175.09
PointRCNN [33] (CVPR19)86.9675.6470.70
SA-SSD [10] (CVPR20)88.7579.7974.16
3DSSD [45] (CVPR20)88.3679.5774.55
PV-RCNN [45] (CVPR20)90.2581.4376.82
Voxel-RCNN [45] (AAAI21)87.9579.7175.09
CT3D [31] (ICCV21)87.8381.7777.16
VoTR-TSD [21] (ICCV21)89.9082.0979.14
VoxSeT (ours)88.5382.0677.46
+ +# 4.3. Results on the Waymo open dataset + +We first evaluate the performance of VoxSeT on the Waymo open dataset. The results are summarized in Table 1. VoxSeT outperforms most of CNN-based models, leading PV-RCNN [32] by $5\%$ LEVEL_1 mAP and VoxelRCNN [5] by $2.4\%$ LEVEL_2 mAP. As one of the few transformer based models, our VoxSeT achieves better performance than its transformer-based competitor VoTR-TSD [21], which brings $0.9\%$ and $1.4\%$ improvements on LEVEL_1 and LEVEL_2 mAP, respectively. VoxSeT achieves comparable performance to the state-of-the-art method CT3D [31]. It should be noted that, however, CT3D actually employs a heavy transformer based RoI head, which has three self-attention encoding layers. By adopting this RoI head into VoxSeT, our model achieves better results, outperforming CT3D by $1.5\%$ LEVEL_1 mAP and $1.2\%$ LEVEL_2 mAP. This demonstrates that as a new transformer based backbone network, VoxSeT surpasses Sparse CNN based networks. VoxSeT works especially well in the range of $30 - 50\mathrm{m}$ , which indicates that transformer modules are better in capturing the context information in long-range areas. + +# 4.4. Results on the KTTI Dataset + +We then conduct experiments on the KITTI dataset to evaluate the performance of VoxSeT as a single-stage detec + +Table 4. Performance comparison with state-of-the-art methods on the KITTI validation set. The results are reported by the mAP with 0.7 IoU threshold and 11 recall points. + +
Method3D
EasyModerateHard
LiDAR + RGB:
MV3D [3] (CVPR17)71.2962.6856.56
F-PointNet [27] (CVPR18)83.7670.9263.65
3D-CVF [46] (ECCV20)89.6779.8878.47
LiDAR only:
SECOND [42] (Sensor18)88.6178.6277.22
PointPillars [12] (CVPR19)86.6276.0668.91
STD [45] (ICCV19)89.7079.8079.30
PointRCNN [33] (CVPR19)88.8878.6377.38
SA-SSD [10] (CVPR20)90.1579.9178.78
3DSSD [45] (CVPR20)89.7179.4578.67
PV-RCNN [45] (CVPR20)89.3583.6978.70
Voxel-RCNN [45] (AAAI21)89.4184.5278.93
CT3D [31] (ICCV21)89.5486.0678.99
VoTR-TSD [21] (ICCV21)89.0484.0478.68
VoxSeT (ours)89.2186.7178.56
+ +tion model. Our competitors are SECOND [42] and Point-Pillars [12], which represent two widely used baseline feature extractors. All the three methods use the same detection head and hyper-parameters in training. As shown in Table 2, VoxSeT achieves comparable performance to SECOND on vehicle class, but much better performance on Pedestrian and Cyclist classes. We believe this is because VoxSeT has a wider effective receptive field through the VSA conditioned on the large voxel, which is crucial to detecting the objects with sparse points. + +As a two-stage detection model, VoxSeT achieves better performance than CT3D by $0.7\%$ (Easy), $0.4\%$ (Moderate) and $0.3\%$ (Hard) mAP, respectively, as shown in Table 3. Compared with VoTR-TSD which relies on multiscale backbone features, VoxSeT can still achieve comparable performance by using only singular point-wise features. We also evaluate VoxSeT on KITTI val. One can see that VoxSeT achieves leading accuracy on "Moderate" level but slightly lower accuracy on "Easy" and "Hard" levels. We believe this is because KITTI has a long-tailed distribution, and hence the "Moderate" samples dominate the hidden space of the VSA module. + +It should be pointed out that both CT3D and VoTR employ convolutional architectures, and their performances on KITTI and Waymo datasets are not consistent. Specifically, CT3D works better on Waymo but its performance drops much on KITTI, while VoTR works better on KITTI but its performance on Waymo is much worse. In contrast, our VoxSeT exhibits consistently superior performance on both datasets, demonstrating its good generalization capacity. + +![](images/5b30e1eea9053c4fc5a5867e0a0a5cff03856cf537b018808618f3b6aed3225a.jpg) +Figure 4. Visualization of the spatial attention maps induced by different latent codes in the last VSA module. + +Table 5. Effects of enabling token interactions by convolutional feed-forward network. The mAP (11 recall points) of RPN on KITTI val are reported. + +
SettingsEasyModerateHard
default88.3179.5677.84
ConvFFN→FFN70.1269.5454.23
+ +Table 6. The mAP (11 recall points) of RPN on KITTI val by using different number of latent codes (LC) in four VSA modules. + +
No. of latent codes4816
mAP76.6378.2578.74
+ +Table 7. Comparison of PointRCNN [33] detectors with VoxSeT and PointNet++ backbones. The mAP (11 recall points) on KITTI val are reported. + +
SettingsEasyModerateHard
PointRCNN88.5278.9577.81
VSA-PointRCNN89.6180.1478.69
+ +Table 8. The latency and runtime memory on the KITTI dataset, tested by NVIDIA 2080Ti GPU. + +
ModelsLatencyMemory (runtime)
SECOND [42]48 ms6093MB
PointPillars [12]22ms1508 MB
VoxSeT (single-stage)34 ms2381 MB
+ +# 4.5. Ablation study + +We conduct a series of ablation experiments to comprehend the roles of different components in VoxSeT. + +Convolutional feed-forward network. Table 5 shows that replacing the proposed ConvFFN with the conventional FFN significantly degrades the accuracy, indicating that the local connectivity is crucial to the detection performance. + +Effects of number of latent codes. In Table 6, we investigate the number of latent codes used in four VSA modules. We see that more latent codes can encode more context information of point cloud, and enhance the modeling capacity of VoxSeT. + +Comparison with PointNet++ backbone. We train a PointRCNN [33] variant by replacing its PointNet++ back + +bone [33] with our VoxSeT backbone. From Table [29], one can observe obvious performance improvements. We believe this is because VSA module has better modeling power in terms of dynamic learning and large receptive field than the set abstraction (SA) module in PointNet++. + +Latency and runtime memory. Table 8 shows that VoxSeT is faster and has less memory consumption compared to the sparse 3D CNN (SECOND). The higher performance than PointPillars and the acceptable runtime cost suggest that VoxSeT can be a good alternative to PointPillars in real-time applications. + +Visualization of attention weights. Figure 4 visualizes the spatial attention maps for the latent codes in the last VSA module. We show the attention maps for 4 out of a total of 8 latent codes. One can observe that the VSA module focuses more on the object region and different latent codes encode different contexts of the objects, indicating the high expressiveness of VSA for point cloud data. + +# 5. Conclusion and discussions + +We proposed VoxSeT, a novel transformer-based framework for 3D object detection from LiDAR point clouds. In contrast to previous 3D LiDAR detectors, which use sparse CNN and PointNet backbones to learn point cloud features, we made the first attempt to model point cloud processing as set-to-set translation, which preserves the full resolution of raw point cloud at every step of feature extraction. We presented a voxel-based set attention module that performs self-attention on voxel clusters of arbitrary size and encodes point features with more discriminative context information from a large receptive field. Experimental results on the Waymo and KITTI datasets demonstrated that our VoxSeT can achieve competitive performance, making it a good alternative for point cloud modeling. + +It should be noted that in VoxSeT, we only explored one possible formulation of liner attention based on the induced latent codes. This limits the expressive power of VoxSeT to represent different point cloud structures and their correlations. By using stronger attention mechanisms, the performance of VoxSeT can be further improved, which will be our future research direction. + +# References + +[1] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European Conference on Computer Vision, pages 213-229. Springer, 2020. 3 +[2] Yuning Chai, Pei Sun, Jiquan Ngiam, Weiyue Wang, Benjamin Caine, Vijay Vasudevan, Xiao Zhang, and Dragomir Anguelov. To the point: Efficient 3d object detection in the range image with graph convolution kernels. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 16000-16009, June 2021. 2 +[3] 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. 2, 6, 7 +[4] Yilun Chen, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Fast point r-cnn. In Proceedings of the IEEE international conference on computer vision (ICCV), 2019. 5, 6 +[5] Jiajun Deng, Shaoshuai Shi, Peiwei Li, Wengang Zhou, Yanyong Zhang, and Houqiang Li. Voxel r-cnn: Towards high performance voxel-based 3d object detection. AAAI, 2021. 1, 5, 6, 7 +[6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021. 3 +[7] Lue Fan, Xuan Xiong, Feng Wang, Naiyan Wang, and ZhaoXiang Zhang. Rangedet: In defense of range view for lidar-based 3d object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2918-2927, October 2021. 2 +[8] 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. 5, 6 +[9] Meng-Hao Guo, Jun-Xiong Cai, Zheng-Ning Liu, Tai-Jiang Mu, Ralph R. Martin, and Shi-Min Hu. Pct: Point cloud transformer. Computational Visual Media, 7(2):187-199, Apr 2021. 1, 3 +[10] Chenhang He, Hui Zeng, Jianqiang Huang, Xian-Sheng Hua, and Lei Zhang. Structure aware single-stage 3d object detection from point cloud. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11873-11882, 2020. 1, 2, 7 +[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. 2, 7 +[12] 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. 2, 4, 5, 6, 7, 8 +[13] Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In Proceedings of the 36th International Conference on Machine Learning, pages 3744-3753, 2019. 2, 3 +[14] 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. 2 +[15] Zhichao Li, Feng Wang, and Naiyan Wang. Lidar r-cnn: An efficient and universal 3d object detector. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 5 +[16] 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. 7 +[17] 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. 7 +[18] Zhidong Liang, Zehan Zhang, Ming Zhang, Xian Zhao, and Shiliang Pu. Rangeoudet: Range image based real-time 3d object detector optimized by intersection over union. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7140-7149, June 2021. 2 +[19] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10012-10022, October 2021. 2, 3 +[20] Ze Liu, Zheng Zhang, Yue Cao, Han Hu, and Xin Tong. Group-free 3d object detection via transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2949-2958, October 2021. 2, 3 +[21] Jiageng Mao, Yujing Xue, Minzhe Niu, Haoyue Bai, Jiashi Feng, Xiaodan Liang, Hang Xu, and Chunjing Xu. Voxel transformer for 3d object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 3164-3173, October 2021. 1, 2, 3, 6, 7 +[22] Ishan Misra, Rohit Girdhar, and Armand Joulin. An end-to-end transformer model for 3d object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2906-2917, October 2021. 1, 2, 3 +[23] Xuran Pan, Zhuofan Xia, Shiji Song, Li Erran Li, and Gao Huang. 3d object detection with pointformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7463-7472, June 2021. 1, 2, 4 +[24] Su Pang, Daniel Morris, and Hayden Radha. Clocs: Cameralidar object candidates fusion for 3d object detection. In 2020 + +IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 10386-10393. IEEE, 2020. 7 +[25] Charles R. Qi, Or Litany, Kaiming He, and Leonidas J. Guibas. Deep hough voting for 3d object detection in point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), October 2019. 2, 5 +[26] Charles R. Qi, Or Litany, Kaiming He, and Leonidas J. Guibas. Deep hough voting for 3d object detection in point clouds. In Proceedings of the IEEE international conference on computer vision (ICCV), 2019. 2 +[27] 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, 7 +[28] 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 +[29] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in neural information processing systems, pages 5099-5108, 2017. 2, 4, 5, 8 +[30] René Ranftl, Alexey Bochkovskiy, and Vladlen Koltun. Vision transformers for dense prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 12179-12188, October 2021. 3 +[31] Hualian Sheng, Sijia Cai, Yuan Liu, Bing Deng, Jianqiang Huang, Xian-Sheng Hua, and Min-Jian Zhao. Improving 3d object detection with channel-wise transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2743-2752, October 2021. 1, 2, 3, 6, 7 +[32] Shaoshuai Shi, Chaoxu Guo, Li Jiang, Zhe Wang, Jianping Shi, Xiaogang Wang, and Hongsheng Li. Pv-rcnn: Point-voxel feature set abstraction for 3d object detection. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 2, 6, 7 +[33] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointrcnn: 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, 2, 5, 7, 8 +[34] Martin Simony, Stefan Milzy, Karl Amendey, and Horst-Michael Gross. Complex-yolo: an euler-region-proposal for real-time 3d object detection on point clouds. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0–0, 2018. 2 +[35] Pei Sun, Henrik Kretzschmar, Xerxes Dotiwalla, Aurelien Chouard, Vijaysai Patnaik, Paul Tsui, James Guo, Yin Zhou, Yuning Chai, Benjamin Caine, et al. Scalability in perception for autonomous driving: Waymo open dataset. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2446-2454, 2020. 5, 6 +[36] OpenPCDet Development Team. Openpcdet: An opensource toolbox for 3d object detection from point clouds. + +https://github.com/open-mmlab/OpenPCDet, 2020.6 +[37] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Herve Jegou. Training data-efficient image transformers & distillation through attention. In International Conference on Machine Learning, volume 139, pages 10347-10357, July 2021. 3 +[38] 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. 3 +[39] Apoorv Vyas, Angelos Katharopoulos, and François Fleuret. Fast transformers with clustered attention, 2020. 3 +[40] Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity, 2020. 3 +[41] Qian Xie, Yu-Kun Lai, Jing Wu, Zhoutao Wang, Yiming Zhang, Kai Xu, and Jun Wang. Mlcvnet: Multi-level context votenet for 3d object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 1 +[42] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 18(10):3337, 2018. 1, 2, 4, 5, 6, 7, 8 +[43] 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. 2 +[44] Zetong Yang, Yanan Sun, Shu Liu, and Jiaya Jia. 3dssd: Point-based 3d single stage object detector. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 1, 2 +[45] 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 international conference on computer vision (ICCV), 2019. 1, 2, 5, 7 +[46] Jin Hyeok Yoo, Yecheol Kim, Jisong Kim, and Jun Won Choi. 3d-cvf: Generating joint camera and lidar features using cross-view spatial feature fusion for 3d object detection. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXVII 16, pages 720-736. Springer, 2020. 7 +[47] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip H.S. Torr, and Vladlen Koltun. Point transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 16259-16268, October 2021. 1, 2, 3 +[48] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip H.S. Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 6881-6890, June 2021. 3 +[49] Wu Zheng, Weiliang Tang, Sijin Chen, Li Jiang, and Chiweng Fu. Cia-ssd: Confident iou-aware single-stage object detector from point cloud. AAAI, 2021. 1 + +[50] 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, 2019. 6 +[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, 4, 6, 7 \ No newline at end of file diff --git a/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/images.zip b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9cc547681e523b3f1286ea6bfadd3453e70bd286 --- /dev/null +++ b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6757e53477404bace31fc20c9382c292942c706e538183edc7a65ab98e0348bf +size 760030 diff --git a/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/layout.json b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4c22332be90fadf2bb4ced321fe6ffbe92341aee --- /dev/null +++ b/voxelsettransformerasettosetapproachto3dobjectdetectionfrompointclouds/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:752142eae571d59790849e884741b418ccdae2d0f59e3086b56ef45723a96da3 +size 399783 diff --git a/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_content_list.json b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2f7aa7d3a412bf12a594dbcf5139031f16de0092 --- /dev/null +++ b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ea004c6ca139e5bbba030c7bb9e8f7d0609b6a7dcf574ebcd2d4e00e30b8773 +size 73825 diff --git a/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_model.json b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_model.json new file mode 100644 index 0000000000000000000000000000000000000000..861c9df571190369c0d4f99eb9d354d222710f68 --- /dev/null +++ b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22d92ff8ac12e49137e373ea61691406f21bfd2ae658940270c2bbe63ecb01c6 +size 92474 diff --git a/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_origin.pdf b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..07f02e989a87ce58902a533883ccc54760c0f791 --- /dev/null +++ b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/0007f8eb-9f98-4d22-b728-fa9b241e93aa_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eee09b14834cfb2fd099820a70c1a7eceaea28f417ec91fe3e9fded19fee8c83 +size 9740465 diff --git a/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/full.md b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ff2c84eadbcd22ee3a7263e70dffdd0a3d901c1b --- /dev/null +++ b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/full.md @@ -0,0 +1,296 @@ +# WALT: Watch And Learn 2D amodal representation from Time-lapse imagery + +N Dinesh Reddy + +Robert Tamburo Srinivasa G. Narasimhan +Carnegie Mellon University +http://walt.cs.cmu.edu + +# Abstract + +Current methods for object detection, segmentation, and tracking fail in the presence of severe occlusions in busy urban environments. Labeled real data of occlusions is scarce (even in large datasets) and synthetic data leaves a domain gap, making it hard to explicitly model and learn occlusions. In this work, we present the best of both the real and synthetic worlds for automatic occlusion supervision using a large readily available source of data: time-lapse imagery from stationary webcams observing street intersections over weeks, months, or even years. We introduce a new dataset, Watch and Learn Time-lapse (WALT), consisting of 12 (4K and 1080p) cameras capturing urban environments over a year. We exploit this real data in a novel way to automatically mine a large set of unoccluded objects and then composite them in the same views to generate occlusions. This longitudinal self-supervision is strong enough for an amodal network to learn object-occluder-occluded layer representations. We show how to speed up the discovery of unoccluded objects and relate the confidence in this discovery to the rate and accuracy of training occluded objects. After watching and automatically learning for several days, this approach shows significant performance improvement in detecting and segmenting occluded people and vehicles, over human-supervised amodal approaches. + +# 1. Introduction + +While there has been strong progress in data-driven methods for object detection [10, 14, 20, 40], tracking [7, 58, 59, 62], segmentation [4, 22, 30, 39, 50] and reconstruction [25, 27, 29, 53] with limited occlusions, most methods underperform in severely occluded scenarios. Severe occlusions are common in busy intersections and crowded places. Even in less dense scenes, pedestrians and vehicles often pass each other or pass behind other objects. As a result, objects are either not detected at all, or the 2D bounding boxes and segments are truncated and produce errors in downstream processes such as 3D reconstruction [5, 6, 25, 41, 42, 45]. + +Much of this state of affairs can be attributed to the fact that occlusions are treated as noise that must be over- + +![](images/5e12c9fa8b2bbca3f2dddcabfadb217075a98d5ea28445ab8dee25ec55f7f092.jpg) +Figure 1. We visualize the prediction of amodal representation of vehicles and people under severe occlusions trained using our longitudinal self-supervision framework. The method shows significant improvement in amodal detection and segmentation with images captured from different cameras. + +![](images/bcbdc6e6735e4fa904d84ad52151329c7e6858f6759cc62891ce8665e534dd44.jpg) + +come by robust measures [16, 17, 23, 36, 52, 57]. There are several challenges that make this strategy hard to succeed. First, it is much harder to label object bounding boxes or segments that are occluded, even for humans [47, 49, 63]. Thus, even large datasets like COCO [38] and ImageNet [34] have relatively few objects labeled that are severely occluded [47, 63]. This creates a strong bias against learning robustness to occlusions [11, 46, 56]. Further, the evaluation metrics are often reported on the entire datasets [9, 18, 38] that could hide problems in occluded scenarios. + +As a result, there is growing recognition that occlusions must be explicitly modeled and learned [15, 19, 30, 30, 48, 61]. This has led to new efforts in labeling occlusions explicitly in multiple datasets [21, 47, 63]. Using such supervision, amodal, or holistic, representations (e.g. segmentations and bounding boxes) of objects are learned from partially occluded observations [28, 54, 60]. While producing significantly better results than before, these commendable efforts are still plagued by the same challenges - difficulty for humans to label occlusions in real scenes and the limited dataset size. To supplement such limited data, focus has turned toward synthesizing objects in occluded scenarios using synthetic inpainting [30, 31, 60] using computer graphics [1, 13, 24]. CG can generate a large amount of data for supervision (given today's cloud computing resources) + +but even the best renderers [8,12,44] leave a notable domain gap to the real data, which needs to be bridged [33, 51]. + +In this work, we present the best of both the real and synthetic worlds for automatic occlusion supervision using a large source of hitherto unexploited data: time-lapse imagery from stationary cameras observing street intersections over weeks, months, and even years1. We exploit this data in a novel way to first mine a large dataset of real unoccluded objects over time and then use them to synthesize a large number of occlusion scenarios. We develop a new method to classify unoccluded objects based on the idea that when objects on the same ground plane occlude one another, their bounding boxes overlap in a particular common configuration. Once unoccluded objects are discovered, they are composited in layers back into the same scene. These compositions have artifacts that perhaps do not make them too useful for visualization. But they are close enough to real data to reduce the domain gap for a deep network that explicitly predicts the object, its occluder, and the occluded. + +Being patient pays off here. Over time, our method discovers tens of thousands of unoccluded objects at diverse positions, orientations, and appearances due to lighting and weather conditions, even in busy scenes. We speed up this discovery by combining sparse time sampling of the data with burst local tracking. This step reduces the required observation period from many months to several days (images captured every few mins.). The data enables us to analyze the performance of our approach over different durations and confidences of self-supervision. Specifically, we relate the confidence in unoccluded object prediction to the rate and accuracy of training occluded objects. In the beginning, including lower confidence predictions increases more supervision to speed up training, but is quickly passed by training only on high confidence supervisions. + +We introduce a new dataset, Watch and Learn Time-lapse (WALT), consisting of 12 (4K or 1080p) cameras capturing urban environments over a year. The cameras view a diverse set of scenes from traffic intersections to boardwalks. The performances of pedestrian and vehicle detection and segmentation improve significantly on all cameras. Like in [32, 49, 57], we report performances at different levels of occlusion and show that the performance drops more slowly as occlusion increases, compared to methods that do not use longitudinal self-supervision. Because of this, we achieve strong results in detecting and tracking objects as they pass each other - a common failure mode of existing approaches. The methods we present are simple but provide an effective baseline to inspire future work on exploiting longitudinal supervision for computer vision under strong occlusions. + +![](images/e35254cdfb0dfa9e32bcfa60d263208cfdc728f5fee68ce8499ac98f0894efb7.jpg) +Figure 2. Illustrating the region used to classify unoccluded (Blue) and occluded objects (Red) using planar based IOU (Green) for different categories of objects like vehicles and people. + +![](images/f1f64cf61df004b6945d4a436b7c36609aa319cbb1645db0082267d7dd12f583.jpg) + +# 2. Watch and Learn Amodal Representation + +We address the problem of layer representation of objects in a scene under severe occlusions. We propose a continuous learning framework to resolve occlusion ambiguities from images. Initially, given a time-lapse stream of data from a stationary camera, we detect and mine all the unoccluded objects over a long duration of time. These unoccluded objects collected over time automatically act as supervision that we term longitudinal self-supervision. We follow a clip art-based integration method to place these unoccluded objects within the scene at the same detected location but overlapping with another unoccluded object from the database. This generates many realistic occlusion configurations for training a network to disentangle holistic object segmentation from a cluttered scene. We further show how to speed up the training for learning amodal representations by tracking around unoccluded detections. + +# 2.1. Unoccluded Object Mining + +We exploit the time-lapse data in a novel way to mine a large dataset of real unoccluded objects over time. We develop a new method to classify unoccluded objects based on the idea that when objects on the same ground plane occlude one another, their bounding boxes overlap in a particular common configuration. + +Preprocessing Videos: On the time lapse feed from a camera, we run instance segmentation [40] on each frame. We use Intersection-Over-Union based tracker [3] to track the detected bounding box and segmentation. We represent the detections as $D_{m=0,\dots,M}^{t_0,\dots,t_N}$ , where $t_N$ represents time, while $N$ represents the number of images and $m$ corresponds to the index of the object from a total of $M$ detections. + +Occlusion Classification: We locate and segment unoccluded objects in the scene from time lapse video sequences. The unoccluded objects are detected by exploiting overlap between objects detected in an image as shown in Fig 2. For every detection $D_{i}$ at time instance $t_j$ , we com + +![](images/e83ce706bee1f5fb23ca14c2f2fd4d2f7a063acb0324832fd500f1190baa117c.jpg) +Figure 3. We illustrate generated training images(top) from Clip Art WALT dataset. The synthesized Ground-Truth amodal segmentation map(bottom) captures multiple layers(darker represents higher order of occlusion) of occlusions for training. The Clip Art images have realistic occlusions because the inpainting is performed by superimposing the object at the same location as it was observed but from varying time instances. + +put the occlusion indicator $O(D_{i}^{t_{j}})$ using + +$$ +O \left(D _ {i} ^ {t _ {j}}\right) = \left\{ \begin{array}{l l} 0, & \text {i f} D _ {i} ^ {t _ {j}} \cap D ^ {t _ {j}} = 0 \text {o r} B \left(D _ {i} ^ {t _ {j}}\right) \cap D ^ {t _ {j}} < \delta \\ 1, & \text {o t h e r w i s e .} \end{array} \right. \tag {1} +$$ + +We use two hypotheses to classify the detected objects as occluded or fully visible. The first constraint is that the bounding box should not intersect any other detected objects $D^{t_j}$ from the same time instance. Secondly, for every overlapping bounding box, we disentangle the occluded object and the occluder assuming planar constraints. When both objects are on the same plane, we observe that the bottom of the occluded bounding box always intersects with another bounding box from the scene. We exploit this observation and find the intersection of the occluding bounding box with the bottom of the occluded bounding box $B(D_{i}^{t_{j}})$ . If the intersection is larger than a threshold $\delta$ , we classify the object as occluded. This classification is computed iteratively over all the detections $D_{m = 0,\dots ,M}^{t_0\dots t_N}$ and unoccluded object detections and segmentations are extracted. + +# 2.2. Clip-Art based Self-Supervision + +Once unoccluded objects are discovered, they are composited in layers back into the same scene as shown in Fig 3. These are close enough to real data to reduce the domain gap for a deep network that explicitly predicts the object, its occluder, and the occluded. + +Background Computation: Given a sequence of images from a stationary camera, we compute the median image by finding the median RGB value per pixel from a collection of images. Since the camera is captured throughout the day and in different weather computing a single median image is unrealistic. To create realistic background images, we generate median images for varying imaging conditions like time of the day or different weather i.e. sunny, rainy, etc. This is computed by sampling the images under different + +conditions. We also compute the spatial distribution of the object occurrence for each median image to simulate the occlusion patterns similar to the real-world images. + +Generating Layered Representation: We randomly select a background image and its object occurrence data distribution. We sample $P$ unoccluded objects from the data distribution $D_{m=0,\dots,M}^{t_0\ldots t_N}$ where $O(D_i^{t_j}) == 0; i \in P$ . These sampled objects and their segmentation masks are segregated into different layers for generating varied occlusions of the scene. We iterate through each layer and composite the objects onto the background image using the segmentation masks. Since they are composited layer-wise onto the image, an amodal segmentation map is automatically generated using the segmentation mask for all the objects in the scene. Since we use longitudinal information (images over a long period of time) to generate these objects the network learns from large variations of objects as well as different occlusion configurations. The composited image and the amodal segmentation map are passed to the network for training the Amodal Representation. + +# 2.3. Watch and Learn Time-lapse Network + +We learn the amodal representation of the scene by training a network using the composite image and its amodal segmentation map as shown in Fig 4. The input image is passed through a backbone network [40] to produce feature maps. The feature map produced from the backbone is passed through the box head [55] to produce an amodal bounding box. The amodal bounding box is combined with the feature map to produce the amodal segmentation by learning Object-Occluder-Occluded interaction. + +Amodal Bounding Box: The feature map from the backbone is passed through the box head to compute the amodal bounding box hypothesis. We train this box head using + +![](images/7193249aa2cd2c37e631efb283d87e71845f39cbae9b2a07ffca1137f90cb215.jpg) +Figure 4. The composite images are passed through our Network to train for amodal representations of the scene. The feature map from the backbone is passed through the box head to produce the amodal bounding box. This bounding box is combined with the feature map from the backbone to produce an ROI feature. The ROI feature is used to train for amodal segmentation. The key to predicting holistic object representation is to understand the occluder and the occluded objects in the amodal bounding box. The features from occluder and occluded are concatenated with the ROI feature to produce accurate amodal segmentation. We supervise this network with a segmentation map generated using Clip-Art based Self-Supervision. + +FCOS [55] based losses as: + +$$ +L _ {\text {A m o d a l B o x}} = L _ {\text {R e g r e s s i o n}} + L _ {\text {C e n t e r n e s s}} + L _ {\text {C l a s s}} \tag {2} +$$ + +The ground truth bounding box is computed using the amodal segmentation map obtained by compositing. Bounding box hypotheses are combined with the backbone feature map to learn the amodal segmentation network. + +Object-Occluder-Occluded Interaction: We learn the interaction between the object and other layers present in the bounding box. Every amodal bounding box has three components i.e. the object we want to detect (amodal object(AO)), object occluding the amodal object (occluder(OR)), objects occluded other than background(occluded(OD)). To learn a holistic representation of the object, the interaction of the object with both the occluder and occluded must be exploited by the learning framework. To train for such interactions we propose using different modules for each of the categories. The occluder network takes as input the ROI features and predicts the occluder layer in the amodal bounding box. The occluded network predicts the occluded layer of the amodal bounding box from the ROI features. The object network predicts the amodal object segmentation by robustness to the occluder and the occluded. We combine the occluder and occluded features with the object features to make the network robust to different occlusions. We use both the boundary and segmentation mask to learn the amodal segmentation. We train the boundary for each component using the loss function $L^{B}$ : + +$$ +L _ {M} ^ {B} = L _ {B C E} \left(W _ {B} F _ {M} ^ {B}, G T _ {M} ^ {B}\right) \tag {3} +$$ + +We train the segmentation for each component using the loss function $L^S$ : + +$$ +L _ {M} ^ {S} = L _ {B C E} \left(W _ {S} F _ {M} ^ {S}, G T _ {M} ^ {S}\right) \tag {4} +$$ + +Here, $M \in [AO, OR, OD]$ denotes different network components, and $L_{BCE}$ denotes binary cross-entropy loss between the Ground-Truth $GT$ and the predicted heatmap. $W_S$ and $W_B$ denote the weights trained for segmentation and boundary respectively. $F_M^S$ and $F_M^S$ are the computed feature map for segmentation and boundary respectively for each $M$ . To make the amodal segmentation robust, we combine the occluder $F_{OC}$ , occluded $F_{OD}$ and input feature maps to produce the amodal object feature map $F_{AO}$ . + +End-to-End Parameter Learning: The whole amodal representation framework can be trained in an end-to-end manner defined by a multi-task loss function $L$ as, + +$$ +L = \lambda_ {b} L _ {\text {A m o d a l B o x}} + L _ {A O} + L _ {O R} + L _ {O D} \tag {5} +$$ + +$$ +L _ {O b j e c t} = \lambda_ {A O} ^ {S} L _ {A O} ^ {S} + \lambda_ {A O} ^ {B} L _ {A O} ^ {B} \tag {6} +$$ + +where, $L_{AO}, L_{OR}, L_{OD}$ are losses for Amodal object, Occluder and Occluded networks, respectively. As shown in Eq(6), for each layer the loss is a summation of the boundary loss and the segmentation loss. Similar to Eq(6), we compute the boundary and segmentation loss for both the occluder and occluded layers. Finally the network is trained with an end-to-end framework optimizing all the losses. + +# 2.4. Speeding Up Amodal Learning + +The accuracy of the amodal representation is affected by the quality and quantity of the unoccluded objects. We speed up the discovery of unoccluded objects by combining sparse time sampling of the data with burst local tracking. This step reduces the required observation period from many months to several days (images captured every few mins.). We discover nearly 3 times more unoccluded objects with different thresholds of detection using this strategy, as shown by the thin transparent lines on the left of Fig + +![](images/feba098b2e80a1007c68cb4020f0a1feaf7e5e07d7fd3d57d0cdb2fc530f4ac0.jpg) +Figure 5. We compare the number of detected unoccluded objects (bold) using our unoccluded tracking framework compared to uniform sampling (transparent) on the left image. Using the new module, achieving high accuracy faster(within 15 days) compared to uniform sampling for nearly all thresholds of $\gamma$ (right). + +![](images/dd1fdcb26887b1fce96deba47b7a4d55fa8cc3a0adb8c16a082685f2248c2f1e.jpg) + +5. These additional mined unoccluded objects speed up the training by more than 5 times and plateau in just 14 days of observation as shown in Fig 5 for different thresholds $\delta$ . Another important insight is that the network learns faster with higher $\delta$ but loses accuracy as the mined unoccluded objects are erroneous. On the other hand, lower $\delta$ shows that the network takes longer to learn but gains accuracy with the addition of more samples. We reduce $\delta$ linearly with the number of days captured for faster training. + +# 3. Dataset and Metrics + +We introduce a new dataset, called WALT, of 12 (4K and 1080p) cameras capturing data over a year in short bursts. Further, we propose a novel evaluation method using stationary objects to improve on the shortcomings of human-annotated or synthetic datasets on real images. + +Watch And Learn Time-lapse (WALT) Dataset: The dataset consists of 6.4K resolution cameras setup by us and 6.1080p YouTube public live streams. The cameras overlook public urban settings analyzing the flow of traffic and people with severe occlusions, as shown in Fig 6. We used 4 cameras from our setup and 6 cameras from YouTube for training. Data captured from 2 cameras are used for testing. The data is captured for 3-second bursts at 30 FPS every few minutes. Only the images with notable changes from the previous image are stored. This results in storing approximately 5000 images per day for a year. We will be releasing months of data captured from cameras set up by us and publish a live stream video of the cameras on YouTube for research purposes. The code to automatically capture and process data from YouTube live streams will be released. + +Potential Societal Impact: We do not perform any human subject studies from these cameras. To discourage any human subject study and preserve the privacy of the object captured in the images, we blur the faces and license plates in all the images to be released. The data is captured in short bursts around random time instances to discourage identification of movement patterns of particular persons or vehicles. This study is designated as non-human subjects research by our Institutional Review Board (IRB). + +![](images/e4d787f199de5eaabb15d30f04eed9abac4a55ddb7ccd4ce00eb37b631f3aac2.jpg) + +![](images/079c3dfb55111179c85dd4bf546784fb8155cbe0f618a7f7919268d6f370a81a.jpg) +Figure 6. Sample visualizations from the WALT(Right) and Rendered WALT(Left) dataset. The dataset contains diverse objects with severe occlusions captured over years. The results show significant performance in amodal representation learning on such large scale real data for the first time. + +![](images/ae0d2fb599c3fd6e593026b9a8837e791e967469375e895a5f51d55f8f8442a7.jpg) + +![](images/18da8f64b89549712572eb9d3431460695c9090c9068190b91b956b441fd95a5.jpg) + +Rendered WALT Dataset(RWALT): We replicate the WALT Dataset using computer graphics rendering [8]. We use a parking lot 3D model and simulate object trajectories similar to the real-world parking lot. We render 1000 time-lapse images of the scene from multiple viewpoints. The cameras for rendering are placed on the dashboard of the vehicles or on infrastructure around the parking lot. Sample rendered images from the dataset are shown in Fig 6. We use rendering from 100 cameras for training and 20 cameras for testing. We use the dataset to compute the ablation study of the network using Ground-Truth from rendering. + +Metrics: We use average precision (AP) for evaluating bounding box and segmentation accuracy throughout our experiments unless specified otherwise. We evaluate our method on three different categories of data generated from the WALT Dataset: the Rendered WALT Dataset (RWALT), Clip Art WALT Dataset (CWALT), and Stationary Objects WALT Dataset (SWALT). For the Rendered WALT Dataset, the amodal representation is computed on the synthetic image and compared to the Ground-Truth silhouette produced from rendering. For Clip Art WALT Dataset, we compute the unoccluded objects for 90 days on the test and train cameras of the WALT Dataset and synthesize 10000 composite images per camera using the method from Sec 2.2. We pass the layered image through the network and compare the results with generated Ground-Truth for test images. + +Stationary Object-Based Evaluation (SWALT): Since human annotators can only hallucinate the object extent in the occluded region, their labeling is not reliable. To circumvent this problem, we propose using consistency in stationary object segmentation and detection under occlusions as a metric to quantify the accuracy of the algorithm. From the test set of WALT, we mine unoccluded stationary objects by clustering objects detected at the same location. We use unoccluded bounding box and segmentation of the stationary object as ground truth to compare predictions when the object is occluded by another object at a different time instance. The mean Intersection-over-union (IOU) between the Ground Truth and prediction is computed for the station + +
DatasetAmodal Object(AO)Occluder(+OR)Occluded(+OD)
BMBMBMBMBMBM
RWALT55.360.561.464.265.566.366.267.968.1
CWALT62.365.566.170.271.273.273.974.275.3
+ +Table 1. Ablation analysis of the proposed learning architecture on Rendered and CWALT Dataset. Note that each component .i.e Occluder (+OR) and Occluded (+OD) network improves the accuracy of segmentation. Training with Boundary(B) and Segmentation Mask(M) consistently outperforms models trained only with Boundary or Segmentation Mask. + +ary object when it is occluded by greater than a threshold of $\gamma$ . $\gamma$ is computed as the overlap between the Ground-Truth bounding box and the bounding box of other objects in the scene. Using this strategy, we extracted 536 stationary objects observed over $60\mathrm{k}$ frames for evaluation. + +# 4. Evaluations and Ablation Analysis + +The performances of pedestrian and vehicle detection and segmentation improve significantly in all of the cameras. we report performances at different levels of occlusion and show that the performance drops more slowly as occlusion increases, compared to methods that do not use Clip-Art Based self-supervision. + +Notations: Modal represents a model trained using visible segmentations or bounding boxes, while Amodal uses our amodal supervision. In Amodal methods, just using the Amodal object network is represented as AO, while adding just occluder network as +OR. +OD is given as a combination of final layers from both occluder and occluded networks. B and M represent boundary and segmentation Mask respectively, while BM represents training jointly. + +Occluder and Occluded Networks Analysis: We observe that adding features from the occluder and occluded networks to the amodal object prediction network increases the accuracy of amodal segmentation for the Rendered WALT Dataset and the Clip Art WALT Dataset as shown in Fig 1. We observe robust segmentation accuracy with an increase in occlusion percentage when using the occluder and occluded networks in Fig 7 for both vehicles and people. + +Boundary and Mask Prediction Analysis: Segmentation based methods are observed to be better than boundary based methods. We observe that combining the object boundary with segmentation mask consistently improves accuracy on both the Datasets as shown in Tab 1. + +Robustness to Occlusions: We evaluate the accuracy of our algorithm with different percentages of occlusions using CWALT Dataset. We use the Ground-Truth segmentation masks from the dataset to group objects based on the percentage of occlusion. Fig 7 shows the accuracy of detection and segmentation on the Clip Art WALT Dataset with different occlusion percentages. Clearly, we observe that the proposed method is very robust to occlusion compared to other methods for both people and vehicles. + +![](images/551afa3c1f3e0f3309e3b582f9abf2cbae2a821337ee24b6ba4ecd49872d8fcf.jpg) + +![](images/cb5f90e8470ec57848c3717c71acd048227889edca52226ddd8306491f006132.jpg) +Figure 7. Comparative analysis of Segmentation and Detection accuracy of people and vehicles. Clearly Amodal(Holistic Representation) based methods outperform Modal(only visible representation) based methods in detection and segmentation. Addition of each Network(AO, +OD, +OR) to a modal training improves accuracy of segmentation for severely occluded scenarios. At $50\%$ occlusion we observe nearly $90\%$ and $60\%$ improvement in detection accuracy compared to modal based for people and vehicle respectively. Similarly, at $50\%$ occlusion we observe $20\%$ and $12\%$ improvement in segmentation accuracy compared to Occluder(+OR) for people and vehicles respectively. + +![](images/ed5c253f79641258f743e967c9b0630ab4ac37cee400bb2120ee9365ac4f756a.jpg) + +![](images/8bc8b1c7abf871ac26fa04ee9497637187ea58ed083d5a974ac26c89c5b53eaf.jpg) + +![](images/8d221a63b9a0e6769f7f3b71d1624910ed22e85c96836d3320044164783ae4f0.jpg) +Figure 8. Heatmap of accuracy with different occlusion levels over time on the CWALT Dataset. Observe that the accuracy improves drastically with time for severe occlusions(i.e $>50\%$ ) emphasising that our framework learns robust amodal segmentation. + +![](images/4fbe9ac26ef4c90f2785b31acd3ff92cb881dcc9b4da3eb0b9f45cf995a04c10.jpg) + +Occlusions Over Time: We analyze the accuracy of amodal representation with respect to training data from different lengths of the Clip Art WILD dataset, in Fig 8. The N-th day plot corresponds to a model trained with N days of unoccluded object detection. We observe from the heatmap that the accuracy increases with time as more unoccluded objects are used to train but decrease with occlusion percentage. We further observe that accuracy improves over time for more severe occlusions, emphasizing that longitudinal learning is important to handle severe occlusions. + +Comparison to Human Annotated Datasets: We reiterate that human annotations, especially for strong occlusions, are imprecise to learn amodal representations. Compared to human annotated datasets i.e. KINS or COCOA, our SWALT based evaluation methodology produces more accurate ground truth. Further, SWALT methodology generates much larger test sets compared to any existing human + +![](images/b14db37341abc0c8f10b0bb2f570bdf06651836894d1ec3faa1346bf0f0cc4c9.jpg) +Figure 9. Accurate amodal segmentation of vehicles during occlusion while passing each other(Top) or when a vehicle is parking. Our method is able to provide consistent segmentation and detection of all the vehicles in severe occlusions and motions. This can lead to a drastic improvement in tracking objects with occlusions. + +![](images/3537fecdd05b6a916fa9d602ea6bcc9bfa760605dba8b68dcf108734f74c210d.jpg) + +![](images/bc959658a71a4a71c80d3af1bc0e25ce84d8a381fc19db35a4fc2d4d0d658293.jpg) + +![](images/1cde9b3f9a6104237e0efedcdaaeb827451d60005ba52bb3fc03467cf95e9e53.jpg) + +![](images/c26d83dc91c1e1bd8eab0eed54605bab3c1b879b1b548d8c77b23cd76139c213.jpg) +Figure 10. Accurate prediction of amodal segmentation of people when a person passes by another(top) or when they walk occluding throughout the video(bottom). Such representation directly extrapolates to improved tracking of people in generic videos. + +
KINSCOCOASWALT
γ = 0.01γ = 0.5
ASN24.929.679.476.91
BCN27.332.782.7977.44
Ours27.933.183.678.2
+ +(a) Trained on KNIS [47] $^+$ COCOA [63] + +
CWALTSWALT
γ=0.01γ=0.5
ASN66.183.181.9
BCN73.289.988.3
Ours75.392.1991.7
+ +(b) Trained on CWALT + +Table 2. Amodal Segmentation comparisons trained on Human annotated datasets (a) and Clip-Art WALT Dataset (CWALT) (b) with respect to three different network architectures ASN [47], BCNet [63] and Ours. Tab. 2a shows that Human annotated dataset training only achieves around $78\%$ accuracy on SWALT. On the other hand, Tab.2b reports $91.7\%$ accuracy on SWALT showing the advantage of training on CWALT. In fact, all methods show improvement on SWALT by training on CWALT. $\gamma$ represents the percentage of occlusion for each object in SWALT but needs further study to report for human-annotated datasets. + +annotated datasets (60K images from WALT dataset compared to 6157 images in KINS dataset) and is expected to grow significantly as data is captured from more cameras in the following years. Scaling human annotations on such expanding datasets is costly and infeasible and our self-supervision based methodology automatically generates accurate and large training and testing datasets for amodal evaluation. Nonetheless, we report accuracy of our method when trained on Human annotated datasets and tested on KINS, COCOA and SWALT in Tab 2a. Our method slightly outperforms previous methods here. + +Comparisons to other Networks: We analyze the advantage of training/testing different methods on our data (CWALT/SWALT). The test scores show improvement in amodal accuracy as compared to other methods. In fact, all methods improve by training on CWALT and testing on SWALT as shown in Tab 2b. We show a qualitative comparison of these methods on multiple real-world images with severe occlusions in Fig 11. + +Robust Tracking Using Amodal Representations: We demonstrate that learning robust amodal representation automatically improves tracking of severely occluded objects, as shown in Fig 10 for people and Fig 9 for vehicles. Specifically, observe that the objects are well-segmented and consistent across frames with various levels of occlusions. See supplementary material for more results and videos. + +# 5. Conclusion and Limitations + +Limitations: Generalization of the amodal segmentation on new cameras that view significantly different scenes needs to be analyzed. Speeding up learning rate even further needs to be investigated for broader application of our approach. + +Conclusion: This work demonstrates that real longitudinal data can be used effectively to self-supervise amodal learning. The key insight is that it is easier to discover unoccluded objects accurately and quickly (over several days) and use them to learn amodal segmentations from any stationary camera observing a scene over time. The confidence of this discovery can be used as a quasi-learning rate to speed up amodal training of occluded objects. We introduce a new dataset, called WALT, of 12 (4K and $1080\mathrm{p}$ ) cameras capturing data over a year in short bursts every 5 minutes or so. The data will be released with faces and license plates anonymized to help preserve privacy. The results show significant performance in amodal representation learning on large scale real data for the first time. In the future, we will extend our approach to learn from cameras placed on vehicles for self-driving applications. + +Acknowledgments: This work was sponsored in part by an ARL Grant W911QX20F016, NSF CNS-2038612, and DOT RITA Mobility-21 Grant 69A3551747111, and a Qualcomm Innovation Fellowship. + +![](images/a1aedc9f8a9e230bf22dfa6416deb286572a00afe0e3e70f0ffb47ffcadee9bd.jpg) +Figure 11. Quantitative results comparing our method to the state-of-the-art images captured from different datasets. The first two rows show vehicles occluding vehicles scenarios while the next two show people occluding people. Finally, we also show examples of people and vehicles occluding each other in the bottom two rows. Observe that our method consistently outperforms other baselines in predicting the amodal segmentation due to longitudinal self-supervision formulation. We perform accurate segmentation in difficult occlusions scenarios like objects having similar colors (Second Row) or large occlusions(Third Row, Sixth Row) or multiple layers of occlusions(First Row, Fifth Row). Our method even works with low-resolution images(Fourth Row) and inter-object interactions(Fifth Row, Sixth Row). + +# References + +[1] Hassan Abu Alhaija, Siva Karthik Mustikovela, Lars Mescheder, Andreas Geiger, and Carsten Rother. Augmented reality meets deep learning for car instance segmentation in urban scenes. In *British machine vision conference*, volume 1, page 2, 2017. 1 +[2] Georges Baatz, Olivier Saurer, Kevin Koser, and Marc Pollefeys. Large scale visual geo-localization of images in mountainous terrain. In European conference on computer vision, pages 517-530. Springer, 2012. 2 +[3] Alex Bewley, Zongyuan Ge, Lionel Ott, Fabio Ramos, and Ben Upcroft. Simple online and realtime tracking. In 2016 IEEE International Conference on Image Processing (ICIP), pages 3464-3468, 2016. 2 +[4] 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. 1 +[5] Yu Cheng, Bo Yang, Bo Wang, and Robby T Tan. 3d human pose estimation using spatio-temporal networks with explicit occlusion training. arXiv preprint arXiv:2004.11822, 2020. 1 +[6] Yu Cheng, Bo Yang, Bo Wang, Yan Wending, and Robby Tan. Occlusion-aware networks for 3d human pose estimation in video. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 723-732. IEEE. 1 +[7] Wongun Choi. Near-online multi-target tracking with aggregated local flow descriptor. In ICCV, 2015. 1 +[8] Blender Online Community. Blender - a 3D modelling and rendering package. Blender Foundation, Stichting Blender Foundation, Amsterdam, 2018. 2, 5 +[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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 1 +[10] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In 2005 IEEE computer society conference on computer vision and pattern recognition (CVPR'05), volume 1, pages 886-893. IEEE, 2005. 1 +[11] Kiana Ehsani, Roozbeh Mottaghi, and Ali Farhadi. Segan: Segmenting and generating the invisible. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6144-6153, 2018. 1 +[12] Epic Games. Unreal engine. 2 +[13] Matteo Fabbri, Fabio Lanzi, Simone Calderara, Andrea Palazzi, Roberto Vezzani, and Rita Cucchiara. Learning to detect and track visible and occluded body joints in a virtual world. In Proceedings of the European conference on computer vision (ECCV), pages 430-446, 2018. 1 +[14] Pedro F Felzenszwalb and Daniel P Huttenlocher. Pictorial structures for object recognition. International journal of computer vision, 61(1):55-79, 2005. 1 +[15] Patrick Follmann, Rebecca König, Philipp Hartinger, Michael Klostermann, and Tobias Böttger. Learning to see + +the invisible: End-to-end trainable amodal instance segmentation. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1328-1336. IEEE, 2019. 1 +[16] Rik Fransens, Christoph Strecha, and Luc Van Gool. A mean field em-algorithm for coherent occlusion handling in mape-estimation prob. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06), volume 1, pages 300–307. IEEE, 2006. 1 +[17] Tianshi Gao, Benjamin Packer, and Daphne Koller. A segmentation-aware object detection model with occlusion handling. In CVPR 2011, pages 1361-1368. IEEE, 2011. 1 +[18] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In Conference on Computer Vision and Pattern Recognition (CVPR), 2012. 1 +[19] Golnaz Ghiasi, Yi Yang, Deva Ramanan, and Charless C Fowlkes. Parsing occluded people. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2401-2408, 2014. 1 +[20] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580-587, 2014. 1 +[21] Ruiqi Guo and Derek Hoiem. Beyond the line of sight: labeling the underlying surfaces. In European Conference on Computer Vision, pages 761-774. Springer, 2012. 1 +[22] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. 1 +[23] Edward Hsiao and Martial Hebert. Occlusion reasoning for object detection under arbitrary viewpoint. IEEE transactions on pattern analysis and machine intelligence, 36(9):1803-1815, 2014. 1 +[24] Y.-T. Hu, H.-S. Chen, K. Hui, J.-B. Huang, and A. G. Schwing. SAIL-VOS: Semantic Amodal Instance Level Video Object Segmentation - A Synthetic Dataset and Baselines. In Proc. CVPR, 2019. 1 +[25] Karim Iskakov, Egor Burkov, Victor Lempitsky, and Yury Malkov. Learnable triangulation of human pose. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7718-7727, 2019. 1 +[26] Nathan Jacobs, Nathaniel Roman, and Robert Pless. Consistent temporal variations in many outdoor scenes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1-6, June 2007. Acceptance rate: $23.4\%$ . 2 +[27] Angjoo Kanazawa, Shubham Tulsiani, Alexei A. Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. CoRR, abs/1803.07549, 2018. 1 +[28] Abhishek Kar, Shubham Tulsiani, Joao Carreira, and Jitendra Malik. Amodal completion and size constancy in natural scenes. In Proceedings of the IEEE International Conference on Computer Vision, pages 127-135, 2015. 1 +[29] Abhishek Kar, Shubham Tulsiani, Joao Carreira, and Jitendra Malik. Category-specific object reconstruction from a single image. In CVPR, 2015. 1 + +[30] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Deep occlusion-aware instance segmentation with overlapping bilayers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 4019–4028, June 2021. 1, 8 +[31] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Occlusion-aware video object inpainting. In The IEEE International Conference on Computer Vision (ICCV), 2021. 1 +[32] Adam Kortylewski, Ju He, Qing Liu, and Alan L Yuille. Compositional convolutional neural networks: A deep architecture with innate robustness to partial occlusion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8940-8949, 2020. 2 +[33] Philipp Krahenbuhl. Free supervision from video games. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2955-2964, 2018. 2 +[34] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS. 1 +[35] Jean-François Lalonde, Alexei A Efros, and Srinivasa G Narasimhan. Webcam clip art: Appearance and illuminant transfer from time-lapse sequences. ACM Transactions on Graphics (TOG), 28(5):1-10, 2009. 2 +[36] Chi Li, M Zeeshan Zia, Quoc-Huy Tran, Xiang Yu, Gregory D Hager, and Manmohan Chandraker. Deep supervision with shape concepts for occlusion-aware 3d object parsing. arXiv preprint arXiv:1612.02699, 2016. 1 +[37] Fangyu Li, N. Dinesh Reddy, Xudong Chen, and Srinivasa G. Narasimhan. Traffic4d: Single view reconstruction of repetitious activity using longitudinal self-supervision. In Proceedings of IEEE Intelligent Vehicles Symposium (IV '21). IEEE, July 2021. 2 +[38] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 1 +[39] Shu Liu, Lu Qi, Haifang Qin, Jianping Shi, and Jiaya Jia. Path aggregation network for instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1 +[40] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10012-10022, October 2021. 1, 2, 3, 8 +[41] Julieta Martinez, Rayat Hossain, Javier Romero, and James J. Little. A simple yet effective baseline for 3d human pose estimation. In ICCV, 2017. 1 +[42] Minh Vo N Dinesh Reddy and Srinivasa G. Narasimhan. Carfusion: Combining point tracking and part detection for dynamic 3d reconstruction of vehicle. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2018. IEEE, June 2018. 1 +[43] Srinivasa G Narasimhan, Chi Wang, and Shree K Nayar. All the images of an outdoor scene. In European conference on computer vision, pages 148-162. Springer, 2002. 2 + +[44] Merlin Nimier-David, Delio Vicini, Tizian Zeltner, and Wenzel Jakob. Mitsuba 2: A retargetable forward and inverse renderer. ACM Transactions on Graphics (TOG), 38(6):1-17, 2019. 2 +[45] Georgios Pavlakos, Xiaowei Zhou, and Kostas Daniilidis. Ordinal depth supervision for 3d human pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1 +[46] Bojan Pepikj, Michael Stark, Peter Gehler, and Bernt Schiele. Occlusion patterns for object class detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3286-3293, 2013. 1 +[47] Lu Qi, Li Jiang, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Amodal instance segmentation with kins dataset. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3014-3023, 2019. 1, 7, 8 +[48] N Dinesh Reddy, Laurent Guigues, Leonid Pishchulin, Jayan Eledath, and Srinivasa G. Narasimhan. Tessentrack: End-to-end learnable multi-person articulated 3d pose tracking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 15190-15200, June 2021. 1 +[49] N. Dinesh Reddy, Minh Vo, and Srinivasa G. Narasimhan. Occlusion-net: 2d/3d occluded keypoint localization using graph networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2 +[50] Mengye Ren and Richard S Zemel. End-to-end instance segmentation with recurrent attention. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6656-6664, 2017. 1 +[51] Stephan R Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In European conference on computer vision, pages 102-118. Springer, 2016. 2 +[52] Samuel Schulter, Menghua Zhai, Nathan Jacobs, and Manmohan Chandraker. Learning to look around objects for top-view representations of outdoor scenes. In The European Conference on Computer Vision (ECCV), September 2018. 1 +[53] Nathan Silberman, Lior Shapira, Ran Gal, and Pushmeet Kohli. A contour completion model for augmenting surface reconstructions. In European Conference on Computer Vision, pages 488-503. Springer, 2014. 1 +[54] Yihong Sun, Adam Kortylewski, and Alan Yuille. Weakly-supervised amodal instance segmentation with compositional priors. arXiv preprint arXiv:2010.13175, 2020. 1 +[55] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: Fully convolutional one-stage object detection. In Proc. Int. Conf. Computer Vision (ICCV), 2019. 3, 4 +[56] Joseph Tighe, Marc Niethammer, and Svetlana Lazebnik. Scene parsing with object instances and occlusion ordering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3748-3755, 2014. 1 +[57] Angtian Wang, Yihong Sun, Adam Kortylewski, and Alan L Yuille. Robust object detection under occlusion with context-aware compositionalnets. In Proceedings of the IEEE/CVF + +Conference on Computer Vision and Pattern Recognition, pages 12645-12654, 2020. 1, 2 +[58] Shaofei Wang and Charless C Fowlkes. Learning optimal parameters for multi-target tracking with contextual interactions. International Journal of Computer Vision, 122(3):484-501, 2017. 1 +[59] Yu Xiang, Alexandre Alahi, and Silvio Savarese. Learning to track: Online multi-object tracking by decision making. In Proceedings of the IEEE International Conference on Computer Vision, pages 4705-4713, 2015. 1 +[60] Xiaoding Yuan, Adam Kortylewski, Yihong Sun, and Alan Yuille. Robust instance segmentation through reasoning about multi-object occlusion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11141-11150, June 2021. 1 +[61] Xiaohang Zhan, Xingang Pan, Bo Dai, Ziwei Liu, Dahua Lin, and Chen Change Loy. Self-supervised scene deocclusion. In Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), June 2020. 1 +[62] Li Zhang, Yuan Li, and Ramakant Nevatia. Global data association for multi-object tracking using network flows. In CVPR, 2008. 1 +[63] Yan Zhu, Yuandong Tian, Dimitris Metaxas, and Piotr Dollar. Semantic amodal segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1464-1472, 2017. 1, 7 \ No newline at end of file diff --git a/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/images.zip b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0b14ccde2a273f0e13066b315dc108003e5a6e4a --- /dev/null +++ b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cb59494b16e30436d60120c4f24cea34e65a3bb36c739e302c409439d96d11b +size 1059830 diff --git a/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/layout.json b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..df35187f62688fefdb149bd4ad8f88e37a83ec55 --- /dev/null +++ b/waltwatchandlearn2damodalrepresentationfromtimelapseimagery/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de9752c66ba1763d0a8f8fac5bd2f601eca834b5a63a9fe550a6a70d282df08e +size 353510 diff --git a/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_content_list.json b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..94a9080562cf2567a2aceb485a147ef3ccc22a18 --- /dev/null +++ b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b274abf59d10a26ab3fd25ba5bff9c526bc3957412b06af551a16cee9bf4137f +size 73376 diff --git a/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_model.json b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2764478d464156168b9f8444e2b4f742f6e14d9a --- /dev/null +++ b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a09d4dd12912717c178c915293c4b419cce2057a7f9c2b55ed2bdd4860b55e08 +size 90388 diff --git a/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_origin.pdf b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3699d10496351da3091965597b66dad19b5b8057 --- /dev/null +++ b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/244c99c9-6f4f-47fc-9e7f-88547208ae53_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:201eb745ad11e1cb3296f47acacb19775b2fb85f6085aa851778686cdb6b7997 +size 8115177 diff --git a/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/full.md b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5c0d9da82a132a0557770a96061e26a0a0689e51 --- /dev/null +++ b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/full.md @@ -0,0 +1,312 @@ +# WarpingGAN: Warping Multiple Uniform Priors for Adversarial 3D Point Cloud Generation + +Yingzhi Tang $^{1*}$ Yue Qian $^{1*}$ Qijian Zhang $^{1}$ Yiming Zeng $^{1}$ Junhui Hou $^{1}$ Xuefei Zhe $^{2}$ $^{1}$ City University of Hong Kong $^{2}$ Tencent AI lab + +{yztang4-c, yueqian4-c, qijizhang3-c, ym.zeng}@my.cityu.edu.hk, jh.hou@cityu.edu.hk + +![](images/6787030e3ec141bac5d1b5927d3d3867019fa8946e0982aff61df3c9e436c43e.jpg) +Figure 1. Visual comparisons of generated shapes with state-of-the-art 3D point cloud generation methods. TreeGAN [20], PDGN [10] and SP-GAN [15] are GAN-based, while ShapeGF [5] and DPM [17] are probabilistic-based. + +# Abstract + +We propose WarpingGAN, an effective and efficient 3D point cloud generation network. Unlike existing methods that generate point clouds by directly learning the mapping functions between latent codes and 3D shapes, WarpingGAN learns a unified local-warping function to warp multiple identical pre-defined priors (i.e., sets of points uniformly distributed on regular 3D grids) into 3D shapes driven by local structure-aware semantics. In addition, we also ingeniously utilize the principle of the discriminator and tailor a stitching loss to eliminate the gaps between different partitions of a generated shape corresponding to different priors for boosting quality. Owing to the novel generating mechanism, WarpingGAN, a single lightweight network after one-time training, is capable of efficiently generating uniformly distributed 3D point clouds with various resolutions. Extensive experimental results demonstrate the superiority of our WarpingGAN over state-of-the-art methods in terms of quantitative metrics, visual quality, and efficiency. The source code is publicly available at https://github.com/yztang4/WarpingGAN.git. + +# 1. Introduction + +3D point clouds have been employed in various applications, such as computer-aided design [11, 13], aug + +mented/virtual reality [16], animation [9, 27], and immersive telepresence [21]. However, obtaining 3D point cloud data is still costly and time-consuming in realistic scenarios, especially the shapes with complex geometry and topology. Besides, the acquired point clouds with 3D sensing devices are usually incomplete and sparse due to occlusions, distances, and surface materials. The great success of generative adversarial network (GAN)-based 2D image generation [4, 6, 31] makes synthesizing realistic-looking 3D point clouds promising, i.e., generating point clouds whose statistical distribution is similar to real point clouds. However, the essentially different data modality as well as the unique characteristics of 3D point clouds, i.e., the irregular structure and unorderness, makes it non-trivial to extend GAN-based methods for generating 2D images to 3D point cloud generation. + +Recently, several works on 3D point cloud generation have been proposed [1, 10, 12, 15, 20, 22, 26, 28]. For example, GAN-based methods [1, 10, 20, 22, 26] usually use multi-layer perceptrons (MLPs) as generators to directly learn mapping functions between latent codes and 3D point clouds, which require a large number of parameters to fit. Moreover, as the adversarial learning mechanism cannot impose strong constraints on global shapes and local geometric details, these approaches tend to generate nonuniformly distributed point clouds, as illustrated in Fig. 2. Yang et al. [28] and Luo et al. [17] considered 3D point cloud generation as probabilistic problems, which first sample points from a Gaussian space and then move them to the + +![](images/7ee96c2a4e644216386c95233cbe359d68635c5970a6b28b124876f72cf8bca0.jpg) +(a) TreeGAN + +![](images/99fed66c0ac3991ae07064e757119c2e99e8a55467884955afa22562c81cbd6a.jpg) +(b) PDGN + +![](images/e9a613f44bb826a3f861293547272bad0363bf117fd34a9bc2ea2c79b2dd2ead.jpg) +(c) SP-GAN +Figure 2. Visual comparisons of the point clouds generated by different GAN-based methods. + +![](images/d0e05d2199e251904e7772a54dae401637a07782e8fba415fc9d82622fee6ed6.jpg) +(d) WarpingGAN + +target position by learning the distribution transformation. However, these methods generate blurry point clouds without clear global shapes and local details, since they tend to estimate the average distribution of training data. In addition to the limited quality, existing methods also suffer from low efficiency because time-consuming $k$ nearest neighbor ( $kNN$ ) search is adopted in PDGN [10] and SP-GAN [15], a progressive generation process is utilized in TreeGAN [20] and PDGN [10], and a two-stage training strategy is required in ShapeGF [5], which also prohibits the end-to-end optimization. + +To address the above-mentioned issues, we propose WarpingGAN, which introduces a novel mechanism for GAN-based 3D point cloud generation. By taking advantage of multiple 3D uniform priors, i.e., sets of points uniformly located on a unit 3D cube, WarpingGAN formulates the generation process as the learning of a function that warps multiple 3D priors into different local regions of a 3D shape under the guidance of local structure-aware semantics, which is fundamentally different from existing methods that directly learn the process of producing a fixed number of points from the latent code. Meanwhile, we tailor a stitching loss, which minimizes the local difference between generated and real point clouds, to shrink the gaps between different partitions. Such a new mechanism makes WarpingGAN featured with compactness and high efficiency. Also, it enables WarpingGAN to generate point clouds with various numbers of points after one-time training. Besides, the uniformity of the 3D priors can implicitly regularize WarpingGAN to some extent to promote the generation of uniformly distributed point clouds, as shown in Fig. 2. + +In summary, we make the following contributions: + +- we investigate the GAN-based 3D point cloud generation from the new perspective of unified local-warping, leading to WarpingGAN featured with lightweight, high efficiency, and flexible output; and +- by taking advantage of the inherent design of the discriminator without introducing additional complex operations, we propose a stitching loss tailored to WarpingGAN to boost the generator; and +- we conduct extensive experiments and analysis to demonstrate the superiority of WarpingGAN over state-of-the-art methods. + +# 2. Related Work + +Existing 3D point cloud generation methods can be roughly classified into two categories, i.e., GAN-based methods and Probabilistic-based. + +GAN-based approaches. As the first work, Achlioptas et al. [1] proposed rGAN, whose generator consists of several fully connected layers. However, both the generator and discriminator of rGAN cannot well utilize the local information and tends to generate defective parts. Valsesia et al. [22] utilized a graph convolution network to learn local dependencies between a point and its neighbors by designing a localized operation. Shu et al. proposed [20] TreeGAN, where a tree structure is introduced to preserve ancestor information instead of neighbor information to generate new points. Hui et al. [10] proposed a progressive learning strategy to generate multi-resolution point clouds, and a learning-based bilateral interpolation is utilized to exploit local geometric structure. The above methods employ MLPs on the global feature to directly generate point clouds, which can be hard to optimize and inflexible in terms of the number of points. To simplify the learning process, TreeGAN and PDGN adopt the inefficient progressive architecture in the generator. + +Recently, Li et al. [15] proposed SP-GAN for point cloud generation and manipulation. They introduce a pre-defined sphere to perform deformation. By contrast, our method adopts multiple uniform 3D priors to warp each shape partition, enabling higher-quality point clouds. Furthermore, unlike SP-GAN, our architecture does not employ the time-consuming $k\mathrm{NN}$ operation in the generator. The experiment findings show that our proposed WarpingGAN is more effective and efficient than SP-GAN. + +It is worth noting that Wang et al. [24] experimentally found that the current GAN-based frameworks can only adopt PointNet as the discriminator. Other more advanced point cloud frameworks such as PointNet++ [19] and DGCNN [25] are unable to be optimized as discriminators. However, PointNet learns point-wise features and uses the max-pooling symmetric function to select critical points to determine the global shape feature. Thus, only a small portion of critical points guide the global shape, and local geometric information is lost. Therefore, a well-designed generator is crucial for the GAN-based method. + +Probabilistic-based approaches regard point clouds as samples from a distribution, and then move the sampled points to the target positions during the generative phase. PointFlow [28] uses the continuous normalizing flow framework to transform the parameters of the distributions of shapes and the distribution of points given a shape. ShapeGF [5] generates point clouds by learning the gradient field of its log-density and moves points gradually in the gradient direction. DPM [17] simulates the generation process as non-equilibrium thermodynamics by converting the + +noise distribution into the shape distribution with a Markov chain. Some of them [17,28] can accomplish flexible generation because they treat each point independently. However, due to the absence of association between the points, they cannot properly settle the non-uniform and noisy problems for generated shapes. Moreover, many probabilistic-based methods [5] adopt a two-stage training process, which requires additional training for auto-encoders. It's worth noting that ShapeGF uses the GAN structure as well, not only the auto-encoder. + +Point cloud auto-encoders aim to reconstruct the input point cloud with a narrow bottleneck layer. For example, FoldingNet [29] introduces a folding-style operation to reconstruct 3D shapes by learning a mapping function from a 2D grid to a 3D point cloud. AtlasNet [7] utilizes a series of 2D grids via multiple independent MLPs to reconstruct surfaces patch-wisely. Bednarik et al. [2] addressed patch collapse and overlap problems of AtlasNet by computing the differential properties of reconstructed surface with first and second derivatives. + +Remark. We argue that such folding-style decoders are potentially suitable for the GAN-based point cloud generation task, which have been ignored in previous frameworks. In this work, we take a step forward in this direction by investigating a more powerful point cloud generator. Note that directly adopting the decoders of FoldingNet and AtlasNet as the generator of a GAN-base point cloud generation framework fail to generate satisfied point clouds. See the analysis in Section 3.1 and experimental demonstration in Section 4.3. + +# 3. Proposed Method + +# 3.1. Problem Analysis and Formulation + +Given a latent code $\mathbf{z} \in \mathbb{R}^C$ following a Gaussian distribution, the generator denoted as $\mathcal{F}(\cdot)$ attempts to produce a point cloud $\mathbf{P} \in \mathbb{R}^{N \times 3}$ which shares the same statistical distribution as a real dataset $\{\widetilde{\mathbf{P}}\}$ . Most of existing GAN-based methods directly learn the mapping function between $\mathbf{z}$ and $\mathbf{P}$ , i.e., $\mathcal{F}(\mathbf{z}; \Theta) = \mathbf{P}$ with $\Theta$ being the network parameters to be learned. However, due to the weak supervision ability of the discriminator, it is difficult to learn $\mathcal{F}(\cdot)$ , especially for the dataset with complex shapes, thus limiting the quality of generated point clouds. More specifically, Wang et al. [24] analyzed that as the only feasible discriminator, the PointNet architecture [18], which applies the max-pooling operator to sample the feature space, can only perceive the distribution of a small number of critical points rather than the whole point cloud. + +Motivated by the folding-style design mentioned earlier, we consider warping a uniform 3D prior (i.e., a set of 3D points uniformly located in a regular 3D grid) denoted as $\mathbf{U} \in [0,1]^{N \times 3}$ into a 3D shape. Accordingly, we reformu + +late the generation process point-wisely as $\mathcal{F}(\mathbf{u}_i,\mathbf{z};\Theta) =$ $\mathbf{p}_i\forall i\in [1,N]$ , where $\mathbf{u}_i$ and $\mathbf{p}_i$ are the $i$ -th point of $\mathbf{U}$ and $\mathbf{P}$ , respectively. We expect that the pre-defined uniformity of the 3D prior could regularize the distribution of all of the generated points to mitigate the limitation of the maxpooling-based discriminator mentioned earlier. However, a single prior may fail to generate complex shapes well due to the essential difference between the topology of the prior and the 3D objects. Thus, we plan to use multiple uniform 3D priors denoted as $\{\mathbf{U}^j\in [0,1]^{n\times 3}\}_{j = 1}^M$ and warp each of them to capture the local region (i.e., $\mathbf{P}^j\in \mathbb{R}^{n\times 3}$ ) of a generated point cloud $\mathbf{P} = \bigcup_{j = 1}^{M}\mathbf{P}^{j}$ , where $N = M\times n$ To achieve this, like AtlasNet [7], one intuitive way is to learn a warping process for each pair of $\mathbf{U}^j$ and $\mathbf{P}^j$ independently, i.e., $\mathbf{p}_i^j = \mathcal{F}(\mathbf{u}_i^j,\mathbf{z};\Theta^j)$ , where $\mathbf{u}_i^j$ and $\mathbf{p}_i^j$ are the $i$ th points of $\mathbf{U}^j$ and $\mathbf{P}^j$ , respectively. However, this manner significantly increases network parameters $\{\Theta^j\}_{j = 1}^M$ , making the network difficult to train. + +To achieve the generation in an efficient and effective manner, we finally formulate it as a unified local-warping process. That is, we use $M$ different global-correlated local codes $\{\mathbf{z}^j\}_{j=1}^M$ (see Section 3.2 for details), each of which is expected to embed the semantic of a typical local region. Thus, a local code can drive the warping of a prior to the corresponding structure via an identical MLPs. Accordingly, the process is generally written as + +$$ +\mathbf {p} _ {i} ^ {j} = \mathcal {F} \left(\mathbf {u} _ {i} ^ {j}, \mathbf {z} ^ {j}; \boldsymbol {\Theta}\right), \forall j \in [ 1, M ] \text {a n d} \forall i \in [ 1, n ]. \tag {1} +$$ + +Compared with the AtlasNet-based idea, our warping process only requires unified parameters $\Theta$ to be optimized, which is more compact and easier. Moreover, although we expect to use multiple priors rather than a single one to improve generation quality, the weak supervision ability of the discriminator may not realize our objective, i.e., the supervision is insufficient to drive the local regions warped from different priors to tightly fit to each other, resulting in gaps between them. To handle this issue, we further tailor a simple yet effective stitching loss to supervise the training of the generator. + +# 3.2. Warping-based Generator + +Fig. 3 illustrates the overall architecture of the generator of our WarpingGAN, which consists of two modules, i.e., code enhancement and unified local warping. Specifically, taking a latent code $\mathbf{z}$ as input, the code enhancement module first enhances its representation ability to 3D shapes by changing its distribution. Conditioned on the enhanced code, the unified local-warping module is then successively performed twice to warp multiple pre-defined uniform 3D priors to different local regions, which are finally assembled into a 3D shape. Owing to the warping-style mechanism, WarpingGAN is featured with highly compact and efficient. Besides, WarpingGAN is able to generate point + +![](images/d47446710aaee8dddcff6aec93c1f024ce6e9e1f587eba3c844b5b417acfa870.jpg) +(a) Code Enhancement Module +(b) Unified Local-Warping Module +Figure 3. Illustration of the architecture of the generator of WarpingGAN, which consists of a code enhancement module and a unified local-warping module. During training, it takes a latent code and $M$ pre-defined uniform 3D priors as input. The unified local-warping module is performed twice to generate a 3D shape. + +clouds with various numbers of points by changing the size of $\mathbf{U}^j$ (i.e., the value of $n$ ), after one-time training. + +Code enhancement. As aforementioned, WarpingGAN aims to learn a warping function under the guidance of the latent code $\mathbf{z}$ . However, $\mathbf{z}$ is randomly drawn from a Gaussian distribution and thus lacks the implicit semantic information to represent the shape faithfully. To fill this knowledge gap, we propose a code enhancement module shown in Fig. 3(a), composed of five fully-connected layers to transform $\mathbf{z}$ to $\widetilde{\mathbf{z}} \in \mathbb{R}^D$ of a higher dimension $(D > C)$ . In Section 4.3, we illustrate that after the data-driven training process, such a module can transform the Gaussian distribution to a distribution that is comparable to that of the features extracted from real datasets that encode shape semantics. + +Unified local-warping. Guided by the enhanced latent code $\widetilde{\mathbf{z}}$ , the unified local-warping module in Fig. 3(b) can generate from multiple 3D priors various local regions that are further assembled into a point cloud with complex topology. Specifically, we first partition $\widetilde{\mathbf{z}}$ into $M$ local codes of an equal length denoted as $\{\widetilde{\mathbf{z}}^j \in \mathbb{R}^{D / M}\}_{j=1}^M$ and then concatenate each of the local codes with the global shape information, leading to $\mathbf{z}^j = [\widetilde{\mathbf{z}}^j \widetilde{\mathbf{z}}] \in \mathbb{R}^{D(M+1) / M}$ . Finally, we concatenate $\mathbf{z}^j$ with each coordinate of $\mathbf{U}^j$ , which is then fed into an MLPs to regress the points of the $j$ -th local region in point-wise. Moreover, we perform such a warping process twice in a row. Therefore, such a unified local-warping process is written as + +$$ +\begin{array}{l} \mathbf {p} _ {i} ^ {j} = \mathcal {F} \left(\mathcal {F} \left(\mathbf {u} _ {i} ^ {j}, \mathbf {z} ^ {j}; \boldsymbol {\Theta} _ {1}\right), \mathbf {z} ^ {j}; \boldsymbol {\Theta} _ {2}\right), \tag {2} \\ \forall j \in [ 1, M ] \text {a n d} \forall i \in [ 1, n ], \\ \end{array} +$$ + +where $\Theta_{1}$ and $\Theta_{2}$ are the network parameters of the two consecutive warping processes. Note that it is crucial to concatenate $\widetilde{\mathbf{z}}$ in the local codes since $\widetilde{\mathbf{z}}$ provides the essential global shape information to coordinate different local codes (see the demonstration in Section 4.3). + +![](images/22ea3ea67468ca6901143fbd0fe5aa49a6201e9b384a433a9c3235fac67cb4b0.jpg) +Figure 4. The architecture of the discriminator of WarpingGAN. It takes real point clouds or generated point clouds as input and produces the confidence value and the critical points (i.e., red points) that are used by the stitching loss. + +# 3.3. Training Objectives + +Discriminator. Following previous works [10, 20], we adopt the PointNet as the discriminator $\mathcal{D}(\cdot)$ for training the generator. As shown in Fig. 4, it takes $\{\widetilde{\mathbf{P}}\}$ as input to perform binary classification. More specifically, it first learns point-wise features via MLPs and then adopts max-pooling to obtain a global shape feature that is utilized to determine the confidence value. Meanwhile, owing to the max-pooling operation, we can retrieve a small number of critical points from the input cloud, which depict the skeleton of the input shape [18]. + +Stitching loss. As analyzed in Section 3.1, the inher + +ent design of the discriminator results in a limited supervision ability, which is inadequate to force the generated local regions to fit each other tightly. To tackle this issue, by taking advantage of critical points without introducing additional complex operations, we propose a stitching loss, which minimizes the local difference between $\mathbf{P}$ and $\widetilde{\mathbf{P}}$ . + +Let $\{\mathbf{q}_i\}_{i = 1}^Q\subset \mathbf{P}$ and $\{\widetilde{\mathbf{q}}_i\}_{i = 1}^Q\subset \widetilde{\mathbf{P}}$ denote the critical points retrieved from the input point clouds based on the max-pooling operation of the discriminator. We first find out the $K$ nearest neighbors $\mathcal{N}(\mathbf{q}_i) = \{\mathbf{p}_i^k\}_{k = 1}^K\subset \mathbf{P}$ for each of $\{\mathbf{q}_i\}_{i = 1}^Q$ and compute the pairwise distance $d_i^k = \| \mathbf{q}_i - \mathbf{p}_i^k\| _2$ . We also conduct the same operation for $\{\widetilde{\mathbf{q}}_i\}_{i = 1}^Q$ . With this information, we define the stitching loss as + +$$ +\mathcal {L} _ {s} = \left(\frac {1}{Q} \sum_ {i = 1} ^ {Q} \operatorname {v a r} \left(\mathbf {q} _ {i}, \mathcal {N} \left(\mathbf {q} _ {i}\right)\right) - \frac {1}{\widetilde {Q}} \sum_ {i = 1} ^ {\widetilde {Q}} \operatorname {v a r} \left(\widetilde {\mathbf {q}} _ {i}, \mathcal {N} \left(\widetilde {\mathbf {q}} _ {i}\right)\right)\right) ^ {2}, \tag {3} +$$ + +where $\mathrm{var}(\mathbf{q}_i,\mathcal{N}(\mathbf{q}_i)) = \sum_{k = 1}^{K}\frac{(d_i^k - \bar{d}_i)^2}{K}$ and $\bar{d}_i$ is the mean value of $\{d_i^k\}_{i = 1}^Q$ + +Note that the stitching loss requires the $k\mathrm{NN}$ operation over the very small number of critical points only during training, and thus, the high efficiency of the proposed method is still retained during both training and testing. See Section 4.2. + +Joint optimization. To train the proposed WarpingGAN, we adopt the improved WGAN loss [8], which consists of the loss $\mathcal{L}_g(\cdot)$ for the generator and $\mathcal{L}_d(\cdot)$ with the Lipschitz constraint for the discriminator. More precisely, $\mathcal{L}_g(\cdot)$ is written as + +$$ +\mathcal {L} _ {g} = - \mathbb {E} _ {\mathbf {P} \sim \mathbb {P} _ {\mathbf {P}}} [ \mathcal {D} (\mathbf {P}) ] + \lambda_ {s} \mathcal {L} _ {s}, \tag {4} +$$ + +where $\mathbb{P}_{\mathbf{P}}$ is the distribution of generated shape $\mathbf{P}$ and $\mathcal{L}_s$ is the proposed stitching loss which is balanced by the weight $\lambda_s > 0$ . $\mathcal{L}_d(\cdot)$ is formulated as + +$$ +\begin{array}{l} \mathcal {L} _ {d} = \mathbb {E} _ {\mathbf {P} \sim \mathbb {P} _ {\mathbf {P}}} [ \mathcal {D} (\mathbf {P}) ] - \mathbb {E} _ {\mathbf {P} \sim \mathbb {P} _ {\tilde {\mathbf {P}}}} [ \mathcal {D} (\tilde {\mathbf {P}}) ] \\ + \lambda_ {g p} \mathbb {E} _ {\widehat {\mathbf {P}} \sim \mathbb {P} _ {\widehat {\mathbf {P}}}} [ (\| \nabla_ {\widehat {\mathbf {P}}} \mathcal {D} (\widehat {\mathbf {p}}) \| _ {2} - 1) ^ {2} ], \\ \end{array} +$$ + +where $\mathbb{P}_{\widetilde{\mathbf{P}}}$ is the distribution of the real point cloud $\widetilde{\mathbf{P}}$ , and $\widehat{\mathbf{p}}$ is uniformly sampled by interpolating pairs of shapes sampled from $\mathbb{P}_{\mathbf{P}}$ and $\mathbb{P}_{\widetilde{\mathbf{P}}}$ to satisfy the 1-Lipschitz constraint [8], and $\lambda_{gp} > 0$ the weight to balance the gradient penalty term. + +# 4. Experiments + +# 4.1. Experiment Settings + +Dataset. Following the settings in [20], we selected three categories of ShapeNet, i.e., Chair, Airplane and Car shapes, to train and evaluate WarpingGAN. Each point cloud contains 2048 points. + +Implementation details. WarpingGAN samples latent codes of dimension $C = 128$ following a Gaussian distribu + +Table 1. Quantitative comparison of WarpingGAN with five state-of-the-art methods over two categories. The listed MMD and COV values were obtained by multiplying the original values with $10^{3}$ and $10^{2}$ , respectively. $\uparrow$ (resp. $\downarrow$ ) means the higher (resp. lower), the better. + +
Metric MethodChairAirplane
MMD↓COV↑Uniform↓MMD↓COV↑Uniform↓
TreeGAN [20]9.645.000.883.842.500.45
PDGN [10]9.351.250.853.441.250.21
SP-GAN [15]11.541.250.343.546.250.05
ShapeGF [5]9.650.000.643.547.500.09
DPM [17]9.437.501.453.433.750.35
WarpingGAN8.753.750.293.348.750.02
+ +tion as input to generate point clouds each with $N = 2048$ points. We set the number of priors $M$ to 16 for all shapes, $K = 40$ for computing the stitching loss, and $\lambda_{s} = 0.05$ and $\lambda_{gp} = 10$ during the training phase. We adopted LeakyReLU with a negative slope equal to 0.2 in each layer. We utilized Adam with the learning rate $r = 0.0001$ , $\beta_{1} = 0$ and $\beta_{2} = 0.99$ as the optimizer to optimize both the generator and discriminator, and set the batch size to 32. We implemented the whole network with PyTorch and trained it on Nvidia RTX 2080ti GPU with Intel(R) Xeon(R) CPU. + +# 4.2. Comparison with State-of-the-Art Methods + +We compared the proposed WarpingGAN with five state-of-the-art point cloud generation frameworks, including three GAN-based methods, i.e., TreeGAN [20], PDGN [10] and SP-GAN [15], and two probabilistic-based methods, i.e., ShapeGF [5] and DPM [17]. + +Quantitative comparison. Following the settings of SPGAN [15], we utilized Minimal Matching Distance (MMD) and Coverage (COV) to quantitatively evaluate the quality of generated point clouds by different methods. Besides, we also adopted the uniformity loss* in [14] to quantitatively measure the uniformity of generated point clouds. + +As listed in Table 1, our WarpingGAN outperforms all the other methods in terms of all metrics. Specifically, the lower MMD values imply that WarpingGAN can generate shapes with high fidelity to point clouds in the real dataset, the high COV values demonstrate that the generated shapes of WarpingGAN match well with the real shapes in terms of fraction, and the lower Uniform values indicate our WarpingGAN can generate point clouds with more uniformly distributed points. Moreover, we want to point out that metrics MMD and COV do not necessarily and reliably correlate to the quality of generated data, which has also been discussed in [28,30]. Thus, we refer readers to examine visual quality of generated point clouds provided as follows and in Supplementary Material. + +Visual comparison. We visualized the generated 3D + +![](images/fa74b3ccd6743595df6ff5f3e2b9c79bb40df3bfb93362be013b427c9d9ba723.jpg) +Figure 5. Visual illustration of the generated Chair, Airplane and Car shapes by our WarpingGAN. These shapes have fine global structures and present a variety of geometric typology. See Supplementary Material for more visual results. + +![](images/7d6f5719fce2ff3394a58e1da843b286d63117790663e032b1eeb9d86d765736.jpg) +Figure 6. Visual comparison of the reconstructed 3D surfaces from the point clouds (shown in 1) generated by different methods via the ball pivoting algorithm. + +point clouds by different methods. Besides, we also reconstructed 3D meshes from them via the ball pivoting algorithm [3]. As illustrated in Fig. 1, WarpingGAN generates shapes with finer global shapes and local details than the other methods. Particularly, the points of the generated data by our WarpingGAN are uniformly distributed, thus avoiding "holes" which appear in the results by compared methods. Besides, WarpingGAN does not generate outlier points. From Fig. 6, it can be observed that the reconstructed 3D meshes from the point clouds generated by our WarpingGAN have much better quality than those by other methods, which also validates the higher quality of the point clouds generated by our WarpingGAN. See Supplementary Material for more visual results. + +Efficiency comparison. We also compared the training time, inference time and parameter sizes of different methods. We only reported the inference time of ShapeGF and DPM. As listed in Table 2, during interface, WarpingGAN + +Table 2. Comparison of the training time, inference time and parameter size of different methods. The training time refers to the average time of one iteration. + +
MethodTraining (s)Inference (s)Params (M)
TreeGAN [20]0.040.01440.69
PDGN [10]0.630.07712.71
SP-GAN [15]0.290.0310.59
ShapeGF [5]-2.6604.40
DPM [17]-0.6411.58
WarpingGAN0.080.0080.58
+ +achieves the most compact model size and $4\sim 300$ faster than state-of-the-art methods, owing to the exclusion of the time-consuming $k\mathrm{NN}$ and progressive design. Although the stitching loss of WarpingGAN requires calculating $k\mathrm{NN}$ for subsets with a small size during training, which slightly increases the training time, the training process of WarpingGAN is still much more efficient than PDGN and SP-GAN. + +Feature comparison. We also employed t-SNE [23] to visually compare the Airplane shapes generated by different methods in the feature space. Specifically, we adopted the + +![](images/3f3086433ed987aab5c0815802135ba7103b7f4f075c044b2a5d4264ec9bca3b.jpg) +Figure 7. Visual illustration of the t-SNE feature clustering of the real point clouds of ShapeNet and generated point clouds by different methods. + +pre-trained DGCNN with ModelNet40 to extract features of generated point clouds by different methods and the corresponding Airplane category of ShapeNet. As shown in Fig. 7, compared with other methods, the feature distribution of WarpingGAN is more compact and closer to that of the real point cloud set, indicating that the generated point clouds by our WarpingGAN are more realistic. + +![](images/2d6aaf17fc8362fdc110563fbda63b0c3f0b5edf457e195d502adf1b85d1243c.jpg) +(a) 1024 points + +![](images/eeb8c355138f7e0e1725e66ef54cb3214d7c3b13b960a218c6eb955e0efafb05.jpg) +(b) 2048 points + +![](images/4d49338375709dd935e08a3be1705e3a38fd5f8a9102dd6e32f5a3ef8cf03b77.jpg) +(c) 4096 points +Figure 8. Visual illustration of the flexibility of our WarpingGAN in generating point clouds with various number of points after one-time training. Points with the same color correspond to the same prior. + +Flexibility illustration. To demonstrate the flexibility of our WarpingGAN, we fixed the WarpingGAN trained with $M = 16$ and $N = 2,048$ and modified the size of the 3D priors in order to generate point clouds with $N = 1,024,2048$ and 4,096 from an identical latent code. As shown in Fig. 8, the three generated point clouds correspond to the same shape, the warping manners of corresponded priors in different point clouds are the same, and the point cloud quality potentially improves with the number of points increasing. However, the compared methods that directly generate points from the latent code cannot achieve such a flexibility. + +# 4.3. Ablation Study + +The effectiveness of the code enhancement is demonstrated via the quantitatively and qualitatively in Table 3 and + +Table 3. Ablation studies conducted on the Chair category. Exps. #1 - #8 are the results of our WarpingGAN with various settings. The result of our final model is highlighted in red. Exps. #9 and #10 are the results of FoldingNet-based and AtlasNet-based GANs, respectively. “-” means the stitching loss is not applicable, “U” and “NU” mean uniform and non-uniform priors, respectively. + +
Exp. +Num.Code +Enhance.Prior +TypePrior +Num.Stitching +LossMMD↓COV↑Uniform↓
1X3D+U1-13.425.001.25
2✓3D+U1-11.043.751.47
3✓3D+U16X9.945.000.43
4✓2D+U16✓10.046.250.32
5✓3D+NU16✓10.250.000.49
6✓3D+U4✓9.651.250.78
7✓3D+U16✓8.753.750.29
8✓3D+U64✓8.346.250.34
9✓2D+U1-14.427.501.57
10✓2D+U16X10.536.250.90
+ +![](images/300d6c580f7ae6b955af47d632909dfd115ba68de13fb11fb04294239eb4f9c4.jpg) +(a) $w o / w$ code enhancement + +![](images/ecd14fe6a631e9d966753db4eadedc5af1d652151b20a01d952c9bb1287cc6b9.jpg) + +![](images/a174a13a7134192fadabf52a2fe0712ea374a7249a0e40ea97e721e1242b75bf.jpg) +(b) $w o / w$ global shape code + +![](images/cb66cff78fb6c6839bd638ae5d280c1fc645ab6fbdf97aee1e82d7122d757fbb.jpg) + +![](images/37e42b85a1cc01e5263cadf6c15131b67c462b047827ae0de56db739fc4936ba.jpg) +Figure 9. Visual illustration of the effectiveness of (a) the code enhancement module and (b) the global shape code, where $w o$ and $w$ denote "without" and "with", respectively. +(a) latent code +Figure 10. Visual comparison of the distribution of (a) the input latent code, (b) the latent semantic features of FoldingNet, and (c) the enhanced code of WarpingGAN $(M = 1)$ . + +![](images/cc376e6cc3a72e1e7080125e591a915bfbd63aa11c93579f8b5da8ced688adb9.jpg) +(b) FoldingNet $\theta$ + +![](images/521708e5b01da0450a037a52101b42858bdfe724218df6c600cdc075ee3a3a01.jpg) +(c) enhanced code + +Fig. 9, respectively. As listed in Exps. #1 and #2 of Table 3, it can be seen that this module can effectively improve the generated point cloud quality in terms of all metrics. Fig. 9 (a) visually demonstrates that the quality of the generated point cloud degrades dramatically without using this module. Besides, We also validated the advantage of integrating the global code $\widetilde{\mathbf{z}}$ into the local code $\mathbf{z}^j$ in Fig. 9 (b). Moreover, we also investigated the distribution of the enhanced latent code to understand this module better. As shown in Fig. 10, it can be seen that this module is able to transform the initial Gaussian distribution (Fig. 10 (a)) to a distribution (Fig. 10 (c)) which is very close to the distribution of semantic features extracted from real datasets by using FoldingNet (Fig. 10 (b)). + +![](images/d33b9e6b44e07d4262f921f6ce6487ad7b4a4070f446a194483fc0a67ac68b95.jpg) +Figure 11. Visual comparison of our WarpingGAN trained (top row) without and (bottom row) with the stitching loss. + +![](images/947a6626e84e9d51566d7125234215d4d420da22fb615f7e4a4806f74e2d1cb5.jpg) + +The effectiveness of the stitching loss is quantitatively validated by comparing the results of Exps. #3 and #7 listed in Table 3, where it can be seen that the results of all metrics improve when adopting the loss. Besides, as shown in Fig. 11, the point clouds generated by WarpingGAN trained without the stitching loss suffer from significant gaps between different partitions, while WarpingGAN trained with the stitching loss can greatly alleviate the gaps and increase the visual quality. + +![](images/04ea7a2953f570eba0efe5ff8442fd4b44eadf78314576fac2d6ad0faaaf3ff2.jpg) +(a) 2D vs. 3D priors + +![](images/9bccfc4eb08963da2b0aae7a48feb54a9138a9d1b87c64ffd90c127bb4fa4462.jpg) +Figure 12. Visual comparison of our WarpingGAN equipped with (a) 2D priors and 3D priors, and (b) 3D non-uniform priors and 3D uniform priors. + +![](images/98ea37351394bbbc23b6e64bfbf72e0cb7cddef4cc60089cb9609be1c6f7694a.jpg) +(b) non-uni vs. uni priors + +The effect of different prior settings. First, we substituted the 3D uniform priors with 2D uniform priors, while keeping the remaining settings unchanged. By comparing the results of Exps. #4 and #7 in Table 3, we can conclude the advantage of 3D priors over 2D priors. From Fig. 12(a), it can be seen that the generated point cloud by 3D uniform priors retain local details better. Besides, to demonstrate the necessity of the uniformity of the prior, we replaced the 3D uniform priors with 3D non-uniform priors and kept the remaining settings unchanged. As shown in Fig. 12(b), the non-uniform priors cannot lead to uniformly distributed point clouds, which is consistent with the quantitative results in Exps. #5 and #7 of Table 3. + +The effect of the number of 3D priors. We trained three WarpingGAN models with 4, 16 and 64 priors, respectively. The quantitative comparisons are listed in Exps. #6, #7, and #8 of Table 3, where it can be seen that WarpingGAN with 16 priors produces the generally best performance, which is consistent with the visual comparison shown in Fig. 13. The reason is that a limited number of priors cannot fit 3D shapes well, while too many priors make it hard to optimize the stitching loss. In this paper, we set $M = 16$ . + +![](images/bcccac614f5749216ab5ba9a80c4ac7158ef9a154afe4509a4087cd045e5da24.jpg) +(a) 4 priors + +![](images/7d8b974cf82d3185e8875ffca8a47994708cbf8033ee7229bf2a8ed113825706.jpg) +(b) 16 priors + +![](images/92eecbcf20b9dacab0aca9342df61d76dccf9c5d2413237b170294321c5981f5.jpg) +(c) 64 priors + +![](images/174b0395b36cb49b3a7911988ee3c5348be0b123cacc723c2122b7820c77350d.jpg) +(a) Folding-based vs. WarpingGAN + +![](images/d91f66395492f50bba3bab8b6fe366b01377112710cc8f23b98a0b78edf1f635.jpg) +Figure 14. Visual comparison of WarpingGAN with (a) FoldingNet-based GAN and (b) AtlasNet-based GAN. + +![](images/498ba4fd68574e4e8d2f091362ae318ab8bab2e995ec7716db4474e10fb82ce3.jpg) +Figure 13. Visual comparison of our WarpingGAN equipped with different numbers of 3D priors. Note that the total size of priors under different settings are equal for generating point clouds each with 2,048 points. + +![](images/5dd66957149d36ca83e7adf36a42ef864362196db0eec3b1ceba0dbe7e846c7a.jpg) +(b) Atlas-based vs. WarpingGAN + +Comparison with FoldingNet-based and AtlasNet-based GANs. In this experiment, we retained the code enhancement module and substituted the prior warping module of the proposed generator with the decoders of FoldingNet and AtlasNet. Exps. #9 and #10 of Table 3 provide the quantitative performance of these two baselines, which reveal the limited performance of the direct extensions of these auto-encoder frameworks. Besides, as shown in Fig. 14, FoldingNet-based GAN fails to generate a chair with a complex structure correctly and AtlasNet-based GAN loses much local details even when generating a chair with a simple structure, while our WarpingGAN can generate chairs with much better quality. + +# 5. Conclusion + +We presented WarpingGAN, a novel point cloud generation framework that is capable of generating high-quality point clouds in an effective and efficient manner. In contrast to existing approaches that usually produce point clouds by learning the direct mapping between the random latent codes and 3D shapes, we designed WarpingGAN by investigating a unified local-warping mechanism, in which multiple pre-defined 3D priors uniformly distributed in the 3D Euclidean space are conditionally warped to various local regions of a shape. Meanwhile, by examining the principle of the discriminator, we customized a stitching loss to eliminate the gaps between different regions. Such a new mechanism makes WarpingGAN compact, efficient, and flexible. We conducted extensive experiments to demonstrate the significant advantages of WarpingGAN over state-of-the-art methods in terms of quantitative metrics, visual quality, and efficiency. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. In ICML, pages 40-49, 2018. 1, 2 +[2] Jan Bednarik, Shaifali Parashar, Erhan Gundogdu, Mathieu Salzmann, and Pascal Fua. Shape reconstruction by learning differentiable surface representations. In CVPR, pages 4716-4725, 2020. 3 +[3] Fausto Bernardini, Joshua Mittleman, Holly Rushmeier, Claudio Silva, and Gabriel Taubin. The ball-pivoting algorithm for surface reconstruction. IEEE Transactions on Visualization and Computer Graphics, 5(4):349-359, 1999. 6 +[4] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. In ICLR, 2018. 1 +[5] Ruojin Cai, Guandao Yang, Hadar Averbuch-Elor, Zekun Hao, Serge Belongie, Noah Snavely, and Bharath Hariharan. Learning gradient fields for shape generation. In ECCV, pages 364–381, 2020. 1, 2, 3, 5, 6 +[6] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. NeurIPS, 27, 2014. 1 +[7] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. A papier-mâché approach to learning 3d surface generation. In CVPR, pages 216-224, 2018. 3 +[8] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. 5 +[9] Zeng Huang, Yuanlu Xu, Christoph Lassner, Hao Li, and Tony Tung. Arch: Animatable reconstruction of clothed humans. In CVPR, pages 3093-3102, 2020. 1 +[10] Le Hui, Rui Xu, Jin Xie, Jianjun Qian, and Jian Yang. Progressive point cloud deconvolution generation network. In ECCV, pages 397-413, 2020. 1, 2, 4, 5, 6 +[11] Hamid Izadinia and Steven M Seitz. Scene decomposition by learning-based icp. In CVPR, pages 930-939, 2020. 1 +[12] Hyeongju Kim, Hyeonseung Lee, Woo Hyun Kang, Joun Yeop Lee, and Nam Soo Kim. Softflow: Probabilistic framework for normalizing flow on manifolds. NeurIPS, pages 16388-16397, 2020. 1 +[13] 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. In CVPR, pages 9601-9611, 2019. 1 +[14] Ruihui Li, Xianzhi Li, Chi-Wing Fu, Daniel Cohen-Or, and Pheng-Ann Heng. Pu-gan: a point cloud upsampling adversarial network. In ICCV, pages 7203–7212, 2019. 5 +[15] Ruihui Li, Xianzhi Li, Ke-Hei Hui, and Chi-Wing Fu. SPGAN:sphere-guided 3d shape generation and manipulation. ACM Transactions on Graphics (Proc. SIGGRAPH), 40(4), 2021. 1, 2, 5, 6 + +[16] Daquan Liu, Chengjiang Long, Hongpan Zhang, Hanning Yu, Xinzhi Dong, and Chunxia Xiao. Arshadowgan: Shadow generative adversarial network for augmented reality in single light scenes. In CVPR, pages 8139-8148, 2020. 1 +[17] Shitong Luo and Wei Hu. Diffusion probabilistic models for 3d point cloud generation. In CVPR, pages 2837-2845, 2021. 1, 2, 3, 5, 6 +[18] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, pages 652-660, 2017. 3, 4 +[19] Charles R Qi, Li Yi, Hao Su, and Leonidas J Guibas. Point-net++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, pages 5099-5108, 2017. 2 +[20] Dong Wook Shu, Sung Woo Park, and Junseok Kwon. 3d point cloud generative adversarial network based on tree structured graph convolutions. In ICCV, pages 3859-3868, 2019. 1, 2, 4, 5, 6 +[21] Xin Suo, Yuheng Jiang, Pei Lin, Yingliang Zhang, Minye Wu, Kaiwen Guo, and Lan Xu. Neuralhumanfvv: Real-time neural volumetric human performance rendering using rgb cameras. In CVPR, pages 6226-6237, 2021. 1 +[22] Diego Valsesia, Giulia Fracastoro, and Enrico Magli. Learning localized generative models for 3d point clouds via graph convolution. In ICLR, 2018. 1, 2 +[23] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(11), 2008. 6 +[24] He Wang, Zetian Jiang, Li Yi, Kaichun Mo, Hao Su, and Leonidas J Guibas. Rethinking sampling in 3d point cloud generative adversarial networks. CVPR Workshop "Learning to generate 3D Shapes and Scenes", 2021. 2, 3 +[25] 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, 38(5):1-12, 2019. 2 +[26] Cheng Wen, Baosheng Yu, and Dacheng Tao. Learning progressive point embeddings for 3d point cloud generation. In CVPR, pages 10266-10275, 2021. 1 +[27] Chung-Yi Weng, Brian Curless, and Ira Kemelmacher-Shlizerman. Photo wake-up: 3d character animation from a single photo. In CVPR, pages 5908-5917, 2019. 1 +[28] Guandao Yang, Xun Huang, Zekun Hao, Ming-Yu Liu, Serge Belongie, and Bharath Hariharan. Pointflow: 3d point cloud generation with continuous normalizing flows. In ICCV, pages 4541-4550, 2019. 1, 2, 3, 5 +[29] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In CVPR, pages 206–215, 2018. 3 +[30] Linqi Zhou, Yilun Du, and Jiajun Wu. 3d shape generation and completion through point-voxel diffusion. In ICCV, pages 5826-5835, 2021. 5 +[31] 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. 1 \ No newline at end of file diff --git a/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/images.zip b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7888cacd5c5e0aed208e77f784e72ed36309b058 --- /dev/null +++ b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e362c1e912ea7e29d30e36cd7a723ed60da28278b3c3b1eacd7c4715eda1aceb +size 609069 diff --git a/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/layout.json b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8752f3764ff0e35db1e14494ee1ba2188797ff4f --- /dev/null +++ b/warpingganwarpingmultipleuniformpriorsforadversarial3dpointcloudgeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2349b5c256192c409c0f0f0897799543b3948c8a0c1fdb688f54ce96590a1534 +size 421308 diff --git a/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_content_list.json b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..3e043b62bc81602ebd3dd2b75f131441f88e7ae0 --- /dev/null +++ b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1e2efd55ffcaffe2d985dd74c54bb0931e27df4114fe6843ffcfbd75c829fe5 +size 91773 diff --git a/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_model.json b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f24b03d8ffb9d918063e27b8bdb0e5d5c4c4de3f --- /dev/null +++ b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:134d9c7c0ec5eac2742d81aa51338c7f3dbdd430431f8753f5e0d468919aae52 +size 116081 diff --git a/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_origin.pdf b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..86a35c24e94f14145e5c4c13ba0c17475fd54d40 --- /dev/null +++ b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/e77de115-4b45-4d25-8918-05ec2725e309_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2861795ae9bed4e3a7dc9fe51a5e910a6d5d16b67ba5889b1b097e6be458464 +size 1404119 diff --git a/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/full.md b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/full.md new file mode 100644 index 0000000000000000000000000000000000000000..39b7fa26d47405b81a44ce90eb994a5c31830272 --- /dev/null +++ b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/full.md @@ -0,0 +1,406 @@ +# Watch It Move: Unsupervised Discovery of 3D Joints for Re-Posing of Articulated Objects + +Atsuhiro Noguchi†,‡* Umar Iqbal† Jonathan Tremblay† Tatsuya Harada‡,§ Orazio Gallo† +†NVIDIA ‡The University of Tokyo §RIKEN + +![](images/623d107f4a8341c2eee46a9a919211188713a39ce8d0f786beeb494565ad9feb.jpg) +Figure 1: Our method learns to render novel views of an articulated, moving object by "watching" it move in a multi-view video sequence with associated foreground masks. Simultaneously, it discovers the object's parts and joints with no additional supervision. The learned structure allows us to explicitly re-pose the object, by roto-translating each part around its joint. In (c) and (d) we re-pose objects from multiple categories to configurations never seen in training, which is possible thanks to the structure we discover from the input videos. + +# Abstract + +Rendering articulated objects while controlling their poses is critical to applications such as virtual reality or animation for movies. Manipulating the pose of an object, however, requires the understanding of its underlying structure, that is, its joints and how they interact with each other. Unfortunately, assuming the structure to be known, as existing methods do, precludes the ability to work on new object categories. We propose to learn both the appearance and the structure of previously unseen articulated objects by observing them move from multiple views, with no joints annotation supervision, or information about the structure. We observe that 3D points that are static relative to one another should belong to the same part, and that adjacent parts that move relative to each other must be connected by a joint. To leverage this insight, we model the object parts in 3D as ellipsoids, which allows us to identify joints. We combine this explicit representation with an implicit one that compensates for the approximation introduced. We show that our method works for different structures, from quadrupeds, to single-arm robots, to humans. The code is available at https://github.com/NVlabs/watch-it-move and a version of this manuscript that uses animations is at https://arxiv.org/abs/2112.11347. + +# 1. Introduction + +Using images to infer both the appearance and the functional structure of generic, real-world objects is a fundamental goal of computer vision. From a practical stand + +point, it would allow us to render and manipulate physical objects in the metaverse. But its appeal goes further, as it requires pushing the boundaries of our ability to learn from data with no direct supervision. + +Our community made dramatic progress towards appearance capture and novel view synthesis, particularly for static scenes [1, 6, 29, 35, 45, 65, 68]. Several recent methods can also capture dynamic scenes and reenact their motion [28, 39, 43, 54, 56]. We use the term "reenacting" to highlight that these methods cannot explicitly control the pose of the dynamic objects. Rather, they replay through the poses that were observed. Reposing an articulated object—i.e., the explicit manipulation of its pose—requires knowing the location of the joints and how the different parts of the object interact with each other1. Learning to predict the location of joints in 3D is a well-studied task, at least for humans, and it is generally tackled using 2D [17, 18, 22, 44, 55, 63] or 3D [16, 20, 25–27, 50, 70] ground truth information. When not using joints supervision, existing pose manipulation methods rely on a predefined model, that is, a template structure [23, 48]. However, annotations are expensive and object-specific, which is why they are only available for limited classes of objects, such as people or faces [15, 41, 47]. + +We aim at re-positioning an articulated object from a category not seen before, using only a multi-view video and corresponding foreground mask, as shown in Figure 1. Our approach requires no additional supervision, no prior knowledge about the structure, nor networks pre-trained on aux + +iliary tasks: we learn the appearance and the structure of the object by just watching it move. Like existing methods [8, 36], to express explicit pose changes, we treat the articulated object as a set of posed parts, each connected to other parts through joints. However, rather than relying on direct supervision, we note that a joint is a 3D point around which a part must rotate to produce the piece-wise, rigid deformation observed in the input images. This allows us to get indirect supervision for the locations of the joints from the image reconstruction loss. + +Our approach, inspired by neural implicit representations, is scene-specific and predicts the color and the signed-distance function (SDF) of any 3D point, allowing us to generate any desired frame by volumetric rendering [57]. We also learn certain properties of the object explicitly. Specifically, we model the object as a set of ellipsoids. A functional part of the object can be represented by one or more ellipsoids, as shown in Figure 2. We optimize the geometric properties of the ellipsoids, i.e., their size and pose, for each frame of the input sequence. The color and density of a 3D point, then, can be predicted from the combined contribution of the ellipsoids. Because these ellipsoids only afford a coarse approximation of the object, we also estimate a residual with respect to this explicit part-based representation. In addition to regularizing the optimization landscape, this representation provides a key advantage: the relative motion of the parts can be explicitly observed over time, which offers clues on the locations of the joints. Note that this applies to unobserved categories, and requires no prior knowledge on the number of parts that compose it. Because we do not use any prior on the structure of the object or supervision annotations, our method can re-pose any articulated object from a single multi-view video sequence and the corresponding foreground masks. The pose of the object can be manipulated by applying the appropriate rototranslation to the different joints. Figures 1(c) and (d) show examples of object re-positioning for different categories, structures, and number of parts—all of which were unknown at training time. Our method + +- is the first to learn a re-poseable shape representation from multi-view videos and foreground masks, without additional supervision or prior knowledge of the underlying structure, +- it discovers the number and location of physically meaningful joints—also learned with no annotations, and +- it is structure agnostic and can thus be learned for previously unseen articulated object categories. +- Our reconstruction and re-posing results are on par or better than those of category-specific methods that use prior knowledge. + +# 2. Related Work + +![](images/1bd440957f1f7952a25de453e1e71c90cb0d38811938da75ee549fe44e37c678.jpg) +Figure 2: We explicitly represent each object's part as an ellipsoid centered at $\mathbf{t}_i$ and oriented with $\mathbf{R}_i$ (magenta arrow). We identify the part's joints from a pool of candidates, $\pmb{\xi}_i^n$ . The final reconstruction is obtained by estimating a residual w.r.t. the ellipsoids. + +# 2.1. Object Re-Posing and Novel-View synthesis + +Synthesizing images of articulated objects under novel poses and viewpoints is critical to several applications. Earlier methods formulated the problem as conditional imaged-to-image translation [3,9,31,34,42,62,64,69]. Given an image of an object and a target pose, these methods use a generator model to transfer a given image to a target pose. The conditioning pose is usually obtained from 2D keypoints or parametric meshes. However, keypoints or mesh models are available for handful of object categories (e.g., faces, human body, and hands), preventing these methods from generalizing to arbitrary object classes. + +More recently, NeRF [35] ignited a wave of research on synthesizing novel views of an object by using a sparse set of multi-view images [1, 29, 35, 38, 57, 65]. These methods learn an implicit 3D representation that provides the color and density of each point in 3D space. Photorealistic images can then be generated using volumetric rendering. Since the implicit 3D representation they use is continuous and topology-agnostic, these methods can reconstruct arbitrary, static objects. Many follow-up works extend NeRF to model dynamic scenes, using single- or multi-view videos for training [28, 39, 43, 54, 56]. However, these methods only "reenact" the video used for training, and do not offer control over the articulated pose. We build on these developments and propose a method that also provides control over the articulated pose of the objects. + +To allow re-posing the objects, various implicit representations for articulated objects have also been proposed, especially for humans. They allow novel view and pose synthesis, but require ground truth poses [8,36,49], or dense 3D meshes [24, 30, 40, 41, 53] annotations for the training image. In contrast, we propose a re-poseable 3D implicit representation trained only from multi-view videos and foreground masks of a previously unseen object category. We simultaneously decompose the parts, estimate the connections between them, and reconstruct the image with no prior information about the structure of the object. + +![](images/18915c6dfb87a3c8cdedb1dba9268ed6f03c074c834c36267be84ba0b83ab380.jpg) +Figure 3: Given a multi-view video of an articulated, dynamic object, an MLP associates a frame id with the configuration of the object's parts, approximated with ellipsoids. To predict the color of a 3D query point in global coordinates, we assemble a feature f from its coordinates and signed-distance functions, expressed with respect to all of the parts. From f, a second MLP produces the color and a residual SDF to perform volume rendering. Simultaneously, from the parts we discover the structure. We train the system end to end, thus back-propagating the error all the way to the poses and radii of the parts. For clarity, some components and loss terms are not shown here. + +# 2.2. Discovery of 3D Joints of Articulated Objects + +Explicitly reposing an object is straightforward if the joints locations are given, but localizing the 3D joints is challenging. Ground-truth 3D joints supervision simplifies the problem [16, 20, 25-27, 50, 70]. However, 3D annotations are expensive to gather and, perhaps more importantly, they make the resulting algorithms category-specific. Other works simplify the problem and rely on 2D annotations and multi-view [17, 18, 22, 44, 55, 63] or temporal [37] information for 3D supervision. Although 2D joints are cheaper to annotate, the process is still time-consuming and hard to scale to a large number of objects and classes. To address this, some recent methods aim to discover the joints of articulated objects using self-supervised learning [19, 23, 48]. While these methods show impressive results, they still rely on carefully designed, object-specific templates and/or prior information, which cannot be directly applied to other object classes. Other methods can handle arbitrary objects but provide only 2D landmarks [7, 33, 52, 67]. There exist some works that discover 3D keypoints using self-supervision and multi-view data, but they are limited to rigid objects [51]. Other works estimate the parts and the structure of arbitrary objects from videos, but they require ground truth 2D trajectory of keypoints [10, 59]. In contrast to these methods, our approach discovers 3D joints of articulated objects and does not require any 2D or 3D annotations, predefined template, or any other prior knowledge about the object, which makes it category-agnostic. Additionally, most of these methods only provide locations for a sparse set of keypoints/joints and do not provide any information about the surface geometry or texture of the object. While some methods provide self-supervised dense part labels, they are limited to 2D information [14, 46]. In contrast, our re-posable shape representation provides dense part labels, 3D surface geometry, as well as the texture of each part (implicitly). + +Our work is also related to the recent methods for 3D + +shape representation that use implicit functions [2, 11, 12], which represent a deformable 3D shape as a composition of simple shape elements, e.g., 3D Gaussians (where the level set is an ellipsoid). Each element contributes to the implicit surface of the shape. However, these methods cannot learn surface textures, they require the ground truth 3D shape for training, and do not learn the physical connectivity between parts, which prevents explicit re-posing. Concurrent methods circumvent the need of 3D shape supervision, but do not allow for explicit re-posing [60, 61]. + +# 3. Method + +# 3.1. Overview + +Our method takes as input a sequence of $T$ multi-view, posed images of an articulated, moving object, $\mathcal{O}$ , and foreground masks indicating its silhouette. From those, we learn to render novel views of $\mathcal{O}$ . We also discover plausible joints that allow us to render $\mathcal{O}$ in a new pose and from a novel viewpoint, without any additional supervision. We use a hybrid representation of the object that combines an explicit rough approximation of its body, and a subsequent implicit refinement. More concretely, we represent $\mathcal{O}$ explicitly as a set of $P$ parts, each approximated with an ellipsoid, see Figure 2. Rather than assuming $P$ to be known, we over-segment the object and subsequently merge the different parts as needed (Section 3.5.2). The ellipsoid representing part $i$ is parametrized with its three-dimensional radius $\mathbf{r}_i$ . (Throughout the paper, we use bold for vectors and matrices.) Its pose at time $t$ is represented by the translation of its center of mass, $\mathbf{t}_i(t)$ , and a rotation matrix, $\mathbf{R}_i(t)$ . To discover and localize the object's joints, which define the relationship between different parts, we observe that a 3D point is a meaningful joint if roto-translating a part around it explains a pose change in the reconstructed image. + +There are four components to our method. First, a trainable module estimates the pose of each part, at each frame + +$t \in [1, T]$ (Section 3.2). From the posed parts, we propose to discover the underlying structure (Section 3.5), which we use as regularization during training, and to re-pose the object at inference. The third is a module that also uses the pose of the parts, and is trained to predict the color and signed-distance function of points in 3D (Section 3.3). The final component renders the output view by performing volumetric rendering on these predictions [35,57] (Section 3.4). We train the system end-to-end (Figure 3). + +# 3.2. Pose Estimation + +As shown in Figure 2, we represent each part of the object $\mathcal{O}$ as an ellipsoid $e_i$ , such that their union, $\mathcal{E}$ , approximates the object's 3D shape $\Omega$ : $\mathcal{E} = \bigcup_{i=1}^{P} e_i \approx \Omega$ . Each ellipsoid has a learnable three-dimensional radius parameter $\mathbf{r}_i$ . Using the frame id $t$ as input, we train an MLP, $\mathcal{T}_{\Theta}$ , that outputs the global rotation $\mathbf{R}_i(t)$ (represented with a $3 \times 3$ rotation matrix) and translation $\mathbf{t}_i(t)$ of each $e_i$ . We initialize these parameters randomly and observe that the optimization is reasonably robust to different initializations. Following common practice [35], rather than feeding $t$ to $\mathcal{T}_{\Theta}$ directly, we use positional encoding $\gamma(t)$ , where $\gamma(\cdot) = \{\cos(\alpha \cdot)\}_{\alpha=1:50}$ . Since we overfit our system to a single scene, we can directly optimize the rotation and translation of each part in the global coordinate system, for each time frame: $\mathcal{T}_{\Theta}: \gamma(t) \to \{\mathbf{R}_i(t), \mathbf{t}_i(t)\}_{i=1:P}$ . By predicting rotations and translations in the global coordinate system, we naturally force the pose of the object to be estimated consistently across views. + +# 3.3. Shape and Appearance Decoder + +Similar to NeuS [57], we seek to estimate the color, $\mathbf{c}$ , and signed-distance functions (SDFs), $d$ , at any 3D point, $\mathbf{x}^g$ , to perform volumetric rendering. Since the ellipsoids alone cannot accurately capture the object's shape, we use a second MLP, $S_{\Theta}$ , to predict a residual. To ensure that the final shape does not deviate significantly from $\mathcal{E}$ , we represent this as a residual SDFs, $\Delta d$ , which is bounded by construction. We first convert the query point $\mathbf{x}^g$ , expressed in global coordinates, to the local coordinate system of each part $\mathbf{x}_i(t) = (\mathbf{R}_i(t))^{-1}(\mathbf{x}^g - \mathbf{t}_i(t))$ , and we apply weighted positional encoding [36] to compute a feature vector + +$$ +\mathbf {f} = \operatorname {C A T} \left\{\mathrm {w} _ {i} ^ {\mathrm {P E}} \gamma \left(\mathrm {x} _ {i} (t)\right) \right\} _ {\{i = 1: P \}}, \tag {1} +$$ + +where CAT is the concatenation operation. The weights in Equation 1 are computed as + +$$ +\mathbf {w} ^ {\mathrm {P E}} = \operatorname {s o f t m a x} \left\{- s ^ {\mathrm {P E}} d _ {i} \right\} _ {\{i = 1: P \}}, \tag {2} +$$ + +where $d_{i} = \mathrm{SDF}_{i}(\mathbf{x}_{i}(t),e_{i})$ , and $s^{\mathrm{PE}}$ is a learnable temperature parameter for the softmax. The SDFs from the ellipsoids can be computed directly from their radii and poses + +![](images/2d23a35e17816b19753e7a592355a3d9773b1ed6fbe46f43881ba0b994e3cd72.jpg) + +![](images/c5de1a32fc4ef5a46b403254c6cdb40d1b209fe5858713b901103b3ec3f3eec0.jpg) +Original Frames + +![](images/cd00abde694d07510119cbee2bac8089a5f331ceae21d42bc6d5c0a7f42fa568.jpg) + +![](images/25e1ff83dbdd180947aed2bac7308d2944e24291bb04880f018cb317ee763aad.jpg) +Reconstruction + +![](images/9086c3722085ccfaf54eae1a12472f2a75ad4d145ddf6f7f6993882ef991341a.jpg) + +![](images/45f92625d6a72aed34ff32b91d50b9ddb802a916fd7153019e6dfca483555769.jpg) +Parts +Figure 4: Reconstruction and part segmentation rendered from novel perspectives. + +(see Supplementary). Note that $\mathbf{f}$ effectively subsumes the current estimates of the ellipsoids, their pose, and the location of the sampled point. We then feed $\mathbf{f}$ to a second MLP + +$$ +\left. \mathcal {S} _ {\Theta}: \mathbf {f} \left(\mathbf {x} ^ {g}\right)\rightarrow \left(\mathbf {c}, \widetilde {\Delta d}\right)\right| _ {\mathbf {x} ^ {g}}, \tag {3} +$$ + +where $\mathbf{c}$ is color of $\mathbf{x}^g$ , and $\widetilde{\Delta}d$ a residual with respect to the SDFs estimated from the ellipsoids, which we compress as + +$$ +\Delta d = d _ {\max } \tanh (s \widetilde {\Delta} d), \tag {4} +$$ + +where $d_{\mathrm{max}}$ is the maximum value of $\Delta d$ and $s$ is a learnable scale parameter. The final SDF can be computed as + +$$ +d = - \frac {1}{s ^ {d}} \operatorname {l o g s u m e x p} \left\{- s ^ {d} d _ {i} \right\} _ {\{i = 1: P \}} + \Delta d, \tag {5} +$$ + +where and $s^d$ is a learnable scaling factor. Following NeuS [57], we compute the S-density from the signed-distance function, $d$ , and use it with the color estimate of the 3D point to volume render the desired image. We also regularize the SDF with the Eikonal loss [13]: + +$$ +\mathcal {L} _ {\mathrm {S D F}} = \mathbb {E} [ (| \nabla d | _ {2} - 1) ^ {2} ]. \tag {6} +$$ + +We predict SDFs rather than densities because $\Delta d$ is bounded (Equation 4), and thus it naturally bounds the difference between the estimated surface positions of object $\Omega$ and the ellipsoid approximation, $\mathcal{E}$ . + +# 3.4. Rendering + +The color of an output pixel can be predicted by volumetric rendering using the signed-distance function, as proposed in NeuS [57], and which we briefly describe here for completeness. The discrete opacity of the $j$ -th point along the 3D ray corresponding to the output pixel can be computed as $\alpha_{j} = \max \left(\left(\Phi_{s}(d_{j}) - \Phi_{s}(d_{j + 1})\right) / \Phi_{s}(d_{j}),0\right)$ , where $d_{j}$ is the signed-distance function at the point (represented in global coordinates) and $\Phi_s$ is a sigmoid function. + +![](images/e50a9c1920fab91a171296d9068bb5574f475112b76b5824e5410253019ec71e.jpg) +Figure 5: We do not assume the number of parts to be known. Rather, we intentionally over-segment the object for training. After convergence, we merge parts that are static relative to each other. In this case, the first three steps of our procedure merge $\mathbf{a}_0$ , $\mathbf{b}_0$ , $\mathbf{c}_0$ , and $\mathbf{d}_0$ into a single part. The final two steps merge $\mathbf{a}_3$ with $\mathbf{b}_3$ , and $\mathbf{c}_3$ with $\mathbf{d}_3$ . A polygon (e.g., the triangular body of the robot) indicates a part that is connected to more than two parts. + +From this equation we compute the accumulated transmittance along the ray, $T_{j} = \prod_{k=1}^{j-1}(1 - \alpha_{k})$ , which we use to estimate the color of the output pixel as $\hat{\mathbf{C}} = \sum_{j} T_{j} \alpha_{j} \mathbf{c}_{j}$ . Similarly, the foreground mask can be rendered as $\hat{\mathbf{M}} = \sum_{j} T_{j} \alpha_{j}$ . The photometric reconstruction loss $\mathcal{L}_{\mathrm{photo}}$ is then + +$$ +\mathcal {L} _ {\mathrm {p h o t o}} = \mathbb {E} _ {t, \text {r a y}} [ | | \hat {\mathbf {C}} - \mathbf {C} _ {G T} | | _ {2} ^ {2} + | | \hat {\mathbf {M}} - \mathbf {M} _ {G T} | | _ {2} ^ {2} ]. \tag {7} +$$ + +We refer to the paper by Wang et al. for more details [57]. + +# 3.5. Discovery of the 3D Joints + +So far, we have described the object's parts as an unstructured set of ellipsoids $\mathcal{E}$ . That is, each part's transformation is applied in the global coordinate frame, and the parts act independently of each other. However, because these ellipsoids represent the object explicitly, they allow us to discover the underlying structure. Specifically, we make two observations. First, a point inside part $e_i$ that coincides with (is close to) a point in part $e_j$ as the relative pose between the two parts changes, is likely to be a joint that connects the two parts. We detail how we leverage this insight in Section 3.5.1. Because we do not know the number of parts a priori, we start by over-segmenting the object. Our second insight is that two connected parts that maintain the same relative pose throughout the sequence can be merged: the joint between them is not necessary to explain the poses observed in the input sequence, Section 3.5.2. While we discover the final structure and finalize the part merging after convergence, we also compute their respective losses at training time for additional regularization (see Section 3.6). + +# 3.5.1 Structure Discovery + +We start by sampling $\mathbf{N}$ equally spaced joint candidates, $\pmb{\xi}_i^n$ , for each part $e_i$ , see Figure 2. We provide more details about the sampling in the Supplementary. In order to discover connections we first compute the distance between all can- + +didates over all frames and for every part pair $(i,j)$ + +$$ +l _ {i, j} ^ {m, n} = \sum_ {t} \left(\left\| \boldsymbol {\xi} _ {i} ^ {m} - \boldsymbol {\xi} _ {j} ^ {n} \right\| _ {2} ^ {2} + \lambda_ {l} \left\| \mathbf {t} _ {i} - \mathbf {t} _ {j} \right\| _ {2} ^ {2}\right), \tag {8} +$$ + +where the second term penalizes connections between parts that are far from each other, $\lambda_{l}$ is a regularization coefficient, and $t$ is the frame id. To prevent the distance from changing too quickly, we smooth it across training iterations + +$$ +\bar {l} _ {i, j} ^ {m, n} (\tau + 1) \leftarrow (1 - \epsilon) \cdot \bar {l} _ {i, j} ^ {m, n} (\tau) + \epsilon \cdot l _ {i, j} ^ {m, n} (\tau), \tag {9} +$$ + +where $\epsilon$ is a momentum, and $\tau$ the training iteration. We compute the cost of connecting parts $i$ and $j$ as + +$$ +\bar {l} _ {i, j} (\tau) = \min _ {n, m} \bar {l} _ {i, j} ^ {m, n} (\tau). \tag {10} +$$ + +We sort the list of $\bar{l}_{i,j}$ 's for all parts in ascending order and traverse it to connect the parts that are closest (lowest cost). We assume the object's structure, $\Gamma$ , to be an acyclic graph, so we require that there be a path between any two joints, and we do not allow connections that would create loops. We do not connect parts that violate this requirement, even if their $\bar{l}$ is the next lowest. This procedure allows us to determine the structure of any articulated object that can be modelled as an acyclic graph. We note that modeling the structure as a tree naturally yields a hierarchy for the parts (with an arbitrary definition of the root node), which is necessary for re-posing. We also compute the overall cost associated with a particular configuration $\Gamma$ + +$$ +\mathcal {L} _ {\Gamma} = \sum_ {(i, j) \in \Gamma} \bar {l} _ {i, j}, \tag {11} +$$ + +which we use to regularize our training procedure (see Section 3.6). Figure 5 shows the typical + +quality of the structure we identify. Note that a part can connect to multiple parts. While this approach is reasonably robust, we found that roughly one out of ten random initializations (Section 3.2) can yield to slightly incorrect discovered structures, as shown in the inset on the right. + +![](images/122866e4ab8f411898f2c029067f9ef7803a21be82f2c528a56f873f13a5179c.jpg) + +# 3.5.2 Part Merging + +Rather than assuming prior knowledge on the total number of parts, we over-segment the object and merge redundant parts. Specifically, we combine parts that are static with respect to each other throughout the sequence, see Figure 5. Differently put, we only preserve the articulations that are necessary to explain a change of pose in the input videos. The relative position between parts can be computed as $\mathbf{R}_i^j = \mathbf{R}_i^{-1}\mathbf{R}_j$ and $\mathbf{t}_i^j = \mathbf{R}_i^{-1}(\mathbf{t}_j - \mathbf{t}_i)$ . We can then measure the relative motion as + +$$ +D _ {i, j} = \sigma_ {t} \left(\mathbf {R} _ {i} ^ {j}\right) + \lambda_ {\text {m o t i o n}} \sigma_ {t} \left(\mathbf {t} _ {i} ^ {j}\right), \tag {12} +$$ + +![](images/4121d0f08e04de63ca1524ff752eec87464af92cbe74f2863cdfeda3ad43780c.jpg) + +![](images/4e9a0afc796c345ddad49795d36b169a58f4793f6f634fd1e56b97d58e5eea14.jpg) + +![](images/cbebac6294037b8f6a6eeec2366571b8f8d1ec7908d384fe023e91c156b0a215.jpg) +Original Frame + +![](images/ccca2f1a46c1fa269bf60c54224007c3f95faad3670c4403dcd7d535e0f61b2f.jpg) + +![](images/47fdba230d499325b943353954b846537d1871b8e9234e4df2f999be2ac3091a.jpg) + +![](images/f6af88a7dfee21ead910076987e85f7e9a72b9bbe7f5edc9e76c6a7a6d3f01e4.jpg) +Re-Posing + +![](images/a67fb4eca75af727a9f2e93e5ea5946207570129918e7c5f07eec144d9ca1157.jpg) +Figure 7: Re-posing comparison against the baseline methods, Section 4.3. For $\mathrm{Kundu}^*$ et al. we use the neutral body model. + +![](images/db4ca2e6b2fc36c72e5d4091e81c7b06c7c4eeb9c2cb30d4081a042191a2c368.jpg) + +![](images/eb2c01c2b1b938557b0967d572962a874c2d63332a6f4e7e71ea53a82e05d6c4.jpg) +Parts +Figure 6: After learning the 3D joints and parts of a previously unseen object category from a multi-view video sequence, we can re-pose it by explicitly manipulating rotation and translation of each joint and part. Credits: human [41], dog [21]. + +where $\sigma_t$ is the standard deviation over time. We use Equation 12 to define an additional loss term for our training: + +$$ +\mathcal {L} _ {\text {m e r g e}} = \frac {1}{P ^ {2}} \sum_ {i \neq j} D _ {i, j} \Phi_ {1} \left(\frac {\bar {D} - D _ {i , j}}{\bar {D}}\right), \tag {13} +$$ + +where $\bar{D}$ is a hyperparameter, and $\Phi_1$ is a sigmoid function. Additional training details can be found in the Supplementary. After the training is complete, we merge parts with limited motion relative to each other. Specifically, we compute Equation 12 for all pairs of parts and iteratively merge those for which $D_{i,j}$ is small. A few steps of this process are shown in Figure 5. + +# 3.6. Training Strategy and Regularization + +We train our system on a single scene, and in an end-to-end fashion. The process optimizes also for the parts' radii $\{\mathbf{r}_i\}$ , in addition to training the parameters of the two MLPs. To help stabilize the training, we progressively increase the number of frames used for training as the training converges. This strategy yields a reasonable initialization of the structure, which is then adjusted to capture a consistent part decomposition and structure over the entire video. + +Our loss function comprises several terms, including $\mathcal{L}_{\mathrm{SDF}}$ , $\mathcal{L}_{\mathrm{photo}}$ , $\mathcal{L}_{\Gamma}$ , and $\mathcal{L}_{\mathrm{merge}}$ in Equations 6, 7, 11, and 13, respectively. However, we only add $\mathcal{L}_{\mathrm{merge}}$ after all the frames are added to the training. We describe additional regularization terms in the following, and we evaluate the contribution of each term in Section 4.5. The final loss is a weighted sum of these terms, see Supplementary. + +Ellipsoid Surface Regularization Our explicit use of ellipsoids to approximate the shape of the object allows us to sample points from the surface at a low cost. The projection of sampled surface points onto the image should cover the + +![](images/4b560cf3d88cac0bd68da1d2b82e9de2d2c0c9df4daebab537339bfe605af286.jpg) +Tgt Poses + +![](images/d8deb1e5baa4c6ea1782acd50340eb3080ddf52d7370169d78f4f6198408b6c0.jpg) +Schm.\*et al. + +![](images/53f1b285beb38c6256d140644ef32b69c0af27c2b9103dedf8415de67a1bb837.jpg) +Kun.* et al. + +![](images/e50a09af87e6b036b91e6aed61963090dcbd121284f6ba9113dc37567649a4ee.jpg) +Ours + +whole foreground mask of the object, and no pixels outside of it. We encourage this by minimizing the chamfer distance between the points sampled from the surface and the points sampled from the foreground mask: + +$$ +\mathcal {L} _ {\mathcal {E}} = \frac {1}{N _ {\mathcal {E}}} \sum_ {i} \min _ {j} \left\| \mathbf {p} _ {i} ^ {\mathcal {E}} - \mathbf {p} _ {j} ^ {M} \right\| _ {2} ^ {2} + \frac {1}{N _ {M}} \sum_ {j} \min _ {i} \left\| \mathbf {p} _ {i} ^ {\mathcal {E}} - \mathbf {p} _ {j} ^ {M} \right\| _ {2} ^ {2}, +$$ + +where $\mathbf{p}_i^{\mathcal{E}}$ are the coordinates of points randomly sampled from the surface of $\mathcal{E}$ and projected into the image space, $N_{\mathcal{E}}$ is their number, $\mathbf{p}_j^M$ are the coordinates of points randomly sampled from the mask $M_{GT}$ , and $N_M$ is their number. + +Part Coverage Loss Similarly, the centers of the parts, $\mathbf{t}_i$ , should be distributed over the foreground mask, rather than being concentrated in a region. Therefore, the centers of the parts are also learned to minimize the chamfer distance to the foreground mask: + +$$ +\mathcal {L} _ {\mathbf {t}} = \frac {1}{P} \sum_ {i} \min _ {j} \left\| \mathbf {t} _ {i} - \mathbf {p} _ {j} ^ {M} \right\| _ {2} ^ {2} + \frac {1}{N _ {M}} \sum_ {j} \min _ {i} \left\| \mathbf {t} _ {i} - \mathbf {p} _ {j} ^ {M} \right\| _ {2} ^ {2}. \tag {14} +$$ + +Separation Loss We further discourage the parts themselves to be concentrated in a single region by penalizing small distances between their centers: + +$$ +\mathcal {L} _ {\text {s e p a r a t i o n}} = \frac {1}{P ^ {2}} \sum_ {i \neq j} \exp \left(\frac {\left| \mathbf {t} _ {i} - \mathbf {t} _ {j} \right| _ {2} ^ {2}}{2 \sigma^ {2}}\right), \tag {15} +$$ + +where $\sigma$ controls the scale of the distances to be regularized. + +# 4. Evaluation and Results + +We evaluate our method's ability to re-pose objects and estimate their joints—both qualitatively and quantitatively. + +# 4.1. Pose Manipulation + +One critical advantage of our explicit representation is the ability to manipulate the pose of previously unseen categories without prior knowledge: we can directly use the structure we discover by watching the object move. Given the frame id of a particular sequence, we manipulate the corresponding pose by applying hand-crafted rotations and + +Table 1: Quantitative evaluation. + +
Novel viewRe-posingJoints (mm)
LPIPS↓SSIM↑LPIPS↓SSIM↑MPJPE↓
Kundu* et al. [23]0.0590.9570.0820.94112.24
Schmidtke* et al. [48]0.0550.9570.0610.95318.56
Ours w/o merge0.0530.9660.0640.9537.59
Ours w/ merge0.0560.9650.0650.95211.11
+ +translations to each of the parts. To showcase our method's ability to discover the structure, we render a small dataset of seven structurally diverse robots. We provide more details about the rendered data in the Supplementary. We also trained our method on RGBD-dog, dataset of dogs [21]. Figures 1 and 6 show re-posing examples for objects with different structures, number of parts, and joints. More results are on the project's website. We do not estimate the range of motion at each joint, and leave it up to the user to define plausible poses. + +# 4.2. Pose Manipulation for Humans + +The structure our method discovers is plausible, as it allows for accurate re-positioning, but it may not coincide exactly with the physical structure of the object. For a quantitative evaluation we focus on humans, because of the rich literature of methods and annotated data for this category. We use the ZJU-MoCap dataset [41] for our experiments. Specifically, after training our method, we use a subset of the training frames to learn a linear transformation from the joints of an SMPL model [32] to ours. Since the ZJU-MoCap dataset [41] has ground truth SMPL annotations, we can use this mapping to re-pose our model to target frames not observed in training, as shown in Figure 7. We use five subjects from the ZJU-MoCap dataset. For each sequence we use the first $80\%$ of frames for training and the remaining for testing. The details of the mapping to and from the SMPL model are in the supplementary. Note that this mapping is for evaluation purposes only—our method allows for direct manipulation and does not need a SMPL model, as shown in Figure 6. The last two rows of Table 1 report the reconstruction quality of our re-posed renderings for the test frames, averaged over all the five subjects. We provide numbers for our model before and after merging (Section 3.5.2). We note that merging causes a small performance hit because it reduces the expressiveness (DOF) of the representation. However, even after merging, the performance remains competitive. Figure 8 shows the merging results with and without $\mathcal{L}_{\mathrm{merge}}$ . Using $\mathcal{L}_{\mathrm{merge}}$ allows us to appropriately pull parts together that have the same motion, and to learn a more meaningful part decomposition. + +# 4.3. Baselines Description and Evaluation + +A direct numerical comparisons with the state-of-the-art is impossible: ours is the first work that can explicitly re-pose a dynamic object from a previously unseen cate + +![](images/76ee3e8812f05d14f79adc2f846ff367c856ff10d451b54ba5b81ea71c09bf90.jpg) +Figure 8: Effect of merging loss. (a) merging with $\mathcal{L}_{\mathrm{merge}}$ and (b) without it. + +gory, without supervision (other than multi-view supervision), or prior knowledge of the underlying structure. Moreover existing methods are not scene-specific. The methods by Schmidtke et al. [48] and by Kundu et al. [23], both of which assume a template and only work for humans, are the closest existing solutions for unsupervised, direct pose manipulation. Although they tackle a more constrained task, we use them as inspiration for baselines that allow for a quantitative evaluation. + +Both Schmidtke et al. [48] and Kundu et al. [23] employ a CNN-based encoder, which allows them to work on scenes not seen in training. This gives an unfair advantage to our method, which overfits to a specific sequence. Therefore, we propose the modifications, which allow us to train both methods for a specific sequence, like ours. + +We modify the method by Kundu et al. by swapping their CNN-based encoder with an MLP that overfits the SMPL parameters to each frame. These parameters are then used to adapt the SMPL mesh to the pose in the frame. We train the MLP by enforcing that the color of corresponding vertices in different frames match. After convergence we compute the color of all the vertices of the SMPL model by averaging the colors of the corresponding pixels in all the input frames. Re-posing their solution, then, reduces to manipulating the SMPL parameters. To adapt the approach of Schmidtke et al., we replace their 2D template with a 3D template and their CNN encoder with an MLP that learns how to deform the 3D template to match the pose at the given time frame. Given a viewport we can project the template to a 2D representation, which can be converted to an RGB image with a second network. We denote both baselines with a * to indicate they are adapted from their original versions, and provide a diagram for each method in the Supplementary. A few considerations are in order. First, the architecture of both MLPs is the same as ours, and the number of the parameters to be predicted comparable. Second, while we make those methods scene-specific to remove our advantage, they still only work for people and still use a template or an SMPL model, like the original versions. They are our best effort at a fair comparison. We train both models on the same train/test split of the same five subjects we use for our method. For Kundu* et al. we use the neutral SMPL body model. A qualitative comparison can be seen in Figure 7. Table 1 reports LPIPS [66] and SSIM [58] for both reconstruction (i.e., same pose as in one of the input + +![](images/8c84e94541df1da9c68769f183cd11fb53aef98fb5137da800c6e7031942581f.jpg) +Figure 9: The joints our method discovers are plausible and stable across the sequence. + +frames, but different view) and re-posing. Our method is on par or slightly better than these baselines despite making no assumptions about the structure of the object. + +# 4.4. Joint Estimation Evaluation + +Our method discovers plausible joints. That is, they allow to re-pose the object consistently with the input images, but they may not exactly coincide with the physical joints. Figure 9 offers a qualitative evaluation: our 3D joints appear to closely follow the physical joints locations and they are stable over time. For a quantitative evaluation, we use one tenth of the frames in each sequence to compute a linear mapping from our joints and joints candidates to the joints of the SMPL model provided by the dataset, as is common practice for methods that discover landmarks [33, 52, 67]. The details of the algorithm that regresses this mapping are in the Supplementary. We apply the linear mapping to the remaining frames to compute the mean per joint position error (MPJPE) [15]. We also compare with the baselines defined in Section 4.3. For Kundu* et al. we learn a linear mapping from the predicted SMPL vertices to the GT joints provided by the dataset, while for Schmidtke* et al. we compute the same linear mapping as for our method. Once again, our method performs on par, and sometimes even better despite the additional information available to the baseline methods. + +# 4.5. Ablation Study + +In our first ablation study we evaluate the effect of each loss term to the overall performance. We use subject 366 from the ZJU-MoCap dataset and train our model from scratch by disabling one loss term at the time. The results are shown in Table 2. We note that the additional terms have a marginal effect on the quality of the rendered images, but they do reduce the joints estimation error measurably. Although $L_{\mathbf{t}}$ slightly degrades the novel view synthesis performance, without it, we observe issues with the structure discovery. Qualitative results are shown in the Supplementary. In our second experiment, we evaluate the importance of training $S_{\Theta}$ to predict an SDF residual $\Delta d$ , instead of the SDF $d$ itself, as done in Neural-GIF [53]. Table 2 confirms that predicting residual is critical to both the image reconstruction quality and the joints estimation. + +Table 2: Ablation study. + +
Ours+Lmerge- LΓ- Lε- Lt- Lseparation-Δd
Novel view LPIPS↓0.0630.0620.0620.0620.0610.0620.065
Novel view SSIM↑0.9580.9580.9580.9590.9590.9590.954
Novel pose LPIPS↓0.0650.0650.0690.0690.0650.0670.077
Novel pose SSIM↑0.9540.9530.9510.9520.9540.9520.946
Joint MPJPE(mm)↓8.4910.259.3512.138.709.7222.14
+ +# 5. Discussion and Limitations + +Our method can discover the structure of unseen categories, but it needs a foreground mask, which may not be available for new classes. While off-the-shelf instance segmentation approaches can be used, as we do for the experiments on humans [4] and dogs [5], this limits the practical applicability of our method. In addition, our method requires multi-view videos that capture the object from all sides. The results in the paper use five cameras around the object for robots, six cameras for humans, and eight cameras for the dog. The four viewpoints available in the Human3.6M dataset [15] do not provide sufficient coverage for our method. An additional constraint is that we can only repose parts that move relative to each other in the training sequence—we cannot infer what we cannot see. Our solution does not tackle the problem of defining plausible motion ranges around the joints and focuses on spherical joints, leaving different types of joints, such as sliding joints, for future work. We also observed that the randomness of the structure initialization can sometimes affect the structure discovery (Section 3.5.1). We leave it to future work to find a more elegant solution than simply re-initializing it when this happens. + +Societal impact. Our approach lends itself to similar dishonest uses as deepfakes, e.g., a person could be "rendered to perform" illegal, incriminating, or indecent activities. + +# 6. Conclusions + +We presented a method that discovers the structure of an articulated object from arbitrary categories, by watching it move in a multi-view video. It can then render the object from novel views and even directly manipulate its pose. Our method works for arbitrary articulated objects, as we show using robots with varying structures. + +# Acknowledgments + +This work was partially supported by JST AIP Acceleration Research JPMJCR20U3, Moonshot R&D Grant Number JPMJPS2011, JSPS KAKENHI Grant Number JP19H01115 and Basic Research Grant (Super AI) of Institute for AI and Beyond of the University of Tokyo. + +# References + +[1] Jonathan T Barron, Ben Mildenhall, Matthew Tancik, Peter Hedman, Ricardo Martin-Brualla, and Pratul P Srini + +vasan. Mip-NeRF: A multiscale representation for anti-aliasing neural radiance fields. IEEE International Conference on Computer Vision (ICCV), 2021. 1, 2 +[2] Aljaz Bozic, Pablo Palafox, Michael Zollhofer, Justus Thies, Angela Dai, and Matthias Nießner. Neural deformation graphs for globally-consistent non-rigid reconstruction. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3 +[3] Caroline Chan, Shiry Ginosar, Tinghui Zhou, and Alexei A Efros. Everybody dance now. In IEEE International Conference on Computer Vision (ICCV), 2019. 2 +[4] Hao Chen, Kunyang Sun, Zhi Tian, Chunhua Shen, Yongming Huang, and Youliang Yan. Blendmask: Top-down meets bottom-up for instance segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 8 +[5] Bowen Cheng, Alexander G. Schwing, and Alexander Kirillov. Per-pixel classification is not all you need for semantic segmentation. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 8 +[6] Inchang Choi, Orazio Gallo, Alejandro Troccoli, Min H Kim, and Jan Kautz. Extreme view synthesis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[7] Subhabrata Choudhury, Iro Laina, Christian Rupprecht, and Andrea Vedaldi. Unsupervised part discovery from contrastive reconstruction. Advances in Neural Information Processing Systems (NeurIPS), 2021. 3 +[8] Boyang Deng, John P Lewis, Timothy Jeruzalski, Gerard Pons-Moll, Geoffrey Hinton, Mohammad Norouzi, and Andrea Tagliasacchi. NASA neural articulated shape approximation. In European Conference on Computer Vision (ECCV), 2020. 2 +[9] Patrick Esser, Ekaterina Sutter, and Björn Ommer. A variational U-Net for conditional appearance and shape generation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[10] Joao Fayad, Chris Russell, and Lourdes Agapito. Automated articulated structure and 3D shape recovery from point correspondences. In IEEE International Conference on Computer Vision (ICCV), 2011. 3 +[11] Kyle Genova, Forrester Cole, Avneesh Sud, Aaron Sarna, and Thomas Funkhouser. Local deep implicit functions for 3D shape. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 3 +[12] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. In IEEE International Conference on Computer Vision (ICCV), 2019. 3 +[13] Amos Gropp, Lior Yariv, Niv Haim, Matan Atzmon, and Yaron Lipman. Implicit geometric regularization for learning shapes. In International Conference on Machine Learning (ICML), 2020. 4 +[14] Wei-Chih Hung, Varun Jampani, Sifei Liu, Pavlo Molchanov, Ming-Hsuan Yang, and Jan Kautz. SCOPS: Self-supervised co-part segmentation. In IEEE Conference + +on Computer Vision and Pattern Recognition (CVPR), 2019. 3 +[15] Catalin Ionescu, Dragos Papava, Vlad Olaru, and Cristian Sminchisescu. Human3.6M: Large scale datasets and predictive methods for 3D human sensing in natural environments. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2014. 1, 8 +[16] Umar Iqbal, Pavlo Molchanov, Thomas Breuel, Juergen Gall, and Jan Kautz. Hand pose estimation via 2.5D latent heatmap regression. In European Conference on Computer Vision (ECCV), 2018. 1, 3 +[17] Umar Iqbal, Pavlo Molchanov, and Jan Kautz. Weakly-supervised 3D human pose learning via multi-view images in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1, 3 +[18] Karim Iskakov, Egor Burkov, Victor Lempitsky, and Yury Malkov. Learnable triangulation of human pose. In IEEE International Conference on Computer Vision (ICCV), 2019. 1, 3 +[19] Tomas Jakab, Ankush Gupta, Hakan Bilen, and Andrea Vedaldi. Self-supervised learning of interpretable keypoints from unlabeled videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 3 +[20] Angjoo Kanazawa, Michael J Black, David W Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 3 +[21] Sinead Kearney, Wenbin Li, Martin Parsons, Kwang In Kim, and Darren Cosker. RGBD-Dog: Predicting canine pose from RGBD sensors. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 6, 7 +[22] Muhammed Kocabas, Salih Karagoz, and Emre Akbas. Self-supervised learning of 3D human pose using multi-view geometry. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 3 +[23] Jogendra Nath Kundu, Mugalodi Rakesh, Varun Jampani, Rahul Mysore Venkatesh, and R Venkatesh Babu. Appearance consensus driven self-supervised human mesh recovery. In European Conference on Computer Vision (ECCV), 2020. 1, 3, 7 +[24] Youngjoong Kwon, Dahun Kim, Duygu Ceylan, and Henry Fuchs. Neural human performer: Learning generalizable radiance fields for human performance rendering. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[25] Yann Labbe, Justin Carpentier, Mathieu Aubry, and Josef Sivic. Single-view robot pose and joint angle estimation via render and compare. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 3 +[26] Timothy E Lee, Jonathan Tremblay, Thang To, Jia Cheng, Terry Mosier, Oliver Kroemer, Dieter Fox, and Stan Birchfield. Camera-to-robot pose estimation from a single image. In International Conference on Robotics and Automation (ICRA), 2020. 1, 3 +[27] Jiefeng Li, Chao Xu, Zhicun Chen, Siyuan Bian, Lixin Yang, and Cewu Lu. HybrIK: A hybrid analytical-neural inverse kinematics solution for 3D human pose and shape estimation. + +tion. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 3 +[28] Zhengqi Li, Simon Niklaus, Noah Snavely, and Oliver Wang. Neural scene flow fields for space-time view synthesis of dynamic scenes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 2 +[29] Chen-Hsuan Lin, Wei-Chiu Ma, Antonio Torralba, and Simon Lucey. BARF: Bundle-adjusting neural radiance fields. IEEE International Conference on Computer Vision (ICCV), 2021. 1, 2 +[30] Lingjie Liu, Marc Habermann, Viktor Rudnev, Kripasindhu Sarkar, Jiatao Gu, and Christian Theobalt. Neural actor: Neural free-view synthesis of human actors with pose control. ACM Transactions on Graphics (SIGGRAPH ASIA), 2021. 2 +[31] Wen Liu, Zhixin Piao, Jie Min, Wenhan Luo, Lin Ma, and Shenghua Gao. Liquid warping GAN: A unified framework for human motion imitation, appearance transfer and novel view synthesis. In IEEE International Conference on Computer Vision (ICCV), 2019. 2 +[32] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. SMPL: A skinned multiperson linear model. ACM Transactions on Graphics (ToG), 2015. 7 +[33] Dominik Lorenz, Leonard Bereska, Timo Milbich, and Bjorn Ommer. Unsupervised part-based disentangling of object shape and appearance. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3, 8 +[34] Liqian Ma, Xu Jia, Qianru Sun, Bernt Schiele, Tinne Tuytelaars, and Luc Van Gool. Pose guided person image generation. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 1, 2 +[35] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In European Conference on Computer Vision (ECCV), 2020. 1, 2, 4 +[36] Atsuhiro Noguchi, Xiao Sun, Stephen Lin, and Tatsuya Harada. Neural articulated radiance field. In IEEE International Conference on Computer Vision (ICCV), 2021. 2, 4 +[37] David Novotny, Nikhila Ravi, Benjamin Graham, Natalia Neverova, and Andrea Vedaldi. C3DPO: Canonical 3D pose networks for non-rigid structure from motion. In IEEE International Conference on Computer Vision (ICCV), 2019. 3 +[38] Michael Oechsle, Songyou Peng, and Andreas Geiger. UNISURF: Unifying neural implicit surfaces and radiance fields for multi-view reconstruction. In IEEE International Conference on Computer Vision (ICCV), 2021. 2 +[39] Keunhong Park, Utkarsh Sinha, Peter Hedman, Jonathan T Barron, Sofien Bouaziz, Dan B Goldman, Ricardo MartinBrualla, and Steven M Seitz. HyperNeRF: A higher-dimensional representation for topologically varying neural radiance fields. arXiv:2106.13228, 2021. 1, 2 +[40] Sida Peng, Junting Dong, Qianqian Wang, Shangzhan Zhang, Qing Shuai, Xiaowei Zhou, and Hujun Bao. Animatable neural radiance fields for modeling dynamic human + +bodies. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[41] Sida Peng, Yuanqing Zhang, Yinghao Xu, Qianqian Wang, Qing Shuai, Hujun Bao, and Xiaowei Zhou. Neural body: Implicit neural representations with structured latent codes for novel view synthesis of dynamic humans. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 2, 6, 7 +[42] Albert Pumarola, Antonio Agudo, Alberto Sanfeliu, , and Francesc Moreno-Noguer. Unsupervised person image synthesis in arbitrary poses. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[43] Albert Pumarola, Enric Corona, Gerard Pons-Moll, and Francesc Moreno-Noguer. D-NeRF: Neural radiance fields for dynamic scenes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 2 +[44] Helge Rhodin, Jörg Spörri, Isinsu Katircioglu, Victor Constantin, Frédéric Meyer, Erich Müller, Mathieu Salzmann, and Pascal Fua. Learning monocular 3D human pose estimation from multi-view images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 3 +[45] Darius Rückert, Linus Franke, and Marc Stamminger. ADOP: Approximate differentiable one-pixel point rendering. arXiv:2110.06635, 2021. 1 +[46] Sara Sabour, Andrea Tagliausacchi, Soroosh Yazdani, Geoffrey Hinton, and David J Fleet. Unsupervised part representation by flow capsules. In International Conference on Machine Learning (ICML), 2021. 3 +[47] Soubhik Sanyal, Timo Bolkart, Haiwen Feng, and Michael J Black. Learning to regress 3D face shape and expression from an image without 3D supervision. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[48] Luca Schmidtke, Athanasios Vlontzos, Simon Ellershaw, Anna Lukens, Tomoki Arichi, and Bernhard Kainz. Unsupervised human pose estimation through transforming shape templates. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 3, 7 +[49] Shih-Yang Su, Frank Yu, Michael Zollhöfer, and Helge Rhodin. A-NeRF: Articulated neural radiance fields for learning human shape, appearance, and pose. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2 +[50] Xiao Sun, Bin Xiao, Shuang Liang, and Yichen Wei. Integral human pose regression. In European Conference on Computer Vision (ECCV), 2018. 1, 3 +[51] Supasorn Suwajanakorn, Noah Snavely, Jonathan Tompson, and Mohammad Norouzi. Discovery of latent 3D keypoints via end-to-end geometric reasoning. In Advances in Neural Information Processing Systems (NeurIPS), 2018. 3 +[52] James Thewlis, Hakan Bilen, and Andrea Vedaldi. Unsupervised learning of object frames by dense equivariant image labelling. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 3, 8 +[53] Garvita Tiwari, Nikolaos Sarafianos, Tony Tung, and Gerard Pons-Moll. Neural-GIF: Neural generalized implicit functions for animating people in clothing. In IEEE Conference + +on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 8 +[54] Edgar Tretschk, Ayush Tewari, Vladislav Golyanik, Michael Zollhöfer, Christoph Lassner, and Christian Theobalt. Non-rigid neural radiance fields: Reconstruction and novel view synthesis of a deforming scene from monocular video. IEEE International Conference on Computer Vision (ICCV), 2021. 1, 2 +[55] Bastian Wandt, Marco Rudolph, Petrissa Zell, Helge Rhodin, and Bodo Rosenhahn. CanonPose: Self-supervised monocular 3D human pose estimation in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 3 +[56] Chaoyang Wang, Ben Eckart, Simon Lucey, and Orazio Gallo. Neural trajectory fields for dynamic novel view synthesis. arXiv:2105.05994, 2021. 1, 2 +[57] Peng Wang, Lingjie Liu, Yuan Liu, Christian Theobalt, Taku Komura, and Wenping Wang. NeuS: Learning neural implicit surfaces by volume rendering for multi-view reconstruction. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 2, 4, 5 +[58] 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 (TIP), 2004. 7 +[59] Jingyu Yan and Marc Pollefeys. A factorization-based approach for articulated nonrigid shape, motion and kinematic chain recovery from video. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2008. 3 +[60] Gengshan Yang, Deqing Sun, Varun Jampani, Daniel Vlasic, Forrester Cole, Ce Liu, and Deva Ramanan. ViSER: Video-specific surface embeddings for articulated 3D shape reconstruction. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 3 +[61] Gengshan Yang, Minh Vo, Neverova Natalia, Deva Ramanan, Vedaldi Andrea, and Joo Hanbyul. BANMo: Building animatable 3D neural models from many casual videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 3 +[62] Lingbo Yang, Pan Wang, Chang Liu, Zhanning Gao, Peiran Ren, Xinfeng Zhang, Shanshe Wang, Siwei Ma, Xiansheng Hua, and Wen Gao. Towards fine-grained human pose transfer with detail replenishing network. In IEEE Transactions on Image Processing (TIP), 2020. 2 +[63] Yuan Yao, Yasamin Jafarian, and Hyun Soo Park. MONET: Multiview semi-supervised keypoint detection via epipolar divergence. In IEEE International Conference on Computer Vision (ICCV), 2019. 1, 3 +[64] Jae Shin Yoon, Lingjie Liu, Vladislav Golyanik, Kripasindhu Sarkar, Hyun Soo Park, and Christian Theobalt. Pose-guided human animation from a single image in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2 +[65] Alex Yu, Ruilong Li, Matthew Tancik, Hao Li, Ren Ng, and Angjoo Kanazawa. Plenoctrees for real-time rendering of neural radiance fields. IEEE International Conference on Computer Vision (ICCV), 2021. 1, 2 + +[66] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 7 +[67] Yuting Zhang, Yijie Guo, Yixin Jin, Yijun Luo, Zhiyuan He, and Honglak Lee. Unsupervised discovery of object landmarks as structural representations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 3, 8 +[68] Tinghui Zhou, Richard Tucker, John Flynn, Graham Fyffe, and Noah Snavely. Stereo Magnification: Learning view synthesis using multiplane images. In ACM Transactions on Graphics (SIGGRAPH), 2018. 1 +[69] Zhen Zhu, Tengteng Huang, Baoguang Shi, Miao Yu, Bofei Wang, and Xiang Bai. Progressive pose attention transfer for person image generation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[70] Christian Zimmermann and Thomas Brox. Learning to estimate 3D hand pose from single RGB images. In IEEE International Conference on Computer Vision (ICCV), 2017. 1, 3 \ No newline at end of file diff --git a/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/images.zip b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6835eae27b795e2c29de0be7bde41d7e1c793fd3 --- /dev/null +++ b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2592fb46f959168b34c70be298d7414ca9a81a20b3d4acf073a67cfa76657c9c +size 306983 diff --git a/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/layout.json b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..136c0adc5ae74fbf3b0161ce2eaf4f40b36c070f --- /dev/null +++ b/watchitmoveunsuperviseddiscoveryof3djointsforreposingofarticulatedobjects/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96457443a404a386eb749d7a210510283eaedacf64c1b9f4678222a958102e62 +size 493209 diff --git a/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_content_list.json b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..15f8686b0f7694e57bb2943463eefc715225a56e --- /dev/null +++ b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad5bc11498b0bd34c53fedd8d35a3c82d7ef048a133f5cdcd2c028540a7a4459 +size 92143 diff --git a/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_model.json b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fe62de3bfa593c49b5fcaf266776fa5b8274224d --- /dev/null +++ b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03b9b5cc35543bd43f5481dd28802074f89db306b232a67b5b7521f350b8b114 +size 114158 diff --git a/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_origin.pdf b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c8fb047bf9ceff1c15649f1f72089c55b331e71 --- /dev/null +++ b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/ce33e8d5-05a2-479a-aa84-fa540c447990_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6174076092a506156f3dfe3a90a98fc327c03511bbc86591e415656eda89554 +size 5884671 diff --git a/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/full.md b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ea4b4b6d1b4835290288cfc9c2ba839b1ea70db7 --- /dev/null +++ b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/full.md @@ -0,0 +1,397 @@ +# Wavelet Knowledge Distillation: Towards Efficient Image-to-Image Translation + +Linfeng Zhang $^{1}$ Xin Chen $^{2}$ Xiaobing Tu $^{3}$ Pengfei Wan $^{3}$ Ning Xu $^{3}$ Kaisheng Ma $^{1*}$ Tsinghua Univeristy $^{1}$ Intel Corporation $^{2}$ Kuaishou Technology $^{3\dagger}$ + +zhang-lf19@mails.tsinghua.edu.cn, xin.chen@intel.com, {tuxiaobing, wanpengfei}@kuaishou.com +ningxu01@gmail.com, kaisheng@mail.tsinghua.edu.cn + +# Abstract + +Remarkable achievements have been attained with Generative Adversarial Networks (GANs) in image-to-image translation. However, due to a tremendous amount of parameters, state-of-the-art GANs usually suffer from low efficiency and bulky memory usage. To tackle this challenge, firstly, this paper investigates GANs performance from a frequency perspective. The results show that GANs, especially small GANs lack the ability to generate high-quality high frequency information. To address this problem, we propose a novel knowledge distillation method referred to as wavelet knowledge distillation. Instead of directly distilling the generated images of teachers, wavelet knowledge distillation first decomposes the images into different frequency bands with discrete wavelet transformation and then only distills the high frequency bands. As a result, the student GAN can pay more attention to its learning on high frequency bands. Experiments demonstrate that our method leads to $7.08 \times$ compression and $6.80 \times$ acceleration on CycleGAN with almost no performance drop. Additionally, we have studied the relation between discriminators and generators which shows that the compression of discriminators can promote the performance of compressed generators. + +# 1. Introduction + +Tremendous progress has been achieved with Generative adversarial networks (GANs) in generating high-fidelity, high-resolution, and photo-realistic images and videos with both paired and unpaired datasets [4,13,17,18,25,41,43,59]. The excellent performance of GANs has promoted its application in various image-to-image translation tasks, such as image style transfer [20, 21] and super-resolution [22]. Compared with other tasks such as image classification and object detection, image-to-image generation is more complex since it has a much larger output space. As a con + +![](images/d82c262ac4209281d77594dd5707d1605d24cea6169a0724d23ea80203889126.jpg) +Figure 1. Normalized $L_{1}$ distance between the images generated by GANs and the ground truth images on different frequency bands. Different colors indicate GANs with different FLOPs. Results are averaged over 8 trials on Edge→Shoe dataset. + +sequence, existing GANs always have high computational demands and a huge amount of parameters, which lead to inefficient inference and intolerant memory footprint, and limit their usage in resource-constrained platforms. + +Knowledge distillation (KD) has been an effective tool for improving the performance of small models [5, 14]. By imitating the prediction results and the intermediate features from a cumbersome teacher model, the performance of a lightweight student model can be improved significantly. Following previous knowledge distillation methods on classification [44], object detection [53], semantic segmentation [31] and action recognition [28], some recent research has tried to directly apply knowledge distillation to GANs. Unfortunately, most of them obtain very limited and even negative effects [23, 26]. + +Why does $KD$ not work well on $GAN$ ? In this paper, we first study this question from a frequency perspective with the following experiment. Firstly, discrete wavelet + +![](images/689804a634403baea5b30330bddb35e95ddaa10da20bc4b1e7d09b5b9bcdf013.jpg) +(a) Knowledge Distillation + +![](images/74af932dc7bf61b51e8d7ca22c19b5fdb6adcaf9992def377abff2745c4061e5.jpg) +(b) Wavelet Knowledge Distillation +Figure 2. Comparison between knowledge distillation [14] (subfigure a) and the proposed wavelet knowledge distillation (subfigure b) on Edges→Shoes. Wavelet knowledge distillation first applies discrete wavelet transformation (DWT) to the generated images and then only minimizes the difference on high frequency bands. + +transformation (DWT) is utilized to decompose the generated images and the ground truth images into different frequency bands. Then, we compute the normalized $L_{1}$ -norm distance on each frequency band respectively1. As shown in Figure 1, all the GANs achieve very low error on the low frequency band but fail in the generation on high frequency bands, which is in line with the observation that images generated by GANs do not have good details. Besides, it is observed that compared with the large GAN, the tiny GAN achieves comparable performance on the low frequency band but much worse performance on high frequency bands. These two observations demonstrate that more attention should be paid to the high frequency during GAN compression. + +However, naive knowledge distillation in GANs application directly minimizes the difference between the images generated by students and teachers and ignores the priority of high frequency. Motivated by these observations, we propose wavelet knowledge distillation, which highlights students learning on the high frequency in knowledge distillation. As shown in Figure 2, we first apply discrete wavelet transformation to decompose the images generated by teachers and students into different frequency bands and then only minimize the $L_{1}$ loss on the high frequency bands. + +Abundant experiments on both paired and unpaired image-to-image translation demonstrate the effectiveness of our method both quantitatively and qualitatively. On Horse $\rightarrow$ Zebra and Zebra $\rightarrow$ Horse datasets, our method leads to $7.08\times$ compression and $6.80\times$ acceleration on CycleGAN with almost no performance drop. In the discussion section, we have further studied the effectiveness of different frequency bands and the influence of knowledge distillation schemes. Additionally, studies on the relation between discriminators and generators in model compression have also been introduced, showing that the compression of discriminators can significantly promote the performance of compressed generators. + +Our main contributions can be summarized as follows. + +- We have analyzed the performance of GANs from a frequency perspective, which quantitatively shows that GAN, especially small GAN lacks the ability to generate high-quality high frequency information in images. +- Based on the above observation, wavelet knowledge distillation is proposed to address this issue by only distilling the high frequency information, instead of all the information from images generated by the teacher. +- Quantitative and qualitative results on three models and eight datasets with six comparison methods have demonstrated the effectiveness of our method. +- We have studied the relation between discriminators and generators during model compression. It shows that compression on discriminators is necessary for maintaining its competition with compressed generators in adversarial learning, which further benefits the performance of generators. + +# 2. Related Work + +# 2.1. Image-to-Image Translation + +Generative adversarial networks have shown powerful ability in formulating and generating high-fidelity, high-resolution, and photo-realistic images and videos, and thus become the dominant models in image-to-image translation [2, 7, 10, 13, 30, 46, 47]. Pix2Pix is first proposed to apply conditional generative adversarial networks for paired image-to-image translation [17]. Then, Pix2PixHD is proposed to generate images with higher resolution with coarse to fine generators and multi-scale discriminators [48]. A more challenging task is to perform image-to-image translation with unpaired datasets. CycleGAN tackles this challenge by introducing the cycle-consistency loss, which reconstructs the generated image to the input domain [59]. Then, attention CycleGAN is proposed to find the crucial + +pixels in the images with an attention module [9]. Spade module is introduced in GauGAN to avoid the loss of semantic information in batch normalization layers [39]. Recently, researchers find that the perfect reconstruction in CycleGAN may be too difficult to achieve [36]. To address this issue, Park et al. introduce the patch-wise contrastive learning which improves the generation quality, stabilizes the training process, and reduces the training time, simultaneously [38]. The high-resolution and photo-realistic generated images come at the expense of intensive computation and massive parameters. To tackle this challenge, fruitful compression methods such as network pruning and network architecture search have been proposed recently. Li et al. propose the GAN Compression, which applies once-for-all search to find the best tiny GAN architecture [23]. Jin et al. introduce an inception-based residual block into generators and further compress them with channel pruning [19]. Liu et al. propose the Content-Aware GAN Compression, which enables GANs to maintain the content of crucial regions during compression [32]. Li et al. propose to revisit the role of discriminator in GAN compression with a selective activation discriminator [24]. + +# 2.2. Knowledge Distillation + +Knowledge distillation, which aims to facilitate the training of a lightweight student model under the supervision of a cumbersome teacher model, has been considered as an effective approach for both model compression and model accuracy boosting. The idea of employing a teacher model to train a student model is first proposed by Bucilua et al. for ensemble model compression [5]. Then Hinton et al. propose the concept of knowledge distillation, which introduces a hyper-parameter named temperature in softmax to soften the distribution of teacher logits [14]. Recently, abundant methods have been proposed to distill the knowledge in the intermediate features [52, 54] and their relation [40, 45]. Besides image classification, recent works have also successfully applied knowledge distillation to more challenging tasks such as object detection [3, 53], semantic segmentation [31], pre-trained language models [42, 50], machine translation [27], distributed training [37], multi-exit models [56] and so on. + +However, the effect of knowledge distillation on GANs for image-to-image translation has not been well-studied. Existing research shows that directly minimizing the distance between the generated images of students and teachers does not improve but sometimes harms the performance of students [26]. A few previous methods have tried to apply the classification-based knowledge distillation to image-to-image translation but earned very limited improvements. For instance, Li et al. propose to minimize the distance between intermediate features of teacher and student GANs [23] and Li et al. have tried to distill the seman + +tic relation between the features of different patches [26]. Recently, Chen et al. propose an overall knowledge distillation framework on GANs by distilling both the generator and the discriminator [6]. Jin et al. propose to distill generators with global kernel alignment on intermediate features [19], which boosts student performance without introducing additional layers. The main difference between our method and the previous GAN knowledge distillation methods is that our method distills the generated images instead of the intermediate features. As a result, our method is orthogonal to the previous methods, and it can be utilized with previous methods to achieve better performance. + +# 2.3. Wavelet Analysis in Deep Learning + +Compared with the other frequency analysis methods such as Fourier analysis, wavelet transformation can capture both the spatial and the frequency information in the sign and is thus considered as a more effective method in image processing [33]. Along with the success of deep learning, fruitful methods have been proposed to apply wavelet methods into neural networks for different targets. Williams et al. propose the wavelet pooling which replaces the max and average pooling with discrete wavelet transformation to preserve the global information of images during down sampling [49]. Chen et al. propose wavelet-like auto-encoder, which compresses the original image into two low-resolution images to accelerate the inference computation [8]. Liu et al. introduce wavelet transformation to the convolutional neural networks to leverage the spectral information in texture classification [12]. + +Recent works have also applied wavelet analysis to the image-to-image translation tasks. Huang et al. first propose the wavelet-SRNet, which performs single image superresolution by predicting the wavelet coefficients of high-resolution images [15]. Inspired by the architecture of U-Net, Liu et al. apply the wavelet package in convolutional neural networks to obtain a large receptive field efficiently [29]. To the best of our knowledge, this paper is the first work which applies wavelet analysis to knowledge distillation and GANs compression. + +# 3. Methodology + +# 3.1. Wavelet Analysis + +Given a function $\psi$ , let $\mathcal{X}(\psi)$ be the collection of the dilations and shift of $\psi$ : + +$$ +\mathcal {X} (\psi) = \left\{\psi_ {j k} = 2 ^ {- j / 2} \psi (2 ^ {- j} x - k) | j, k \in Z \right\}, \tag {1} +$$ + +where $\psi$ is the orthogonal wavelet if $\mathcal{X}(\psi)$ forms a basis in $\mathcal{L}_2$ spaces. Discrete wavelet transformation (DWT) is a mathematical tool for pyramidal image decomposition. With DWT, each image can be decomposed into + +Table 1. Experiment results on paired image-to-image translation on Edges→Shoes with Pix2Pix and Pix2PixHD. A lower FID is better performance. $\Delta$ indicates the performance improvements compared with the origin student. Each result is averaged over 8 trials. + +
Pix2PixHDPix2Pix
#Params (M)FLOPs (G)MethodMetric#Params (M)FLOPs (G)MethodMetric
FID↓Δ↑FID↓Δ↑
45.5948.36Teacher41.59±0.42-54.416.06Teacher59.70±0.91-
Origin Student44.64±0.54-Origin Student85.06±0.98-
Hinton et al. [14]45.31±0.63-0.67Hinton et al. [14]86.97±3.49-1.91
1.611.89Zagoruyko et al. [52]44.21±0.720.4313.611.56Zagoruyko et al. [52]84.25±2.080.81
28.32×25.59×Li and Lin et al. [23]44.03±0.410.614.00×3.88×Li and Lin et al. [23]83.63±3.121.43
Li and Jiang et al. [26]43.90±0.360.74Li and Jiang et al. [26]84.01±2.311.05
Jin et al. [19]43.97±0.170.67Jin et al. [19]84.39±3.620.67
Ahn et al. [1]44.53±0.480.11Ahn et al. [1]84.92±0.780.14
Ours42.53±0.292.11Ours80.13±2.184.93
+ +Table 2. Experiment results on unpaired image-to-image translation on Horse→Zebra and Zebra→Horse with CycleGAN. A lower FID is better. $\Delta$ indicates the performance improvements compared with the origin student. Each result is averaged over 8 trials. + +
Horse→ZebraZebra→Horse
#Params (M)FLOPs (G)MethodMetric#Params (M)FLOPs (G)MethodMetric
FID↓Δ↑FID↓Δ↑
11.3849.64Teacher61.34±4.35-11.3849.64Teacher138.07±4.01-
0.723.35Origin Student85.04±6.88-Origin Student152.67±9.63-
Hinton et al. [14]84.08±3.780.96Hinton et al. [14]148.64±1.624.03
Zagoruyko et al. [52]81.24±2.013.800.723.35Zagoruyko et al. [52]148.92±1.203.75
Li and Lin et al. [23]83.97±5.011.0715.81×14.82×Li and Lin et al. [23]151.32±2.311.35
Li and Jiang et al. [26]81.74±4.653.30Li and Jiang et al. [26]151.09±3.671.58
Jin et al. [19]82.37±8.562.67Jin et al. [19]149.73±3.942.94
Ahn et al. [1]82.91±2.412.13Ahn et al. [1]150.31±3.552.36
Ours77.04±3.528.00Ours146.01±1.866.66
Ours + Li and Lin et al.76.40±3.178.64Ours + Li and Lin et al.145.96±1.926.71
1.617.29Origin Student70.54±9.63-Origin Student141.86±1.57-
Hinton et al. [14]70.35±3.270.19Hinton et al. [14]142.03±1.61-0.17
Zagoruyko et al. [52]67.51±4.573.031.617.29Zagoruyko et al. [52]141.23±1.880.63
Li and Lin et al. [23]68.58±4.311.967.08×6.80×Li and Lin et al. [23]141.32±1.270.54
Li and Jiang et al. [26]68.94±2.981.60Li and Jiang et al. [26]151.09±3.671.58
Jin et al. [19]67.31±3.013.23Jin et al. [19]140.98±1.410.88
Ahn et al. [1]69.32±5.891.22Ahn et al. [1]141.50±2.510.36
Ours61.65±4.738.89Ours138.84±1.473.02
Ours + Li and Lin et al.60.13±4.0810.41Ours + Li and Lin et al.138.52±0.953.34
+ +four bands, including LL, LH, HL and HH, where LL indicates the low frequency band and the others are high frequency bands. The LL band can be further decomposed by DWT into LL2, LH2, HL2 HH2 and so on. Denote DWT as $\Psi (\cdot)$ , then the high frequency and the low frequency bands of an image $x$ can be written as $\Psi^{\mathrm{H}}(x)$ and $\Psi^{\mathrm{L}}(x)$ , respectively. More specifically, in this paper, we apply 3-level discrete wavelet transformation in all the experiments. $\Psi^{\mathrm{L}}(x)$ indicates LL3 band. $\Psi^{\mathrm{H}}(x) = \{\mathrm{HL3,LH3,HH3,LH2,LH2,HH2,LH1,LH1,HH1}\}$ . + +# 3.2. Knowledge Distillation + +Revisit Knowledge Distillation for Classification At the beginning of this subsection, we revisit the formulation of + +knowledge distillation on classification [14]. Given a set of training samples $\mathcal{X} = \{x_1, x_2, \dots, x_n\}$ and their labels $\mathcal{Y} = \{y_1, y_2, \dots, y_n\}$ , denoting the networks of the student and the teacher as $f_s$ and $f_t$ , the loss function of the student can be formulated as $\mathcal{L}_{\mathrm{Student}} = \alpha \cdot \mathcal{L}_{\mathrm{CE}} + (1 - \alpha) \cdot \mathcal{L}_{\mathrm{KD}}$ , where $\mathcal{L}_{\mathrm{CE}}$ indicates the cross-entropy loss between the prediction $f(x)$ and its label $y$ . $\alpha \in (0, 1]$ is a hyper-parameter to balance two loss items, and $\mathcal{L}_{\mathrm{KD}}$ indicates the knowledge distillation loss. + +On classification tasks, $\mathcal{L}_{\mathrm{KD}}$ can be formulated as + +$$ +\mathcal {L} _ {\mathrm {K D}} = \frac {1}{n} \sum_ {i} ^ {n} \mathcal {K L} \left(\operatorname {s o f t m a x} \left(\frac {f _ {t} \left(x _ {i}\right)}{\tau}\right), \operatorname {s o f t m a x} \left(\frac {f _ {s} \left(x _ {i}\right)}{\tau}\right)\right), \tag {2} +$$ + +where $\mathcal{KL}$ indicates the Kullback-Leibler divergence, + +![](images/980b1d4c1a3860b73cd46b9b4fc145a4dc592cce753e795cf2a50892ec9c2bf2.jpg) +Input + +![](images/37e9239972a1834db7d850558be761eba5dae434027755b52e43a92367e103ce.jpg) +Baseline (14.82x) + +![](images/a9378439208539cde81b117f88f88431f56f6698dfd667e617174d8721af753b.jpg) +Jin et al. (14.82x) + +![](images/a8c0db05e21c2c48a2de3f0114ec18260344a794e73cd18762da9f32cb2299d1.jpg) +Li & Jiang et al. (14.82 x) + +![](images/1b0aad88711b501913418196930361efd69c166449fc9d0246cee7a59edfabec.jpg) +Ours (14.82x) + +![](images/095065e7a9476dad4eb2a760809017843106dae6ddf5d287ad91aacac4645207.jpg) +Teacher +(a) +Figure 3. Qualitative results on Horse $\rightarrow$ Zebra with CycleGAN (a-d) and Edges $\rightarrow$ Shoes with Pix2Pix (e-h). Numbers in the brackets indicate the acceleration ratio compared with their teachers. "Baseline" indicates the students trained without knowledge distillation. + +![](images/485c8475f71f7444b1086ab1f9a03b7ee2895d50c3c34e9e1561cbe097a98153.jpg) + +![](images/686dd2fc2dc17c6d51431a85a6c15e453a42eec14e6c73ca550cd1e5a5bcc64d.jpg) + +![](images/5ca2c412c075cceda44cfd00864d5d580d33af9f12c3357993461443cd34c89d.jpg) + +![](images/533e761035eee7196aa1e06fe2e27de19d00eec3c2919182023a01c434e04ac5.jpg) + +![](images/ebe1803f71ac4ecf2198a3add95a3f3da2d39b231b6c73475cfcf1d017f52349.jpg) + +![](images/5aafee97a502d6a3f4256d853476529cdeadc9e4bf726935f0defc84dfdc6194.jpg) +(b) + +![](images/7afeec3daadaa7ead6aa8ae085bf4525491032b5770acf0f9e08045e192c7b78.jpg) + +![](images/25df26a7e4f948dbb1fbbf5771731664ca563bc93ff68afc6c446d8c9fe15f81.jpg) + +![](images/0bdfb0744a2b7fab1b8833caf6a607bdef0a140d3022adebb31496b4db39d47a.jpg) + +![](images/5b28bd546b2b75c39d0592bb513f70913993f62b1eb9628e660d3ff5dc8853d8.jpg) + +![](images/9827971a0c562940f5be2c895cdf6e1749704e703b10e5e66900d0f2e64d5e98.jpg) + +![](images/447cb3948ec571b5e2ea4d4c27b38a1a022a4d73c9b40ccbb25d3ba543bcb480.jpg) +(c) + +![](images/06b661048a0930337ab6d6c1bf73b46275b41f971b358e9a07d0f0bc48869077.jpg) +Input + +![](images/092b472f9ccaf4e6f120b73275d699bed05a30726927e89ddb8b4b4388891110.jpg) +Baseline $(3.88\times)$ + +![](images/19ec541696bc82b07c6edc84d5af00949351bd8ab3d4d63a855ee1e1b1b24190.jpg) + +![](images/46c7b2cc8c34666a4f200056fcc0766411b438410d08c606eadd7a8f6940f9c0.jpg) + +![](images/62c0869ece1dcab24f41f20eb0e16ce30c752d807beb84576dbacc5835fa25ae.jpg) +Ours (3.88x) + +![](images/74155deb2c35cd96ffabb2ddfe1983284a94bc25f41a1d971ca597bad524ff19.jpg) +(d) +Ground Truth + +![](images/ac49782d38d9ae47c560eed928aaac3876a50b0969b88585813a2c4375ca52bb.jpg) + +![](images/8c21c2f768a2156b0dbc148bf37c4d7fe22fc20e8808c1dd54d13d78f3106dbf.jpg) + +![](images/1e47a33e72178401ae7649883a2816c8f1eaa4dd5f47c33e4bd76191ff262241.jpg) +Jin et al. (3.88x) + +![](images/aa37393601a8ac6085b12976eef4e5f4f5226747714973555f565d0f46d257b4.jpg) +Li & Jiang et al. (3.88x) + +![](images/2f1c07566b746ad19be9c320b21231c2abd2c1c56f48b021a58eef35ee4bbe6d.jpg) + +![](images/f3027559e3dfe62668995a7af09a5712fd4934fac154ac3c00e2653df2a63e35.jpg) +(e) + +![](images/c3c86eb8f73b82f6ae57be0d871ffd648d8fb823b9c159057f133f3246361d2a.jpg) + +![](images/7026ac66a726bdc7d71a71937be1dac431c5fd9a784b63447c375a8fcfeece59.jpg) + +![](images/3f6558c72aa9916fabab9a554eece60c4c751380c0e4ffbad38a178f6436a0d3.jpg) + +![](images/744b6869fb6e3582d0c7a1bb5714aa46b42203fd53917de7d5e0a2135e2c3d0b.jpg) + +![](images/82d8c97fd661d7b3cb7a99644e1a94339fa423c9fc248c2f8cc0c35dc823c98f.jpg) + +![](images/61ee6e447f9208897054e6f438abb6166055ddaee070f5af7dbff73a630a825e.jpg) +(f) + +![](images/d7ff468e62b53692287282b1814712604e3aa6b7ccf616fade933886c348a2cc.jpg) + +![](images/eb823807a3491312aa98b4c4742b0ebee0c5e3e17c6157ab0af2e939463f04b3.jpg) + +![](images/88a50f731a3eb7574fc496010c4d8e7aaec1b3b1f5067f23c6d14809b9f1bb40.jpg) + +![](images/6170feda4a691e0eca256102e809e2de7a8aba2ae199e05865d8ac6b582ff037.jpg) + +![](images/ffb55a7c3d3b8650d39103e12e8212f08a89e740455c01262e3a9e8d92ec96fa.jpg) + +![](images/5bd5530d34a10be712f540af7b1d7a3fad92eb8e89fc42030fa092857ddf6640.jpg) +(g) + +![](images/ac0a898086c392b6cba11dc8989284abc3ddd6d15f427f0a8eaf320cd1ac436d.jpg) + +![](images/33b6618abbcbaee28a92103e169b141606b66c330ca71aab7eee0396d7214749.jpg) + +![](images/0a5bf4ece60dad801f0e6ab1659b6882f4359335bcf730b7c4155a504bf1a49f.jpg) + +![](images/caf8089f9b921b8642d57a6468ae8cc78c8a9d22d818bf61c539937846c2b669.jpg) + +![](images/e15015e0bb0c39c7ec14d2c33fa6ac6e9f0d02a60120d5d0b36b4dd7d59cf8ea.jpg) + +![](images/1b45897d63b3232c12bb17d3451c49169b5833fbc936dcd86fc57b5cb56a2d27.jpg) +(h) + +which measures the distance between the categorical probability distribution of students and teachers. $\tau$ is the temperature hyper-parameter in softmax function. + +Knowledge Distillation for Image-to-Image Translation On the task of image-to-image translation, since the prediction result $f(x_{i})$ is the value of pixels instead of categorical probability distribution, KL divergence can not be utilized to measure the difference between students and teachers. A naive alternative is to replace KL divergence with the $L_{1}$ -norm distance between the generated images from students and teachers. Then, we can extend Hinton knowledge distillation for image-to-image translation, whose loss function can be formulated as + +$$ +\mathcal {L} _ {\mathrm {K D}} = \frac {1}{n} \sum_ {i} ^ {n} \| \left(f _ {t} \left(x _ {i}\right) - f _ {s} \left(x _ {i}\right) \right\| _ {1}. \tag {3} +$$ + +Besides Hinton knowledge distillation, there are also abundant feature knowledge distillation methods which can be applied to image-to-image translation directly. Since our method is not feature-based, we do not introduce them here. + +Wavelet Knowledge Distillation Based on the above notations, now we can introduce the proposed wavelet knowledge distillation, which only minimizes the difference on the high frequency between students and teachers. Its loss function $\mathcal{L}_{\mathrm{WKD}}$ can be formulated as + +$$ +\mathcal {L} _ {\mathrm {W K D}} = \frac {1}{n} \sum_ {i} ^ {n} \| \left(\Psi^ {H} \circ f _ {t}\right) \left(x _ {i}\right) - \left(\Psi^ {H} \circ f _ {s}\right) \left(x _ {i}\right) \| _ {1}. \tag {4} +$$ + +On unpaired image-to-image translation models such as CycleGAN, there are sometimes two generators for the two translation directions. In this circumstance, the proposed wavelet knowledge distillation loss can be applied to the two directions simultaneously. + +The overall training loss can be formulated as $\mathcal{L}_{\text{overall}} = \mathcal{L}_{\text{origin}} + \alpha \cdot \mathcal{L}_{\text{WKD}}$ , where $\mathcal{L}_{\text{origin}}$ indicates the original training loss of different models, such as the adversarial learning loss and recycling loss. $\alpha$ is the hyper-parameter to balance the two loss functions. Hyper-parameter sensitivity studies have been given in the supplementary material. + +![](images/bf95f4d37e20c60a83fc37b171bb8c108ea3f48ef2010d0b14e1d56ef8aa0734.jpg) +Figure 4. Qualitative experiments on the other datasets: Winter $\rightarrow$ Summer (subfig. a-b), Summer $\rightarrow$ Winter (subfig. d-e), Apple $\rightarrow$ Orange (subfig. c), Photo $\rightarrow$ Monet (subfig. f), Cityscapes (subfig. g), Facades (subfig. h) and Maps (subfig. i). + +![](images/c36c083a15e56d12d2bfec4ad2bfb4f0db3e4831373432b3cabdd7e73a6d14c4.jpg) + +![](images/e1be3c8fc0ff47527dc20276cfe883c12c97fe251792d48e204c9899f7526110.jpg) + +Table 3. Paired image-to-image translation experiment results on Cityscapes with Pix2Pix. A higher mIoU is better. $\Delta$ indicates the performance improvements compared with the origin student. Each experiment is averaged over 8 trials. + +
#Params (M)FLOPs (G)MethodMetric
mIoU↑Δ↑
54.4196.97Teacher46.51±0.32-
13.61 4.00×24.90 3.88×Origin Student41.35±0.22-
Hinton et al. [14]40.49±0.41-0.86
Zagoruyko et al. [52]40.17±0.36-1.18
Li and Lin et al. [23]41.52±0.340.17
Li and Jiang et al. [26]41.77±0.300.42
Jin et al. [19]41.29±0.51-0.06
Ahn et al. [1]41.88±0.450.53
Ours42.93±0.251.58
+ +# 4. Experiment + +# 4.1. Experiment Settings + +Models and Datasets Experiments are mainly conducted with three models including Pix2Pix [17], CycleGAN [59] and Pix2PixHD [48]. Our teacher is the original model with the setting from their released codes $(ngf = 64)^{2}$ . The student model has the same architecture and depth but fewer channels $(ngf = 32 / 24 / 16)$ compared with its teacher. Quantitative experiments have been conducted on Horse $\rightarrow$ Zebra, Edge $\rightarrow$ Shoe and Cityscapes [11]. Besides, we also conduct qualitative experiments on Winter $\rightarrow$ Summer, Summer $\rightarrow$ Winter, Apple $\rightarrow$ Orange, Photo $\rightarrow$ Monet, Facades and Maps [16, 58]. + +Evaluation Settings Following previous works [19], we adopt Fréchet Inception Distance (FID) and mIoU as the performance metrics on Cityscapes and the other datasets. A lower FID and a higher mIoU indicate that the generated images have better quality. Please refer to the codes in the supplementary material for more details. + +# 4.2. Quantitative Results + +The quantitative experiment results on paired and unpaired image-to-image translation have been shown in Table 1 and Table 2, respectively. Experiments on Cityscapes have been shown in Table 3. It is observed that: (a) Directly applying the native knowledge distillation (Equation 3) to GANs sometimes leads to performance degradation. For instance, there are 1.91 and 0.67 FID increments (performance degradation) on Edges $\rightarrow$ Shoes with Pix2pix and Pix2PixHD, respectively. (b) In contrast, our method achieves consistent and significant performance improvements on all the datasets and models, which outperforms the other GAN knowledge distillation methods by a clear margin, e.g. 3.78 FID lower than the second-best method on CycleGAN, on average. (c) On Horse $\rightarrow$ Zebra and Zebra $\rightarrow$ Horse, the student models trained with our method achieve almost the same FID with the teacher model, which indicates $7.08 \times$ compression and $6.80 \times$ acceleration with almost no performance degradation. (d) Compared with the students trained without knowledge distillation, the distilled students usually not only achieve lower FID, but also tend to have lower FID standard deviation, which shows that knowledge distillation may stabilize the training of GANs. (e) Our method and previous feature knowledge distillation method can be utilized together, which further leads to 0.63 FID reduction on CycleGAN on average. + +# 4.3. Qualitative Results + +The qualitative results of CycleGAN on Horse $\rightarrow$ Zebra (a-d) and Pix2Pix on Edges $\rightarrow$ Shoes (e-h) have been shown in Figure 3. It is observed that: (a) On Horse $\rightarrow$ Zebra, the baseline model can not transform the whole body of horses to zebras (e.g. subfigures a, b and c). Besides, the generated stripes of zebras are chaotic and unnatural (e.g. subfigure d). This problem also exists in the other knowledge distillation methods (e.g. subfigure c). In contrast, the images generated by the distilled students don't have these issues. (b) On Edges $\rightarrow$ Shoes, the generated images from distilled students + +![](images/0e3749a9a6cea23adc1bfa79259da286273decd4f8dff1b28b6b6d6684ccdcdf.jpg) +(a)D-Params=0.18M + +![](images/fa3a89aad7d2fdeccd9225e8d2460614b29106a16dfcd299f56d54429d4b7f6b.jpg) +(b)D-Params=0.69M + +![](images/15d600ef611463a3739440348339c93739a1b068c9652b007c4771f5910b78dc.jpg) +(c)D-Params=1.56M + +![](images/08e411ea75daab4c318f0cb0e842f9ddd7b4aabbed376100a4f9d771bc4a0280.jpg) +(d)D-Params=2.77M + +![](images/b0b65c1c2b68706aaa979296cd2beb8ec32b25b8de3b933d8ad6664ed9aea693.jpg) +Figure 5. The discriminator loss and generator loss during the training period. In all the subfigures, the generators are $15.81 \times$ compressed. In subfigure (d), the discriminator has its origin size. In subfigure (a-c), the discriminators are compressed by $15.39 \times$ , $4.01 \times$ and $1.78 \times$ . The FID of these four experiments have been shown in Figure 6. +Figure 6. Experiments on the distilled CycleGAN with discriminators in different sizes from Figure 5. Lower FID is better. + +have much better color and details (e.g. shoestrings in subfigure f and g). In subfigure (f), the distilled students have successfully generated the highlights on the shoes, which makes the images more realistic. + +# 5. Discussion + +# 5.1. Ablation Study + +In this subsection, we give a detailed study on the individual influence of different frequency bands in knowledge distillation. Experimental results on Horse $\rightarrow$ Zebra and Zebra $\rightarrow$ Horse with CycleGAN are shown in Table 4. It is observed that: (a) The performance of student models has been severely harmed by only distilling the low frequency band (11.07/10.39 FID increments). (b) The best performance can be achieved by only distilling the high frequency bands (i.e. the proposed wavelet knowledge distillation). (c) Distilling both the high and the low frequency bands achieves slight FID reduction, but its performance is still worse than only distilling the high frequency band. These observations have clearly demonstrated the benefits of distilling the high frequency band and the negative influence of distilling the low frequency band, which also conform to the conclusion in Figure 1 - more attention should be paid to the high frequency band during GAN compression. + +# 5.2. A Small Discriminator Makes the Compressed Generator Better + +Usually, in real-world GAN applications, only the generators are required to be deployed in devices, while the discriminators are always discarded at this time. As a re + +sult, most of the previous works only perform compression on generators but ignore what should be done on discriminators. However, since the discriminator directly influences the training loss of generators, it has a crucial impact on the performance of generators. In this subsection, we study how the capacity of discriminators influences generators. Figure 5 has shown the training loss of generators and discriminators for four CycleGANs with discriminators in different sizes. In all the subfigures, the generators are $15.81 \times$ compressed and trained with wavelet knowledge distillation. In subfigure (d), the discriminator has its origin size. In subfigure (a-c), the discriminators are compressed by $15.39 \times$ , $4.01 \times$ , and $1.78 \times$ , respectively. Besides, their corresponding FIDs have been shown in Figure 6. + +Observation & Analysis It is observed that: (i) When the generator is compressed but the discriminator is not compressed (subfigure d), the loss of generator is much higher and the loss of discriminator is much lower. This observation indicates that when the discriminator has a much larger size than the generator, it achieves overwhelming success in its competition with generators. Thus, the balance between discriminators and generators is broken, which makes generators hard to learn useful information from the adversarial loss. (ii) The distilled generator achieves the best performance when the discriminator is $4.01 \times$ compressed (0.69M). Both a too small and a too large discriminator lead to performance degradation on generators, indicating that the unbalance between discriminators and generators in adversarial learning harms the training of generators. + +Based on these observations, we can conclude that although discriminators are not utilized in application, they are still required to be properly compressed to maintain the balance between them and generators in adversarial learning, which further benefits the training of generators. + +# 5.3. Knowledge Distillation Paradigm + +Knowledge distillation is first proposed in a teacher-student (TSKD) paradigm, where the teacher model is first trained and then distilled to a student model. Recently, abundant knowledge distillation paradigms are proposed to achieve better performance, such as deep mutual learning + +Table 4. Ablation study on different frequency bands. Each experiment is averaged over 8 trials. Lower FID is better. + +
FrequencyFID↓
LowHighHorse→ZebraZebra→Horse
××85.04±6.88152.67±5.07
✓×96.11±14.39163.06±3.91
×✓77.04±3.52146.01±1.86
✓✓81.81±4.52148.09±2.18
+ +Table 5. Comparison on knowledge distillation paradigms. Wavelet knowledge distillation is utilized in all these experiments. Each experiment is averaged over 8 trials. Lower FID is better. + +
DatasetKD SchemeMetric
FID↓Δ
Horse→ZebraOrigin Student85.04±6.88-
TSKD77.04±3.528.00
TAKD178.53±2.986.51
TAKD278.69±3.266.35
SD83.51±2.001.53
DML181.06±3.563.98
DML284.72±5.170.32
Zebra→HorseOrigin Student152.67±5.07-
TSKD146.01±1.866.66
TAKD1148.03±1.404.56
TAKD2147.75±1.754.92
SD151.74±3.460.93
DML1150.37±2.182.30
DML2152.03±1.930.64
+ +TAKD1: The FIDs of teacher assistants on Horse $\rightarrow$ Zebra and Zebra $\rightarrow$ Horse are 55.00 and 140.49, respectively. +TAKD²: The FIDs of teacher assistants on Horse → Zebra and Zebra → Horse are 51.34 and 133.29, respectively. +$\mathrm{DML}^1$ and $\mathrm{DML}^2$ : There are 2 and 3 peers, respectively. + +(DML) [57], self-distillation (SD) [55] and teacher-assistant knowledge distillation (TAKD) [34]. Many of these methods lead to higher effectiveness than the traditional (TSKD) paradigm. Unfortunately, these KD paradigms are usually only evaluated on classification tasks and their performance in more challenging tasks has not been well-studied. In this subsection, we have given a comparison of the following KD paradigms on Image-to-Image translation with GANs. + +- TSKD is the most common KD diagram which trains a large teacher first and then distills it to a small student. +- TAKD is proposed to bridge the gap between students and teachers with a teacher-assistant. It first distills knowledge from teachers to teacher-assistants and then distills knowledge from teacher assistants to the students [34]. +- $SD$ is a special case in TSKD when the student and the teacher have the identical architecture. Experimental and theoretical results have proven its success [35]. +- DML (a.k.a. online knowledge distillation, collaborative learning) trains several students (a.k.a. peers) to learn from each other [57]. + +Observation Experimental results of different knowledge distillation paradigms have been shown in Table 5. It is observed that: (a) All the knowledge distillation schemes lead to performance gain compared with the baseline. Besides, the most common TSKD achieves better performance than the other KD schemes. (b) The performance improvements in DML and SD are much lower than that in TSKD and TAKD, which indicates a pre-trained and high-quality teacher is very crucial on image-to-image translation. (c) There is no significant performance difference between TSKD and TAKD, which means that the teacher assistants can not facilitate the training of a tiny student in knowledge distillation on image-to-image translation. + +Analysis These observations show that there is a huge difference between knowledge distillation on image classification and image-to-image translation. We believe this difference is caused by the following reasons: (a) Compared with image classification, image-to-image translation is more challenging and thus a high performance teacher is more necessary to provide better guidance. (b) Besides, on classification, one of the benefits of the novel knowledge distillation schemes comes from their effectiveness as label smoothing [51]. However, label smoothing is effective in classification but can not be utilized in image-to-image translation, which is a pixel-level regression problem. + +# 6. Conclusion + +This paper has proposed to analyze and distill GANs on image-to-image translation tasks from a frequency perspective. To the best of our knowledge, we first quantitatively show the difference of GANs performance on different frequency bands and propose to highlight its learning on the high frequency bands during knowledge distillation. Abundant experiments on both paired and unpaired image-to-image translation have demonstrated its significant performance in terms of both quantitative and qualitative results. For instance, $7.08 \times$ compression and $6.80 \times$ acceleration can be achieved on CycleGAN with almost no performance drop. Experimental results in the ablation study have further shown the merits of distilling the high frequency bands. Besides, studies on the relation between discriminators and generators in model compression have been introduced, showing that a small discriminator is beneficial during the compression of the generator by maintaining their balance in adversarial learning. Moreover, we have also analyzed the influence of different knowledge distillation paradigms on GANs for image-to-image translation. Surprisingly, different from the results in classification, most of novel KD paradigms do not work well on GANs. We expect this observation may encourage studies of knowledge distillation in tasks beyond classification. Our limitations and future work are discussed in supplementary materials. + +# References + +[1] 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. 4, 6 +[2] Jie An, Siyu Huang, Yibing Song, Dejing Dou, Wei Liu, and Jiebo Luo. Artflow: Unbiased image style transfer via reversible neural flows. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 862-871. Computer Vision Foundation / IEEE, 2021. 2 +[3] Mohammad Farhadi Bajestani and Yezhou Yang. Tkd: Temporal knowledge distillation for active perception. In The IEEE Winter Conference on Applications of Computer Vision, pages 953-962, 2020. 3 +[4] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018. 1 +[5] Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 535-541. ACM, 2006. 1, 3 +[6] Hanting Chen, Yunhe Wang, Han Shu, Changyuan Wen, Chunjing Xu, Boxin Shi, Chao Xu, and Chang Xu. Distilling portable generative adversarial networks for image translation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 3585-3592, 2020. 3 +[7] Haibo Chen, Lei Zhao, Zhizhong Wang, Huiming Zhang, Zhiwen Zuo, Ailin Li, Wei Xing, and Dongming Lu. Dualist: Dual style-learning networks for artistic style transfer. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 872-881. Computer Vision Foundation / IEEE, 2021. 2 +[8] Tianshui Chen, Liang Lin, Wangmeng Zuo, Xiaonan Luo, and Lei Zhang. Learning a wavelet-like auto-encoder to accelerate deep neural networks. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 3 +[9] Xinyuan Chen, Chang Xu, Xiaokang Yang, and Dacheng Tao. Attention-gan for object transfiguration in wild images. In Proceedings of the European Conference on Computer Vision (ECCV), pages 164-180, 2018. 3 +[10] Jiaxin Cheng, Ayush Jaiswal, Yue Wu, Pradeep Natarajan, and Prem Natarajan. Style-aware normalized loss for improving arbitrary style transfer. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 134-143. Computer Vision Foundation / IEEE, 2021. 2 +[11] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 6 +[12] Shin Fujieda, Kohei Takayama, and Toshiya Hachisuka. Wavelet convolutional neural networks for texture classification. arXiv preprint arXiv:1707.07394, 2017. 3 + +[13] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014. 1, 2 +[14] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. In NeurIPS, 2014. 1, 2, 3, 4, 6 +[15] Huaibo Huang, Ran He, Zhenan Sun, and Tieniu Tan. Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 1689-1697, 2017. 3 +[16] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Pix2pix datasets, http://efrosgans.eecs.berkeley.edu/pix2pix/datasets/.6 +[17] 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. 1, 2, 6 +[18] Somi Jeong, Youngjung Kim, Eungbean Lee, and Kwanghoon Sohn. Memory-guided unsupervised image-to-image translation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 6558-6567. Computer Vision Foundation / IEEE, 2021. 1 +[19] Qing Jin, Jian Ren, Oliver J Woodford, Jiazhuo Wang, Geng Yuan, Yanzhi Wang, and Sergey Tulyakov. Teachers do more than teach: Compressing image-to-image models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13600-13611, 2021. 3, 4, 6 +[20] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4401-4410, 2019. 1 +[21] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8110-8119, 2020. 1 +[22] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4681-4690, 2017. 1 +[23] Muyang Li, Ji Lin, Yaoyao Ding, Zhijian Liu, Jun-Yan Zhu, and Song Han. Gan compression: Efficient architectures for interactive conditional gans. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5284-5294, 2020. 1, 3, 4, 6 +[24] Shaojie Li, Jie Wu, Xuefeng Xiao, Fei Chao, Xudong Mao, and Rongrong Ji. Revisiting discriminator in GAN compression: A generator-discriminator cooperative compression scheme. CoRR, abs/2110.14439, 2021. 3 +[25] Xinyang Li, Shengchuan Zhang, Jie Hu, Liujuan Cao, Xiaopeng Hong, Xudong Mao, Feiyue Huang, Yongjian Wu, + +and Rongrong Ji. Image-to-image translation via hierarchical style disentanglement. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 8639-8648. Computer Vision Foundation / IEEE, 2021. 1 +[26] Zeqi Li, Ruowei Jiang, and Parham Aarabi. Semantic relation preserving knowledge distillation for image-to-image translation. In European Conference on Computer Vision, pages 648-663. Springer, 2020. 1, 3, 4, 6 +[27] Ye Lin, Yanyang Li, Ziyang Wang, Bei Li, Quan Du, Tong Xiao, and Jingbo Zhu. Weight distillation: Transferring the knowledge in neural network parameters. arXiv preprint arXiv:2009.09152, 2020.3 +[28] Miao Liu, Xin Chen, Yun Zhang, Yin Li, and James M Rehg. Attention distillation for learning video representations. In BMVC, 2020. 1 +[29] Pengju Liu, Hongzhi Zhang, Kai Zhang, Liang Lin, and Wangmeng Zuo. Multi-level wavelet-cnn for image restoration. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 773-782, 2018. 3 +[30] Xiao-Chang Liu, Yong-Liang Yang, and Peter Hall. Learning to warp for style transfer. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 3702-3711. Computer Vision Foundation / IEEE, 2021. 2 +[31] Yifan Liu, Ke Chen, Chris Liu, Zengchang Qin, Zhenbo Luo, and Jingdong Wang. Structured knowledge distillation for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2604-2613, 2019. 1, 3 +[32] Yuchen Liu, Zhixin Shu, Yijun Li, Zhe Lin, Federico Peruzzi, and Sun-Yuan Kung. Content-aware gan compression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12156-12166, 2021. 3 +[33] Stéphane Mallat. A wavelet tour of signal processing. Elsevier, 1999. 3 +[34] 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 arXiv:1902.03393, 2019. 8 +[35] Hossein Mobahi, Mehrdad Farajtabar, and Peter L Bartlett. Self-distillation amplifies regularization in hilbert space. arXiv preprint arXiv:2002.05715, 2020. 8 +[36] Ori Nizan and Ayellet Tal. Breaking the cycle-colleagues are all you need. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7860-7869, 2020. 3 +[37] Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In IEEE Symposium on Security and Privacy, pages 582-597, 2016. 3 +[38] Taesung Park, Alexei A Efros, Richard Zhang, and Jun-Yan Zhu. Contrastive learning for unpaired image-to-image translation. In European Conference on Computer Vision, pages 319-345. Springer, 2020. 3 + +[39] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Gaugan: semantic image synthesis with spatially adaptive normalization. In ACM SIGGRAPH 2019 Real-Time Live!, pages 1-1. 2019. 3 +[40] Wonpyo Park, Dongju Kim, Yan Lu, and Minsu Cho. Relational knowledge distillation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3967-3976, 2019. 3 +[41] Elad Richardson, Yuval Alaluf, Or Patashnik, Yotam Nitzan, Yaniv Azar, Stav Shapiro, and Daniel Cohen-Or. Encoding in style: A stylegan encoder for image-to-image translation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 2287-2296. Computer Vision Foundation / IEEE, 2021. 1 +[42] Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.3 +[43] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. Sin-gan: Learning a generative model from a single natural image. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4570-4580, 2019. 1 +[44] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive representation distillation. arXiv preprint arXiv:1910.10699, 2019. 1 +[45] Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1365-1374, 2019. 3 +[46] Carl Vondrick, Hamed Piriavash, and Antonio Torralba. Generating videos with scene dynamics. Advances in neural information processing systems, 29:613-621, 2016. 2 +[47] Pei Wang, Yijun Li, and Nuno Vasconcelos. Rethinking and improving the robustness of image style transfer. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 124-133. Computer Vision Foundation / IEEE, 2021. 2 +[48] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. High-resolution image synthesis and semantic manipulation with conditional gans. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8798-8807, 2018. 2, 6 +[49] Travis Williams and Robert Li. Wavelet pooling for convolutional neural networks. In International Conference on Learning Representations, 2018. 3 +[50] Canwen Xu, Wangchunshu Zhou, Tao Ge, Furu Wei, and Ming Zhou. Bert-of-theseus: Compressing bert by progressive module replacing. arXiv preprint arXiv:2002.02925, 2020.3 +[51] L. Yuan, F. E. Tay, G. Li, T. Wang, and J. Feng. Revisiting knowledge distillation via label smoothing regularization. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 8 +[52] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In ICLR, 2017. 3, 4, 6 + +[53] Linfeng Zhang and Ma Kaisheng. Improve object detection with feature-based knowledge distillation: Towards accurate and efficient detectors. In ICLR, 2021. 1, 3 +[54] Linfeng Zhang, Yukang Shi, Zuoqiang Shi, Kaisheng Ma, and Chenglong Bao. Task-oriented feature distillation. In NeurIPS, 2020. 3 +[55] Linfeng Zhang, Jiebo Song, Anni Gao, Jingwei Chen, Chenglong Bao, and Kaisheng Ma. By your own teacher: Improve the performance of convolutional neural networks via self distillation. In arXiv preprint:1905.08094, 2019. 8 +[56] Linfeng Zhang, Zhanhong Tan, Jiebo Song, Jingwei Chen, Chenglong Bao, and Kaisheng Ma. Scan: A scalable neural networks framework towards compact and efficient models. ArXiv, abs/1906.03951, 2019. 3 +[57] Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In CVPR, pages 4320-4328, 2018. 8 +[58] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Pix2pix datasets, http://efrosgans.eecs.berkeley.edu/cyclegan/datasets.6 +[59] 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. 1, 2, 6 \ No newline at end of file diff --git a/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/images.zip b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..16a1d06bf3cb20e8408226810f683c6b33db0738 --- /dev/null +++ b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f38a9c0601abc87d927b14893a3a813852798b64cf3dfeb8edd171f954b11354 +size 773063 diff --git a/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/layout.json b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..040dad649f1e9db4bcce7c463c9cc4436e4f82ab --- /dev/null +++ b/waveletknowledgedistillationtowardsefficientimagetoimagetranslation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2fa69c8b73f673c45fe02997790f1ab4590bcb3d4cd4f780ab0b02297a2202e +size 507655 diff --git a/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_content_list.json b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..44a76b9f685ac117b38f1b3acf34f47802fa443f --- /dev/null +++ b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03c83171ca7b37739c4096ef54efcc6bd69dcafe83c1a2a2042ac4ecb7bf600d +size 79510 diff --git a/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_model.json b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2e053d48f590392c97333370e0fe6a2a7f229e69 --- /dev/null +++ b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0756ab464e6b7df3490461092c96009467ed3ad786d4d49c3c97dbc6e6ed36c2 +size 97141 diff --git a/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_origin.pdf b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f4fa4346b8a4faa3f8dee91a9731e425f0fa0099 --- /dev/null +++ b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/15fba4db-1aae-41de-a3ac-d28b59949606_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ef2532e083beb2afea21a3de228bb73c8def6dc3502f9b6b2374106438f0b09 +size 2030582 diff --git a/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/full.md b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/full.md new file mode 100644 index 0000000000000000000000000000000000000000..409e60bf832a63bae18ef241dc3a5c469c332db4 --- /dev/null +++ b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/full.md @@ -0,0 +1,351 @@ +# Weakly But Deeply Supervised Occlusion-Reasoned Parametric Road Layouts + +Buyu Liu $^{1}$ Bingbing Zhuang $^{1}$ Manmohan Chandraker $^{1,2}$ $^{1}$ NEC Laboratories America $^{2}$ UC San Diego + +# Abstract + +We propose an end-to-end network that takes a single perspective RGB image of a complex road scene as input, to produce occlusion-reasoned layouts in perspective space as well as a parametric bird's-eye-view (BEV) space. In contrast to prior works that require dense supervision such as semantic labels in perspective view, our method only requires human annotations for parametric attributes that are cheaper and less ambiguous to obtain. To solve this challenging task, our design is comprised of modules that incorporate inductive biases to learn occlusion-reasoning, geometric transformation and semantic abstraction, where each module may be supervised by appropriately transforming the parametric annotations. We demonstrate how our design choices and proposed deep supervision help achieve meaningful representations and accurate predictions. We validate our approach on two public datasets, KITTI and NuScenes, to achieve state-of-the-art results with considerably less human supervision. + +# 1. Introduction + +Understanding road layout from images is essential for real-world applications such as autonomous driving or path planning [5,8,13,31], where, besides the usual perspective space outputs, top-view representations of geometry and semantics have been popular. Non-parametric representations such as pixel-level semantics [31] generally require labor-intensive and potentially ambiguous supervision in the top-view, for example, when dealing with occluded regions. On the other hand, parametric representations for top-view layouts are desirable for their interpretability, which is beneficial for higher-level reasoning and decision-making in downstream applications. + +Parametric attributes such as presence of side roads or number of lanes may be easily annotated by humans given sensor inputs, and require less effort than pixel-level semantic annotations. However, besides parametric annotations1 in + +![](images/d97c7b74374f0d28590a47954ebb8c0e4436b4299c65fe0696e530c5a8370732.jpg) +Figure 1. We propose an end-to-end model that inputs perspective image and outputs parametric layouts in top-view. Compared to existing methods, ours requires only the parametric layout annotations during training and achieves SOTA performance under complex road scenarios. Moreover, it generates occlusion-reasoned (see the predicted semantics on regions occluded by cars) pixel-level semantics in both perspective and top view. + +the bird's-eye-view (BEV), i.e. top-view, previous works that estimate parametric BEV layouts also require pixel-level supervision in perspective images [23, 46] or handle only very simple road layouts [35]. This paper seeks to obtain parametric BEV maps as well as pixel-level semantics in both the perspective and top views, but using only the cheaper parametric supervision on attributes. + +While relying on cheap supervision only is undoubtedly a goal worth pursuing, removing the dense perspective supervision makes the problem harder. This is non-trivial, since there exists a large gap between sparse parametric supervision and dense pixel-level semantic supervision. To bridge the gap, one must reason about the underlying geometry to map the parametric supervision to top-view and get the correct semantics, even in occluded regions. + +We address this challenge through two key insights. First, rather than directly regressing the parametric BEV layout from RGB image space, we introduce two intermediate steps - a perspective semantics (PS) module and a top-view se + +mantics (TS) module – to predict intermediate occlusion-reasoned per-pixel perspective and BEV layouts (Fig. 1). Second, to obtain supervision for PS/TS, a simple renderer can convert the parametric annotations to occlusion-reasoned per-pixel semantic annotations in both the BEV and perspective view, with the help of geometric transformation. This allows meaningful deep supervision [18, 19] of intermediate modules without additional annotation costs, thus weakly supervised. The weakly but deeply supervised PS and TS modules together lead to accurate parametric BEV layout by introducing inductive biases on the type of reasoning the network should perform, thereby facilitating complex tasks such as occlusion reasoning, geometric transformation and semantic abstraction that correspond to the parametric supervision. + +The above insights make our method simple yet highly effective, even outperforming previous methods that rely on perspective-view dense supervision for semantic segmentation. We validate our choices through state-of-the-art (SOTA) accuracies on both KITTI [9] and NuScenes [28] datasets, achieving $47.3\%$ and $13.0\%$ F1 score. In extensive ablation experiments, we establish the value of the inductive biases introduced by the PS and TS modules, as well as the deep supervision through transformed parametric annotations. + +To summarize, our key contributions are: + +- An end-to-end model for occlusion-reasoned perspective and top-view parametric layout in complex scenes. +- Intermediate module design that incorporates inductive biases to learn occlusion-reasoning, geometric transformation and semantic abstraction. +- Deep supervision with cheap parametric annotations in top view only, rather than requiring additional expensive per-pixel labeling in either perspective or top view. +- State-of-the-art results on publicly available datasets. + +# 2. Related Work + +3D scene understanding on outdoor scenes is an important yet challenging task. Applications such as robot navigation [13], autonomous driving [8, 17], augmented reality [1] or real estate [24, 39] always require comprehensive understanding on given scenes. + +Road Scene Understanding Scene understanding for outdoor scenarios is very challenging mainly due to the lack of strong priors. To this end, non-parametric approaches have been proposed [12, 40, 41], where layered representations [4, 48] are utilized to reason about the geometry as well as semantics in occluded areas. Other typical non-parametric representations in perspective view are joint pixel-level semantics and depth [21], pixel-level semantics and geometric + +labels [11]. In contrast, parametric approaches provide abstract understanding, such as road scene attributes [8, 35] and graph-based representation [17]. Perhaps [23,46] are the most recent works that are able to handle complex road layout, e.g. multiple lanes and different types of intersections. Our work follows the parametric representation proposed in these methods. Unlike [23,46] that request additional information, e.g. models [15] pre-trained with dataset-specific per-pixel semantics, depth and 3D objects [9], to map semantics to top-view as pre-processing, our model is end-to-end trainable that directly takes RGB as input. More importantly, we exploit deep supervision [18, 19] by introducing meaningful intermediate modules (PS and TS), with which we are able to obtain occlusion-reasoned pixel-level semantics in both perspective and top-view without per-pixel human annotations. It is also beneficial in terms of improving final parametric layout predictions. Though focusing on single image for now, our model can be easily extend to video-version by introducing spatio-temporal graphical model [22, 46], LSTM [6, 38] or FTM [42, 49, 50] + +Scene Understanding in Top-view Top-view representations [25, 27, 29, 37] can be more beneficial when occlusion relationships are desired, e.g., two objects cannot occupy the same position in top-view while they can potentially occlude each other in perspective view. Such intuition is widely exploited in 3D object localization literature [44] where camera to top-view projection is fulfilled with the help of depth estimation and 2D detection in perspective view. Although [32] proposes an end-to-end trainable model that explicitly exploits the perspective to top-view projection to perform 3D localization task, the performance of this method is not comparable to [44] due to the lack of explicit depth-aware re-projection. As for general scene understanding, the initial steps are taken in [34, 36]. However, due to the lack of ground truth, no quantitative evaluation is performed in [34]. More recent work [30, 31] extends [32] and predicts top-view semantic map from single monocular image or multiple streams of images. A graph like parametric representation is introduced in [2] for road layout estimation as well as oriented bounding boxes for road participants. However, such representation misses important semantics such as crosswalk, sidewalk and lane directions. And it further requires HD-map, GPS and human annotations to train such a model. In contrast to non-parametric approaches [26, 29-31, 47] that require expensive per-pixel supervision in top or perspective view and focus on predicting semantics on visible regions, our method aims to predict parametric layouts in BEV and also provides occlusion-aware non-parametric representations in both BEV and perspective view as by-products. All these meaningful representations are obtained without per-pixel human annotations but relying on cheap parametric annotations. + +![](images/fdb347d57e23d20bebeea941d952d46abef0440f44dae687877b0da96c5829a4.jpg) +Figure 2. Overview of our proposed framework: Taking a single RGB as input, our model predicts (1) occlusion-reasoned semantics in perspective view, (2) hallucinated semantics in top-view and (3) parametric layout predictions in top-view, with only attribute-level annotations in top-view. This is achieved with multiple intermediate modules and deeply supervised training. + +# 3. Our Framework + +Our model consists of three modules. (1) The perspective semantics (PS) module inputs the RGB image and outputs the occlusion-reasoned pixel-level semantics in perspective view (OSP). (2) The top-view semantics (TS) module projects OSP into top-view and learns to hallucinate or complete pixel-level top-view semantics on out-of-view as well as noisy regions, which we refer to as hallucinated semantics in top-view (HST). (3) The top-view parametric prediction (TPP) module takes the HST and predicts road layout related attributes in top-view. Fig. 2 gives an overview of the proposed method. Network architectures are borrowed from [33,43,46] and described in Sec. 4 and supplementary. We focus in this section on describing our main contributions that allow effectively exploiting weak supervision with cheap parametric-level human annotations. We detail each module in Sec. 3.1, the training process and the generation of intermediate pixel-level semantic annotations in Sec. 3.2. + +# 3.1. Full Model + +Consider a dataset $\mathcal{D} = \{I, \Theta\}_{i=1}^{N}$ of $N$ samples, where $I \in \mathbb{R}^{H \times W \times 3}$ are RGB perspective images and $\Theta$ denote the corresponding scene attributes obtained from human annotations. We further generate $x^p, x$ automatically for each sample where $x^p \in \mathbb{R}^{H \times W \times (C+1)}$ denotes semantic segmentation map in perspective view and $x \in \mathbb{R}^{h \times w \times (C+1)}$ denotes top-view semantics. $C = 4$ denotes the number of layout categories ("road", "sidewalk", "lane boundaries", "crosswalks") and we also include one foreground class. We refer the readers to Sec. 3.2 for more details about the data generation process. Our full model is defined as: + +$$ +\Theta = f ^ {\text {f u l l}} (I) = \left(f ^ {t p p} \circ f ^ {\mathrm {t s}} \circ f ^ {\mathrm {p s}}\right) (I), \tag {1} +$$ + +where $\circ$ defines a function composition. $f^{\mathrm{ps}}$ , $f^{\mathrm{ts}}$ and $f^{tpp}$ correspond to our three modules PS, TS, and TPP. + +Perspective semantics module The PS module predicts per-pixel occlusion-reasoned semantics in the perspective view (OSP). Unlike traditional semantic segmentation models (e.g. [3,43]) that predict semantics on visible pixels only, our module focuses on predicting both visible and occluded layout classes (See Fig. 3(d)). Such occlusion reasoning is also demonstrated in Fig. 3(b) and (c). As shown, we aim to predict road semantics in the top-view despite that they are occluded, e.g. by cars or buildings, in the perspective view. + +Compared to conventional semantic segmentation problem, ours is more challenging in terms of both data and model training. As for data, the semantic ground-truth on occluded regions can be ambiguous, hence difficult and time-consuming to annotate accurately in pixel-level. For instance, it takes more than 20 minutes to annotate only the visible regions on KITTI images while in comparison, parametric annotation in BEV takes about 20s for an image [45]. We refer the readers to Sec. 4 and supplementary for annotation details. For model training, the PS module predicts semantics in invisible/occluded regions, which again requires dealing with ambiguity. For instance, regions occluded by a foreground instance, e.g. building, can be either another building or road. This requires the module to learn to predict semantics with contextual cues rather than fully relying on local visible information. + +Formally, given an image $I$ , the PS module outputs $x^p$ encoding the probability of each pixel belonging to a specific category: + +$$ +x ^ {p} = f ^ {\mathrm {p s}} (I). \tag {2} +$$ + +Top-view semantics module Our second module, i.e. the top-view semantics module, takes as input the OSP and + +![](images/dfad7d46c8750cec71b953a1b89d2672faf2691d1361e1b3edf39fb22c5b33ad.jpg) + +![](images/b36a060edcc75be1716c87ff2af33098bd8689883619495e7874e49f230055bd.jpg) +Figure 4. Two sets of examples for input and output of hallucination module. Our module aims to recover the far away sparse semantics (right) and hallucinate close-by areas with limited view (left). + +![](images/908bc287fe3a834545a2bf02b31f29bc0b0084d1d63fbcd270ede5e40749e21d.jpg) +Figure 3. We overlay output and input of PS module in (a). Examples of inputs (left) and target outputs (right) of PS module are provided in (b) and (c). PS module aims to predict both visible and occluded background classes. (d) demonstrates the input image, semantics of visible regions and our target output from left to right. And we highlight the occluded regions in red. + +![](images/0df55f72b315afd1159566b23dac994b58f99b907bfb2d1f0fa8be5f066d2d86.jpg) + +learns to explicitly project the semantics in perspective view to top-view. Given camera intrinsics, the projection could be done if the depth estimation is available, say, via a depth network. However, standard single image depth networks (e.g. [7, 10, 21]) typically do not reason about depth in occluded regions, which is nevertheless required for our occlusion-aware projection. In addition, resolution is low for distant regions and thus may lead to sparser/noisier semantics in top-view. Lastly, top-view semantics on close-by regions can be incomplete due to limited field of view. Instead, we propose a two-step projection through an initial geometric transformation $f^{\mathrm{trans}}$ and a learned hallucination module $f^{\mathrm{halln}}$ : + +$$ +x = f ^ {\mathrm {t s}} \left(x ^ {p}\right) = \left(f ^ {\text {h a l l n}} \circ f ^ {\text {t r a n s}}\right) \left(x ^ {p}\right). \tag {3} +$$ + +Transformation module. In view of these issues, we first make use of the prior that the road forms nearly a plane, which facilitates an initial projection without requiring depth estimation. We assume known camera intrinsics and extrinsic w.r.t. the ground plane; this is a mild assumption since they could be obtained via calibration [14] in advance. As such, it is well-known that one can back-project each pixel in the perspective view to the BEV view and vice versa [14]. Hallucination module. After the transformation module that maps the OSP to top-view, the hallucination module then learns to predict the unseen far away regions as well as recover the noisy semantics with contextual information in top-view. Note that our input and output of hallucination module are both of the size $h \times w \times (C + 1)$ . Fig. 4 visualizes two sets of inputs and outputs of this module. Compared to inputs generated with ground-truth OSP, the target HST improves at far away (right) regions as well as close-by areas where predictions are sparse (left). + +![](images/b3112868eff59dc57e91f2b597eff978d4fa5a3b68a7b721828a5910995346da.jpg) + +![](images/618b7b7d37e0f33fd9bd8ba5ca2d49f22149afa349e5403b8dee1243f2c4030c.jpg) + +Top-view parametric prediction module Given the hallucinated semantics in top-view (HST), our next step is to predict the layout attributes through the top-view parametric prediction (TPP) module that maps the HST $x$ into the scene model parameters $\Theta$ . As aforementioned, we follow the attribute definitions in [23,46]. Our $\Theta$ consists of three groups: $\Theta_{\mathrm{b}}$ for 14 binary, $\Theta_{\mathrm{m}}$ for 2 multi-class and $\Theta_{\mathrm{c}}$ for 10 continuous attributes of the scene model, respectively. Binary attributes consist of information such as whether the road is one-way or not. Number of lanes on the left hand-side of the ego car is an example of multi-class attributes and distance to right side-road can be one of the continuous attributes. More details can be found in supplementary materials. Our TPP module is defined as: + +$$ +\Theta = f ^ {t p p} (x) = (f \circ g) (x), \tag {4} +$$ + +where $f$ and $g$ are respectively multi-layer perceptron (MLP) and convolutional neural networks. Note that similar to [46], this module is also able to exploit rich simulated data during training, but we leave this extension to future work. + +# 3.2. Model Training + +Following our above description of intermediate modules assuming supervision available, we describe in this section the generation of such supervision with only annotations for parametric layout $\Theta$ , as well as deep supervision training. Instead of training the full model in an end-to-end manner from scratch, we adopt a multi-stage training protocol. We first pretrain all three modules, and then jointly train the full model in an end-to-end manner. Empirically, end-to-end training provides a $1\%$ performance improvement in our experiments. Our full loss function $\mathcal{L}$ is defined as: + +$$ +\mathcal {L} = \lambda \mathcal {L} ^ {\mathrm {t p p}} + \gamma \mathcal {L} ^ {\mathrm {t s}} + \beta \mathcal {L} ^ {\mathrm {p s}}, \tag {5} +$$ + +where $\lambda, \gamma$ and $\beta$ are the weights for each module. + +![](images/b717fbd2dc3633dca24d7683711c4c0b04e0e824160a7aaef171f9c789e2d13d.jpg) + +![](images/71eef7f39044ad856427c34dac3ae6de30cb99b2b21b808c6b89fb9b6ecbc855.jpg) + +![](images/8f52de90e5ebeb3420e117a6610c0a4d0796cda160b524651d075da8ebea4d05.jpg) +Figure 5. Examples of rendered ground-truth for TS module. From left to right: RGB, parametric human annotations and rendered pixel-level semantics in top-view. + +![](images/b85d0470590b94fe9bd01ac45f87518f166176d0982cdf73523c7d5fd6f89e35.jpg) + +![](images/b50b762d89aa08cd3bf482fbc98be4a14b870a473188c46c91578956ac340fc9.jpg) + +Top-view parametric prediction module Since $\Theta$ and $I$ are already available, we define the loss function of TPP as: + +$$ +\mathcal {L} ^ {\mathrm {t p p}} = \sum_ {i = 1} ^ {N} \mathrm {B C E} \left(\Theta_ {\mathrm {b}, i}, \eta_ {\mathrm {b}, i}\right) + \mathrm {C E} \left(\Theta_ {\mathrm {m}, i}, \eta_ {\mathrm {m}, i}\right) + \ell_ {1} \left(\Theta_ {\mathrm {c}, i}, \eta_ {\mathrm {c}, i}\right), \tag {6} +$$ + +where (B)CE is the (binary) cross-entropy loss and $\ell_1$ denotes L1 loss. $\{\Theta, \eta\}_{*,i}$ denotes the $i$ -th sample in the data set. For regression, we discretize continuous variables into 100 bins by convolving a dirac delta function centered at $\Theta_c$ with a Gaussian of fixed variance. + +Top-view semantics module Unlike the straightforward design in parametric space, our TS module requires per-pixel supervision in top-view. To this end, we propose to exploit a rendering function that generates pixel-wise semantics from parametric annotations. Specifically, for each $\Theta$ , we render a map $x$ . Some examples of our paired $\{x, \Theta\}$ are in Fig. 5, which shows that our rendered $x^p$ accurately reflects the layout of the road in top-view. Since we only need on parametric abstractions, our renderer can be implemented using simple Python code, rather than the complex machinery of physics-based image renderers. We refer the readers to supplementary materials for more details on our renderer and the generation process. The loss function for TS module is defined as: + +$$ +\mathcal {L} ^ {\mathrm {t s}} = \sum_ {i = 1} ^ {N} \mathrm {C E} \left(x _ {i}, \hat {x} _ {i}\right) \tag {7} +$$ + +where $\hat{x}_i$ and $x_i$ denotes the predictions and the rendered ground-truth of the top-view semantics of $i$ -th sample in $\mathcal{D}$ . + +Perspective semantics module Obtaining the top-view semantics $x$ , we can project [14] it to perspective view with camera parameters as well as plane assumption. We demonstrate the effectiveness of our projection in Fig. 3(a). Similarly, the loss function for the PS module is defined as: + +$$ +\mathcal {L} ^ {\mathrm {p s}} = \sum_ {i = 1} ^ {N} \mathrm {C E} \left(x _ {i} ^ {p}, \hat {x} _ {i} ^ {p}\right) \tag {8} +$$ + +where $\hat{x}_i^p$ and $x_{i}^{p}$ denotes our predictions and the backprojected ground-truth of the perspective semantics of sample $i$ in $\mathcal{D}$ . + +# 4. Experiments + +Datasets and model details We validate our ideas on KITTI [9] and NuScenes [28], utilizing the annotation and data split in [23]. Please refer to [23] and our supplementary for details in road layout attributes annotation. $h$ and $w$ are set to 256 and 128, presenting a $60\mathrm{m} \times 30\mathrm{m}$ space in real world. Camera parameters are available in the original datasets through calibration. Weights $(\lambda, \gamma, \beta)$ are set experimentally on validation set. As for $f^{ps}$ , we use HRNetV2-W18 [43] as the backbone as it achieves very good trade-offs between accuracy and efficiency. As for $f^{halln}$ , we utilize a shallower version of [33], e.g. 5-layer encoder and decoder. Finally, $f$ is implemented as a multi-task network with three separate predictions $\eta_{\mathrm{b}}$ , $\eta_{\mathrm{m}}$ and $\eta_{\mathrm{c}}$ for each of the parameter groups $\Theta_{\mathrm{b}}$ , $\Theta_{\mathrm{m}}$ and $\Theta_{\mathrm{c}}$ of the scene model. And $g$ is introduced for feature extraction. Note that our method does not depend on the specific details of these sub-modules but is generally applicable if this three-stage architecture holds. + +Cost for parametric annotations We summarize the annotation time for each type of supervision in Tab. 2. Unlike non-parametric annotations such as pixel-level semantics that require several dozens of minutes per frame, our parametric annotations require less than a minute per frame. Moreover, this time is heavily amortized across a video sequence to just around 20 seconds on the KITTI dataset, since parametric attributes change predictably across consecutive frames. Binary and multiclass attributes (such as presence of side-road, or number of lanes) change less frequently and their annotations can often be inherited from previous frames. Further, continuous attributes (such as distance to intersection) typically change smoothly across frames, which facilitates annotation. We refer the readers to supplementary materials for more details. + +Evaluation metrics Since our output space $\Theta$ consists of three types of predictions and involves both discrete and continuous variables, we follow the metrics in [23, 46]. Specifically, as for binary variables $\Theta_{\mathrm{b}}$ and multi-class variables $\Theta_{\mathrm{m}}$ , the prediction accuracy is defined as Accu.-Bi = $\frac{1}{14}\sum_{k=1}^{14}[p_k = \Theta_{\mathrm{b}k}]$ and Accu.-Mc = $\frac{1}{2}\sum_{k=1}^{2}[p_k = \Theta_{\mathrm{mk}}]$ . We further report the F1 score on $\Theta_{\mathrm{b}}$ to have a better idea about the overall performance given the observation that the binary classes are extremely biased. Formally, F1 = $\frac{1}{14}\sum_{k=1}^{14}2 \times \frac{p_k \times r_k}{p_k + r_k}$ , where $p_k$ and $r_k$ are the precision and recall rate on $\Theta_{\mathrm{bk}}$ . For continuous variables, we report the mean square error (MSE). + +
Supervision RequiredKITTI [9]
MethodParametricDepthSemanticsSimulatedVideo+ObjectAccu.-Bi. ↑Accu.-Mc. ↑MSE ↓F1 ↑
RGB [15,35]✓.811.778.230.176
RGB [15,35]+D✓✓.818.819.154.109
BEV [34]✓✓✓.820.797.141.324
H-BEV+DA [46]✓✓✓✓.834.831.134.435
BEV-J-O [23]✓✓✓✓.831.837.142.494
Ours✓.833.832.140.473
+ +Table 1. Performances on single image based road layout prediction on KITTI. we observe that our method outperforms $RGB$ when having the same model setting. In addition, our results are comparable to other SOTA (H-BEV+DA and BEV-J-O) but with far less human annotations required. + +
TimeBinaryMulticlassContinuousTotal
Random images24.35.125.755.1
Video frames20.2
+ +Table 2. Average annotation time (sec.) on KITTI dataset. + +Apart from parametric predictions, our model also outputs intermediate representations, e.g. OSP and HST. We further report the IoU as well as the accuracy for these two semantic segmentation tasks. Please note that human annotated OSP and HST are not available on either dataset in practice. Thus, we report our performance by comparing our predictions with rendered semantics $x$ and $x^p$ instead. + +# 4.1. Evaluations of Parametric Road Layout + +Baselines We choose several appropriate baselines as presented in [23, 46]: + +- RGB (RGB): A ResNet-101 [16,35] backbone is introduces and trained on the manually-annotated ground truth. Note that this setup is the only one that directly comparable to ours as it requires only the parametric annotations as ground-truth. +- RGB+Depth ( $RGB + D$ ): Same as RGB but with the additional task of monocular pixel-wise depth prediction [16]. In contrast, we do not require dense depth information. +- BEV( $BEV$ ): $BEV$ uses the output of [34], which is a top-view semantic map. To obtain such map, additional pixel-level semantic annotation and depth supervision are required in perspective space. Though more recent approaches [26, 30] are also able to output semantics in top-view, they miss importance semantics such as lane boundary or crosswalk thus are not desired as $BEV$ baselines. + +We also report the performance of SOTA methods for single image top-view layout prediction, or H-BEV-DA [46] and BEV-J-O [23]. Please note that both of them require far more human annotations compared to our method. We refer the readers to supplementary for more details for all baselines. + +Quantitative results Tab. 1 summarizes our main results on KITTI [9]. First of all, if we compare only to method with the same setting, or $RGB$ , our method outperforms it with a large margin, which indicates the effectiveness of introducing PS and TS as intermediate modules. Furthermore, compared to $RGB + D$ method that introduces depth channel, or even the $BEV$ that further requires thousands of human labelled semantic segmentation images in perspective space, our method achieves better results, which is of significance given that our method requires far less human annotations. Note that both $H-BEV-DA$ and $BEV-J-O$ are based on $BEV$ but require even more human annotations. By comparing to $H-BEV-DA$ that further exploits additional simulated data and $BEV-J-O$ that requires the 3D object information as well as entire video sequence as input, we can see that our method achieves comparable results with far less human annotations. + +We further report results on NuScenes [28] in Tab. 3. Our method outperforms RGB significantly. It also outperforms [23, 46] with far less human annotations required. + +Qualitative results We demonstrate some qualitative results in Fig. 6. Note that in KITTI test sequences, rather than the road being occluded by cars driving in front, significant occlusions happen between parked cars and road/sidewalk, or between foreground classes, e.g. buildings or trees, and curved road or sideroad. As observed in this figure, our model is able to output satisfactory results on all three representations. We are able to handle complex road layout such as arbitrary number of lanes with heavy occlusions. Again, please note that OSP and HST are obtained without per-pixel human annotations. Our final layout prediction is also better than [23]. We further visualize our final results on NuScenes in Fig. 7. It shows that our model is able to handle various road layouts. We refer readers to supplementary material for more qualitative results. + +# 4.2. Ablation Study + +To demonstrate the effectiveness of intermediate modules as well as deep supervision, we further conduct experi + +![](images/86cc8d0d3ad93ce02f4b817e01bb83d53fa63f95b0ed241f04b300208a4bb626.jpg) +Input RGB + +![](images/36e57b1128c295197a60b71c1167f67d973abe3328957849c08fa9f615a96c99.jpg) +OSP + +![](images/83f3e53b6adaacdf1c001fd99e66ad48eb7ae3e1b69aae442543477608ea9488.jpg) +HST +Prediction BEV-J-O +GT +Figure 6. Full predictions of our proposed model. From left to right: input RGB, OSP, HST, image rendered from parametric predictions, results from [23] and image rendered from ground-truth attributes. + +
MethodAccu.-Bi.↑ Accu.-Mc.↑ MSE↓ F1
RGB [15,35].850.503.084.109
BEV [46].846.485.073.101
H-BEV+DA [46]+GM.877.496.032.125
BEV-J-O [23].858.543.027.128
Ours.875.560.023.130
+ +Table 3. Results on NuScenes dataset. We observe that our method beats RGB significantly when having the same model setting. Meanwhile, it also outperforms $H - BEV + DA$ and $BEV - J-O$ with far less human annotations required. + +
ModuleKITTI [9]
Method\(f^{ps}\)\(f^{trans}\)\(f^{halln}\)\(f^{tpp}\)Accu.-Bi. ↑Accu.-Mc. ↑MSE ↓F1 ↑
RGB✓.811.778.230.176
RGB+PS✓✓.822.827.159.425
RGB+PS+T✓✓✓.826.829.144.441
Ours✓✓✓✓.833.832.140.473
+ +Table 4. Ablation study on single image based road layout prediction on KITTI. Note that all these methods share the same amount of human annotations. We can see that our introduced PS and TS modules, on the one hand, provide meaningful intermediate representations at no additional costs. On the other hand, they also prove to be beneficial individually for the final parametric prediction task. + +iments on incrementally adding m without any module. $RGB + PS$ and directly predicts parametric pre outputs. Formally, $RGB + PS$ is fo + +![](images/fe43fcf7c5382d64131119f65e0a8b2285142a9332e8eb59cd191e3ce467c1ca.jpg) + +![](images/00b537cc0e350b33adc4a9dea9406f16b0b68462897afeaa923f284ae899e25c.jpg) + +![](images/dd890740e8218e429142617db341d2cfdded147ef1e001f7b98cf1cf5f4d7d9d.jpg) +Figure 7. Examples on NuScenes dataset. Left: input RGB Right: rendered BEV semantics from our prediction. + +![](images/c6751e4aa59079e7bd33b1767f34eca4f4a1d2d802bd6e899a29511a641d50e4.jpg) + +![](images/d7bcf1df0c16f13053cb1fc3723d1a6e8af4f2ec3aabb83ab328fd1d25afcf73.jpg) + +![](images/ae5ebdc2aa159d50a306ddcc79d8a22af265c863360182a3b0778715e68451c9.jpg) + +$$ +\Theta = f ^ {\mathrm {r b g p}} (I) = \left(f ^ {t p p} \circ f ^ {\mathrm {p s}}\right) (I), \tag {9} +$$ + +Similarly, $RGB + PS + T$ is formulated as: + +$$ +\Theta = f ^ {\mathrm {r b g p f}} (I) = \left(f ^ {t p p} \circ f ^ {\mathrm {t r a n s}} \circ f ^ {\mathrm {p s}}\right) (I), \tag {10} +$$ + +We report the quantitative results in Tab. 4. The results show that first of all, comparing the $RGB$ to $RGB + PS$ , perspective representation, or the OSP, is beneficial for improving final parametric predictions. Secondly, the performance gap between $RGB + PS + T$ and $RGB + PS$ demonstrates the effectiveness of introducing top-view semantics as intermediate representation. Finally, by comparing the full model with $RGB + PS + T$ , we can tell that the hallucination module is also critical for layout prediction task. + +Occlusion study Here, we study performance against increasing number of objects in the scene, indicating increasingly severe occlusions. Since [9, 45] do not provide pixel + +level semantic ground-truths on our test sequences, to analyze our ability to handle occlusions, we instead report the average image-level IoU on four classes against number of foreground objects with respect to rendered ground truth $x$ in Tab. 6, with objects detected by Stereo-RCNN [20]. As one can see, our method outperforms the state-of-the-art consistently, with increasing gap when having more objects. Please note that our model is single-image based so we handle all objects, no matter they are moving or not, in the same manner. + +# 4.3. Evaluations of Intermediate Representations + +Apart from requiring less annotation while maintaining comparable performance, another advantage of the proposed method is being able to provide meaningful pixel-level in- + +
RepresentationKITTI [9]
DataOSP HSTRoadLand BoundarySidewalkCrosswalkForegroundAverage
Accu.IoUAccu.IoUAccu.IoUAccu.IoUAccu.IoUAccu.IoU
RGB+PS✓.689.563.365.214.226.126.010.007.954.878.449.358
Ours✓.700.605.403.272.255.147.042.033.962.883.472.388
✓.605.461.272.197.167.102.038.032.868.651.390.289
+ +Table 5. Intermediate results on KITTI. We report both IoU and accuracy for each semantic category. Compared to $RGB + PS$ , our method achieves better performance in terms of $OSP$ with the help of end-to-end training. Our method further provides meaningful $HST$ results. + +
Obj.012345678Avg.
[46].67.78.67.64.61.45.48.37.35.45
Ours.78.81.72.69.67.48.50.40.35.50
Considering Road Class Only
[46].85.74.85.79.67.63.59.57.37.63
Ours.86.91.86.83.70.70.61.61.50.70
+ +Table 6. Average per-image IoU w.r.t. number of road participants. + +intermediate representations, OSP and HST, as by-products. To demonstrate that these intermediate representations are indeed semantically useful for downstream tasks, we study their IoU as well as accuracy score, as an indication for their performance. Please note that compared to existing work that requires dense and time-consuming pixel-wise human annotation, ours only requires cheap parametric human annotations and produces pixel-level occlusion-reasoned semantic segmentation in perspective and top-view. + +As shown in Tab. 5, our method is able to provide multiple meaningful intermediate representations. Also, our deep supervision proves to be beneficial in an end-to-end manner, which can be observed from the performance gap on OSP between $RGB + PS$ and our full model. In addition, our model also achieves reasonably good performance on HST. As a reference, [31], which aims to predict pixel-level semantics of visible regions in top-view with perspective images as input, reports about $63.0\%$ IoU for drivable category on two different datasets. + +However, please note that [31] requires pixel-level dense annotations in top-view during training and the predictions are not occlusion-reasoned. We further visualize quantitative results in Fig. 8 and Fig. 9. As can be seen, our method obtain high quality semantics in both perspective and top-view despite occlusions. + +# 5. Conclusion + +We propose a novel end-to-end model that inputs single RGB perspective image and outputs multi-aspect representations for road layout, including top-view parametric predictions, OSP and HST. Specifically, we introduce two intermediate modules and exploit deep supervision to learn inductive biases in occlusion-reasoning, geometric transformation and semantic abstraction. We demonstrate the + +![](images/6405416971f38e99dafac27a63f56b1a1c4fc3ebcde57a83d10869528bd6248a.jpg) + +![](images/4ed555527179712a265f83fdd3cbea029fe3efff2aff461be98d63f6b35899f2.jpg) + +![](images/08b70e10b670279a71a62df29369cbaaee26308efde4a9afc45d0c733c3a4cdb.jpg) + +![](images/b11e09615084fa834bbaefed50c4aac77aeabb0bc929c33407b0c533db7973ec.jpg) + +![](images/1c5622586e22fc9bc00164c12d2a040deb540333b6c409244532ab897bb6ec7b.jpg) + +![](images/3e4f9c2e4e648a411ad391af14f1688ca4b959b1e6c43648a63f34e74cc119af.jpg) + +![](images/dde95f42d58f12d93e0ac54201230ee5a0d03974babe2bde338e1d81845252a6.jpg) +Input RGB + +![](images/d96b4d2a9b9a8571168def651ea7f07eeacabb1619d79c7158e833ed1ded2986.jpg) +HST +BEV +Figure 8. We demonstrate input RGB, predicted HST as well as BEV of [46], which is trained with thousands of pixel-level annotated images and LiDAR images. As can be seen in these examples, our model is able to hallucinate far away regions in a realistic manner, even on curved road, with $NO$ pixel-level human annotations. + +![](images/122311f0718b1d0016e9ae072bcec8a1e9f00e05e2789ad7cedd131113b3b77b.jpg) + +![](images/a0f959e4c89864ac6cddaf54c9d3235680de8741331d6c49c11929b009b8b967.jpg) + +![](images/ca08816ff9dad40adf1e3afd830fce05db2702d3a4dc6c589f3b3a41cf068c30.jpg) + +![](images/1dcffde6cd150355496bc96af4b7343437d5d8cd141a6a4fa076c81a234495af.jpg) + +![](images/3f397fa7ac9858e3e8863df90726ff3ecdf19ef355fa0278c22fa98971ab99ac.jpg) + +![](images/7f5b6319537a659f83da8c59843ad0fc6ff80eb4b1243da31220605d4577d066.jpg) +Figure 9. Input image, generated ground-truth pixel-level semantics and predicted semantics from top to bottom row. Our model is able to predict the semantics quite well despite occlusions. + +![](images/bc6aeadfce960d673752879ad6b4447fe8c873192a661129b29365d5a2985b8a.jpg) + +effectiveness of our proposed method as well as intermediate modules on publicly available datasets and demonstrate that we can achieve SOTA performance with less human annotations. + +# References + +[1] Iro Armeni, Ozan Sener, Amir R. Zamir, Helen Jiang, Ioannis Brilakis, Martin Fischer, and Silvio Savarese. 3D Semantic Parsing of Large-Scale Indoor Spaces. In CVPR, 2016. 2 +[2] Yigit Baran Can, Alexander Liniger, Danda Pani Paudel, and Luc Van Gool. Structured bird's-eye-view traffic scene understanding from on board images. In ICCV, 2021. 2 +[3] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. arXiv preprint arXiv:1412.7062, 2014. 3 +[4] Helisa Dhamo, Nassir Navab, and Federico Tombari. Object-driven multi-layer scene decomposition from a single image. In ICCV, 2019. 2 +[5] Vikas Dhiman, Quoc-Huy Tran, Jason J. Corso, and Manmohan Chandraker. A Continuous Occlusion Model for Road Scene Understanding. In CVPR, 2016. 1 +[6] Christoph Feichtenhofer, Axel Pinz, and Richard P Wildes. Spatiotemporal multiplier networks for video action recognition. In CVPR, 2017. 2 +[7] Ravi Garg, Vijay Kumar Bg, Gustavo Carneiro, and Ian Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In ECCV, 2016. 4 +[8] Andreas Geiger, Martin Lauer, Christian Wojek, Christoph Stiller, and Raquel Urtasun. 3D Traffic Scene Understanding from Movable Platforms. PAMI, 2014. 1, 2 +[9] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets Robotics: The KITTI Dataset. *IJRR*, 2013. 2, 5, 6, 7, 8 +[10] Clément Godard, Oisin Mac Aodha, and Gabriel J Brostow. Unsupervised monocular depth estimation with left-right consistency. In CVPR, 2017. 4 +[11] Stephen Gould, Richard Fulton, and Daphne Koller. Decomposing a scene into geometric and semantically consistent regions. In ICCV, 2009. 2 +[12] Ruiqi Guo and Derek Hoiem. Beyond the line of sight: labeling the underlying surfaces. In ECCV, 2012. 2 +[13] Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive Mapping and Planning for Visual Navigation. In CVPR, 2017. 1, 2 +[14] Richard Hartley and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 4, 5 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 6, 7 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016. 6 +[17] Lars Kunze, Tom Bruls, Tarlan Suleymanov, and Paul Newman. Reading between the Lanes: Road Layout Reconstruction from Partially Segmented Scenes. In International Conference on Intelligent Transportation Systems (ITSC), 2018. 2 +[18] Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeply-Supervised Nets. In Pro + +ceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, 2015. 2 +[19] Chi Li, M. Zeeshan Zia, Quoc-Huy Tran, Xiang Yu, Gregory D. Hager, and Manmohan Chandraker. Deep supervision with shape concepts for occlusion-aware 3d object parsing. In CVPR, 2017. 2 +[20] Peiliang Li, Xiaozhi Chen, and Shaojie Shen. Stereo r-cnn based 3d object detection for autonomous driving. In CVPR, 2019. 7 +[21] Beyang Liu, Stephen Gould, and Daphne Koller. Single image depth estimation from predicted semantic labels. In CVPR, 2010. 2, 4 +[22] Buyu Liu and Xuming He. Multiclass semantic video segmentation with object-level active inference. In CVPR, 2015. 2 +[23] Buyu Liu, Bingbing Zhuang, Samuel Schulter, Pan Ji, and Manmohan Chandraker. Understanding road layout from videos as a whole. In CVPR, 2020. 1, 2, 4, 5, 6, 7 +[24] Chenxi Liu, Alexander G. Schwing, Kaustav Kundu, Raquel Urtasun, and Sanja Fidler. Rent3D: Floor-Plan Priors for Monocular Layout Estimation. In CVPR, 2015. 2 +[25] Chenyang Lu, Marinus Jacobus Gerardus van de Molengraft, and Gijs Dubbelman. Monocular Semantic Occupancy Grid Mapping With Convolutional Variational Encoder-Decoder Networks. IEEE Robotics and Automation Letters, 2019. 2 +[26] Kaustubh Mani, Swapnil Daga, Shubhika Garg, Sai Shankar Narasimhan, Madhava Krishna, and Krishna Murthy Jatavallabhula. Monolayout: Amodal scene layout from a single image. In WACV, 2020. 2, 6 +[27] Kaustubh Mani, N Sai Shankar, Krishna Murthy Jatavallabhula, and K Madhava Krishna. Autolay: Benchmarking amodal layout estimation for autonomous driving. In IROS, 2020. 2 +[28] NuTonomy. The NuScenes data set. https://www.nuscenes.org, 2018.2,5,6 +[29] B. Pan, J. Sun, H. Y. T. Leung, A. Andonian, and B. Zhou. Cross-view semantic segmentation for sensing surroundings. IEEE Robotics and Automation Letters, 2020. 2 +[30] Jonah Philion and Sanja Fidler. Lift, splat, shoot: Encoding images from arbitrary camera rigs by implicitly unprojecting to 3d. arXiv preprint arXiv:2008.05711, 2020. 2, 6 +[31] Thomas Roddick and Roberto Cipolla. Predicting semantic map representations from images using pyramid occupancy networks. In CVPR, 2020. 1, 2, 8 +[32] Thomas Roddick, Alex Kendall, and Roberto Cipolla. Orthographic feature transform for monocular 3d object detection. arXiv preprint arXiv:1811.08188, 2018. 2 +[33] 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, 2015. 3, 5 +[34] Samuel Schulter, Menghua Zhai, Nathan Jacobs, and Manmohan Chandraker. Learning to Look around Objects for Top-View Representations of Outdoor Scenes. In ECCV, 2018. 2, 6 +[35] Ari Seff and Jianxiong Xiao. Learning from Maps: Visual Common Sense for Autonomous Driving. arXiv:1611.08583, 2016. 1, 2, 6, 7 + +[36] Sunando Sengupta, Paul Sturgess, Labor Ladický, and Philip H. S. Torr. Automatic Dense Visual Semantic Mapping from Street-Level Imagery. In IROS, 2012. 2 +[37] Yujiao Shi, Liu Liu, Xin Yu, and Hongdong Li. Spatial-aware feature aggregation for image based cross-view geolocation. NeurIPS, 2019. 2 +[38] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In NIPS, 2014. 2 +[39] Shuran Song, Andy Zeng, Angel X. Chang, Manolis Savva, Silvio Savarese, and Thomas Funkhouser. Im2Pano3D: Extrapolating 360 Structure and Semantics Beyond the Field of View. In CVPR, 2018. 2 +[40] Joseph Tighe, Marc Niethammer, and Svetlana Lazebnik. Scene Parsing with Object Instances and Occlusion Ordering. In CVPR, June 2014. 2 +[41] Shubham Tulsiani, Richard Tucker, and Noah Snavely. Layer-structured 3D Scene Inference via View Synthesis. In ECCV, 2018. 2 +[42] Tuan-Hung Vu, Wongun Choi, Samuel Schulter, and Manmohan Chandraker. Memory warps for learning long-term online video representations. arXiv preprint arXiv:1803.10861, 2018. 2 +[43] Jingdong Wang, Ke Sun, Tianheng Cheng, Borui Jiang, Chaorui Deng, Yang Zhao, Dong Liu, Yadong Mu, Mingkui Tan, Xinggang Wang, et al. Deep high-resolution representation learning for visual recognition. PAMI, 2020. 3, 5 +[44] Yan Wang, Wei-Lun Chao, Divyansh Garg, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar from visual depth estimation: Bridging the gap in 3d object detection for autonomous driving. In CVPR, 2019. 2 +[45] Ziyan Wang, Buyu Liu, Samuel Schulter, and Manmohan Chandraker. A dataset for high-level 3d scene understanding of complex road scenes in the top-view. In CVPR Workshop, 2019. 3, 7 +[46] Ziyan Wang, Buyu Liu, Samuel Schulter, and Manmohan Chandraker. A parametric top-view representation of complex road scenes. In CVPR, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[47] Weixiang Yang, Qi Li, Wenxi Liu, Yuanlong Yu, Yuexin Ma, Shengfeng He, and Jia Pan. Projecting your view attentively: Monocular road scene layout estimation via cross-view transformation. In CVPR, 2021. 2 +[48] Xiaohang Zhan, Xingang Pan, Bo Dai, Ziwei Liu, Dahua Lin, and Chen Change Loy. Self-supervised scene de-occlusion. In CVPR, 2020. 2 +[49] Xizhou Zhu, Yujie Wang, Jifeng Dai, Lu Yuan, and Yichen Wei. Flow-guided feature aggregation for video object detection. In ICCV, 2017. 2 +[50] Xizhou Zhu, Yuwen Xiong, Jifeng Dai, Lu Yuan, and Yichen Wei. Deep feature flow for video recognition. In CVPR, 2017. 2 \ No newline at end of file diff --git a/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/images.zip b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c709b5d005221b53a52ef57658ef87e10db42152 --- /dev/null +++ b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4843379aa500defb04c66716492ae4cca4c02f8e4f212ca8e813bd911d32f8f1 +size 669050 diff --git a/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/layout.json b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..99f7e74adc2037ae892413ce3b15e2f52717efa2 --- /dev/null +++ b/weaklybutdeeplysupervisedocclusionreasonedparametricroadlayouts/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59505fdc59fca4a3d6aba97e4863155ff4c7ad95b92acf9d457b6029e3a3a742 +size 443029 diff --git a/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_content_list.json b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..27701ef8fe06e6a55b81ce007b8c30c31969e9ca --- /dev/null +++ b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90db3880d90f882f71012ead2822f33624f605dbf27ef5204d680fb5e05bf5e2 +size 72021 diff --git a/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_model.json b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a7bdebb25a19c83cee5becc07d2a24ab9b034a55 --- /dev/null +++ b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0b1dbaf97e5db8ea91be91f7d7c4059e094169279ba65782a8311831ebf347c +size 87757 diff --git a/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_origin.pdf b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3b110905e7881c50ef923a6d0c6a2e5d4a3b2a2f --- /dev/null +++ b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/54ec71d9-efb6-45c4-86a3-0556b4689cd6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aacba65d5fb53865b91954a458fc8751b19c2d81c4468f879c41c44e3bb8439 +size 633968 diff --git a/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/full.md b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ebf435f2a11d19e480a78d7144a3b9c1afa86521 --- /dev/null +++ b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/full.md @@ -0,0 +1,257 @@ +# Weakly Paired Associative Learning for Sound and Image Representations via Bimodal Associative Memory + +Sangmin Lee $^{1}$ Hyung-Il Kim $^{2}$ Yong Man Ro $^{1*}$ $^{1}$ Image and Video Systems Lab, KAIST $^{2}$ ETRI +{sangmin.lee,ymro}@kaist.ac.kr hikim@etri.re.kr + +# Abstract + +Data representation learning without labels has attracted increasing attention due to its nature that does not require human annotation. Recently, representation learning has been extended to bimodal data, especially sound and image which are closely related to basic human senses. Existing sound and image representation learning methods necessarily require a large number of sound and image with corresponding pairs. Therefore, it is difficult to ensure the effectiveness of the methods in the weakly paired condition, which lacks paired bimodal data. In fact, according to human cognitive studies, the cognitive functions in the human brain for a certain modality can be enhanced by receiving other modalities, even not directly paired ones. Based on the observation, we propose a new problem to deal with the weakly paired condition: How to boost a certain modal representation even by using other unpaired modal data. To address the issue, we introduce a novel bimodal associative memory (BMA-Memory) with key-value switching. It enables to build sound-image association with small paired bimodal data and to boost the built association with the easily obtainable large amount of unpaired data. Through the proposed associative learning, it is possible to reinforce the representation of a certain modality (e.g., sound) even by using other unpaired modal data (e.g., images). + +# 1. Introduction + +Data representation learning without labels is to learn general features from unlabeled data by exploiting automatically generated supervisory signals within the data. Since it is highly time-consuming and labor-intensive for people to annotate large-scale data manually, such representation learning methods have received increasing attention in industry and research fields. In this context, representation learning has been applied to various areas such as computer vision [10, 15, 17], natural language processing [7, 12], and + +![](images/490747da5004c442f5b85791732ba3f82f4af0662043a5de7679c21c78d3168d.jpg) +Figure 1. Concept of the proposed framework. The model can associate one modality (e.g., sound) with a different modality (e.g., image) through BMA-Memory to obtain abundant representations. Unpaired modality can boost the association between modalities. + +sound signal processing [4, 39]. + +Recently, as data samples are acquired in various multisensory environments, representation learning methods for bimodal data have been proposed. They aimed to learn feature representation from exploiting correspondence between bimodal data. In particular, many bimodal representation learning methods investigated the correspondence between auditory and vision which are closely related to basic human senses. These methods mainly attempted to learn bimodal representations from audio-video [26, 31] or sound-image [34, 38] data without labels. However, existing bimodal representation learning methods require a large number of data with corresponding pairs. Therefore, it is difficult to ensure the effectiveness of the methods in the weakly paired condition, which lacks paired bimodal data. + +According to neurobiological studies, the cognitive functions related to a certain modality can be enhanced by re + +ceiving other modal stimuli in the human brain. There are several cases such as visual stimuli to multisensory cognition [41], auditory stimuli to visual cognition [5], and tactile stimuli to visual cognition [18]. It is possible because humans memorize multisensory modalities and associate them with each other in their brains. Bimodal cognitive functions are closely connected and influenced by each other. + +Based on the observation, we introduce a new problem to deal with the weakly paired condition: How to boost a certain modal representation even by using other unpaired modal data, which has not been properly addressed in previous works. It is needed to devise such a method in order to extend and generalize bimodal representation learning as the human brain. In terms of sound-image data, we can expect to enhance the image representation even from unpaired sound data and vice versa. Based on this context, we focus on the representations of sound-image level rather than audio-video level because the weakly paired condition is more naturally observed in sound-image data. For example, we can acquire lots of animal images easily by web searching, whereas it is difficult to obtain animal sound data. In such weakly paired condition, it is worth to reinforce difficult-to-obtain modal (e.g., sound) representation from other easy-to-obtain modal data (e.g., image). + +In this paper, we propose a novel bimodal associative memory (BMA-Memory) which enables to learn sound and image representations. BMA-Memory can store bimodal features in sound-image sub-memories and associate with one another naturally through a key-value switching scheme. Since another modality can be recalled through BMA-Memory, we can obtain abundant representation that includes both input and associated modalities from single modal input. Based on the memory, we introduce weakly paired associative learning to address weakly paired condition, which lacks paired data. BMA-Memory enables to build the sound-image association with small paired bimodal data and to boost the built association with the easily obtainable large amount of unpaired modal data. In unpaired associative learning, we construct pseudo bimodal pairs from unpaired data to enhance the bidirectional association. As a result, the representation of certain modality can be enhanced even by using other unpaired modal data. The concept of the proposed approach is shown in Figure 1. + +The major contributions of the paper are as follows. + +- We introduce a novel BMA-Memory with key-value switching to learn sound and image representations. It stores bimodal sound-image features and associates with one another. It enables to obtain abundant representations including both input and associated modalities even from single modal input. +- We propose weakly paired associative learning to address the weakly paired condition. It effectively enables to deal with boosting certain modal representations. + +tion even by using other unpaired modal data in the weakly paired condition. + +# 2. Related Work + +# 2.1. Bimodal Representation Learning + +Data representation learning without labels is to learn features from unlabeled data by using automatically generated supervisory signals within the data. To learn representations, pretext tasks are defined to train the model in self-supervised manners. Various pretext tasks have been investigated to utilize the structural properties of data. Such methods include rotation prediction [15], spatial context prediction [13], and jigsaw puzzle [33]. In recent years, representation learning methods with contrastive learning have shown remarkable effectiveness in learning image representations [10, 20]. The representations learned from pretext tasks are evaluated through other downstream tasks such as classification and retrieval. + +Recently, representation learning methods have been extended to bimodal data as data samples are acquired in various multi-sensory environments [11, 22, 26, 31, 34, 38, 42, 44]. In particular, sound and vision which are closely related to basic human senses have been significantly investigated. These methods mainly attempted to learn bimodal representation from audio-video or sound-image data. In the case of audio-video data, Korbar et al. [26] proposed a representation learning method considering temporal synchronization of audio-video pairs. Alwassel et al. [1] introduced bimodal representation learning with audio-video clustering. In [32], a representation learning method for audio-video data was proposed by exploring bimodal agreement which groups together potentially paired multiple instances as positives. The attempts have been made to utilize bimodal correspondence between sound and image data as well. With sound-image data, Owens et al. [34] introduced representation learning which predicts the corresponding sounds from images. Senocak et al. [40] proposed an algorithm with learning sound-image representations for sound localization in images. In [38], the authors introduced enhanced representation learning from sound-image data with acoustic images by using knowledge distillation. + +These existing methods require potentially paired b-modal data. To address the issue, we propose a novel method for learning sound-image representations from unpaired data with the consideration of the weakly paired condition. The strength of our algorithm lies in that it can enhance the feature representation of a certain modal input even by exploiting other unpaired modal data. Further, compared to bimodal semi-supervised works [3,6,9] which align different modalities in common space mainly for retrieval, our work is different in that the goal is to learn general features from unlabeled bimodal data in a self-supervised way. + +![](images/c52178702385e22ba99c7e3e20421b46c484b813b524c702bad78ef79960641e.jpg) +Figure 2. Proposed paired associative learning with BMA-Memory to exploit small paired sound-image data at training time. BMAMemory includes image and sound sub-memories with a key-value switching scheme. During the training, paired images and sounds are used to make these memories associate with one another. + +# 2.2. Memory-Augmented Network + +A memory-augmented network indicates the neural network with external memory components which make it possible to read and write historical information. Memory-augmented networks have been proposed to solve various problems in the deep learning field. They were adopted in several tasks such as object tracking [14, 43], anomaly detection [16, 36], predictive learning [19, 28, 29], and few-shot learning [8, 23, 45]. There exist methods that apply memory networks to self-supervised learning schemes. Lai et al. [27] introduced a self-supervised dense tracking model with the memory-augmented network which stores the information of past frames. Han et al. [19] proposed a predictive coding framework with the memory-augmented network. They tried to learn video representation by estimating the possible future states with the memory. + +Compared to existing memory networks, we propose a novel BMA-Memory with key-value switching scheme that enables to naturally associate the sound with the image and vice-versa in a self-supervised manner. Based on BMAMemory, we propose weakly paired associative learning for building and boosting the association between modalities. + +# 3. Proposed Approach + +Representation learning for bimodal data can be formulated as follows. Let $x^v$ and $x^s$ denote input image and sound data (i.e., spectrogram), respectively. The goal is to jointly optimize two functions $(\mathcal{F}_v, \mathcal{F}_s)$ for obtaining distinct sound and image representations $(h^v, h^s)$ from $(x^v, x^s)$ with self-supervised learning (i.e., pretext learning). Note that $h^v = \mathcal{F}_v(x^v)$ and $h^s = \mathcal{F}_s(x^s)$ . Then, the effec + +tiveness of the representations is validated through downstream tasks (e.g., image or sound classification). + +# 3.1. Bimodal Associative Memory + +Figure 2 shows weakly paired associative learning with a bimodal associative memory (BMA-Memory) for sound-image representations in the case of learning with small paired data. BMA-Memory is to store sound and image features and to link these modalities. The memory enables to recall the sound feature from image data and vice-versa. We can obtain more abundant representations by exploiting features of both input and recalled modalities. + +Firstly, input image $x^{v}$ and sound $x^{s}$ become an image feature $f^{v} \in \mathbb{R}^{c}$ and a sound feature $f^{s} \in \mathbb{R}^{c}$ through each feature encoder $(E_{v}, E_{s})$ , respectively. We adopt 2D-Conv architectures, ResNet-18 and ResNet-10 [21] for image and sound encoders, respectively. Note that input $x^{s}$ has the form of the spectrogram image. The extracted image and sound features are used as memory queries to access an image memory $M^{v}$ and a sound memory $M^{s}$ which are submemories in BMA-Memory. The image and sound memories have matrix forms of $M^{v} = \{m_{r}^{v}\}_{r=1}^{n} \in \mathbb{R}^{n \times c}$ and $M^{s} = \{m_{r}^{s}\}_{r=1}^{n} \in \mathbb{R}^{n \times c}$ , respectively with $n$ slots and $c$ channels. A row vector $m_{r}^{v} \in \mathbb{R}^{c}$ denotes the $r$ -th memory item of $M^{v}$ . BMA-Memory maps one to another modal space through key-value memory structure. It alleviates the domain gap from inconsistent distribution of different modalities. We introduce a key-value switching procedure to associate these memories in a self-supervised manner naturally. So for the image input, the image memory becomes the key while the sound memory becomes the value. The key-value memories are swapped in the + +case of the sound input (see Figure 2). Addressing vectors $W^{v} = \{w_{r}^{v}\}_{r = 1}^{n}\in \mathbb{R}^{n}$ and $W^{s} = \{w_{r}^{s}\}_{r = 1}^{n}\in \mathbb{R}^{n}$ are obtained from key-memories $M^v$ and $M^s$ , respectively. Note that each addressing vector is used to access the components of each value-memory. The memory addressing scheme is shown in Figure 3. The addressing procedure in the case of image input feature $f^{v}$ can be formulated as + +$$ +w _ {r} ^ {v} = \frac {\exp \left(d \left(f ^ {v} , m _ {r} ^ {v}\right) / \tau_ {m}\right)}{\sum_ {r = 1} ^ {n} \exp \left(d \left(f ^ {v} , m _ {r} ^ {v}\right) / \tau_ {m}\right)}, \tag {1} +$$ + +$$ +d \left(f ^ {v}, m _ {r} ^ {v}\right) = \frac {f ^ {v} \cdot m _ {r} ^ {v}}{\left\| f ^ {v} \right\| \left\| m _ {r} ^ {v} \right\|}, \tag {2} +$$ + +where $d(\cdot, \cdot)$ indicates cosine similarity function, $\exp(\cdot) / \sum \exp(\cdot)$ denotes softmax function, and $\tau_{m}$ is a memory temperature. $W^{v}$ is used to access the components of a value-memory to convert from image space to sound space. Note that value-memory indicates $M^{s}$ for $W^{v}$ . Each component $w_{r}^{v}$ of $W^{v}$ can be considered as an attention weight for the corresponding value-memory slot $m_{r}^{s}$ . $M^{s}$ outputs a sound memory feature $f^{s,mem} \in \mathbb{R}^{c}$ as follows + +$$ +f ^ {s, m e m} = \sum_ {r = 1} ^ {n} w _ {r} ^ {v} m _ {r} ^ {s}. \tag {3} +$$ + +Finally, the image feature $f^v$ and the sound memory feature $f^{s,mem}$ are concatenated to obtain target representation $h^v = [f^v; f^{s,mem}]$ . $h^v$ includes both input image and associated sound information. For input sound feature $f^s$ , the overall addressing procedure is identical to that for the image feature $f^v$ . Sound and image terms are just swapped. During the training phase, the weights of $M^v$ and $M^s$ are updated via backpropagation as [16,28]. The objective loss is described in the next section. + +# 3.2. Weakly Paired Associative Learning + +# 3.2.1 Paired Associative Learning + +We propose weakly paired associative learning that includes paired associative learning and unpaired associative learning. The proposed model is trained with small paired sound-image data as shown in Figure 2. The goal of paired associative learning is to build the link between image and sound memories in a self-supervised manner. With the $i$ -th paired input image $x_{i}^{v}$ and sound $x_{i}^{s}$ , we can obtain target feature representations $h_{i}^{v}$ and $h_{i}^{s}$ , respectively. Then, they pass through the projection head that consists of 2-layer MLP to make $z_{i}^{v}$ and $z_{i}^{s}$ as [10]. $z_{i}^{v}$ and $z_{i}^{s}$ indicate projections which are actually used for pretext self-supervised learning. If $z^{v}$ and $z^{s}$ are from a pair (or the same clip), we consider them as a positive set ( $e.g., z_{i}^{v}, z_{i}^{s}$ ). Otherwise, we think of them as a negative set ( $e.g., z_{i}^{v}, z_{j}^{s}$ ). Making such a positive set distinctly close allows the memory to associate counterpart modality. The objective loss named paired associative loss $\mathcal{L}_{\mathrm{pair}}$ has the variational form of noise contrastive + +![](images/8d7443ddb244b0f40bed9e0972ebcc6a16400fe8a9985a3fe44c5b3f0790fcac.jpg) +Figure 3. Detailed key-value addressing procedure of BMA-Memory in the case of image memory (key) to sound memory (value). Note that sound memory (key) to image memory (value) can be performed vice-versa. + +loss [10,20] and is applied to samples in a mini-batch (batch size $= N$ ). When there are $N$ samples of $z^v$ and $N$ samples of $z^s$ , except for itself and samples from a same clip, the rest samples can be considered as negative samples of a specific sample. We set $Z^p = \{z_i^p\}_{i=1}^{2N} = \{z_1^v, \dots, z_N^v, z_1^s, \dots, z_N^s\}$ . The loss for paired associative learning is defined as + +$$ +\mathcal {L} _ {\text {p a i r}} = - \frac {1}{2 N} \sum_ {i = 1} ^ {2 N} \log \frac {\sum_ {k +} \exp \left(d \left(z _ {i} ^ {p} , k ^ {+}\right) / \tau_ {l}\right)}{\sum_ {j = 1} ^ {2 N} \mathbf {1} _ {[ j \neq i ]} \exp \left(d \left(z _ {i} ^ {p} , z _ {j} ^ {p}\right) / \tau_ {l}\right)}, \tag {4} +$$ + +where $k^{+}$ and $\tau_{l}$ indicate a positive sample from a sample clip (e.g., $z_{i}^{v}$ for $z_{i}^{s}$ ) and a loss temperature parameter, respectively. $\mathbb{1}_{[j\neq i]} \in \{0,1\}$ represents an indicator function that has 1 iff $j \neq i$ . By minimizing $\mathcal{L}_{\mathrm{pair}}$ , we can attract one another within the positive set and repel each other within the negative set. This makes it possible to recall the distinct sound modality from the image data and vice-versa. When we do not use the unpaired data, training is conducted by just minimizing $\mathcal{L}_{\mathrm{pair}}$ . + +# 3.2.2 Unpaired Associative Learning + +Further, the model can be trained with unpaired data to reinforce sound-image association which is built by the paired associative learning. To this end, we construct the pseudo bimodal pair including bidirectional memory associations $(\mathrm{I} \rightarrow \mathrm{S}, \mathrm{S} \rightarrow \mathrm{I})$ . The strength of our algorithm lies in that it can enhance the feature representation of a certain modal input by exploiting other unpaired modal data. For example, we can reinforce the representation from input image data by additionally using just unpaired sound data, and vice-versa. + +Figure 4 shows the case of exploiting the $i$ -th unpaired sound $x_{i}^{s}$ . Firstly, we get augmented sample $x_{i}^{\prime s}$ by applying augmentation algorithm to $x_{i}^{s}$ . As an augmentation algorithm for $x_{i}^{\prime s}$ , we adopt SpecAugment [35] which randomly masks the frequency and time bands of the spec + +![](images/5366e9bac6a5ffa363376966cd22f2f039bc80e48a5bb136db635971ace71b29.jpg) +Figure 4. Proposed unpaired associative learning with BMA-Memory to exploit unpaired sound data at training time. During the training, unpaired images or sounds can be further exploited to enhance the association between image and sound sub-memories of BMA-Memory in a self-supervised way, which leads to boosting the representations. Through the unpaired associative learning, it is possible to enhance the representation of a certain modality by exploiting unpaired different modal data. As the case of unpaired sound data, unpaired image data also can be used in a similar way (memory accessing $\mathrm{I}\rightarrow \mathrm{S}$ , $\mathrm{I}\rightarrow \mathrm{S}\rightarrow \mathrm{S}\rightarrow \mathrm{I}$ ). + +program. $f_{i}^{\prime v,mem}$ is obtained from $x_{i}^{\prime s}$ through the sound-image (key-value) memories. Different from the paired associative learning, $f_{i}^{\prime v,mem}$ is then reused as a pseudo image memory query to pass through the image-sound (key-value) memories. Through this cyclic addressing, we obtain $h_{i}^{\prime s} = [f_{i}^{\prime v,mem}; f_{i}^{\prime s,mem}]$ which is mainly composed of image and sound memory features. Making $h_{i}^{\prime s}$ discriminative can lead to boosting alignment of associations between image and sound memories because $h_{i}^{\prime s}$ contains bidirectional associations (I→S, S→I). Therefore, unpaired learning using sound can also reinforce the S→I as well as I→S associations, which can lead to the improvement of the image representation. To this end, we optimize the model with an unpaired associative loss $\mathcal{L}_{\text{unpair}}$ . In terms of $\mathcal{L}_{\text{unpair}}$ , we build the positive set as projections (e.g., $z_{i}^{\prime s}$ and $z_{i}^{\prime ss}$ ) from a same sound sample (or a same clip). $z_{i}^{\prime ss}$ is the projection from $x_{i}^{\prime ss}$ which is differently random augmented sample of $x_{i}^{s}$ . $z_{i}^{\prime ss}$ can be considered as the projection of pseudo b-modal pair. We set the negative set as projections (e.g., $z_{i}^{\prime s}$ and $z_{j}^{\prime ss}$ ) from the different sound samples. $\mathcal{L}_{\text{unpair}}$ is also applied based on the units in a mini-batch. Similar to $\mathcal{L}_{\text{pair}}$ , we can set $Z^{up} = \{z_{i}^{up}\}_{i=1}^{2N} = \{z_{1}^{\prime s}, \dots, z_{N}^{\prime s}, z_{1}^{\prime ss}, \dots, z_{N}^{\prime ss}\}$ . In the case of unpaired sound data, the loss function for unpaired associative learning can be written as + +$$ +\mathcal {L} _ {\text {u n p a i r}} = - \frac {1}{2 N} \sum_ {i = 1} ^ {2 N} \log \frac {\sum_ {k +} \exp \left(d \left(z _ {i} ^ {u p} , k ^ {+}\right) / \tau_ {l}\right)}{\sum_ {j = 1} ^ {2 N} \mathbb {1} _ {[ j \neq i ]} \exp \left(d \left(z _ {i} ^ {u p}, z _ {j} ^ {u p}\right) / \tau_ {l}\right)}, \tag {5} +$$ + +Unpaired associative learning proceeds simultaneously with the paired learning. Model training is conducted with a total loss $\mathcal{L} = \mathcal{L}_{\mathrm{pair}} + \mathcal{L}_{\mathrm{unpair}}$ with both paired and unpaired + +data. Paired data pass through the path of Figure 2, and unpaired data pass through the path of Figure 4. Then, they are optimized at once. Note that unpaired image $x_{i}^{v}$ also can be used for unpaired associative learning. The procedure for this is just vice-versa for the case of unpaired sound. In this case, we adopt augmentations of [10] for images during the unpaired associative learning. + +# 4. Experiments + +# 4.1. Datasets + +To validate the proposed method, we adopt public datasets which contain image and/or sound data. We use ACIVW [38] and Kinetics-400 [24] datasets for learning a self-supervised pretext task. For downstream tasks, ACIVW [38] and DCASE-2018 [30] datasets are utilized. + +ACIVW. ACIVW [38] includes multimodal data with 5 hours of videos outdoors in the wild condition, obtained by an acoustic-optical camera. Raw signals are acquired from 128 microphones with a sampling frequency of $12.8\mathrm{kHz}$ . Video frames are captured with $480 \times 640$ pixels and 12 frames per second. It also includes $36 \times 48 \times 512$ multispectral acoustic images which have both spatial and auditory information. It consists of 10 classes with wild conditions: drone, shopping cart, traffic, train, boat, fountain, drill, razor, hair dryer, and vacuum cleaner. ACIVW is mainly utilized to investigate the correspondence between images and sounds. There are total 9k sound-image pairs. As [38], we used $70\%$ of the dataset to train the model with the pretext task. The remains are used to validate the model with the downstream tasks. + +Kinetics-400. This dataset [24] contains about 230k train + +
MethodTraining Data TypesTop-1 Accuracy
Supervised Learningimage0.769
L3 Vision Network* [2]image + sound0.544
Audio-Visual (H)* [38]image + sound0.667
Audio-Visual (H)* [38]image + sound0.732
(w/Transfer Learning)+ acoustic image
Proposed Method*image + sound0.772
+ unpaired sound
AVID-CMA† [32]image + sound0.738
Proposed Method† (w/o Unpaired Associative Learning)image + sound0.745
Proposed Method†image + sound0.778
+ unpaired sound
+ +ing videos with 400 classes such as riding a bike, salsa dancing, dunking basketball, and playing trumpet. Each clip lasts about 10sec and they are taken from different YouTube videos. Thus, it covers a large range of image and sound variations. Since the videos are obtained from YouTube, they have variable frame rates and resolutions. We sample a frame image and a sound in the middle of each clip. The dataset is used to train the model with the pretext task, especially in the unpaired associative learning. + +DCASE-2018. It is the 2018 version of Detection and Classification of Acoustic Scenes (DCASE) [30]. The dataset includes sound recordings from six European cities with ten different acoustic scenes: airport, bus, metro, metro station, park, public square, shopping mall, street (pedestrian), street (traffic), and tram. The recordings are obtained with a $48\mathrm{kHz}$ sampling rate. We use DCASE-2018 dataset to validate the model with the sound-based downstream task. + +# 4.2. Implementation Details + +Each image is normalized to the intensity of [0, 1] and resized to $224 \times 224$ pixels. Raw sound signals with 2sec are preprocessed to the form of log mel-spectrogram with $150 \times 200$ . We adopt ResNet-18 [21] as our image encoder according to [38] and similarly ResNet-10 as the sound encoder since both image and sound have spatial information. Memory slot size $n$ is fixed as 1,000. Memory and loss temperature parameters $(\tau_{m}, \tau_{l})$ are both set as 0.1 for all experiments according to [10]. The projected feature that is used to train the model with pretext tasks has 128-dimensional latent space as [10]. All of the proposed models are trained by the Adam optimizer [25] with a learning rate of 0.0002 and a batch size of 256. The experiments are conducted on a server system with TITAN RTX GPUs. We implement the model in PyTorch [37]. + +Table 1. Performance results for image classification on ACIVW dataset. Except for the supervised model, all other models are train with ACIVW dataset in self-supervised ways. Unpaired sounds are from Kinetics-400 dataset. * and † indicates the accuracies obtained from KNN and linear evaluation protocol, respectively. + +
MethodTraining Data TypesTop-1 Accuracy
Supervised Learningsound0.971
L3 Audio Network* [2]image + sound0.361
HearNet* [38]image + sound0.757
HearNet* [38]image + sound0.795
(w/Transfer Learning)+ acoustic image
Proposed Method*image + sound0.936
+ unpaired image
AVID-CMA† [32]image + sound0.902
Proposed Method† (w/o Unpaired Associative Learning)image + sound0.931
Proposed Method†image + sound0.956
+ unpaired image
+ +Table 2. Performance results for sound classification on ACIVW dataset. Except for the supervised model, all other models are train with ACIVW dataset in self-supervised ways. Unpaired images are from Kinetics-400 dataset. * and † indicates the accuracies obtained from KNN and linear evaluation protocol, respectively. + +# 4.3. Evaluation on Downstream Tasks + +To evaluate the representation quality, we follow a linear evaluation protocol [10] which is mainly adopted in the representation learning domain. First, a linear classifier is trained on top of the target representation with our frozen network. Then, we evaluate the test accuracy through the representation with the linear classifier to check the representation quality. If we want to evaluate the image representation power of our model, the representation $h^v = [f^v; f^{s,mem}]$ from the image input is used for image downstream tasks. $h^s = [f^{v,mem}; f^s]$ from the sound input is used for sound downstream tasks (See Figure 2). Further, we also utilize k-nearest neighbor (KNN) to evaluate the representations. + +Image Recognition. Table 1 shows the performance comparison results on ACIVW dataset in terms of classification with image data. All models are trained with the training set of ACIVW dataset. For evaluation of the image representation, we utilize the feature $h^v$ obtained from image inputs (see Figure 2). We compare our method with existing sound-image works [2, 38] and applicable audio-video work [32]. Except for the supervised model, the rest of the models are trained in self-supervised manners. The supervised model is trained with label information of ACIVW dataset. Note that the supervised model and our model have the same ResNet-18 backbone architecture as [38]. As shown in the table, the proposed method outperforms other methods. The proposed model surpasses 'Audio-Visual (H)' model with additional paired acoustic images which include both image and sound information. Note that unpaired sounds are more easily obtainable compared to the acoustic image pairs. By utilizing unpaired sound from Kinetics-400, the proposed method achieves the result better than the + +
MethodTraining Data TypesRetrieval Accuracy
Rank 1Rank 2Rank 3Rank 4Rank 5
L3 Audio Network [2]image + sound0.0970.1190.2420.2670.301
HearNet [38]image + sound0.2890.3440.4240.4800.614
DualCamNet [38]image + sound + acoustic image0.3340.3700.4290.4820.624
Proposed Method (w/o Unpaired Associative Learning)image + sound0.4980.5410.5880.6140.705
Proposed Methodimage + sound + unpaired image0.5220.5530.6120.6690.766
+ +Table 3. Performance results for bimodal retrieval (sound to image retrieval) on ACIVW dataset. All models are trained with ACIVW dataset in self-supervised manners. + +
MethodTraining Data TypesTop-1 Accuracy
Supervised Learningsound0.595
L3 Audio Network* [2]image + sound0.323
HearNet* [38]image + sound0.354
HearNet* [38]image + sound0.376
(w/ Transfer Learning)+ acoustic image
Proposed Method*image + sound0.420
+ unpaired image
AVID-CMA† [32]image + sound0.421
Proposed Method† (w/o Unpaired Associative Learning)image + sound0.538
Proposed Method†image + sound0.562
+ unpaired image
+ +Table 4. Performance comparison results for sound classification on DCASE-2018 dataset in a zero-shot setting. All models are trained with ACIVW and tested on DCASE-2018 except for the supervised model. * and † indicates the accuracies obtained from KNN and linear evaluation protocol, respectively. + +other methods and beyond the supervised model in terms of image recognition. The results show that the unpaired associative learning enhances the image representation even by using unpaired sound data from the different dataset. + +Sound Recognition. The performance comparison results for sound classification on ACIVW dataset are shown in Table 2. Similar to the previous results, the models are trained with ACIVW dataset in self-supervised ways except for the supervised model. To evaluate the sound representation quality, we exploit the feature $h^s$ obtained from sound inputs (see Figure 2). As shown in the table, the proposed method surpasses the other self-supervised methods. The unpaired associative learning with unpaired image data reinforces the sound recognition performance, which means that the sound representation is enhanced even by exploiting unpaired image data. Note that unpaired images are from Kinetics-400 dataset. As a result, the final model achieves the competitive performance compared to the supervised model. + +Zero-Shot Sound Recognition. Further, we conduct the + +experiment on DCASE-2018 for sound classification to validate the generalizability in zero-shot setting. In this experiment, the models are trained with ACIVW dataset in a self-supervised way and validated on DCASE-2018 dataset. Note that the supervised model is trained with DCASE-2018 dataset with label information. As shown in Table 4, the proposed method shows better performances compared to the other methods. In particular, when unpaired images are additionally used, the proposed method achieves comparable performance to the supervised model. These results indicate the obtained feature representation is generalizable well to the different dataset. + +Bimodal Retrieval. We additionally perform bimodal retrieval to verify how well the sound and image representations are associated with each other in a self-supervised manner. We select one sound sample and find the corresponding images which are close to the sound sample. It is correct if the sound and the retrieved image have the same class. Note that the bimodal retrieval is conducted based on image projection $z^v$ and sound projection $z^s$ which are used for matching at training time. Retrieved images are ordered according to the distance between the features of the sound and image. Experiments are performed on ACIVW dataset. As shown in Table 3, our method outperforms the other self-supervised methods in terms of bimodal retrieval for all conditions. The rank indicates how many candidates to retrieve. In particular, when unpaired associative learning is performed by using unpaired images, it shows better retrieval performances. It can be seen that the learning scheme with unpaired modal data strengthens the association between image and sound modalities. + +# 4.4. Compensation for Paired Data Volume + +Table 5 shows how effectively a decrease of the paired data volume can be compensated by using other unpaired modal data. As shown in the table, there is a considerable performance decrease in image classification when the paired data of ACIVW is reduced to $20\%$ level (1k images). Interestingly, through the proposed unpaired associative learning with unpaired sounds (Kinetics-400), we + +
Paired Data VolumeUnpaired Associative LearningTraining Data TypesTop-1 Accuracy
100%Ximage + sound0.745
✓image + sound + unpaired sound0.778
20%Ximage + sound0.693
✓image + sound + unpaired sound0.749
+ +Table 5. Performance evaluations in terms of image classification according to the amount of training paired data in ACIVW. + +![](images/0886e9bfcd9391ec7e0d227337cd03b5b6c9605032e401312c7ad4d0a36242aa.jpg) +Figure 5. Performance evaluations in terms of image classification according to the amount of unpaired sound data in Kinetics-400. + +achieve the performance that exceeds the performance using full paired data. In other words, with only $20\%$ image data, we obtain a competitive image recognition performance compared to the $100\%$ case by exploiting other unpaired modal data (i.e., sound data). Further, it can be seen that the boosting effect from unpaired data is more significant when the amount of paired data is limited. + +# 4.5. Effects of Unpaired Data Volume + +Figure 5 shows accuracies for image classification on ACIVW according to the amount of unpaired sound data in Kinetics-400. $230\mathrm{k}$ indicates the use of full unpaired sound data in Kinetics-400 while 0k indicates the model without unpaired associative learning. As shown in the figure, the best performance is not always achieved when all data is used unconditionally. Further higher performance can be achieved when a moderate amount of unpaired data is used. The highest performance was shown when $50\mathrm{k}$ of unpaired data was used, and the performance decreased as the amount decreased after that. Note that there are 6k training sound-image pairs. When the volume imbalance of unpaired and paired data is severe, more unpaired data does not help to enhance the representation. + +# 4.6. Effects of Memory Size + +We perform the experiments to observe the effects of the memory size $n$ on the representation learning performances. The memory size $n$ indicates the number of slots in the im + +![](images/41a680ab6b611ead7387cdef15b9697036f682401e5afd64625a1e108c2d8994.jpg) +Figure 6. Effects of the memory size for image classification on ACIVW. Memory size is varied with exponential scale. + +age and sound sub-memories. We change $n$ with an exponential scale (10, 50, 100, 500, 1,000, 5,000) for image classification on ACIVW dataset. Figure 6 shows the results. As the memory capacity increases, the performance tends to increase, which is saturated around $n = 500$ . Then it maintains the relatively stable values. Considering the exponential scale, the result represents the robustness to the setting of memory size around $n > 500$ . + +# 5. Discussion + +A slight performance decrease is observed with extremely large unpaired data (See Figure 5). It seems that it is due to the severe imbalance of paired data volume and unpaired data volume because the training combination of unpaired data keeps changing even with the limited paired data. Effectively dealing with the extremely large amount of unpaired data can be investigated in further works. + +# 6. Conclusion + +The goal of the proposed work is to learn the sound-image representations even by exploiting unpaired modal data in weakly paired condition. To this end, we propose BMA-Memory with key-value switching to effectively store the sound-image features and associate one another modality in a self-supervised manner. Through BMA-Memory, we can obtain abundant representations which contain information of both input and associated modalities. Based on this memory, we devise weakly paired associative learning to build and boost the association between sound and image. It enables to enhance the representation of a certain modality even by using different modal data. As a result, the proposed method outperforms other sound-image representation learning methods. Further, we validate the effectiveness and practicality of the proposed method by conducting ablation studies and data volume analysis. + +Acknowledgement. This work was supported by the IITP grant funded by the MSIT (No. 2020-0-00004). + +# References + +[1] H. Alwassel, D. Mahajan, B. Korbar, L. Torresani, B. Ghanem, and D. Tran. Self-supervised learning by cross-modal audio-video clustering. Advances in Neural Information Processing Systems (NeurIPS), 33:9758-9770, 2020. 2 +[2] R. Arandjelovic and A. Zisserman. Look, listen and learn. In International Conference on Computer Vision (ICCV), pages 609-617, 2017. 6, 7 +[3] Y. Aytar, L. Castrejon, C. Vondrick, H. Pirsiavash, and A. Torralba. Cross-modal scene networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(10):2303-2314, 2017. 2 +[4] A. Baevski, S. Schneider, and M. Auli. vq-wav2vec: Self-supervised learning of discrete speech representations. In International Conference on Learning Representations (ICLR), 2019. 1 +[5] B. Barakat, A. R. Seitz, and L. Shams. Visual rhythm perception improves through auditory but not visual training. Current Biology, 25(2):R60-R61, 2015. 2 +[6] A. K. Bhunia, P. N. Chowdhury, A. Sain, Y. Yang, T. Xiang, and Y. Song. More photos are all you need: Semi-supervised learning for fine-grained sketch based image retrieval. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 4247-4256, 2021. 2 +[7] T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei. Language models are few-shot learners. In Neural Information Processing Systems (NeurIPS), volume 33, pages 1877-1901, 2020. 1 +[8] Q. Cai, Y. Pan, T. Yao, C. Yan, and T. Mei. Memory matching networks for one-shot image recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 4080-4088, 2018. 3 +[9] L. Castrejon, Y. Aytar, C. Vondrick, H. Pirsiavash, and A. Torralba. Learning aligned cross-modal representations from weakly aligned data. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 2940-2949, 2016. 2 +[10] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. In International Conference on Machine Learning (ICML), pages 1597-1607. PMLR, 2020. 1, 2, 4, 5, 6 +[11] Y. Chen, Y. Xian, A. Koepke, Y. Shan, and Z. Akata. Distilling audio-visual knowledge by compositional contrastive learning. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 7016–7025, 2021. 2 +[12] J. Devlin, M. Chang, K. Lee, and K. Toutanova. Bert: Pretraining of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019. 1 +[13] C. Doersch, A. Gupta, and A. A. Efros. Unsupervised visual representation learning by context prediction. In International Conference on Computer Vision (ICCV), pages 1422-1430, 2015. 2 + +[14] Z. Fu, Q. Liu, Z. Fu, and Y. Wang. Stmtrack: Template-free visual tracking with space-time memory networks. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 13774-13783, 2021. 3 +[15] S. Gidaris, P. Singh, and N. Komodakis. Unsupervised representation learning by predicting image rotations. In International Conference on Learning Representations (ICLR), 2018. 1, 2 +[16] D. Gong, L. Liu, V. Le, B. Saha, M.R. Mansour, S. Venkatesh, and A. Hengel. Memorizing normality to detect anomaly: Memory-augmented deep autoencoder for unsupervised anomaly detection. In International Conference on Computer Vision (ICCV), pages 1705-1714, 2019. 3, 4 +[17] J. Grill, F. Strub, F. Altché, C. Tallec, P. H. Richemond, E. Buchatskaya, C. Doersch, B. A. Pires, Z. D. Guo, M. G. Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. In Neural Information Processing Systems (NeurIPS), 2020. 1 +[18] T. Guo, Y. Ren, Y. Yu, Y. Yu, Y. Hasegawa, Q. Wu, J. Yang, S. Takahashi, Y. Ejima, and J. Wu. Improving visual working memory with training on a tactile orientation sequence task in humans. SAGE Open, 11(3):21582440211031549, 2021. 2 +[19] T. Han, W. Xie, and A. Zisserman. Memory-augmented dense predictive coding for video representation learning. In European Conference on Computer Vision (ECCV), pages 312-329. Springer, 2020. 3 +[20] K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick. Momentum contrast for unsupervised visual representation learning. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 9729-9738, 2020. 2, 4 +[21] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. 3, 6 +[22] C. Jia, Y. Yang, Y. Xia, Y. Chen, Z. Parekh, H. Pham, Q. V. Le, Y. Sung, Z. Li, and T. Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In International Conference on Machine Learning (ICML), 2021. 2 +[23] L. Kaiser, O. Nachum, A. Roy, and S. Bengio. Learning to remember rare events. In International Conference on Learning Representations (ICLR), 2017. 3 +[24] W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, P. Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. 5 +[25] D.P. Kingma and J. Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. 6 +[26] B. Korbar, D. Tran, and L. Torresani. Cooperative learning of audio and video models from self-supervised synchronization. In Neural Information Processing Systems (NeurIPS), 2018. 1, 2 +[27] Z. Lai, E. Lu, and W. Xie. Mast: A memory-augmented self-supervised tracker. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 6479-6488, 2020. 3 +[28] S. Lee, H. G. Kim, D. H. Choi, H. Kim, and Y. M. Ro. Video prediction recalling long-term motion context via memory + +alignment learning. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 3054-3063, 2021. 3, 4 +[29] F. Marchetti, F. Becattini, L. Seidenari, and A. D. Bimbo. *Mantra: Memory augmented networks for multiple trajectory prediction*. In *Conference on Computer Vision and Pattern Recognition (CVPR)*, pages 7143-7152, 2020. 3 +[30] A. Mesaros, T. Heittola, and T. Virtanen. A multi-device dataset for urban acoustic scene classification. In Detection and Classification of Acoustic Scenes and Events Workshop (DCASEW), page 9, 2018. 5, 6 +[31] P. Morgado, Y. Li, and N. Nvasconcelos. Learning representations from audio-visual spatial alignment. Neural Information Processing Systems (NeurIPS), 33:4733-4744, 2020. 1, 2 +[32] P. Morgado, N. Vasconcelos, and I. Misra. Audio-visual instance discrimination with cross-modal agreement. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 12475–12486, 2021. 2, 6, 7 +[33] M. Noroozi and P. Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision (ECCV), pages 69-84. Springer, 2016. 2 +[34] A. Owens, J. Wu, J. H. McDermott, W. T. Freeman, and A. Torralba. Learning sight from sound: Ambient sound provides supervision for visual learning. International Journal of Computer Vision, 126(10):1120-1137, 2018. 1, 2 +[35] D. S. Park, W. Chan, Y. Zhang, C. Chiu, B. Zoph, E. D. Cubuk, and Q. V. Le. Specaugment: A simple data augmentation method for automatic speech recognition. In INTER-SPEECH, 2019. 4 +[36] H. Park, J. Noh, and B. Ham. Learning memory-guided normality for anomaly detection. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 14372-14381, 2020. 3 +[37] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. Devito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in pytorch. In Neural Information Processing Systems Workshop (NeurIPSW), 2017. 6 +[38] V. Sanguineti, P. Morerio, N. Pozzetti, D. Greco, M. Cristani, and V. Murino. Leveraging acoustic images for effective self-supervised audio representation learning. In European Conference on Computer Vision (ECCV), pages 119-135. Springer, 2020. 1, 2, 5, 6, 7 +[39] S. Schneider, A. Baevski, R. Collobert, and M. Auli. wav2vec: Unsupervised pre-training for speech recognition. In INTERSPEECH, 2019. 1 +[40] A. Senocak, T. Oh, J. Kim, M. Yang, and I. S. Kweon. Learning to localize sound source in visual scenes. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 4358-4366, 2018. 2 +[41] R. A. Stevenson, M. M. Wilson, A. R. Powers, and M. T. Wallace. The effects of visual training on multisensory temporal processing. Experimental brain research, 225(4):479-489, 2013. 2 +[42] C. Sun, A. Myers, C. Vondrick, K. Murphy, and C. Schmid. Videobert: A joint model for video and language representation learning. In International Conference on Computer Vision (ICCV), pages 7464-7473, 2019. 2 + +[43] T. Yang and A. B. Chan. Learning dynamic memory networks for object tracking. In European Conference on Computer Vision (ECCV), pages 152-167, 2018. 3 +[44] J. Zhang, X. Xu, F. Shen, H. Lu, X. Liu, and H. T. Shen. Enhancing audio-visual association with self-supervised curriculum learning. In AAAI Conference on Artificial Intelligence (AAAI), pages 3351–3359, 2021. 2 +[45] L. Zhu and Y. Yang. Inflated episodic memory with region self-attention for long-tailed visual recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 4344–4353, 2020. 3 \ No newline at end of file diff --git a/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/images.zip b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4612a2014e6ce5dab109a4b99233226d8c88b1e6 --- /dev/null +++ b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10bca0b21e37c436e576ccc1fc8957941cf1b827e047bf6d53ac3694acc5304e +size 520494 diff --git a/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/layout.json b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0610bad01e301e3c191b24f0fa045cc4372bb2ca --- /dev/null +++ b/weaklypairedassociativelearningforsoundandimagerepresentationsviabimodalassociativememory/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82f78e1b25892f98034442b3280b7e66b136c96f50606f55d92631a60bff7fd1 +size 374819 diff --git a/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_content_list.json b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8b13f7ec6244c600b03faaa39931d97bde120817 --- /dev/null +++ b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dfdc80d9a411e7f67585a75e449c3605cc89e125fa2b0dd86ed32fa1cc0774e +size 88650 diff --git a/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_model.json b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2e2d6b14b7ceeed3e1c343bf31c84fe57b662f93 --- /dev/null +++ b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffa8531be81a02b91788d1931255838bb6f05dafa793e2f6cd11d5c7f8d1801f +size 108406 diff --git a/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_origin.pdf b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6bb852df537f1e483aad3df7108eddec9141ae62 --- /dev/null +++ b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/340e7046-cb79-4fed-a853-4a4562eb5283_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1bb9e860a9075be615216131830059c30f1e637c2e661595910fd8dc38b5500 +size 5559676 diff --git a/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/full.md b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f48dc82a5dd0d3a894d2440ade37786ba341a1ea --- /dev/null +++ b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/full.md @@ -0,0 +1,344 @@ +# Weakly-supervised Action Transition Learning for Stochastic Human Motion Prediction + +Wei Mao $^{1}$ , Miaomiao Liu $^{1}$ , Mathieu Salzmann $^{2,3}$ $^{1}$ Australian National University; $^{2}$ CVLab, EPFL; $^{3}$ ClearSpace, Switzerland +{wei.mao, miaomiao.liu}@anu.edu.au, mathieu.salzmann@epfl.ch + +![](images/b03b7bd4081c04bc2d21fa2799edc48ab930688d487f99d15831a8be46d4f410.jpg) +Figure 1. Action-driven stochastic human motion prediction. Given a past motion (pink) and a sequence of future action labels, our model generates action-specific future poses (yellow). We show two different futures generated for the same history and actions. Our model allows these predictions to have different lengths. The motions are down-sampled to the same frame rate for visualisation. + +# Abstract + +We introduce the task of action-driven stochastic human motion prediction, which aims to predict multiple plausible future motions given a sequence of action labels and a short motion history. This differs from existing works, which predict motions that either do not respect any specific action category, or follow a single action label. In particular, addressing this task requires tackling two challenges: The transitions between the different actions must be smooth; the length of the predicted motion depends on the action sequence and varies significantly across samples. As we cannot realistically expect training data to cover sufficiently diverse action transitions and motion lengths, we propose an effective training strategy consisting of combining multiple motions from different actions and introducing a weak form of supervision to encourage smooth transitions. We then design a VAE-based model conditioned on both the observed motion and the action label sequence, allowing us to generate multiple plausible future motions of varying length. We illustrate the generality of our approach by exploring its use with two different temporal encoding models, namely RNNs and Transformers. Our approach outperforms baseline models constructed by adapting state-of-the-art single action-conditioned motion generation methods and stochastic human motion prediction approaches to + +our new task of action-driven stochastic motion prediction. Our code is available at https://github.com/wei-mao-2019/WAT. + +# 1. Introduction + +Modeling human motion has broad applications in human-robot interaction [26], virtual/augmented reality (AR/VR) [46] and animation [49]. As such, it has been an active research problem for many years [8]. In particular, recently, great progress has been made in predicting future motion given an observed past motion sequence [5,56]. Addressing this could have a significant impact on autonomous systems, allowing them to forecast potential dangers and plan their actions accordingly. Nevertheless, except for a few early methods that predict motions of a single action category [13, 21], recent methods [36, 56] mostly focus on action-agnostic predictions. Thus, they cannot be used by an autonomous system to generate specific potential future scenarios encoded by a sequence of action labels, for example to evaluate the consequences of a person on a sidewalk either walking to the crossing, waiting for the green light, and crossing the road, or instead running on the street and stopping in front of the car. By contrast, recent works on human motion synthesis can generate action-specific sequences [17, 42]. However, these methods neither lever + +age past motion observations, nor synthesize transitions between different actions. In this work, we therefore introduce the task of action-driven stochastic human motion prediction, which aims to predict a set of future motions given a sequence of action labels and past motion observations. + +One of the key challenges of this task arises from the fact that humans can perform motions with all kinds of action transitions. For example, when one walks to a table, they can then either grab a drink, or sit on a chair, or place something on the table, or perform any combination of the above. Constructing a dataset that covers this huge space of possible action transitions is therefore virtually impossible, significantly complicating training a model for this task. As a matter of fact, to the best of our knowledge, almost all human motion datasets contain sequences that depict a single action. While the recent BABEL dataset [43] constitutes the only exception with multiple actions per sequence, it contains only a small subset of action transitions, which, as evidenced by our experiments, does not suffice to learn to generalize to arbitrary ones. + +To tackle the diversity of human action transitions with such limited data, we develop a weakly-supervised training strategy that only relies on a motion smoothness prior. Specifically, we generate multi-action sequences by combining historical and future motions from different action categories, and account for the lack of supervision during the transition between two actions by simply encouraging the predicted motion to be temporally smooth. As will be shown by our experiments, such a simple prior suffices to model natural action transitions. + +The second main challenge of our task arises from the stochastic nature of human motion: Several ways to perform one action sequence are equally plausible. To handle this stochasticity, we design a model based on a variational autoencoder (VAE) [24], conditioning the VAE on the observed past motion and on the action label sequence. We demonstrate the generality of this model by exploiting it with two different temporal encoding architectures, an RNN-based one and a Transformer-based one. Furthermore, to reflect the fact that some action sequences require more time to be executed than others, we introduce a simple yet effective strategy based on the prediction variance to produce multi-action motions of different lengths. This contrasts with most of the motion prediction literature, which predicts fixed-length motions, and, as illustrated by Fig. 1, allows us to generate realistic, diverse future motions depicting the given actions in order and with varying length. We believe that our approach can also be beneficial for other tasks, e.g., music generation of variable length. + +Our contribution can therefore be summarized as follows: (i) We introduce a new task, action-driven stochastic human motion prediction, which bridges the gap between motion synthesis and stochastic human motion prediction; + +(ii) We propose a weakly-supervised training strategy to learn the action transitions without requiring an unrealistic amount of annotated data; (iii) We develop a simple yet effective way of predicting motions of varying length. + +Our experiments on 3 human motion modeling benchmarks demonstrate the effectiveness of our approach, outperforming baseline models constructed by extending state-of-the-art action-conditioned motion synthesis methods and stochastic human motion prediction ones to our new task. + +# 2. Related Work + +Human Motion Prediction. Most human motion prediction works [4, 9, 10, 13, 15, 16, 21, 29, 36-38, 41, 52] focus on predicting human movements in a very short future ( $< 0.5\mathrm{s}$ ). These methods mainly differ in their temporal encoding strategies, using either recurrent architectures [13, 15, 16, 21, 38, 41, 52] or feed-forward models [4, 9, 10, 29, 36, 37]. Most of them, however, do not aim to produce motions with the same past sequence that respect any given action label. The only exceptions that incorporate action information are the early works of [13, 15, 16, 21, 38]. However, such information is only used to help predict future motion of the same action as the historical motion. By contrast, we seek to predict future motions of different and multiple action categories. + +Because, given one sequence of action labels, we aim to predict multiple plausible motions, which is more closely related to diverse human motion prediction [5, 6, 18, 27, 32, 51, 54, 56]. To capture the distribution of future motions, these methods usually rely on deep generative models, such as VAEs [24] and generative adversarial networks (GANs) [14]. Among the most recent ones, the work of [5] prevents the VAE from ignoring the random variables by perturbing them; DLow [56] focuses on learning the sampling process for diverse future predictions from a pre-trained generative model. While these models indeed produce diverse and plausible future motions, these generated motions do not follow any clear semantic categories. As such, they could not be leveraged to help an autonomous system evaluate different scenarios defined in terms of semantic human behaviors. By contrast, our goal is to control the predicted future motion type using semantic information, i.e., a sequence of action labels. We therefore design a VAE-based model and a weakly-supervised training strategy that let us produce different plausible future motions for the same past motion and a sequence of action labels. + +Human Motion Synthesis. In contrast to motion prediction, human motion synthesis aims to generate realistic human motions without any historical observations. While earlier works [39, 48] focused on simple, cyclic movements, e.g., using Principal Component Analysis [39] or the Gaussian process latent variable model [48], recent deep-learning-based methods [2, 17, 28, 30-32, 42, 45] can handle + +![](images/82b9987b6729b56a3b9b0156240ae58c089742de74288dc59fc2e2c3a544ec2b.jpg) +Figure 2. Overview of our approach. + +more complicated motions. In this context, several works have proposed to condition the generated motions on some auxiliary signal, such as audio/music [28, 30, 31, 45] or textual descriptions [2, 32]. + +The methods most closely related to ours are [17, 42] which aim to generate action-specific human motions. In particular, [17] introduces a frame-level VAE-based model conditioned on the action label, and [42] a Transformer [50]-based VAE model with a sequence-level latent embedding. However, these models can only generate motions depicting individual actions. In principle, given supervised data covering all possible action transitions, they could be trained to generate more complex motions. However, such data cannot practically be obtained. We overcome this by designing a weakly-supervised training strategy that lets us leverage limited, single-action sequences. + +Variable-length Motion Prediction. Although generating sequences of variable length has been well-studied for machine translation [50], it is rarely considered in human motion prediction/synthesis. However, as studied in [1] in the context of predicting future actions' semantics and duration from video data, different action categories, or even instances of the same action, vary significantly in length. Our method produces a variable-length future motion given an action label and a past motion. While [42] also generates motions of variable lengths, these length must be set manually. In contrast, we automatically find the appropriate duration by learning the distribution of motion lengths. + +Action-conditioned Video Generation. The work most closely related to ours is PSGAN [55], which aims to predict future 2D human poses given one input image and a target action label. However, with only one input image, PSGAN cannot predict action transitions. Other action-conditioned generative methods include [53] and [22]. However, these works aim to generate face images conditioned on emotions, and the next game screen conditioned on keyboard actions, respectively, which both fundamentally differ from our task. + +# 3. Our Approach + +Let us now introduce our approach to action-driven stochastic human motion prediction. To represent a human in 3D, we adopt the SMPL model [34], which parametrizes a 3D human mesh in terms of shape and pose. Since we + +focus on human motion and not human identity, our model follows that of ACTOR [42] to only predict the pose parameters. The shape parameters are used for visualization only. Given an action label represented by a one-hot vector $\mathbf{a}$ and a sequence of $N$ past human poses represented by $\mathbf{X} = [\mathbf{x}_1,\mathbf{x}_2,\dots ,\mathbf{x}_N]\in \mathbb{R}^{K\times N}$ , where $\mathbf{x}_i\in \mathbb{R}^K$ is the pose in the $i$ -th frame, our goal is to predict a future motion $\hat{\mathbf{Y}} = [\hat{\mathbf{y}}_1,\hat{\mathbf{y}}_2,\dots ,\hat{\mathbf{y}}_T]\in \mathbb{R}^{K\times T}$ , with $\hat{\mathbf{y}}_i\in \mathbb{R}^K$ , representative of the given action label. To learn to predict transitions between different actions, as discussed in more detail below, we will train our model using data where $\mathbf{X}$ and the corresponding ground-truth future motion $\mathbf{Y}$ depict different actions. This will eventually allow us to predict future motions for sequences of action labels, by recursively treating the previous prediction as historical information. + +# 3.1. Action-driven Stochastic Motion Prediction + +To predict action-driven future motions, we design a model based on conditional VAEs (CVAEs) [24], whose goal is to model the conditional distribution $p(\mathbf{Y}|\mathbf{X},\mathbf{a})$ . Specifically, as shown in Fig. 2, we first model the posterior distribution $q_{\phi}(\mathbf{z}|\mathbf{Y},\mathbf{X},\mathbf{a})$ via a neural network, the encoder, where $\mathbf{z}$ is a latent random variable, and $\phi$ denotes the parameters of the encoder. From the latent variable $\mathbf{z}$ , the CVAE then aims to reconstruct the future motion $\mathbf{Y}$ using another neural network, the decoder, expressed as $p_{\theta}(\mathbf{Y}|\mathbf{z},\mathbf{X},\mathbf{a})$ , with parameters $\theta$ . The evidence lower bound (ELBO) of the conditional distribution $p(\mathbf{Y}|\mathbf{X},\mathbf{a})$ can then be written as + +$$ +\begin{array}{l} \log p (\mathbf {Y} | \mathbf {X}, \mathbf {a}) \geq \mathbb {E} _ {q _ {\phi} (\mathbf {z} | \mathbf {Y}, \mathbf {X}, \mathbf {a})} [ \log p _ {\theta} (\mathbf {Y} | \mathbf {z}, \mathbf {X}, \mathbf {a}) ] - \\ K L \left(q _ {\phi} (\mathbf {z} | \mathbf {Y}, \mathbf {X}, \mathbf {a}) \| p _ {\psi} (\mathbf {z} | \mathbf {X}, \mathbf {a})\right), \tag {1} \\ \end{array} +$$ + +where $p_{\psi}(\mathbf{z}|\mathbf{X},\mathbf{a})$ is the prior distribution of the latent variable $\mathbf{z}$ , modeled by a neural network with parameters $\psi$ and $KL(\cdot ||\cdot)$ is the KL divergence between two distributions. Training the CVAE then aims to maximize the log probability $\log p(\mathbf{Y}|\mathbf{X},\mathbf{a})$ by maximizing the ELBO. + +In practice, the KL divergence term in the ELBO can be computed as, + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {K L}} = K L (\mathcal {N} (\mu , \operatorname {d i a g} (\sigma^ {2})) \| \mathcal {N} (\hat {\mu}, \operatorname {d i a g} (\hat {\sigma} ^ {2}))) \\ = \frac {1}{2} \sum_ {i = 1} ^ {D} \left(\log \frac {\hat {\sigma} _ {i} {} ^ {2}}{\sigma_ {i} {} ^ {2}} + \frac {\sigma_ {i} ^ {2} + (\mu_ {i} - \hat {\mu} _ {i}) ^ {2}}{\hat {\sigma} _ {i} ^ {2}} - 1\right), \tag {2} \\ \end{array} +$$ + +where $\mathcal{N}(\mu, \mathrm{diag}(\sigma^2))$ and $\mathcal{N}(\hat{\mu}, \mathrm{diag}(\hat{\sigma}^2))$ are the posterior and prior distributions, whose means and standard deviations are produced by the encoder $q_{\phi}$ and the prior network $p_{\psi}$ , respectively, and $D$ is the dimension of $\mathbf{z}$ . + +During training, the random variable $\mathbf{z}$ is sampled from the posterior distribution via the reparameterization trick [24], i.e., $\mathbf{z} = \epsilon \odot \sigma + \mu$ , where $\epsilon \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$ . Given $\mathbf{z}$ , the past poses $\mathbf{X}$ and the action label $\mathbf{a}$ , the goal of decoder $p_{\theta}$ is to reconstruct the true future motion. This lets + +![](images/25f2d1b62481e322c22b64c3cc871b755858a0aed0cd0444227d8f056a552286.jpg) + +![](images/9d077d7e644fe5fcf3588f9d271265ed1aa30bfb8e90b280f88df99d067b5d73.jpg) +Figure 3. Network structure. We explore the use of two different temporal encoding structures to build our VAE: RNNs and Transformers. + +us express the (negative of the) first term of the ELBO as the reconstruction loss + +$$ +\mathcal {L} _ {\mathrm {r e c}} = \frac {1}{T} \sum_ {i = 1} ^ {T} \| \hat {\mathbf {y}} _ {i} - \mathbf {y} _ {i} \| _ {2} ^ {2}, \tag {3} +$$ + +where $\hat{\mathbf{Y}} = [\hat{\mathbf{y}}_1,\hat{\mathbf{y}}_2,\dots ,\hat{\mathbf{y}}_T]$ is the future motion generated by the decoder. + +Note that, during training, sampling $\mathbf{z}$ involves the encoder $q_{\phi}$ , which relies on the ground-truth motion $\mathbf{Y}$ . Since, at test time, the ground-truth future motion is unknown, we sample the random variable from the prior distribution. + +# 3.2. Weakly-supervised Transitions Learning + +Natural human movement involves transitions between different action categories. The ability to generate these transitions is therefore critical for the success and realism of human motion modeling methods. However, acquiring training data that covers all possible action transitions is virtually intractable, and thus existing human motion datasets typically contain motions depicting individual actions only, without any transitions. To nonetheless effectively leverage this data to learn action transitions, we create synthetic motions by combining historical motions from one action category with future motions from another. As these synthetic motions still do not contain realistic transitions, we introduce a weakly-supervised training strategy to learn to generate plausible transitions. + +More specifically, given a historical motion $\mathbf{X} = [\mathbf{x}_1,\mathbf{x}_2,\dots ,\mathbf{x}_N]$ from one action, we take motion $\mathbf{Y}' = [\mathbf{y}_1',\mathbf{y}_2',\dots ,\mathbf{y}_T']$ from another action to be the continuation of $\mathbf{X}$ after $T_{0}$ frames. However, both the number of frames $T_{0}$ and poses in these frames are unknown, and one cannot assume $T_{0}$ to be constant for any pair of historical and future motions. To address this, we define $T_{0}$ to be a function of the last pose of $\mathbf{X}$ and of the first one of $\mathbf{Y}'$ , i.e., $T_{0} = f(\mathbf{x}_{N},\mathbf{y}_{1}^{\prime})$ , where $f:\mathbb{R}^{K}\times \mathbb{R}^{K}\to \mathbb{N}$ . In practice, we found that a simple linear function suffices, and thus write $T_{0} = \lfloor k\| \mathbf{x}_{N} - \mathbf{y}_{1}^{\prime}\|_{2}\rfloor$ , where $k > 0$ is computed from the + +training data. Details about computing $k$ are provided in the supplementary material. + +To account for the fact that the poses within the transition sequence, namely poses for $T_{0}$ frames, are unknown, we leverage a simple temporal smoothness prior based on the intuition that the transition from $\mathbf{X}$ to $\mathbf{Y}'$ should form a smooth sequence. Inspired by [3, 20, 37], we make use of the Discrete Cosine Transform (DCT) to define our smoothness prior, exploiting the insight that a smooth trajectory can be accurately represented by low frequency DCT bases. More precisely, let $\hat{\mathbf{Y}} = [\hat{\mathbf{y}}_1,\hat{\mathbf{y}}_2,\dots ,\hat{\mathbf{y}}_{T_0 + T}]$ denote the prediction of our model. We first concatenate the last $L$ poses of the history and the first $L$ ones of the prediction to form a sequence of length $2L$ denoted by $\hat{\mathbf{Z}} = [\mathbf{x}_{N - L + 1},\mathbf{x}_{N - L + 2},\dots ,\mathbf{x}_N,\hat{\mathbf{y}}_1,\hat{\mathbf{y}}_2,\dots ,\hat{\mathbf{y}}_L]$ , where $L\leq N$ and $\hat{\mathbf{Z}}\in \mathbb{R}^{K\times 2L}$ . We then approximate this sequence with the first $M$ DCT bases as $\hat{\mathbf{Z}} = \hat{\mathbf{Z}}\mathbf{DD}^T$ , where $\mathbf{D}\in \mathbb{R}^{2L\times M}$ encodes the low-frequency DCT basis and $M\leq 2L$ . Given $\hat{\mathbf{Z}}$ and its approximation $\tilde{\mathbf{Z}}$ , we define our temporal smoothness prior as the loss + +$$ +\mathcal {L} _ {\text {s m o o t h}} = \frac {1}{2 L} \sum_ {i = 1} ^ {2 L} \| \hat {\mathbf {z}} _ {i} - \tilde {\mathbf {z}} _ {i} \| _ {2} ^ {2}, \tag {4} +$$ + +where $\hat{\mathbf{z}}_i$ and $\tilde{\mathbf{z}}_i$ are the $i$ -th pose in $\hat{\mathbf{Z}}$ and $\tilde{\mathbf{Z}}$ , respectively. + +Since we only have ground-truth supervision for the last $T$ predicted frames, we redefine the reconstruction loss as + +$$ +\mathcal {L} _ {\mathrm {r e c}} = \frac {1}{T} \sum_ {i = 1} ^ {T} \| \hat {\mathbf {y}} _ {T _ {0} + i} - \mathbf {y} _ {i} \| _ {2} ^ {2}. \tag {5} +$$ + +Note that our formulation still allows us to exploit data where $\mathbf{Y}'$ and $\mathbf{X}$ are from the same motion sequence by simply setting the corresponding $T_0$ to zero. + +Altogether, we express our complete training loss as + +$$ +\mathcal {L} = \lambda_ {\text {r e c}} \mathcal {L} _ {\text {r e c}} + \lambda_ {\text {s m o o t h}} \mathcal {L} _ {\text {s m o o t h}} + \mathcal {L} _ {\mathrm {K L}}, \tag {6} +$$ + +where $\lambda_{\mathrm{rec}}$ and $\lambda_{\mathrm{max}}$ are hyper-parameters setting the relative influence of the different terms. + +# 3.3. Variable-length Motion Prediction + +Generating sequences of variable length has been well-studied in the field of Natural Language Processing + +(NLP) [50], where the standard strategy consists of predicting a specific stop token. Here, instead of predicting a stop token, which is ill-defined for human motion, we simply encourage the model to generate static poses (the last pose of the ground-truth motion) after reaching the motion end during training. Specifically, we make the model generate $P$ additional frames, leading to a future sequence of $T_0 + T + P$ frames $(\hat{\mathbf{Y}} = [\hat{\mathbf{y}}_1,\hat{\mathbf{y}}_2,\dots ,\hat{\mathbf{y}}_{T + T_0 + P}])$ . We then supervise these additional frames with the last ground-truth future pose. Combining this with the normal supervision of the other frames yields the updated reconstruction loss + +$$ +\mathcal {L} _ {\mathrm {r e c}} = \frac {1}{T + P} \sum_ {i = 1} ^ {T + P} \| \hat {\mathbf {y}} _ {T _ {0} + i} - \mathbf {y} _ {i} \| _ {2} ^ {2}, \tag {7} +$$ + +During testing, as we do not know the length of the predicted future, we stop prediction when the variance of the last $Q$ consecutive frames falls below a threshold. Specifically, given the predicted future motion $\hat{\mathbf{Y}}$ , we compute, for $Q$ consecutive frames starting from the $i$ -th one, + +$$ +v _ {i} = \frac {1}{Q} \sum_ {j = i} ^ {i + Q} \| \hat {\mathbf {y}} _ {j} - \frac {1}{Q} \sum_ {k = i} ^ {i + Q} \hat {\mathbf {y}} _ {k} \| _ {2}, \tag {8} +$$ + +where $i \in [1,2,\dots,T_{\max} - Q]$ , and $T_{\max}$ is the maximum number of frames the model can predict. We stop the prediction at frame $i$ if $v_{i} < \delta$ . + +# 3.4. Network Structure + +To show the generality of our approach, we exploit it using two different temporal encoding structures, namely, Recurrent Neural Networks (RNNs) and Transformers [50]. + +For our RNN-based model, shown in Fig 3 (a), we build the encoder $q_{\phi}$ , the prior $p_{\psi}$ and the decoder $p_{\theta}$ using Gated Recurrent Units (GRUs). In particular, the encoder $q_{\phi}$ first uses GRUs to encode the historical human poses $\mathbf{X}$ and the future human motion $\mathbf{Y}$ to temporal features. These temporal features concatenated with the action token obtained from a fully connected layer are then fed into a fully connected network that predicts the parameters (the mean $\mu$ and the standard deviations $\sigma$ ) of the posterior distribution. The prior network produces the parameters (the mean $\hat{\mu}$ and the standard deviations $\hat{\sigma}$ ) of the prior distributions in a similar manner. Given the latent code $\mathbf{z}$ sampled from either the posterior (during training) or the prior (during testing), the temporal features of the historical motion $\mathbf{X}$ and the action label $\mathbf{a}$ , the decoder again uses GRUs to predict the future poses in an autoregressive manner. + +We show our Transformer-based model in Fig. 3 (b). For the encoder and prior network, we adopt the same strategy as [42], which was inspired by BERT [11] in NLP and ViT [12] in Computer Vision. In particular, we append two extra tokens obtained from the action label a to aggregate temporal information to predict the parameters of the posterior and prior distributions. For the decoder, we pad + +the historical human motion with its last pose, forming a longer sequence, and then input the padded sequence to the Transformer-based decoder that outputs the future motion. To introduce the action information and the latent random code as conditions, we further use the pseudo self attention strategy proposed in [58]. + +# 4. Experiments + +# 4.1. Datasets + +We evaluate our method on three different datasets. Each motion sequence in these datasets is annotated with a single action label, except for BABEL [43]. Some information for each dataset is provided in Table 1. We also evaluate on the dataset HumanAct12 [17]. The results are in the supplementary material. + +
Datasetmotion len.traintesttransi.action
GRAB [7,47]100-501114931904
NTU RGBD [33,44]35-2013399361013
BABEL [43]30-30096433477258420
+ +Table 1. Datasets' details. We list the range of motion length in frames, the number of training/testing samples, the number of training samples with action transitions and the number of actions in each dataset. + +GRAB [7, 47] consists of 10 subjects interacting with 51 different objects, performing 29 different actions. Since, for most actions, the number of samples is too small for training, we choose the four action categories with the most motion samples, i.e., Pass, Lift, Inspect and Drink. We use 8 subjects (S1-S6, S9, S10) for training and the remaining 2 subjects (S7, S8) for testing. In all cases, we remove the global translation. The original frame rate is $120\mathrm{Hz}$ . To further enlarge the size of the dataset, we downsample the sequences to $15 - 30\mathrm{Hz}$ . Our model is trained to observe 25 frames to predict the future. The observed frames and the future ones are from either the same or different motions. + +NTU RGB-D [33, 44] (NTU). We use the subset of 13 actions of [17], with noisy SMPL parameters estimated by VIBE [25]. As for GRAB, we remove the global translation. While [17] used all the data for training, we split the dataset into training and testing by subjects. Our model is trained to observe 10 past frames. + +BABEL [43] is a subset of the AMASS dataset [35] with per-frame action annotations. Since there are multiple action labels in one motion sequence, we split the dataset into two parts: single-action sequences and sequences that depict transitions between two actions. We downsample all motion sequences to $30\mathrm{Hz}$ . For single-action motions, we first divide the long motions into several short ones. Each short motion performs one single action. and the remove sequences that are too short $(< 1$ second). We also eliminate the action labels with too few samples $(< 60)$ or overlap with other actions, e.g. foot movement sequences some + +times overlap with kicking. This leaves us with 20 action labels. We complement this data with the sequences with transitions that contain these 20 actions. During training, our model observes 10 past frames to predict the future. + +# 4.2. Evaluation Metrics and Baseline + +Metrics. We follow the similar evaluation protocol as for human motion synthesis/prediction [17, 42, 56] and employ the following metrics to evaluate our method. + +(1) To measure the distribution similarity between the generated sequences and the ground-truth motions, we adopt the Fréchet Inception Distance (FID) [19] + +$$ +\begin{array}{l} F I D = \left\| \mu_ {\mathrm {g e n}} - \mu_ {\mathrm {g t}} \right\| ^ {2} \\ + T r \left(\Sigma_ {\text {g e n}} + \Sigma_ {\mathrm {g t}} - 2 \left(\Sigma_ {\text {g e n}} \Sigma_ {\mathrm {g t}}\right) ^ {1 / 2}\right), \tag {9} \\ \end{array} +$$ + +where $\mu_{\cdot}\in \mathbb{R}^{F}$ and $\Sigma_{\cdot}\in \mathbb{R}^{F\times F}$ are the mean and covariance matrix of perception features obtained from a pretrained action recognition model, with $F$ the dimension of the perception features. The detail of the action recognition model is included in the supplementary material. $Tr(\cdot)$ computes the trace of a matrix. + +(2) To evaluate motion realism, we report the action recognition accuracy of the generated motions using the same pretrained action recognition model as above. +(3) To evaluate per-action diversity, we measure the pairwise distance between the multiple future motions generated from the same historical motion and action label1. Specifically, given a set of future motions $\{\hat{\mathbf{Y}}^i\}_{i=1}^S$ predicted by our model, the diversity is computed as + +$$ +D i v = \frac {2}{S (S - 1)} \sum_ {i = 1} ^ {S} \sum_ {j = i + 1} ^ {S} \frac {1}{T _ {\max }} \sum_ {k = 1} ^ {T _ {\max }} \| \hat {\mathbf {y}} _ {k} ^ {i} - \hat {\mathbf {y}} _ {k} ^ {j} \| _ {2}, \tag {10} +$$ + +where $T_{\mathrm{max}}$ is the maximum number of frames our model can predict, and $\hat{\mathbf{y}}_k^i$ represents the $k$ -th frame of motion $\hat{\mathbf{Y}}^i$ . + +To calculate above mentioned diversity, we assume that the model generates the maximum number of future frames in all cases. To further evaluate the diversity across variable length future motions, we compute the average per-action diversity after performing Dynamic Time Warping (DTW) [57] With a minor abuse of notation, let $\{\hat{\mathbf{Y}}^i\}_{i = 1}^S$ denote the set of variable length predictions. DTW then temporally aligns any pair of motions as $\tilde{\mathbf{Y}}^i,\tilde{\mathbf{Y}}^j =$ $DTW(\hat{\mathbf{Y}}^i,\hat{\mathbf{Y}}^j)$ , where $\tilde{\mathbf{Y}}^i$ and $\tilde{\mathbf{Y}}^j\in \mathbb{R}^{K\times T_{i,j}}$ have the same number of frames $(T_{i,j})$ . We then compute the diversity after DTW as + +$$ +D i v _ {\mathrm {w}} = \frac {2}{S (S - 1)} \sum_ {i = 1} ^ {S} \sum_ {j = i + 1} ^ {S} \frac {1}{T _ {i , j}} \sum_ {k = 1} ^ {T _ {i, j}} \| \tilde {\mathbf {y}} _ {k} ^ {i} - \tilde {\mathbf {y}} _ {k} ^ {j} \| _ {2}. \tag {11} +$$ + +(4) To measure the prediction accuracy, we adopt the Average Displacement Error (ADE) computed as + +$$ +A D E = \min _ {i} \frac {1}{T} \sum_ {k = 1} ^ {T} \| \hat {\mathbf {y}} _ {k} ^ {i} - \mathbf {y} _ {k} \| _ {2}, \tag {12} +$$ + +where $T$ is the length of the ground-truth future motion, $\hat{\mathbf{y}}_k^i$ is the $k$ -th frame of the $i$ -th sample generated by the model + +with the ground-truth action label $^2$ and $\mathbf{y}_k$ the corresponding ground truth. Similarly to the diversity, we report the ADE after DTW $(ADE_{\mathrm{w}})$ . + +Baselines. Since there is no prior work that tackles the task we introduce, we adapt the state-of-the-art action-specific human motion synthesis methods, Action2Motion [17], ACTOR [42], and stochastic human motion prediction method, DLow [56], to our task. Action2Motion [17] relies on a frame-wise motion VAE with GRUs to encode the temporal information. We adapt their VAE so as to take the temporal feature of historical poses as an additional input for both encoding and decoding. This temporal feature is extracted from a GRU-based temporal data encoding module. Similarly, we modify the transformer decoder of ACTOR [42] to condition it on the historical motion. Furthermore, we adapt the VAE in DLow [56] to take the action label as input. + +Implementation details. We implement our models in Pytorch [40] and train them using the ADAM [23] optimizer for 500 epochs. We use different hyperparameters for different models. In particular, for RNN-based model, the initial learning rate is 0.001 on BABEL and 0.002 on all the other datasets. We set the loss weights $(\lambda_{\mathrm{rec}},\lambda_{\mathrm{smooth}})$ to (50.0, 10.0) for BABEL dataset and (100.0,100.0) for all the other ones. For Transformer-based model, the initial learning rate is 0.0001 on BABEL and 0.0005 on all the other datasets. The loss weights $(\lambda_{\mathrm{rec}},\lambda_{\mathrm{smooth}})$ are set to (100.0, 10.0) for BABEL dataset and (1000.0,100.0) for all the other ones. Additional details are in the supplementary material. + +# 4.3. Results + +Quantitative results. In Table 2, we compare our results with those of baselines on GRAB, NTU RGB-D and BABEL. Given a past motion, all models predict multiple future motions conditioned on any given action label. Our approach, based on either RNNs or Transformers, outperforms the baselines on almost all metrics. In general, the RNN-based model performs better than the Transformer-based one. We expect this to be due to the datasets being too small to train the Transformer-based model from scratch. + +In Table 3, we compare the prediction accuracy (ADE, $ADE_{\mathrm{w}}$ ) of our results with the baselines. Here, for each past motion, each model predicts multiple future motions using the ground-truth action label. The prediction accuracy (ADE) is then computed based on the future motion yielding the minimum error. Because our model is trained to predict not only the ground-truth future but also motions with different action labels, it may sacrifice some accuracy when evaluated on the ground-truth future only, as on NTU and BABEL. + +During training, our model only takes one action label + +![](images/1a11986da809ac825d404ece36aa2634beead3693ba9082af2f6e437f5b39dd9.jpg) +Figure 4. Results on NTU RGB-D. Given the same history (pink), our model can generate future motions (yellow) of different actions, e.g., "Pickup" (top left) or "Throw" (top right). Moreover, it can also generate motions depicting a sequence of multiple actions (bottom). + +
MethodAcc↑FIDtr↓FIDte↓Divw↑Div↑
GRABAct2Mot [17]70.6±1.380.22±6.6447.81±1.090.50±0.000.76±0.01
DLow [56]67.6±0.7127.49±6.9022.71±2.790.74±0.010.92±0.01
ACTOR [42]83.0±0.362.68±1.26114.85±3.461.06±0.001.04±0.00
Ours (RNN)92.6±0.644.59±1.3938.03±1.491.10±0.011.37±0.01
Ours (Tran.)85.5±1.248.58±3.0525.72±2.161.05±0.011.08±0.01
NTUAct2Mot [17]66.3±0.2144.98±2.44113.61±0.840.75±0.011.19±0.01
DLow [56]70.6±0.2151.11±1.25157.54±1.620.97±0.001.21±0.00
ACTOR [42]66.3±0.1355.69±5.74193.58±2.911.84±0.002.07±0.00
Ours (RNN)76.0±0.272.18±0.93111.01±1.281.25±0.002.20±0.00
Ours (Tran.)71.3±0.283.14±1.74114.62±0.931.25±0.002.19±0.01
BABELAct2Mot [17]14.8±0.242.02±0.4037.41±0.470.79±0.011.10±0.01
DLow [56]12.7±0.227.99±0.4524.18±0.590.65±0.000.90±0.00
ACTOR [42]40.9±0.229.34±0.1030.31±0.162.94±0.002.71±0.00
Ours (RNN)49.6±0.422.54±0.2722.39±0.361.35±0.001.74±0.00
Ours (Tran.)39.5±0.320.02±0.2419.41±0.351.39±0.001.82±0.01
+ +and a motion history as input. During testing, to predict future motions for a sequence of action labels of arbitrary length, we follow a recursive strategy. We evaluate this in the case of 5-action sequences. Specifically, we randomly sampled sequences of 5 action labels to generate future motions in an autoregressive manner, and report the results at each prediction step, i.e., corresponding to each action label. The results shown in Table 4 indicate that our model remains stable. Note that the performance gap between the 1st and 2nd step on NTU may be caused by the fact that our model is trained with the jittery "ground-truth" NTU motion history, while at the 2nd step, it starts taking as input the smooth motion predicted during the 1st step. + +Qualitative results. In Fig. 1, we show diverse futures generated by our model on GRAB given the same past motion and the same action sequence. Additional qualitative results on the NTU RGB-D dataset are provided in Fig. 4. Given the same historical poses, our model can generate futures of different actions and sequences of multiple actions. More results are provided in the supplementary material. + +Trajectory smoothness. We also compare the trajectories produced by different models in Fig. 5 (a). The motions predicted by Action2Motion [17] suffer from heavy + +Table 2. Quantitative results. We report the action recognition accuracy (Acc), the FID to training data $(FID_{\mathrm{tr}})$ and to the testing split $(FID_{\mathrm{te}})$ , and the diversity before $(Div)$ and after DTW $(Div_{\mathrm{w}})$ . We adapt Action2Motion [17], ACTOR [42] and DLow [56] to our task. + +
MethodGRABNTUBABEL
ADEw↓ADE↓ADEw↓ADE↓ADEw↓ADE↓
Act2Mot [17]1.92±0.032.28±0.030.78±0.011.11±0.011.25±0.021.27±0.01
DLow [56]1.78±0.031.96±0.030.95±0.011.20±0.011.10±0.011.19±0.01
ACTOR [42]2.41±0.022.57±0.021.26±0.011.49±0.012.19±0.022.29±0.02
Ours (RNN)1.73±0.021.93±0.030.89±0.011.20±0.011.31±0.001.47±0.01
Ours (Tran.)1.69±0.021.93±0.030.84±0.011.23±0.011.24±0.011.40±0.02
+ +Table 3. Results of prediction accuracy Our model may trade some performance with GT action label for the ability of predicting future motion of different action labels. + +
MetricsPrediction Step
1st2nd3rd4th5th
GRABAcc↑92.6±0.694.3±0.693.4±0.993.5±0.692.6±1.0
FIDt↓44.59±1.3931.45±6.7331.53±6.3638.92±6.3143.14±10.25
FIDt↓38.03±1.4974.85±13.8491.65±7.21111.36±24.36117.30±13.99
Divw↑1.10±0.011.31±0.011.33±0.011.32±0.031.34±0.01
Div↑1.37±0.011.60±0.011.62±0.021.61±0.031.64±0.02
NTUAcc↑76.0±0.261.9±0.761.4±0.760.6±0.660.1±0.6
FIDt↓72.18±0.93219.08±13.68248.21±13.65243.57±7.11240.40±11.43
FIDt↓111.01±1.28286.82±10.15334.42±16.71334.94±4.53316.87±13.28
Divw↑1.25±0.001.22±0.021.23±0.011.22±0.021.21±0.01
Div↑2.20±0.002.16±0.042.18±0.012.17±0.042.15±0.02
BABELAcc↑49.6±0.454.4±1.053.8±1.055.0±1.654.4±1.7
FIDt↓22.54±0.2727.75±1.0527.98±0.5428.10±0.5228.27±0.42
FIDt↓22.39±0.3627.97±0.9928.06±0.6028.32±0.6528.55±0.51
Divw↑1.35±0.001.32±0.021.31±0.011.29±0.011.30±0.01
Div↑1.74±0.001.71±0.021.69±0.011.67±0.011.68±0.02
+ +Table 4. Results on prediction with action label sequences. Our model achieves stable performance at each prediction step. + +jitter, especially during the transition between the historical motion and the predicted one (as highlighted by the red circle). The reason is that Action2Motion employs a frame-wise random code, thus making the input to the decoder vary significantly across the frames. Note that this jitter makes our variance-based stopping criterion inapplicable to Action2Motion. We therefore tested different stopping strategies, detailed in the supplementary material, and report the one that gave the best results. When comparing our two models, we found the RNN-based one to produce smoother future motions than the Transformer-based one. + +# 4.4. Ablation Study + +To provide a deeper understanding of our model, we evaluate the influence of its two main components, i.e., encouraging the model to predict static poses at the end of the sequence, which we refer to as "padding", and weakly-supervised action transition learning ("weakly-sup"). The results are shown in Table 5. In general, the model with + +![](images/a33991a211e2141fec1a88864224f6966ad65a1009236b74b96a40683672810f.jpg) +(a) Action2Motion v.s. Ours + +![](images/f6c2165036001a4a74a4393f5dc1c4304ef918adc7252a052709dd75db0a5850.jpg) +(b) Ours w/ padding v.s. w/o padding +Figure 5. Motion trajectories. (a) The trajectories from our model are smoother than those of Action2Motion [17]. (b) The trajectories from our model without "padding" either are unstable (top), or do not converge to static poses (bottom). + +
MethodAcc↑FIDtr↓FIDtc↓Divw↑Div↑
GRABRNNw/o padding88.4±0.632.74±0.9545.61±1.621.14±0.01
w/o weakly-sup74.2±0.893.84±1.2911.42±1.260.20±0.00
w/ both92.6±0.644.59±1.3938.03±1.491.10±0.01
Tran.w/o padding80.4±0.546.38±1.4544.63±1.191.23±0.01
w/o weakly-sup48.7±0.8184.86±3.4823.03±1.290.01±0.00
w/ both85.5±1.248.58±3.0525.72±2.161.05±0.01
NTURNNw/o padding70.1±0.2119.25±0.95215.69±2.431.34±0.00
w/o weakly-sup73.6±0.3107.88±2.24114.00±0.710.53±0.00
w/ both76.0±0.272.18±0.93111.01±1.281.25±0.00
Tran.w/o padding69.1±0.1101.22±1.65118.44±2.071.21±0.00
w/o weakly-sup64.7±0.2216.56±2.96264.92±6.270.02±0.00
w/ both71.3±0.283.14±1.74114.62±0.931.25±0.00
BABELRNNw/o padding46.3±0.239.08±0.2137.33±0.291.54±0.00
w/o weakly-sup15.6±0.117.67±0.4115.57±0.410.05±0.00
w/ both49.6±0.422.54±0.2722.39±0.361.35±0.00
Tran.w/o padding37.8±0.328.70±0.3127.64±0.451.38±0.00
w/o weakly-sup12.3±0.220.76±0.2617.62±0.460.01±0.00
w/ both39.5±0.320.02±0.2419.41±0.351.39±0.00
+ +Table 5. Ablation studies on generating additional static frames for variable length prediction (padding) and weakly-supervised action transition learning (weakly-sup). Note that, without "weakly-sup", the Transformer-based models suffer from mode collapse, leading to very low motion diversity. + +
MethodAcc↑FIDtr↓FIDte↓Divw↑Div↑
RNNw/o both15.6±0.117.67±0.4115.57±0.410.05±0.000.09±0.00
w/gt-transi16.4±0.421.28±0.3118.83±0.340.07±0.000.11±0.00
w/ weakly-sup49.6±0.422.54±0.2722.39±0.361.35±0.001.74±0.00
w/ both48.4±0.522.70±0.2322.47±0.331.31±0.001.71±0.01
Tran.w/o both12.3±0.220.76±0.2617.62±0.460.01±0.000.01±0.00
w/gt-transi13.0±0.320.40±0.3717.56±0.480.01±0.000.01±0.00
w/ weakly-sup39.5±0.320.02±0.2419.41±0.351.39±0.001.82±0.01
w/ both38.5±0.320.79±0.2720.12±0.391.41±0.001.86±0.01
+ +Table 6. Ablation studies on training with ground truth transition v.s. our weakly-supervised action transition learning. + +both components achieves the best performance across all datasets for both temporal encoding structures. Although the numerical results of the models without padding are close to those with padding, we observed the trajectories generated by such models to occasionally either be unstable (RNN-based model) or not converge to a static pose (Transformer-based model), as shown in Fig. 5 (b). Without our weakly-supervised transition learning, the models often fail to produce diverse future motions and the Transformer-based model suffers from mode collapse. + +Finally, we compare the performance of using the ground-truth transitions ("gt-transi") to that of our weakly- + +supervised strategy ("weakly-sup") on BABEL in Table 6. Since the limited ground-truth transitions in BABEL do not cover all possible cases, using them as supervision is ineffective. Specifically, as shown in Table 1, there are only around 2500 ground-truth transition sequences, depicting 170 types of transitions. By contrast, our weakly-supervised strategy leverages almost 100,000 pseudo transitions covering all 380 possible types. This further evidences the importance of our weakly-supervised action transition learning strategy. + +# 5. Conclusion + +In this paper, we have introduced the task of action-driven stochastic human motion prediction, which aims to predict future trajectories of a given action category. Since it is unrealistic to expect a human motion dataset to include all possible action transitions, we have introduced a weakly-supervised training procedure to learn those transitions from a dataset with only a single action label per sequence. Furthermore, we have introduced a variance-based strategy to produce motions of variable length. Our current model can only generate motions of actions observed in the training set, thus not allowing us to explore novel actions at test time. We will seek to address this in our future work. + +# Limitations & Negative Societal Impacts + +One limitation of our work arises from the fact that our model does not predict global translations. The human movements include local body motions and global translations. However, without scene context, we cannot ensure a valid global translation. For example, a "sit" motion needs to result in sitting on a chair (or something) of the scene. + +A potential risk of applying our method to real scenario is that, without considering the scene context, the predicted human motions can lead to unsafe situations, such as collision. We recommend to validate the outputs of our model w.r.t. the environment before applying them to robots/agents. + +# Acknowledgements + +This research was supported in part by the Australia Research Council DECRA Fellowship (DE180100628) and ARC Discovery Grant (DP200102274). The authors would like to thank NVIDIA for the donated GPU (Titan V). + +# References + +[1] Yazan Abu Farha, Alexander Richard, and Juergen Gall. When will you do what?-anticipating temporal occurrences of activities. In CVPR, pages 5343-5352, 2018. 3 +[2] Chaitanya Ahuja and Louis-Philippe Morency. Language2pose: Natural language grounded pose forecasting. In 3DV, pages 719–728. IEEE, 2019. 2, 3 +[3] Ijaz Akhter, Yaser Sheikh, Sohaib Khan, and Takeo Kanade. Nonrigid structure from motion in trajectory space. In NeurIPS, pages 41-48, 2009. 4 +[4] Emre Aksan, Manuel Kaufmann, and Otmar Hilliges. Structured prediction helps 3d human motion modelling. In ICCV, pages 7144-7153, 2019. 2 +[5] Sadegh Aliakbarian, Fatemeh Sadat Saleh, Mathieu Salzmann, Lars Petersson, and Stephen Gould. A stochastic conditioning scheme for diverse human motion prediction. In CVPR, pages 5223-5232, 2020. 1, 2 +[6] Emad Barsoum, John Kender, and Zicheng Liu. Hp-gan: Probabilistic 3d human motion prediction via gan. In CVPRW, pages 1418-1427, 2018. 2 +[7] Samarth Brahmbhatt, Cusuh Ham, Charles C. Kemp, and James Hays. ContactDB: Analyzing and predicting grasp contact via thermal imaging. In CVPR, 2019. 5 +[8] Matthew Brand and Aaron Hertzmann. Style machines. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 183-192. ACM Press/Addison-Wesley Publishing Co., 2000. 1 +[9] Judith Butepage, Michael J. Black, Danica Kragic, and Hedvig Kjellstrom. Deep representation learning for human motion prediction and classification. In CVPR, July 2017. 2 +[10] Yujun Cai, Lin Huang, Yiwei Wang, Tat-Jen Cham, Jianfei Cai, Junsong Yuan, Jun Liu, Xu Yang, Yiheng Zhu, Xiaohui Shen, et al. Learning progressive joint propagation for human motion prediction. In ECCV, pages 226-242. Springer, 2020. 2 +[11] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. NAACL-HLT, 2019. 5 +[12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021. 5 +[13] Katerina Fragkiadaki, Sergey Levine, Panna Felsen, and Jitendra Malik. Recurrent network models for human dynamics. In ICCV, pages 4346-4354, 2015. 1, 2 +[14] Ian J Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014. 2 +[15] Anand Gopalakrishnan, Ankur Mali, Dan Kifer, Lee Giles, and Alexander G Ororbia. A neural temporal model for human motion prediction. In CVPR, pages 12116-12125, 2019. 2 +[16] Liang-Yan Gui, Yu-Xiong Wang, Xiaodan Liang, and José MF Moura. Adversarial geometry-aware human motion prediction. In ECCV, pages 786-803, 2018. 2 + +[17] Chuan Guo, Xinxin Zuo, Sen Wang, Shihao Zou, Qingyao Sun, Annan Deng, Minglun Gong, and Li Cheng. Action2motion: Conditioned generation of 3d human motions. In Proceedings of the 28th ACM International Conference on Multimedia, pages 2021-2029, 2020. 1, 2, 3, 5, 6, 7, 8 +[18] Alejandro Hernandez, Jurgen Gall, and Francesc Moreno-Noguer. Human motion prediction via spatio-temporal inpainting. In ICCV, pages 7134-7143, 2019. 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 NeurIPS, 2017. 6 +[20] Yinghao Huang, Federica Bogo, Christoph Lassner, Angjoo Kanazawa, Peter V Gehler, Javier Romero, Ijaz Akhter, and Michael J Black. Towards accurate marker-less human shape and pose estimation over time. In 3DV, pages 421-430. IEEE, 2017. 4 +[21] Ashesh Jain, Amir Roshan Zamir, Silvio Savarese, and Ashutosh Saxena. Structural-rnn: Deep learning on spatiotemporal graphs. In CVPR, pages 5308-5317, 2016. 1, 2 +[22] Seung Wook Kim, Yuhao Zhou, Jonah Philion, Antonio Torralba, and Sanja Fidler. Learning to simulate dynamic environments with gamean. In CVPR, pages 1231-1240, 2020. 3 +[23] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. *ICLR*, 2015. 6 +[24] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 2, 3 +[25] Muhammed Kocabas, Nikos Athanasiou, and Michael J Black. Vibe: Video inference for human body pose and shape estimation. In CVPR, pages 5253-5263, 2020. 5 +[26] Hema Swetha Koppula and Ashutosh Saxena. Anticipating human activities for reactive robotic response. In IROS, page 2071. Tokyo, 2013. 1 +[27] Jogendra Nath Kundu, Maharshi Gor, and R Venkatesh Babu. Bihmp-gan: Bidirectional 3d human motion prediction gan. In AAAI, volume 33, pages 8553-8560, 2019. 2 +[28] Hsin-Ying Lee, Xiaodong Yang, Ming-Yu Liu, Ting-Chun Wang, Yu-Ding Lu, Ming-Hsuan Yang, and Jan Kautz. Dancing to music. NeurIPS, 2019. 2, 3 +[29] Chen Li, Zhen Zhang, Wee Sun Lee, and Gim Hee Lee. Convolutional sequence to sequence model for human dynamics. In CVPR, pages 5226-5234, 2018. 2 +[30] Jiaman Li, Yihang Yin, Hang Chu, Yi Zhou, Tingwu Wang, Sanja Fidler, and Hao Li. Learning to generate diverse dance motions with transformer. arXiv preprint arXiv:2008.08171, 2020. 2, 3 +[31] Ruilong Li, Shan Yang, David A Ross, and Angjoo Kanazawa. Learn to dance with aist++: Music conditioned 3d dance generation. arXiv preprint arXiv:2101.08779, 2021.2.3 +[32] Xiao Lin and Mohamed R Amer. Human motion modeling using dvgens. arXiv preprint arXiv:1804.10652, 2018. 2, 3 +[33] Jun Liu, Amir Shahroudy, Mauricio Perez, Gang Wang, Ling-Yu Duan, and Alex C Kot. Ntu rgb+ d 120: A large-scale benchmark for 3d human activity understanding. TPAMI, 42(10):2684-2701, 2019. 5 + +[34] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. SMPL: A skinned multi-person linear model. ACM Trans. Graphics (Proc. SIGGRAPH Asia), 34(6):248:1-248:16, Oct. 2015. 3 +[35] Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, and Michael J. Black. Amass: Archive of motion capture as surface shapes. In ICCV, Oct 2019. 5 +[36] Wei Mao, Miaomiao Liu, and Mathieu Salzmann. History repeats itself: Human motion prediction via motion attention. In ECCV, pages 474-489. Springer, 2020. 1, 2 +[37] Wei Mao, Miaomiao Liu, Mathieu Salzmann, and Hongdong Li. Learning trajectory dependencies for human motion prediction. In ICCV, pages 9489-9497, 2019. 2, 4 +[38] Julieta Martinez, Michael J. Black, and Javier Romero. On human motion prediction using recurrent neural networks. In CVPR, July 2017. 2 +[39] Dirk Ormoneit, Michael J Black, Trevor Hastie, and Hedvig Kjellström. Representing cyclic human motion using functional analysis. Image and Vision Computing, 23(14):1264-1276, 2005. 2 +[40] 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 NeurIPS-W, 2017. 6 +[41] Dario Pavllo, David Grangier, and Michael Auli. Quaternet: A quaternion-based recurrent model for human motion. In BMVC, 2018. 2 +[42] Mathis Petrovich, Michael J. Black, and Gül Varol. Action-conditioned 3D human motion synthesis with transformer VAE. In ICCV, pages 10985-10995, October 2021. 1, 2, 3, 5, 6, 7 +[43] Abhinanda R. Punnakkal, Arjun Chandrasekaran, Nikos Athanasiou, Alejandra Quiros-Ramirez, and Michael J. Black. BABEL: Bodies, action and behavior with english labels. In CVPR, June 2021. 2, 5 +[44] Amir Shahroudy, Jun Liu, Tian-Tsong Ng, and Gang Wang. Ntu rgb+ d: A large scale dataset for 3d human activity analysis. In CVPR, pages 1010-1019, 2016. 5 +[45] Eli Shlizerman, Lucio Dery, Hayden Schoen, and Ira Kemelmacher-Shlizerman. Audio to body dynamics. In CVPR, pages 7574-7583, 2018. 2, 3 +[46] Sebastian Starke, He Zhang, Taku Komura, and Jun Saito. Neural state machine for character-scene interactions. ACM Trans. Graph., 38(6):209-1, 2019. 1 +[47] Omid Taheri, Nima Ghorbani, Michael J. Black, and Dimitrios Tzionas. GRAB: A dataset of whole-body human grasping of objects. In ECCV, 2020. 5 +[48] Raquel Urtasun, David J Fleet, and Neil D Lawrence. Modeling human locomotion with topologically constrained latent variable models. In Workshop on Human Motion, pages 104-118. Springer, 2007. 2 +[49] Herwin Van Welbergen, Ben JH Van Basten, Arjan Egges, Zs M Ruttkay, and Mark H Overmars. Real time animation of virtual humans: a trade-off between naturalness and control. In Computer Graphics Forum, volume 29, pages 2530-2554. Wiley Online Library, 2010. 1 + +[50] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, pages 5998-6008, 2017. 3, 5 +[51] Jacob Walker, Kenneth Marino, Abhinav Gupta, and Martial Hebert. The pose knows: Video forecasting by generating pose futures. In ICCV, pages 3332-3341, 2017. 2 +[52] Borui Wang, Ehsan Adeli, Hsu-kuang Chiu, De-An Huang, and Juan Carlos Niebles. Imitation learning for human pose prediction. In ICCV, pages 7124-7133, 2019. 2 +[53] Yaohui Wang, Piotr Bilinski, Francois Bremond, and Antitza Dantcheva. Imaginator: Conditional spatio-temporal gan for video generation. In WACV, pages 1160-1169, 2020. 3 +[54] Xinchen Yan, Akash Rastogi, Ruben Villegas, Kalyan Sunkavalli, Eli Shechtman, Sunil Hadap, Ersin Yumer, and Honglak Lee. Mt-vae: Learning motion transformations to generate multimodal human dynamics. In ECCV, pages 265–281, 2018. 2 +[55] Ceyuan Yang, Zhe Wang, Xinge Zhu, Chen Huang, Jianping Shi, and Dahua Lin. Pose guided human video generation. In ECCV, pages 201-216, 2018. 3 +[56] Ye Yuan and Kris Kitani. Dlow: Diversifying latent flows for diverse human motion prediction. In ECCV, pages 346-364. Springer, 2020. 1, 2, 6, 7 +[57] Jason Y Zhang, Panna Felsen, Angjoo Kanazawa, and Jitendra Malik. Predicting 3d human dynamics from video. In ICCV, pages 7114-7123, 2019. 6 +[58] Zachary M Ziegler, Luke Melas-Kyriazi, Sebastian Gehrmann, and Alexander M Rush. Encoder-agnostic adaptation for conditional language generation. arXiv preprint arXiv:1908.06938, 2019. 5 \ No newline at end of file diff --git a/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/images.zip b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ee6e04c1dd7984a1ca4a67a974b7c367038c7305 --- /dev/null +++ b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50fb7a21c4ac7f6931b427c60c1e33ea16a4e0b4a0faa48b295f6c9e1d002791 +size 597190 diff --git a/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/layout.json b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..002cda068c8911d5a704005be2c40533a67afa63 --- /dev/null +++ b/weaklysupervisedactiontransitionlearningforstochastichumanmotionprediction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c4a4613bfdb342d7aea550ae9e79a88af832e3bbc9ddd148ac090f126dd4e09 +size 452753 diff --git a/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_content_list.json b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..702227b51ce2787ddccac467bc628e23d84466ad --- /dev/null +++ b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9936d2aad5021c0732289fb44d664b1aabb50228d201c446ff5edb423a1f326 +size 88820 diff --git a/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_model.json b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d76a242a7caec85db944891f83cbdff125e626c3 --- /dev/null +++ b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df7f2b10aff9393b05a8697db68abae287ec82bc1218cec04ca4c3466ae49ea9 +size 112397 diff --git a/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_origin.pdf b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cd7dcfa3ae7a0d0d298ac7633040a22dc3f76ffb --- /dev/null +++ b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/9fe512c5-9474-488c-a8db-c885b7ad0c65_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2ff40266daac2fe32ea2ecd152484ee096d925f3a5a3464239a7bb5d224150c +size 1185504 diff --git a/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/full.md b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e0f759a6aaa1c1a4e115c5b65c885a63ad44b17e --- /dev/null +++ b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/full.md @@ -0,0 +1,320 @@ +# Weakly-Supervised Generation and Grounding of Visual Descriptions with Conditional Generative Models + +Effrosyni Mavroudi and René Vidal + +Mathematical Institute for Data Science, Dept. of Biomedical Engineering, Johns Hopkins University + +{emavroul, rvidal}@jhu.edu + +# Abstract + +Given weak supervision from image- or video-caption pairs, we address the problem of grounding (localizing) each object word of a ground-truth or generated sentence describing a visual input. Recent weakly-supervised approaches leverage region proposals and ground words based on the region attention coefficients of captioning models. To predict each next word in the sentence they attend over regions using a summary of the previous words as a query, and then ground the word by selecting the most attended regions. However, this leads to sub-optimal grounding, since attention coefficients are computed without taking into account the word that needs to be localized. To address this shortcoming, we propose a novel Grounded Visual Description Conditional Variational Autoencoder (GVD-CVAE) and leverage its latent variables for grounding. In particular, we introduce a discrete random variable that models each word-to-region alignment, and learn its approximate posterior distribution given the full sentence. Experiments on challenging image and video datasets (Flickr30k Entities, YouCook2, ActivityNet Entities) validate the effectiveness of our conditional generative model, showing that it can substantially outperform soft-attention-based baselines in grounding. + +# 1. Introduction + +Linking words to visual regions provides a fine-grained bridge between vision and language modalities and is a fundamental block of many applications, such as human-robot interaction [57, 60], visual question answering [27, 61], and even unsupervised neural machine translation [58]. Thus, visual grounding has become a prominent research area at the intersection of vision and language [12, 16, 29, 51]. Training visual grounding systems typically requires annotations of textual descriptions combined with bounding boxes for each groundable word (e.g., object nouns). Since constructing datasets with such fine-grained bounding box annotations is rather time-consuming and costly, we focus + +![](images/c047513fb1095229c6bf00a58cfb49bfa6e597c16c56882c7a75971b49edd9f9.jpg) +Figure 1. Our proposed framework jointly models visual descriptions and word-to-region alignments conditioned on an input image (or video) and region proposals. Without using any bounding box annotations during training, it can tackle two tasks: Visual Object Grounding and Grounded Visual Description. Unlike prior work [74] that leverages soft attention for grounding and always predicts the same region for two words given the same visual input and partial caption context, our model can ground words by taking into account the full ground-truth or generated sentence. + +on weakly-supervised training of visual grounding systems, which require only image-caption pairs for training. In particular, we consider two tasks, as illustrated in Fig. 1: (1) Weakly-Supervised Visual Object Grounding (WS-VOG), where given an input image (or video) and its visual description, the goal is to localize the referred semantic entities in the visual input, and (2) Weakly-Supervised Grounded Visual Description (WS-GVD), where given an input image (or video), we must jointly generate a natural language description and localize the generated words. + +Most prior work has focused on learning how to align words with regions by learning how to correctly match images and videos to sentences [8, 26, 56, 65]. However, these matching-based approaches can only tackle the first task (WS-VOG), and cannot generate grounded vi + +sual descriptions. On the other hand, captioning-based approaches [40, 74] aim to learn how to ground words by learning how to generate captions based on region proposals, thus they can tackle both tasks. For example, the GVD captioning-based model [74] grounds words by using the region attention mechanism of a discriminative, encoder-decoder captioning model to select regions with maximum attention coefficients. Nonetheless, exploiting soft attention as a grounding mechanism suffers from two major limitations. First, despite being an effective, end-to-end learnable mechanism for summarizing relevant context, attention is not explicitly encouraged to capture meaningful alignments and can result in poor grounding [36], unless it is supervised. Second, each word is generated using attention coefficients computed from a query that summarizes the previously generated words. Hence, the coefficients do not take into account the word to be grounded. For example, consider grounding the words 'hat' and 'jacket' given the sentences "A man is wearing a hat" and "A man is wearing a jacket", respectively. As shown in Fig. 1, existing attention-based grounding approaches wrongly predict the same box for 'hat' and 'jacket', since the partial caption is the same. + +To overcome these limitations, we propose a conditional generative model for the joint probability distribution of sentences and latent word-to-region alignments given an input image (or video) and a set of region proposals. That is, we account for the lack of grounding annotations by introducing discrete latent variables that model word-to-region alignments. We parameterize our model with state-of-the-art visual encoders, language decoders and attention modules, and leverage Amortized Variational Inference [30, 59] to learn its parameters. The resulting Grounded Visual Description Conditional Variational Autoencoder (GVD-CVAE) allows us to both generate sentences and also infer the latent word-to-region alignments based on the whole sentence, including the word to be grounded. Hence, it can correctly ground the hat in the motivating example. + +In summary, this work makes three key contributions. First, we introduce the GVD-CVAE, a novel conditional generative model of visual descriptions with a sequential discrete latent space and attention-based parameterization of the prior and approximate posterior alignment distributions. Second, we propose a training objective that encourages our model to learn latent variables that capture meaningful word-to-region alignments. Third, we evaluate our method on three challenging image and video datasets and demonstrate that both our "prior" and "approximate posterior" alignment distributions improve upon soft attention. This leads to a $12\%$ absolute improvement in WS-VOG on Flickr30k Entities. Our model also achieves state-of-the-art or competitive grounding and captioning performance compared with a diverse family of state-of-the-art methods that are tailored to WS-VOG or WS-GVD. + +# 2. Related Work + +Grounded Visual Description. Developing models that can both generate a sentence and link the generated words to visual regions is a nascent research area, motivated by a need for more trustworthy and interpretable captioning models [24,36,50]. Such models can be seen as an evolution of early image auto-annotation methods [7], methods for generating visually grounded storylines [20], or methods for generating descriptions with grounded and co-referenced people [52]. Zhou et al. [74] ground words by leveraging the region attention coefficients of an attention-based captioning models. However, in contrast to prior work on phrase grounding that computes attention using the whole phrase as query [51], the region attention in [74] is computed based on previous words (partially generated sentence), and it is thus agnostic to the word being grounded. + +A recent line of work has attempted to mitigate this issue. Ma et al. [40] propose a cyclical training regime for WS-GVD of images and videos that involves two attention mechanisms: one based on the partial caption and another based on the groundable word. By forcing the words generated using these two attention mechanisms to match the ground-truth words, the mechanisms are implicitly regularized to produce similar attention weights during training. Other approaches explicitly supervise the region attention during training on image-caption pairs, either by using attention coefficients based on future relevant words [37], or by leveraging the word-to-region alignments of a separately trained image-to-text matching model [77]. In summary, a common thread in prior work is the usage of a regular region attention module of an UpDown [2] captioning model for grounding, which is regularized only during training based on auxiliary models or attention mechanisms. In contrast, inspired by discrete latent-variable models for image captioning/neural machine translation [13, 45, 54, 66], our key innovation is to treat word-to-region alignments as discrete latent variables in a grounded visual description CVAE model and exploit the prior or approximate posterior alignment distributions to infer the latent word-to-region alignments. This enables us to consider the past, future and current words for localizing each object word in the input image or video during testing. + +Visual Object Grounding. Grounding words (rather than whole sentences [71] or phrases [21, 65]) in images and videos is an active research field in the intersection of vision and language. Early attempts for weakly-supervised visual grounding given textual descriptions of images and videos relied on graphical models [47, 68]. Powered by advances in region proposal generation, a large group of recent methods [11, 29] cast the task as a Multiple Instance Learning (MIL) problem. These methods define an image-sentence matching score determined by word-to-region alignments and learn how to correctly match images to sentences us- + +ing ranking losses. Such methods have also been extended to videos [26, 56, 75] with frame-sentence matching scores and mechanisms to account for missing objects. However, these MIL-based methods cannot both generate sentences and ground objects. This limitation is lifted by the captioning-based GVD-Grd method [74], which grounds each word based on region attention coefficients, computed with the previous words as query, combined with region-to-class similarity coefficients. These are obtained by transferring object class knowledge from external datasets. In this work, we also use captioning as a downstream task, but we localize words with the distributions of a conditional generative model, leveraging the full sentence context. + +Joint Vision-Language Representation Learning. Inspired by advances in pretrained NLP models [14], researchers have also started to use large-scale vision-text corpora to learn cross-modal vision-language representations. There exist Transformer-based models [35, 38] that are also trained using only pairs of images with object proposals and associated textual descriptions. However, instead of focusing on learning task-agnostic, visiolinguistic representations using large-scale corpora to facilitate downstream tasks, we are interested in training visual grounding systems on small-scale datasets. Importantly, we rely on text as weak supervision for learning how to ground without bounding box annotations directly on the target dataset. Instead, these pretrained models require finetuning on a smaller, fully-annotated dataset to tackle downstream tasks such as referring expression grounding [38]. + +Modeling Sequential Data with Variational Autoencoders. Our proposed CVAE-based captioning model is also related to regular or Conditional VAEs that are developed for modeling sequential data in NLP applications. In particular, VAEs with sequences of latent variables [3, 9, 10, 18, 53, 69] instead of a single latent variable driving the whole sequential generation process [5, 43, 63, 72] are more closely related to our work. However, the majority of those have non-interpretable, continuous latent variables, unlike our discrete latent word-to-region alignments. A notable exception is the approach of Graber et al. [19] that uses sequential discrete variables to model interactions between entities in interacting systems. Still, all these works share the same goal of modeling the likelihood of sequential data, while we propose exploiting the latent variables for grounding. To this end, we need to avoid training an inference model that produces posteriors almost identical to the prior, thus ignoring the word to be grounded. Researchers are actively exploring various techniques to mitigate this posterior collapse issue by modifying: the training objective [1, 17, 34, 42, 48, 55], the training procedure [22] or the decoder architecture [15]. Similarly, we propose controlling the relative factor between sentence reconstruction term and the prior regularization term [1, 6, 55]. + +![](images/17f8fc87d1742b9f85c16de1944774cf31b33cd26f9b56f66df47f6db038e747.jpg) + +![](images/b6fcc24500124b42a009d57f32fd54da5873c115c4a32aaa2c0665c8a9e7b479.jpg) + +![](images/f1b87ee658145678945edd81382fe3e3102d474443c1cd352bef46b1225428c9.jpg) + +Figure 2. We propose a deep conditional generative model of visual descriptions that models each word-to-region alignment with a discrete latent variable $\mathbf{z}_t$ . It is able to attend over the region proposals in an input image (or video), tell what it shows by marginalizing out the latent word-to-region alignments from the joint distribution and ground each word by leveraging the learned approximate posterior word-to-region alignment distribution. +![](images/30a4e1f03a9c3670432261c1da741f49df137165e2152a22e398a3b1f198485a.jpg) +I input image +R set of regions +$y_{< t}$ partial caption + +![](images/e5fe22aa34a78ed0cae8ceb15e3fae9490c6f22a8e95300c2b5df75d1a4477ce.jpg) +$y_{t}$ t-th output word + +![](images/1f2a628ead9808fec0185048dcb22c645b674fff8f37d30c8c556edad2a2fa5c.jpg) +$Z_{t}$ t-th aligned region index + +# 3. Method + +# 3.1. Problem Formulation + +Let $Y$ denote a visual description of a given visual input $I$ (i.e., an image or video). We represent $Y = \{\mathbf{y}_1, \dots, \mathbf{y}_T\}$ as a sequence of $T$ words from a vocabulary $\mathcal{V}$ , where $\mathbf{y}_t$ is the one-hot encoding of the $t$ -th word, i.e., $\mathbf{y}_t \in \{0, 1\}^{|\mathcal{V}|}$ and $\| \mathbf{y}_t \| = 1$ . In the VOG task, the goal is to ground words in ground-truth descriptions of a visual input, i.e., we are interested in localizing each mentioned groundable word with a bounding box $\widehat{\mathbf{b}}_t$ . In the GVD task, the goal is to both generate a visual description $\widehat{Y}$ and localize each generated groundable word $\widehat{\mathbf{y}}_t$ with a bounding box $\widehat{\mathbf{b}}_t$ . + +In this work, we propose to design a model that can tackle both tasks in both the image and video domains, and can be trained with weak supervision in the form of aligned visual input and visual description pairs $\{(I^{(n)},Y^{(n)})\}_{n = 1}^{N}$ . To achieve this, we treat the problem of grounding as a problem of word-to-region alignment by leveraging $M$ candidate region proposals $R = \{\mathbf{r}_m\}_{m = 1}^M$ obtained by an off-the-shelf object detector [23]. Then, the localization problem is reduced to identifying the variable $\mathbf{z}_t\in \{0,1\} ^M$ with $\| \mathbf{z}_t\| = 1$ , which denotes which region corresponds to the $t$ -th word. Our key idea is to model word-to-region alignments as latent variables in a deep conditional generative model. To this end, we propose a novel Grounded Visual Description Conditional Variational Autoencoder (GVD-CVAE). As illustrated in Fig. 2, learning such a model allows us to leverage the posterior distribution of word-to-region alignments for grounding words based on the entire sentence, unlike attention-based grounding. + +![](images/a20a0d127490f30a9a6be853ef6c8420fbd54a8169edf6bd22f621f2ba975fbf.jpg) +Figure 3. Our proposed GVD-CVAE architecture. The input image and proposals are fed through a visual encoder to produce region embeddings. The prior word-to-region alignment is computed as a function of only the previous words, while the approximate posterior is computed as a function of the full sentence. During training, a region is sampled from the approximate posterior and is fed to the language decoder that predicts the next word. + +# 3.2. Attention-based Conditional Variational Autoencoder for Grounded Visual Description + +Let $Z = \{\mathbf{z}_1, \ldots, \mathbf{z}_T\}$ be the sequence of latent variables corresponding to alignments between words and regions, where $\mathbf{z}_t \in \{0, 1\}^M$ is a binary discrete random variable with $z_{t,i} = 1$ when the $i$ -th region proposal corresponds to the $t$ -th word $\mathbf{y}_t$ . The joint conditional distribution $p_\theta(Y, Z \mid R, I)$ of a caption $Y$ and sequence of alignments $Z$ , given the input video (or image) $I$ and candidate regions $R$ can be factorized in an autoregressive manner: + +$$ +\prod_ {t = 1} ^ {T} p _ {\theta} \left(\mathbf {y} _ {t} \mid \mathbf {y} _ {< t}, \mathbf {z} _ {\leq t}, R, I\right) p _ {\theta} \left(\mathbf {z} _ {t} \mid \mathbf {y} _ {< t}, \mathbf {z} _ {< t}, R, I\right), \tag {1} +$$ + +where $\mathbf{y}_{< t} = \mathbf{y}_{1:t-1}$ is the partial caption up to word $t - 1$ , and similarly $\mathbf{z}_{< t}$ denotes the sequence of word-to-region alignments up until word $t - 1$ . We can simplify this joint distribution by making two assumptions: (a) the $t$ -th word depends only on the region $\mathbf{z}_t$ given the partial caption $\mathbf{y}_{< t}$ , and (b) the region-to-word alignments $\mathbf{z}_t$ for each word are conditionally independent of each other given the partial caption. Hence, our joint probability distribution becomes: + +$$ +p _ {\theta} (Y, Z | R, I) = \prod_ {t = 1} ^ {T} \overbrace {p _ {\theta} \left(\mathbf {y} _ {t} \mid \mathbf {y} _ {< t} , \mathbf {z} _ {t} , R , I\right)} ^ {\text {l a n g u a g e d e c o d e r}} \overbrace {p _ {\theta} \left(\mathbf {z} _ {t} \mid \mathbf {y} _ {< t} , R , I\right)} ^ {\text {r e g i o n p r i o r}}. \tag {2} +$$ + +Next, we describe how we parameterize our conditional generative model with deep networks whose trainable weights are denoted by $\theta$ , as illustrated in Fig. 3. + +Visual Encoder. Images are encoded using a pretrained CNN model with RoI-pooling operations and trainable linear projections [74]. The encoder captures global visual context in the form of a coarse image-level feature vector, $\mathbf{v}$ , as well as fine-grained grid features $F = \{\mathbf{f}_l\}_{l=1}^L$ , where $l$ indexes the feature map spatial grid. It also generates grounding-aware region representations $X = \{\mathbf{x}_i\}_{i=1}^M$ , where the representation $\mathbf{x}_i$ of each region encodes information about appearance, position and object class knowledge [74] transferred from an object detector [23] trained on an external dataset [31]. Videos are also encoded to a global video feature $\mathbf{v}$ , a sequence of frame-level features $F = \{\mathbf{f}_l\}_{l=1}^L$ , where $l$ indexes the frames, and grounding-aware region representations $X = \{\mathbf{x}_i\}_{i=1}^M$ , but using different network architectures, as detailed in the appendix. + +Language Decoder. The decoder $p_{\theta}(\mathbf{y}_t|\mathbf{y}_{< t},\mathbf{z}_t,R,I) = \mathrm{Cat}(g_{\theta}(\mathbf{s}_t,\mathbf{z}_t,X))$ is a categorical distribution over words in the vocabulary given the partial caption $\mathbf{y}_{< t}$ , the word-to-region alignments $\mathbf{z}_t$ , the regions $R$ , and the visual input $I$ . We parameterize this distribution with a shallow network + +$$ +g _ {\theta} \left(\mathbf {s} _ {t}, \mathbf {z} _ {t}, X\right) = \operatorname {s o f t m a x} \left(W _ {c} \tanh \left(W _ {p} \left[ \mathbf {s} _ {t}; \sum_ {i = 1} ^ {M} z _ {t, i} \mathbf {x} _ {i} \right]\right)\right), \tag {3} +$$ + +whose inputs are: (a) the state $\mathbf{s}_t\in \mathbb{R}^d$ of a language model that summarizes $\mathbf{y}_{< t}$ , $R$ and $I$ , and (b) the aligned region feature $\sum_{i = 1}^{M}z_{t,i}\mathbf{x}_i\in \mathbb{R}^d$ , where $[\cdot ;\cdot ]$ denotes concatenation, and $W_{c}\in \mathbb{R}^{d\times d}$ , $W_{p}\in \mathbb{R}^{d\times 2d}$ are learnable weights. + +Although $\mathbf{s}_t$ can be chosen as the state of any standard language model [2, 76], we follow prior work on grounded visual description [37, 40, 74, 77] and adopt a variant of the UpDown [2] LSTM model. This language model is composed of a word embedding layer (emb) and two LSTM [25] layers with hidden states $\mathbf{u}_t$ and $\mathbf{s}_t$ , respectively. It also uses an additive attention mechanism [4] $f_{\theta}(\mathbf{u}_t,F) = \mathrm{softmax}(\mathbf{w}_f^T\mathrm{tanh}(W_f[\mathbf{u}_t;\mathbf{f}_l]))$ over holistic visual features $F$ , where $\mathbf{w}_f,W_f$ are learnable attention weights. Region features $X$ are also summarized with another additive attention mechanism $k_{\theta}(\mathbf{u}_t,X)$ . + +$$ +\mathbf {u} _ {t} = \operatorname {R N N} _ {\theta} ^ {1} \left(\mathbf {u} _ {t - 1}, [ \mathbf {v}; \operatorname {e m b} (\mathbf {y} _ {t - 1}) ]\right) \tag {4} +$$ + +$$ +\mathbf {s} _ {t} = \mathrm {R N N} _ {\theta} ^ {2} \left(\mathbf {s} _ {t - 1}, \left[ \sum_ {l = 1} ^ {L} f _ {\theta} ^ {(l)} (\mathbf {u} _ {t}, F) \mathbf {f} _ {l}; \sum_ {i = 1} ^ {M} k _ {\theta} ^ {(i)} (\mathbf {u} _ {t}, X) \mathbf {x} _ {i}; \mathbf {u} _ {t} \right]\right) \tag {5} +$$ + +Prior Model. The prior distribution, $p_{\theta}(\mathbf{z}_t|\mathbf{y}_{< t},R,I)$ , is a categorical distribution over possible word-to-region alignments. We choose to parameterize it with an additive attention mechanism [4] that computes region attention coefficients $\alpha_{\theta}(\mathbf{s}_t,X)\in \mathbb{R}^M$ using as a query the top LSTM + +state $\mathbf{s}_t$ that summarizes the partial caption and visual input: + +$$ +\mathbf {z} _ {t} \mid \mathbf {y} _ {< t}, R, I \sim \operatorname {C a t} \left(\alpha_ {\theta} \left(\mathbf {s} _ {t}, X\right)\right). \tag {6} +$$ + +Variational Posterior. To learn the parameters of our conditional generative model we leverage Amortized Variational Inference (AVI). Therefore, our model becomes a CVAE [59] with sequential discrete latent space and sentences as observations. In the CVAE framework, a variational distribution $q_{\phi}(Z|Y,R,I)$ is introduced to approximate the true posterior and is parameterized via a neural network with weights $\phi$ , also known as the "inference network". We choose to approximate the true posterior with the following approximate posterior: + +$$ +q _ {\phi} (Z \mid Y, R, I) = \prod_ {t = 1} ^ {T} q _ {\phi} (\mathbf {z} _ {t} \mid Y, R, I). \tag {7} +$$ + +Then, we model the approximate posterior distribution of each word-to-region alignment as a categorical distribution that is parameterized by the attention coefficients $\alpha_{\phi}(\mathbf{h}_t,X)\in \mathbb{R}^M$ obtained via another attention network, implemented as additive attention [4] or general dot-product attention [39]: + +$$ +\mathbf {z} _ {t} \mid Y, R, I \sim \operatorname {C a t} \left(\alpha_ {\phi} \left(\mathbf {h} _ {t}, X\right)\right). \tag {8} +$$ + +In this case, the attention query $\mathbf{h}_t\in \mathbb{R}^d$ summarizes the whole sentence. It is obtained by summing the forward and backward states of a BiLSTM network, whose inputs consist of the global feature $\mathbf{v}$ and ground-truth word $\mathbf{y}_t$ at each timestep. Optionally, we can augment the unnormalized attention coefficients $\tilde{\alpha}_{\phi}(\mathbf{h}_t,X)$ for the object words in the input sentence with transferred object class knowledge: + +$$ +\begin{array}{l} \mathbf {z} _ {t} \mid Y, R, I \sim \operatorname {C a t} (\operatorname {s o f t m a x} (\tilde {\alpha} _ {\phi} (\mathbf {h} _ {t}, X) + \\ + \gamma \omega_ {t} \left(\mathbf {w} _ {c t} ^ {T} \mathbf {o} + \mathbf {1} b _ {c t}\right)\left. \right), \tag {9} \\ \end{array} +$$ + +where $\mathbf{w}_{c_t} \in \mathbb{R}^{d_0}$ , $b_{c_t} \in \mathbb{R}$ are trainable weights, initialized with the pretrained object classifier for the external dataset's object class $c_t$ that is closest to the object word $\mathbf{y}_t$ , $\mathbf{o} \in \mathbb{R}^{d_o \times M}$ are region object features, $\mathbf{1} \in \mathbb{R}^M$ is a vector of all ones, and $\omega_t$ is a binary word mask with $\omega_t = 1$ denoting a groundable word. The hyperparameter $\gamma \in \{0,1\}$ controls whether this transferred knowledge will be used or not. + +Training. During training, we assume we are given $N$ i.i.d. pairs of visual inputs and their visual descriptions, without grounding supervision. To train our Grounded Visual Description CVAE (GVD-CVAE), we minimize the following loss over the parameters $\theta$ and $\phi$ (omitting the conditioning of all distributions on $I^{(n)}$ for readability): + +$$ +\mathcal {L} = \frac {1}{N} \sum_ {n, t} \lambda \mathcal {L} _ {C V A E} (n, t) + (1 - \lambda) \mathcal {L} _ {C E} (n, t) \tag {10} +$$ + +where $\mathcal{L}_{CE} = -\log p_{\theta}(\mathbf{y}_t^{(n)}\mid \underset {\mathbf{z}_t\sim p_{\theta}}{\mathbb{E}}[\mathbf{z}_t],\mathbf{y}_{< t}^{(n)},R^{(n)})$ and + +$$ +\begin{array}{l} \mathcal {L} _ {C V A E} (n, t) = \underset {\mathbf {z} _ {t} \sim q _ {\phi}} {\mathbb {E}} \left[ - \log p _ {\theta} \left(\mathbf {y} _ {t} ^ {(n)} \mid \mathbf {y} _ {< t} ^ {(n)}, \mathbf {z} _ {t}, R ^ {(n)}\right) \right] \\ + \beta \mathrm {K L} \left(q _ {\phi} \left(\mathbf {z} _ {t} \mid Y ^ {(n)}, R ^ {(n)}\right) | | p _ {\theta} \left(\mathbf {z} _ {t} \mid \mathbf {y} _ {< t} ^ {(n)}, R ^ {(n)}\right)\right). \tag {11} \\ \end{array} +$$ + +For $\lambda = \beta = 1$ , we recover the negative of the Evidence Lower Bound Objective (ELBO) for our factorization of the joint probability distribution and our choice of the approximate posterior. Similar to prior work in generative modeling [6], we observe that optimizing the ELBO often results in an inference model that produces approximate posteriors almost identical to the prior. To mitigate this issue, we reweight the KL loss term with a scalar factor $\beta$ . We found that gradually increasing $\beta$ up to a value $\beta_{clip} < 1$ during training or using a PI-controller [55] to reach a desired KL divergence value are effective for training our GVD-CVAE. Moreover, we experimentally observed that optimizing the CVAE loss jointly with a cross-entropy word prediction loss $(\lambda = 0.5)$ , that is applied on word predictions obtained based on the $p$ -attention-based weighted sum of region features, further facilitates training. More details about training with Gumbel-Softmax [28,41] samples and about approximate inference with our model are included in the appendix. + +# 4. Experiments + +# 4.1. Datasets, Metrics and Implementation Details + +Flickr30k Entities (F30k) is a large-scale image dataset, originally annotated with phrase-to-region alignments [46]. To evaluate our results on object grounding (rather than phrase grounding), we follow the setup from Zhou et al. [74] to convert each noun phrase (e.g. her brown hat) associated with each bounding box to a single groundable object, such as hat. This results in $|\mathcal{V}_o| = 480$ groundable words out of the $|\mathcal{V}| = 8639$ words comprising the vocabulary. We use the standard dataset split with $29\mathrm{k} / 1\mathrm{k} / 1\mathrm{k}$ images in the training, validation and testing sets, respectively. + +ActivityNet Entities (ANet) is a large-scale video dataset, containing $52k$ video segments annotated with a caption each. Following the original setup [74], we use a vocabulary of 4905 words, 431 of which are groundable. Each groundable word in a sentence is associated with a bounding box in a frame of the video where it can be clearly observed. Since annotations for the testing set are not public and the evaluation server is closed at the time of submission, we follow [64] and report results on the validation set. + +YouCook2-BB is a video dataset containing YouTube cooking videos with video segments paired with captions and bounding box annotations [75] at 1 fps for 67 object classes. We use the same training/validation/test split as in [56]. + +Table 1. Comparison of grounding performance between the GVD and GVD-Grd models (bases) and the GVD-CVAE on the validation sets of F30k and ANet. We report the box accuracy metric for evaluating grounding given ground-truth sentences and the $F_{1_{all}}$ metric for evaluating grounding of object words in generated sentences. GVD-CVAE-p (GVD-CVAE-q) denotes using our learned prior (approximate posterior) alignment distribution for grounding. + +
DatasetMethodBox Acc.F1all
F30k (Image)GVD [74]22.04.4
GVD-Grd [74]25.94.4
GVD-CVAE-p (Ours)29.66.2
GVD-CVAE-q (Ours)33.47.3
ANet (Video)GVD [74]14.93.7
GVD-Grd [74]21.33.7
GVD-CVAE-p (Ours)19.44.8
GVD-CVAE-q (Ours)24.26.1
+ +Metrics. Performance for WS-VOG is measured with Box Accuracy [56, 74, 75], which computes the percentage of correctly localized words of an object class. A word is considered to be correctly localized when its predicted box has more than 0.5 Intersection-over-Union (IoU) with ground-truth boxes. Metrics for WS-GVD evaluate both grounding and captioning capabilities. We adopt the $F1_{all}$ and $F1_{loc}$ grounding metrics [74] for evaluating grounding on generated sentences, and standard language evaluation metrics, such as Bleu [44], METEOR [32], CIDEr [62], and SPICE [2], for evaluating generated sentences. In $F1_{all}$ , a region prediction is considered correct if the object word is both correctly predicted and localized, while $F1_{loc}$ only considers correctly predicted object words. + +Implementation details. For the F30k and Anet datasets, our GVD-CVAE receives as inputs the region proposals, region features and image/video global features from Zhou et al. [74], with 100 region proposals per frame/image. For YouCook2, we use 20 region proposals and the features extracted by Shi et al. [56]. Hyperparameters such as learning rate, $\beta_{clip}$ , attention mechanisms, number of samples, are chosen based on the validation sets of F30k and YouCook2. For evaluating on the ANet validation set, we train a model with hyperparameters selected based on the F30k validation set. All other hyperparameters, such as layer sizes, are in general adopted from prior work [56, 74]. Additional training and implementation details are included in the appendix. + +# 4.2. Baselines and Ablation Studies + +(1) Are the regions localized via our learned word-to-region alignment distributions better than those localized via soft-attention-based baselines? Our baseline is the attention-based encoder-decoder GVD caption + +Table 2. Ablation analysis of the decoder and inference model design on the F30k validation set. Types of UpDown [2] model attention: Grid: over grid features, Reg.: over region features, Both: both attention mechanisms. Obj. Cls. denotes inference model with transferred object class knowledge ( $\gamma = 1$ ). + +
DecoderApproximate PosteriorBox Acc.F1all
Cond.Obj. Cls.pqpq
UpDown (Both)zt|y≤T✓29.633.46.27.3
UpDown (Both)zt|y≤TX25.132.35.47.0
UpDown (Both)zt|y≤tX26.331.46.07.4
UpDown (Grid)zt|y≤T✓30.734.47.37.2
UpDown (Reg.)zt|y≤T✓26.633.05.86.3
LSTMzt|y≤T✓30.234.86.97.5
+ +ing model, trained with teacher-forcing language generation cross-entropy loss. We ensure that our GVD-CVAE exactly mirrors the inputs and the visual encoder/language decoder modules of this baseline model. Baseline object grounding is performed either by (a) selecting the region with maximum region attention coefficient $k_{\theta}^{(i)}(\mathbf{u}_t,X)$ (GVD [74]) given the partial caption $\mathbf{y}_{< t}$ , or (b) by combining the attention coefficients with region-to-class similarity scores based on the word $\mathbf{y}_t$ to be grounded for the VOG task (GVD-Grd [74]). In Table 1, we compare our GVD-CVAE's ability to ground objects in ground-truth or generated sentences with these two powerful, discriminative baselines. We observe that even grounding based on our learned prior word-to-region alignment distribution (GVD-CVAE-p) improves upon the soft-attention baseline by a significant margin in both benchmarks and tasks (e.g., it improves Box Accuracy from $22\%$ to $29\%$ on F30k), despite similarly capturing only the history of previous words. The reason for this improvement is that our prior distribution is encouraged during training to "look ahead" when sampling a region to generate a word, by mimicking the approximate posterior alignment distribution which has access to future words. Using the latter for grounding conditioned on the full sentence further improves results (from $29.6\%$ to $33.4\%$ ), verifying our intuition that leveraging the word to be grounded in its language context can help us better localize the word. Additionally, it outperforms the GVD-Grd discriminative baseline which also takes into account the word to be grounded, demonstrating the benefits of our conditional generative modeling. + +(2) How does the choice of the language model and approximate posterior affect grounding performance? Table 2 demonstrates the grounding performance obtained with different design choices. First, results suggest that taking the full sentence into account via a BiLSTM $(q(z_{t}|y_{\le T}))$ leads to better VOG grounding compared to only seeing the sentence up to the current word $y_{\le t}$ with an LSTM (e.g., improving Box Acc. from $31.4\%$ to $32.3\%$ ) + +Table 3. Impact of various training objectives on weakly-supervised object grounding. Performance measured via Box accuracy (\%) on the F30k validation set. + +
Training objectiveCVAE-pCVAE-q
ELBO3.293.16
CE + ELBO25.2223.99
CE + ELBO + β anneal26.0725.61
CE + ELBO + β anneal + clip26.3128.88
CE + ELBO + PI Controller29.2731.71
+ +rows 2-3). Another observation is that explicitly adding transferred information about object class distributions in the inference model $(\gamma = 1)$ improves grounding given ground-truth sentences (Box Accuracy) with both the prior and approximate posterior distributions (rows 1-2). This further demonstrates that knowledge from the inference model is distilled to the prior during training via the KL loss, resulting in a model that is looking at better localized regions while generating descriptions based on the prior and decoder modules. Interestingly, results suggest that our GVD-CVAE is robust to the choice of the language decoder (rows 1,4-6), and achieves top grounding performance even when using a simple LSTM in the decoder or an UpDown LSTM with soft-attention only over grid features, demonstrating the effectiveness of our latent-variable modeling. + +# (3) What is the effect of the proposed training objective? + +We first train our GVD-CVAE with the vanilla CVAE loss, i.e., with $\lambda, \beta = 1$ . Without any of our proposed modifications, this results in a very low grounding performance, as can be seen in the first row of Table 3. By adding the cross-entropy loss term that penalizes word predictions based on soft region context determined by the p-attention network (CE+ELBO), we are able to improve upon the soft-attention baseline of $22\%$ . However, learning curves (included in the appendix) show that the KL loss term has vanished, suggesting that the model's posterior has collapsed to the prior and the approximate posterior alignment does not additionally take into account the word being grounded. Applying known solutions to KL vanishing, such as linearly annealing the $\beta$ hyperparameter from 0 to 1 (CE+ELBO+ $\beta$ anneal), does not solve the problem. Instead, our proposed clipped linear annealing schedule leads to overall better grounding of $28.9\%$ (KL term $\approx 0.06$ ). Alternatively, after we determine a desirable value for the KL term, we can use the PI-Controller [55] anneal $\beta$ , which we found to be less sensitive to changes in architecture and requires minimal calibration. Note that in this ablation we used a single LSTM language decoder and an LSTM in the inference model for faster experimentation. + +# 4.3. Comparison with the State of the Art + +As shown in Table 4, our GVD-CVAE improves weakly-supervised object grounding by $12\%$ compared to the GVD + +Table 4. Results on the Flickr30k Entities test set. The performance of the fully-supervised GVD model (Sup.) is reported as an upper-bound to the weakly-supervised approaches. Types of model inputs during inference: region proposals extracted and encoded following GVD [74] or BUTD [2], or Scene-graphs [70]. $\dagger$ denotes models trained using auxiliary image-to-text matching models [33]. $RL$ denotes models fine-tuned via Reinforcement Learning [49]. Note that results in the third block are obtained with different inputs, and thus they are not directly comparable to ours. We report average results for our GVD-CVAE after 5 random runs (standard deviations are included in the appendix). + +
VOGGVD
FeatAccCaptioningGrounding
B@4MCSF1allF1loc
GVD [74] (Sup.)G41.427.322.562.316.57.5522.2
GVD [74]G21.426.922.160.116.13.8811.7
GVD-Grd [74]G25.526.922.160.116.13.8811.7
Cyclical [40]G-26.622.360.916.34.8513.4
DPA [37]G-27.622.662.716.74.7915.5
SCAN-RL [77] †G-28.022.666.217.06.5315.8
BUTD [2]U24.227.321.756.616.0--
DPA [37]U-27.222.360.816.35.4515.3
Sub-GC [73]S-28.522.361.916.45.9816.5
SCAN-RL [77] †U-30.122.669.316.87.1717.5
GVD-CVAEG33.724.021.355.315.76.7019.2
GVD-CVAE-RLG31.629.823.167.617.26.9417.6
+ +Table 5. Results on the ActivityNet Entities validation set. We report average results for our GVD-CVAE after 5 random runs. + +
VOGGVD
CaptioningGrounding
AccB@4MCSF1allF1loc
GVD (Sup.) [74]35.72.5911.247.515.17.124.1
MIL-based
NAFAE [56]19.5------
STVG [67]21.1------
SCL [64]23.8------
Captioning-based
GVD [74]14.92.2810.945.615.03.712.7
GVD-Grd [74]21.32.2810.945.615.03.712.7
Cyclical [40]-2.4511.146.414.84.715.8
GVD-CVAE23.91.9010.441.813.35.821.7
+ +method (21.4% to 33.7%) on the F30k image dataset. Thus, it sets the state-of-the-art VOG result, and reduces the gap with the fully-supervised GVD approach (41.4%). It also generates more grounded captions (higher $F_{1_{all}}$ and $F_{1_{loc}}$ scores) than all other methods, given the same features (from GVD). We even outperform methods using Scene Graphs [70] for grounding [73]. Note that the $F_{1_{all}}$ + +Table 6. Results on the YouCook2 test set following the experimental setup of Shi et al. [56]. GVD* denotes our implementation and training of the GVD model [74]. + +
Box accuracy (%)
macromicro
Upper Bound62.41-
MIL-based methods
DVSA-frm [29]37.5544.16
Zhou [75]35.0842.42
NAFAE [56]40.7146.33
STVG [67]41.6748.22
SCL [64]42.8048.60
Captioning-based methods
GroundR [51]19.94-
GVD* [74]37.4044.15
GVD-CVAE (Ours)38.85 ± 0.2044.62 ± 0.09
+ +scores obtained by both our CVAE-p (6.43%) and CVAE-q (6.70%) distributions outperform Cyclical [40] (4.85%) and DPA [37] (4.79%). This suggests that modeling alignments as latent variables works better than applying attention regularization techniques during training. Despite generating more grounded captions, our method has lower captioning metrics than SoTA methods, some of which apply reinforcement learning (RL). However, our language model can also be finetuned with a CIDEr-based SCST loss [49] (GVD-CVAE-RL), leading to competitive captioning metrics. + +Results on the ANet video dataset (Table 5) show similar trends. Our GVD-CVAE yields better metrics when grounding ground-truth or generated sentences. It also outperforms video-tailored, video-to-text matching models, such as NAFAE [56]. Although powerful, these models cannot tackle the WS-GVD task. Since we evaluate only on the validation set, we did not select the model with best CIDEr score, or tune the learning rate based on it. This might have led to our slightly inferior captioning metrics compared to [40, 74], which used the validation set for selecting a model to be evaluated on the now closed test server. + +We also compare our method to MIL-based grounding approaches in the YouCook2 test split in terms of Box Accuracy (additional metrics are reported in the appendix). As seen in Table 6, although our method outperformed all video-to-text-matching methods on the ANet video dataset, it is, for instance, lagging behind NAFTAE [56] by around $2\%$ on the YouCook2 dataset. A possible explanation is that, while in ANet grounding is evaluated on a single frame, in YouCook2 grounding predictions are evaluated in every frame. Therefore, MIL-based methods that model the consistency between the localized regions at each frame or model inter-object interactions perform better. We believe that extending our GVD-CVAE to model such relationships will improve these metrics, and we leave that to + +future work. Finally, we show qualitative image grounding results in Fig. 4. + +Limitations. Similar to all other proposal-based approaches, our model's performance is limited by the quality of the region proposals. Also, our GVD-CVAE does not model the dependency between alignments for consecutive words. Finally, we applied the same framework for image and video object grounding to demonstrate its generality and effectiveness, without taking advantage of several inductive biases in the video domain, such as the visual similarity between grounded regions in consecutive frames. + +![](images/16e24e82d4814935e180e4dddb7f1ad2af7de5df29b7cad3f3f7867163e369f8.jpg) +GT: an adult soccer game, soccer players chasing after the ball during a live game + +![](images/ad6e390e20e33f1de9d5fee02284cb2d0bbd42cf08e3c8cae326984c4ba79bb6.jpg) +GT: a woman outside on a street wearing a yellow shirt and sunglasses + +![](images/f114f1c1c8686b0170df62a442c22baa3cedf1cfe3d184681c91612d96a6ddf9.jpg) +GT: one football player in a red jersey jumping onto a player wearing a white jersey +Figure 4. Qualitative WS-VOG results on the F30k validation set. For each ground-truth caption, we show grounding results obtained by (a) the soft-attention baseline, (b) our prior, and (c) our approximate posterior alignment distributions. We observe that knowing the words to be grounded improves grounding of small objects. Third row shows a failure case, in which our CVAE-q predicts the same bounding box for all groundable words. + +# 5. Conclusion + +In this paper, we proposed a novel grounded visual description CVAE. We showed how leveraging the latent alignment distributions of our model outperforms soft attention for grounding given ground-truth or generated sentences. We also demonstrated the generality and effectiveness of our model by evaluating it on both image and video datasets. Our novel approach yields competitive results in both grounding and grounded video description, while comparing against methods optimized for one of the two tasks. + +Acknowledgements. The authors thank Benján Béjar Haro, Carolina Pacheco Onate, Ambar Pal, Paris Giampouras, and the anonymous reviewers for their valuable comments. This research was supported by the IARPA DIVA program via contract number D17PC00345. + +# References + +[1] Alexander A. Alemi, Ben Poole, Ian Fische, Joshua V. Dillon, Rif A. Saurous, and Kevin Murphy. Fixing a broken elbo. In International Conference on Machine Learning, volume 1, 2018. +[2] 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 IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[3] Jyoti Aneja, Harsh Agrawal, Dhruv Batra, and Alexander Schwing. Sequential latent spaces for modeling the intention during diverse image captioning. In IEEE International Conference on Computer Vision, pages 4260-4269, 2019. +[4] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. +[5] Apratim Bhattacharyya, Bernt Schiele, and Mario Fritz. Accurate and diverse sampling of sequences based on a 'best of many' sample objective. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[6] Samuel R. Bowman, Luke Vilnis, Oriol Vinyals, Andrew M. Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. In 20th SIGNLL Conference on Computational Natural Language Learning, 2016. +[7] Peter Carbonetto, Nando De Freitas, and Kobus Barnard. A statistical model for general contextual object recognition. European Conference on Computer Vision, 2004. +[8] Kan Chen, Jiyang Gao, and Ram Nevatia. Knowledge aided consistency for weakly supervised phrase grounding. In IEEE Conference on Computer Vision and Pattern Recognition, pages 4042-4050, 2018. +[9] Hong Min Chu, Chih Kuan Yeh, and Yu Chiang Frank Wang. Deep generative models for weakly-supervised multi-label classification. In European Conference on Computer Vision, pages 409-425. Springer Verlag, 2018. +[10] Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Neural Information Processing Systems, volume 2015-January, 2015. +[11] Samyak Datta, Karan Sikka, Anirban Roy, Karuna Ahuja, Devi Parikh, and Ajay DIVAKaran. Align2ground: Weakly supervised phrase grounding guided by image-caption alignment. In IEEE International Conference on Computer Vision, volume 2019-October, pages 2601-2610, 10 2019. +[12] Jiajun Deng, Zhengyuan Yang, Tianlang Chen, Wengang Zhou, and Houqiang Li. Transvg: End-to-end visual grounding with transformers. In IEEE International Conference on Computer Vision, 2021. +[13] Yuntian Deng, Yoon Kim, Justin Chiu, Demi Guo, and Alexander M. Rush. Latent alignment and variational attention. In Neural Information Processing Systems, volume 2018-December, 2018. +[14] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Annual Meeting of + +the Association for Computational Linguistics, pages 4171-4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. +[15] Adji B. Dieng, Yoon Kim, Alexander M. Rush, and David M. Blei. Avoiding latent variable collapse with generative skip models. In International Conference on Artificial Intelligence and Statistics, 2020. +[16] Pelin Dogan, Leonid Sigal, and Markus Gross. Neural sequential phrase grounding (seqground). In IEEE Conference on Computer Vision and Pattern Recognition, pages 4175-4184, 2019. +[17] Hao Fu, Chunyuan Li, Xiaodong Liu, Jianfeng Gao, Asli Celikyilmaz, and Lawrence Carin. Cyclical annealing schedule: A simple approach to mitigating kl vanishing. In Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, volume 1, 2019. +[18] Anirudh Goyal, Alessandro Sordoni, Marc Alexandre Ct, Nan Rosemary Ke, and Yoshua Bengio. Z-forcing: Training stochastic recurrent networks. In Neural Information Processing Systems, volume 2017-December, 2017. +[19] Colin Graber and Alexander G. Schwing. Dynamic neural relational inference. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. +[20] Abhinav Gupta, Praveen Srinivasan, Jianbo Shi, and Larry S. Davis. Understanding videos, constructing plots learning a visually grounded storyline model from annotated videos. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2012-2019, 2009. +[21] Tanmay Gupta, Arash Vahdat, Gal Chechik, Xiaodong Yang, Jan Kautz, and Derek Hoiem. Contrastive learning for weakly supervised phrase grounding. In European Conference on Computer Vision, volume 12348 LNCS, 2020. +[22] Junxian He, Daniel Spokoyny, Graham Neubig, and Taylor Berg-Kirkpatrick. Lagging inference networks and posterior collapse in variational autoencoders. In International Conference on Learning Representations, 2019. +[23] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In IEEE International Conference on Computer Vision, pages 2961-2969, 2017. +[24] Lisa Anne Hendricks, Kaylee Burns, Kate Saenko, Trevor Darrell, and Anna Rohrbach. Women also snowboard: Overcoming bias in captioning models. In European Conference on Computer Vision, pages 771-787, 2018. +[25] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. +[26] De An Huang, Shyamal Buch, Lucio Dery, Animesh Garg, Li Fei-Fei, and Juan Carlos Niebles. Finding 'it': Weakly-supervised reference-aware visual grounding in instructional videos. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[27] Pingping Huang, Jianhui Huang, Yuqing Guo, Min Qiao, and Yong Zhu. Multi-grained attention with object-level grounding for visual question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3595-3600, Florence, Italy, July 2019. Association for Computational Linguistics. + +[28] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017. +[29] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39:664–676, 4 2017. +[30] Diederik P. Kingma and Max Welling. An introduction to variational autoencoders. In Foundations and Trends in Machine Learning, 2019. +[31] 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. +[32] Alon Lavie and Michael J Denkowski. The meteor metric for automatic evaluation of machine translation. Machine translation, 23(2):105-115, 2009. +[33] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In European Conference on Computer Vision, September 2018. +[34] Bohan Li, Junxian He, Graham Neubig, Taylor Berg-Kirkpatrick, and Yiming Yang. A surprisingly effective fix for deep latent variable modeling of text. In Conference on Empirical Methods in Natural Language Processing, 2020. +[35] Xiujun Li, Xi Yin, Chunyuan Li, Xiaowei Hu, Pengchuan Zhang, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, Yejin Choi, and Jianfeng Gao. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, 2020. +[36] Chenxi Liu, Junhua Mao, Fei Sha, and Alan Yuille. Attention correctness in neural image captioning. In AAAI Conference on Artificial Intelligence, 2017. +[37] Fenglin Liu, Xuancheng Ren, Xian Wu, Shen Ge, Wei Fan, Yuexian Zou, and Xu Sun. Prophet attention: Predicting attention with future attention. In Neural Information Processing Systems, 2020. +[38] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Neural Information Processing Systems, pages 13–23, 2019. +[39] Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attention-based neural machine translation. In Conference on Empirical Methods in Natural Language Processing, pages 1412-1421, Lisbon, Portugal, Sept. 2015. Association for Computational Linguistics. +[40] Chih-Yao Ma, Yannis Kalantidis, Ghassan AlRegib, Peter Vajda, Marcus Rohrbach, and Zsolt Kira. Learning to generate grounded visual captions without localization supervision. In European Conference on Computer Vision, 2020. +[41] Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In International Conference on Learning Representations, 2017. + +[42] Arya D. McCarthy, Xian Li, Jiatao Gu, and Ning Dong. Addressing posterior collapse with mutual information for improved variational neural machine translation. In Annual Meeting of the Association for Computational Linguistics, 2020. +[43] Artidoro Pagnoni, Kevin Liu, and Shangyan Li. Conditional variational autoencoder for neural machine translation, 12 2018. +[44] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Annual Meeting of the Association for Computational Linguistics, pages 311-318, 2002. +[45] Marco Pedersoli, Thomas Lucas, Cordelia Schmid, and Jakob Verbeek. Areas of attention for image captioning. In IEEE International Conference on Computer Vision, 2017. +[46] Bryan A. Plummer, Liwei Wang, Christopher M. Cervantes, Juan C. Caicedo, Julia Hockenmaier, and Svetlana Lazebnik. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models. *IJCV*, 123(1):74–93, 2017. +[47] Vignesh Ramanathan, Armand Joulin, Percy Liang, and Li Fei-Fei. Linking people in videos with "their" names using coreference resolution. In European Conference on Computer Vision, volume 8689 LNCS, 2014. +[48] Ali Razavi, Oriol Vinyals, Aron Van Den Oord, and Ben Poole. Preventing posterior collapse with $\delta$ -vaes. In International Conference on Learning Representations, 2019. +[49] Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jerret Ross, and Vaibhava Goel. Self-critical sequence training for image captioning. In IEEE Conference on Computer Vision and Pattern Recognition, pages 7008-7024, 2017. +[50] Anna Rohrbach, Lisa Anne Hendricks, Kaylee Burns, Trevor Darrell, and Kate Saenko. Object hallucination in image captioning. In Conference on Empirical Methods in Natural Language Processing, pages 4035-4045, 2018. +[51] Anna Rohrbach, Marcus Rohrbach, Ronghang Hu, Trevor Darrell, and Bernt Schiele. Grounding of textual phrases in images by reconstruction. In European Conference on Computer Vision, 2016. +[52] Anna Rohrbach, Marcus Rohrbach, Siyu Tang, Seong Joon Oh, and Bernt Schiele. Generating descriptions with grounded and co-referenced people. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4979-4989, 2017. +[53] Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In AAAI Conference on Artificial Intelligence, 2017. +[54] Shiv Shankar and Sunita Sarawagi. Posterior attention models for sequence to sequence learning. In International Conference on Learning Representations, 2019. +[55] Huajie Shao, Shuochao Yao, Dachun Sun, Aston Zhang, Shengzhong Liu, Dongxin Liu, Jun Wang, and Tarek Abdelzaher. Controlvae: Controllable variational autoencoder. In International Conference on Machine Learning, 2020. +[56] Jing Shi, Jia Xu, Boqing Gong, and Chenliang Xu. Not all frames are equal: Weakly-supervised video grounding with + +contextual similarity and visual clustering losses. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[57] Mohit Shridhar and David Hsu. Interactive visual grounding of referring expressions for human-robot interaction. In Proceedings of Robotics: Science and Systems, 2018. +[58] Gunnar A. Sigurdsson, Jean-Baptiste Alayrac, Aida Nematzadeh, Lucas Smaira, Mateusz Malinowski, João Carreira, Phil Blunsom, and Andrew Zisserman. Visual grounding in video for unsupervised word translation. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. +[59] Kihyuk Sohn, Xinchen Yan, and Honglak Lee. Learning structured output representation using deep conditional generative models. In Neural Information Processing Systems, 2015. +[60] Giorgos Tziafas and Hamidreza Kasaei. Few-shot visual grounding for natural human-robot interaction. In 2021 IEEE International Conference on Autonomous Robot Systems and Competitions (ICARSC), pages 50–55. IEEE, 2021. +[61] Aisha Urooj, Hilde Kuehne, Kevin Duarte, Chuang Gan, Niels Lobo, and Mubarak Shah. Found a reason for me? weakly-supervised grounded visual question answering using capsules. In IEEE Conference on Computer Vision and Pattern Recognition, pages 8465-8474, June 2021. +[62] Ramakrishna Vedantam, C. Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In IEEE Conference on Computer Vision and Pattern Recognition, volume 07-12-June-2015, pages 4566-4575. IEEE Computer Society, 10 2015. +[63] Liwei Wang, Alexander G. Schwing, and Svetlana Lazebnik. Diverse and accurate image description using a variational auto-encoder with an additive gaussian encoding space. In Neural Information Processing Systems, volume 2017-December, 2017. +[64] Wei Wang, Junyu Gao, and Changsheng Xu. Weakly-supervised video object grounding via stable context learning. In ACM International Conference on Multimedia, New York, NY, USA, 2021. Association for Computing Machinery. +[65] Fanyi Xiao, Leonid Sigal, and Yong Jae Lee. Weakly-supervised visual grounding of phrases with linguistic structures. In IEEE Conference on Computer Vision and Pattern Recognition, volume 2017-January, pages 5253-5262, 11 2017. +[66] Kelvin Xu, Jimmy Lei Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International Conference on Machine Learning, 2015. +[67] Xun Yang, Xueliang liu, Meng Jian, Xinjian Gao, and Meng Wang. Weakly-supervised video object grounding by exploring spatio-temporal contexts. In ACM International Conference on Multimedia, New York, NY, USA, 2020. Association for Computing Machinery. +[68] Haonan Yu and Jeffrey Mark Siskind. Grounded language learning from video described with sentences. In Annual Meeting of the Association for Computational Linguistics, volume 1, 2013. + +[69] Manzil Zaheer, Amr Ahmed, and Alexander J. Smola. Latent LSTM allocation joint clustering and non-linear dynamic modeling of sequential data. In International Conference on Machine Learning, volume 8, 2017. +[70] Rowan Zellers, Mark Yatskar, Sam Thomson, and Yejin Choi. Neural motifs: Scene graph parsing with global context. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[71] Junchao Zhang and Yuxin Peng. Object-aware aggregation with bidirectional temporal graph for video captioning. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[72] Tiancheng Zhao, Ran Zhao, and Maxine Eskenazi. Learning discourse-level diversity for neural dialog models using conditional variational autoencoders. In Annual Meeting of the Association for Computational Linguistics, 2017. +[73] Yiwu Zhong, Liwei Wang, Jianshu Chen, Dong Yu, and Yin Li. Comprehensive image captioning via scene graph decomposition. In European Conference on Computer Vision, 2020. +[74] Luowei Zhou, Yannis Kalantidis, Xinlei Chen, Jason J. Corso, and Marcus Rohrbach. Grounded video description. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2019-June, pages 6571-6580. IEEE Computer Society, 6 2019. +[75] Luowei Zhou, Nathan Louis, and Jason J. Corso. Weakly-supervised video object grounding from text by loss weighting and object interaction. In *British Machine Vision Conference*, 2019. +[76] Luowei Zhou, Yingbo Zhou, Jason J. Corso, Richard Socher, and Caiming Xiong. End-to-end dense video captioning with masked transformer. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[77] Yuanen Zhou, Meng Wang, Daqing Liu, Zhenzhen Hu, and Hanwang Zhang. More grounded image captioning by distilling image-text matching model. In IEEE Conference on Computer Vision and Pattern Recognition, pages 4776-4785, 8 2020. \ No newline at end of file diff --git a/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/images.zip b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..38336bd9454779b1a765c1c29beafdcc58767c7c --- /dev/null +++ b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5da9350f46131dc40fc9833d5c5c500efc1490843d20aa60a80a5c2c68fb45ca +size 549034 diff --git a/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/layout.json b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..546d419100f227bbcc36d475a765c2f08a07e911 --- /dev/null +++ b/weaklysupervisedgenerationandgroundingofvisualdescriptionswithconditionalgenerativemodels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6948e3a3d2a89d795882e14e16d52028f7616c6321c801d505f97a2a5e2ba843 +size 462234 diff --git a/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_content_list.json b/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..640d7a294a07eb19ed2cac4a3105dcf8b4cddcc0 --- /dev/null +++ b/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6292eeafbe024719660c63fc3add3c784a93cd2c819a6679929aa75770025e4d +size 85573 diff --git a/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_model.json b/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b06a9d9e8a0097d34e7cfe5ee6ba050266d503f5 --- /dev/null +++ b/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:053da440d586db48b741c447f5f6ee99942e498c017816ef28e57d13fed33dd2 +size 107740 diff --git a/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_origin.pdf b/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d461401847af121cc0ff710d070d21c1947e30f4 --- /dev/null +++ b/weaklysupervisedhighfidelityclothingmodelgeneration/192d2d5a-d84a-485e-96f9-891747c67fd6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:627d826964ec19a87fbcd0eab1ef8b8b136fb9bd10242dcc72b7a1c8610165de +size 9987433 diff --git a/weaklysupervisedhighfidelityclothingmodelgeneration/full.md b/weaklysupervisedhighfidelityclothingmodelgeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2f2b2edc488d676524f109a874247a5069a47224 --- /dev/null +++ b/weaklysupervisedhighfidelityclothingmodelgeneration/full.md @@ -0,0 +1,426 @@ +# Weakly Supervised High-Fidelity Clothing Model Generation + +Ruili Feng $^{1}$ , Cheng Ma $^{2,3}$ , Chengji Shen $^{2,3}$ , Xin Gao $^{3}$ , Zhenjiang Liu $^{3}$ , Xiaobo Li $^{3}$ , Kairi Ou $^{3}$ , Deli Zhao $^{3}$ , Zheng-Jun Zha $^{1*}$ + +1University of Science and Technology of China, Anhui, China +2Zhejiang University, Hangzhou, China +3Alibaba Group, Hangzhou, China + +ruilifengustc@gmail.com, {cheng.ma,chengji.shen}@zju.edu.cn, {zimu.gx,stan.lzj,xiaobo.lixb}@alibaba-inc.com, {mailokr,zhaodeli}@gmail.com, zhazj@ustc.edu.cn + +# Abstract + +The development of online economics arouses the demand of generating images of models on product clothes, to display new clothes and promote sales. However, the expensive proprietary model images challenge the existing image virtual try-on methods in this scenario, as most of them need to be trained on considerable amounts of model images accompanied with paired clothes images. In this paper, we propose a cheap yet scalable weakly-supervised method called Deep Generative Projection (DGP) to address this specific scenario. Lying in the heart of the proposed method is to imitate the process of human predicting the wearing effect, which is an unsupervised imagination based on life experience rather than computation rules learned from supervisions. Here a pretrained StyleGAN is used to capture the practical experience of wearing. Experiments show that projecting the rough alignment of clothing and body onto the StyleGAN space can yield photo-realistic wearing results. Experiments on real scene proprietary model images demonstrate the superiority of DGP over several state-of-the-art supervised methods when generating clothing model images. + +# 1. Introduction + +Taking pictures of models on product clothes is an essential demand for online apparel retails to display clothes and promote sales. However, it is highly expensive to hire models and professional studios to actually take those pictures of wearing each clothing. Thus image virtual try-on [11, 12, 15, 22, 24, 30, 42, 47, 53, 56], the technique that generates wearing results from clothing and model images, has rapidly aroused broad academic and industrial interests. + +![](images/a1f72352959cae1636b5b55834b84efc5a8b07663713c0b62c4cae2bea045fb6.jpg) +Model + +![](images/007fba87b5ff6256b26ffac1db3669110b38932f0c254f7e6de7eba60870806a.jpg) + +![](images/ac5b45b10cd25290c5b42d9ff4fbc68b0b3fc727513aaec182a9cc52eee58c8c.jpg) + +![](images/3984ff3fdadebe6ffbdb0fe09ef1ac320b17bf5d90f339aa69060cbb449f176b.jpg) + +![](images/99417968af390eb6668a1b793ecfe7e516deab367e19c4c17d704942d10a07f8.jpg) + +![](images/b85138bec518a62862dd41bd0a527630f2ecf2d1a8f49fcdeede846f1473a481.jpg) + +![](images/6b2b023188c0c57ba2b007ae06514ddd31e3bef878f945a340adb088f1d69362.jpg) + +![](images/010b118fbd8ddc6841107be51fddd688d0a55c267d8016cfbded5aff052d3e98.jpg) + +![](images/5a2c234625d0c9b2480d778dc4a85fcf6319b2ae35103110db7b863a0b6cd7c6.jpg) +Clothing + +![](images/1dcf27e0e05d9ac75daf52ee12aa95e4e3d4c975acee5c81847b16dff8156b47.jpg) + +![](images/de9b4a8080e9c198a2d8b196d9cc042f35d7e4cb44a62869b7074f6f0715002f.jpg) + +![](images/60439dd5fcb9ff16c834ae1763ba4d17fb01fb5938ba09b3b5124e19cb8a199d.jpg) +Synthesis results +Figure 1. Given a set of commercial models with underwear and different clothing images, the proposed method can generate realistic clothing model results with clear pattern reconstruction. + +A practical algorithm, however, must consider the cost to apply it in industrial scenarios. Existing image virtual try-on (VTO) methods are highly expensive to train. Most of them [22, 28, 30, 41, 53, 56] are trained on paired image data of clothing and a person on that clothing. Such paired data consume considerable labor cost thus is infeasible to collect at scale. Also, the testing data of clothing model generation should be proprietary model images as only they can be legally used in the final display on e-shop websites. Those images are highly expensive due to hiring commercial models and buying all necessary rights. Thus algorithms should avoid relying on those proprietary model images + +during training, while managing to bear the non-negligible performance drop incurred by discrepancy in testing and training. + +In response to those challenges, we propose Deep Generative Projection (DGP), a powerful weakly-supervised method to yield realistic try-on results while training on cheap unpaired data collected from the Web, which is motivated by the procedure of people predicting how they will look like while picking clothes. It is an imagination based on life experience rather than rules learned from paired annotations. People may pick up the clothes and align the clothes to their shoulders or necks, from which they then imagine the picture of wearing those clothes. Following this idea, the DGP method reproduces this process in the clothing model generation scenario. Given a clothing image and a proprietary model image, we first align the clothing to the model's body dominated by a simple perspective transformation [40] of four body key points. Then we project this rough alignment onto the synthesis space of a pretrained StyleGAN [32, 33]. The StyleGAN is trained on abundant unsupervised fashion images collected from the Web. Thus, it represents real-world knowledge of wearing. A couple of semantic and pattern searches will then yield the realistic clothing model image, as is shown in Fig. 1. The whole algorithm needs no paired data or proprietary model images during training, thus it is practical for the industrial scenario. + +In conclusion, the contributions of this paper include: + +- We propose the first framework to generate clothing model images for online clothing shops, which has not received enough attention in the virtual try-on community; +- The proposed method consumes only unpaired data, and no proprietary model images during the training, which is more practical for industrial applications than most existing methods; +- Our weakly-supervised method significantly outperforms some state-of-the-art supervised competitors in both numerical and visual quality, and demonstrates good robustness under preprocessing mistakes. + +# 2. Related Works + +Virtual Try-on Virtual try-on methods can be broadly divided into 3D-based methods [6, 19, 43, 44, 46] and 2D image-based [8, 11, 21, 22, 30, 53, 56, 58] methods. As 3D methods often induce extra resources in collecting data or physical simulation, 2D methods are generally more popular. Many existing 2D methods [8, 12, 16, 21, 22, 30] split the try-on procedure into a warping procedure and a synthesis procedure. The warping procedure learns to deform the target garment to fit the figure of the model image, while the synthesis procedure tries to merge the warped garment + +image with the model image. Such methodology demands paired data [22] to supervise the training of warping modules. While recent advances in GAN image synthesis also inspire 2D methods based on pretrained GANs. VOGUE [37, 38] adopts interpolation to search a latent code that can generate the target clothing in the latent space of a pretrained StyleGAN. StylePoseGAN [48] and pose with style [3] explore the rich style space of pretrained StyleGANs to manipulate the poses of synthesis images. Those works often omit the discussion of encoder or inversion technique to send the original images to StyleGANs. They also often have trouble in precisely reconstructing the pattern of clothes, and lose certain semantic information of the person or target clothing images. + +StyleGAN StyleGAN [31-33] is the dominating method in unconditional image synthesis. Since it is proposed, broad interests have been attracted to use StyleGANs in various domains of image manipulations [49, 51, 55, 56, 59]. Most previous works find that the style space [23, 49, 51, 59, 60], a feature layer after the first 8-layer MLP of the StyleGAN generator, reveals fascinating semantic controlling over synthesis images. Subsequent studies [45, 55] also confirm deeper layers of StyleGAN generator owning similar or even stronger ability. As the preprocessing of manipulating real images by StyleGAN, inverting real images to the style space of StyleGAN also receives special attention. Image2StyleGAN [1, 2] finds the inverted style code through solving an optimization problem based on distance metrics. While pSp [45] and e4e [52] train explicit encoders to obtain the style code, and claim that explicit encoders can acquire more meaningful semantics for subsequent manipulations. + +# 3. Task Setting + +In this paper, the new proposed clothing model generation task is different from typical VTO scenarios. Differences are elaborated as follows. + +Gaps Between Training and Testing Environments The proprietary model images are too costly to construct a sufficiently large training set. Thus algorithms should avoid relying on those images during training. However, they need to test performance on those images, as only proprietary model images can be legally used in the product display. Generally, the solution to the clothing model generation task should be stable under such a dilemma. + +Original Clothes of Models Models wearing thick long sleeve clothes can perturb the image generation process. While the task here is irrelevant to the original clothes of models, we only consider cases on simple sleeveless clothes like underwear or vest. + +![](images/09b36158d4fce3ac33c764aabaf61a5f8614c6a5f1d93281d405da73e85c4d70.jpg) +Figure 2. Framework of the proposed DGP method. A rough alignment $\pmb{x}_a$ (a) of model and clothing images is fed into a novel projection operator (b), which truncates flaws of the aligned image, and transfers it into a projection code $\pmb{w}_0$ that yields realistic synthesis and similar semantics on the StyleGAN synthesis space $\pmb{G}_{\theta}$ . This process is implemented by projecting the encoding code $\pmb{E}(\pmb{x}_a)$ of a pretrained encoder $\pmb{E}$ onto the high-density region of style space. A semantic search (c) then solves a constraint optimization problem on the synthesis space of StyleGAN to find the semantic code $\pmb{w}_1$ that recovers missing semantics. A pattern search (d) further adjusts parts of the StyleGAN parameters from $\pmb{\theta}$ to $\pmb{\theta} + \Delta \pmb{\theta}$ . The new synthesis space $\pmb{G}_{\theta + \Delta \theta}$ then precisely reconstructs patterns of the original clothing in $\pmb{G}_{\theta + \Delta \theta}(\pmb{w}_1)$ . $\pmb{G}_{\theta + \Delta \theta}(\pmb{w}_1)$ is the final output of the DGP method. + +Benchmark The Commercial Model Image dataset (CMI) is collected to serve as a benchmark for real scene applications. The CMI dataset includes 2,348 images of models on underwear, including different genders, ages, body shapes, and poses. All model images are taken in professional studios and granted portrait rights. In addition, we also collect 1,881 clothing images with clean backgrounds from e-commerce platforms, evenly containing 16 categories, and corresponding category annotations. There are no paired relations between the clothing images and model images, and both those images are unavailable during the training phase. Please consult the supplementary materials for details of this dataset. + +# 4. Deep Generative Projection + +Overview Given a model image and a clothing image, we follow the procedure that people predict try-on results, and decompose it as a fast first impression, and a further mulling over the impression. To imitate the first impression, a novel projection operator is employed on the StyleGAN space. It projects a rough alignment of clothing and body onto the synthesis space of a pretrained StyleGAN. Different from typical literature in encoding GANs, here we do not pursue an exact reconstruction of the rough alignment, but a domain that preserves similar semantics yet maintains synthesis fidelity. The 'warping' of the proposed method is actually accomplished in this step, as realistic synthesis always yields realistic wearing. The further mulling of impression is conducted by two fine-grained information searches in the neighborhood of the + +encoder projection. One is the semantic search in the feature space of the StyleGAN. It recovers semantic information lost in the projection phase. The other is the pattern search in the parameter space of the StyleGAN to reconstruct the pattern of clothing. By strictly constraining these two steps in the neighborhood of the encoder projection, we can precisely reconstruct the target clothing while preserving the fidelity of the usual StyleGAN synthesis. A simple review of the proposed method is provided in Fig. 2. + +Rough Alignment The rough alignment aligns the clothing and model at key points of neck, hip, elbow, and wrist, as shown in Fig. 2 (a). The alignment of the neck and hip key points is implemented by a perspective transformation [40], while the alignment of elbow and writs is implemented by the As Rigid As Possible (ARAP) [4,27,29] algorithm. The ARAP is a classical non-parametric deformation algorithm, which is efficient in controlling key point alignment. For different types of clothes, the alignment rule admits slight differences. For example, sleeveless clothes do not involve alignment on the elbow and wrist. If hands or arms are in front of the body, they will further be cropped and stuck on top of the aligned image to maintain consistency. See the supplementary materials for more details. + +Training of StyleGAN To train the StyleGAN, we collect an E-Shop Fashion (ESF) dataset of 180,000 clothing model images from the Internet. The images are all cropped to the region between jaw and thigh, and resized to the resolution + +of $512 \times 512$ . The whole dataset is split into 170,000 training samples and 10,000 testing samples. The StyleGAN is trained on the training dataset and the training terminates at the FID score of 2.16. More details about the StyleGAN and ESF dataset can be found in the supplementary materials. + +# 4.1. Projection + +The projection is the key to the success of the DGP method, as it offers a compact and rich domain for the subsequent mulling of details. This section gives a theoretical perspective of good projection in our task. + +High-density Region of Style Space Following previous studies on StyleGAN synthesis [1, 49, 51, 60], we focus on projecting images to the style space $\mathcal{W}+$ of the StyleGAN generator $G$ . The style space $\mathcal{W}+$ is the feature layer produced by the first 8-layer MLP of the StyleGAN generator. It reveals fascinating disentanglement of semantic features [33, 49]. Different from GAN inversion [1, 2, 45, 52] techniques focusing on the exact reconstruction of input, here we care more about synthesis fidelity instead of reconstruction accuracy. This is because the exact reconstruction of rough alignment is useless for our task. As a feature space, points in the style space $\mathcal{W}+$ are not uniformly distributed. Previous works [1, 33, 49] have demonstrated that regions of higher sampling probability density can yield much more plausible synthesis than those of lower density. To strike a good balance between fidelity and similarity, the projection should always land on the high-density region of style space $\mathcal{W}+$ , and give reasonable strength to each semantic component. + +Thus, instead of projecting the rough alignment onto $\mathcal{W}+$ directly, we propose to project it onto each of the principal components of $\mathcal{W}+$ space. The projection on each component is further truncated if it far exceeds the average strength of $\mathcal{W}+$ space on that component. We will prove later how this operation can help anchor the projection inside the high-density region. + +The Projector Rigorously, we sample five million points on the $\mathcal{W}+$ space of the StyleGAN, and compute the PCA decomposition [54] of those points. We then get the mean value $\pmb{\mu}$ of $\mathcal{W}+$ , covariance matrix $\pmb{\Sigma}$ , and a set of principal components $\pmb{Q} = (q_{1},\dots,q_{n})$ together with their strengths stored in $\Lambda = \text{diag}\{\sigma_1,\dots,\sigma_n\}$ , where $n$ denotes the dimension of $\mathcal{W}+$ , and $\pmb{\Sigma} = \pmb{Q}\pmb{\Lambda}\pmb{Q}^{T}$ . Then, instead of training an encoder $\pmb{E}$ to learn the style code directly, we propose to learn a series of principal strengths $\pmb{s} = (s_{1},s_{2},\dots,s_{n})^{T}$ of a given image, and truncate those principal strengths to reproduce the style code in an appropriate region. Given a rough alignment image $\pmb{x}_{a}$ , the style code $\pmb{w}_{0}$ then can be + +computed as + +$$ +\boldsymbol {s} = \boldsymbol {E} (\boldsymbol {x} _ {a}), \tag {1} +$$ + +$$ +\begin{array}{l} \boldsymbol {w} _ {0} = T r \left(\boldsymbol {q} _ {1} s _ {1} \sqrt {\sigma_ {1}} + \dots \boldsymbol {q} _ {n} s _ {n} \sqrt {\sigma_ {n}}\right) + \boldsymbol {\mu} (2) \\ = Q \Lambda^ {\frac {1}{2}} T r (s) + \mu , (3) \\ \end{array} +$$ + +where $Tr$ is a truncation operator with cutoff coefficient $\psi >0$ , such that + +$$ +T r (\boldsymbol {v}) = \left\{ \begin{array}{l} \boldsymbol {v}, \| \boldsymbol {v} \| _ {2} < \psi , \\ \frac {\boldsymbol {v}}{\| \boldsymbol {v} \| _ {2}} \psi , \| \boldsymbol {v} \| _ {2} \geq \psi . \end{array} \right. \tag {4} +$$ + +For simplicity, we will call the operation + +$$ +\boldsymbol {w} = \boldsymbol {P} (\boldsymbol {x}) = T r (\boldsymbol {Q} \boldsymbol {E} \left(\boldsymbol {x} _ {a}\right)) + \boldsymbol {\mu} \tag {5} +$$ + +as projection, and $P$ the projector. Given a rough alignment image $x_{a}$ , the projector $P$ is used to project it onto the synthesis space of StyleGAN as + +$$ +\boldsymbol {w} = \boldsymbol {P} \left(\boldsymbol {x} _ {a}\right). \tag {6} +$$ + +Property of the Projector The projector may lose certain information represented by the small principal components after truncation, but it will enforce the projection landing on the high-density region of the style space. Rigorously, we have the following theorem: + +Theorem 1 Assume that $\mathcal{W}+$ follows the multi-variable Gaussian distribution, then the output of the projector $P$ will always fall in the high-density region of $\mathcal{W}+$ , which is an $n$ -dimensional ellipse $\mathcal{E}$ with axes $q_{1}, \ldots, q_{n}$ , and axis lengths $\psi \sigma_{1}^{-\frac{1}{2}}, \ldots, \psi \sigma_{n}^{-\frac{1}{2}}$ . Rigorously, let $\omega_{n-1}$ denote the volume of the $n-1$ dimensional unit ball, for a random sample $\mathbf{w}$ from $\mathcal{W}+$ , the possibility of it outside $\mathcal{E}$ is + +$$ +\mathbb {P} (\boldsymbol {w} \notin \mathcal {E}) = \mathbb {P} \left(\chi_ {n} ^ {2} > \psi^ {2}\right), \tag {7} +$$ + +where $\chi_n^2$ is the $n$ -dimensional Chi-square distribution [36], and $\mathbb{P}(\chi_n^2 > \psi^2)$ drops to zero drastically as $\psi$ grows larger; and for an arbitrary input $\pmb{x}$ , we have + +$$ +\boldsymbol {P} (\boldsymbol {x}) \in \mathcal {E} = \left\{\boldsymbol {w}: \left(\boldsymbol {w} - \boldsymbol {\mu}\right) ^ {T} \boldsymbol {\Sigma} ^ {- 1} (\boldsymbol {w} - \boldsymbol {\mu}) \leq \psi^ {2} \right\}. \tag {8} +$$ + +Training of the Projector We employ a simple ResNet50 [25] architecture for the encoder network $\pmb{E}$ , and train the projector $\pmb{P}$ on the training data distribution $p_{data}$ of the pretrained StyleGAN $\pmb{G}$ . The training loss consists of a pixel similarity $\mathcal{L}_p$ , a perceptual similarity $\mathcal{L}_f$ , an attribute similarity $\mathcal{L}_{attr}$ , and an adversarial fidelity $\mathcal{L}_{adv}$ : + +$$ +\min _ {P} \lambda_ {p} \mathcal {L} _ {p} + \lambda_ {f} \mathcal {L} _ {f} + \lambda_ {\text {a t t r}} \mathcal {L} _ {\text {a t t r}} + \lambda_ {\text {a d v}} \mathcal {L} _ {\text {a d v}}, \tag {9} +$$ + +where $\lambda_p, \lambda_f, \lambda_{attr}, \lambda_{adv}$ are hyperparameters. The pixel similarity is directly captured by $l_2$ distance in the pixel space: + +$$ +\mathcal {L} _ {p} = \mathbb {E} _ {\boldsymbol {x} \sim p _ {d a t a}} [ \| \boldsymbol {G} (\boldsymbol {P} (\boldsymbol {x})) - \boldsymbol {x} \| _ {2} ^ {2} ]. \tag {10} +$$ + +The perceptual similarity is captured by a pretrained VGG16 network $V$ . The VGG16 [50] network $V$ is trained on ImageNet [9], and the final convolution layer is taken as the feature space to compute the similarity: + +$$ +\mathcal {L} _ {f} = \mathbb {E} _ {\boldsymbol {x} \sim p _ {d a t a}} [ \| \boldsymbol {V} (\boldsymbol {G} (\boldsymbol {P} (\boldsymbol {x}))) - \boldsymbol {V} (\boldsymbol {x}) \| _ {2} ^ {2} ]. \tag {11} +$$ + +The attribute similarity is captured by a pretrained clothing attribute classifier $\mathbf{R}$ , which is trained on the FashionAI [61] dataset. It is a simple ResNet50 [25] architecture that identifies seven different attributes of clothing, like types of the sleeve and neckline. The final convolution layer is taken as the feature space to compute the similarity: (see supplementary materials for the detail of the attribute classifier) + +$$ +\mathcal {L} _ {\text {a t t r}} = \mathbb {E} _ {\boldsymbol {x} \sim p _ {\text {d a t a}}} \left[ \left\| \boldsymbol {R} (\boldsymbol {G} (\boldsymbol {E} (\boldsymbol {x}))) - \boldsymbol {R} (\boldsymbol {x}) \right\| _ {2} ^ {2} \right]. \tag {12} +$$ + +The adversarial fidelity loss is computed through carrying on the adversarial game of pretrained StyleGAN generator $G$ and discriminator $D$ . The discriminator $D$ is asked to distinguish the projected images $G(P(x))$ from real images, and the projector to try to fool the discriminator by projecting images to regions of higher fidelity. The generator network $G$ is frozen during training, while $P$ and $D$ are alternatively optimized as in training a typical GAN [18]: + +$$ +\begin{array}{l} \mathcal {L} _ {a d v} = \max _ {\boldsymbol {D}} \mathbb {E} _ {\boldsymbol {x} \sim p _ {d a t a}} [ \log (1 - \boldsymbol {D} (\boldsymbol {G} (\boldsymbol {P} (\boldsymbol {x}))) ] \tag {13} \\ \left. + \log (\boldsymbol {D} (\boldsymbol {x})) \right]. \\ \end{array} +$$ + +Imagination Ability of the Projector The projector can serve as a fascinating feature extractor of arbitrary image input. Though it is only trained to reconstruct real images, it can also extract semantic features from unreal images produced by splicing, crawling, or warping. The extracted features can then be sent to the generator to reproduce those semantics in a plausible way. Fig. 3 illustrates this ability of the projector. This ability is endowed by forcing the output of the encoder to stay inside the high-density domain of the generator during training. Thus whatever inputs will be projected to a suitable domain of the generator knowledge that only produces plausible images. + +Projector vs. the SOTA Encoder As we have explained, the projector is designed to encourage fidelity rather than accuracy of reconstruction. Here we compare its reconstruction with the stat-of-the-art StyleGAN encoder pSp [45]. The results are reported in Fig. 4. When handling unrealistic rough alignment results, the projector produces far more plausible results than pSp. On the other hand, pSp is faithful to the rough alignment, thus can inherit the unrealistic effects and generate images of low fidelity. + +![](images/aa6a727c0b6e18c130391a8a2196fc5b6dace26fda6b9d206f91c87429630b12.jpg) +Figure 3. The imagination ability of the projector. The first row shows the inputs, each of which has some unrealistic defects. The second row shows the results of the projection. Although the encoder fails to preserve all semantics and details of the original images, it always generates plausible outputs thanks to it staying inside the high-density region of StyleGAN. + +# 4.2. Semantic Search + +The style code $\mathbf{w}$ discovered by the projector can only reproduce some high-level semantics (such as the style and category of the garment, pose of the model). To obtain fine-grained semantics, we need an optimization-guided search inside the neighborhood of the projection. The optimization problem is + +$$ +\min _ {\boldsymbol {w} \in \mathcal {C}} \eta_ {p} l _ {p} + \eta_ {f} l _ {f} + \eta_ {\text {a t t r}} l _ {\text {a t t r}} + \eta_ {\text {a d v}} l _ {\text {a d v}}, \tag {14} +$$ + +$$ +l _ {p} = \left\| W * \boldsymbol {G} (\boldsymbol {w}) - W * \boldsymbol {x} _ {a} \right\| _ {2} ^ {2}, \tag {15} +$$ + +$$ +l _ {f} = \left\| \boldsymbol {V} \left(W * \boldsymbol {G} (\boldsymbol {w})\right) - \boldsymbol {V} \left(W * \boldsymbol {x} _ {a}\right) \right\| _ {2} ^ {2}, \tag {16} +$$ + +$$ +l _ {a t t r} = \left\| \boldsymbol {R} \left(W * \boldsymbol {G} (\boldsymbol {w})\right) - \boldsymbol {R} \left(W * \boldsymbol {x} _ {a}\right) \right\| _ {2} ^ {2}, \tag {17} +$$ + +$$ +l _ {a d v} = \log [ 1 - \boldsymbol {D} (\boldsymbol {G} (\boldsymbol {w})) ], \tag {18} +$$ + +where $\mathcal{C}$ is the neighborhood of $\boldsymbol{w}$ , $\boldsymbol{R}$ and $\boldsymbol{V}$ are pretrained clothing attribute classifier and VGG16 network introduced in the Sec. 4.1 respectively, $\boldsymbol{x}_a$ is the rough alignment of clothing and model, $\eta_p, \eta_f, \eta_{attr}, \eta_{adv}$ are hyperparameters, and $W$ is a dynamic spatial weight matrix to adjust the strength of optimization among different regions. Central regions of the body and clothing have higher weights, while marginal regions have tiny weights. This design allows the generator to adjust the marginal contents of synthesis according to central regions. We enforce the limitation of $\boldsymbol{w}$ staying in $\mathcal{C}$ to maintain the whole optimization inside the StyleGAN domain of high synthesis fidelity. + +Dynamic Spatial Weight $W$ The dynamic spatial weight matrix is an exponential function over the intersection of the model body and the aligned clothing. Let $I$ denote the identity function for intersection of body and clothing, $\partial I$ denote its boundary, and $d((i,j),\partial I)$ denote the distance of pixel position $(i,j)$ to the boundary of $I$ , then $W$ is computed as + +$$ +W _ {i j} = \left\{ \begin{array}{l l} 1 - \exp (- d ((i, j), \partial I) ^ {2}), & I (i j) = 1, \\ 0, & I (i j) = 0. \end{array} \right. \tag {19} +$$ + +![](images/9fb90ff939735ce98ddcf900e647ab2c652577e1d92f08d653bde68a8d0e3c16.jpg) +Figure 4. Projector vs. pSp [45]. pSp will generate a less plausible but more similar reconstruction to the input image. While the projector always generates plausible images regardless of the inputs. + +![](images/61eea5ce25eb26935b99c7968cd720a2ad9a2c726b74ea7c858ba5a61154d696.jpg) +Figure 5. Influence of the Projected Gradient Descent (PGD) [39]. Without PGD, the result of pattern search will tend to overfit the original rough alignment image, which is what we do not want in this phase, as the warping of rough alignment is usually wrong. + +More detailed instructions on computing $W$ can be found in the supplementary materials. + +Solve the Constrain $\mathcal{C}$ To make sure that the semantic search stays in the high-density region of StyleGAN knowledge space, we use a constraint optimization strategy that has been widely used in the field of adversarial attacks [13, 20, 39]. Given a convex optimization problem [5] + +$$ +\min _ {\boldsymbol {w}} f (\boldsymbol {w}) \text {s . t .} \boldsymbol {w} \in \mathcal {C}, \tag {20} +$$ + +where $\mathcal{C}$ is a convex set, we can solve it by projecting the updated parameter onto $\mathcal{C}$ after each iteration of gradient descent, as shown in Algorithm 1 [39]. + +In the experiments, we find that the spherical neighborhood is good enough to constrain the optimization inside the high-density region of StyleGAN knowledge space. Thus we set $\mathcal{C}$ as a ball $B(\pmb{w}_0, 4)$ centered at the projector output $\pmb{w}_0$ with radius 4. Note that problem (22) then has a closed-form solution: + +$$ +\begin{array}{l} \boldsymbol {w} _ {k + 1} = \arg \min _ {\boldsymbol {w} \in \mathcal {C}} \| \boldsymbol {w} _ {k + 1} - \boldsymbol {w} \| (23) \\ = \left\{ \begin{array}{l l} \boldsymbol {w} _ {0} + 4 \frac {\boldsymbol {w} _ {k + 1} - \boldsymbol {w}}{\| \boldsymbol {w} _ {k + 1} - \boldsymbol {w} \| _ {2}}, & \| \boldsymbol {w} _ {k + 1} - \boldsymbol {w} _ {m} \| _ {2} > 4, \\ \boldsymbol {w} _ {k + 1}, & \| \boldsymbol {w} _ {k + 1} - \boldsymbol {w} \| _ {2} \leq 4. \end{array} \right. (24) \\ \end{array} +$$ + +Problem (14) then can be solved efficiently by Algorithm 1. + +# Algorithm 1 Projected Gradient Descent. + +Input: Hyperparameter $\gamma$ , objective $f(\pmb{w})$ , convex constraint region $\mathcal{C}$ , initial point $\pmb{w}_0 \in \mathcal{C}$ , counter $k = 0$ . + +# repeat + +Compute the gradient of $f$ at $\pmb{w}_k$ as $\nabla f(\pmb{w}_k)$ . Update $\pmb{w}_k$ by + +$$ +\boldsymbol {w} _ {k + 1} = \boldsymbol {w} _ {k} - \gamma \nabla f (\boldsymbol {w} _ {k}). \tag {21} +$$ + +Project $\pmb{w}_{k + 1}$ back to $\mathcal{C}$ by + +$$ +\boldsymbol {w} _ {k + 1} = \arg \min _ {\boldsymbol {w} \in \mathcal {C}} \| \boldsymbol {w} _ {k + 1} - \boldsymbol {w} \|. \tag {22} +$$ + +Update counter as $k = k + 1$ . + +until Convergence. + +Output: The numerical solution $\boldsymbol{w}_k$ of problem (20). + +Necessity of Neighborhood Constraint $\boldsymbol{w} \in \mathcal{C}$ The neighborhood constraint $\boldsymbol{w} \in \mathcal{C}$ is very important in the semantic search. Fig. 5 reports the results with and without it. Without this constraint and the Projected Gradient Descent (PGD), the optimization quickly runs out of the high-density region of the generator and produces implausible details. + +# 4.3. Pattern Search + +The pretrained generator contains rich semantic information. However, for a specific pattern like characters, we may not be able to reconstruct it accurately by semantic search. Our strategy here turns to optimizing some key parameters $\theta$ of the generator to 'overfit' such pattern. We find that optimizing the side-way noise injection parameters [1,2, 14, 32] in the StyleGAN Network is a good choice. Those parameters are proven to decide the local details and stochastic variations of generated images, as is carefully studied in the original paper of StyleGAN [32, 33]. As our purpose is to 'overfit' the pattern, here we do not need a feature or attribute loss to close the semantics. The optimization only involves pixel loss and adversarial loss to preserve fidelity: + +$$ +\begin{array}{l} \min _ {\boldsymbol {\theta} \in B \left(\boldsymbol {\theta} _ {0}, 4\right)} \eta_ {p} \| W * \boldsymbol {G} _ {\boldsymbol {\theta}} (\boldsymbol {w}) - W * \boldsymbol {x} _ {a} \| _ {2} \tag {25} \\ + \log (1 - D (G _ {\theta} (\boldsymbol {w}))), \\ \end{array} +$$ + +where $\theta_0$ is the initial value of those parameters in the pretrained StyleGAN, and $B(\theta_0, 4)$ is a ball centered at it with radius 4. We again solve the problem with Algorithm 1. The result is the final output of the DGP pipeline. + +# 5. Experiments + +In this section we evaluate the proposed weakly-supervised DGP method from four different aspects, and + +![](images/914898345cdc71e4ff5d98e3b8e86ad60815ab079f9e68c15794211c4ee716b9.jpg) + +![](images/638e88ddd376752e01830a635ca076b06dbbc72c730d40d7c3e649e487ae681e.jpg) +Projection + +![](images/a297c2b9ae23ce2c74e8bd00b7062c8c7f5472563ea3c4f56e5d22529cfd6ad3.jpg) +Model + +![](images/89dfdef10349089d201189909534ee486238abae4915e4c25a5cf0e86128417e.jpg) +Only $\theta$ + +![](images/10f69d0cba83f8fde4845ac171f4d4be64966c5822d2494fb3446cc4a784f38c.jpg) +Only $w$ +Figure 6. Optimizing $\theta$ alone recovers better texture details. Optimizing $\boldsymbol{w}$ alone recovers better semantic information such as the overall color and shape of clothing characteristics. Optimizing $\theta$ and $\boldsymbol{w}$ at the same time gets the optimal results. + +![](images/2328719fb70bcf6ab7c8099ed7312c6444899527802f7f02b3b295c037adffd0.jpg) +Both $w$ and + +![](images/0f8e888e4826f25e24e46bb9492eb06eb0c677382297969de7b752fa4b864fee.jpg) +$\theta$ Clothing + +compare it with several supervised state-of-the-art competitors. Sec. 5.1 justifies the effect of the optimization components of the DGP method. Sec. 5.2 evaluates the performance on clothing model generation of the DGP method against some supervised competitors trained on paired image data. Here we focus on three state-of-the-art supervised methods, VITON-HD [8], PF-AFN [16], and ACGPN [56]. For experiments on all of those supervised methods, we use the pretrained models provided in their official repositories [7, 17, 57]. Sec. 5.3 further evaluates the performance on the MPV [11] dataset which is very similar to the training data [22] of competitor methods. It is worthwhile to mention that their original training set VITON [22] is no longer legal for academic use, thus MPV [11] may be the most pleasant dataset we can find for the competitor methods. Sec. 5.4 evaluates the robustness of the proposed method against mistakes in the preprocessing. Throughout this paper, the optimizations of both semantic and pattern searches are terminated after 1,000 steps of projected gradient descent. Supplementary materials include table recording hyper-parameter selection of training and optimization objectives. + +# 5.1. Ablation Study + +In this section we conduct extensive experiments to verify the two optimization components of the DGP method. As shown in Fig. 6, optimizing $\theta$ alone recovers better texture details, but is less effective in reconstructing semantic information. Optimizing $w$ alone, on the contrary, recovers better semantic information such as the overall color and shape, but poorer details of patterns and letters. Optimizing $\theta$ and $w$ at the same time yields the optimal results. + +# 5.2. Clothing Model Generation + +The real scene clothing model generation task demands algorithms to handle unseen model and clothing images from unknown distributions. To evaluate algorithms under this scenario, we conduct experiments on the CMI benchmark dataset introduced in Sec. 3, which is unavailable for all methods during training. For each model image of the CMI dataset, we randomly pick up a garment image from the + +Table 1. Numerical metrics of DGP, ACGPN, PF-AFN, and VITON-HD on CMI and MPV datasets. $\downarrow$ indicates lower is better. + +
MethodsCMIMPV
FID↓SWD↓FID↓SWD↓
ACGPN [56]137.9121.381.190.4
PF-AFN [16]97.376.767.867.1
VITON-HD [8]87.556.140.652.7
DGP (Ours)51.622.448.436.7
+ +![](images/5b9f74d56b7991330837ebcda56398a8c2f8a0ace07524a9aa20da85f1ba952d.jpg) + +![](images/479913b8481f0e8e6f70a13545e06be0abc164a36d4b81f5922b178f65a4d7ab.jpg) +(b) Best deformation + +![](images/d9e845b0cd99573126b924ebe05fe0b2a997283656e064d53e2262d73d4ad37a.jpg) + +![](images/bd70b7d5d52cba7d95a0ab5afb5386a2140bd8b3902c89b616ef5c232d3f7c29.jpg) +(a) Clearest pattern +(d) Clearest pattern +Figure 7. User study on CMI ((a), (b), (c)) and MPV ((d), (e), (f)) datasets. The proposed weakly-supervised method outperforms all supervised competitors significantly over all three aspects. + +![](images/45fe6c440865368f3c2fe7e93a27cebc47682b0fa114fcd38a3e4047f02ffceb.jpg) +(e) Best deformation + +![](images/47f47265a559d0421b41da84d6f8710cde9d5f1e7916a8f7d5b329e28bedca01.jpg) +(c) Best overall effect +(f) Best overall effect + +1,881 clothing images of CMI. It yields a testing set of 2,348 model and clothing pairs. All qualitative and quantitative evaluations are conducted on the 2,348 image pairs. The results are reported in Fig. 7, 8, and Tab. 1. + +Qualitative Comparison Fig. 8 reports the qualitative comparison on the CMI dataset. The results reflect the advantages of the proposed method from three aspects. First, while not trained on the CMI dataset, the proposed method still works properly, with realistic synthesis. The competitors are overall less satisfactory, and work poorly in cases of complicated unseen clothes. Second, the proposed method synthesizes much clear patterns, while competitor methods often blur the patterns. Third, the proposed method can handle complicated clothing like coats, but competitor methods often fail in these cases. + +Quantitative Comparison To quantitatively compare DGP with its competitors, we also measure the Fréchet Inception Distance (FID) [26] and Sliced Wasserstein Distance (SWD) [10, 34, 35] of result images. While the CMI dataset does not contain ground-truth data, here the testing set of the previously mentioned E-Shop Fashion dataset is used as the reference images. All images are cropped to + +![](images/85f884114c0f7dbbc1ad762ddbb21942b7c292ba230d8d613944d58e90a5466c.jpg) +Figure 8. Comparison on the CMI and MPV datasets. The supervised competitor methods are basically less appealing, and perform especially poorly on complicated clothing like coats. + +the same region and then resized to $512 \times 512$ resolution for a fair comparison. The results are reported in Tab. 1. A user study is further conducted on the visual quality of the wearing results from three aspects: 1) which method generates the clearest pattern; 2) which method generates the most realistic wearing; 3) and which method generates the best overall effect. The results are reported in Fig. 7. Both numerical metrics and user study confirm the superiority of the proposed method. Details of user study are presented in supplementary materials. + +# 5.3. Comparison on MPV Dataset + +To challenge the proposed DGP method in an unfair setting, we further compare the results of all those methods on the MPV dataset. The MPV dataset is collected from the same source as the VITON dataset, which is the training set of the competitor methods and is no longer available due to legal issues. While DGP is not trained on MPV or VITON, the superiority in this scenario can be even more attractive. We pick 1,476 image pairs of person and clothing from the MPV dataset to construct the testing set. We report qualitative comparison in Fig. 8, numerical metrics of FID and SWD in Tab. 1, and user study results in Fig. 7. Here an independent sampling of 1,476 images from MPV is used as the reference images to compute FID and SWD. The proposed method still maintains advantages in most aspects, and yields the same appealing results as in the CMI dataset. + +# 5.4. Robustness of DGP + +The imagination ability in Sec. 4.1 of the projector is very appealing for the clothing model generation. So this section further investigates how this ability can help the + +DGP method overcome mistakes in the preprocessing period. We deliberately feed the DGP method with flawed rough alignment images, such as missing parts of clothing, wrong key point alignments, and zigzag clothing boundaries. We then observe how the DGP method will perform with those mistakes. The results are reported in supplementary material, which confirm that DGP can easily correct these tiny mistakes, and yield realistic synthesis in the final results. + +# 6. Conclusion + +This paper studies the clothing model generation problem for online clothing retails. We propose a weakly supervised method to ease the demands of paired training data in typical virtual try-on algorithms. The proposed method casts the problem of warping clothing images to models' bodies into projecting a rough alignment of them onto the knowledge space of a pretrained StyleGAN. Extensive experiments demonstrate the superiority of our unpaired methods over several SOTA competitors trained with paired data. Future studies will focus on easing time consumption and increasing generality on extremely complicated poses of models. + +# Acknowledgment + +This work was supported by the National Key R&D Program of China under Grant 2020AAA0105702, National Natural Science Foundation of China (NSFC) under Grant U19B2038, the University Synergy Innovation Program of Anhui Province under Grants GXXT-2019-025, and the Alibaba-Zhejiang University Joint Research Institute of Frontier Technologies. + +# References + +[1] Rameen Abdul, Yipeng Qin, and Peter Wonka. Image2StyleGAN: How to embed images into the StyleGAN latent space? In Int. Conf. Comput. Vis., pages 4432-4441, 2019. 2, 4, 6 +[2] Rameen Abdul, Yipeng Qin, and Peter Wonka. Image2StyleGAN++: How to edit the embedded images? In IEEE Conf. Comput. Vis. Pattern Recog., pages 8296-8305, 2020. 2, 4, 6 +[3] Badour AlBahar, Jingwan Lu, Jimei Yang, Zhixin Shu, Eli Shechtman, and Jia-Bin Huang. Pose with style: Detail-preserving pose-guided image synthesis with conditional StyleGAN. arXiv preprint arXiv:2109.06166, 2021. 2 +[4] Marc Alexa, Daniel Cohen-Or, and David Levin. As-rigid-as-possible shape interpolation. In Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, pages 157–164, 2000. 3 +[5] Stephen Boyd, Stephen P Boyd, and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. 6 +[6] Remi Brouet, Alla Sheffer, Laurence Boissieux, and Marie-Paule Cani. Design preserving garment transfer. ACM Trans. Graph., 31(4):Article-No, 2012. 2 +[7] Seunghwan Choi, Sunghyun Park, Minsoo Lee, and Jaegul Choo. VITON-HD - official pytorch implementation. https://github.com/shadow2496/VITON-HD, 2021.7 +[8] Seunghwan Choi, Sunghyun Park, Minsoo Lee, and Jaegul Choo. VITON-HD: High-resolution virtual try-on via misalignment-aware normalization. In IEEE Conf. Comput. Vis. Pattern Recog., pages 14131-14140, 2021. 2, 7 +[9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conf. Comput. Vis. Pattern Recog., pages 248–255. IEEE, 2009. 5 +[10] Ishan Deshpande, Ziyu Zhang, and Alexander G Schwing. Generative modeling using the sliced Wasserstein distance. In IEEE Conf. Comput. Vis. Pattern Recog., pages 3483-3491, 2018. 7 +[11] Haoye Dong, Xiaodan Liang, Xiaohui Shen, Bochao Wang, Hanjiang Lai, Jia Zhu, Zhiting Hu, and Jian Yin. Towards multi-pose guided virtual try-on network. In Int. Conf. Comput. Vis., pages 9026-9035, 2019. 1, 2, 7 +[12] Haoye Dong, Xiaodan Liang, Xiaohui Shen, Bowen Wu, Bing-Cheng Chen, and Jian Yin. FW-GAN: Flow-navigated warping GAN for video virtual try-on. In Int. Conf. Comput. Vis., pages 1161-1170, 2019. 1, 2 +[13] Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In IEEE Conf. Comput. Vis. Pattern Recog., pages 9185-9193, 2018. 6 +[14] Ruili Feng, Deli Zhao, and Zheng-Jun Zha. Understanding noise injection in GANs. In Proc. Int. Conf. Machine Learning, pages 3284-3293. PMLR, 2021. 6 +[15] Xin Gao, Zhenjiang Liu, Zunlei Feng, Chengji Shen, Kairi Ou, Haihong Tang, and Mingli Song. Shape controllable virtual try-on for underwear models. In ACM Int. Conf. Multimedia, pages 563-572, 2021. 1 + +[16] Yuying Ge, Yibing Song, Ruimao Zhang, Chongjian Ge, Wei Liu, and Ping Luo. Parser-free virtual try-on via distilling appearance flows. In IEEE Conf. Comput. Vis. Pattern Recog., pages 8485-8493, 2021. 2, 7 +[17] Yuying Ge, Yibing Song, Ruimao Zhang, Chongjian Ge, Wei Liu, and Ping Luo. Parser-free virtual try-on via distilling appearance flows. https://github.com/gyuying/PF-AFN, 2021.7 +[18] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Adv. Neural Inform. Process. Syst., 27, 2014. 5 +[19] Peng Guan, Loretta Reiss, David A Hirshberg, Alexander Weiss, and Michael J Black. Drape: Dressing any person. ACM Trans. Graph., 31(4):1-10, 2012. 2 +[20] Chuan Guo, Jacob Gardner, Yurong You, Andrew Gordon Wilson, and Kilian Weinberger. Simple black-box adversarial attacks. In Proc. Int. Conf. Machine Learning, pages 2484-2493. PMLR, 2019. 6 +[21] Xintong Han, Xiaojun Hu, Weilin Huang, and Matthew R Scott. Clothflow: A flow-based model for clothed person generation. In Int. Conf. Comput. Vis., pages 10471-10480, 2019. 2 +[22] Xintong Han, Zuxuan Wu, Zhe Wu, Ruichi Yu, and Larry S Davis. VITON: An image-based virtual try-on network. In IEEE Conf. Comput. Vis. Pattern Recog., pages 7543-7552, 2018. 1, 2, 7 +[23] Erik Härkönen, Aaron Hertzmann, Jaakko Lehtinen, and Sylvain Paris. GANspace: Discovering interpretable GAN controls. Adv. Neural Inform. Process. Syst., 33:9841-9850, 2020. 2 +[24] Stefan Hauswiesner, Matthias Straka, and Gerhard Reitmayr. Virtual try-on through image-based rendering. IEEE Trans. Vis. Comput. Graph., 19(9):1552-1565, 2013. 1 +[25] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conf. Comput. Vis. Pattern Recog., pages 770-778, 2016. 4, 5 +[26] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs trained by a two time-scale update rule converge to a local Nash equilibrium. Adv. Neural Inform. Process. Syst. 7 +[27] Takeo Igarashi, Tomer Moscovich, and John F Hughes. As-rigid-as-possible shape manipulation. ACM Trans. Graph., 24(3):1134-1141, 2005. 3 +[28] Thibaut Issenhuth, Jérémie Mary, and Clément Calauzenes. Do not mask what you do not need to mask: a parser-free virtual try-on. In Eur. Conf. Comput. Vis., pages 619-635. Springer, 2020. 1 +[29] Alec Jacobson, Ilya Baran, Jovan Popovic, and Olga Sorkine. Bounded biharmonic weights for real-time deformation. ACM Trans. Graph., 30(4):78, 2011. 3 +[30] Hyug Jae Lee, Rokkyu Lee, Minseok Kang, Myounghoon Cho, and Gunhan Park. LA-VITON: a network for looking-attractive virtual try-on. In Int. Conf. Comput. Vis., pages 0-0, 2019. 1, 2 +[31] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of GANs for improved quality, stability, and variation. In Int. Conf. Learn. Represent., 2018. 2 + +[32] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In IEEE Conf. Comput. Vis. Pattern Recog., pages 4401-4410, 2019. 2, 6 +[33] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In IEEE Conf. Comput. Vis. Pattern Recog., pages 8110-8119, 2020. 2, 4, 6 +[34] Soheil Kolouri, Kimia Nadjahi, Umut Simsekli, Roland Badeau, and Gustavo K Rohde. Generalized sliced Wasserstein distances. arXiv preprint arXiv:1902.00434, 2019. 7 +[35] Soheil Kolouri, Gustavo K Rohde, and Heiko Hoffmann. Sliced Wasserstein distance for learning Gaussian mixture models. In IEEE Conf. Comput. Vis. Pattern Recog., pages 3427-3436, 2018. 7 +[36] Henry Oliver Lancaster and Eugene Seneta. Chi-square distribution. Encyclopedia of Biostatistics, 2, 2005. 4 +[37] Kathleen M Lewis, Srivatsan Varadharajan, and Ira Kemelmacher-Shlizerman. TryOnGAN: body-aware try-on via layered interpolation. ACM Trans. Graph., 40(4):1-10, 2021. 2 +[38] Kathleen M Lewis, Srivatsan Varadharajan, and Ira Kemelmacher-Shlizerman. VOGUE: Try-on by StyleGAN interpolation optimization. arXiv preprint arXiv:2101.02285, 2021. 2 +[39] 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. 6 +[40] Jack Mezirow. Perspective transformation. Adult education, 28(2):100-110, 1978. 2, 3 +[41] Matiur Rahman Minar, Thai Thanh Tuan, Heejune Ahn, Paul Rosin, and Yu-Kun Lai. CP-VTON+: Clothing shape and texture preserving image-based virtual try-on. In IEEE Conf. Comput. Vis. Pattern Recog. Workshops, 2020. 1 +[42] Assaf Neuberger, Eran Borenstein, Bar Hilleli, Eduard Oks, and Sharon Alpert. Image based virtual try-on network from unpaired data. In IEEE Conf. Comput. Vis. Pattern Recog., pages 5184-5193, 2020. 1 +[43] Chaitanya Patel, Zhouyingcheng Liao, and Gerard Pons-Moll. Tailornet: Predicting clothing in 3D as a function of human pose, shape and garment style. In IEEE Conf. Comput. Vis. Pattern Recog., pages 7365-7375, 2020. 2 +[44] Gerard Pons-Moll, Sergi Pujades, Sonny Hu, and Michael J Black. Clothcap: Seamless 4D clothing capture and retargeting. ACM Trans. Graph., 36(4):1-15, 2017. 2 +[45] Elad Richardson, Yuval Alaluf, Or Patashnik, Yotam Nitzan, Yaniv Azar, Stav Shapiro, and Daniel Cohen-Or. Encoding in style: a StyleGAN encoder for image-to-image translation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 2287–2296, 2021. 2, 4, 5, 6 +[46] Damien Rohmer, Tiberiu Popa, Marie-Paule Cani, Stefanie Hahmann, and Alla Sheffer. Animation wrinkling: augmenting coarse cloth simulations with realistic-looking wrinkles. ACM Trans. Graph., 29(6):1-8, 2010. 2 +[47] Igor Santesteban, Miguel A Otabuy, and Dan Casas. Learning-based animation of clothing for virtual try-on. In Computer + +Graphics Forum, volume 38, pages 355-366. Wiley Online Library, 2019. 1 +[48] Kripasindhu Sarkar, Vladislav Golyanik, Lingjie Liu, and Christian Theobalt. Style and pose control for image synthesis of humans from a single monocular view. arXiv preprint arXiv:2102.11263, 2021. 2 +[49] Yujun Shen, Jinjin Gu, Xiaou Tang, and Bolei Zhou. Interpreting the latent space of GANs for semantic face editing. In IEEE Conf. Comput. Vis. Pattern Recog., pages 9243-9252, 2020. 2, 4 +[50] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 5 +[51] Ayush Tewari, Mohamed Elgharib, Gaurav Bharaj, Florian Bernard, Hans-Peter Seidel, Patrick Pérez, Michael Zollhofer, and Christian Theobalt. Stylerig: Rigging StyleGAN for 3D control over portrait images. In IEEE Conf. Comput. Vis. Pattern Recog., pages 6142-6151, 2020. 2, 4 +[52] Omer Tov, Yuval Alaluf, Yotam Nitzan, Or Patashnik, and Daniel Cohen-Or. Designing an encoder for StyleGAN image manipulation. ACM Trans. Graph., 40(4):1-14, 2021. 2, 4 +[53] Bochao Wang, Huabin Zheng, Xiaodan Liang, Yimin Chen, Liang Lin, and Meng Yang. Toward characteristic-preserving image-based virtual try-on network. In Eur. Conf. Comput. Vis., pages 589-604, 2018. 1, 2 +[54] Svante Wold, Kim Esbensen, and Paul Geladi. Principal component analysis. Chemometrics and intelligent laboratory systems, 2(1-3):37-52, 1987. 4 +[55] Zongze Wu, Dani Lischinski, and Eli Shechtman. Stylespace analysis: Disentangled controls for StyleGAN image generation. In IEEE Conf. Comput. Vis. Pattern Recog., pages 12863-12872, 2021. 2 +[56] Han Yang, Ruimao Zhang, Xiaobao Guo, Wei Liu, Wangmeng Zuo, and Ping Luo. Towards photo-realistic virtual try-on by adaptively generating-preserving image content. In IEEE Conf. Comput. Vis. Pattern Recog., pages 7850-7859, 2020. 1, 2, 7 +[57] Han Yang, Ruimao Zhang, Xiaobao Guo, Wei Liu, Wangmeng Zuo, and Ping Luo. Towards photo-realistic virtual try-on by adaptively generating preserving image content. https://github.com/minar09/ACGPN, 2020.7 +[58] Ruiyun Yu, Xiaqi Wang, and Xiaohui Xie. VTNFP: An image-based virtual try-on network with body and clothing feature preservation. In Int. Conf. Comput. Vis., pages 10511-10520, 2019. 2 +[59] Heliang Zheng, Jianlong Fu, Yanhong Zeng, Jiebo Luo, and Zheng-Jun Zha. Learning semantic-aware normalization for generative adversarial networks. Adv. Neural Inform. Process. Syst., 33:21853-21864, 2020. 2 +[60] Jiapeng Zhu, Yujun Shen, Deli Zhao, and Bolei Zhou. Indomain GAN inversion for real image editing. In Eur. Conf. Comput. Vis., pages 592-608. Springer, 2020. 2, 4 +[61] Xingxing Zou, Xiangheng Kong, Waikeung Wong, Congde Wang, Yuguang Liu, and Yang Cao. FashionAI: A hierarchical dataset for fashion understanding. In IEEE Conf. Comput. Vis. Pattern Recog. Workshops, pages 0–0, 2019. 5 \ No newline at end of file diff --git a/weaklysupervisedhighfidelityclothingmodelgeneration/images.zip b/weaklysupervisedhighfidelityclothingmodelgeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dd00d5700305a92732e0e00005e2b4b3f88a810c --- /dev/null +++ b/weaklysupervisedhighfidelityclothingmodelgeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:093ce9b55eb4c600e90c4123d1c5e588e79b8923ef0887ef37fde9ca91fe4f43 +size 581363 diff --git a/weaklysupervisedhighfidelityclothingmodelgeneration/layout.json b/weaklysupervisedhighfidelityclothingmodelgeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5f4392cc52b81375b5f6befd1432b708c4a118d5 --- /dev/null +++ b/weaklysupervisedhighfidelityclothingmodelgeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a913b9240b71a27976747581fce8bfbe2113000d4eb7bd45823d86ca6c4d936 +size 501539 diff --git a/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_content_list.json b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b40f1765c9c2b4e67df44e628ade37a43967b747 --- /dev/null +++ b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:493443cbbe05ea9b17b1b48096bdfdd12e19e5ff25ef99d7e4363ed7adce4975 +size 84556 diff --git a/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_model.json b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3384b031371a74b321a193d32f456f5a63726c64 --- /dev/null +++ b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37e4ba3c44ca59bc8fd5ae07794dfcddee3a04345902c6775c328c74eb0dff81 +size 106763 diff --git a/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_origin.pdf b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..08b21addcf41937c7eb3146ae96fd84635299d6c --- /dev/null +++ b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/57a4cbfa-9465-46e0-818f-499c3c6450e9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e95bc5da194ad5494c6708bc17476c87bc472fb5cb1060d202a1a931e180deee +size 594733 diff --git a/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/full.md b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/full.md new file mode 100644 index 0000000000000000000000000000000000000000..26c4b3dff16ba83529e2f8169657cc8346a65c5d --- /dev/null +++ b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/full.md @@ -0,0 +1,369 @@ +# Weakly-supervised Metric Learning with Cross-Module Communications for the Classification of Anterior Chamber Angle Images + +Jingqi Huang, $^{1}$ Yue Ning, $^{2}$ Dong Nie, $^{3*}$ Linan Guan, $^{1}$ Xiping Jia $^{1}$ + +1Guangdong Polytechnic Normal University, 2Stevens Institute of Technology + +3University of North Carolina at Chapel Hill + +# Abstract + +As the basis for developing glaucoma treatment strategies, Anterior Chamber Angle (ACA) evaluation is usually dependent on experts' judgements. However, experienced ophthalmologists needed for these judgements are not widely available. Thus, computer-aided ACA evaluations become a pressing and efficient solution for this issue. In this paper, we propose a novel end-to-end framework GCNet for automated Glaucoma Classification based on ACA images or other Glaucoma-related medical images. We first collect and label an ACA image dataset with some pixel-level annotations. Next, we introduce a segmentation module and an embedding module to enhance the performance of classifying ACA images. Within GCNet, we design a Cross-Module Aggregation Net (CMANet) which is a weakly-supervised metric learning network to capture contextual information exchanging across these modules. We conduct experiments on the ACA dataset and two public datasets REFuge and SIGF. Our experimental results demonstrate that GCNet outperforms several state-of-the-art deep models in the tasks of glaucoma medical image classifications. The source code of GCNet can be found at https://github.com/Jingqi-H/GCNet. + +# 1. Introduction + +Glaucoma is a leading cause of irreversible blindness in the world [44]. The main basis for determining clinical treatment protocols when glaucoma is diagnosed is using Anterior Chamber Angle (ACA) images and gonioscopy is widely regarded as the "Gold Standard" in ACA evaluation. There are five ACA levels that correspond to different glaucoma treatments. In order to determine these ACA levels, ophthalmologists examine four local structures in ACA images: Schwalbe Line (SL), Trabecular Meshwork (TM), Scleral Spur (SS), and Ciliary Body Band (CBB), with the help of microgonioscopy [8,11] as shown in Figure 1. How- + +![](images/801f97c6c5dfb01617fa3a5ab08dfb3d4679c24deae7c1a06e52c3de12c57346.jpg) + +![](images/414d52f12c5263c110767eb261c85db72d0b2480f56cb40e508b1d1380d5e6b8.jpg) +Figure 1. The main structures in ACA consist of Schwalbe line (SL), pigmentation of trabecular meshwork (TM), scleral spur (SS), and ciliary body band (CBB). The bottom figure shows the color annotations of these four structures. + +ever, ACA evaluation needs expert ophthalmologists, while the availability of experienced ophthalmologists is severely sparse given the large number of glaucoma patients. Therefore, computer-aided systems are urgently needed for efficient ACA evaluation. + +Recently, Deep Neural Networks (DNNs) have become a default choice given its successful applications in Glaucoma-related medical image analysis. For instance, DNNs have been used to segment optic cup (OC) regions and optic disk (OD) regions [9], and to detect glaucomatous optic neuropathy [25]. Li et al. [21] apply a ResNet-18 model for automatic measurement of trabecular-iris angle (TIA). Peroni et al. [36] exploit a dense U-Net architecture to segment irido-corneal interface images. However, directly applying traditional DNN models for ACA level classification is suboptimal and the following challenges need to be overcome: + +(1) In ACA images, the four spatial structures (SL, TM, SS, and CBB) are the main basis for ophthalmologists in their ACA level evaluations. However, these four structures concentrate in a small area of a full ACA picture as shown in Figure 1. This leads to great challenges for machine learn- + +![](images/984e6fd4282707ddcfa9a7bf67618b221e3a36eade218e5c4f60c166b73c6e7a.jpg) +Figure 2. The illustration of GCNet. We introduce a weakly-supervised metric learning network for capturing pixel-level details of spatial features and a cross-module communication strategy (two type of pipes in red) for augmenting information across three sub-modules. + +ing models to distinguish this important information from background noise. + +(2) The appearance of SL, TM, SS, and CBB corresponds to different levels of glaucoma diseases. In ACA images, these four structures are adjacent with blurred boundaries between each other. Recognizing each feature and learning their hidden representations are crucial in ACA classification. However, pixel-level annotations of these structures are rare for supervised learning. +(3) With sparse pixel-level labels of the four structures, deep learning models often suffer from capturing inter-class similarities and intra-class variations of these structures. Fusing the knowledge of these four structures in the task of image classification is another obstacle. + +To overcome the above challenges, we propose a deep neural network with weakly-supervised metric learning and interactive module communications on glaucoma image classification. To the best of our knowledge, this is the first work for classifying ACA images using deep learning techniques with three sub-modules. The main contributions of our paper include: + +- We propose a weakly-supervised metric learning framework for glaucoma image classification. We augment glaucoma ACA images with pixel-level annotations for four structures (SL, TM, SS, and CBB) and utilize these annotations to enhance image classification. +- We propose a cross-module communication strategy to fuse features from multiple granularity levels as shown in Figure 2. The proposed network, CMANet, is able to capture semantic information in picture levels as well as pixel levels. This method can also be extended to other types of Glaucoma clinical images such as the REFuge dataset [32] including both image-level and pixel-level annotations. +- We collect and label an ACA evaluation image dataset. The dataset includes 999 ACA images which are labeled by several senior ophthalmologists. In addition, 100 ACA images are labeled with SL, TM, SS, and CBB at pixel levels. + +We conduct extensive experiments on three real-world datasets to demonstrate the effectiveness of the proposed framework in classification compared with several deep learning baselines. + +# 2. Related Work + +# 2.1. Glaucoma Detection + +Early detection and intervention are essential to prevent the deterioration of glaucoma. With the overwhelming application of DNNs in medical image analysis in recent years, more and more DNN models have been designed for glaucoma detection [20, 48]. In these models, most are based on anterior segment optical coherence tomography (AS-OCT) [10,12,15,16] or fundus photographs [25,28,50]. + +Some recent work focuses on ACA structures. For instance, DNN models are designed to segment geometrical structures such as AS-OCT [9, 33, 35]. A fully automatic segmentation method is proposed to segment corneal boundary, iris region, and trabecular-iris contact [13]. Moreover, a model based on transfer learning and multilevel convolutional neural networks is designed to detect the angle-closure glaucoma [10]. + +# 2.2. Weakly-supervised Learning + +Medical image labeling is expensive because of its need for senior doctors [48]. Thus, weakly-supervised learning [40] with little supervision has been actively studied in medical image analysis recently. As a branch of weakly-supervised learning, semi-supervised learning (SSL) has made remarkable achievements in representation learning in recent years [19, 27]. + +Consistency regularization and pseudo-labeling are two common strategies in SSL. The goal of consistency regularization is to obtain similar output distribution, which can be achieved by adding various degrees of augmentation [29], by embedding different perturbations [34], or by embedding different networks [18, 26]. The goal of pseudo-labeling is to assign reasonable labels to unlabeled samples for the purpose of training. Knowledge distillation is a technology to train a student model with pseudo-labeled data and labeled data [5, 51-53], of which, the pseudo-labels are predicted with a pre-trained teacher model. + +Considering the erroneous high confidence predictions from poorly calibrated models, UPS framework [38] is proposed to alleviate noisy training with negative pseudolabels. Based on MixMatch [3], UDA [49], and ReMixMatch [2], FixMatch [42] produces artificial labels using both consistency regularization and pseudo-labeling. + +# 2.3. Aggregation + +Many classification methods based on fully convolutional networks achieve remarkable classification performance in recent years. However, convolution as a local operation establishes pixel relationships in a local neighborhood. Long-range dependency modeling is necessary [22]. In order to model long-range information dependency [31], two categories of context aggregation have been used: (1) + +Table 1. ACA classification system described by Shaffer [1]. Five levels from wide to narrow angle are based on visible structures. + +
LevelClinical FeaturePercentage (%)
Narrow Ipart of CBB visible22.12
Narrow IISS visible20.42
Narrow IIIposterior TM visible12.91
Narrow IVonly SL visible or none25.43
Wideall structures visible19.12
+ +pairwise based [14, 46]: non-local modules utilize pairwise similarity to learn the global context for each location; (2) context fusion based: considering large computational capacities, a channel attention mechanism [4] is proposed to distinguish important features from minor features. A spatial attention mechanism [45] is proposed to find where to focus on features. A Convolutional Block Attention Module [47] is proposed to combines the advantages of channel attention and spatial attention by cascade connections. These methods enhance information representations, but such enhancement is self-correlation and is limited to one module only. + +Panoramic segmentation requires both semantic segmentation and instance segmentation to perform well. Thus, a bidirectional aggregation network [6] is proposed to enable feature-level interaction between instance segmentation and semantic segmentation. However, different from panoramic segmentation, our framework has three different modules (classification, segmentation, embedding). Semantic and discriminative information cannot be fed back to the classification module from a unidirectional learning pipeline, since the classification module is before segmentation/embedding modules. + +Semantic segmentation concentrates on capturing spatial details of local structures and the embedding module makes the information of the four structures more recognizable. Such information can be used in classification to understand both entire object features and local contexts. Based on these observations, the following two important problems need to be solved when applying DNN-based methods to ACA evaluation. (1) How do we find and label useful information for learning on ACA images based on domain knowledge and (2) How do we design a strategy to synthesize useful semantic information into classification? + +# 3. Method + +Our GCNet contains two major components: a backbone network and a cross-module aggregation network, as shown in Figure 2. The backbone network is composed of a deep residual network (ResNet) and a feature pyramid network (FPN). The former is used for feature extraction and the latter is used for resolution recovery. The cross-module aggregation network includes three sub-modules: a classification module, a segmentation module, and an em + +bedding module. The communication among these three sub-modules is described in the section of Framework Overview. + +# 3.1. Problem Formulation + +To overcome the challenges in computer-aided ACA classification, we propose an end-to-end DNN framework named GCNet in this paper. The goal of GCNet is to map an ACA image into five levels as described in Table 1. Besides the image-level classification labels of the whole dataset, we also provide pixel-level labels (SL, TM, SS, and CBB) for some ACA images. + +- Image-level labels: each image is associated with a label indicating the level of ACA: Narrow I, Narrow II, Narrow III, NarrowIV, or Wide. +- Pixel-level labels: for some images in the dataset, each image has pixel-level labels. Each pixel label denotes if this pixel belongs to SL, TM, SS, CBB, or background. + +We design two auxiliary tasks with these weakly labeled samples: (1) dense prediction; (2) pixel embedding. The dense prediction is developed to distinguish the four structure areas SL, TM, SS, and CBB, while the pixel embedding is developed to map each pixel into a semantic vector so that pixels from the same structure are close to each other in terms of semantic distance. GCNet is able to learn effective spatial details and semantic embeddings for the four structures, while improving ACA classification performance. + +# 3.2. Dataset + +To establish an automatic ACA classification system, 1038 ACA images from 2015 to 2017 are collected from the hospital we are collaborating with. For each patient, two to five digital images are taken for each eye. Normally gonioscopy is only used when glaucoma has been diagnosed. So the size of our ACA dataset is limited. In our dataset, each image is labeled by a senior ophthalmologist with over 10 years of working experience. + +We apply an examination on these images, and 39 images are removed due to quality issues. The remaining 999 images are labeled as one of the following: Narrow I (N1), Narrow II (N2), Narrow III (N3), Narrow IV (N4) and Wide (W) as shown in Table 1. The distribution of the labeled data is depicted in the last column of the table. + +Furthermore, we can observe that the four types of structures named SL, TM, SS, and CBB are distributed near the boundary between cornea and iris as shown in Figure 1. Given that the background is relatively large compared to these structures and the majority of the useful area is exceedingly narrow, it will be a big challenge for ophthalmologist to manually annotate such small and concentrated structures in ACA images. We use a labeling tool, Labelme, to perform pixel-level masking with manual scribbles on images. Among the 999 labeled images, 100 of them are an + +![](images/bdc6eae52512b9e681ff7c2dcaa281c96e65b96152d375a841a879e9794bdc2d.jpg) +Figure 3. Our proposed architecture is composed of a shared backbone and cross-module aggregation net (CMANet). CMANet has three sub-modules: (i) a classification module; (ii) a segmentation module for dense prediction; (iii) an embedding module for pixel embedding. Meanwhile, CMANet has two key pipes for information exchanging among multi-granularity feature representations: Classification-To-Segmentation (c2s) and Segmentation/Embedding-To-Classification (se2c). + +notated at pixel levels for these four structures. Our work is conducted according to the Declaration of Helsinki. Given the fully anonymity of ACA images, we are exempted by the medical ethics committee to inform the patients. + +# 3.3. Framework overview + +As shown in Figure 3, given an ACA image $\mathbf{x} \in \mathbb{R}^{C \times H \times W}$ , GCNet is designed to output an image-level prediction $\hat{\mathbf{y}}^c \in \mathbb{R}^{N_c}$ , a dense prediction $\hat{\mathbf{y}}^s \in \mathbb{R}^{N_s \times H \times W}$ and a pixel feature map $\hat{\mathbf{y}}^e \in \mathbb{R}^{q \times H \times W}$ . In the training phase, we have image-level ground-truth label $\mathbf{y}^c \in \{0,1,2,3,4\}$ for each image where 0, 1, 2, 3, 4 denote N1, N2, N3, N4, W respectively and pixel-level labels $\mathbf{y}^s \in \mathbb{R}^{N_s \times H \times W}$ for the annotated images. $N_c$ denotes the class number in classification, $N_s$ denotes the class number in segmentation, and $q$ denotes the length of embedding vector. In this work, $N_c = 5$ because we have 5 class levels (N1, N2, N3, N4, W) and $N_s = 5$ because we have four structures (SL, CBB, SS, TM) and background. + +# 3.3.1 Backbone + +The backbone of GCNet is composed of three parts: an encoder, a decoder, and a feature pyramid network (FPN) [24], as show in Figure 3. The encoder is a typical pre-trained convolutional neural network by freezing first two layers, and the decoder is an upsampling subnet like that of U-Net [39]. Given an input image $\mathbf{x}$ , the backbone outputs two latent feature maps $\mathrm{F}'$ and $\mathrm{F}''$ . While $\mathrm{F}'$ is the output of the encoder, and $\mathrm{F}''$ is the output of the FPN. + +# 3.3.2 Cross-Module Aggregation Network + +In GCNet, the role of the classification module is to classify an ACA image into 5 classes as described in Table 1. We + +apply a global average pooling (GAP) [23] to map the latent feature map $\mathrm{F}'$ to a feature vector by $F_{c} = \mathrm{AvgPool}(\mathrm{F}')$ . + +In clinical practices, the basis of ACA classification for ophthalmologist is the previous introduced four structures. Thus, the spatial distribution of these features is critical in classifying ACA levels. Given this motivation, we design a segmentation module to induce the classification module to pay attention to these four structures. The segmentation module assigns each pixel with a class label. Given that multi-scale features have been fused in FPN by concatenation, rich spatial details and semantic information can be captured in the segmentation module: + +$$ +F _ {s} = \phi_ {s} \left(\mathrm {F} ^ {\prime \prime}\right) = g \left(W _ {s} ^ {(1)} \left(g \left(W _ {s} ^ {(0)} \mathrm {F} ^ {\prime \prime} + b _ {s} ^ {(0)}\right)\right) + b _ {s} ^ {(1)}\right), \tag {1} +$$ + +where $g$ denotes the ReLu activation function, as it will for the rest of the paper. $\mathrm{F}^{\prime \prime}$ is the output of the FPN model. + +However, when incorporating the four structures using a segmentation module, we face a new challenge due to inter-class similarities and intra-class variations in the four structures: + +- Inter-class similarity: the neighboring structures of SL, TM, SS, and CBB looks similar in shape, color, and texture. For example, the adjacent structures TM and SS share a similar fuscous color. +- Intra-class variation: same structures in different ACA images may have different appearances for different genes. For example, the color depth of TM is related to congenital pigment deposition. Some people are born with deeper color of TM due to more pigment deposition while others are born with lighter color of TM due to less pigment. + +Thus, it is difficult for computers to distinguish the four structures in dense predictions. However, the shape and appearance of these four structures are the basis for the ophthalmologist to evaluate the ACA levels. A weak dense pre + +diction will result in poor classification performance. To overcome this challenge, we add an embedding module to the framework. We use the module to map each pixel into an embedding vector. Here five convolution layers are used to map $\mathrm{F}''$ into embedding feature map: $\hat{\mathbf{y}}^e = \phi_e(\mathrm{F}'')$ . + +With three sub-modules, our weakly-supervised metric learning framework is formed. To resolve communication issues among ACA classification, dense prediction, and pixel embedding, we propose a cross-module communication strategy CMANet. Specifically, CMANet provides two communication mechanisms among the three modules: Classification-To-Segmentation (c2s) and Segmentation/Embedding-To-Classification (se2c). + +(1) c2s. The segmentation model cannot be trained efficiently due to the small number of pixel-level annotated samples. Moreover, the contextual information of $\mathrm{F}_s$ may be lost after applying upsampling and convolutions for many times. We propose to supplement the contextual information of segmentation module by building a communication pipe from the ACA classification module to the segmentation module. We aggregate $\mathrm{F}_s$ and $\mathrm{F}_c$ as follows: + +$$ +\mathrm {F} _ {\mathrm {c} 2 \mathrm {s}} = \mathrm {F} _ {s} \odot \Omega \left(\phi_ {c} \left(\mathrm {F} _ {c}\right)\right), \tag {2} +$$ + +where $\phi_c$ is a $1\times 1$ convolution layer and $\Omega$ is a repeat operation to align the feature space. $\odot$ denotes the aggregation operation which is element-wise multiplication. As a result, feature $\mathrm{F}_{c2s}$ aggregates the semantic information of $\mathrm{F}_s$ and $F_{c}$ . Then we apply $3\times 3$ and $1\times 1$ convolution layers to obtain the dense prediction $\hat{\mathbf{y}}^s$ : + +$$ +\hat {\mathbf {y}} ^ {s} = W _ {s} ^ {(3)} \left(g \left(W _ {s} ^ {(2)} \mathrm {F} _ {c 2 s} + b _ {s} ^ {(2)}\right)\right) + b _ {s} ^ {(3)}. \tag {3} +$$ + +(2) se2c. The ACA classification model is inadequate in capturing hidden features of the four structures. The segmentation model can capture the spatial details for four structures while embedding module can learn the inter-class similarities and intra-class variations among SL, TM, SS, and CBB. Therefore, we propose to supplement the ACA classification module with hidden semantic information of these four structures by building two communicate pipes. As shown in Figure 3, one is from the segmentation module to the ACA classification module, and the other is from the embedding module to the ACA classification module. Global average pooling and concatenation are used to fuse $\mathrm{F}_s$ and $\mathrm{F}_e$ into $\mathrm{F}_c$ : + +$\mathrm{F_{se2c} = F_c||AvgPool(F_s)||AvgPool(\phi_e(F''))}$ (4) where $||$ denotes concatenation. Then we apply a multilayer perceptron (MLP) to map aggregated latent features $\mathbf{F}_{\mathrm{se2c}}$ to class distributions: + +$$ +\hat {\mathbf {y}} ^ {c} = W ^ {(2)} \left(g \left(W ^ {(1)} \left(g \left(W ^ {(0)} \mathbf {F} _ {\mathrm {s e 2 c}} + b ^ {(0)}\right)\right) + b ^ {(1)}\right)\right) + b ^ {(2)}. \tag {5} +$$ + +# 3.4. Loss Function + +The GCNet framework is designed for multi-task image classification with image-level annotations and partial + +pixel-level annotations. Some images have pixel-level labels while some do not. If we have $K$ ACA images as training samples, we have $K$ image-level annotations and $\eta K$ ( $0 < \eta < 0.5$ ) pixel-level annotations. The classification module is trained with fully annotated images, while the segmentation module and the embedding module are optimized with weakly labeled samples. Note that pseudo labels are generated based on the predicted probabilities of pixels $(\hat{y}_i^s)$ and are only used in the segmentation module. In GCNet, the loss is composed of three parts: the classification module uses Cross-Entropy loss, denoted as $L_{\mathrm{cla}}$ ; the segmentation module uses Dice Loss, denoted as $L_{\mathrm{seg}}$ ; and the embedding module uses discriminative loss, denoted as $L_{\mathrm{em}}$ . The total loss function $L_{\mathrm{total}}$ is defined as: + +$$ +L _ {\text {t o t a l}} = \alpha \cdot L _ {\mathrm {c l a}} + \beta \cdot L _ {\mathrm {s e g}} + \gamma \cdot L _ {\mathrm {e m}}, \tag {6} +$$ + +where $\alpha, \beta, \gamma$ are the weights of three loss items. + +The segmentation task takes advantage of the spatial annotations of the four structures to assist the ACA classification. However, it is hard and expensive to obtain pixel-level labeled data in the medical image analysis domain because only experts can provide reliable annotations. We focus on weakly-supervised segmentation approaches because it is relatively easy to acquire a large amount of image-level labels. In addition, we adapt a discriminative loss based on distance metric learning [7, 30] to learn inter-class similarities and intra-class variations among the four structures. + +# 3.4.1 Weakly-supervised Segmentation Loss + +We train the segmentation model using a small number of samples with pixel-level annotations for SL, TM, SS, and CBB. In the segmentation module, each pixel is classified into five categories: SL, TM, SS, CBB, and background. In our framework, the segmentation loss is defined as: + +$$ +L _ {\text {s e g}} = L _ {\text {d i c e}} ^ {l} + L _ {\text {d i c e}} ^ {u}, \tag {7} +$$ + +where $L_{\mathrm{dice}}^l$ is a loss used in pixel-labeled data and $L_{\mathrm{dice}}^u$ is used in pixel-unlabeled data. Specifically, we denote + +$$ +L _ {\mathrm {d i c e}} ^ {l} = \frac {1}{N _ {s}} \sum_ {j = 1} ^ {N _ {s}} \left(1 - \frac {2 \sum_ {i = 1} ^ {N _ {j}} \hat {y} _ {i} ^ {s} y _ {i} ^ {s}}{\sum_ {i = 1} ^ {N _ {j}} \hat {y} _ {i} ^ {s} + \sum_ {i = 1} ^ {N _ {j}} y _ {i} ^ {s}}\right), \tag {8} +$$ + +where $\hat{\mathbf{y}}_i^s$ and $\mathbf{y}_i^s$ are the predicted probability and ground truth label for pixel $i$ , respectively; $N_{j}$ denotes the number of pixels in structure $j$ . + +Let $m_{i} = \mathbb{I}[\hat{\mathbf{y}}_{i}^{s}\geq \tau ]$ be the selected pseudo-label for pixel $i$ , where $\mathbb{I}$ is the indicator function and $\tau$ is a hyperparameter which denotes a confidence threshold. For instance, if the probability score is sufficiently high $(\hat{\mathbf{y}}_i^s\geq \tau)$ then the corresponding pseudo label is selected. We choose $\tau = 0.7$ empirically. For the unlabeled pixels, we define + +$$ +L _ {\text {d i c e}} ^ {u} = \frac {1}{N _ {s}} \sum_ {j = 1} ^ {N _ {s}} \left(1 - \frac {2 \sum_ {i = 1} ^ {N _ {j}} m _ {i} \hat {y} _ {i} ^ {s} \tilde {y} _ {i} ^ {s}}{\sum_ {i = 1} ^ {N _ {j}} m _ {i} \hat {y} _ {i} ^ {s} + \sum_ {i = 1} ^ {N _ {j}} m _ {i} \tilde {y} _ {i} ^ {s}}\right), \tag {9} +$$ + +where $\tilde{y}_i^s$ indicates the pseudo label for pixel $i$ . + +# 3.4.2 Discriminative Loss + +Inspired by the success of pixel embeddings in instance segmentation [7, 30], we use a discriminative loss function to guide the model to learn structural details in feature space. Discriminative losses enforce the model to map each pixel in an image to a q-dimensional vector such that embedding vectors of pixels with the same label (same structure) should be close to each other while embedding vectors of pixels with different labels should be far apart. + +By doing so, different structures of an image and the same structure in different ACA images should be well recognized through this loss. The discriminative loss is described as a weighted sum of three parts: + +$$ +L _ {\mathrm {e m}} = \lambda \cdot L _ {\mathrm {v a r}} + \rho \cdot L _ {\mathrm {d i s t}} + \omega \cdot L _ {\mathrm {r e g}}, \tag {10} +$$ + +$$ +\begin{array}{l} L _ {\text {v a r}} = \frac {1}{N _ {s}} \sum_ {j = 1} ^ {N _ {s}} \frac {1}{N _ {j}} \sum_ {i = 1} ^ {N _ {j}} \left[ \left\| \boldsymbol {\mu} _ {j} - \hat {\mathbf {y}} _ {i} ^ {e} \right\| - \boldsymbol {\delta} _ {v} \right] _ {+} ^ {2}, (11) \\ L _ {\text {d i s t}} = \frac {1}{N _ {s} \left(N _ {s} - 1\right)} \sum_ {j _ {A} = 1} ^ {N _ {s}} \sum_ {j _ {B} = 1} ^ {N _ {s}} \left[ 2 \delta_ {\mathrm {d}} - \left\| \boldsymbol {\mu} _ {j _ {A}} - \boldsymbol {\mu} _ {j _ {B}} \right\| \right] _ {+} ^ {2}, (12) \\ L _ {\text {r e g}} = \frac {1}{N _ {s}} \sum_ {j = 1} ^ {N _ {s}} \left\| \boldsymbol {\mu} _ {j} \right\|, (13) \\ \end{array} +$$ + +where $\hat{\mathbf{y}}_i^e$ is the embedding vector of a pixel $i$ ; $\mu s$ are class mean vectors and $\delta_v, \delta_d$ are the margins for the variance and distance loss. We set $\delta_v = 0.0001$ and $\delta_d = 1.0$ empirically. Equation 11 represents the variance term which applies a pull force on each embedding vector towards the mean vector of a structure. Equation 12 denotes a distance term that pushes the cluster centers away from each other. + +# 4. Experimental Evaluation + +# 4.1. Dataset Preprocessing + +To eliminate the influence of background noise and to extract the features of four structures, critical region detection is applied to automatically crop the target region of SL, TM, SS and CBB. Here, we use the YoLo detector [37] to preprocess our original images. These segmented ACA images are then resized to $[700 \times 2, 100]$ for better quality. + +In addition, we also investigate the REFuge dataset [32] which contains 1,200 images with two classes (10% positive and 90% negative) and pixel-level annotations (background, optic disc, and optic cup). SIGF dataset [20] is used for a glaucoma forecasting task. This dataset contains sequential fundus images of a patient, which is different from glaucoma evaluation. Therefore, we convert SIGF to a standard classification task by ignoring sequential information. All fundus images are annotated with binary labels of glaucoma, i.e., positive (4%) or negative (96%), corresponding to 3,671 images in total. + +Table 2. Inference time for an input tensor of size $2 * 3 * {128} * {256}$ . + +
MethodsVGGGoogLeNetResNetFixMachCCTUPSGCNet
Time(ms)39.2756.1947.5187.1850.7986.7556.12
Flops(G)20.0722.3324.05770.7546.20770.75119.44
Params(M)18.933.355.3787.7646.8687.7664.85
+ +# 4.2. Training and Evaluation + +We conduct experiments on our ACA dataset and the public REFUGE dataset [32]. Table 2 shows the inference time of all baseline models and GCNet. For the ACA dataset, we partition the dataset into a training set (80%) and a test set (20%) based on a random seed of 72. We shuffle the training set and select a subset as our validation set from training samples. The validation set accounts for one-fifth of the training set. For the REFUGE dataset, We use the standard train/val/test split with 800 images for training-validating and 400 images for testing. Note that we use all image-level annotations and 83 images with pixel-level annotations during training to carry out weakly-supervised metric learning framework. + +We use standard metrics of Accuracy (ACC), Area Under Curve (AUC), and F1 to evaluate the classification accuracy for ACA and REFuge. Given the extreme imbalanced class distributions of SIGF, we only use AUC to demonstrate the evaluation results. All methods are implemented in Ubuntu 18.04 with NVIDIA GeForce RTX 3080 graphics cards with 10 GB memory. Both pepper-noise and horizontal flipping are used as data augmentation in the ACA training images. On the basis of this augmentation, we also add vertical flipping when training on REFuge and SIGF. In our experiments, we enumerate hyperparameter values with a tolerance of 0.1 in the interval [0, 1]. Then we set $\alpha = \beta = \gamma = 1.0$ , $\lambda = \rho = 1.0$ , and $\omega = 0.01$ empirically on the ACA dataset. + +# 4.3. Results + +# 4.3.1 Classification results + +To evaluate the performance of GCNet, we first compare it with other state-of-the-art methods on two datasets: ACA dataset and REFuge dataset. We improve the original UPS with additional segmentation modules to get the results in Table 3, which makes our comparison fairer. UPS is designed for classifications initially. With an additional segmentation module, UPS performs better. + +As shown in Table 3, GCNet outperforms all baselines on all metrics for both datasets. More details of baseline models can be found in the Appendix. From the results, we have the following interesting observations. First, our method achieves the best Accuracy (ACC) $(79.19\%)$ , AUC $(94.32\%)$ , and F1 $(78.53\%)$ scores compared with state-of-the-art approaches on ACA classification. Second, weakly-supervised models (e.g., FixMatch [42], CCT [34], + +Table 3. Classification results of Accuracy (ACC), Area Under Curve (AUC), and F1 on two test sets. + +
MethodsACC(%)AUC(%)F1(%)
ACA
VGG68.32±1.1888.85±0.9666.64±1.79
GoogLeNet70.66±1.4191.62±0.7370.04±1.20
ResNet74.82±0.5291.64±0.4173.03±1.07
FixMatch73.81±1.8992.96±0.3273.02±1.66
CCT72.69±1.0892.37±0.2370.92±1.41
UPS76.75±1.5593.74±0.6875.70±1.56
GCNet79.19±0.7294.32±0.4278.53±0.29
REFuge
VGG92.15±0.7892.38±0.8495.62±0.46
GoogLeNet93.00±1.9993.19±1.0796.13±1.04
ResNet95.25±0.5794.00±1.9297.37±0.32
FixMatch93.65±1.7593.85±0.8296.43±1.03
CCT90.00±0.4292.35±0.6094.51±0.31
UPS93.20±1.7994.60±0.7296.22±1.07
GCNet96.30±0.4397.20±0.32697.97±0.23
+ +![](images/a6dbc27d5a32d5f0f5f7f70e8de8886aa9d01a520e934cda1b53471c268db251.jpg) +Figure 4. Classification results (AUC) on the SIGF test set. + +and UPS [38]) are mostly superior to traditional methods (including VGG [41], GoogLeNet [43], and ResNet [17]) on AUC. For instance, the weakly-supervised model UPS achieves $1.93\%$ higher ACC than the traditional method ResNet (without considering pixle-level information). + +We also test the proposed method on the SIGF dataset. We add pixel-level annotations to $36\%$ of the training set, leading the model to pay more attention to the information near the optic and disc. As shown in Figure 4, the results show that weakly-supervised models deal effectively with the challenging task of glaucoma evaluation under the guidance of pixel-level annotations. Due to the extreme imbalance of classes in SIGF, we only report AUC scores. We observe that GCNet obtains the highest AUC score on glaucoma classification. + +To further illustrate the predictive power of the proposed model, we analyze the confusion matrices of state-of-the-art methods and our method, as shown in Figure 5. From confusion matrices, we observe that it is difficult for a model to distinguish adjacent ACA levels. For example, N1 is easily + +mis-classified as N2 because the CBB structure is difficult to recognize. The difference between N1 and N2 is that N1 has the CBB structure while N2 does not, as shown in Table 1. The same pattern appears again in N2/N3 and N3/N4. Thus, we conclude that two closely related categories are also the easiest to confuse with each other. + +We plot the ROC curves of all methods as shown in Figure 6. Our proposed GCNet achieves good ROC performance and the best AUC value when compared to the competing methods. These results further suggest the efficiency of GCNet in ACA evaluation. + +# 4.3.2 Ablation studies + +To evaluate the contributions of weakly-supervised metric learning and cross-module communications, we further compare GCNet with its four types of variants, including GCNet-C, GCNet-CE, GCNet-CEP, GCNet-CEPS on both datasets. Each variant corresponds to the proposed model removing one or more proposed modules. We remove modules one by one from top to bottom in Table 4 based on the dependence between modules. Module "P" (Pseudo Labeling) would not be possible without "S" (Segmentation). Therefore, we remove more than one element of our method at once, rather than comparing the effectiveness of each permutation of element removals. The experimental results are shown in Table 4. + +First, we analyze the prediction performance of weakly-supervised metric learning. From Table 4, GCNet-C achieves the second-highest ACC/AUC without cross-module communications in the ACA dataset and the REFuge dataset respectively, indicating that weakly-supervised metric learning has improved on the proposed network. Note that we used ACC as the main evaluation criteria for ACA dataset because of the relatively balanced samples across 5 levels and AUC for the REFuge dataset because of the imbalance of positive and negative cases. Then, compared to GCNet-CEPS, the ACC of GCNet-CE increases from $74.82\%$ to $76.39\%$ . Besides, the ACC of GCNet-C increases from $76.39\%$ to $76.95\%$ due to metric learning. The performance of the proposed model on the REFuge dataset has similar improvements on AUC. The results show that GCNet finds useful information based on domain knowledge utilizing weakly-supervised metric learning in ACA images, e.g., structural details and discriminative information. + +Next, GCNet achieves better prediction scores compared with GCNet-C which uses weakly-supervised metric learning only. It suggests that CMANet with information communication in picture levels as well as pixel levels improves classification results. This confirms that spatial details of structures in dense predictions contribute to image-level classifications. + +![](images/6b1e4dccb19f0fe936c464b88745eb4703dc087b6c4139dd1ad4072785f3dd9d.jpg) +(a) VGG. + +![](images/97d74cff3e639b701cb2f0a0e89759b35b43ad61473854f0de0ea9105f12714a.jpg) + +![](images/c9c34e95b1552ce28aff6f59dfb24cb1a5850d0a2bc776975a74c1a3c4da7136.jpg) +(c) ResNet. + +![](images/3cd80a34020f9388310532b9a0185bbf15728bea8ffe14122e3c965ee6050016.jpg) +(d) GCNet-C. + +![](images/69d3b866c39db9f6aa184a0a910ab4c2e7b82969af42fad98f2d6f2ba904d225.jpg) +(e) FixMatch. + +![](images/adfee430e1eeefc8dd2bad610d5c0fbfc56dbc49fb65e4e5311a0401b55dca8f.jpg) +(b) GoogLeNet. +(f) CCT. + +![](images/55957e8361954e42ba1c935dbaa84e10f27184ac87e067f5c325b84790aee8c4.jpg) +(g)UPS. + +![](images/ba4c70757f2288df004fd6cbb5a51734d33a14004be065122c895528735aa4e9.jpg) +(h) GCNet. + +![](images/22f86f8498d4962e3aad97f5542be994966325ef5937a13786fbe71fcfafd5a4.jpg) +Figure 5. Confusion matrices of all methods on five classes. Abscissa is ground-truth and ordinate is prediction. +(a) ACA. +Figure 6. The ROC curves with AUC scores of multiple baselines from the classification results + +![](images/556a49a3990e26d35e937a099cab5a019b5c9899de30d3c59b0d8fe74664db91.jpg) +(b) REFUGE. + +# 5. Societal Impact and Limitations + +Glaucoma is an irreversible blindness disease and ACA evaluation is an important basis to judge the severity of glaucoma. The proposed GCNet is, to our best knowledge, the first to use deep learning for ACA evaluations. Our research can be used as auxiliary means to help the prognosis and treatment of glaucoma. In addition, the proposed research can also improve the efficiency of ophthalmologists. + +This study has some potential limitations. For instance, all of our ACA images are collected from one race. The four structures will be different due to individual differences, affecting the evaluation of the ACA levels. + +# 6. Conclusion + +In this paper, we propose GCNet, an end-to-end DNN framework to overcome the challenges in computer-aided ACA classification. We introduce a weakly-supervised metric learning convolution network to mine spatial and struc + +Table 4. Ablation study on the ACA and REFUGE datasets. List of abbreviations: S, Segmentation module; P, Pseudo label; E, Embedding module; C, Cross-module communication strategy. + +
MethodsACC(%)AUC(%)F1(%)
ACA
GCNet79.19±0.7294.32±0.4278.53±0.29
-C76.95±0.7693.52±0.7276.43±0.77
-CE76.39±0.2693.10±0.6375.70±0.04
-CEP75.97±0.2493.27±0.7074.61±1.10
-CEPS74.82±0.5291.64±0.4173.03±1.07
REFuge
GCNet96.30±0.4397.20±0.3397.97±0.23
-C95.58±0.2496.70±0.5397.58±0.14
-CE95.83±0.3195.60±0.4297.71±0.19
-CEP95.33±0.1294.78±0.2297.44±0.08
-CEPS95.25±0.5794.00±1.9297.37±0.32
+ +tural details and fuse them into image-level classifications using a cross-module communication strategy. Experiments on the ACA and REFUGE datasets show that GCNet outperforms other state-of-the-art DNN baseline models. In the current work, we only focus on using image data to capture the entire context and spatial information of structures. In the future, we plan to investigate communication strategies such as self-supervised frameworks to find complementary information including other modalities (e.g., domain knowledge). We plan to examine structure correlations to learn effective semantic information for the critical structures. + +# References + +[1] W. L. Alward and R. A. Longmuir. Color atlas of gonioscopy, volume 29(2): American Academy of Ophthalmology, 2008. 3 +[2] David Berthelot, Nicholas Carlini, Ekin D Cubuk, Alex Kurakin, Kihyuk Sohn, Han Zhang, and Colin Raffel. Remixmatch: Semi-supervised learning with distribution alignment and augmentation anchoring. arXiv preprint arXiv:1911.09785, 2019. 2 +[3] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin A Raffel. Mixmatch: A holistic approach to semi-supervised learning. Advances in Neural Information Processing Systems, 32:5049-5059, 2019. 2 +[4] Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. Gcnet: Non-local networks meet squeeze-excitation networks and beyond. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0–0, 2019. 3 +[5] Liang-Chieh Chen, Raphael Gontijo Lopes, Bowen Cheng, Maxwell D Collins, Ekin D Cubuk, Barret Zoph, Hartwig Adam, and Jonathon Shlens. Naive-student: Leveraging semi-supervised learning in video sequences for urban scene segmentation. In European Conference on Computer Vision, pages 695-714. Springer, 2020. 2 +[6] Yifeng Chen, Guangchen Lin, Songyuan Li, Omar Bourahla, Yiming Wu, Fangfang Wang, Junyi Feng, Mingliang Xu, and Xi Li. Banet: Bidirectional aggregation network with occlusion handling for panoptic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3793-3802, 2020. 3 +[7] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, July 2017. 5, 6 +[8] A. Dellaporta. Historical notes on gonioscopy. Survey of ophthalmology, 20(2):137-149, 1975. 1 +[9] L. Fang, D. Cunefare, C. Wang, R. H. Guymer, S. Li, and S. Farsiu. Automatic segmentation of nine retinal layer boundaries in OCT images of non-exudative AMD patients using deep learning and graph search. Biomedical optics express, 8(5):2732-2744, 2017. 1, 2 +[10] Marcos Melo Ferreira, Giovanna Pavani Esteve, Geraldo Braz Junior, João Dallyson Sousa de Almeida, Anselmo Cardoso de Paiva, and Rodrigo Veras. Multilevel cnn for angle closure glaucoma detection using as-oct images. In 2020 International Conference on Systems, Signals and Image Processing (IWSSIP), pages 105-110. IEEE, 2020. 2 +[11] P. J. Foster, R. Buhrmann, and G. J Quigley, H. A.and Johnson. The definition and classification of glaucoma in prevalence surveys. British journal of ophthalmology, 86(2):238-242, 2002. 1 +[12] Huazhu Fu, Yanwu Xu, Stephen Lin, Damon Wing Kee Wong, Mani Baskaran, Meenakshi Mahesh, Tin Aung, and Jiang Liu. Angle-closure detection in anterior segment oct + +based on multilevel deep network. IEEE transactions on cybernetics, 2019. 2 +[13] Huazhu Fu, Yanwu Xu, Damon Wing Kee Wong, Jiang Liu, Mani Baskaran, Shamira A Perera, and Tin Aung. Automatic anterior chamber angle structure segmentation in as-oct image based on label transfer. In 2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pages 1288-1291. IEEE, 2016. 2 +[14] 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/CVF Conference on Computer Vision and Pattern Recognition, pages 3146-3154, 2019. 3 +[15] Huaying Hao, Yitian Zhao, Huazhu Fu, Qiaoling Shang, Fei Li, Xiulan Zhang, and Jiang Liu. Anterior chamber angles classification in anterior segment oct images via multi-scale regions convolutional neural networks. In 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 849-852. IEEE, 2019. 2 +[16] Jinkui Hao, Huazhu Fu, Yanwu Xu, Yan Hu, Fei Li, Xiu-lan Zhang, Jiang Liu, and Yitian Zhao. Reconstruction and quantification of 3d iris surface for angle-closure glaucoma detection in anterior segment oct. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 704–714. Springer, 2020. 2 +[17] 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, pages 770-778, 2016. 7 +[18] Zhanghan Ke, Di Qiu, Kaican Li, Qiong Yan, and Rynson WH Lau. Guided collaborative training for pixel-wise semi-supervised learning. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XIII 16, pages 429-445. Springer, 2020. 2 +[19] Jichang Li, Guanbin Li, Yemin Shi, and Yizhou Yu. Cross-domain adaptive clustering for semi-supervised domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2505-2514, 2021. 2 +[20] Liu Li, Xiaofei Wang, Mai Xu, Hanruo Liu, and Xineng Chen. Deeppf: Glaucoma forecast using the sequential fundus images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 626-635. Springer, 2020. 2, 6 +[21] W. Li, Q. Chen, Z. Jiang, G. Deng, Y. Zong, G. Shi, C. Jiang, and X. Sun. Automatic anterior chamber angle measurement for ultrasound biomicroscopy using deep learning. Journal of Glaucoma, 29(2):81-85, 2020. 1 +[22] Yehao Li, Ting Yao, Yingwei Pan, and Tao Mei. Contextual transformer networks for visual recognition. arXiv e-prints, pages arXiv-2107, 2021. 2 +[23] Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. 4 +[24] 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. 4 +[25] H. Liu, L. Li, I. M. Wormstone, C. Qiao, C. Zhang, P. Liu, S. Li, H. Wang, D. Mou, R. Pang, et al. Development and validation of a deep learning system to detect glaucomatous optic neuropathy using fundus photographs. JAMA Ophthalmology, 137(12):1353-1360, 2019. 1, 2 +[26] Wenfeng Luo and Meng Yang. Semi-supervised semantic segmentation via strong-weak dual-branch network. In European Conference on Computer Vision, pages 784–800. Springer, 2020. 2 +[27] Xiangde Luo, Jieneng Chen, Tao Song, and Guotai Wang. Semi-supervised medical image segmentation through dual-task consistency. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 8801-8809, 2021. 2 +[28] Shishir Maheshwari, Ram Bilas Pachori, and U Rajendra Acharya. Automated diagnosis of glaucoma using empirical wavelet transform and currentry features extracted from fundus images. IEEE journal of biomedical and health informatics, 21(3):803-813, 2016. 2 +[29] Sudhanshu Mittal, Maxim Tatarchenko, and Thomas Brox. Semi-supervised semantic segmentation with high-and low-level consistency. IEEE transactions on pattern analysis and machine intelligence, 2019. 2 +[30] Davy Neven, Bert De Brabandere, Stamatios Georgoulis, Marc Proesmans, and Luc Van Gool. Towards end-to-end lane detection: an instance segmentation approach. In 2018 IEEE intelligent vehicles symposium (IV), pages 286-291. IEEE, 2018. 5, 6 +[31] Dong Nie, Jia Xue, and Xiaofeng Ren. Bidirectional pyramid networks for semantic segmentation. In Proceedings of the Asian Conference on Computer Vision, 2020. 2 +[32] José Ignacio Orlando, Huazhu Fu, João Barbosa Breda, Karel van Keer, Deepti R Bathula, Andrés Diaz-Pinto, Ruogu Fang, Pheng-Ann Heng, Jeyoung Kim, JoonHo Lee, et al. Refuge challenge: A unified framework for evaluating automated methods for glaucoma assessment from fundus photographs. Medical image analysis, 59:101570, 2020. 2, 6 +[33] José Ignacio Orlando, Philipp Seebock, Hrvoje Bogunović, Sophie Klimscha, Christoph Grechenig, Sebastian Waldstein, Bianca S Gerendas, and Ursula Schmidt-Erfurth. U2-net: A bayesian u-net model with epistemic uncertainty feedback for photoreceptor layer segmentation in pathological oct scans. In 2019 IEEE 16th International Symposium on Biomedical Imaging, pages 1441-1445. IEEE, 2019. 2 +[34] Yassine Ouali, Céline Hudelot, and Myriam Tami. Semi-supervised semantic segmentation with cross-consistency training. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12674-12684, 2020. 2, 6 +[35] Mike Pekala, Neil Joshi, TY Alvin Liu, Neil M Bressler, D Cabrera DeBuc, and Philippe Burlina. Deep learning based retinal oct segmentation. Computers in Biology and Medicine, 114:103445, 2019. 2 +[36] A. Peroni, C. A. Cutolo, L. A. Pinto, A. Paviotti, M. Campigotto, C. Cobb, J. Gong, S. Patel, A. Tatham, S. Gillan, et al. A + +deep learning approach for semantic segmentation of gonioscopic images to support glaucoma categorization. In Annual Conference on Medical Image Understanding and Analysis, pages 373-386. Springer, 2020. 1 +[37] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018. 6 +[38] Mamshad Nayeem Rizve, Kevin Duarte, Yogesh S Rawat, and Mubarak Shah. In defense of pseudo-labeling: An uncertainty-aware pseudo-label selection framework for semi-supervised learning. In International Conference on Learning Representations, 2020. 2, 7 +[39] 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. 4 +[40] Lars Schmarje, Monty Santarossa, Simon-Martin Schroder, and Reinhard Koch. A survey on semi-, self-and unsupervised learning for image classification. arXiv preprint arXiv:2002.08721, 2, 2020. 2 +[41] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 7 +[42] Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin A Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. Fixmatch: Simplifying semi-supervised learning with consistency and confidence. Advances in Neural Information Processing Systems, 33, 2020. 2, 6 +[43] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2818-2826, 2016. 7 +[44] Yih-Chung Tham, Xiang Li, Tien Y Wong, Harry A Quigley, Tin Aung, and Ching-Yu Cheng. Global prevalence of glaucoma and projections of glaucoma burden through 2040: a systematic review and meta-analysis. Ophthalmology, 121(11):2081-2090, 2014. 1 +[45] Haoran Wang, Licheng Jiao, Shuyuan Yang, Lingling Li, and Zexin Wang. Simple and effective: Spatial rescaling for person reidentification. IEEE Transactions on Neural Networks and Learning Systems, 2020. 3 +[46] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7794-7803, 2018. 3 +[47] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. Cbam: Convolutional block attention module. In Proceedings of the European conference on computer vision (ECCV), pages 3–19, 2018. 3 +[48] Junde Wu, Shuang Yu, Wenting Chen, Kai Ma, Rao Fu, Hanruo Liu, Xiaoguang Di, and Yefeng Zheng. Leveraging undiagnosed data for glaucoma classification with teacher-student learning. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 731-740. Springer, 2020. 2 + +[49] Qizhe Xie, Zihang Dai, Eduard Hovy, Thang Luong, and Quoc Le. Unsupervised data augmentation for consistency training. Advances in Neural Information Processing Systems, 33, 2020. 2 +[50] Rongchang Zhao, Xuanlin Chen, Xiyao Liu, Zailiang Chen, Fan Guo, and Shuo Li. Direct cup-to-disc ratio estimation for glaucoma screening via semi-supervised learning. IEEE Journal of Biomedical and Health Informatics, 24(4):1104-1113, 2019. 2 +[51] Qiang Zhou, Chaohui Yu, Zhibin Wang, Qi Qian, and Hao Li. Instant-teaching: An end-to-end semi-supervised object detection framework. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4081-4090, 2021. 2 +[52] Yi Zhu, Zhongyue Zhang, Chongruo Wu, Zhi Zhang, Tong He, Hang Zhang, R Manmatha, Mu Li, and Alexander Smola. Improving semantic segmentation via self-training. arXiv e-prints, pages arXiv-2004, 2020. 2 +[53] Barret Zoph, Golnaz Ghiasi, Tsung-Yi Lin, Yin Cui, Hanxiao Liu, Ekin Dogus Cubuk, and Quoc Le. Rethinking pretraining and self-training. Advances in Neural Information Processing Systems, 33, 2020. 2 \ No newline at end of file diff --git a/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/images.zip b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..580237211acc174a701daa6706970158f5151c87 --- /dev/null +++ b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65e0d5fd1eb3f4330b75b26febd6a35acecce1604932c8ac896e793a1b2f96b5 +size 483118 diff --git a/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/layout.json b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6d90d70685c4cb500d7524ab0b5039799187d874 --- /dev/null +++ b/weaklysupervisedmetriclearningwithcrossmodulecommunicationsfortheclassificationofanteriorchamberangleimages/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c6e1b3e31d2d445f5ae88f253f130307518921ddfa1672006314614114d1ab8 +size 428929 diff --git a/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_content_list.json b/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..60e621964d8afa68ec9283b48e029a17f7686380 --- /dev/null +++ b/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:590cdb526ae59c8efd56d62c8bd293f28e0f9252581b371b32e5f8eb1fce732e +size 78270 diff --git a/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_model.json b/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ac4ef8aa32aa63e039837710a315c28551415922 --- /dev/null +++ b/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bdfd7eab8cf601817bccdcea174332c9dc04ea87965c572d33ff47bcd89507a +size 95083 diff --git a/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_origin.pdf b/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e693589e658c6038bca38561cfe87934eeed59f8 --- /dev/null +++ b/weaklysupervisedobjectlocalizationasdomainadaption/eb8e2b51-0646-4962-8ca8-4e425d2c7fe3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0a81d3767eb72f99954ce2a9f857edf069506e59b60c2117e221b7f8a895c44 +size 4678849 diff --git a/weaklysupervisedobjectlocalizationasdomainadaption/full.md b/weaklysupervisedobjectlocalizationasdomainadaption/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b0780920513d0792d49e6975ceee819304dd9fc7 --- /dev/null +++ b/weaklysupervisedobjectlocalizationasdomainadaption/full.md @@ -0,0 +1,317 @@ +# Weakly Supervised Object Localization as Domain Adaption + +Lei Zhu $^{1,3,5}$ Qi She $^{2}$ Qian Chen $^{1,3,5}$ Yunfei You $^{1,3,5}$ Boyu Wang $^{4}$ Yanye Lu $^{*,1,5}$ + +zhulei@stu.pku.edu.cn, yanye.lu@pku.edu.cn + +$^{1}$ Institute of Medical Technology, Peking University $^{2}$ Bytedance AI Lab $^{3}$ Department of Biomedical Engineering, Peking University $^{4}$ University of Western Ontario $^{5}$ Institute of Biomedical Engineering, Peking University Shenzhen Graduate School + +# Abstract + +Weakly supervised object localization (WSOL) focuses on localizing objects only with the supervision of image-level classification masks. Most previous WSOL methods follow the classification activation map (CAM) that localizes objects based on the classification structure with the multi-instance learning (MIL) mechanism. However, the MIL mechanism makes CAM only activate discriminative object parts rather than the whole object, weakening its performance for localizing objects. To avoid this problem, this work provides a novel perspective that models WSOL as a domain adaption (DA) task, where the score estimator trained on the source/image domain is tested on the target/pixel domain to locate objects. Under this perspective, a DA-WSOL pipeline is designed to better engage DA approaches into WSOL to enhance localization performance. It utilizes a proposed target sampling strategy to select different types of target samples. Based on these types of target samples, domain adaption localization (DAL) loss is elaborated. It aligns the feature distribution between the two domains by DA and makes the estimator perceive target domain cues by Universum regularization. Experiments show that our pipeline outperforms SOTA methods on multi benchmarks. Code are released at https://github.com/zh460045050/DA-WSOL_CVPR2022. + +# 1. Introduction + +Weakly supervised object localization (WSOL), learning the location of objects in images using only the image-level classification mask to supervise, relaxes the requirement for the dense annotation such as pixel-level segmentation masks or bounding boxes for the training process, which saves much manual labor for annotation and attract extensive attention in recent years [33, 4, 28, 1, 31, 2, 13]. + +The most well-known WSOL method is the classification activation map (CAM) [33], which utilizes the classi + +![](images/b20f27011676554bce8bf91901204296bd2da409638ff4bb931db421843bb21a.jpg) + +![](images/cafb2636445fd5f8929cba4180067fb0feb0000644afe942444ca26a323d93e0.jpg) + +![](images/c549a94658d21d97243a59ce4f98bdab7cd433ddd5fab4efeeac8a6abce46620.jpg) +Figure 1. The comparison of DA-WSOL and other mechanisms. + +fication structure to generate the localization score. As indicated in Fig. 1 B, it theoretically serves as classification under multi-instance learning (MIL) [6], where each image represents a bag whose label is determined by instances it contains [29], i.e. the pixels/patches. However, MIL focuses more on the accuracy of bags (images) rather than the instances (pixels), which makes CAM only discern the most discriminative parts but not the whole object. For activating more objects parts, different technics are adopted to enhance CAM, e.g. data augmentations [27, 14, 29, 4], novel network structures [4, 30, 1, 31], or post-processes [2, 13]. Though these methods somewhat alleviate this problem, they still follow MIL that basically causes the incomplete activation of objects and weakens the performance. + +From another perspective, CAM is also the same as training an estimator to classify the image-level feature under the supervision of image-level masks. This well-trained estimator is then projected onto the pixel-level feature to generate the pixel-level localization scores in the test processing [33]. By viewing image-level and pixel-level features + +as the features respectively extracted from source and target domain, the goal of WSOL is consistent with the domain adaption (DA) task, i.e. forcing the estimator trained on the source (image) domain to perform well on the target (pixel) domain. Thus, if DA methods can assist WSOL in aligning the distribution of these two domains, the estimator can avoid overfitting the source domain, i.e. only activating the discriminative parts of objects. + +Inspired by this, our paper elaborates a DA-WSOL pipeline that helps to better engage the DA approaches into WSOL to enhance the performance. Fig. 1 visually generalizes our novel DA-WSOL pipeline and its difference from other mechanisms of WSOL. Compared with the MIL mechanism, our method adopts DA to align the feature distribution between source and target domain, enhancing the accuracy of the estimator when projected onto the pixel features. Moreover, both classification and localization scores can be obtained with a single end-to-end trained structure. This trait makes our method more concise than another type of WSOL mechanism [28, 18] shown in Fig. 1 C, which requires training multi additional stages to generate class-agnostic region-of-interests (ROI) when localizing objects. + +In addition, the specificities of domain adaption in WSOL are also considered by the proposed DA-WSOL pipeline. Specifically, the target domain of WSOL is more complex constructed, which has a much larger scale than the source domain and contains samples with the source-unseen label, i.e. the background locations. Thus, a target sampling strategy is also proposed for our DA-WSOL pipeline to effectively select the source-related target samples and the unseen target samples. The two types of samples are then fed into a proposed domain adaption localization (DAL) loss, where the former type is utilized to solve the sample imbalance between two domains, and the latter is viewed as the Universum [25] to perceive target cues. + +In a nutshell, our contributions are fourfold: + +- Our work is the first to model WSOL as a DA task and designs a pipeline to assist WSOL by DA methods. +- A DAL loss is proposed to align the feature distribution of source and target domain in the WSOL scenario. +- A target sampling strategy is proposed to select different types of representative target samples. +- Extensive experiments show our DA-WSOL outperforms SOTA methods on multiply WSOL benchmarks. + +# 2. Related Works + +# 2.1. Multi-instance learning based WSOL + +MIL-based WSOL methods train a classification network in a MIL manner to ensure that this network can be utilized to localize pixels with certain classes. Zhou et al. [33] + +proposed the CAM, which utilizes the classification structure to localize objects by projecting the classifier onto the pixel-level feature. Zhang et al. [29] proved its mechanism is equal to the MIL and improved it by utilizing two adversarial classifiers to catch complementary object parts. For a similar purpose, Singh et al. [14] randomly hid the patches of images to force the classification structure to focus more parts of objects. Junsk et al. [4] then enhanced it by directly erasing discriminative spatial positions on the feature map. Yun et al. [27] replace patches of an image by its of other images to augment the training samples. Except for the data augmentations, novel network structures were also explored to enhance the CAM. Typically, Zhang et al. [30] generated coarse pixel-wise masks based on different stages of the extractor and used them as additional supervision to force the later stages. Zhang et al. [31] also adopted the siamese network to ensure stochastic consistency for images with the same class in a batch. Unlike these methods that follow MIL mechanism, our method align pixel-level and image-level features with DA approaches to assist WSOL task. + +# 2.2. Separated-structure based WSOL + +Instead of viewing WSOL as the image classification in the MIL manner, Zhang et al. [28] suggested splitting WSOL into two independent tasks: the class-agnostic object localization and the object classification. They proposed a pseudo-supervised object localization (PSOL) method with three stages respectively for region proposal, bounding box regression, and object classification. Lu et al. [18] attempted to generate ROI with different geometry and adopted a generator to produce class-agnostic binary masks rather than only bounding boxes. Zhang et al. [32] used the classification stage to obtain both classification results and localization seeds, which are then used by the localization stage to generate class-agnostic localization maps. More recently, Meng et al. [19] explored jointly optimizing localization and classification to pursue better results. Compared with them, our method can obtain both classification and localization results with only one stage. + +# 2.3. Domain Adaption + +Domain adaption aims at learning discriminative models in the presence of the shift between distributions of the training and test samples. Some DA methods focus on catching domain-invariant features with deep neural networks by minimizing the maximum mean discrepancy (MMD) [8, 9, 16]. Long et al. [17] enhanced the MMD by considering the joint distributions for the feature of different neural network stages. Kang et al. [11] and Zhu et al. [34] further took the class label of samples into account to measure both intra-class and inter-class discrepancies. Instead of measuring the distribution discrepancy, some methods also adopt adversarial learning to confuse a well-trained do + +main classifier when learning domain-invariable features. Typically, Ganin et al. [7] added a gradient reversal layer right before the domain classifier to enable adversarially training the domain adaption network in an end-to-end manner. Pei et al. [21] further considered fine-grained alignment of different data distributions by adopting multiply domain classifiers with gradient reversal layer. Yu et al. [26] subdivided those classifiers into global and sub-domain classifiers to learn the relationship between the marginal and conditional distributions. Different from those methods, our work focus on adopting DA to better assist WSOL task. + +# 3. Method + +This section firstly revisits WSOL and provides a novel perspective that WSOL can be modeled as a DA task with specific properties. Then, the proposed DAL loss is introduced, which considers the effects of different types of target samples based on the specificities of WSOL. Next, we detail the target sampling strategy that assigns the target samples into the three types. Finally, the entire structure and workflow of our DA-WSOL pipeline are introduced in detail. Note that the meanings of all the key symbols are also given in our Appdenix for clarity. + +# 3.1. Revisiting the WOSL + +Given an input image $\mathbf{X} \in \mathbb{R}^{3 \times N}$ , the object localization task aims at discerning whether a position $\mathbf{X}_{\cdot ,i}$ belongs to the object of a certain class $k$ , where $N$ is the number of pixels in the image. For this purpose, a feature extractor $f(\cdot)$ and a score estimator $e(\cdot)$ are learned to extract the pixel-level features $\mathbf{Z} = f(\mathbf{X}) \in \mathbb{R}^{C \times N}$ and estimate the localization score $\mathbf{Y}^{*} = e(\mathbf{Z}) \in \mathbb{R}^{K \times N}$ , respectively. For fully supervised object localization, the pixel-level localization mask $\mathbf{Y} \in \mathbb{R}^{K \times N}$ is adopted as supervision for $\mathbf{Y}^{*}$ to learn $f(\cdot)$ and $e(\cdot)$ . Note that, the element $\mathbf{Y}_{k,i}$ identifies whether or not pixel $i$ belongs to the object of the class $k$ . + +As for WSOL, only the image-level classification mask $\pmb{y} = \left(\max(Y_{0,:}), \max(Y_{1,:}), \dots, \max(Y_{K-1,:})\right) \in \mathbb{R}^{K \times 1}$ is available for the whole training process. Thus, an additional aggregator $g(\cdot)$ is added between the feature extractor and the score estimator to aggregate the pixel-level feature into image-level, i.e. $\pmb{z} = g(\pmb{Z}) \in \mathbb{R}^{C \times 1}$ . This image-level feature is then fed into the score estimator to generate the image-level classification score $\pmb{y}^* = e(\pmb{z}) \in \mathbb{R}^{K \times 1}$ . Profited by this image-level score, the image-level mask $\pmb{y}$ can supervise the training process with the classification loss, such as the cross-entropy between $\pmb{y}^*$ and $\pmb{y}$ . While in the test time, this estimator is projected back onto the pixel-level feature $\pmb{Z}$ to predict the localization scores $\pmb{Y}^*$ . + +# 3.2. Modeling WSOL as Domain Adaption + +By mapping all input images into two feature spaces represented by $s = z = (g \cdot f)(X)$ and $\{t_1, t_2, \dots, t_N\} =$ + +$\{Z_{1,:}, Z_{2,:}, \dots, Z_{N,:}\} = f(\pmb{X})$ , two feature sets $\mathbb{S}: \{\pmb{s}\}$ and $\mathbb{T}: \{\pmb{t}\}$ can be constructed, where we call $\mathbb{S}$ and $\mathbb{T}$ as the source (image) domain and target (pixel) domain for clarity. The corresponding label sets of $\mathbb{S}$ and $\mathbb{T}$ are defined as $\mathbb{Y}^s: \{\pmb{y}^s = \pmb{y}\}$ and $\mathbb{Y}^t: \{\pmb{y}^t = \pmb{Y}_{:,i}\}$ , respectively. Under this view, WSOL can be seen as fully-supervised training the score estimator $e(\cdot)$ on the image domain $\mathbb{S}$ with label set $\mathbb{Y}^s$ , and then taking inference on the pixel domain $\mathbb{T}$ to estimate the localization mask $\mathbb{Y}^t$ in the test process. This process is a typical setting of the DA task, which aims at learning a discriminative model in the presence of the feature shift between training and test process [26]. Thus, WSOL is equal to solving the following DA task: + +Definition 1 Given an image set $\mathbb{X} = \{X^1, \dots, X^M\}$ , the source domain and target domain are defined as: + +$$ +\left\{ \begin{array}{l} \mathbb {S}: \left\{\boldsymbol {s} = (g \cdot f) \left(\boldsymbol {X} ^ {m}\right) \mid m \in [ 1, M ] \right\} \\ \mathbb {T}: \left\{\boldsymbol {t} = f \left(\boldsymbol {X} ^ {m}\right) _ {:, i} \mid i \in [ 1, N ], m \in [ 1, M ] \right\}. \end{array} \right. \tag {1} +$$ + +WSOL aims at minimizing the target risk without accessing the target label set $\mathbb{Y}^t$ . It serves as a multi-task problem: 1) minimizing source risk between $e(\mathbb{S})$ and $\mathbb{Y}^s$ . 2) minimizing domain discrepancy between $\mathbb{S}$ and $\mathbb{T}$ . + +Based on the perspective of Theorem 1, the object of our proposed DA-WSOL pipeline can be formulated as: + +$$ +\mathcal {L} (\mathbb {S}, \mathbb {Y} ^ {s}, \mathbb {T}) = \mathcal {L} _ {c} (e (\mathbb {S}), \mathbb {Y} ^ {s}) + \mathcal {L} _ {a} (\mathbb {S}, \mathbb {T}), \tag {2} +$$ + +where $\mathcal{L}_c(\cdot)$ is the classification loss that supervises the accuracy on the source domain. $\mathcal{L}_a(\cdot)$ is the adaption loss minimizing the discrepancy between the $\mathbb{S}$ and $\mathbb{T}$ . This additional term forces $f(\cdot)$ and $g(\cdot)$ to learn domain-invariant features between the source (image) domain and target (pixel) domain, which helps the source trained estimator $e(\cdot)$ also perform well on target samples. Thus, more object locations can be activated in the test processing. + +Remark 1 There are also some specific properties for WSOL that do not exist in the traditional DA task. These properties weaken the applicability for directly implementing $\mathcal{L}_a(\cdot)$ as the existing DA methods [8, 17, 11, 34, 7, 26]. + +Property 1 Target domain $\mathbb{T}$ contains samples that do not belong to any object classes of source domain $\mathbb{S}$ , i.e. the background locations. Aligning features of these samples with the source domain will hurt the performance. + +Property 2 The number of samples in the source domain is much less than the target domain in WSOL, i.e. $|\mathbb{S}| = |\mathbb{T}| / N$ . The insufficient samples cause difficulties when perceiving the source distribution during training. + +Property 3 The discrepancy between the source domain and target domain is attributed to the aggregation function $g(\cdot)$ rather than entirely unknown as traditional DA tasks. This property can be used as a prior when aligning the feature distribution of source and target domain. + +![](images/b6cac764b94ad79ffcc96e33f7660a9dae42e4f74b318b8171715fd13578cfae.jpg) +A + +![](images/e966945b46f3b54ae583bc584b19c8581848538b96d0cb9a418f18729b05338b.jpg) + +![](images/139f0c933bf21ef35ca6f4afd25744734d8fe0004fdd931faf4c3199c4f8b325.jpg) + +![](images/57bba5cd5f37fec370aee53987cf57a00f8a8fd667c6d90e11de022b69e90041.jpg) +B +Figure 2. The mechanism of our proposed DA-WSOL (best view in color). A. The visualization of the source domain, target domain, and different types target samples. B. The effects shown when sequentially adding our designed loss function $\mathcal{L}_c$ , $\mathcal{L}_d$ , and $\mathcal{L}_u$ . + +# 3.3. Domain Adaption Localization Loss + +To consider these properties, a domain adaption localization (DAL) loss is elaborated as $\mathcal{L}_a(\cdot)$ . As shown in Fig. 2 A, our DAL loss further divides the target set $\mathbb{T}$ into three subsets based on the above properties: 1) the fake target set $\mathbb{T}^f:\{\pmb {t}^f\}$ contains target samples that are highly correlated to the source domain. 2) the Universum set $\mathbb{T}^u:\{\pmb {t}^u\}$ contains target samples whose label is unseen in source domain, i.e. background locations.; 3) the real target set $\mathbb{T}^t:\{\pmb {t}^t\}$ contains target samples that do not belong to $\mathbb{T}^f$ and $\mathbb{T}^u$ . + +Specifically, based on Property. 3, the source domain is constructed by operating spatial aggregation on target samples. The distribution of some target samples that have high importance on the aggregation functions $g(\cdot)$ is similar to the source domain, for example the patches of frog or donkey head in Fig. 2 A. These samples are contained in $\mathbb{T}^f$ and then used as a supplement to estimate the distribution of the source domain $\mathbb{S}$ that has insufficient samples as discussed in Property. 2. Moreover, to solve the unmatched label space between the source and target domain as discussed in Property. 1, $\mathbb{T}^u$ is utilized to contain samples that have the source-unseen label, for example the patches of ground or grass in Fig. 2 A. It ensures that $\mathbb{T} - \mathbb{T}^u$ has the same label space as the source domain. Finally, by purifying $\mathbb{T}^f$ and $\mathbb{T}^u$ from $\mathbb{T}$ , other samples construct $\mathbb{T}^t$ that is used to estimate the distribution of the target domain. + +Based on these three subsets of the target domain, the DAL loss is defined to minimize the domain discrepancy: + +$$ +\mathcal {L} _ {a} (\mathbb {S}, \mathbb {T}) = \mathcal {L} _ {D A L} (\mathbb {S}, \mathbb {T}) = \lambda_ {1} \mathcal {L} _ {d} (\mathbb {S} \cup \mathbb {T} ^ {f}, \mathbb {T} ^ {t}) + \lambda_ {2} \mathcal {L} _ {u} (\mathbb {T} ^ {u}), \tag {3} +$$ + +where $\lambda_{1},\lambda_{2}$ are two parameters, $\mathcal{L}_d(\cdot)$ is the domain adaption loss, and $\mathcal{L}_u(\cdot)$ is the Universum regularization [25]. In detail, the domain adaption loss $\mathcal{L}_d(\cdot)$ can be implemented as unsupervised domain adaption (UDA) approaches [8, 7] + +to align the feature distributions between the two domains without accessing target labels. As visualized in Fig. 2 B, adding $\mathcal{L}_d(\cdot)$ can tighten the source domain (peach circle) and the target domain (green circle), making the source-trained estimator also perform better for the target samples. + +In addition, $\mathcal{L}_u(\cdot)$ adopts the mechanism of Universum [25] that uses target samples with the source-unseen label $(\mathbb{T}^u)$ to enhance the performance on the target set. It is implemented as feature-based $l_{1}$ regularization: + +$$ +\mathcal {L} _ {u} \left(\mathbb {T} ^ {u}\right) = \sum_ {\boldsymbol {t} _ {i} ^ {u} \in \mathbb {T} ^ {u}} \left| \boldsymbol {t} _ {i} ^ {u} \right|, \tag {4} +$$ + +which minimizes the feature strength of Universum samples. As visualized in Fig. 2 B, adding $\mathcal{L}_u$ pushes the decision boundary into Universum samples, which makes the decision boundary also concerns target cues [25]. Moreover, this regularization also reduces the domain discrepancy attributed to $g(\cdot)$ , because it eliminates noises caused by Universum samples when generating source feature. + +# 3.4. Target Sampling Strategy + +The calculation of DAL loss requires samples of the three subsets on the target domain. Thus, a target sampling strategy is proposed for selecting the representative samples of the these subsets from target features of a certain input image. The core of this strategy is a target sample assigner (TSA) shown in Fig. 3, which contains a cache matrix $M \in \mathbb{R}^{C \times (K + 1)}$ . In detail, $M_{:,0}$ represents the anchor of $\mathbb{T}^u$ and is initialized as the zero vector before training. Other column vectors, for example $M_{:,k + 1}$ , represent the anchor of $\mathbb{T}^t$ for a certain class $k$ . When the image of class $k$ is first accessed, $M_{:,k + 1}$ is initialized by adding a small random offset $\epsilon$ on its source feature $z$ , i.e. $M_{:,k + 1} = z + \epsilon$ . + +Profited by the cache matrix $M$ , in the forward pass of the training process, the TSA can provide the anchors of the + +![](images/0a043b850846ee20a93138989369c99eef1a1680a76a8e09739a8bf9f444eee7.jpg) +Training Process + +![](images/e8b2414dd415e2becc09ab5701a85eed7042111caa17c3e013448ada148930f0.jpg) +Input Image $X$ + +![](images/a5c064c3c6a6c94d2fc29a2f578f1b016adec9c1d0b55bba2b73d37ad067c0ad.jpg) +Legend + +Figure 3. The total structure and work flow of the proposed DA-WSOL pipeline (best view in color). +![](images/8fbd965823d6dcd12e281dde9a3040323e79031b3c3cd5544b85642f1b77212e.jpg) +: Fake target samples +Real target samples +: Universersum target samples +$\bigcirc$ : Target samples + +$\mathbb{T}^u$ and $\mathbb{T}^t$ based on the image-level mask $\pmb{y}$ + +$$ +\boldsymbol {a} ^ {u} = \boldsymbol {M} _ {:, 0}, \boldsymbol {a} ^ {t} = \boldsymbol {M} _ {:, k + 1}, k = \arg \max (\boldsymbol {y}), \tag {5} +$$ + +where $k$ is the class index. $\pmb{a}^{u},\pmb{a}^{t}\in \mathbb{R}^{C\times 1}$ are the anchors of $\mathbb{T}^u$ and $\mathbb{T}^t$ , respectively. These two anchors are then combined with the source feature $\textbf{z}$ to form the initial center of the three subsets, i.e. $C^{init} = \{\pmb {a}^u,\pmb {a}^t,\pmb {z}\} \in \mathbb{R}^{C\times 3}$ + +Next, based on $C^{init}$ , the three-way $K$ -means clustering is operated on the target samples, i.e. the column vectors of $Z$ , to assign them a cluster label $y_{i}^{c} \in \{0,1,2\}$ . Finally, $n$ samples are randomly sampled for each subset based on the cluster labels to calculate the DAL loss: + +$$ +\left\{ \begin{array}{l} \mathbb {T} ^ {u}: \left\{\boldsymbol {Z} _ {:, i} \mid y _ {i} ^ {c} = 0 \right\} \\ \mathbb {T} ^ {t}: \left\{\boldsymbol {Z} _ {:, i} \mid y _ {i} ^ {c} = 1 \right\} \\ \mathbb {T} ^ {f}: \left\{\boldsymbol {Z} _ {:, i} \mid y _ {i} ^ {c} = 2 \right\} \end{array} . \right. \tag {6} +$$ + +In the backward process, the final cluster center $C$ outputted by K-means clustering is utilized to optimize $M$ gradually during the training process: + +$$ +M _ {k,:} = \left\{ \begin{array}{l} \boldsymbol {r} _ {0} M _ {:, 0} + (1 - \boldsymbol {r} _ {0}) C _ {:, 0}, k = 0 \\ \boldsymbol {r} _ {k} M _ {:, k} + (1 - \boldsymbol {r} _ {k}) C _ {:, 1}, k \neq 0, \boldsymbol {r} _ {k} \neq 0 \\ C _ {:, 1}, k \neq 0, \boldsymbol {r} _ {k} = 0, | | C _ {:, 2} - z | | \leq | | C _ {:, 1} - z | | \\ C _ {:, 2}, k \neq 0, \boldsymbol {r} _ {k} = 0, | | C _ {:, 2} - z | | > | | C _ {:, 1} - z | | \end{array} \right. \tag {7} +$$ + +where $\pmb{r} \in \mathbb{R}^{1 \times (K + 1)}$ contains the update ratio. $\pmb{r}_k$ is implemented as reciprocal for the number of the passed images with class $k$ . Based on Eq. 7, $M$ can approximate the centroid of the $\mathbb{T}^u$ and $\mathbb{T}^t$ , which enhances the accuracy of the + +anchor it provides. Note that, if the anchor of target domain initialized by $z + \epsilon$ , i.e. $r_k = 0$ , we choose the cluster center that has large distance to $z$ as the updated anchor. + +# 3.5. DA-WSOL Pipeline + +The proposed target sampling strategy can be easily engaged into current WSOL methods to train them with DAL loss. It acts as a connection for our DA-WSOL pipeline to improve the performance of the WSOL method with DA approaches. Fig. 3 shows the entire structure of the proposed DA-WSOL pipeline. Specifically, in the training process, the source domain $\mathbb{S}$ and the target domain $\mathbb{T}$ for a batch of images are firstly generated by feeding the input image into the feature extractor $f(\cdot)$ and the feature aggregator $g(\cdot)$ of a certain WSOL method. Here, we follow the CAM that implements $f(\cdot)$ as the classification backbone (ResNet [10], InceptionV3 [22]) and adopts global average pooling (GAP) [15] as $g(\cdot)$ . Moreover, the estimator $e(\cdot)$ implemented by the fully-connected layer is operated on the sample of the source domain $\mathbb{S}$ to generate the image-level classification score, which is supervised by their image-level mask $\pmb{y}$ with cross-entropy: + +$$ +\mathcal {L} _ {c} \left(e (\mathbb {S}), \mathbb {Y} ^ {s}\right) = \sum_ {\left(\boldsymbol {s} _ {i}, \boldsymbol {y} _ {i}\right) \in \left(\mathbb {S}, \mathbb {Y} ^ {s}\right)} \mathcal {L} _ {c e} \left(e \left(\boldsymbol {s} _ {i}\right), \boldsymbol {y} _ {i}\right). \tag {8} +$$ + +Based on these two domains and the image-level mask $\pmb{y}$ , the proposed target sample assigner selects representative samples of the three target subsets, $\mathbb{T}^u$ (noted by gray round), $\mathbb{T}^f$ (noted by peach round), and $\mathbb{T}^t$ (noted by pink round). Then, the samples of $\mathbb{T}^u$ are utilized to calculate + +Table 1. The comparison between our method and other SOTA methods on ImageNet and CUB-200 datasets. + +
MethodImageNet datasetCUB-200 dataset
Top-1 LocGT-knownBoxAccV2Top-1 LocGT-knownBoxAccV2pIoUPxAP
CAM [33]51.8164.7262.6965.8072.4768.2847.6066.78
HAS [14]51.6164.4262.4051.2870.9964.5049.8271.32
ACoL [29]45.0764.2161.8742.5370.0961.2241.5656.78
SPG [30]46.6263.7161.3653.0268.8260.3644.9761.20
ADL [4]49.8164.6762.7544.3063.3156.6142.2956.59
CutMix [27]50.6463.2761.5169.3781.1068.6445.8964.64
CAAM [1]52.3667.89-64.7077.35---
DGL [23]43.4167.52-60.8276.65---
I2C [31]54.8368.50------
ICLCA [12]48.4067.6265.1556.1072.7963.20--
PSOL [28]53.9865.54-70.68----
SEM [32]53.8467.00------
FAM [19]54.4664.56-73.7485.73---
PAS [2]49.4262.2064.7259.5377.5866.38--
IVR [13]--65.57--71.23--
Ours43.2670.2768.2362.4081.8369.8756.1874.70
Ours*55.8470.2768.2366.6581.8369.8756.1874.70
+ +* Scores in bold style indicate the best. Methods in underline style mean the generated localization maps are class-agnostic. + +the Universum regularization $\mathcal{L}_u$ with Eq. 4. The samples of the other two subsets and source domain (noted by pink square) are fed into existing UDA methods to align features distribution between source and target domain. Here, we adopt the MMD [8] as the UDA method: + +$$ +\begin{array}{l} \mathcal {L} _ {d} (\mathbb {S} \cup \mathbb {T} ^ {f}, \mathbb {T} ^ {t}) = - \frac {\sum_ {\boldsymbol {s} _ {i} \in \mathbb {S} \cup \mathbb {T} ^ {f} , \boldsymbol {t} _ {j} \in \mathbb {T} ^ {t}} 2 * h (\boldsymbol {s} _ {i} , \boldsymbol {t} _ {j})}{| \mathbb {S} \cup \mathbb {T} ^ {f} | * | \mathbb {T} ^ {t} |} \tag {9} \\ + \frac {\sum_ {\boldsymbol {s} _ {i} , \boldsymbol {s} _ {j} \in \mathbb {S} \cup \mathbb {T} ^ {f}} h (\boldsymbol {s} _ {i} , \boldsymbol {s} _ {j})}{| \mathbb {S} \cup \mathbb {T} ^ {f} | ^ {2}} + \frac {\sum_ {\boldsymbol {t} _ {i} , \boldsymbol {t} _ {j} \in \mathbb {T} ^ {t}} h (\boldsymbol {t} _ {i} , \boldsymbol {t} _ {j})}{| \mathbb {T} ^ {t} | ^ {2}} \\ \end{array} +$$ + +where $h(\cdot)$ is the gaussian kernel. Note that it is convenient to change the UDA or WSOL method in our DA-WSOL. + +In the test processing, localization maps can be generated by directly feeding the target feature into the source-trained estimator, i.e. $\mathbf{Y}^{*} = e(f(\mathbf{X}))$ , whose column vector also represents the classification score of a target sample. + +# 4. Experiment + +In this section, we first introduce the settings and training details of our experiments. Then the results on three datasets are given to evaluate the effectiveness of our method. Next, ablation studies are conducted to explore the effect of different settings of our method. Finally, our defect and fail cases are also discussed to inspire future works. + +# 4.1. Settings + +Our DA-WSOL adopted the CAM with ResNet50 [10] as the basic WSOL method and MMD [8] as the UDA ap + +proaches unless otherwise stated. The batch size 32 was adopted, and the hyper-parameter $n$ was set 32. Random cropped and random flip with size $224 \times 224$ were adopted as the augmentation. The SGD optimizer with weight decay 1e-4 and momentum 0.9 was utilized for training. + +Experiments were conducted on three widely-used WSOL benchmarks based on Pytorch toolbox [20] with Intel Core i9 CPU and an Nvidia RTX 3090 GPU: + +ImageNet dataset [5] contains 1.3 million images of 1,000 classes, where 50,000 images with bounding box annotation served as the test set, and others were used as the training set. For the ImageNet dataset, the initial learning rate $1e - 5$ was set to train our DA-WSOL for total 10 epochs, which was divided by 10 every 3 epochs. Hyper-parameter $\lambda_{1}$ and $\lambda_{2}$ were set as 0.3 and 3, respectively. + +CUB-200 dataset [24] contains 11,788 images with 200 fine-grain classes of birds, where 5,794 images that have both pixel-level masks and bounding-box annotations were used as the testing set. Additionally, 1,000 extra images annotated by Junsuk [3] were used as the validation set. The initial learning rate $1e - 3$ was set for the SGD to train our DA-WSOL 50 epochs on this dataset. The learning rate was divided by 10 after training 30 epochs. The two hyperparameters of DAL loss were set as $\lambda_{1} = 0.3$ and $\lambda_{2} = 2$ . + +OpenImages dataset [3] contains 37,319 images of 100 classes, where the pixel-level mask annotations were released for 2,500 validation images and 5,000 test images. The rest 19,819 images served as the training set to train our DA-WSOL total 10 epochs with the initial learning rate + +1e-3. The learning rate was divided by 10 every 3 epochs. Hyper-parameter $\lambda_{1}$ and $\lambda_{2}$ were set as 0.2 and 3. + +The localization accuracy is evaluated by Top-1 localization accuracy (Top-1 Loc), ground truth known localization accuracy (GT-known), and maximal box accuracy (BoxAccV2) [3] based on bounding boxes annotations. While, if the pixel-level annotations were available, peak intersection over union (pIoU) and the pixel average precision (PxAP) [3] were adopted as the evaluation metric. + +Except for our method (noted by Ours), we implemented six WSOL methods to fair compare the performance, including CAM [33], HAS [14], ACoL [29], SPG [30], ADL [4], and CutMix [27]. Results of the other SOTA methods were cited from their papers. In addition, we also implemented a two-stage version (noted by Ours*) that uses an additional stage to output the classification score. + +# 4.2. Results + +Table. 1 shows the corresponding results of different WSOL methods and our proposed method on ImageNet and CUB-200 datasets with ResNet50 backbone. It shows that our method outperforms all those methods on all metrics of the large-scale ImageNet dataset. Specifically, benefited from eliminating the domain discrepancy between training and test process, our method achieves $1.77\%$ (about 885 images) and $2.66\%$ higher scores than the best of others respectively on GT-known and the BoxAccV2 metric. Though the classification accuracy is weakened due to the side-effect of the discrepancy elimination, adding a classification stage for generating classification results $(\text{Ours}^*)$ can solve this defect and makes our method still outperform others on the Top-1 localization scores. As for the fine-grained CUB-200 dataset, methods that only generate class-agnostic localization results commonly have better results than others. This is because the class-agnostic localization can only focus on catching birds rather than different types of birds, which contributes to their higher performance. Though lower than this type of methods, our method achieves the highest GT-known, pIoU and PxAP scores among the methods that generate class-aware localization maps as ours. + +In addition, results on the recently proposed OpenImages dataset are shown in Table. 2. Though the OpenImages dataset is more challenging because of its richer content and finer pixel-level evaluation, our method outperforms the existing methods by a large margin. Specifically, our method obtains $49.68\%$ pIoU and $65.42\%$ PxAP, which are $7.48\%$ and $4.52\%$ higher than the best of others. Two aspects profit this noticeable improvement. Firstly, the richer context of the OpenImages dataset provides more various samples, which helps estimate the feature distribution between source and target domain. This enhances the activation of the localization map on object locations. Secondly, the Uni + +versum regularization of our method also aligns the decision boundary to Universum samples, i.e. background locations. This restrains the activation of the background location and promotes the pixel-level evaluation metrics. Moreover, our highest pixel-level evaluation metrics (pIoU and PxAP) of the CUB-200 dataset shown in Table. 1 also prove this trait. + +Table 2. Comparing with SOTA method on OpenImage dataset + +
ResNet50InceptionV3
pIoUPxAppIoUPxAp
CAM [33]42.9558.1947.3062.66
HAS [14]41.9255.1042.3158.53
ACoL [29]41.6856.3741.1155.69
SPG [30]41.7955.7645.5861.77
ADL [4]42.0555.0245.6761.52
CutMix [27]42.7357.5746.1861.18
PAS [2]-60.90-63.30
IVR [13]-58.90-64.08
Ours49.6865.4248.0164.46
+ +![](images/8559d5f6be7f0532c18c19d7a8ce45a84ac0a0fb4a57cf42a0b90ae5c65609fc.jpg) +Figure 4. The localization maps and boxes (or masks) for different WSOL methods under their optimal background threshold. + +Except for the quantitative results, Fig. 4 also visualizes some localization results. It can be seen that our method activates more object locations than other methods. This is because our method can reduce the feature distribution between the image domain and pixel domain, which pushes the feature of indiscriminative pixels (the body of duck and orangutan) to the image-level feature and makes them better activated by the estimator. This also helps to purify the uncorrelated objects (the adult or the chair) for the localization map of a certain class (the child). Moreover, ben + +efiting from our Universum regularization, the localization map of our method also has the lowest interference on background locations (the water or the ground). These visualization aspects also qualitatively reflect the effectiveness of our pipeline that adopts domain adaption to assist WSOL. + +# 4.3. Ablation Studies + +Ablation studies were conducted on the OpenImages dataset for our proposed DA-WSOL pipeline. Firstly, we explored the impact of our sampling strategy and DAL loss, i.e. the TSA module, the domain adaption loss $\mathcal{L}_d$ and the Universum regularization $\mathcal{L}_u$ . Corresponding results are shown in Table. 3. Compared with the baseline that only adopts classification loss, simply adding existing DA loss to align features will cause performance drops, because the features of Universum samples are also aligned with the features of objects, making the classifier discern background as objects. Under such condition, features of all target samples are messily distributed, which also disables the proposed TSA to effectively discern the Universum samples and assign them into $\mathbb{T}^u$ . Thus, even though adopting TSA to balance the sample number between source and target domain for $\mathcal{L}_d$ , the adaption loss still not fully take effect. However, when utilizing $\mathcal{L}_u$ to push feature of Universum samples (background location) into the decision boundary, TSA can better discern them from other target samples (object locations), which obviously promotes $2.22\%$ in pIoU and $3.31\%$ in PxAP. Thus, adopting the whole DAL loss can improve the performance to a great content compared with the baseline ( $6.73\%$ higher pIoU and $7.24\%$ higher PxAP). + +Table 3. Ablating parts of our method with DAs on OpenImages. + +
SettingsMMDDANN
\( \mathcal{L}_c \)\( \mathcal{L}_d \)\( \mathcal{L}_u \)TSApIoUPxAPpIoUPxAP
✓42.9558.1942.9558.19
✓✓42.8857.3943.2958.19
✓✓✓43.2458.1043.6758.77
✓✓✓45.1761.5045.1761.50
✓✓✓✓49.6865.4246.7163.26
+ +To show the generalization of our DA-WSOL pipeline, results with the InceptionV3 on the OpenImages dataset are also given in Table. 2. It can be seen that our method also effectively enhances the performance of CAM. Moreover, we also adopted different UDA methods and WSOL methods for our DA-WSOL pipeline. Specifically, except for the MMD, we also utilized the adversarial learning based UDA method DANN [7] (structure shown in Appendix) to enhance three different WSOL methods, including the CAM [33], HAS [14], CutMix [27] and ADL [4]. Results in Table. 4 reflect that the performance of all those WSOL can be enhanced by UDA with our DA-WSOL pipeline. + +Table 4. Adopting different UDA and WSOL methods. + +
UDApIoUPxAPTrainTest
CAM-42.9558.1913.8469.77
MMD49.68↑6.7365.42↑7.2325.2570.84
DANN46.71↑3.7663.26↑5.0719.3670.48
HAS-41.9255.1013.7570.13
MMD49.25↑7.3364.15↑9.0520.5270.69
DANN46.41↑4.4962.48↑7.3819.4171.17
CutMix-42.7360.6411.1769.24
MMD49.32↑6.5964.68↑4.0431.2371.05
DANN48.55↑5.8264.08↑3.4428.6170.40
ADL-42.0555.028.8769.32
MMD43.40↑1.3560.17↑5.1520.3871.38
DANN43.22↑1.1760.64↑5.6216.9070.26
+ +* Train/Test metric is the training/test time (ms per image). + +# 4.4. Limitations + +Though the proposed DA-WSOL pipeline helps to engage DA methods to enhance WSOL and refreshes the SOTA localization performance on the ImageNet and OpenImages datasets, some limitations of our method should also be concerned. Firstly, adopting DA for WSOL negatively affects the strength of the estimator on the source domain, which is also required for WSOL to choose the localization map of different classes. This defect weakens the image classification accuracy when the classification task is challenged and causes our low Top-1 metric on the ImageNet and CUB-200 datasets. Moreover, our TSA adopts the time-consuming K-Means cluster to sample the target samples and update the anchors of different subsets. Though it does not influence the model size and the time of the test process, the training time is increased compared with the WSOL method adopted by our DA-WSOL pipeline. We hope future works can solve these problems to enhance our work. + +# 5. Conclusion + +This paper provides a novel perspective that models WSOL as a DA task and proposes a DA-WSOL pipeline to assist WSOL with DAs. Our method uses a target sampling strategy to assign target samples into three subsets, which are then adopted by DAL loss to concern specificities. Experiments indicate our method outperforms SOTA methods on multi datasets and can generalize to various baselines. + +# 6. Acknowledgements + +This work was supported by the Beijing Natural Science Foundation under Grant Z210008, the Shenzhen Science and Technology Program under Grant 1210318663, and the Development of Key Technologies and Equipment in Major Science and Technology Infrastructure in Shenzhen. + +# References + +[1] S. Babar and S. Das. Where to look?: Mining complementary image regions for weakly supervised object localization. In 2021 IEEE Winter Conference on Applications of Computer Vision (WACV), 2021. 1, 6 +[2] Wonho Bae, Junhyug Noh, and Gunhee Kim. Rethinking class activation mapping for weakly supervised object localization. In European Conference on Computer Vision (ECCV), pages 618-634. Springer, 2020. 1, 6, 7 +[3] Junsuk Choe, Seong Joon Oh, Seungho Lee, Sanghyuk Chun, Zeynep Akata, and Hyunjung Shim. Evaluating weakly supervised object localization methods right. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3133-3142, 2020. 6, 7 +[4] Junsuk Choe and Hyunjung Shim. Attention-based dropout layer for weakly supervised object localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2219-2228, 2019. 1, 2, 6, 7, 8 +[5] 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. 6 +[6] James Foulds and Eibe Frank. A review of multi-instance learning assumptions. The knowledge engineering review, 25(1):1-25, 2010. 1 +[7] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine Learning, pages 1180-1189. PMLR, 2015. 3, 4, 8 +[8] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. The Journal of Machine Learning Research, 13(1):723-773, 2012. 2, 3, 4, 6 +[9] Arthur Gretton, Dino Sejdinovic, Heiko Strathmann, Sivaraman Balakrishnan, Massimiliano Pontil, Kenji Fukumizu, and Bharath K Sriperumbudur. Optimal kernel choice for large-scale two-sample tests. In Advances in Neural Information Processing Systems (NeurIPS), pages 1205-1213. Citeseer, 2012. 2 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 5, 6 +[11] Guoliang Kang, Lu Jiang, Yi Yang, and Alexander G Hauptmann. Contrastive adaptation network for unsupervised domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4893-4902, 2019. 2, 3 +[12] Minsong Ki, Youngjung Uh, Wonyoung Lee, and Hyeran Byun. In-sample contrastive learning and consistent attention for weakly supervised object localization. In Proceedings of the Asian Conference on Computer Vision, 2020. 6 +[13] Jeesoo Kim, Junsuk Choe, Sangdoo Yun, and Nojun Kwak. Normalization matters in weakly supervised object localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3427-3436, 2021. 1, 6, 7 + +[14] Krishna Kumar Singh and Yong Jae Lee. Hide-and-seek: Forcing a network to be meticulous for weakly-supervised object and action localization. In Proceedings of the IEEE International Conference on Computer Vision, pages 3524-3533, 2017. 1, 2, 6, 7, 8 +[15] Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. 5 +[16] Mingsheng Long, Yue Cao, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Transferable representation learning with deep adaptation networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(12):3071-3085, 2018. 2 +[17] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. In International Conference on Machine Learning, pages 2208-2217. PMLR, 2017. 2, 3 +[18] Weizeng Lu, Xi Jia, Weicheng Xie, Linlin Shen, Yicong Zhou, and Jinming Duan. Geometry constrained weakly supervised object localization. In European Conference on Computer Vision (ECCV), pages 481-496. Springer, 2020. 2 +[19] Meng Meng, Tianzhu Zhang, Qi Tian, Yongdong Zhang, and Feng Wu. Foreground activation maps for weakly supervised object localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3385-3395, 2021. 2, 6 +[20] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In Neural Information Processing Systems (NeurIPS), pages 8024-8035, 2019. 6 +[21] Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adaptation. In Thirty-second AAAI conference on artificial intelligence, 2018. 3 +[22] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2818-2826, 2016. 5 +[23] Chuangchuang Tan, Guanghua Gu, Tao Ruan, Shikui Wei, and Yao Zhao. Dual-gradients localization framework for weakly supervised object localization. In Proceedings of the 28th ACM International Conference on Multimedia, pages 1976-1984, 2020. 6 +[24] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. 6 +[25] Jason Weston, Ronan Collobert, Fabian Sinz, Léon Bottou, and Vladimir Vapnik. Inference with the universum. In International Conference on Machine Learning, pages 1009-1016, 2006. 2, 4 +[26] Chaohui Yu, Jindong Wang, Yiqiang Chen, and Meiyu Huang. Transfer learning with dynamic adversarial adaptation network. In 2019 IEEE International Conference on Data Mining (ICDM), pages 778-786. IEEE, 2019. 3 +[27] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regular + +ization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6023-6032, 2019. 1, 2, 6, 7, 8 +[28] Chen-Lin Zhang, Yun-Hao Cao, and Jianxin Wu. Rethinking the route towards weakly supervised object localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13460-13469, 2020. 1, 2, 6 +[29] Xiaolin Zhang, Yunchao Wei, Jiashi Feng, Yi Yang, and Thomas S Huang. Adversarial complementary learning for weakly supervised object localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1325-1334, 2018. 1, 2, 6, 7 +[30] Xiaolin Zhang, Yunchao Wei, Guoliang Kang, Yi Yang, and Thomas Huang. Self-produced guidance for weakly-supervised object localization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 597-613, 2018. 1, 2, 6, 7 +[31] Xiaolin Zhang, Yunchao Wei, and Yi Yang. Inter-image communication for weakly supervised localization. In European Conference on Computer Vision (ECCV), pages 271-287. Springer, 2020. 1, 2, 6 +[32] Xiaolin Zhang, Yunchao Wei, Yi Yang, and Fei Wu. Rethinking localization map: Towards accurate object perception with self-enhancement maps. arXiv preprint arXiv:2006.05220, 2020. 2, 6 +[33] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2921-2929, 2016. 1, 2, 6, 7, 8 +[34] Yongchun Zhu, Fuzhen Zhuang, Jindong Wang, Guolin Ke, Jingwu Chen, Jiang Bian, Hui Xiong, and Qing He. Deep subdomain adaptation network for image classification. IEEE Transactions on Neural Networks and Learning Systems, 32(4):1713-1722, 2020. 2, 3 \ No newline at end of file diff --git a/weaklysupervisedobjectlocalizationasdomainadaption/images.zip b/weaklysupervisedobjectlocalizationasdomainadaption/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d2dcfb0a0f80e05e88c162ed3a3e24ffb3c18ff1 --- /dev/null +++ b/weaklysupervisedobjectlocalizationasdomainadaption/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:770c1fd45397eb5d7cd23f358457a0f45439ddbc3f803dad237aa80864a481d7 +size 700385 diff --git a/weaklysupervisedobjectlocalizationasdomainadaption/layout.json b/weaklysupervisedobjectlocalizationasdomainadaption/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..de6bdb60b440c3b46994eeaa52e2b16698c78fad --- /dev/null +++ b/weaklysupervisedobjectlocalizationasdomainadaption/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ffa27b9394cc9478590812116cc988dda59f552422e1d741cd2f600dac4819d +size 446582 diff --git a/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_content_list.json b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b919edb4298487be8d8456fec7431daba5db2ae8 --- /dev/null +++ b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f687c4a2eeb683bd490e91c41ce0b7a8b2b2c5e81df6b016909bd69514e4280 +size 88906 diff --git a/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_model.json b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fe8bc3dbc349169935c5dfe708f203b7f8fbb9d4 --- /dev/null +++ b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a76dc6eada8e3ae560b6c39089b7dfd4ff5ab5390d35ccfc984f5fc3d6089a73 +size 112138 diff --git a/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_origin.pdf b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..597171b99d4e5af66d0fdebcad0e6603a6d45fab --- /dev/null +++ b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/bdae116a-e66d-4918-ae58-e6c0fe651150_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d4d17c5335c3b07275d32993f5b8098a1993ac20142d6bf13aacd10078d2b30 +size 4607043 diff --git a/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/full.md b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/full.md new file mode 100644 index 0000000000000000000000000000000000000000..955275de608fa619e2611240518b8f3661942dca --- /dev/null +++ b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/full.md @@ -0,0 +1,360 @@ +# Weakly-Supervised Online Action Segmentation in Multi-View Instructional Videos + +Reza Ghoddoosian $^{1,2*}$ , Isht Dwivedi $^{1}$ , Nakul Agarwal $^{1}$ , Chiho Choi $^{1}$ , and Behzad Dariush $^{1}$ $^{1}$ Honda Research Institute, USA + $^{2}$ VLM Lab, University of Texas at Arlington + +reza.ghoddoosian@mavs.uta.edu, {idwivedi,nagarwal,cchoi,bdariush}@honda-ri.com + +# Abstract + +This paper addresses a new problem of weakly-supervised online action segmentation in instructional videos. We present a framework to segment streaming videos online at test time using Dynamic Programming and show its advantages over greedy sliding window approach. We improve our framework by introducing the Online-Offline Discrepancy Loss (OODL) to encourage the segmentation results to have a higher temporal consistency. Furthermore, only during training, we exploit frame-wise correspondence between multiple views as supervision for training weakly-labeled instructional videos. In particular, we investigate three different multi-view inference techniques to generate more accurate frame-wise pseudo ground-truth with no additional annotation cost. We present results and ablation studies on two benchmark multi-view datasets, Breakfast and IKEA ASM. Experimental results show efficacy of the proposed methods both qualitatively and quantitatively in two domains of cooking and assembly. + +# 1. Introduction + +Action understanding in untrimmed instructional videos is important in many applications, where agents learn by observation of other agents performing complex tasks. Such videos are characterized by composition of a sequence of low-level atomic actions, e.g., crack eggs and whisk eggs, that form a high-level task, e.g., making eggs. This contextual dependency between actions as well as other attributes in instructional videos have inspired new research [5, 19, 33, 39, 48] that has advanced the field. + +A fully-supervised training of these videos would require not only the labels for each action, but also their temporal assignment (start and end time) with ordering constraints. However, creating fully annotated clips with action + +![](images/aa7a8a459bc3228457cf744e35bb2c97292110e468c0635f5f2e0128ef8bc3f0.jpg) +Figure 1. Top: online segmentation, where the frame of interest at time $t$ is identified either greedily by the f function or through DP-based online inference based on current and past predictions. Bottom: Offline segmentation after observing the whole sequence. + +assignments and labels on the temporal boundaries of individual actions is manually intensive and is therefore both time consuming and expensive. This limits the scale and practicality at which fully-supervised video datasets can be created. Furthermore, the subjective nature of labeling the start and end time of each action results in ambiguities and inconsistencies. In weakly-supervised action segmentation these limitations are addressed by using only the ordered sequence of action labels per video during training, and forgo subjective labeling of start and end time of each action. + +Another important consideration in action understanding relates to requirements for processing the videos online versus offline, which is not addressed in existing weakly-supervised segmentation methods [6,27,47]. Online processing with low latency is an increasingly important part of interactive applications where real-time, or near real-time feedback is critical. For example, interactive applications such as human-robot interaction, error correction in manufacturing assembly, and virtual rehabilitation require immediate feedback from the intelligent system as the video streams arrive. + +The work presented in this paper considers the two aforementioned aspects in action segmentation: weak- + +supervision and online processing aimed at temporally partitioning videos into action segments. To our knowledge, our work is the first to address the problem of weakly supervised online action segmentation. Specifically, we present a framework to segment streaming instructional videos online at test time using Dynamic Programming (DP). We show the advantages of using DP as opposed to the greedy sliding window approach that are frequently used in previous online action understanding work [10, 16, 55] (Fig. 1). + +We also introduce the Online-Offline Discrepancy Loss (OODL). Offline segmentation refers to inference after observing the video in its entirety. Offline segmentation is a non-causal procedure that is generally expected to be more accurate than its online counterpart that makes inference from partial observations. Indeed, there is a trade-off between accuracy of the recognized actions and low-latency (Sec.6.2.1). The OODL loss uses the offline segmentation result as a reference and penalizes its difference with online segmentation results generated at each time step in the video. Effectively, this encourages the segmentation results inferred at different observation end points in the video to have higher temporal consistency with respect to each other. + +Furthermore, due to lack of frame-level annotation in weakly-labeled videos, frame-wise correspondence between multiple synchronized views of the same recording can provide helpful cues about the temporal location of each action during training. Our work is the first to use the supervision of frame-level correspondence between different views for action segmentation. We compare three ways to exploit this multi-view correspondence to generate more accurate frame-level pseudo ground-truth for weakly-labeled videos. This is in contrast to previous segmentation methods [4, 6, 27], where different views are treated independently, discarding important multi-view information. Note that we only use the multi-view correspondence at training time and our method segments each video independently at test time with no access to other views. Also, our framework utilizes no additional annotation cost, as it is trained independent of the label and number of view points. + +In summary, our main contributions are as follows: + +1) We are the first to address the problem of weakly-supervised online action segmentation in instructional videos, and offer a DP-based framework. +2) We introduce the Online-Offline Discrepancy Loss (OODL). The OODL loss utilizes the offline segmentation result as a reference to train the online model by minimizing the difference between online and offline inference results. +3) We use frame-wise multi-view correspondence, during training only, to generate more accurate action pseudoground-truth in weakly-labeled videos with no additional annotation cost. Our work is the first to incorporate multiview video understanding in action segmentation. +4) We present results and a detailed ablation study on two + +benchmark multi-view datasets in domains of cooking and assembly: Breakfast [24] and IKEA [2]. We show quantitatively and qualitatively how our contributions consistently improve various suggested baselines on both datasets. + +# 2. Related Work + +Weakly-Supervised Action Segmentation. There has been extensive research in action segmentation of instructional videos under different forms of supervision, including fully-supervised [12, 17, 22, 41, 53], unsupervised [26, 40, 42], and time-stamp supervised [28] methods. Methods most similar to ours use only the sequence of action labels as the weak supervision in training [4,6,9,18,27,37,38,46]. However, all previous methods consider offline segmentation of videos, where future frames are used to make predictions at the current frame. Specifically, [9] encodes the entire video first before decoding it to frame-level action scores. The work in [4, 6, 27, 38, 47] use Dynamic Programming (DP) to infer the most likely actions and their duration given the entire video. Our method also uses a DP-based framework, but to our knowledge, we are the first to introduce a weakly-supervised method to segment a streaming video in an online manner. + +Online Action Understanding. Online action understanding has been studied in various problems such as online action detection [10, 55, 59], start of action detection [15, 44] or anticipation [1, 13, 14, 23, 30]. In the context of online action detection, [59] employs knowledge distillation to transfer information from offline to online models and [10, 36, 55, 56] introduce new neural networks to classify current actions in streaming videos using a sliding window approach. Others have focused solely on detecting the start of an ongoing action immediately [15, 44] or with a short delay [58]. However, past methods did not consider instructional videos and, more importantly, required frame-level labels to train. + +Most similar to our work is WOAD [16] as the only weakly-supervised online action detection framework. WOAD [16] is different to our framework in two main ways: First, as a detection model, it is formulated to identify and localize occurrences of, typically, a single action in the input video, while we focus on instructional videos with a series of many unique actions. Second, during test time, we utilize Dynamic Programming and show in our experiments that it outperforms the greedy approach taken in [16]. + +Multi-View Action Understanding. Using video feeds from multiple view points has improved performance for different problems such as action recognition [29, 35, 49, 50, 52], person identification [11], anomaly detection [8], and video summarization [21, 31, 32]. Similar to our work, [20, 35, 45, 49] limit exploiting multiple views to training time only. In particular, [35, 49] focus on fully-supervised learning of trimmed videos. Meanwhile, [20] explores + +unsupervised video-to-video alignment, but utilize partial frame-level labels for classification. In addition, [43, 45] study domain adaptation across 3rd and 1st person views. However, unlike us, they rely on view-specific labels for training. Others [29, 52, 54] use multiple data modalities as view points. Specifically, [54] introduces a semi-supervised and view-agnostic framework for trimmed video classification, where multiple modalities are fused to generate video pseudo labels. These pseudo labels are used along with a selected number of ground-truth labels to train a video classifier. In contrast, to our knowledge, we are the first to use multi-view for temporal segmentation in untrimmed videos without frame-level supervision. + +# 3. Background + +This section describes definitions and background concepts used henceforth. For more clarity, the supplementary material provides a table of all symbols used. + +# 3.1. Problem Definition + +During training, the input to our model is a video of length $T$ represented by frame-level features $\mathbf{x}_1^T$ and an ordered sequence of actions $\pmb{\tau} = (\tau_{1},\tau_{2},\dots,\tau_{M})$ known as the transcript. $M$ is the number of actions in a given video and can vary across videos. Information about the start and end time of each action is not known. + +At test time, given the set of action labels in the dataset $\mathbb{A}$ , the goal is to identify the action label $a_{t} \in \mathbb{A}$ at frame $t$ for all $0 < t < T + 1$ based on only the past and current observations $\mathbf{x}_1^t$ . The final result will be a sequence of $N$ predicted segments identified online by their action $a_{n}$ and duration $l_{n}$ , where $n$ refers to the $n_{th}$ segment. + +# 3.2. Offline Inference + +Given the input features $\mathbf{x}_1^T$ of the entire video, a common factorized formulation [27, 38] to model the posterior probability of the sequence of actions $a_1^N$ and their corresponding duration $l_1^N$ is given by: + +$$ +p _ {\mathrm {o f f}} (\pmb {a} _ {1} ^ {N}, \pmb {l} _ {1} ^ {N} | \mathbf {x} _ {1} ^ {T}) \approx p (\mathbf {x} _ {1} ^ {T} | \pmb {a} _ {1} ^ {N}) p (\pmb {l} _ {1} ^ {N} | \pmb {a} _ {1} ^ {N}) p (\pmb {a} _ {1} ^ {N}). \qquad (1) +$$ + +To infer the most likely sequence of actions $\overline{a}_1^N$ and their duration $\bar{l}_1^N$ associated with the video transcript $\pmb{\tau}$ , we use + +$$ +\begin{array}{l} \left(\bar {\boldsymbol {a}} _ {1} ^ {N}, \bar {\boldsymbol {l}} _ {1} ^ {N}\right) = \underset {\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N}} {\operatorname {a r g m a x}} \left\{p _ {\text {o f f}} \left(\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N} \mid \mathbf {x} _ {1} ^ {T}\right) \right\}, (2) \\ = \underset {\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N}} {\operatorname {a r g m a x}} \left\{\prod_ {t = 1} ^ {T} p \left(x _ {t} \mid a _ {n (t)}\right) \prod_ {n = 1} ^ {N} p \left(l _ {n} \mid a _ {n}\right) p \left(\boldsymbol {a} _ {1} ^ {N}\right) \right\}, (3) \\ \end{array} +$$ + +where $n(t)$ is the segment number at frame $t$ . While training, $\overline{a}_1^N = \tau$ and $N = M$ , since the sequence of action labels is already given in the transcript. $p(x_{t}|a)$ is modeled by a GRU [7] and the Bayes rule as in [38]. The GRU + +can be optionally replaced by any other neural network as a black box. $p(l|a)$ is a Poisson distribution modeling the duration of a given action and is parameterized by the mean length of action $a$ . Finally, $p(\pmb{a}_1^N) = 1$ if the sequence of action labels $\pmb{a}_1^N$ exist in the training set transcripts and 0 otherwise. + +# 3.3. Offline Segmentation Energy Score + +We revisit the definition of energy score $\mathcal{E}$ introduced in offline segmentation [27]. Specifically, based on the inferred segments (Eq.3), we define $(\overline{a}_1^N,\bar{l}_1^N)$ as the unique valid path $\pi^{+}$ and $(\dot{a}_1^N,\bar{l}_1^N)$ as an invalid path $\pi^{-} \in \mathbb{P}^{-}$ , where $\dot{a}_n \in \mathbb{A} \setminus \{\overline{a}_n\}$ and $\mathbb{P}^{-}$ is the set of all invalid paths given the inferred durations $\bar{l}_1^N$ . Accordingly, we define the segment-level energy score of the valid action $\overline{a}_n$ with length $\bar{l}_n$ at segment $n$ as $e_n(\overline{a}_n,\bar{l}_n) = \prod_{t \in \eta(n)}^{\eta(n) + \bar{l}_n - 1} p(\overline{a}_n|x_t)$ , and the segment-level energy score of an invalid action $\dot{a}_n$ is given as $e_n(\dot{a}_n,\bar{l}_n) = \prod_{t \in \eta(n)}^{\eta(n) + \bar{l}_n - 1} p(\dot{a}_n|x_t)$ . Here, $\eta(n)$ is a function that maps an input segment number to the starting frame number of that segment. Note that the start of each segment occurs immediately after the end of the previous segment and $p(a|x_t)$ is the output of the GRU. Further, in order to exclusively focus on hard invalid actions, the segment energy score of hard invalid actions denoted by $e_n^{-}(\dot{a}_n,\bar{l}_n)$ is defined as follows: + +$$ +e _ {n} ^ {-} (\dot {a} _ {n}, \bar {l} _ {n}) = \left\{ \begin{array}{l l} e _ {n} (\dot {a} _ {n}, \bar {l} _ {n}), & \text {i f} e _ {n} (\dot {a} _ {n}, \bar {l} _ {n}) > e _ {n} (\overline {{a}} _ {n}, \bar {l} _ {n}) \\ 1, & \text {o t h e r w i s e} \end{array} \right.. +$$ + +Finally, $\mathcal{E}_{\pi^{+}} = \prod_{1}^{N}e_{n}(\overline{a}_{n},\bar{l}_{n})$ is the energy score of the valid path, and $\mathcal{E}_{\pi^{-}} = \prod_{1}^{N}e_{n}^{-}(\dot{a}_{n},\bar{l}_{n})$ is the energy score of the invalid path $\pi^{-}$ . Calculation of these energy scores is done in the log space using DP as explained in [27]. + +# 4. Weakly-Supervised Online Segmentation + +In this section, we introduce our framework for causal action inference and present how the relation between online and offline inference is exploited to derive a loss function for weakly-supervised online action segmentation. + +# 4.1. Online Inference + +Since online action inference is a causal process, we cannot directly use Eq. 3 to infer the action label at the current frame $t'$ . A straightforward causal solution is to employ the GRU in a sliding window fashion and apply $\operatorname{argmax}\left\{p(a_{t'}|x_t)\right\}$ as the output of the GRU with the highest probability [16]. However, as shown in Fig.5, this greedy approach does not consider the context and predictions of previous time steps and is therefore sub-optimal. In order to fully account for the past actions and their duration, we formulate the marginal causal (or online) probability $p_{\mathrm{on}}(a_{t'}|\mathbf{x}_1^{t'})$ of the present action $a_{t'} = a_{n(t')}$ at segment + +$n' = n(t')$ over all previous actions $\pmb{a}_1^{n' - 1}$ if $n' > 1$ , and duration $\pmb{l}_1^{n'}$ . The inferred present action $\hat{a}_{t'}$ is derived as follows: + +$$ +\begin{array}{l} \hat {a} _ {t ^ {\prime}} = \underset {a _ {t ^ {\prime}} \in \mathbb {A}} {\operatorname {a r g m a x}} \left\{p _ {\text {o n}} \left(a _ {t ^ {\prime}} \mid \mathbf {x} _ {1} ^ {t ^ {\prime}}\right) \right\}, (4) \\ = \underset {a _ {n ^ {\prime}} \in \mathbb {A}} {\operatorname {a r g m a x}} \left\{\sum_ {\boldsymbol {a} _ {1} ^ {n ^ {\prime} - 1}, \boldsymbol {l} _ {1} ^ {n ^ {\prime}}} p _ {\mathrm {o n}} \left(\boldsymbol {a} _ {1} ^ {n ^ {\prime}}, \boldsymbol {l} _ {1} ^ {n ^ {\prime}} \mid \mathbf {x} _ {1} ^ {t ^ {\prime}}\right) \right\}. (5) \\ \end{array} +$$ + +To improve computational efficiency, we empirically approximated Eq. 5 by the maximum joint probability value: + +$$ +\hat {a} _ {t ^ {\prime}} \approx \underset {a _ {n ^ {\prime}} \in \mathbb {A}} {\operatorname {a r g m a x}} \left\{\max _ {\boldsymbol {a} _ {1} ^ {n ^ {\prime} - 1}, \boldsymbol {l} _ {1} ^ {n ^ {\prime}}} p _ {\text {o n}} \left(\boldsymbol {a} _ {1} ^ {n ^ {\prime}}, \boldsymbol {l} _ {1} ^ {n ^ {\prime}} \mid \mathbf {x} _ {1} ^ {t ^ {\prime}}\right) \right\}. \tag {6} +$$ + +Eq.6 involves two steps. The first is to find the most likely sequence of actions $\tilde{a}_1^{n'}$ with duration $\tilde{l}_1^{n'}$ until time $t'$ . The second involves taking only the last segment label $\tilde{a}_{n'} = pop(\tilde{a}_1^{n'})$ to infer the label of the current frame $t'$ , where $pop()$ is a function that outputs the last element of a list. To execute the first step, online inference of the most likely sequence of past action segments $(\tilde{a}_1^{n'}, \tilde{l}_1^{n'})$ is formulated as $\operatorname{argmax}\left\{p_{\mathrm{on}}(a_1^{n'}, l_1^{n'} | x_1^{t'})\right\}$ , where $p_{\mathrm{on}}(a_1^{n'}, l_1^{n'} | x_1^{t'})$ for $n' > 1^*$ is derived below: + +$$ +\begin{array}{l} p _ {\mathrm {o n}} \left(\boldsymbol {a} _ {1} ^ {n ^ {\prime}}, \boldsymbol {l} _ {1} ^ {n ^ {\prime}} | \mathbf {x} _ {1} ^ {t ^ {\prime}}\right) = \\ \Gamma \left(l _ {n ^ {\prime}} \mid a _ {n ^ {\prime}}\right) \prod_ {t = 1} ^ {t ^ {\prime}} p \left(x _ {t} \mid a _ {n (t)}\right) \prod_ {n = 1} ^ {n ^ {\prime} - 1} p \left(l _ {n} \mid a _ {n}\right) \cdot p \left(\boldsymbol {a} _ {1} ^ {n ^ {\prime}}\right). \tag {7} \\ \end{array} +$$ + +$p(\pmb{a}_1^{n'}) = 1$ if $\pmb{a}_1^{n'}$ is a sub-sequence of any of the transcripts in the training set, and 0 otherwise, and $\Gamma(l|a)$ is a half Poisson function to model the duration $l_{n'}$ of the current action $a_{n'}$ at the last observed segment, given by + +$$ +\Gamma (l | a) = \left\{ \begin{array}{l l} 1 & \text {i f} l < \lambda_ {a} \\ \frac {\lambda_ {a} ^ {l} \exp (- \lambda_ {a})}{l !} & \text {o t h e r w i s e} \end{array} \right., +$$ + +where $\lambda_{a}$ is the estimated mean length of action $a$ . + +Inclusion of $\Gamma()$ in the online inference of the current action is essential as it accounts for the two following cases: First, using the full Poisson distribution of Eq.3 to model the duration of the current observed action leads to penalizing the current actions with a short duration, $l_{n'} < \lambda_{a_{n'}}$ . However, since we do not have foresight about the duration of the current segment, any conclusion about the current segment length would be premature. Second, $\Gamma()$ still allows us to penalize the current action if its duration is longer than expected since this can be concluded solely based on the observed segment of the action. + +At test time, the final online segmentation result in a streaming video when the current time $t'$ changes from 1 to any given time $T$ is the sequence of frame-level actions $(\hat{a}_1, \dots, \hat{a}_T)$ , where each $\hat{a}_{t'} \gets \tilde{a}_{n'} = pop(\tilde{\boldsymbol{a}}_1^{n'})$ is inferred by Eq.7 using the Viterbi algorithm. + +![](images/b79030042d13d1e4f4daba50e3adab43e14a81fddba21f0c612fadc37f9d4a69.jpg) +Figure 2. Given the video transcript $\tau = (\tau_{1},\tau_{2},\tau_{3},\tau_{4})$ , the OODL loss encourages the online segmentation results in (a) to become a sub-sequence of the offline result for each time step as in (b). + +# 4.2. Online-Offline Discrepancy Loss (OODL) + +Offline action segmentation is expected to be more accurate than online segmentation because segments are inferred from information contained in the entire length of the video, including transcripts as well as prior knowledge of the video end. Thus, offline segmentation results provide a rich source of supervision for training online segmentation models. Ideally, the sequence of actions inferred online from the initial frame to any point in the video is expected to be a sub-sequence of the offline inference result as shown in Fig. 2. Consequently, this encourages all frame-level action sequences $\{\tilde{a}_1^t\}_{t=1}^T$ to be temporally consistent, where each sequence $\tilde{a}_1^t$ is inferred online at time $t$ . + +We present the Online-Offline Discrepancy Loss (OODL) $\mathcal{L}_{\mathrm{ODL}}$ in Algorithm 1 to minimize the difference between online and offline segmentation scores. Specifically, we first use Eq.7 to infer the set of online paths $\{\tilde{a}_1^t\}_{t=1}^T$ after $n(t)$ pairs of segment-level labels $(\tilde{a}_1^{n(t)}, \tilde{l}_1^{n(t)})$ are converted into $t$ frame-level action labels $\tilde{a}_1^t$ for each time step $t$ . Then, we use the hinge loss function to penalize any online inference result that has a higher energy score $\mathcal{E}_{\mathrm{on}}$ than the energy score $\mathcal{E}_{\mathrm{off}}$ of the offline path $\overline{a}_1^t \subseteq \overline{a}_1^T$ inferred from Eq. 3. The ODDL ultimately discourages all frame-level predictions that contribute to the discrepancy between the intermediate online inference results and the most likely sequence of actions inferred offline at the end of the video. + +$\mathcal{L}_{\mathrm{OODL}}$ is added to the baseline offline segmentation loss $\mathcal{L}_b$ [27] to form our final loss function $\mathcal{L}_f$ : + +$$ +\mathcal {L} _ {f} = \mathcal {L} _ {b} + \mathcal {L} _ {\text {O O D L}}. \tag {8} +$$ + +Minimizing the offline segmentation loss $\mathcal{L}_b$ effectively corresponds to maximizing the decision margin between offline valid and hard invalid paths derived in Sec. 3.3. + +$$ +\mathcal {L} _ {b} = - \log \left(\mathcal {E} _ {\pi +}\right) + \log \left(\sum_ {\pi^ {-} \in \mathbb {P} ^ {-}} \mathcal {E} _ {\pi^ {-}}\right). \tag {9} +$$ + +We iteratively utilize the offline and online segmentation pseudo labels inferred by Eq. 3, and 7, respectively, as well as the loss in Eq.8 to train the GRU until convergence. + +Algorithm 1 Online-Offline Discrepancy Loss (OODL) + +Input: Video features $\mathbf{x}_1^T$ of $T$ frames and the offline inference result $(\overline{a}_1^N,\overline{l}_1^N)$ of $N$ segments + +Output: $L_{T}$ as the OODL loss $\mathcal{L}_{\mathrm{OODL}}$ + +1: for $t \gets 1$ to $T$ do: +2: $\tilde{\pmb{a}}_1^{n(t)},\tilde{l}_1^{n(t)} = \mathrm{argmax}\left\{p_{\mathrm{on}}(\pmb {a}_1^{n(t)},\pmb {l}_1^{n(t})|\mathbf{x}_1^t)\right\} \triangleright$ Eq.7 +3: $\tilde{\pmb{a}}_1^t = (\tilde{a}_1,\dots,\tilde{a}_{n(t)}) = \mathrm{convert}(\tilde{\pmb{a}}_1^{n(t)},\tilde{\pmb{l}}_1^{n(t)})$ +4: $\mathcal{E}_{\mathrm{on}}(t) = \prod_{a_t\in \tilde{\pmb{a}}_1^t}p(a_t|x_t)$ +5: $\overline{\pmb{a}}_1^T = (\overline{a}_1,\dots,\overline{a}_{n(T)}) = \mathrm{convert}(\overline{\pmb{a}}_1^N,\overline{\pmb{l}}_1^N)$ +6: $L_{0} = 0$ +7: for $t \gets 1$ to $T$ do: +8: $\mathcal{E}_{\mathrm{off}}(t) = \prod_{a_t\in \overline{\mathbf{a}}_1^t}p(a_t|x_t)$ +9: $d = \max \left(0, \log \left(\mathcal{E}_{\mathrm{on}}(t)\right) - \log \left(\mathcal{E}_{\mathrm{off}}(t)\right)\right)$ +10: $L_{t} = L_{t - 1} + \frac{d}{t}$ Averaging $d$ over time $t$ return $L_{T}$ + +# 5. Multi-View Supervision + +Due to lack of frame-level action labels at training time, it is imperative to maximize the functional capacity of the training data available. We do so by leveraging the correspondence between multiple unknown views to infer more accurate frame pseudo labels. + +Concretely, consider a training set of $K$ videos $\{v_{i}\}_{i = 1}^{K}$ and their corresponding view adjacency matrix $V\in$ $\mathbb{R}^{K\times K}$ , where each element $v_{i,j}$ in $V$ is 1 if $v_{i}$ and $v_{j}$ are two different views of the same recording, and 0 otherwise. During training, we pair each video $v_{i}$ , as the anchor video, with an auxiliary video $v_{j}$ , which is randomly sampled from the anchor view's adjacent set $\mathbb{V}_i = \{v_k|V_{i,k} = 1\wedge k\neq i\}$ . As shown in Fig. 3, each video pair is given as an input to a multiview-inference module to generate pseudo labels†, which are used to train the GRU with respect to the anchor video $i$ . In this section, we discuss three different multiview inference techniques employed during training: + +Sequence Voting (SV). Given synchronized video features ${}_{i}{\mathbf{x}}_{1}^{T}$ and ${}_{j}{\mathbf{x}}_{1}^{T}$ of any two given views, we define the result of voting as the sequence of actions ${\bar{a}}_{1}^{N}$ with durations ${\bar{l}}_{1}^{N}$ that have the highest product of sequence probability over both views: + +$$ +\left(\bar {\boldsymbol {a}} _ {1} ^ {N}, \bar {\boldsymbol {l}} _ {1} ^ {N}\right) = \underset {\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N}} {\operatorname {a r g m a x}} \left\{p \left(\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N} | _ {i} \mathbf {x} _ {1} ^ {T}\right) p \left(\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N} | _ {j} \mathbf {x} _ {1} ^ {T}\right) \right\}. \tag {10} +$$ + +In this case, the inferred sequence must have high probabilities (votes) in both views, as inconsistent probabilities (votes) diminish the overall score of any segmentation. + +Probabilistic Inference (PI). Instead of combining multi-view results at the video level as in the SV technique, here we fuse frame-level scores to infer the sequence that maximizes the posterior probability $p(\pmb{a}_1^N, \pmb{l}_1^N | i \mathbf{x}_1^T, j \mathbf{x}_1^T)$ given the two views: + +$$ +p \left(\boldsymbol {a} _ {1} ^ {N}, \boldsymbol {l} _ {1} ^ {N} \mid_ {i} \mathbf {x} _ {1} ^ {T}, _ {j} \mathbf {x} _ {1} ^ {T}\right) \approx p \left(_ {i} \mathbf {x} _ {1} ^ {T} \mid \boldsymbol {a} _ {1} ^ {N}\right) p \left(_ {j} \mathbf {x} _ {1} ^ {T} \mid \boldsymbol {a} _ {1} ^ {N}\right) p \left(\boldsymbol {l} _ {1} ^ {N} \mid \boldsymbol {a} _ {1} ^ {N}\right) p \left(\boldsymbol {a} _ {1} ^ {N}\right). \tag {11} +$$ + +The argmax of the above equation can be solved by integrating $p(x_{t}|a_{n(t)}) = p(_{i}x_{t}|a_{n(t)})p(_{j}x_{t}|a_{n(t)})$ in Eq.3. + +Weighted Probabilistic Inference (WPI). The Probabilistic Inference model in Eq.11 assumes equal contribution from each view. However, a more appropriate formulation is to compare the two views and provide a higher confidence weight on the more reliable view. Hence, we introduce the class agnostic confidence weight $i c_{t} \in [0,1]$ for the anchor view $i$ at time $t$ as follows: + +$$ +\left. _ {i} c _ {t}, 1 - _ {i} c _ {t} = \operatorname {S o f t m a x} \left(\Phi_ {c} \left(\left[ \Phi_ {f} \left(_ {i} \mathbf {x} _ {t - w} ^ {t}\right) \Phi_ {f} \left(_ {j} \mathbf {x} _ {t - w} ^ {t}\right) \right]\right)\right), \right. \tag {12} +$$ + +where $\Phi_f() : \mathbb{R}^{w \times F_1} \to \mathbb{R}^{F_2}$ is a function that embeds a temporal window of the past $w$ frame features $\mathbf{x}_{t - w}^t$ for each view independently, and $\Phi_c() : \mathbb{R}^{F_2} \to \mathbb{R}^2$ is the compare function that takes the concatenated view embeddings $\left[\Phi_{f}(i\mathbf{x}_{t - w}^{t})\Phi_{f}(j\mathbf{x}_{t - w}^{t})\right]$ and outputs the relative confidence weight of the anchor view $i$ with respect to the auxiliary view $j$ at time $t$ . $F_1$ and $F_2$ are the dimensions of each frame feature and the window embedding respectively. + +Having defined the view confidence weight ${}_{i}c_{t}$ , we rewrite the likelihood $p(x_{t}|a_{n(t)})$ as follows and use Eq.3 to infer the pseudo labels $(\overline{a}_1^N,\overline{l}_1^N)$ : + +$$ +p \left(x _ {t} \mid a _ {n (t)}\right) = p \left(_ {i} x _ {t} \mid a _ {n (t)}\right) ^ {i c _ {t}} p \left(_ {j} x _ {t} \mid a _ {n (t)}\right) ^ {\left(1 - _ {i} c _ {t}\right)}. \tag {13} +$$ + +We incorporate a new loss $\mathcal{L}_{\mathrm{vc}}$ in our final loss function $\mathcal{L}_f$ in order to learn the parameters of the view confidence weight $i c_{t}(\pmb{\theta}_{c})$ , where $\pmb{\theta}_{c}$ is the set of all parameters in the compare and embedding functions of Eq. 12. In addition, $\pmb{\theta}_{a}$ denotes the set of parameters (i.e. GRU) required to predict frame-level action probability $p(a_{t}|x_{t};\pmb{\theta}_{a})$ . Given the inferred pseudo labels $(\overline{a}_1^N,\overline{l}_1^N)$ , we define the weighted energy score of the pseudo labels as: + +$$ +\tilde {\mathcal {E}} _ {\boldsymbol {\theta} _ {c}} = \prod_ {t = 1} ^ {T} p \left(\bar {a} _ {n (t)} | _ {i} x _ {t}\right) ^ {i c _ {t} \left(\theta_ {c}\right)} p \left(\bar {a} _ {n (t)} | _ {j} x _ {t}\right) ^ {\left(1 - i c _ {t} \left(\theta_ {c}\right)\right)}, \tag {14} +$$ + +where we freeze $\theta_{a}$ and allow $\mathcal{L}_{\mathrm{vc}}(\theta_c) = -\log (\tilde{\mathcal{E}}_{\theta_c})$ to be optimized with respect to the view confidence weight $i c_{t}(\pmb{\theta}_{c})$ , so that the weighted energy score $\tilde{\mathcal{E}}_{\pmb{\theta}_c}$ of the correct path $(\overline{a}_1^N,\overline{l}_1^N)$ is maximized: + +![](images/d8e90227f866dbddd1d69531b1d8cf025a38dad01b0ee518ff1f9b6cc7c05fb4.jpg) +Figure 3. An overview of the single-view and multi-view training schemes can be seen on the left. More details of the three proposed multi-view inference techniques are depicted on the right. Notice how a single view is always used to segment the video at test time. + +$$ +\mathcal {L} _ {f} \left(\boldsymbol {\theta} _ {c}, \boldsymbol {\theta} _ {a}\right) = \mathcal {L} _ {b} \left(\boldsymbol {\theta} _ {a}\right) + \mathcal {L} _ {\mathrm {O O D L}} \left(\boldsymbol {\theta} _ {a}\right) + \mathcal {L} _ {\mathrm {v c}} \left(\boldsymbol {\theta} _ {c}\right). \tag {15} +$$ + +Note that the embedding and compare functions, $\Phi_f()$ and $\Phi_c()$ , are utilized only in training. Besides, $\mathcal{L}_b$ and $\mathcal{L}_{\mathrm{OODL}}$ are computed using just the anchor video after taking the multi-view inference pseudo labels as their valid path and offline inference result respectively. + +# 6. Experiments + +Datasets. The Breakfast Dataset (BD) [24] contains approximately 1.7k cooking videos, recorded from multiple views, ranging from a few seconds to over ten minutes long. Both the angle and number of views differ across recordings. The dataset consists of 48 action labels demonstrating 10 breakfast dishes with a mean of 6.9 action segments per video. The evaluation metrics are calculated over four splits. The IKEA ASM Dataset (IAD) [2] has 371 recordings of assembly for four types of furniture. Each assembly is recorded from three consistent view points, providing 1113 total videos. Videos in this dataset contain a dense number of action segments (mean of $\approx 23$ ) per shorter videos with a mean duration of $1.9\mathrm{min}$ . There are 32 action classes after combining the NA and other classes as background. We report results over 5 splits, where each split belongs to one of the five recording environments as suggested by [2]. + +Metrics. Similar to previous work [6, 9, 27], we use four metrics to evaluate performance: 1) $acc$ is the frame-level accuracy averaged over all the videos. 2) $acc - bg$ is the frame-level accuracy without the background frames. 3) $IoU$ defined as the intersection over union, which is particularly useful for imbalanced datasets such as IKEA. 4) $IoD$ denotes the intersection interval over the detected interval averaged across all videos. This metric tends to overrate over-segmentation results. As in [9], both $IoD$ and $IoU$ are calculated over non-background segments. + +Implementation. We extracted I3D features [3] for the IAD dataset using TV-L1 optical flow [57] on a moving window of 16 frames. Final dimensions of the features were reduced to 400 by PCA. Meanwhile, for the $BD$ dataset, we obtained the Fisher vectors [34] of iDT features [51] as in [25]. We implemented the embedding function $\Phi_f()$ as temporal convolution and max pooling, while two fully connected layers were used as the compare function $\Phi_c()$ . Also, we set $F_2 = 64$ and $\omega = 21$ . For a fair comparison we used the same random seed in all our experiments. The model was trained for around 70k and 6k iterations on the $BD$ and IAD datasets, respectively, following the training setup of [27]. + +# 6.1. Comparison to the Baseline Methods + +Baselines. We implemented the Greedy baseline following the strategy of [16], where a recurrent network is trained using the pseudo labels generated by an offline segmentation method. At test time, the network takes a greedy approach and identifies actions in a sliding window fashion. Also, $\mathrm{DP}_{\mathrm{on}}$ represents the proposed online inference (Eq.7), and $\mathrm{DP}_{\mathrm{off}}$ denotes the offline segmentation baseline of Eq.3. + +Quantitative Results. Table 1 compares the Greedy and $\mathrm{DP}_{\mathrm{on}}$ methods in online segmentation. The Greedy baseline shows poor performance specially in the $BD$ dataset largely due to poor video quality that makes isolated predictions error-prone. However, Greedy shows decisively high IoD values. In general, high IoD with low IoU indicates over-segmentation, which leads to overrating the result. The presence of the $\Gamma$ function in our online modeling is important. Its omission leads to about $1\%$ and $3\%$ drop in all metrics in the $BD$ and IAD datasets, respectively. The best result is achieved by including the OODL loss and multi-view training. This leads to a $2.6\%$ and $3.3\%$ IoU improvement of the $\mathrm{DP}_{\mathrm{on}}$ baseline in the $BD$ and IAD datasets, respectively. Overall, improvements on the IAD dataset are + +Table 1. Comparison of our multi-view supervised segmentation model with various baselines in online action segmentation. $M$ refers to multi-view training.* We report the WPI and PI multiview results for the BD and IAD datasets respectively. + +
TrainingTestBreakfast (%)IKEA ASM (%)
MLOOInferenceaccacc-bgIoUIoDaccacc-bgIoUIoD
××Greedy [16]20.415.97.458.155.656.230.953.5
××DPon w/o Γ34.331.421.445.152.854.630.039.3
××DPon35.132.322.446.955.357.833.344.1
✓✓DPon*36.634.725.049.156.959.736.848.0
✓✓DPoff*50.446.833.344.960.363.541.752.0
+ +better represented by IoU since frame accuracy is dominated by the action "spin leg", which occupies nearly $45\%$ of the frames. We include offline results to show the performance gap between online and offline segmentation. The smaller gap between $\mathrm{DP_{off}}$ and the Greedy method in the IAD dataset highlights the challenge of weakly-supervised learning in videos with a dense number of action segments. + +Qualitative Results. Incorporating multi-view supervision in training makes the GRU more robust to bad lighting, occlusion and scene variations as demonstrated in Fig. 4. Particularly, the top figure shows results of coffee table assembly by two people in the IAD dataset. This is a challenging case since nearly all tasks in both datasets are completed by one person. Hence, the baseline $\mathrm{DP}_{\mathrm{on}}$ has missed the third instance of "spinning the leg", which is correctly detected by our final segmentation model trained using $\mathcal{L}_{\mathrm{OO}}$ and multi-view inference. The bottom figure compares different segmentation methods under dark lighting and occlusion in a sample cooking video of the $BD$ dataset. Notice the over-segmented results of the Greedy baseline in both cases. More examples included in the supplementary mate + +![](images/c54390d262f104dade2d9fa04bdce097e538c26aace1703c74154d6405acbf07.jpg) +Figure 4. Segmentation results of various methods on the IKEA (top) and Breakfast (bottom) datasets. Legend is shown only for the ground-truth classes. + +Table 2. Impact of the OODL loss on weakly-supervised online segmentation results for the ${BD}$ and ${IAD}$ datasets. + +
Training ApproachBreakfast (%)IKEA ASM (%)
accacc-bgIoUIoDaccacc-bgIoUIoD
DPon35.132.322.446.955.357.833.344.1
DPon + LOODL35.532.523.448.055.357.934.345.5
+ +![](images/4a4049db34bfe4f0b2212ce279a8b1043dbce9dfee919ba1f1eacfb2da37c28f.jpg) +Figure 5. Average segmentation results $(acc - bg)$ at five observation end points during the course of the video on the BD dataset. + +rial. + +# 6.2. Analysis and Ablation Study + +All experiments in this section are reported as an average over all splits unless stated otherwise. Run-time and complexity, as limitations of the proposed algorithm, are discussed in the supplementary material. + +# 6.2.1 Online-Offline Discrepancy Analysis + +Impact of the OODL Loss. Addition of OODL loss leads to consistent improvement in both datasets as shown in Table 2. This improvement is manifested more vividly in $IoU$ and $IoD$ because $IoU$ , in particular, is most appropriate in evaluating alignment quality between predicted and ground-truth segments. + +Fig. 5 further demonstrates the role of the OODL loss in decreasing the online-offline segmentation discrepancy in the $BD$ dataset. It shows the non-background frame accuracy of multiple segmentation approaches at five different observation end points in the video. Upon comparison of $\mathrm{DP}_{\mathrm{on}}$ and $\mathrm{DP}_{\mathrm{on}} + \mathcal{L}_{\mathrm{OODL}}$ , it can be seen that the loss has improved mostly the early predictions in the video, where it is hardest to identify actions. This is mainly due to lack of past context in early stages of a task. With the passage of time, more information regarding the past actions becomes available. Consequently, this leads to more accurate online predictions of the current frame. On average, after observing the first $20\%$ of the video, the performance of the $\mathrm{DP}_{\mathrm{on}}$ is more similar to the Greedy baseline than the Offline model. However, the $\mathrm{DP}_{\mathrm{on}}$ approach starts resembling the Offline model more just after the $60\%$ point. In comparison, such a behavior is highlighted much less by the Greedy approach due to its limitation in capturing long-range past context. + +![](images/4cd71629cd589785feb709fa42581c0ba462d88af8774581a4cfb15233b1fa99.jpg) +Figure 6. Accuracy vs. delay on split 2 of the $BD$ dataset. + +Evaluation of Semi-Online Segmentation. Online segmentation offers practical advantages over offline inference in interactive applications that require immediate feedback. However, this comes with a $10\%$ and $13\%$ compromise over acc-bg and IoU, respectively, as indicated in Fig. 6. In some applications, certain degree of latency can be tolerated. In order to evaluate the trade-off between latency and accuracy, we implemented a semi-online variation of our framework, where predictions are made after a fixed time delay. Fig. 6 shows that accuracy improves with larger latency and converges to the offline result. Importantly, we can achieve approximately $90\%$ of the offline performance with 10 seconds of delay on the BD dataset. + +# 6.2.2 Multi-View Supervision + +Weakly-Supervised Online Segmentation. We evaluate the online segmentation performance of different multiview inference techniques in Table 3. Regardless of the approach, using multi-view correspondence to generate pseudo ground-truth improves performance over the single-view method in all metrics and datasets. We also provide the Fully-Supervised baseline as the upper bound, where the pseudo ground-truth is $100\%$ accurate. + +Table 3. Comparison of online segmentation results under different pseudo ground-truth generation techniques (all with $\mathcal{L}_{\mathrm{OODL}}$ ). + +
Training ApproachBreakfast (%)IKEA ASM (%)
accacc-bgIoUIoDaccacc-bgIoUIoD
Single-View35.532.523.448.055.357.934.345.5
SV36.434.724.848.655.758.334.645.9
PI36.234.224.448.156.959.736.848.0
WPI36.634.725.049.156.459.035.947.2
Fully-Supervised41.641.230.452.963.567.3644.556.9
+ +Table 4. Offline segmentation results with and without multi-view supervision (same multi-view approaches as in Table1). [27] results obtained after running the authors' code on our machine. + +
ModelBreakfast (%)IKEA ASM (%)
accacc-bgIoUIoDaccacc-bgIoUIoD
CDFL [27]49.244.231.043.759.962.039.550.4
Multi-View CDFL50.446.833.344.960.363.541.752.0
+ +![](images/9c07542b0f791708422164df7eb995885f91a3b1a0038afe48e3c5d3eabeb10f.jpg) +Figure 7. Pseudo ground-truth generated by 3 multi-view inference techniques during training. The red bar above each single-view inference result (anchor/auxiliary) indicates their learned view confidence weight $c_{t}$ at each frame. Each pair of frames corresponds to the time enclosed by its color-coded dashed box. + +In the $BD$ dataset, different views provide more complementary information as compared to the $IAD$ dataset. This is attributed to many instances of challenging lighting or occlusion conditions in the $BD$ dataset. Fig. 7 underscores this fact by showing the pseudo ground-truth generated during training. Specifically, the bread in the anchor view occludes the two actions of "cutting bread" and "smearing butter". The resulting view confidence weight (red bar) of the auxiliary view becomes high for these frames. This allows the model to exploit the more visible view in the auxiliary video during these actions, while the anchor view is recognized as more reliable when the subject "takes an object". Notice how the view confidence weights dictate the selection of single-view results to form the multi-view WPI outcome. Meanwhile, the three views of the $IAD$ dataset remain fairly similar in terms of lighting and no considerable occlusion occurs in most videos. Hence, weighing views equally in the PI approach leads to the best results in the $IAD$ dataset. + +Weakly-Supervised Offline Segmentation. Table 4 shows how the advantage of multi-view training is further generalized to weakly-supervised "offline" segmentation. We selected the open source state-of-the-art offline segmentation method [27] as our baseline. For this experiment, we trained [27] twice, with and without multi-view supervision, under the same parameters and random seed. + +# 7. Conclusion + +We introduced a framework to address a new problem of weakly supervised online action segmentation in multi-view instructional videos. The proposed solutions are formulated with the insight that offline and multi-view results provide a rich source of supervision during training which in-turn improves performance of single view online segmentation models at test time. Extensive experiments on two benchmark datasets demonstrate efficacy of our algorithms. + +# References + +[1] Yazan Abu Farha and Juergen Gall. Uncertainty-aware anticipation of activities. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pages 0–0, 2019. 2 +[2] Yizhak Ben-Shabat, Xin Yu, Fatemeh Saleh, Dylan Campbell, Cristian Rodriguez-Opazo, Hongdong Li, and Stephen Gould. The ikea asm dataset: Understanding people assembling furniture through actions, objects and pose. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 847–859, 2021. 2, 6 +[3] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. 6 +[4] Chien-Yi Chang, De-An Huang, Yanan Sui, Li Fei-Fei, and Juan Carlos Niebles. D3tw: Discriminative differentiable dynamic time warping for weakly supervised action alignment and segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3546–3555, 2019. 2 +[5] Chien-Yi Chang, De-An Huang, Danfei Xu, Ehsan Adeli, Li Fei-Fei, and Juan Carlos Niebles. Procedure planning in instructional videos. In European Conference on Computer Vision, pages 334–350. Springer, 2020. 1 +[6] Xiaobin Chang, Frederick Tung, and Greg Mori. Learning discriminative prototypes with dynamic time warping. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8395-8404, 2021. 1, 2, 6 +[7] Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. 3 +[8] K Deepak, G Srivathsan, S Roshan, and S Chandrakala. Deep multi-view representation learning for video anomaly detection using spatiotemporal autoencoders. Circuits, Systems, and Signal Processing, 40(3):1333-1349, 2021. 2 +[9] Li Ding and Chenliang Xu. Weakly-supervised action segmentation with iterative soft boundary assignment. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6508-6516, 2018. 2, 6 +[10] Hyunjun Eun, Jinyoung Moon, Jongyoul Park, Chanho Jung, and Changick Kim. Learning to discriminate information for online action detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 809-818, 2020. 2 +[11] Chenyou Fan, Jangwon Lee, Mingze Xu, Krishna Kumar Singh, Yong Jae Lee, David J Crandall, and Michael S Ryoo. Identifying first-person camera wearers in third-person videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5125-5133, 2017. 2 +[12] Yazan Abu Farha and Jurgen Gall. Ms-tcn: Multi-stage temporal convolutional network for action segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3575-3584, 2019. 2 + +[13] Antonino Furnari and Giovanni Maria Farinella. What would you expect? anticipating egocentric actions with rolling-unrolling lstms and modality attention. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6252-6261, 2019. 2 +[14] Jiyang Gao, Zhenheng Yang, and Ram Nevatia. Red: Reinforced encoder-decoder networks for action anticipation. arXiv preprint arXiv:1707.04818, 2017. 2 +[15] Mingfei Gao, Mingze Xu, Larry S Davis, Richard Socher, and Caiming Xiong. Startnet: Online detection of action start in untrimmed videos. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5542-5551, 2019. 2 +[16] Mingfei Gao, Yingbo Zhou, Ran Xu, Richard Socher, and Caiming Xiong. Woad: Weakly supervised online action detection in untrimmed videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1915-1923, 2021. 2, 3, 6, 7 +[17] Shang-Hua Gao, Qi Han, Zhong-Yu Li, Pai Peng, Liang Wang, and Ming-Ming Cheng. Global2local: Efficient structure search for video action segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16805-16814, 2021. 2 +[18] Reza Ghoddoosian, Saif Sayed, and Vassilis Athitsos. Action duration prediction for segment-level alignment of weakly-labeled videos. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2053-2062, 2021. 2 +[19] Reza Ghoddoosian, Saif Sayed, and Vassilis Athitsos. Hierarchical modeling for task recognition and action segmentation in weakly-labeled instructional videos. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 1922-1932, January 2022. 1 +[20] Sanjay Haresh, Sateesh Kumar, Huseyin Coskun, Shahram N Syed, Andrey Konin, Zeeshan Zia, and Quoc-Huy Tran. Learning by aligning videos in time. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5548-5558, 2021. 2 +[21] Hsuan-I Ho, Wei-Chen Chiu, and Yu-Chiang Frank Wang. Summarizing first-person videos from third persons' points of view. In Proceedings of the European Conference on Computer Vision (ECCV), pages 70-85, 2018. 2 +[22] Yuchi Ishikawa, Seito Kasai, Yoshimitsu Aoki, and Hirokatsu Kataoka. Alleviating over-segmentation errors by detecting action boundaries. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2322-2331, 2021. 2 +[23] Qiuhong Ke, Mario Fritz, and Bernt Schiele. Time-conditioned action anticipation in one shot. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9925-9934, 2019. 2 +[24] Hilde Kuehne, Ali Arslan, and Thomas Serre. The language of actions: Recovering the syntax and semantics of goal-directed human activities. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 780-787, 2014. 2, 6 + +[25] Hilde Kuehne, Ali Arslan, and Thomas Serre. The language of actions: Recovering the syntax and semantics of goal-directed human activities. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 780-787, 2014. 6 +[26] Sateesh Kumar, Sanjay Haresh, Awais Ahmed, Andrey Konin, M Zeeshan Zia, and Quoc-Huy Tran. Unsupervised activity segmentation by joint representation learning and online clustering. arXiv preprint arXiv:2105.13353, 2021. 2 +[27] Jun Li, Peng Lei, and Sinisa Todorovic. Weakly supervised energy-based learning for action segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6243-6251, 2019. 1, 2, 3, 4, 6, 8 +[28] Zhe Li, Yazan Abu Farha, and Jurgen Gall. Temporal action segmentation from timestamp supervision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8365-8374, 2021. 2 +[29] Yunyu Liu, Lichen Wang, Yue Bai, Can Qin, Zhengming Ding, and Yun Fu. Generative view-correlation adaptation for semi-supervised multi-view learning. In European Conference on Computer Vision, pages 318-334. Springer, 2020. 2, 3 +[30] Tahmida Mahmud, Mahmudul Hasan, and Amit K Roy-Chowdhury. Joint prediction of activity labels and starting times in untrimmed videos. In Proceedings of the IEEE International conference on Computer Vision, pages 5773-5782, 2017. 2 +[31] Jingjing Meng, Suchen Wang, Hongxing Wang, Junsong Yuan, and Yap-Peng Tan. Video summarization via multiview representative selection. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 1189-1198, 2017. 2 +[32] Rameswar Panda and Amit K Roy-Chowdhury. Multi-view surveillance video summarization via joint embedding and sparse optimization. IEEE Transactions on Multimedia, 19(9):2010-2021, 2017. 2 +[33] Paritosh Parmar and Brendan Tran Morris. What and how well you performed? a multitask learning approach to action quality assessment. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 304-313, 2019. 1 +[34] Florent Perronnin and Christopher Dance. Fisher kernels on visual vocabularies for image categorization. In 2007 IEEE conference on computer vision and pattern recognition, pages 1-8. IEEE, 2007. 6 +[35] AJ Piergiovanni and Michael S Ryoo. Recognizing actions in videos from unseen viewpoints. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4124-4132, 2021. 2 +[36] Sanqing Qu, Guang Chen, Dan Xu, Jinhu Dong, Fan Lu, and Alois Knoll. Lap-net: Adaptive features sampling via learning action progression for online action detection. arXiv preprint arXiv:2011.07915, 2020. 2 +[37] Alexander Richard, Hilde Kuehne, and Juergen Gall. Weakly supervised action learning with rn based fine-to-coarse modeling. In Proceedings of the IEEE conference on Com + +puter Vision and Pattern Recognition, pages 754-763, 2017. 2 +[38] Alexander Richard, Hilde Kuehne, Ahsan Iqbal, and Juergen Gall. Neuralnetwork-viterbi: A framework for weakly supervised video learning. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 7386-7395, 2018. 2, 3 +[39] Marcus Rohrbach, Anna Rohrbach, Michaela Regneri, Sikandar Amin, Mykhaylo Andriluka, Manfred Pinkal, and Bernt Schiele. Recognizing fine-grained and composite activities using hand-centric features and script data. International Journal of Computer Vision, 119(3):346-373, 2016. 1 +[40] Saquib Sarfraz, Naila Murray, Vivek Sharma, Ali Diba, Luc Van Gool, and Rainer Stiefelhagen. Temporally-weighted hierarchical clustering for unsupervised action segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11225-11234, 2021. 2 +[41] Fadime Sener, Dipika Singhania, and Angela Yao. Temporal aggregate representations for long-range video understanding. In European Conference on Computer Vision, pages 154–171. Springer, 2020. 2 +[42] Fadime Sener and Angela Yao. Unsupervised learning and segmentation of complex activities from video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8368-8376, 2018. 2 +[43] Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric Jang, Stefan Schaal, Sergey Levine, and Google Brain. Time-contrastive networks: Self-supervised learning from video. In 2018 IEEE international conference on robotics and automation (ICRA), pages 1134–1141. IEEE, 2018. 3 +[44] Zheng Shou, Junting Pan, Jonathan Chan, Kazuyuki Miyazawa, Hassan Mansour, Anthony Vetro, Xavier Giro-i Nieto, and Shih-Fu Chang. Online detection of action start in untrimmed, streaming videos. In Proceedings of the European Conference on Computer Vision (ECCV), pages 534-551, 2018. 2 +[45] Gunnar A Sigurdsson, Abhinav Gupta, Cordelia Schmid, Ali Farhadi, and Karteek Alahari. Actor and observer: Joint modeling of first and third-person videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7396-7404, 2018. 2, 3 +[46] Yaser Souri, Yazan Abu Farha, Fabien Despinoy, Gianpiero Francesca, and Juergen Gall. *Fifa: Fast inference approximation for action segmentation*. In *DAGM German Conference on Pattern Recognition*, pages 282–296. Springer, 2021. 2 +[47] Yaser Souri, Mohsen Fayyaz, Luca Minciullo, Gianpiero Francesca, and Juergen Gall. Fast weakly supervised action segmentation using mutual consistency. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 1, 2 +[48] Yansong Tang, Dajun Ding, Yongming Rao, Yu Zheng, Danyang Zhang, Lili Zhao, Jiwen Lu, and Jie Zhou. Coin: A large-scale dataset for comprehensive instructional video analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1207-1216, 2019. 1 + +[49] Shruti Vyas, Yogesh S Rawat, and Mubarak Shah. Multiview action recognition using cross-view video prediction. In ECCV, pages 427-444. Springer, 2020. 2 +[50] Dongang Wang, Wanli Ouyang, Wen Li, and Dong Xu. Dividing and aggregating network for multi-view action recognition. In ECCV, pages 451-467, 2018. 2 +[51] Heng Wang and Cordelia Schmid. Action recognition with improved trajectories. In Proceedings of the IEEE international conference on computer vision, pages 3551-3558, 2013. 6 +[52] Lichen Wang, Zhengming Ding, Zhiqiang Tao, Yunyu Liu, and Yun Fu. Generative multi-view human action recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6212-6221, 2019. 2, 3 +[53] Zhenzhi Wang, Ziteng Gao, Limin Wang, Zhifeng Li, and Gangshan Wu. Boundary-aware cascade networks for temporal action segmentation. In European Conference on Computer Vision, pages 34-51. Springer, 2020. 2 +[54] Bo Xiong, Haoqi Fan, Kristen Grauman, and Christoph Feichtenhofer. Multiview pseudo-labeling for semi-supervised learning from video. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7209-7219, 2021. 3 +[55] Mingze Xu, Mingfei Gao, Yi-Ting Chen, Larry S Davis, and David J Crandall. Temporal recurrent networks for online action detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5532-5541, 2019. 2 +[56] Mingze Xu, Yuanjun Xiong, Hao Chen, Xinyu Li, Wei Xia, Zhuowen Tu, and Stefano Soatto. Long short-term transformer for online action detection. Advances in Neural Information Processing Systems, 34, 2021. 2 +[57] Christopher Zach, Thomas Pock, and Horst Bischof. A duality based approach for realtime tv-l 1 optical flow. In Joint pattern recognition symposium, pages 214-223. Springer, 2007. 6 +[58] Bowen Zhang, Hao Chen, Meng Wang, and Yuanjun Xiong. Online action detection in streaming videos with time buffers. arXiv preprint arXiv:2010.03016, 2020. 2 +[59] Peisen Zhao, Lingxi Xie, Ya Zhang, Yanfeng Wang, and Qi Tian. Privileged knowledge distillation for online action detection. arXiv preprint arXiv:2011.09158, 2020. 2 \ No newline at end of file diff --git a/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/images.zip b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..869411709b36509c179d9cbdf7937b99f29eb374 --- /dev/null +++ b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25aece1c1d61ab5cc1195d18a0c2b6ad1e20a2a77e119c84a6e5e6ea2f2303b3 +size 540726 diff --git a/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/layout.json b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5f7faeb734dc5462beb11850828de3bfd0062a72 --- /dev/null +++ b/weaklysupervisedonlineactionsegmentationinmultiviewinstructionalvideos/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c390e1a6a581a1de536df5d03ac2cdc5d267346f7aea3dc09dece72988ad0a2 +size 549709 diff --git a/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_content_list.json b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..db4f2fe68590a8d0ac4933ae1a4f161d8c8a4e42 --- /dev/null +++ b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79d4131fc850d923e99cacf381dd2f1110ea2e21ab039ff80f5daec0d4847082 +size 87833 diff --git a/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_model.json b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bfb5b5af5a6060613e748c9d30af6041ececfcc0 --- /dev/null +++ b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90da6d90a4a13d0697de57cd4efca1dd7c398c76ad7905844c5a87e2812b64e8 +size 100993 diff --git a/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_origin.pdf b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d21a04bda9237c30ef7fcbdc8c8ff2ce96caaae3 --- /dev/null +++ b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/7219586f-8f4a-4650-a78b-e014ae26819c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2d040afcd5dfbd22158e2a0cf5b077d390e269051afe3cbf2fd5868c50e86a8 +size 8305181 diff --git a/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/full.md b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7c9932b2acccbf99ab2cc8930fca38b6d4d40b0a --- /dev/null +++ b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/full.md @@ -0,0 +1,334 @@ +# Weakly Supervised Rotation-Invariant Aerial Object Detection Network + +Xiaoxu Feng Xiwen Yao* Gong Cheng Junwei Han +School of Automation, Northwestern Polytechnical University, Xi'an, China + +fengxiaox@mail.nwpu.edu.cn,yaoxiwen517@gmail.com,{gcheng,jhan}@nwpu.edu.cn + +# Abstract + +Object rotation is among long-standing, yet still unexplored, hard issues encountered in the task of weakly supervised object detection (WSOD) from aerial images. Existing predominant WSOD approaches built on regular CNNs which are not inherently designed to tackle object rotations without corresponding constraints, thereby leading to rotation-sensitive object detector. Meanwhile, current solutions have been prone to fall into the issue with unstable detectors, as they ignore lower-scored instances and may regard them as backgrounds. To address these issues, in this paper, we construct a novel end-to-end weakly supervised Rotation-Invariant aerial object detection Network (RINet). It is implemented with a flexible multibranch online detector refinement, to be naturally more rotation-perceptive against oriented objects. Specifically, RINet first performs label propagating from the predicted instances to their rotated ones in a progressive refinement manner. Meanwhile, we propose to couple the predicted instance labels among different rotation-perceptive branches for generating rotation-consistent supervision and meanwhile pursuing all possible instances. With the rotation-consistent supervisions, RINet enforces and encourages consistent yet complementary feature learning for WSOD without additional annotations and hyper-parameters. On the challenging NWPU VHR-10.v2 and DIOR datasets, extensive experiments clearly demonstrate that we significantly boost existing WSOD methods to a new state-of-the-art performance. The code will be available at: https://github.com/XiaoxFeng/RINet. + +# 1. Introduction + +Object detection is an indispensable task in both computer vision and earth vision with many applications. Recent impressive progress in object detection has been boosted by the boom of powerful deep Convolutional Neural Network (CNN) and the availability of abundant datasets with subtle annotations. However, collecting such subtle annotations is time-consuming and even infeasible, which + +![](images/33ca13376c27ec44eaf78c8373049b0e1f2e8ab8ff4f85be0c5a9abcdf8cbe20.jpg) +Figure 1. Typical issues and our solutions for WSOD in aerial images. (a) The image and its rotated image produce inconsistent detection results. (b) Existing WSOD methods incline to detect salient objects or object parts, leading to instances missing. + +has seriously impeded the applications of object detection in the real-world. To alleviate the heavy label cost, WSOD, which requires only incomplete image-level annotations to learn the precise object detection model, has been extensively explored and achieved impressive results. + +As far as we know, almost all predominated WSOD methods [5,7,8,10,14,17,19,24,27,30,31,33-35,39,45,47] are built on the Weakly Supervised Deep Detection Network (WSDDN) [14] and formulate WSOD as multiple instance learning problems. Based on it, a constructive work, named Online Instance Classifier Refinement (OICR) [31], is proposed to iteratively refine instance classifier in a unified network. More recently, some advanced works [9,17,19,24,25,27,30,33,34,43] are proposed to boost the development of WSOD via adopting novel training strategies [19,27,33,34,44,46], contextual information [17] or extra segmentation networks [9,24,38]. + +The typical WSOD approaches [7, 36, 37, 42] in aerial images are mainly inspired by the object detection algorithms developed for natural scenes and endeavor to address the sub-optimal problem. Despite their successes, such ill-posed solution ignores the property of aerial images, that is, many object instances with the same category in aerial + +images usually appear with arbitrary orientations. It introduces dramatic class-agnostic feature changes, causing sparse feature distribution. Existing predominant WSOD approaches based on regular CNNs which cannot actively encourage such sparse features to be pulled closer without corresponding constraints, causing two typical issues. + +(1) Rotation-sensitive. As shown in Figure 1 (a), existing methods incline to detect rotation-insensitive object parts and the detection results are inconsistent after rotation even for the same instance. A natural approach to address it is to use instance-level labels where object rotations come from themselves or rotated transformation, whereas WSOD does not have such annotations. Thus, it is regarded as amongst the hardest challenge of WSOD with no effective solutions. +(2) Instance missing. Most of the existing WSOD works only explore the most discriminative object. Unfortunately, it is common for an aerial image to contain many instances with the same category. This kind of solution leads to seemingly representative yet unstable object detector learning, as it will inevitably introduce class collision problem. Example testifying this issue is illustrated in Figure 1 (b). The ignored lower-scored instances may be regarded as background. A straightforward way to pursue all possible instances is to mine top-ranking instances. However, it is impractical to eliminate uncertainties and trivial solutions for each category under the weakly supervised paradigm. + +To tackle the aforementioned issues, in this paper, we propose a novel weakly supervised rotation-invariant aerial object detection network (RINet), and aim at learning rotation-invariant object detectors and pursuing all possible instances. RINet is inspired by human knowledge i.e., the category of object in aerial images remains consistent after arbitrary rotation. It can be treated as an implicit constraint for rotation-invariance learning. Encouraging the detection model to make consistent prediction for the predicted instances before and after the rotation can facilitate rotation-invariant learning online. To this end, RINet is implemented with a flexible multi-branch online detector refinement where the predicted instance labels supervise their arbitrary rotated ones in the latter stream. Finally, the instance-level labels before and after rotation are coupled to generate rotation-consistent annotations for rotation-invariant learning online. + +Furthermore, RINet also naturally projects object instances from sparse space to different rotation-aware subspaces, which encourages the same category object instances with similar orientations to be pulled closer on the embedding space. Motivated by this, coupling instances from different rotation-perceptive branches in a complementary manner is conducive to discover all possible instances with the same category. RINet greedily projects predicted labels from different rotation-perceptive branches to an interaction space. Within this interaction space, la + +bel propagating is performed over the unlabeled instances under implicit constraint to activate instances in a complementary manner. Integrating all possible instances into the iterative training process can capture abundant intra-class complementary visual patterns to facilitate a more powerful rotation-invariant object detector. + +By leveraging category-invariance in rotation, a flexible weakly supervised rotation-invariant object detection network is proposed. It not only bridges the gap existing in the object rotation but also provides the reliable and implicit constraint for instance mining. With an end-to-end learning procedure, as shown in Figure 1, RINet effectively alleviates the aforementioned challenges and generates consistent detection results. The main contributions of this paper are as follows: + +- To the best of our knowledge, we are the first attempt to construct a rotation-invariant aerial object detection network under a weakly supervised paradigm, and jointly optimize instance refinement and rotation-invariant object detector in a systematic end-to-end manner. +- We design a rotation-invariant multiple instance mining strategy, coupling instances from different rotation-perceptive branches in a complementary manner, to mine all possible object instances of the same category without introducing additional hyperparameters. +- Experiments on NWPU VHR-10.v2 [22] and DIOR [23] datasets demonstrate that the proposed RINet significantly updates the performance of state-of-the-art results by a large margin. + +# 2. Related Work + +# 2.1. Weakly Supervised Object Detection + +Weakly supervised object detection from both natural scene images and aerial images has been extensively explored and become a well-studied research field in recent years. Most of advanced researches [3,7,8,10,14,17,19, 24,27,30,31,33,34,40,45] attempt to exploit multiple instance learning (MIL) to address the WSOD task. Following the MIL constraints, the high-scoring positive bags are assigned with the pseudo instance-level label to learn the corresponding object detector. WSDDN [14] is of the first to implement WSOD with MIL in an end-to-end manner and inspires follow-up researches. For example, Tang et al. [31] propose a novel OICR framework by creatively integrating multi-stage classifiers into [14]. In OICR, each stream provides the pseudo instance-level annotation for the next stream learning to perform better detector learning. Based on it, a host of OICR-based WSOD methods [10,17,19,20,24,25,27,30,33,34,43] are developed + +![](images/3e843d224b437b6cf468de8f5c33225983cbbee78875d1beed1050af2c911b43.jpg) +Figure 2. Illustration of the proposed RINet. To address the issues of object rotation and instance missing, RINet first encourages the object detector to make the same prediction for the predicted instances before and after the rotation. Meanwhile, RINet provides implicit constraint for pursuing all possible instances by coupling predicted instance labels among different rotation-perceptive branches. + +to further boost the performance of WSOD via introducing more flexible and credible instances mining strategies. However, these methods merely mine the most confident instance while fail to extract other instances of the same class existing in an image. Thus, the above WSOD methods cannot be directly employed to perform object detection from aerial images under weakly supervised settings. This is principal because the aerial images may always contain more than one same class instance. There is no doubt that weakly supervised object detection from aerial images is a more challenging task. + +To tackle this challenge, Han et al. [16] design an instance mining strategy from the negative data to refine the WSOD model. More recently, Yao et al. [42] attempt to mine high-quality instances by introducing a dynamic curriculum learning strategy. Wang et al. [36] introduce a multiple instance graph strategy to find high-quality objects via constructing spatial and appearance graph. Feng et al. [8] introduce a triple context-aware network to tackle the issue of grouped instances in aerial images. Despite promising performance, the introduced extra hyper-parameters limited their applications. In contrast, here we attempt to mine all possible instances by taking advantage of the implicit rotation invariance without extra hyper-parameters. + +# 2.2. Rotation-invariant Learning + +Object rotation is a major challenge for object detection in aerial images. To this end, existing advanced works + +[2,4,6,13,15,18,22,41] aim to learn rotation-invariant features by designing learnable rotation-sensitive CNNs. For instance, Cheng et al. [4] construct a rotation-invariant CNN model to learn the rotation-invariant feature representations. Li et al. [22] design a multi-angle anchors based RPN [26] to alleviate the problem of object rotations. The work [6] also introduces a rotation-invariant local binary descriptor so that the orientation for each pattern can be adaptively learned. More recently, a novel oriented detection module [15] is constructed to encode the orientation information and capture rotation-invariant features by adopting active rotating filters. Deepak et al. [13] introduce a rotation-equivariant Siamese network. However, the above methods rely on the subtle manually-labeled annotations. Labeling such subtle annotations is laborious, time-consuming, or even impractical. To the best of our knowledge, the proposed RINet is of the first to address the rotation variation in an end-to-end manner under weakly supervised settings. Moreover, we also flexibly utilize the implicit constraint existing in the object rotation to mine all possible instances. + +# 3. Basic WSOD Framework + +In this paper, we choose OICR [31] as our basic framework for WSOD for its expansibility and effectiveness. OICR [31] adopts a flexible instance refinement branch to propagate the binary-level label from the most discriminative region to its adjacent regions. By repeat + +edly implementing the refinement procedure, the latent detector can effectively diagnose the localization of objects. Formally, let $\mathcal{I}$ denote an input image and $Y_{i} = [y_{1},\dots,y_{c},\dots,y_{C}]\in \{-1,1\}$ is the image-level label indicating whether an object category appear in an image. $\mathcal{H}\in \mathcal{R}_i$ is the corresponding region proposals which are generated by [32]. We first feed the input image $\mathcal{I}$ and its region proposals $\mathcal{H}$ into a CNN with ROI-pooling [11] to extract corresponding feature vectors $\mathcal{F}_{\mathcal{H}}$ . Following WS-DDN [14], two parallel branches are employed to generate classification logit $\Psi^{cls}(c,\mathcal{F}_{\mathcal{H}})$ and detection logit $\Psi^{\mathrm{det}}(c,\mathcal{F}_{\mathcal{H}})$ for each region where $c$ denotes the number of image category. Then, two matrices $\Psi^{cls}(c,\mathcal{F}_{\mathcal{H}})$ and $\Psi^{\mathrm{det}}(c,\mathcal{F}_{\mathcal{H}})$ are passed through the softmax operator along the category dimension and proposal dimension to generate corresponding scores $\mathrm{x^{cls} = e^{\Psi^{cls}(c,\mathcal{F}_{\mathcal{H}})} / \sum_{c\in C}e^{\Psi^{cls}(c,\mathcal{F}_{\mathcal{H}})}}$ $\mathrm{x^{det} = e^{\Psi^{det}(c,\mathcal{F}_{\mathcal{H}})} / \sum_{\mathcal{H}\in \mathcal{R}_i}e^{\Psi^{det}(c,\mathcal{F}_{\mathcal{H}})}}$ . These two matrices denote the probability for each proposal belonging to category $c$ and the contribution for each proposal being classified as category $c$ , respectively. The proposal scores are produced via performing an element-wise product: $s(c|\mathcal{H}) = \mathrm{x^{cls}}\odot \mathrm{x^{det}}$ . Lastly, the image score is generated by the sum over all proposal scores: $\phi (c) = \sum_{\mathcal{H}\in \mathcal{R}_i}s(c|\mathcal{H})$ and the multi-class cross entropy is applied to supervise the model training: + +$$ +\mathcal {L} _ {M I L} = - \sum_ {c \in C} y _ {c} \log \phi (c) + \left(1 - y _ {c}\right) \log \left(1 - \log \phi (c)\right). \tag {1} +$$ + +However, WSDDN [14] inclines to discover the most discriminative object parts rather than the full object. To tackle this issue, OICR [31] integrates multi-stage refinement branches into WSDDN [14] where the most confident region and its highly-overlapped adjacent regions in the former refinement branch are treated as pseudo instance-level label $\hat{Y}_c$ to supervise its latter refinement branch learning. Note that, in each refinement branch, the feature vectors of proposal are branched into a $\{C + 1\}$ -dimensional instance classifier, leading to $s(c|\mathcal{H}_r)$ , where the $\{C + 1\}^{th}$ dimension is for background. The parameters of the refinement branch are optimized via a weighted softmax loss function: + +$$ +\mathcal {L} _ {O I C R} = - \frac {1}{| \mathcal {H} |} \sum_ {r = 1} ^ {| \mathcal {H} |} \sum_ {c = 1} ^ {C + 1} \omega \hat {Y} _ {c} \log s (c | \mathcal {H} _ {r}), \tag {2} +$$ + +where $\omega$ is an adaptive parameter to alleviate the interference of noise. + +# 4. Weakly Supervised Rotation-invariant Object Detection Network + +# 4.1. Overview + +The overview of the proposed RINet is outlined in Figure 2. Building upon OICR [31], RINet addresses the is + +sues of rotation-sensitive and instance missing via encouraging consistent and complementary learning in two modules: rotation-invariant learning and multiple instance mining. Specifically, we first simultaneously feed images before and after rotation transformation into a unified multiple instance detection network which consists of a detection branch, a rotated detection branch, and a rotation-invariant detection branch. The rotation-invariant module generates rotation-consistent labels to encourage the object detector to make the same prediction for the labeled instances before and after the rotation, thereby facilitating the detector to capture rotation-invariant features. Meanwhile, all possible instances are mined by coupling predicted instance labels among different rotation-perceptive branches in a complementary manner. + +# 4.2. Rotation-invariant Learning + +Rotation transformation is a common data augmentation and has been widely used in fully supervised object detection in aerial images. Noting that the instance-level labels also keep the same affine transformation. It introduces an implicit constraint to facilitate rotation-invariant learning under a fully supervised paradigm. Yet the unavailability of instance-level labels causes the implicit constraint missing here. Thus, to realize the rotation-invariant learning, the key lies in how to leverage this implicit constraint in a weakly supervised manner. + +It is common sense that for the same instance in aerial images, e.g. "airplane" and "baseball field", through arbitrary rotation, their categories are unchanged. Similarly, we can draw the conclusion that is the pseudo instance-level labels obtained by the WSOD model also keep the same affine transformation in the image after rotation. Based on the above analyses, we propose a flexible and effective RINet to drive the detection network to make the same prediction for the labeled instances before and after the rotation. + +Given a pair of input images including the original image $\mathcal{I}$ and its rotated image $\mathcal{I}^{rotate} = T_{rotate}(\mathcal{I})$ , $\mathcal{H}$ and $\mathcal{H}^{rotate}$ are corresponding region proposals, respectively. We feed them into the same WSOD network to generate the image feature maps and then employ ROI pooling to obtain corresponding feature vectors $\mathcal{F}_{\mathcal{H}}$ and $\mathcal{F}_{\mathcal{H}^{rotate}}$ of proposal, respectively. As illustrated in Figure 2, the proposal feature vectors of original image $\mathcal{F}_{\mathcal{H}}$ , rotated image $\mathcal{F}_{\mathcal{H}^{rotate}}$ and its joint proposal feature vectors $\mathcal{F}_{\mathcal{H}^J} = \operatorname{Cat}(\mathcal{F}_{\mathcal{H}}, \mathcal{F}_{\mathcal{H}^{rotate}})$ are branched into the detection branch, rotated detection branch and rotation-invariant branch to produce the corresponding classification probability $s(c|\mathcal{H}) \in \mathbb{R}^{|\mathcal{H}| \times (C + 1)}$ , $s(c|\mathcal{H}^{rotate}) \in \mathbb{R}^{|\mathcal{H}| \times (C + 1)}$ , and $s(c|\mathcal{H}^J) \in \mathbb{R}^{2|\mathcal{H}| \times (C + 1)}$ , respectively. For each class existing in the image ( $y_c = 1$ ), we obtain the pseudo instance label $\hat{Y}_c$ by the same way as [31] in the detection branch. According to the implicit constraint, if the $r^{th}$ object pro + +posal $\mathcal{H}_r$ is selected as positive instance or background in the detection branch, the $r^{th}$ rotated proposal $\mathcal{H}_r^{rotate}$ in rotation detection branch also should have the same category with it. Thus, we can leverage the pseudo instance-level label obtained by the original detection branch to supervise the rotated branch. Similarly, the rotated ones also can supervise the original branch. In our experiment, we just need to ensure that different detection branches are fed into the same image with different affine transformations. The multiple instance detection network can be trained by: + +$$ +\mathcal {L} _ {\text {r o t a t e}} = - \frac {1}{| \mathcal {H} |} \sum_ {r = 1} ^ {| \mathcal {H} |} \sum_ {c = 1} ^ {C + 1} \omega \hat {Y} _ {c} \log s (c | \mathcal {H} _ {r} ^ {\text {r o t a t e}}). \tag {3} +$$ + +Iteratively propagating image-level labels from the predicted instances to their rotated instances and highly-overlapped adjacent regions encourages instance classifier to pursue full object extent. Moreover, it also facilitates the multiple instance detection network to discover the same category instances with different orientations in an image. Next, we generate credible and rotation-consistent supervision from the same category with different orientations like full supervised settings via coupling both supervisions from the detection branch and rotated detection branch: + +$$ +\left\{ \begin{array}{l} \hat {Y} _ {c} ^ {I} = \left\{\hat {Y} _ {c} \right\} _ {r} \cup \left\{\hat {Y} _ {c} \right\} _ {r + | \mathcal {H} |} \\ \hat {Y} _ {c} = \arg \max _ {c} \mathcal {J} (s (c | \mathcal {H} _ {r}), s (c | \mathcal {H} _ {r} ^ {\text {r o t a t e}})) \end{array} , \right. \tag {4} +$$ + +where $\hat{Y}_c^I\in \mathbb{R}^{2|\mathcal{H}|}$ , $r$ denotes the index of pseudo instance-level label, and $\mathcal{J}(\cdot)$ is branch-wise average pooling. The rotation-invariant learning can be realized by enforcing the object detector to make the same prediction for the positive instances before and after the rotation. The parameters of rotation-invariant detection branch are optimized by: + +$$ +\mathcal {L} _ {R I} = - \frac {1}{2 | \mathcal {H} |} \sum_ {r = 1} ^ {2 | \mathcal {H} |} \sum_ {c = 1} ^ {C + 1} \omega \hat {Y} _ {c} ^ {I} \log s (c | \mathcal {H} _ {r} ^ {J}). \tag {5} +$$ + +# 4.3. Multiple Instance Mining + +Although selecting the most confident region before and after rotation realizes rotation-invariant learning, such a solution also ignores the important fact that aerial images usually contain many instances with the same category. It has been turned out to be a major reason causing the performance of WSOD inferior to the full supervised object detection. To address this issue, we take advantage of the implicit constrain in RINet to pursue all possible instances without extra hyper-parameters. + +To this end, similar to PCL [30], we first adopt K-means to generate a set of clusters according to their proposal scores and then select the proposals from the highest-score cluster as top-ranking proposals in both detection + +
BaselineRINetClusterMIMmAPCorLoc
✓18.743.3
✓26.648.8
✓✓27.151.4
✓✓28.352.8
+ +Table 1. Results $(\%)$ for different components of RINet on the DIOR trainval and testing set. + +branch and rotated detection branch. Next, we preliminarily construct corresponding undirected unweighted graphs $G_{c}^{o} = (V_{c}^{o},E_{c}^{o})$ and $G_{c}^{r} = (V_{c}^{r},E_{c}^{r})$ according to their spatial similarity, where vertexes $V_{c}$ represent these top-ranking proposals, and each edge in $E_{c}$ correspond to the spatial similarity between vertices. Vertexes with enough spatial similarity are connected and labeled to the same category. The spatial similarity is generated via computing IoU between vertices. After that, we project $G_{c}^{o} = (V_{c}^{o},E_{c}^{o})$ and $G_{c}^{r} = (V_{c}^{r},E_{c}^{r})$ to an interaction space which is more friendly for instance mining according to the implicit constraint. Within this interaction space, we build a graph $G_{c}^{I} = (V_{c}^{I},E_{c}^{I})$ to connect the graph from original space and rotated space and perform label propagating over the graph, where $V_{c}^{I} = \{G_{c}^{o},G_{c}^{r}\}$ and $E_{c}^{I}$ is the implicit constraint existing in the rotation. After the propagating, the updated graph is then projected back to original space $\hat{Y}_{G_c^I}\rightarrow \hat{Y}_c^o$ to supervise the rotation-invariant branch learning. Thus, we update the pseudo instance-level label $\hat{Y}_c^I\in \mathbb{R}^{2|\mathcal{H}|}$ via directly propagating the labels of all vertices in graph $G_{c}^{I}$ to rotation-invariant branch: + +$$ +\hat {Y} _ {c} ^ {I} = \left\{\hat {Y} _ {G _ {c} ^ {I}} \right\} _ {r} \cup \left\{\hat {Y} _ {G _ {c} ^ {I}} \right\} _ {r + | \mathcal {H} |}. \tag {6} +$$ + +In such a way, on one hand, we can employ more instances with the same category to learn the more robust detector. On the other hand, encouraging the more samecategory instances with different orientations for training further drives the more robust rotation-invariant learning. + +# 5. Experiments + +# 5.1. Datasets and Evaluation Metric + +RINet is validated on the commonly used NWPU VHR-10.v2 [22] and DIOR [23] datasets. NWPU VHR-10.v2 [22] is a classical aerial image dataset with the size of $400 \times 400$ , including 10 object categories. DIOR [23] is a popular public dataset for fully supervised object detection in aerial images but rarely explored with WSOD owing to its hard challenges. It consists of 23463 images including 192472 instances with the size of $800 \times 800$ and covers 20 different categories (i.e., Airplane (PL), Airport (AP), Baseball field (BF), Basketball court (BC), Bridge (BR), Chimney (CM), Dam (DA), Expressway service area (ES), Expressway toll station (ET), Golf field (GF), Ground track + +![](images/027b1cabcaf46bed26b58ca6e0c95c839f8775ecba697d487e5463c534f9b28f.jpg) +(a) + +![](images/138f29227f9d4725f01db229e578cba1a1e7fc543bb723303f7a2a43ebfe6a49.jpg) +(b) +Figure 3. Ablation studies for both rotation-invariant learning and multiple instance mining. (a) Visualization of detection results for rotated objects. (b) Instances discovered by RINet with different instance mining strategies in the training stage. + +
MethodsAirplaneShipStorage tankBaseball DiamondTennis courtBasketball courtGround track fieldHarborBridgeVehiclemAP
COPD [1]62.369.464.582.134.135.384.256.316.444.354.9
Transferred CNN [21]66.057.185.080.935.145.579.462.643.241.359.6
RICNN [4]88.778.386.389.142.356.987.767.562.372.073.1
RCNN [12]85.488.962.819.790.758.268.079.954.249.965.8
Fast RCNN [11]90.990.689.347.3100.085.984.988.280.369.882.7
Faster RCNN [26]90.986.390.598.289.769.6100.080.161.578.184.5
RICO [22]99.790.890.692.990.380.190.880.368.587.187.1
WSDDN [14]30.141.735.088.912.923.999.413.91.93.635.1
OICR [31]13.767.457.255.213.639.792.80.21.83.734.5
PCL [30]26.063.82.589.864.576.177.90.01.315.739.4
DCL [42]72.774.337.182.636.942.384.039.616.835.052.1
PCIR [7]90.878.836.490.822.652.288.542.411.735.555.0
TCANet [8]89.478.278.490.835.350.490.942.44.128.358.8
Ours90.386.379.690.758.280.4100.057.718.941.670.4
+ +Table 2. Average precision (%) for different methods on the NWPU VHR-10.v2 testing set. + +field(GTF), Harbor (HB), Overpass (OP), Ship (SH), Stadium (SD), Storage tank (ST), Tennis court (TC), Train station (TS), Vehicle (VH), Wind mill (WM)). Both datasets are split into three subsets, i.e., training set, validation set, and testing set. Noting that almost every image in both datasets contains more than one instance with different orientations. Following the standard routine in WSOD, RINet is trained on the both training set and the validation set, referred to as the trainval set, and evaluated on the testing set. Meanwhile, solely image-level labels are available during the model training. Average Precision (AP) and correct localization accuracy (CorLoc) are employed to evaluate the accuracy of object detection and localization, respectively. All these two metrics are performed on the PASCAL criteria, i.e., IoU threshold at $50\%$ . + +# 5.2. Implementation Details + +For a fair comparison, VGG16 [29] pre-trained on the ImageNet [28] is adopted as the backbone and all newly added layers are initialized with a Gaussian distribution with 0-mean and 0.01-standard. Meanwhile, we keep the training settings including learning rate, mini-batch, weight decay, and momentum identical to [30,31,34]. They are set to 0.001, 2, 0.005, and 0.9, respectively. SGD is applied for + +optimization. The Selective Search [32] is adopted to generate about 2000 proposals per image. We augment training data with three rotation transformations $\{90^{\circ},180^{\circ},270^{\circ}\}$ . During training, RINet performs 20K and 200K iterations and its learning rate will shrink by a factor of 10 every 10K and 100K iterations for NWPU VHR-10.v2 and DIOR datasets, respectively. 0.3 is set as a confidence threshold for NMS to remove duplicated bounding boxes. All experiments are implemented with Pytorch onubuntu16.04, NVIDIA Tesla V100, cuDNN v5, and CUDA 9.0. Inspired by [17,34], we also set the adaptive weights in OICR loss as $\omega = 0.1$ and generate new baseline (18.7% mAP and 43.3% CorLoc). + +# 5.3. Ablation Studies + +Effect of rotation-invariant learning. Our RINet is built upon the OICR [31]. Compared with it, we simultaneously feed images before and after rotation and their corresponding region proposals into the WSOD Network. Meanwhile, we modify its refinement branch as rotated detection branch and rotation-invariant detection branch but remain its instance refinement strategy. The input of the rotation branch and rotation-invariant branch are proposal features after rotation and the joint proposal features before and af + +
MethodsPLAPBFBCBRCMDAESETGFGTFHBOPSHSDSTTCTSVHWMmAP
Fast RCNN [11]44.266.867.060.515.672.352.065.944.872.162.946.238.032.171.035.058.337.919.238.150.0
Faster RCNN [26]50.362.666.080.928.868.247.358.548.160.467.043.946.958.552.442.479.548.034.865.455.5
WSDDN [14]9.139.737.820.20.312.20.60.711.94.942.44.71.10.763.04.06.10.54.61.113.3
OICR [31]8.728.344.118.21.320.20.10.729.913.857.410.711.19.159.37.10.70.19.10.416.5
PCL [30]21.535.259.823.53.043.70.10.91.52.956.416.811.19.157.69.12.50.14.64.618.2
DCL [42]20.922.754.211.56.061.00.11.131.030.956.55.12.79.163.79.110.40.07.30.820.2
PCIR [7]30.436.154.226.69.158.60.29.736.232.658.58.621.612.164.39.113.60.39.17.524.9
TCANet [8]25.130.862.940.04.167.88.123.829.922.353.924.811.19.146.413.731.01.59.11.025.8
Ours26.257.462.725.19.969.21.413.336.251.453.928.64.89.152.715.820.612.99.14.728.3
+ +Table 3. Average precision (%) for different methods on the DIOR testing set. + +
MethodsPLAPBFBCBRCMDAESETGFGTFHBOPSHSDSTTCTSVHWMCorLoc
WSDDN [14]5.759.994.255.94.923.41.06.844.512.889.95.510.023.098.579.615.13.511.63.232.4
OICR [31]16.051.594.855.83.623.90.04.856.722.491.418.218.731.898.381.37.51.215.82.034.8
PCL [30]61.146.995.463.67.395.10.25.75.150.889.442.119.837.997.980.713.80.210.56.941.5
PCIR [7]81.651.396.273.55.094.715.932.846.048.685.338.920.230.684.691.556.33.810.51.348.4
TCANet [8]91.269.495.567.518.997.80.270.554.351.488.348.02.333.614.183.465.619.916.42.949.4
Ours92.780.992.769.58.690.10.271.362.065.585.151.415.744.698.680.314.822.76.92.652.8
+ +Table 4. Correct localization (%) for different methods on the DIOR trainval set. + +ter rotation, respectively. For a fair comparison, we adopt a consistent instance mining strategy as [31], i.e., only selecting the top-scoring proposal and its high spatial overlapped regions as positive instances, to train our RINet. As shown in Table 1, our RINet achieves $26.6\%$ mAP and $48.8\%$ CorLoc, which significantly boost the baseline by a large margin $(+7.9\%$ mAP, and $+5.5\%$ CorLoc). Figure 3 (a) further exhibits qualitative comparisons of rotation-invariant learning between baseline and ours. It can be clearly seen that RINet can effectively generate nearly rotation-consistent results for the same category objects with different orientations, compared with baseline method. Comprehensive experiments show that the proposed RINet can effectively alleviate the issue of object rotation. + +Effect of multiple instance mining. To disclose the contribution of the proposed instance mining strategy, we first integrate proposal cluster learning [30] into our RINet to mine the same class instances. As presented in Table 1, the performance of detection in terms of mAP and CorLoc are boosted by $0.5\%$ and $2.6\%$ , respectively. Then, we further integrate the proposed multiple instance mining (MIM) strategy into our RINet. We can observe that the proposed approach further brings $1.2\%$ mAP and $1.4\%$ CorLoc improvement, respectively. We also provide qualitative comparisons in Figure 3 (b) for instance mining in the training among our baseline, cluster learning, and proposed approach. It can be seen that RINet successfully discovers all possible instances with different orientations and significantly outperforms the performance of other approaches. + +# 5.4. Comparison with State-of-the-arts. + +In this section, we evaluate the proposed RINet on the NWPU VHR-10.v2 and DIOR datasets to provide comprehensive comparisons with the state-of-the-arts. + +Table 2 shows quantitative comparisons for each class with existing advanced methods on the NWPU VHR-10.v2 dataset. Among existing weakly supervised approaches in + +remote sensing images, our RINet achieves the new state-of-the-art mAP of $70.4\%$ and outperforms all others in the most categories. Compared with the baseline, our RINet achieves consistent improvement for each class by a large margin on the testing set. Moreover, Our RINet also outperforms the WSDDN [14], OICR* [31], PCL [30], DCL [42], PCIR [7], TCANet [8] by $35.3\%$ , $35.9\%$ , $31\%$ , $18.3\%$ , $15.4\%$ , $11.6\%$ , respectively which are notable margins in terms of mAP. + +On the more challenging DIOR dataset, it can be seen in Table 3 and Table 4 that RINet significantly surpasses existing state-of-the-art with $28.3\%$ mAP and $52.8\%$ CorLoc, respectively, demonstrating the robustness of proposed RINet. This increase of performance mainly comes from the collaboration of rotation-invariant learning and multiple instance mining, which alleviates the issues of object rotation and instances missing. + +On both NWPU VHR-10.v2 and DIOR datasets, we also present the results of RINet compared with advanced fully supervised methods. As shown in Table 2 and Table 3, we further narrow the gap between the WSOD and fully supervised methods. Noting that we obtain superior performance to some fully supervised approaches, such as COPD [1], Transferred CNN [21], RCNN [12]. + +Qualitative visualizations for both successful and failure examples on both NWPU VHR-10.v2 and DIOR datasets are shown in Figure 4 and Figure 5. It can be seen that our RINet can correctly localize multiple discrete instances with different orientations. However, our RINet also has trouble in addressing small objects and scene-ambiguous objects. For example, the detection model tends to discover more salient rivers under image-level labels with the bridge category, as bridges always co-exist with rivers. These remain challenging issues and we can consider introducing causal intervention in the future. + +![](images/a7537174b95f94f6ce38e696227cf9c8f199e7f5550e250263b87276c99483a9.jpg) + +![](images/0e89aaea21905a368c22b32caf2255e67b7076e0943216f09772d5deab460225.jpg) + +![](images/c97bf3790a1110c3ad1e53f93e3d0fbe22e743850b08537bd79e3db91b64c6ad.jpg) + +![](images/e17c3561c9fe3cfae3633721e672329a9aeaac5510514ea1c197319798ca4d82.jpg) + +![](images/7f75a636a3f4a6b3dea0ea84d5d51a507101737b1336c70b20271b07f7b7c2b0.jpg) + +![](images/974a17a2d6d775d2464de7fad009b7efed794522e4c651836793e0dcbeab1f8b.jpg) + +![](images/73f02f583c406218f4725b9a91db74252fcb75efd3dbd1c1504a4f6254053ce8.jpg) + +![](images/065accb455fb525bdfb52c5c54dc1df4e02a2c97658d630e7cabd200da267781.jpg) + +![](images/887d99cf290da1201bc2c68d6a248636a4f9861a06f720f37e1d3015c6c1d235.jpg) + +![](images/345707a10137d95a6d0593de35e25e5f9905e1b0542523f463665e63b4b73655.jpg) + +![](images/45e951dc025f404b9bcb9188cb3b94f31587207d9e8d691c2a56c262845c05eb.jpg) + +![](images/d3e7d0c13fcc7bd9fcfb1ba32d72b5f4b79982a527b8aa63fb6e1052bd554826.jpg) + +![](images/f906eaebe2dac81be1d4e291b72fd38a1632b750a54f3ec002e162cb79113d3c.jpg) +Figure 4. Visualization of detection results on the NWPU VHR-10.v2 testing split (70.4% mAP). The first two rows indicate corrected predictions and different colors rectangle indicates different classes. The third row denotes the failure cases. + +![](images/aa8a5b9395fadb8c46ccb95b241ce29761d6e0d6829b2ef7f5240ce1c731d2bb.jpg) + +![](images/7a903d6073dd15ef87d374d72baf9eede4cc0fdee2db47f33071c467a6a387ee.jpg) + +![](images/f1a117e9f7d67c3bc060ca428ac5dc790eea0f3d827038a1151bf1a74cc198f6.jpg) + +![](images/edb6fc95b80188dcded8ecb1bd731e09828e7cddf35c49f485292373842436d3.jpg) + +![](images/30a6c0e6e09a5b1de3e61ed98d88838ec30410b69b3be6940bef10a7a4f2cfc0.jpg) + +![](images/b6251d8409752a35cb18c6b8263c200015c1ffed1148ca053ab4cdf63633ef63.jpg) + +![](images/ba874fc4f3a7d1ff65ec4e69d2c572f9fad3f3ec3b3b0264a6900aea05e19f9a.jpg) + +![](images/8de961ebde918b964a2eb5e66ad8aad2259a45c52ef3f1661e2582fb98d17545.jpg) + +![](images/abe8f9858a392d5a86ab248d70438d8a941120fa342da8c4c9624dcbbde5baaa.jpg) + +![](images/6ce58f9ec003e072c4f61f8f371a23b96e1ed72b25e4b2f026751864d118142e.jpg) + +![](images/1ac42845316b2602019e47145849b95ece3284d9c0ec3647bd94aa98a73d8e3c.jpg) + +![](images/2c64ea278d59d723b35d5736a1982ff8700932837eb355dc76ae20fd92db2b87.jpg) + +![](images/a45364a070f9f020307a24e805f037437e12e78fc241c2056726f2a8f70baa5e.jpg) + +![](images/00542159cdf6e5e5ad0cdf77bd9b69c72651d9ef508c527c7a312297a1fb0fe3.jpg) + +![](images/9e21f5d9a38bab43e12422484f6dde94681030cb3d8195a640be9e7ac757d3e0.jpg) + +![](images/35031afe7734ef1a41a3a5aa7ab1009ebb4ffba0ccf7ab815ee6ad837121f8b6.jpg) + +![](images/62f7dc1d09400fd5be3b75ebea9dfd0685b4d70fe019402c989ef0697fd59ceb.jpg) + +![](images/6da72ad107481998a447cc593b03c8845b22b4ee6f547b4d0798904343852be6.jpg) + +![](images/d697a3cfedf61551437a16c5700dc836a035eb651c02a1a766b21223c68f4125.jpg) + +![](images/228958c0876a8e2068029c22f7ce6c0e61f7ff74c71349eb97d1f7dbc122027b.jpg) + +![](images/bbb9cac6c6ef956d54b3dff95cb9c2c1a72cfe7682e9537ae7a5850c4e215535.jpg) + +![](images/12fa4cccb259e6997b7a9c8757da9576e3f9091d1f5679218231c552e7ac7df1.jpg) +Figure 5. Qualitative results by RINet on the DIOR testing split (28.3% mAP). The first two rows indicate corrected predictions. The last row corresponds to the failure cases. + +![](images/576321363cb50d0f81e08936066f72e937cb280f4bb3cfbda889f9d2543bea16.jpg) + +![](images/9d422c7f479f860b257777825493b25d89c486a0765d7a31fb9eeb7d7f21abd3.jpg) + +![](images/95faf8df6561deec3edd1be2102b2e33e39e9fb53d10c8bb1b67d7b8cad7e51f.jpg) + +![](images/3736c3108a5a7f8af9e07113f262254e3ddd7776e84e04639aa8983d0df063f6.jpg) + +![](images/fd65980f3879e911040b3dd8ad241074c3016e1c98b3c9bba34957bce40653e7.jpg) + +![](images/b07677e9aca05f66098af59372d500a5f69407b9f4ab301a9d59ddbb7c03c780.jpg) + +![](images/661987a3c624de34ce75738ef9e7a63ba6b76325ee05a5204135e682b5ab53f5.jpg) + +# 6. Conclusion + +In this paper, we are of the first to address the object rotation issue via constructing a novel and flexible rotation-invariant aerial object detection network (RINet) under a weakly supervised paradigm. RINet is implemented with an online detector refinement with different rotated perceptions. During training, it generates rotation-consistent supervisions and meanwhile pursues all possible instances by coupling predicted instance labels among different rotation-perceptive branches in a complementary way. With all possible rotation-consistent supervisions, RINet jointly optimizes instance refinement and rotation-invariant object detector in an end-to-end manner, leading to rotation-invariant + +yet diversifying feature learning for WSOD. Comprehensive experiments demonstrate that the proposed RINet outperforms all existing WSOD methods, and produces a new state-of-the-art results. + +# 7. Acknowledgements + +This work was supported in part by the National Natural Science Foundation of China under Grants 62071388, 62136007, 62036005 and U20B2068, the Key R&D Program of Shaanxi Province under Grant 2021ZDLGY01-08, and the National Key R&D Program of China under Grant 2020AAA0105701. + +# References + +[1] Gong Cheng, Junwei Han, Peicheng Zhou, and Lei Guo. Multi-class geospatial object detection and geographic image classification based on collection of part detectors. ISPRS Journal of Photogrammetry and Remote Sensing, 98:119-132, 2014. 6, 7 +[2] Gong Cheng, Junwei Han, Peicheng Zhou, and Dong Xu. Learning rotation-invariant and fisher discriminative convolutional neural networks for object detection. IEEE Transactions on Image Processing, 28(1):265-278, 2018. 3 +[3] Gong Cheng, Junyu Yang, Decheng Gao, Lei Guo, and Junwei Han. High-quality proposals for weakly supervised object detection. IEEE Transactions on Image Processing, 29:5794-5804, 2020. 2 +[4] Gong Cheng, Peicheng Zhou, and Junwei Han. Learning rotation-invariant convolutional neural networks for object detection in vhr optical remote sensing images. IEEE Transactions on Geoscience and Remote Sensing, 54(12):7405-7415, 2016. 3, 6 +[5] Bowen Dong, Zitong Huang, Yuelin Guo, Qilong Wang, Zhenxing Niu, and Wangmeng Zuo. Boosting weakly supervised object detection via learning bounding box adjusters. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2876-2885, 2021. 1 +[6] Yueqi Duan, Jiwen Lu, Jianjiang Feng, and Jie Zhou. Learning rotation-invariant local binary descriptor. IEEE Transactions on Image Processing, 26(8):3636-3651, 2017. 3 +[7] Xiaoxu Feng, Junwei Han, Xiwen Yao, and Gong Cheng. Progressive contextual instance refinement for weakly supervised object detection in remote sensing images. IEEE Transactions on Geoscience and Remote Sensing, 58(11):8002-8012, 2020. 1, 2, 6, 7 +[8] Xiaoxu Feng, Junwei Han, Xiwen Yao, and Gong Cheng. Tcanet: Triple context-aware network for weakly supervised object detection in remote sensing images. IEEE Transactions on Geoscience and Remote Sensing, 2020. 1, 2, 3, 6, 7 +[9] Yan Gao, Boxiao Liu, Nan Guo, Xiaochun Ye, Fang Wan, Haihang You, and Dongrui Fan. C-midn: Coupled multiple instance detection network with segmentation guidance for weakly supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 9834-9843, 2019. 1 +[10] Yan Gao, Boxiao Liu, Nan Guo, Xiaochun Ye, Fang Wan, Haihang You, and Dongrui Fan. Utilizing the instability in weakly supervised object detection. arXiv preprint arXiv:1906.06023, 2019. 1, 2 +[11] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 1440-1448, 2015. 4, 6, 7 +[12] 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. 6, 7 + +[13] Deepak K Gupta, Devanshu Arya, and Efstratios Gavves. Rotation equivariant siamese networks for tracking. arXiv preprint arXiv:2012.13078, 2020. 3 +[14] Andrea Vedaldi Hakan Bilen. Weakly supervised deep detection networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2846-2854, June 2016. 1, 2, 4, 6, 7 +[15] Jiaming Han, Jian Ding, Jie Li, and Gui-Song Xia. Align deep features for oriented object detection. arXiv preprint arXiv:2008.09397, 2020. 3 +[16] Junwei Han, Dingwen Zhang, Gong Cheng, Lei Guo, and Jinchang Ren. Object detection in optical remote sensing images based on weakly supervised learning and high-level feature learning. IEEE Transactions on Geoscience and Remote Sensing, 53(6):3325-3337, 2014. 3 +[17] Zeyi Huang, Yang Zou, BVK Kumar, and Dong Huang. Comprehensive attention self-distillation for weakly-supervised object detection. Advances in Neural Information Processing Systems, 33, 2020. 1, 2, 6 +[18] Ruoqiao Jiang, Shaohui Mei, Mingyang Ma, and Shun Zhang. Rotation-invariant feature learning in vhr optical remote sensing images via nested siamese structure with double center loss. IEEE Transactions on Geoscience and Remote Sensing, 2020. 3 +[19] Satoshi Kosugi, Toshihiko Yamasaki, and Kiyoharu Aizawa. Object-aware instance labeling for weakly supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 6064-6072, 2019. 1, 2 +[20] Satoshi Kosugi, Toshihiko Yamasaki, and Kiyoharu Aizawa. Object-aware instance labeling for weakly supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 6064-6072, 2019. 2 +[21] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097-1105, 2012. 6, 7 +[22] Ke Li, Gong Cheng, Shuhui Bu, and Xiong You. Rotation-insensitive and context-augmented object detection in remote sensing images. IEEE Transactions on Geoscience and Remote Sensing, 56(4):2337-2348, 2017. 2, 3, 5, 6 +[23] Ke Li, Gang Wan, Gong Cheng, Liqui Meng, and Junwei Han. Object detection in optical remote sensing images: A survey and a new benchmark. ISPRS Journal of Photogrammetry and Remote Sensing, 159:296-307, 2020. 2, 5 +[24] Xiaoyan Li, Meina Kan, Shiguang Shan, and Xilin Chen. Weakly supervised object detection with segmentation collaboration. In Proceedings of the IEEE International Conference on Computer Vision, pages 9735-9744, 2019. 1, 2 +[25] Chenhao Lin, Siwen Wang, Dongqi Xu, Yu Lu, and Wayne Zhang. Object instance mining for weakly supervised object detection. In AAAI, pages 11482-11489, 2020. 1, 2 +[26] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497, 2015. 3, 6, 7 +[27] Zhongzheng Ren, Zhiding Yu, Xiaodong Yang, Ming-Yu Liu, Yong Jae Lee, Alexander G Schwing, and Jan + +Kautz. Instance-aware, context-focused, and memory-efficient weakly supervised object detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10598-10607, 2020. 1, 2 +[28] 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. 6 +[29] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 6 +[30] Peng Tang, Xinggang Wang, Song Bai, Wei Shen, Xiang Bai, Wenyu Liu, and Alan Yuille. Pcl: Proposal cluster learning for weakly supervised object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-16, 2019. 1, 2, 5, 6, 7 +[31] Peng Tang, Xinggang Wang, Xiang Bai, and Wenyu Liu. Multiple instance detection network with online instance classifier refinement. In Proceedings of The IEEE Conference on Computer Vision and Pattern Recognition, pages 3059-3067, July 2017. 1, 2, 3, 4, 6, 7 +[32] Jasper RR Uijlings, Koen EA Van De Sande, Theo Gevers, and Arnold WM Smeulders. Selective search for object recognition. International Journal of Computer Vision, 104(2):154-171, 2013. 4, 6 +[33] Fang Wan, Chang Liu, Wei Ke, Xiangyang Ji, Jianbin Jiao, and Qixiang Ye. C-mil: Continuation multiple instance learning for weakly supervised object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2199-2208, 2019. 1, 2 +[34] Fang Wan, Pengxu Wei, Jianbin Jiao, Zhenjun Han, and Qixiang Ye. Min-entropy latent model for weakly supervised object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1297–1306, June 2018. 1, 2, 6 +[35] Binglu Wang, Xun Zhang, and Yongqiang Zhao. Exploring sub-action granularity for weakly supervised temporal action localization. IEEE Transactions on Circuits and Systems for Video Technology, 2021. 1 +[36] Binglu Wang, Yongqiang Zhao, and Xuelong Li. Multiple instance graph learning for weakly supervised remote sensing object detection. IEEE Transactions on Geoscience and Remote Sensing, pages 1-1, 2021. 1, 3 +[37] Binglu Wang, Yongqiang Zhao, and Xuelong Li. Multiple instance graph learning for weakly supervised remote sensing object detection. IEEE Transactions on Geoscience and Remote Sensing, 60:1-12, 2021. 1 +[38] Yunchao Wei, Zhiqiang Shen, Bowen Cheng, Honghui Shi, Jinjun Xiong, Jiashi Feng, and Thomas Huang. Ts2c: Tight box mining with surrounding segmentation context for weakly supervised object detection. In Proceedings of the European Conference on Computer Vision, pages 434-450, 2018. 1 +[39] Le Yang, Junwei Han, Tao Zhao, Tianwei Lin, Dingwen Zhang, and Jianxin Chen. Background-click supervision for temporal action localization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 1 + +[40] Le Yang, Houwen Peng, Dingwen Zhang, Jianlong Fu, and Junwei Han. Revisiting anchor mechanisms for temporal action localization. IEEE Transactions on Image Processing, 29:8535-8548, 2020. 2 +[41] Qin Yang, Chenglin Li, Wenrui Dai, Junni Zou, Guo-Jun Qi, and Hongkai Xiong. Rotation equivariant graph convolutional network for spherical image classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4303-4312, 2020. 3 +[42] Xiwen Yao, Xiaoxu Feng, Junwei Han, Gong Cheng, and Lei Guo. Automatic weakly supervised object detection from high spatial resolution remote sensing images via dynamic curriculum learning. IEEE Transactions on Geoscience and Remote Sensing, 59(1):675-685, 2020. 1, 3, 6, 7 +[43] Zhaoyang Zeng, Bei Liu, Jianlong Fu, Hongyang Chao, and Lei Zhang. Wsod2: Learning bottom-up and top-down objectness distillation for weakly-supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 8292-8300, 2019. 1, 2 +[44] Shiwei Zhang, Wei Ke, Lin Yang, Qixiang Ye, Xiaopeng Hong, Yihong Gong, and Tong Zhang. Discovery-and-selection: Towards optimal multiple instance learning for weakly supervised object detection. arXiv preprint arXiv:2110.09060, 2021. 1 +[45] Xiaopeng Zhang, Jiashi Feng, Hongkai Xiong, and Qi Tian. Zigzag learning for weakly supervised object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4262-4270, June 2018. 1, 2 +[46] Yongqiang Zhang, Yancheng Bai, Mingli Ding, Yongqiang Li, and Bernard Ghanem. W2f: A weakly-supervised to fully-supervised framework for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 928-936, June 2018. 1 +[47] Yuanyi Zhong, Jianfeng Wang, Jian Peng, and Lei Zhang. Boosting weakly supervised object detection with progressive knowledge transfer. arXiv preprint arXiv:2007.07986, 2020.1 \ No newline at end of file diff --git a/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/images.zip b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7d6807887dc701f09730c124136120be9c8e4b6e --- /dev/null +++ b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e5c40b6e409cfdad10196e5e8cdf2ca2d0b74e36ed99a67f961c90546082280 +size 880557 diff --git a/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/layout.json b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c083021d6da59a18417e4ffb613371bafb86ed5b --- /dev/null +++ b/weaklysupervisedrotationinvariantaerialobjectdetectionnetwork/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c6242f7c92235c44d44a4196be348549e0f9bab133b7d3cef9da29cd6cf4250 +size 404402 diff --git a/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_content_list.json b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..91e2780fcea84c133a924886171a1a225d58eafe --- /dev/null +++ b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57fc05152309981f7d541ee848ba291aa7db8711f4256f4e4806b91e439069c9 +size 72273 diff --git a/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_model.json b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0d904f3943500fce3e862b997bc76805d1add981 --- /dev/null +++ b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:864f246361f9aebe31430c09d6993fa2d728d68dbd420933684eb8978669c6cf +size 87000 diff --git a/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_origin.pdf b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e3738a2379d9160e0b0e26bc3a875ae02512e70 --- /dev/null +++ b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/ee4c75cb-3aa9-4b62-9a21-529c09c8d183_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c7ec1cd05ab76b8b1f4a2c34e4269e1813145c066760fc87f79c594a8980264 +size 1938675 diff --git a/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/full.md b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5711d658f554a5a8021a54711d90ffbe81fa77ac --- /dev/null +++ b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/full.md @@ -0,0 +1,283 @@ +# Weakly Supervised Segmentation on Outdoor 4D point clouds with Temporal Matching and Spatial Graph Propagation + +Hanyu Shi $^{1}$ , Jiacheng Wei $^{1}$ , Ruibo Li $^{1,2}$ , Fayao Liu $^{3}$ and Guosheng Lin $^{1,2*}$ $^{1}$ Nanyang Technological University, + $^{2}$ S-Lab for Advanced Intelligence, Nanyang Technological University, + $^{3}$ Institute for Infocomm Research, A*STAR, +E-mail: hanyu001@ntu.edu.sg, gslin@ntu.edu.sg + +# Abstract + +Existing point cloud segmentation methods require a large amount of annotated data, especially for the outdoor point cloud scene. Due to the complexity of the outdoor 3D scenes, manual annotations on the outdoor point cloud scene are time-consuming and expensive. In this paper, we study how to achieve scene understanding with limited annotated data. Treating 100 consecutive frames as a sequence, we divide the whole dataset into a series of sequences and annotate only $0.1\%$ points in the first frame of each sequence to reduce the annotation requirements. This leads to a total annotation budget of $0.001\%$ . We propose a novel temporal-spatial framework for effective weakly supervised learning to generate high-quality pseudo labels from these limited annotated data. Specifically, the framework contains two modules: an matching module in temporal dimension to propagate pseudo labels across different frames, and a graph propagation module in spatial dimension to propagate the information of pseudo labels to the entire point clouds in each frame. With only $0.001\%$ annotations for training, experimental results on both SemanticKITTI and SemanticPOSS show our weakly supervised two-stage framework is comparable to some existing fully supervised methods. We also evaluate our framework with $0.005\%$ initial annotations on SemanticKITTI, and achieve a result close to fully supervised backbone model. + +# 1. Introduction + +Recently, outdoor 3D semantic segmentation is attracting more research attention since the introduce of several large datasets, e.g., SemanticKITTI [1] and Semantic-POSS [19]. The outdoor 3D point cloud dataset organises the data as several sequences of point clouds, i.e. 4D point cloud. Then, multiple scans in point cloud sequences are + +![](images/c4080ac8d90e2209e5a9777a090e365c3dc537f737e79f864889db9672be4f12.jpg) + +![](images/d88fbf67ca4d0f40635ebad0de063e89b80e07bd5f2568006cf99251a2b4e91a.jpg) +(a) Full annotation. + +![](images/ab82076c1fe01d019a7691c06abc0683a94393d9e8421e00ace1d28cd4e6291e.jpg) +(b) Unsupervised super-voxel segmentation. +(c) Partially annotated super-voxel level labels. +Figure 1. An example of super-voxel segmentation and our weak annotation. Super-voxel segmentation segments the whole point cloud scan into several small units, each containing points within the same class. Therefore, we assign the point level initial annotation to all the points in the same super-voxel. + +superimposed together and divided as small tiles to reduce manual annotation costs. However, the annotation cost on the small tiles is still high. In SemanticKITTI [1], the annotation on one $100m \times 100m$ tile of highway scene requires an average of 1.5 hours, and the annotation on one tile of more complex scenes requires an average of 4.5 hours. The whole annotation task on SmeanticKITTI requires over 1700 hours. Therefore, the research on accelerating the annotation process is valuable and desirable. We here resort to weakly supervised learning to tackle this annotation issue. + +For indoor 3D point cloud scenes, there are several weakly supervised methods [18,27,29,33] proposed for ac + +celerating the annotation process. MPRM [29] generates pseudo labels of an indoor 3D scene based on the 2D information. Other approaches [18, 33] annotate a subset of the whole point cloud scene and update weak pseudo labels with the annotated points. For outdoor 3D point cloud scenes, there is no existing weakly supervised segmentation methods available. Directly applying techniques developed for indoor scenes to outdoor scenes can not perform well due to following reasons. Firstly, there is no colour information in outdoor LiDAR point clouds, while methods designed for indoor scenes rely on the colour information to generate and smooth the pseudo labels. Secondly, a typical outdoor point cloud scene contains about 100,000 points for a $150m \times 150m$ area, which is much more sparse than an indoor point cloud scene. Thirdly, as a single outdoor 4D point cloud contains several corresponding point cloud scans, methods proposed for single point cloud scans in the indoor case require extra burdens to generate pseudo labels for each point cloud scan separately. + +In this work, we propose a novel weakly supervised framework to reduce the annotation cost in the outdoor point cloud scenario. We exploit the temporal information among point cloud sequences and only annotate $0.1\%$ points in one frame per 100-frame sequence in 4D point clouds. However, training on a weakly labelled dataset with only $0.001\%$ annotated points is unable to learn good features for achieving satisfiable performance. This problem can be concluded as the cold-start problem. To generate more supervision at minimum annotation cost, we apply an efficient super-voxel segmentation [17] on the dataset and assign the labels of annotated points to their belonged super-voxels. Inspired by ScanNet [7] and OTOC [18], super-voxel segmentation segment a point cloud into several small groups, and the points in each group share a same semantic label. We show an example of our annotations in Figure 1. + +We then design two modules, i.e., temporal matching (TM) and spatial graph propagation (SGP), to propagate the annotations to the whole dataset. TM is designed to generate seeding points in different frames by temporal propagation. For TM, we design two approaches with greedy matching and optimal transport matching. SGP further propagates the searched results to the whole point cloud scene in the spatial dimension. + +Furthermore, we propose a two-stage training strategy, which consists of a seed point propagation stage and a dense scene propagation stage. Firstly, the seed point propagation stage propagates initial annotations only along the temporal dimension with TM to generate high-quality pseudo labels under the cold-start scenario. We improve the feature quality by training a new segmentation model on the small amount of high-quality pseudo labels. + +In the second stage, we use the new segmentation model from the previous stage to generate features, and based on + +the new features, we use a dense scene propagation strategy to combine TM and SGP to propagate the label information to the whole dataset. We continue training the model from the previous stage with more pseudo labels to improve the performance further. We evaluate our method on two outdoor segmentation datasets, i.e., SemanticKITTI [1] and SemanticPOSS [19]. Experimental results show that our method achieves comparable performance with some fully supervised methods. We summarize the main contributions as follows: + +- We propose a novel two-stage weakly supervised segmentation framework to exploit spatial and temporal information across frames. The first stage (seed point propagation) generates seeding points in different frames based on weak annotations (0.001% annotated points). The second stage (dense scene propagation) propagates high-confident points in both temporal and spatial dimensions. +- We propose a temporal propagation module using temporal matching to propagate pseudo labels to different frames. There are two matching strategies, greedy matching and optimal transport matching to search the points from the annotated objects in different frames. +- We develop a spatial graph propagation module to propagate pseudo labels along spatial dimension in the dense scene propagation stage. Spatial graph propagation generates dense pseudo labels to further improve the model. +- Experimental results on both SemanticKITTI and SemanticPOSS show that our weakly supervised two-stage framework achieves on par performance with some existing fully supervised methods, while we only use $0.001\%$ annotations for training. Furthermore, we evaluate our weakly supervised method with $0.005\%$ initial annotations on SemanticKITTI, and performs close to our fully supervised backbone network. + +# 2. Related Work + +3D Point Cloud Segmentation 3D point cloud semantic segmentation is a basic scene understanding task for the robotic system. Recent papers on point-cloud segmentation can be divided into projection-based methods, point-based methods, and volumetric-based methods. Projection-based methods [2,5,15,30-32] transform the 3D scenario into the 2D scenario with a projection step to avoid the huge computation costs in the 3D point cloud processing. The inference speed of projection-based methods reaches the real-time requirement. However, the performance of these projection-based methods is limited by the distortion of objects and the sparsity of projected pixels in the projection step. Point-based methods directly process points to extract the spatial + +information. Typical point-based methods [12, 21, 22, 35] capture $k$ nearest neighbours of each point and apply an MLP to extract the features of the point clouds. To further improve the capability of the simple MLP approach, point convolution methods [14, 16, 25] design a convolution-style operation based on the related position of the neighbours. Furthermore, some graph-based methods [28] build $k$ nearest neighbour graph on the point cloud and adapt a graph convolution network to aggregate the features. In point-based methods, directly processing the points in the continuous space captures the original geometric information, while point-based methods require massive computation resources. Volumetric-based methods [3,4,9,10,23,24] index the points with discrete coordinates and apply the convolution on the indexed points. With the index, volumetric-based methods accelerate the convolution on the sparse point cloud and show good performance on the large scale point cloud, e.g., outdoor point cloud. + +Weakly Supervised Point Cloud Segmentation Weakly supervised point cloud segmentation aims to train a usable segmentation model with weak annotations. The Weakly semantic Segmentation on indoor 3D point cloud has made great progress. Recently, MPRM [29] design a multi-Path region mining module to generate the scene-level annotation and subcloud-level annotation. Xun [33] and OTOC [18] annotate a tiny subset of indoor point cloud scene. The tiny subset contains less than $10\%$ points for Xun [33] and $0.01\%$ points for OTOC [18]. Then, they design a self training mechanism to propagate the annotations to the whole point cloud scene, and approach the performance of fully supervised segmentation. + +# 3. Methodology + +# 3.1. Overview + +Our framework combines spatial and temporal information to reduce the annotation costs for outdoor LiDAR point cloud datasets. An outdoor LiDAR dataset [1, 19] contains several sequences of 3D point clouds. To maximize the usage of spatial and temporal information, we split each sequence of 3D point cloud into several sub-sequences with 100 point cloud frames each. As the LiDAR devices in KITTI [8] collect ten frames per second, each of our generated sub-sequence covers data within a time range of 10 seconds. Then, we only annotate the first frame of each sub-sequence. A KITTI-style LiDAR point cloud contains target objects (e.g. car, person) and environment objects (e.g. road, building). We annotate 1 point $\mathbf{p}_i^t$ per each target object, and 20 points per each environment object. The average proportion of annotated points is around $0.001\%$ of the whole dataset. However, only $0.001\%$ points are not enough to train a satisfied model. We thus apply an unsupervised super-voxel segmentation on the point cloud + +![](images/020e0b887fabab2b205d385592370cc6590c9fb343c57ce24139e06091952605.jpg) +Figure 2. The overview of our proposed framework. Initially, we sample and annotate about $0.001\%$ points, and train an initial model. In the seed Point propagation stage, we only select a low amount of high quality pseudo labels with temporal matching to train the first model. The dense scene propagation stage generates more data for training the final model. + +scene and assign the same label for each super-voxel $\mathbf{v}_{i'}^t$ containing annotated points to generate more initial annotations. The unsupervised super-voxel segmentation is implemented by Lin [17], which is a simple but effective approach. The updated annotation covers $0.0057\%$ of points in the SemanticKITTI. + +With the initial annotation, one core challenges is the extreme data imbalance issue in the outdoor scenario among the target and environment objects. The proportion of annotated target object points is lower than $1\%$ of the initial annotation. Therefore, we design a two-stage framework to improve the performance of the model. The first stage, i.e., seed point propagation, uses a temporal matching with greedy matching or optimal transport [26] to search the corresponding points of the initial annotations in different point cloud frames. The updated pseudo dataset contains a low amount of pseudo labels with high quality. We train a new segmentation model with higher feature quality for the next stage with the pseudo labels from the first stage, as stated in Section 3.4. Afterwards, in the dense scene propagation stage, we use the new segmentation model to extract features. With the new features, we combine the temporal matching and spatial graph propagation to update the prediction scores of non-annotated points. The updated points with high confidence scores are the pseudo labels $\mathbf{S}_{dense}$ of the second stage. The pseudo dataset in the second stage contains a high amount of points with lower quality than the pseudo labels from the first stage. Subsequently, we con + +![](images/d5e9e7a139c6aca6409b6a2a102fe6ba5aa5f9aeaa6c105c35e2c1a814220cf3.jpg) +Figure 3. The structure for the seed point propagation (SPP) stage. Our temporal matching generates the one-to-one matching results for the super-voxel from the same objects of the pseudo labels. + +![](images/07253716094e35402c57c5324326790a05f54284acf75d58bc62882e6ab92cb4.jpg) +Figure 4. The temporal propagation module using Greedy matching (Temp-GM) or Optimal Transport (Temp-OT). + +tinue training the model from the previous stage. The two-stage framework updates the pseudo dataset with high robustness and achieves performance improvement. We show the structure of our proposed framework in Figure 2. Note that to use the limited initial annotations further, we propagate the initial annotations in both forward (from $t_0$ to $t_0 + 50$ ) and backward (from $t_0$ to $t_0 - 50$ ) directions. + +# 3.2. Stage1: Seed Point Propagation (SPP) + +As the amount of annotated data is meagre and an outdoor point cloud scene only contains coordinates of points, features obtained from pre-trained models are not reliable for updating the pseudo labels on the whole point cloud scene directly, like Xun [33] and OTOC [18]. Therefore, to solve the cold-start problems, we design a temporal matching to efficiently search the super-voxels from the same objects of annotated super-voxels in corresponding point clouds. We show the structure of the seed point propagation stage in Figure 3. The temporal matching compares the difference of features and coordinates between the points in two corresponding frames and search for the matching results of pseudo labels. The temporal matching reduces the effect of data unbalance, and is robust with just features and coordinates. In our implementation, there are two matching + +strategies, greedy matching and optimal transport matching. Greedy matching generates matching results with a well-designed similarity score. To further improve the performance of temporal matching, we design an optimal transport matching to generate 1-to-1 matching results with a optimal transport solver. Inspired by the point cloud flow methods [20], optimal transport builds up connections of points in two corresponding point cloud frames. The 1-to-1 matching in the optimal transport improves the performance of the model slightly. However, the optimal transport solver also increases the cost of computation. Accordingly, the choice of the matching strategies depends on the balance of performance and inference speed. We show an explanation of temporal matching in Figure 4. + +Temporal matching with greedy matching (Temp-GM) As an outdoor point cloud scene covers an average of 120,000 points, directly applying the temporal matching on the original point cloud requires a massive amount of computation. Therefore, we use the results of super-voxel segmentation and update the pseudo labels at the super-voxel level. The feature $\mathbf{f}_{i^{\prime}}^{w,t}$ , coordinate $\mathbf{c}_{i^{\prime}}^{v,t}$ , and probability $\mathbf{y}_{i^{\prime}}^{v,t}$ of the $i^{\prime}$ -th super-voxel $\mathbf{v}_{i^{\prime}}^{t}$ are + +$$ +\mathbf {c} _ {i ^ {\prime}} ^ {v, t} = \frac {1}{n ^ {\prime}} \sum_ {\hat {i}} ^ {n ^ {\prime}} \mathbf {c} _ {i} ^ {t}; \quad \mathbf {f} _ {i ^ {\prime}} ^ {v, t} = \frac {1}{n ^ {\prime}} \sum_ {\hat {i}} ^ {n ^ {\prime}} \mathbf {f} _ {i} ^ {t}; \quad \mathbf {y} _ {i ^ {\prime}} ^ {v, t} = \frac {1}{n ^ {\prime}} \sum_ {\hat {i}} ^ {n ^ {\prime}} \mathbf {y} _ {i} ^ {t}, \tag {1} +$$ + +where $\hat{i}$ represents the $\hat{i}$ -th point belonging to the supervoxel $\mathbf{v}_{i'}^t$ , and $n'$ is the total number of points in one supervoxel. $\mathbf{c}_{\hat{i}}^{t}, \mathbf{f}_{\hat{i}}^{t}$ , and $\mathbf{y}_{\hat{i}}^{t}$ are the coordinate, feature and probability of point $\mathbf{p}_{\hat{i}}^{t}$ . The label $l_{i',j}^{v,t}$ of $\mathbf{v}_{t,i'}$ is the label with the maximum probability score. Then, we build the transport cost matrix $\mathbf{C}^{t,t+1}$ to solve the optimal transport problem. In our task, the information of an outdoor point cloud contains coordinates, remissions and features from the pretrained model. Therefore, we use the features from the pretrained network and the coordinates to extract the matching points between $\mathbf{P}^{t}$ and $\mathbf{P}^{t+1}$ . Initially, the feature similarity scores $d_{i',j'}^{f,t,t+1}$ and coordinate similarity scores $d_{i',j'}^{c,t,t+1}$ between $\mathbf{v}_{t,i'}$ and $\mathbf{v}_{t+1,j'}$ are formulated as: + +$$ +d _ {i ^ {\prime}, j ^ {\prime}} ^ {f, t, t + 1} = \frac {\left(\mathbf {f} _ {i ^ {\prime}} ^ {v , t}\right) ^ {T} \cdot \mathbf {f} _ {j ^ {\prime}} ^ {v , t + 1}}{\left\| \mathbf {f} _ {t , i ^ {\prime}} ^ {v} \right\| \cdot \left\| \mathbf {f} _ {j ^ {\prime}} ^ {v , t + 1} \right\|}, \quad d _ {i ^ {\prime}, j ^ {\prime}} ^ {c, t, t + 1} = \exp \left(- \frac {\left\| \mathbf {c} _ {i ^ {\prime}} ^ {v , t} - \mathbf {c} _ {j ^ {\prime}} ^ {v , t + 1} \right\| ^ {2}}{2 \theta^ {2}}\right). \tag {2} +$$ + +Note that $\theta$ is a hyperparameter, which is set to 0.5 in our implementation. We use cosine similarity to determine $d_{i',j'}^{f,t,t+1}$ , which is better than the Gaussian kernel in our experiment. Then, a matching cost matrix $\mathbf{C}_{i',j'}^{t,t+1}$ is + +$$ +\mathbf {C} _ {i ^ {\prime}, j ^ {\prime}} ^ {t, t + 1} = 2 - d _ {i ^ {\prime}, j ^ {\prime}} ^ {f, t, t + 1} - d _ {i ^ {\prime}, j ^ {\prime}} ^ {c, t, t + 1}. \tag {3} +$$ + +To reduce noise data, we set $\mathbf{C}_{i',j'}^{t,t+1}$ as $\infty$ if the L2 distance of $\mathbf{c}_{i'}^{v,t}$ and $\mathbf{c}_{j'}^{v,t+1}$ is larger than $10m$ . The matching result of $\mathbf{p}_{i'}^t$ are the points $\mathbf{p}_{j'}^{t+1}$ with the lowest $\mathbf{C}_{i',j'}^{t,t+1}$ . + +![](images/b245815149a7ded52405e2e65f918f27aea53f129e403c03388698b9e00d0308.jpg) +Figure 5. The pipeline of dense scene propagation (DSP) stage. + +![](images/8fedc357d8a97c1236d220be7a1454e86dc514f39140382d640835cd0c16935f.jpg) +Figure 6. Temporal matching and spatial graph propagation in the dense scene propagation stage. + +Temporal matching with Optimal Transport (Temp-OT) Optimal Transport measures a minimum cost to transport set $\mathbf{X}$ to another set $\mathbf{Y}$ , and generates a transport plan $\mathbf{T}$ . Based on Kantorovich's formulation [13], an optimal transport problem for our setting is formulated: + +$$ +\mathbf {T} = \underset {\mathbf {U} \in \mathbb {R} _ {+} ^ {n \times m}} {\operatorname {a r g m i n}} \sum_ {i} ^ {n} \sum_ {j} ^ {m} \mathbf {C} _ {i, j} \mathbf {U} _ {i, j}, \tag {4} +$$ + +$$ +s. t. \mathbf {U} \mathbf {1} _ {m} = \mathbf {1} n ^ {- 1}, \mathbf {U} ^ {T} \mathbf {1} _ {n} = \mathbf {1} m ^ {- 1}. +$$ + +Here $\mathbf{C}$ is the transportation cost matrix. $\mathbf{U}$ is the assignment matrix with each element $\mathbf{U}_{i,j}$ denoting the assignment value from sample i in $\mathbf{X}$ to sample j in $\mathbf{Y}$ . $n$ and $m$ are the amount of elements in set $\mathbf{X}$ and $\mathbf{Y}$ . In our setting, $\mathbf{X}$ and $\mathbf{Y}$ are the point clouds $\mathbf{P}^t$ and $\mathbf{P}^{t + 1}$ . The transportation cost matrix $\mathbf{C}$ is built up on the differences of features and coordinates between $\mathbf{P}^t$ and $\mathbf{P}^{t + 1}$ , and we directly use the matching cost matrix $\mathbf{C}^{t,t + 1}$ in Equation (3). Then, Sinkhorn algorithm [6] is capable of solving a smoothed version of optimal transport, which is formulated as: + +$$ +\begin{array}{l} \mathbf {T} ^ {t, t + 1} = \underset {\mathbf {U} \in \mathbb {R} _ {+} ^ {n \times m}} {\operatorname {a r g m i n}} \sum_ {i} ^ {n} \sum_ {j} ^ {m} \mathbf {C} _ {i ^ {\prime}, j ^ {\prime}} ^ {t, t + 1} \mathbf {U} _ {i, j} \tag {5} \\ + \epsilon \mathbf {U} _ {i, j} (\log \mathbf {U} _ {i, j} - 1), \\ s. t. \quad \mathbf {U} \mathbf {1} _ {m} = \mathbf {1} n ^ {- 1}, \mathbf {U} ^ {T} \mathbf {1} _ {n} = \mathbf {1} m ^ {- 1}. \\ \end{array} +$$ + +Note that $\mathbf{T}^{t,t + 1}$ is the transportation plan matrix between + +point cloud $\mathbf{P}^t$ and $\mathbf{P}^{t + 1}$ . $n$ and $m$ are the number of points in $\mathbf{P}^t$ and $\mathbf{P}^{t + 1}$ . $\epsilon$ is a hyperparameter to enhance the difference of each point pair. Then, the detailed solution is shown in Alg. 1. With the optimal transport, an one-to-one matching can be determined with $\mathbf{T}^{t,t + 1}$ . + +# Algorithm 1 Sinkhorn Algorithmn + +Input: Transportation Cost Matrix $\mathbf{C}^{t,t + 1}$ , hyperparameter $\epsilon$ , maximum iteration number $L_{0}$ + +Output: Transportation Plan $\mathbf{T}^{t,t + 1}$ + +1: procedure + +$$ +\begin{array}{l} 2: \quad \mathbf {K} ^ {t, t + 1} \leftarrow \exp \left(\mathbf {C} ^ {t, t + 1} / \epsilon\right) \\ 3: \quad \mathbf {a} \leftarrow \mathbf {1} n ^ {- 1}, \mathbf {b} \leftarrow \mathbf {1} m ^ {- 1} \\ 4: \quad \mathbf {f o r} l = 1, \dots , L _ {0} \mathbf {d o} \\ 5: \quad \mathbf {b} \leftarrow \mathbf {1} m ^ {- 1} / \left(\left(\mathbf {K} ^ {t, t + 1}\right) ^ {T} \cdot \mathbf {a}\right) \\ 6: \quad \mathbf {a} \leftarrow \mathbf {1} n ^ {- 1} / \left(\mathbf {K} ^ {t, t + 1} \cdot \mathbf {b}\right) \\ 7: \quad \text {e n d f o r} \\ 8: \quad \mathbf {T} ^ {t, t + 1} \leftarrow d i a g (\mathbf {a}) \cdot \mathbf {K} ^ {t, t + 1} \cdot d i a g (\mathbf {b}) \\ 9: \text {e n d p r o c u d e r} \\ \end{array} +$$ + +Updating Pseudo Label Set $\mathbf{S}_{seed}$ . The matching result of $\mathbf{v}_{i'}^t$ is $\mathbf{v}_{j'}^{t+1}$ with the lowest matching cost or highest transport score. We assign the label of annotated points to the matching result $\mathbf{v}_{j'}^{t+1}$ , and the matching results are updated as pseudo labels. Then, we apply the temporal matching sequentially to propagate the pseudo labels from the previous frame to the next frame. However, the false matching results during the propagation accumulate in the following propagation steps. Furthermore, most objects annotated in the first frame do not appear in distance frames. Therefore the one-to-one matching is not able to generate accurate matching results. Thus, the errors are propagated along with the whole process, which leads to significantly reduced quality of the generated pseudo labels. To reduce error accumulation, we use confidence scores to filter the matching results. When a prediction score of one matching result shows a low confidence score for the label of annotated point from the previous frame, we stop the propagation of this annotated point in advance. Then, we record every remaining matching result as the pseudo label set $\mathbf{S}_{seed}$ . The proportion of pseudo labels $\mathbf{S}_{seed}$ is $0.8\%$ of the whole point clouds. With $\mathbf{S}_{seed}$ , we train a new model for the next stage. + +# 3.3. Stage2: Dense Scene Propagation (DSP) + +In the previous stage, temporal matching generates $0.8\%$ pseudo labels with high quality. The proportion of pseudo labels is still low. Therefore, we propose the second stage to update more pseudo labels with dense scene propagation and continue training the model for the performance. With the model from previous stage, we firstly propagate the initial annotations along the time dimension with temporal matching to capture more pseudo labels. Then, in + +the spatial dimension, we use spatial graph propagation to propagate the labels of matching results to the whole point clouds and generate pseudo labels for these frames. Subsequently, we iteratively propagate the updated pseudo labels to the following frames. We show the pipeline of dense scene propagation stage in Figure 5. + +Temporal Propagation Given two corresponding point clouds $\mathbf{P}^t$ and $\mathbf{P}^{t + 1}$ , we use the temporal matching (details given in Sec. 3.2 and Figure 4) to search the super-voxel $\mathbf{v}_{j'}^{t + 1}$ from the same pseudo label of $\mathbf{v}_{i'}^t$ . Note that $\mathbf{v}_k^{t + 1}$ is the $k$ -th super-voxel of the matching results. The matching results are the confident points in the current point cloud $\mathbf{P}^{t + 1}$ . For the confident points $\mathbf{v}_k^{t + 1}$ , we assign the one-hot labels of source super-voxel $\mathbf{v}_{i'}^t$ to the target super-voxel $\mathbf{v}_k^{t + 1}$ as the probability $\mathbf{y}_k^{o,t + 1}$ . + +Spatial Graph Propogation (SGP) Then, we build a directed graph $G(V,E)$ on the whole point cloud. In $G(V,E)$ , the directions of edges $E$ are from the confident points to all the super-voxels in $t + 1$ , which includes self-loop edges. Afterwards, we build the transition matrix $\mathbf{A}$ for graph $G(V,E)$ with similarities of super-voxels. The similarity of $\mathbf{v}_k^{t + 1}$ and $\mathbf{v}_{j'}^{t + 1}$ are: + +$$ +w _ {k, j ^ {\prime}} = \exp \left(- \lambda_ {0} \frac {\left\| \mathbf {c} _ {k} ^ {v , t + 1} - \mathbf {c} _ {j ^ {\prime}} ^ {v , t + 1} \right\| ^ {2}}{2 \theta_ {0} ^ {2}} - \lambda_ {1} \frac {\left\| \mathbf {f} _ {k} ^ {v , t + 1} - \mathbf {f} _ {j ^ {\prime}} ^ {v , t + 1} \right\| ^ {2}}{2 \theta_ {1} ^ {2}}\right), \tag {6} +$$ + +where $\lambda_0, \lambda_1, \theta_0$ and $\theta_{1}$ are hyper-parameters to control the weights of the features $\mathbf{c}_{j'}^{v,t + 1}$ and $\mathbf{f}_{j'}^{v,t + 1}$ . Accordingly, we build a transition matrix $\mathbf{A}$ , and each element of $\mathbf{A}$ is: + +$$ +a _ {k, j ^ {\prime}} = \frac {w _ {k , j ^ {\prime}}}{\sum_ {k ^ {\prime}} ^ {m ^ {\prime}} w _ {k ^ {\prime} , j ^ {\prime}}}, \tag {7} +$$ + +where $m'$ is the number of matching results. Then, we propagate the information of search results to the unannotated super-voxel. As stated in Section 3.1, there is an extreme data unbalance problem in outdoor point cloud scenario, and the information of environment objects eliminates the information of target objects during the graph propagation. To reduce the effects of data unbalance, we apply a dropout on the super-voxels of environment objects in the tail nodes. In our implementation, we only keep $5\%$ super-voxels of environment objects for propagation. The updated probability $\hat{\mathbf{y}}_{j'}^{v,t+1}$ is: + +$$ +\hat {\mathbf {y}} _ {j ^ {\prime}} ^ {v, t + 1} = \alpha \mathbf {y} _ {j ^ {\prime}} ^ {v, t + 1} + (1 - \alpha) \sum_ {k ^ {\prime}} ^ {m ^ {\prime}} a _ {k ^ {\prime}, j ^ {\prime}} \mathbf {y} _ {k} ^ {o, t + 1}, \tag {8} +$$ + +where $\alpha$ is a hyperparameter. Ultimately, we select the super-voxel with high $\hat{\mathbf{y}}_{j'}^{v,t+1}$ as the pseudo label. Furthermore, when $t = 0$ , we directly use the annotated points as the $\mathbf{v}_{0,k}$ . We show an explanation of our proposed module in Figure 6. + +Updating Pseudo Label Set $\mathbf{S}_{dense}$ . In the dense scene propagation stage, the predictions with high score of $\hat{\mathbf{y}}_{j'}^{v,t+1}$ + +are selected as new pseudo labels. Then, we merge the matching results and new pseudo labels as the Pseudo Label Set $\mathbf{S}_{dense}$ , which covers an average of $20.0\%$ points in each point cloud. + +# 3.4. Training Pipeline + +With the SPP stage in Sec. 3.2, we search the pseudo labels from the same annotated objects in different frames and train a new segmentation model for next stage. DSP stage in Sec. 3.3 extracts high-quality features using the new segmentation model. Based on the similarity of the features from the new segmentation model, the temporal matching and spatial graph propagation generate the pseudo labels of unannotated super-voxels. Finally, we train a final segmentation model using the final pseudo labels. The training pipeline is summarized in Algorithm 2. In the SPP stage, we iteratively update the pseudo labels $\mathbf{S}_{seed}$ for better performance. Then, we only update the pseudo label once in the DSP stage. In our setting, our updating mechanism depends on the first frame of each 100 frames. The false positive pseudo labels are hard to be detected and revised, leading to overfitting on those false positive pseudo labels in both updating and training phases, especially for spatial graph propagation. In our observation, iteratively updating the pseudo labels $\mathbf{S}_{dense}$ does not lead to increased performance of the final model. + +Algorithm 2 Weakly Supervised 4D Point Cloud Segmentation +Input: Point Clouds P +1: procedure +2: V $\leftarrow$ super_voxel_segmentation(P) +3: S $\leftarrow$ sample_and_annotation(P, V) +4: InitialSegmentModel $\leftarrow$ train(P, S) +5: # Seed Point Propagation Stage +6: for i $\leftarrow$ 0 to 2 by 1 do +7: # Update with temporal matching. +8: S_seed $\leftarrow$ generation_with_TM(P, S) +9: MidSegmentModel $\leftarrow$ train(P, S_seed) +10: end for +11: # Dense Scene Propagation Stage +12: # Update with temporal matching and spatial graph propagation. +13: S_dense $\leftarrow$ generation_with_SGP(P, S) +14: FinalSegmentModel $\leftarrow$ train(P, S_dense) +15: end procedure + +# 4. Experiment + +We evaluate our framework on the multiple scan segmentation task on SemanticKITTI [1] and SemanticPOSS [19]. In SemanticKITTI, the training set contains 9 sequences (19,130 frames). The number of frames in the validation set is 4,071 for 1 sequence, and in the testing set it is 20,351 + +
Stage1: SPPStage2: DSPmIoU
Temp-GMTemp-OTTemp-GMTemp-OTSGP
Fully Sup.60.7
\( \text{OTOC}^{\dagger} [18] \)43.1
Baseline-A40.9
Baseline-B42.6
Model-A✓47.7
Model-B✓47.9
Model-C✓✓45.4
Model-D✓✓✓49.2
Model-E✓✓✓50.3
+ +for 9 sequences. We uniformly divided 9 sequences into 198 sub-sequences with 100 frames. Note that we adjust several choices of annotated frames to make sure every sequences contain 100 frames. In the training set, we annotated $0.1\%$ points in the first frames of the 198 sub-sequences, which leads to a total annotation budget of $0.001\%$ . Similar to SemanticKITTI, SemanticPOSS is a LiDAR point cloud dataset of outdoor scenes. There are 6 scenes with 2988 frames in SemanticPOSS, which contain 2488 frames for training set and 500 frames for testing set. After we uniformly divided training set as 26 sub-sequences, the number of initial annotated points in SemanticPOSS is around 3000 points for the first frames of 26 sub-sequences. We implement our framework with the Minkowski Engine [4]. The whole training time for one model on SemanticKITTI is 5 days with one Nvidia RTX 3090. We set $\theta$ , $\epsilon$ , $\theta_0$ , $\theta_1$ , $\alpha$ and $\beta$ to 0.5, 0.03, 0.5, 0.3, 0.5 and 0.5, respectively. + +# 4.1. Evaluation on SemanticKITTI + +Ablation study on different components To study the effectiveness of each module, we conduct detailed experiments on the validation set of SemanticKITTI. In our experiments, all the backbones of the models are the Minkowski-Unet [4] with 42 layers. As shown in Table 1, "Fully Sup." denotes the fully supervised backbone network. Baseline-A is using only $0.001\%$ initial annotations to train a segmentation model. Compared to "Fully Sup.", the mIoU score drops by 19.8. As comparisons, we further implement two weakly supervised methods for 3D point cloud segmentation, i.e., naive pseudo label generation (Baseline-B) and an existing method $\mathrm{OTOC}^{\dagger}$ [18]. OTOC is originally a weakly supervised method for indoor point cloud segmentation. The pseudo label generation of Baseline-B is to directly update the points with high confidence scores as the pseudo labels for the model training. Baseline-B performs almost comparable with $\mathrm{OTOC}^{\dagger}$ [18], improving Baseline-A by less than $\sim 2$ points. This validates our claim that di + +Table 1. Ablation study on the validation set of SemanticKITTI. SPP: seed point propagation; DSP: dense scene propagation; Temp-GM: temporal matching with greedy matching; Temp-OT: temporal matching with optimal transport matching; SGP: spatial graph propagation. "Fully Sup." denotes the fully supervised (100% point annotations) model. + +
SupervisionmIoU
PointNet [21]100%14.6
PointNet++ [22]100%20.1
SqueezeSegV2 [31]100%39.7
DarkNet21Seg [1]100%47.4
KPconv [25]100%58.8
MinkowskiUNet [4]100%56.2
Baseline-100f(MinkowskiUNet)0.001%39.4
Ours-100f0.001%44.8
Baseline-20f(MinkowskiUNet)0.005%46.4
Ours-20f0.005%52.3
+ +Table 2. Our test results on the semantic segmentation task of SemanticKITTI. Here, we show two results with different initial annotations. For Baseline-100f and Ours-100f, we sample $0.1\%$ points in the first frame per 100 frames $(0.001\%$ points in total). With only $0.001\%$ initial annotations, our model achieves comparable results with some fully supervised results [31]. For Baseline-20f and Ours-20f, we sample $0.1\%$ points in the first frame per 20 frames $(0.005\%$ points in total). The performance of Ours-20f is only $2.9\%$ than our fully supervised baseline. + +
SupervisionmIoU
PointNet++ [22]100%20.1
RandLA-Net [11]100%53.5
KPConv [25]100%55.2
JS3C-Net [34]100%60.2
Backbone100%56.3
Backbone0.001%39.5
Backbone+SPP(Ours)0.001%49.4
Backbone+SPP+DSP(Ours)0.001%52.2
+ +Table 3. The results on the data part 3 of SemanticPOSS. Supervision indicates the percentage of annotations in training. + +rectly applying weakly supervised methods developed for indoor scenes to outdoor point cloud segmentation can not perform well. In contrast to OTOC, Model-B with Temp-OT achieves an absolute mIoU boost of 7.4 over Baseline-A. Our full model (Model-E) increases the mIoU score by 9.4, which is significantly better than OTOC. + +We also compare our temporal matching module with greedy matching (Model-A) and an optimal transport matching (Model-B). We can see that Model-B performs slightly better than Model-A. The reason is that the proportion of generated pseudo labels is only $0.8\%$ , and the low proportion limits the advantage of optimal transport. Further comparing Model-E with Model-D, we can see that the optimal transport matching again outperforms the greedy matching used in the DSP stage by a margin of 1.1. In DSP, the proportion of generated pseudo labels increases to around $20.0\%$ . With more pseudo labels, Temp-OT achieves a substantial improvement of 1.1 in DSP stage. + +Next we validate the two stage design of our method. The performance of our full model (Model-E) achieves an improvement of 2.4 over Model-B, which validates the ef + +![](images/1b79d90b7fcaf5201487e602e29c9275b50e0e1b8d6568aae5c5efbf31dc82d8.jpg) +Figure 7. Qualitative results of generated pseudo labels in stage 1 and stage 2. + +fectiveness of our DSP stage. Comparing Model-C (without SPP stage) with Model-E, we can see that adding the SPP stage leads to an mIoU boost of 4.9. This demonstrates the effectiveness of our SPP stage. + +Results on the test set of SemanticKITTI Table 2 reports the results on SemanticKITTI test set. There are several representative works in fully supervised 3D semantic segmentation. These methods are the upper bounds of our weakly supervised methods and backbone network. Our baseline network is a MinkowskiUNet [4] with 42 layers, which is the same as our backbone network. Compared to the MinkowskiUNet with $100\%$ supervision, the baseline model with $0.001\%$ initial annotations results in an absolute mIoU drop of 16.8. While our framework outperforms the baseline with a considerable margin, bringing an absolute mIoU boost of $5.4\%$ . Then, we evaluate the same model with $0.005\%$ initial annotation. The performance of our baseline model with more initial annotation is $9.8\%$ lower than fully supervised MinkowskiUNet. Our framework outperforms the our baseline model with $5.9\%$ , and reaches the same level of performance as the fully supervised MinkowskiUNet. + +The qualitative results of pseudo label. We randomly select the pseudo labels in different positions of sequences, which is shown in Figure 7. In both $S_{seed}$ and $S_{dense}$ , with the propagation, the number of pseudo labels in $t = 50$ is significantly lower than the number in $t = 1$ , especially for $S_{seed}$ . The frames far from the first frame do not share many annotated regions with the first frame. Therefore, building the long range connection between the annotated areas and distance frames remains a big challenge. + +# 4.2. Evaluation on SemanticPOSS + +We also evaluate our annotation and training approach on SemanticPOSS. Note that there are several target objects without any instance-level annotations. We sample $10\%$ of the super-voxel amounts as the initial annotation of SemanticPOSS. As a result, the annotation in SemanticPOSS is denser than the annotation in SemanticKITTI. The proportion of initial annotation is still around $0.001\%$ . As shown in Table 3, our framework achieves $52.2\%$ on area 3 of SemanticPOSS while the model trained by the initial $0.001\%$ annotations achieves only $39.5\%$ . + +# 5. Conclusion + +We propose a two-stage framework to train a usable model with extremely sparse annotations (0.001% annotated points) for outdoor 3D point cloud sequences. Experimental results demonstrate that our method significantly outperforms the baseline and achieves comparable results with some fully supervised methods. + +# 6. Acknowledgement + +This study is supported under the RIE2020 Industry Alignment Fund - Industry Collaboration Projects (IAF-ICP) Funding Initiative, as well as cash and in-kind contribution from the industry partner(s). This research is also supported by the National Research Foundation, Singapore under its AI Singapore Programme (AISG Award No: AISG-RP-2018-003). This research is also supported by the Ministry of Education, Singapore, under its Academic Research Fund Tier 2 (MOE-T2EP20220-0007) and Tier 1 (RG95/20). + +# References + +[1] Jens Behley, Martin Garbade, Andres Milioto, Jan Quenzel, Sven Behnke, Cyril Stachniss, and Jurgen Gall. Semantickitti: A dataset for semantic scene understanding of lidar sequences. In Proceedings of the IEEE International Conference on Computer Vision, pages 9297-9307, 2019. 1, 2, 3, 6, 7 +[2] Alexandre Boulch, Bertrand Le Saux, and Nicolas Audebert. Unstructured point cloud semantic labeling using deep segmentation networks. 3DOR, 2:7, 2017. 2 +[3] Ran Cheng, Ryan Razani, Ehsan Taghavi, Enxu Li, and Bingbing Liu. 2-s3net: Attentive feature fusion with adaptive feature selection for sparse semantic segmentation network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12547-12556, 2021. 3 +[4] 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. 3, 7, 8 +[5] Tiago Cortinhal, George Tzelepis, and Eren Erdal Aksoy. Salsanext: Fast, uncertainty-aware semantic segmentation of lidar point clouds for autonomous driving, 2020. 2 +[6] Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. Advances in neural information processing systems, 26:2292-2300, 2013. 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 Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2017. 2 +[8] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In 2012 IEEE conference on computer vision and pattern recognition, pages 3354-3361. IEEE, 2012. 3 +[9] Benjamin Graham. Spatially-sparse convolutional neural networks. arXiv preprint arXiv:1409.6070, 2014.3 +[10] Benjamin Graham and Laurens van der Maaten. Submanifold sparse convolutional networks. arXiv preprint arXiv:1706.01307, 2017. 3 +[11] Qingyong Hu, Bo Yang, Linhai Xie, Stefano Rosa, Yulan Guo, Zhihua Wang, Niki Trigoni, and Andrew Markham. Randla-net: Efficient semantic segmentation of large-scale point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11108-11117, 2020. 7 +[12] 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. 3 +[13] Leonid Kantorovitch. On the translocation of masses. Management science, 5(1):1-4, 1958. 5 +[14] Deyvid Kochanov, Fatemeh Karimi Nejadasl, and Olaf Booij. Kprnet: Improving projection-based lidar semantic segmentation. arXiv preprint arXiv:2007.12668, 2020. 3 + +[15] Felix Järemo Lawin, Martin Danelljan, Patrik Tosteberg, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Deep projective 3d semantic segmentation. In International Conference on Computer Analysis of Images and Patterns, pages 95-107. Springer, 2017. 2 +[16] 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. 3 +[17] Yangbin Lin, Cheng Wang, Dawei Zhai, Wei Li, and Jonathan Li. Toward better boundary preserved supervoxel segmentation for 3d point clouds. ISPRS Journal of Photogrammetry and Remote Sensing, 143:39 - 47, 2018. ISPRS Journal of Photogrammetry and Remote Sensing Theme Issue "Point Cloud Processing". 2, 3 +[18] Zhengzhe Liu, Xiaojuan Qi, and Chi-Wing Fu. One thing one click: A self-training approach for weakly supervised 3d semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1726-1736, 2021. 1, 2, 3, 4, 7 +[19] Yancheng Pan, Biao Gao, Jilin Mei, Sibo Geng, Chengkun Li, and Huijing Zhao. Semanticposs: A point cloud dataset with large quantity of dynamic instances. In 2020 IEEE Intelligent Vehicles Symposium (IV), pages 687-693. IEEE, 2020. 1, 2, 3, 6 +[20] Gilles Puy, Alexandre Boulch, and Renaud Marlet. Flot: Scene flow on point clouds guided by optimal transport. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXVIII 16, pages 527-544. Springer, 2020. 4 +[21] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. arXiv preprint arXiv:1612.00593, 2016. 3, 7 +[22] 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. 3, 7 +[23] 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. 3 +[24] 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. 3 +[25] 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. 3, 7 +[26] C Villani. Optimal transport, old and new. notes for the 2005 saint-flour summer school. Grundlehren der mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer, 2008. 3 +[27] Haiyan Wang, Xuejian Rong, Liang Yang, Jinglun Feng, Jizhong Xiao, and Yingli Tian. Weakly supervised semantic segmentation in 3d graph-structured point clouds of wild scenes. arXiv preprint arXiv:2004.12498, 2020. 1 + +[28] 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):1-12, 2019. 3 +[29] Jiacheng Wei, Guosheng Lin, Kim-Hui Yap, Tzu-Yi Hung, and Lihua Xie. Multi-path region mining for weakly supervised 3d semantic segmentation on point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4384-4393, 2020. 1, 2, 3 +[30] Bichen Wu, Alvin Wan, Xiangyu Yue, and Kurt Keutzer. Squeezeseg: Convolutional neural nets with recurrent crf for real-time road-object segmentation from 3d lidar point cloud. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 1887-1893. IEEE, 2018. 2 +[31] Bichen Wu, Xuanyu Zhou, Sicheng Zhao, Xiangyu Yue, and Kurt Keutzer. Squeezesegv2: Improved model structure and unsupervised domain adaptation for road-object segmentation from a lidar point cloud. In 2019 International Conference on Robotics and Automation (ICRA), pages 4376-4382. IEEE, 2019. 2, 7 +[32] Chenfeng Xu, Bichen Wu, Zining Wang, Wei Zhan, Peter Vajda, Kurt Keutzer, and Masayoshi Tomizuka. Squeeze-segv3: Spatially-adaptive convolution for efficient pointcloud segmentation. arXiv preprint arXiv:2004.01803, 2020. 2 +[33] Xun Xu and Gim Hee Lee. Weakly supervised semantic point cloud segmentation: Towards 10x fewer labels. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13706-13715, 2020. 1, 2, 3, 4 +[34] Xu Yan, Jiantao Gao, Jie Li, Ruimao Zhang, Zhen Li, Rui Huang, and Shuguang Cui. Sparse single sweep lidar point cloud segmentation via learning contextual shape priors from scene completion. arXiv preprint arXiv:2012.03762, 2020. 7 +[35] Zhiyuan Zhang, Binh-Son Hua, and Sai-Kit Yeung. Shellnet: Efficient point cloud convolutional neural networks using concentric shells statistics. In Proceedings of the IEEE International Conference on Computer Vision, pages 1607–1616, 2019. 3 \ No newline at end of file diff --git a/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/images.zip b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..94312eec62e60e1ec0af951f4a38d0686dc25275 --- /dev/null +++ b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50d3ecf346ed3508ba5fb97da06c4ad906d7c9fef20092d527b1be959fa02b11 +size 493215 diff --git a/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/layout.json b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..50aa19871ca07768eb7b2870cb071cf5d3a2259f --- /dev/null +++ b/weaklysupervisedsegmentationonoutdoor4dpointcloudswithtemporalmatchingandspatialgraphpropagation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaa2e46483626929575e486bc1c086f32941bb789b8dc5efde1197bfafebf572 +size 424014 diff --git a/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_content_list.json b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6697ee7d96247581f812d55a6bb6dbe2f66ee223 --- /dev/null +++ b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e46002a70228cbac0ce3a93963561f193fb03ae0098ba84d0168bc2d20a11289 +size 80576 diff --git a/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_model.json b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6fa58c254e8ae8fc41f11870f6dd2592b0b1603b --- /dev/null +++ b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fb104d81f1e73c6eafd405ef6dea5e3224f038fc0b639a2a7a78e8f8e4c02b5 +size 103270 diff --git a/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_origin.pdf b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..63467ea2caadaf369bb8f95402fbccc860110c0a --- /dev/null +++ b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/e00ffebf-67dd-412b-9b57-c1322c8acefe_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1353cf7dbe34fd8e7984d413908fd9fbdead074a460934911c426f295ec11cc +size 3055706 diff --git a/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/full.md b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c0fbe656ab3960cb1e949fc5e4b526544d8aa1cf --- /dev/null +++ b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/full.md @@ -0,0 +1,340 @@ +# Weakly Supervised Semantic Segmentation by Pixel-to-Prototype Contrast + +Ye Du, Zehua Fu, Qingjie Liu* Yunhong Wang +State Key Laboratory of Virtual Reality Technology and Systems, Beihang University, Beijing, China +Hangzhou Innovation Institute, Beihang University + +{duyee, zehua_fu, qingjie.liu, yhwang}@buaa.edu.cn + +# Abstract + +Though image-level weakly supervised semantic segmentation (WSSS) has achieved great progress with Class Activation Maps (CAMs) as the cornerstone, the large supervision gap between classification and segmentation still hampers the model to generate more complete and precise pseudo masks for segmentation. In this study, we propose weakly-supervised pixel-to-prototype contrast that can provide pixel-level supervisory signals to narrow the gap. Guided by two intuitive priors, our method is executed across different views and within per single view of an image, aiming to impose cross-view feature semantic consistency regularization and facilitate intra(inter)-class compactness(dispersion) of the feature space. Our method can be seamlessly incorporated into existing WSSS models without any changes to the base networks and does not incur any extra inference burden. Extensive experiments manifest that our method consistently improves two strong baselines by large margins, demonstrating the effectiveness. Specifically, built on top of SEAM, we improve the initial seed mIoU on PASCAL VOC 2012 from $55.4\%$ to $61.5\%$ . Moreover, armed with our method, we increase the segmentation mIoU of EPS from $70.8\%$ to $73.6\%$ , achieving new state-of-the-art. + +# 1. Introduction + +Benefiting from large-scale pixel-level annotations, semantic segmentation [38] has achieved remarkable progress in recent years. However, obtaining such precise pixelwise annotations is laborious and time-consuming. To relieve this burden, many works resort to weakly supervised semantic segmentation (WSSS) that aims at learning segmentation models from weak labels such as image tags [2, 21, 22, 27, 32, 53, 62], bounding boxes [39], points [4] and scribbles [47]. Among them, image-level WSSS that requires only image tags has been extensively studied in the + +![](images/fefb90714f1d0e7eb604736ee59b8a495855fcd33def2d4d8d828b1f513deeeb.jpg) +Figure 1. Initial seed quality vs. segmentation performance. Our method enables consistent performance improvements over state-of-the-arts, i.e., SEAM [53] and EPS [32], without bringing any changes to the base networks during inference. + +computer vision community. + +Image-level WSSS is a challenging task since the image tags indicate only the existence of object categories and do not inform accurate object locations that are essential for semantic segmentation. To tackle this issue, Class Activation Maps (CAMs) [67] that identify which parts of the image contribute the most to the classification have been widely adopted to roughly estimate the regions of the target objects. The regions, also known as seeds, are used to generate pseudo ground truths for training segmentation models. However, CAMs only cover parts of objects, resulting in inaccurate and incomplete supervision. This issue is rooted in the supervision gap between the classification and the segmentation tasks. Specifically, classification networks supervised by image tags tend to focus on the most discriminative regions of objects for achieving a better performance of correctly tagging the image, while the segmentation task requires pixel-level supervision to assign a category to each pixel within the whole image. Narrowing down the super + +vision gap is crucial for WSSS, motivating us to explore pixel-wise supervisory signals that are complementary to image tags. + +Inspired by the compelling contrastive self-supervised algorithms [20], we develop a novel weakly-supervised pixel-to-prototype contrastive learning method for WSSS, which can provide pixel-level supervision to improve the quality of CAMs and the performance of segmentation. Our method is based on two implicit but valuable priors: (i) features should retain semantic consistency across different views of an image; and (ii) pixels sharing the same label should have similar representations in the feature space, and vice versa. With these priors as guidelines, the pixel-to-prototype contrast is executed across different views and within per single view of each image, respectively, leading us to the cross-view contrast and intra-view contrast. + +Our method is instantiated with a unified pixel-to-prototype contrastive learning formulation, which shapes the pixel embedding space through a prototype-based metric learning methodology. The core idea is pulling pixels together to their positive prototypes and pushing them away from their negative prototypes to learn discriminative dense visual representations. In our method, a prototype is defined as a representative embedding of a category. It is estimated from pixel-wise feature embeddings with the top activations in the CAMs. During learning, the polarity of each prototype is determined by the pseudo label of each pixel coupled to it in the current mini-batch. However, when generating pseudo masks from CAMs, there emerges a tricky problem: the over-activated and under-activated regions may corrupt the contrastive learning, especially the intra-view contrast. To alleviate this issue, we adopt two strategies: semi-hard prototype mining and hard pixel sampling to reduce the inaccurate contrasts as well as better utilize hard samples. + +Recently, Wang et al. [53] propose SEAM to mitigate the supervision gap issue with a CAM equivariance constraint that enforces the CAMs to have the same spatial transformation as the input images. Our method has two major differences. Firstly, our method imposes regularizations to pixel-level features, enforcing the pixel embedding to be similar to the positive prototype and dissimilar to negative prototypes, while SEAM calculates consistency loss between CAMs of different views of the same image. Moreover, both cross-view and intra-view regularizations are considered in our work, while SEAM only integrates equivariant regularization across views. + +Our method can be seamlessly incorporated into existing WSSS models without any changes to the base networks. It requires only additional common projectors during training and does not incur an extra inference burden. Experiments demonstrate that our method improves state-of-the-art models by large margins. As shown in Fig. 1, our method consistently improves two strong baseline models + +w.r.t. both initial seed qualities and segmentation performance. We also validate our method through an extensive ablation study, where we find that each component contributes substantial performance improvements. + +To summary, our main contributions are as follows: + +- We propose weakly-supervised pixel-to-prototype contrast for WSSS. It enables the pixels to receive supervision from the reliable prototype of each class under the WSSS setting, which substantially narrows the gap between classification and segmentation. +- We propose to perform pixel-to-prototype contrastive learning both within a view and across different views of an image, which significantly improves the qualities of CAMs and the subsequent segmentation masks. +- Our method shows impressive results, surpassing baseline models by large margins and achieving the top performance on the standard benchmark. + +# 2. Related Work + +Image-level WSSS. WSSS with image-level labels has achieved significant progress under the pipeline of first generating pseudo masks then training a semantic segmentation network. Recent methods for WSSS rely on CAMs [67] to inform object locations by discovering image pixels that are informative for classification. However, CAMs can only highlight the most discriminative regions of objects, thus offering incomplete pseudo masks. Substantial efforts have been devoted to resolving this issue. They intend to complete the CAMs by enforcing networks to pay more attention to non-discriminative object regions using strategies such as region erasing [18, 54], region supervision [25], and region growing [19, 43]. Some other works refine the CAM by an iterative solution. For instance, PSA [2] and IRN [1] propose to propagate local responses to nearby areas which belong to the same semantic entity via random walk. + +The inherent reason for the above issue is due to the supervision gap between classification and segmentation. Noticing this, many researchers explore to use additional supervision, such as multi-level feature maps [26], accumulated feature maps [21], cross-image semantics [15, 45], sub-categories [5], saliency maps [32, 60], and CAM consistency constraints [53], to narrow the gap. These approaches are simple but achieve encouraging performance. + +Contrastive Learning. Contrastive learning (CL) [20] has shown great potential in learning discriminative representations without labels. The core idea of CL is to use the InfoNCE loss [40] to measure how well a model can classify a feature representation from a set of unrelated negative samples. For example, [58] learns feature representations at the instance level with a memory bank, where they try to maximally scatter instance embeddings over a unit sphere. + +![](images/95e846b04010079dc63aa82da615cad73b08e508aa198bce175ec30c4c617e36.jpg) +Figure 2. The overall pipeline of our proposed pixel-to-prototype contrast for WSSS. $A(\cdot)$ is a spatial transformation for augmenting training samples. $f_{CAM}$ , $f_{proj}$ are implemented by $1 \times 1$ convolutional layer followed by ReLU. $f_{est}$ represents the prototype estimation process and $p^{\{S,T\}}$ represent the generated prototypes. L2 denotes per-pixel L2 normalization. The argmax function is conducted per-pixel along the channel dimension and returns the index of the maximum value. + +MoCo [17] matches an encoded feature to a dynamic dictionary which evolves with a momentum updating strategy. SimCLR [9] presents a simple framework that engenders negative samples from large mini-batches. + +Further, Khosla et al. [24] extend the self-supervised contrastive approach to the fully-supervised setting. A supervised contrastive loss is put forward to effectively leverage label information, enabling intra-class compactness and inter-class dispersion of the feature space. Wang et al. [52] propose dense contrastive learning that works at pixel-level and achieves superior performance than MoCo on downstream dense prediction tasks. In addition, Li et al. [33] propose to facilitate contrastive learning with clustering. They propose ProtoNCE loss that absorbs the advantages of contrastive learning and cluster-based unsupervised representation method [48], showing substantial improvements on several benchmarks. + +Contrastive Learning in Segmentation. Recently, many studies leverage contrastive learning to promote image segmentation. These works utilize pixel-level or patch-level contrastive learning to improve semantic segmentation under fully supervised [50], semi-supervised [3], weakly-supervised [22], and unsupervised [49] settings. Caron et al. [22] improve WSSS by pixel-to-segment contrast, where they assume the segments are known in advance. In their work, they use SEAM to generate CAMs. Instead, we build + +on top of existing WSSS methods and directly produce better quality seeds for segmentation. Recently, some studies apply contrastive learning to domain adaptation [35] and few-shot [36] semantic segmentation, also showing impressive results. + +Consistency Regularization. Consistency regularization is a hot topic in the field of semi-supervised semantic segmentation. The idea is to enforce semantic or distribution consistency between various perturbations, such as image augmentation [23] and network perturbation [10, 64]. For example, Ke et al. [23] enforce cross probability consistency; Chen et al. [10] impose consistency regularization on two networks perturbed with different parameters for the same input image. The common goal of such methods is to construct appropriate supervisions by imposing consistency regularization, which greatly improves segmentation performance of semi-supervised segmentation. However, this idea is rarely studied in the case of weakly supervised segmentation. Our proposed cross-view pixel-to-prototype contrast can be regarded as imposing feature semantic consistency regularization across different views of each image. + +# 3. Methodology + +Our method can be interpreted as a regularization term that is adaptable to any existing WSSS framework without + +changing the inference procedure. The overall loss function for training such a model is the linear combination of the cross-view contrastive loss $\mathcal{L}^{\mathrm{cross}}$ and the intra-view contrastive loss $\mathcal{L}^{\mathrm{intra}}$ : + +$$ +\mathcal {L} ^ {\text {c o n t r a s t}} = \alpha \mathcal {L} ^ {\text {c r o s s}} + \beta \mathcal {L} ^ {\text {i n t r a}} \tag {1} +$$ + +where $\alpha, \beta$ are two positive constants. + +In this section, we first review how to generate CAMs, then introduce our proposed pixel-to-prototype contrast and how to estimate the prototypes, and finally elaborate on applying contrastive learning across different views and within per single view of each image. The framework of our method is illustrated in Fig. 2. Following the common practice, we first generate pixel-wise pseudo masks with our proposed method, then use them to train a DeepLab [6, 8] segmentation network. + +# 3.1. Preliminary + +We begin with a brief review on how CAMs are generated by visualization technique. Given a CNN (e.g. ResNet38 [57]), we denote the last convolutional feature maps by $\pmb{f} \in \mathbb{R}^{D \times HW}$ , where $HW$ is the spatial size and $D$ is the channel dimension. A Global Average Pooling (GAP) operation is applied to aggregate the feature maps. Next, a fully connected layer with parameters $\pmb{w} \in \mathbb{R}^{C \times D}$ is applied to retrieve the class scores. Here, $C$ is the number of classes. Formally, the score for class $c$ is obtained as + +$$ +s _ {c} = \frac {1}{H W} \sum_ {j = 1} ^ {D} \boldsymbol {w} _ {c, j} \sum_ {i} \boldsymbol {f} _ {j, i} \tag {2} +$$ + +After that, the CAM $m_{c}$ for class $c$ is given by: + +$$ +\boldsymbol {m} _ {c} = \operatorname {R e L U} \left(\sum_ {j = 1} ^ {D} \boldsymbol {w} _ {c, j} \boldsymbol {f} _ {j,:}\right) \tag {3} +$$ + +It is worth noticing that a theoretically equivalent and much convenient way to compute CAMs is directly selecting the feature maps of the last convolutional layer [66]. Given the feature maps $\pmb{f}$ , we can add an additional convolutional layer which consists of $C$ kernels with a size of $1 \times 1$ and stride 1 on top of $\pmb{f}$ to obtain $\pmb{f}' \in \mathbb{R}^{C \times HW}$ . The score for class $c$ is then computed by applying GAP to $\pmb{f}'$ . The maps $\pmb{f}'$ followed by ReLU function is directly used as the CAMs. In this paper, we follow this way for computing the CAMs. + +# 3.2. Pixel-to-Prototype Contrast + +Given the CAM of an image, we use a pixel-wise argmax function to generate the pseudo mask $\pmb{y}$ , i.e., $\pmb{y} = \operatorname{argmax}(\pmb{m})$ , which determines the category of each pixel. For each category, there exists a representative embedding, + +![](images/f9072494592e1b9b251221ce2867d31f1d7bd5f7b52d08dbc93a33fc6ae36af2.jpg) +Figure 3. Illustration of the pixel-to-prototype contrast in the projected feature space. Pixel embeddings (circles) and prototypes (squares) of the same color are of the same category. + +i.e., the prototypes, denoted by $\mathcal{P} = \{\pmb{p}_c\}_{c=1}^C$ . Our goal is to learn discriminative feature embedding for each pixel aided by contrastive learning in a projected feature space. The idea is shown in Fig. 3. We first obtain pixel-wise projected feature $\pmb{v}_i \in \mathbb{R}^{128}$ by a projector, which is implemented with a $1 \times 1$ convolutional layer followed by ReLU. Then, given $\pmb{v}_i$ and $\mathcal{P}$ , the pixel-to-prototype contrast $\mathcal{F}(\cdot)$ holds the following formulation: + +$$ +\mathcal {F} (\boldsymbol {v} _ {i}; \boldsymbol {y} _ {i}; \mathcal {P}) = - \log \frac {\exp \left(\boldsymbol {v} _ {i} \cdot \boldsymbol {p} _ {\boldsymbol {y} _ {i}} / \tau\right)}{\sum_ {\boldsymbol {p} _ {c} \in \mathcal {P}} \exp \left(\boldsymbol {v} _ {i} \cdot \boldsymbol {p} _ {c} / \tau\right)} \tag {4} +$$ + +where $\pmb{y}_i\in [1,2,\dots,C]$ is the pseudo label of pixel $i$ , which determines the positive prototype $\pmb{p}_{\pmb{y}_i}$ . $\tau$ is the temperature parameter, which is set to 0.1 following a common practice. + +# 3.3. Prototype Estimation + +We further describe how we generate the prototypes. A possible solution is to mine the pixel-level semantic structure through clustering, as done in unsupervised semantic segmentation [11]. However, in the case of weakly supervised setting, this approach cannot make full use of image tag information and usually requires over-clustering to achieve better performance [5, 48]. The resulting clusters generally cannot well match the true categories. + +In this work, we treat the pixel-wise CAM values as the confidences and propose to estimate the prototypes from pixel-wise feature embeddings that are with the highest confidences. Specifically, for all pixels assigned to class $c$ , we empirically choose the ones with top $K$ confidences to estimate the prototype. The prototype $p_c$ is computed as a weighted average of the projected pixel-wise embeddings: + +$$ +\boldsymbol {p} _ {c} = \frac {\sum_ {i \in \Omega_ {c}} \boldsymbol {m} _ {c , i} \boldsymbol {v} _ {i}}{\sum_ {i ^ {\prime} \in \Omega_ {c}} \boldsymbol {m} _ {c , i ^ {\prime}}} \tag {5} +$$ + +where $\Omega_c$ is the collection of top $K$ pixels of class $c$ , and each pixel $i$ has CAM value $\pmb{m}_{c,i}$ . A subsequent L2 nor + +malization is applied to each prototype. Here, $K$ is a hyperparameter and a smaller $K$ means higher confidence for computing the prototype. + +Moreover, in order to capture the global context of the entire dataset, we compute prototypes across the training batch, that is, choosing pixels with the highest CAM values in the whole training batch. + +# 3.4. Cross-view Contrast + +Given the formulation of pixel-to-prototype contrastive loss shown in Eq. (4), we describe in detail how we apply cross-view contrast under the guidance of the cross-view semantic consistency. Specifically, given an image as the source view $S$ , we generate a target view $T$ by a spatial transformation $A(\cdot)$ , as shown in Fig. 2. Then, the two views are encoded using a pre-trained CNN backbone, which are further processed to obtain two CAMs. We apply the same transformation $A(\cdot)$ to the feature map and the CAM of the source view, with the same purpose as [53]. + +Cross Prototype Contrast. Considering that there should be semantic consistency between the two views, the prototype from one view can serve as supervisory signal to another view, and vice versa. Precisely, given a pixel $i$ with its pseudo label $\pmb{y}_i\in [1,2,\dots,C]$ and the projected feature embedding $\pmb{v}_i$ , the prototypes $\mathcal{P}' = \{\pmb{p}_c'\}_{c = 1}^C$ from another view are borrowed to impose regularization to the current view. With the definition of pixel-to-prototype contrast shown in Eq. (4), the cross prototype contrastive loss is calculated by + +$$ +\mathcal {L} ^ {\mathrm {c p}} = \frac {1}{| I |} \sum_ {i \in I} \mathcal {F} \left(\boldsymbol {v} _ {i}; \boldsymbol {y} _ {i}; \mathcal {P} ^ {\prime}\right) \tag {6} +$$ + +where $I$ denotes the whole image and $|\cdot|$ represents the cardinality. + +Cross CAM Contrast. Furthermore, the CAM from one view can be utilized to impose consistency regularization to another view as well. The CAM determines the pseudo mask of a view. Thus, for a pixel $i$ with prototypes $\mathcal{P}$ from its own view, we utilize the pseudo label $\pmb{y}_i^{\prime}$ from another view to determine the positive prototype and negative prototypes. Analogously, the cross CAM contrastive loss can be written as: + +$$ +\mathcal {L} ^ {\mathrm {c c}} = \frac {1}{| I |} \sum_ {i \in I} \mathcal {F} \left(\boldsymbol {v} _ {i}; \boldsymbol {y} _ {i} ^ {\prime}; \mathcal {P}\right) \tag {7} +$$ + +It is noticeable that the cross-view contrast is symmetrical, since both source view and target view can serve as the current view for computing $\mathcal{L}^{\mathrm{cp}}$ and $\mathcal{L}^{\mathrm{cc}}$ . Eventually, the respective $\mathcal{L}^{\mathrm{cp}}$ and $\mathcal{L}^{\mathrm{cc}}$ of the two views are added together as the total cross-view contrastive loss $\mathcal{L}^{\mathrm{cross}}$ . For simplicity, we only present the formulation of one view as follows: + +$$ +\mathcal {L} ^ {\text {c r o s s}} = \mathcal {L} ^ {\mathrm {c p}} + \mathcal {L} ^ {\mathrm {c c}} \tag {8} +$$ + +# 3.5. Intra-view Contrast + +Intra-view Contrast. According to the second hypothesis of intra-class compactness and inter-class dispersion, we further propose intra-view contrast that is conducted within per single view of each image. As opposed to the cross-view contrast, for a pixel $i$ with pseudo label $\pmb{y}_i$ , the intraview contrast takes prototypes $\mathcal{P}$ from the current view to perform pixel-to-prototype contrastive learning: + +$$ +\mathcal {L} ^ {\text {i n t r a}} = \frac {1}{| I |} \sum_ {i \in I} \mathcal {F} \left(\boldsymbol {v} _ {i}; \boldsymbol {y} _ {i}; \mathcal {P}\right) \tag {9} +$$ + +The intra-view contrast is conducted on both views, and we do not list the symmetrical form in Eq. (9) for simplicity. However, we experimentally find that trivially introducing $\mathcal{L}^{\mathrm{intra}}$ could cause performance degeneration. The reason is that there are no precise pixel-wise annotations in the case of weakly supervised setting, the pseudo label $y_{i}$ assigned to pixel $i$ could be inaccurate, resulting in inaccurate contrasts. Motivated by the hard example mining strategies in contrastive learning [42, 50], we alleviate this issue by introducing semi-hard prototype mining. Moreover, we also adopt a hard pixel sampling strategy to focus more on pixel samples hard for segmentation. + +Semi-hard Prototype Mining. For a pixel $i$ , the assigned label $\pmb{y}_i$ determines the positive prototype $\pmb{p}_{\pmb{y}_i}$ and negative prototypes $\mathcal{P}_N = \mathcal{P} \backslash \pmb{p}_{\pmb{y}_i}$ . Inspired by [50], rather than directly using $\mathcal{P}_N$ , we adopt semi-hard prototype mining: for each pixel, we first collect the top $60\%$ hardest negative prototypes, from which we choose $50\%$ as the negative samples to compute the intra-view contrastive loss. + +Here, a remaining question is how to define 'harder' prototypes. Following [50], for pixel $i$ , we view the prototypes except $\pmb{p}_{\pmb{y}_i}$ with dot products to pixel feature embedding $\pmb{v}_i$ closer to 1 to be harder, i.e., prototypes that are similar to the pixel. + +Hard Pixel Sampling. We also introduce hard pixel sampling to make better use of hard pixels. Specially, instead of using all pixels belonging to a prototype $\pmb{p}_c$ to calculate the intra-view contrastive loss, we adopt a per-class pixel sampling strategy: for each class, half of the pixels are randomly sampled and half are the hard ones. + +Unlike [50], in this part, we define 'harder' pixels without ground truth during training. For a prototype $\pmb{p}_c$ , we view the belonging pixels with dot products to $\pmb{p}_c$ closer to -1 to be harder, i.e., pixels that are dissimilar to the prototype. The definition of 'harder' pixels is exactly the opposite of 'harder' prototypes, as the pixel far away from the corresponding prototype requires more attention to be pulled closer to the prototype in order to improve intra-class compactness. + +We experimentally prove that equipped with the two strategies, we mitigate the effect of incorrect contrasts and + +make better use of hard examples, which further improves performance. + +# 4. Experiment + +# 4.1. Datasets and Baselines + +Datasets. We evaluate our proposed method on PASCAL VOC 2012 segmentation dataset [12], the standard benchmark for WSSS. The dataset consists of 21 classes including a background, with 1,464, 1,449, and 1,456 images for train, validation, and test set, respectively. Following the common practice in semantic segmentation, we use the augmented train set that consists of 10,582 images [16] for training. We report the mean Intersection-over-Union (mIoU) for evaluation, and the mIoU on the VOC test set is obtained from the official evaluation server. + +Baselines. We choose two strong models, SEAM [53] and EPS [32] as our baselines. SEAM proposes a CAM equivariant regularization to narrow the supervision gap. EPS utilizes saliency maps as an additional supervision. They achieve state-of-the-art performance for WSSS. We build on top of these models to evaluate the effectiveness of our proposed method. + +# 4.2. Implementation Details + +Following SEAM and EPS, ResNet38 is adopted as the backbone network with output stride equals 8. The images are randomly rescaled to the range of [448,768] by the longest edge and then cropped by $448 \times 448$ as the input size of the network following [53]. We use rescale transformation that resizes the source image to a size of $128 \times 128$ , keeping the multiple of the output stride. This is slightly different from SEAM, but the rescaling degree is nearly the same. The CNN backbone and projector share weights between the two views. The projected features used for contrastive loss have a dimension of 128. When imposing our proposed contrastive regularization $\mathcal{L}^{contrast}$ to SEAM and EPS, we set $\alpha = 0.1$ and $\beta = 0.1$ in order to keep balance with classification loss. We follow the training and inference procedure in SEAM and EPS, including the training epoch, learning rate, learning rate decay policy, weight decay rate, and optimizer. + +After generating the pseudo masks, we train three semantic segmentation networks to make fair comparisons with the baseline models. Concretely, DeepLab-LargeFOV with ResNet38 is trained to make comparison with SEAM; DeepLab-LargeFOV and DeepLab-ASPP with ResNet101 are trained to make comparison with EPS, respectively. During inference, we adopt multi-scale and flip operations as done in previous works. Standard dense CRF is used as a post-processing procedure to refine the final segmentation masks. + +Table 1. Evaluation (mIoU $(\%)$ ) of the initial seed (Seed), the seed with CRF (+CRF), and the pseudo mask (Mask) refined by PSA [2] on PASCAL VOC 2012 train set. + +
MethodVenueSeed+CRFMask
PSA [2]CVPR'1848.0-61.0
Chang et al. [5]CVPR'2050.955.363.4
CONTA [62]NIPS'2056.265.466.1
EDAM [56]CVPR'2152.858.268.1
AdvCAM [31]CVPR'2155.662.168.0
ECS-Net [46]ICCV'2156.658.6-
OC-CSE [28]ICCV'2156.062.866.9
CPN [63]ICCV'2157.4--
CDA [44]ICCV'2158.4-66.4
Improvement over baseline:
SEAM [53]CVPR'2055.456.863.6
Ours w/ SEAM-61.5+6.164.0+7.269.2+5.6
EPS [32]CVPR'2169.571.471.6
Ours w/ EPS-70.5+1.073.3+1.973.3+1.7
+ +Table 2. Evaluation (mIoU $(\%)$ ) of the initial seed (Seed), the seed with CRF (+CRF), and the pseudo mask (Mask) refined by IRN [1] on PASCAL VOC 2012 train set. + +
MethodVenueSeed+CRFMask
IRN [1]CVPR'1948.854.366.3
MBMNet [37]MM'2050.2-66.8
CONTA [62]NIPS'2048.8-67.9
AdvCAM [31]CVPR'2155.662.169.9
Ours w/ SEAM-61.564.070.1
+ +# 4.3. Seed and Pseudo Mask Evaluation + +To verify the effectiveness of our method, we report the quantitative qualities of both initial seeds and pseudo masks on VOC. Following SEAM, the seeds are obtained by directly applying a range of thresholds to separate the foregrounds and backgrounds in the CAMs. The results are shown in Tab. 1. As can be seen, we improve SEAM by $6.0\%$ and $7.2\%$ mIoU on initial seed and seed+CRF, respectively, showing excellent performance. Figure 4 indicates that the CAMs generated by our method not only cover the target objects completely but also show accurate boundaries. Our generated CAMs are more accurate to match the ground truth segmentation masks than the baseline. Moreover, compared with the recent methods CONTA [62], CPN [63], and CDA [44] that built on top of SEAM, our method outperforms them by large margins. A considerable improvement is also observed when applying our method to EPS. Precisely, our method with EPS achieves $73.3\%$ mIoU on seed+CRF, achieving state-of-the-art performance. + +A typical pipeline in WSSS is refining the initial seed by region growing with a random walk strategy. Most methods refine their initial seeds with PSA [2] or IRN [1]. Therefore, we also compare the qualities of the refined pseudo masks + +![](images/5e93dfeb4985411df0a4202ef26df1a602debfd11b52032cf2026417c3d8aa1e.jpg) +(a) + +![](images/8a53fb9b7e06777b05fd9da9f3c509069bd61ac11647a9cb62466c7b5bf00bc5.jpg) +(b) + +![](images/16e65c2a1634708136b39b2705a80a2b70ce89ad16f41a491e8113581b3be468.jpg) +(c) + +![](images/80af3c888e24a5085fab1867a967e4267f3893a18161a69251d4e3e8da8a676a.jpg) +(d) +Figure 4. The visualization of CAMs. (a) Images. (b) GT masks. (c) CAMs produced by SEAM. (d) CAMs produced by our method. Our method generates better CAMs than SEAM in terms of both accuracy and completeness. + +obtained by our method and other recent techniques. The 5th column of Tab. 1 shows the mIoU performance on the pseudo mask refined by PSA. It can be observed that our method surpasses existing methods by large margins. Note that the seed quality of EPS with our method is high, we do not further refine it with PSA. Instead, the seed+CRF is directly supplied as the pseudo mask. + +Table 2 compares the performance between our method (with SEAM) and other counterparts refined using IRN. Our method performs remarkably better than the best performing counterpart AdvCAM [31], exceeding it by a large margin of $5.9\%$ mIoU on the initial seed. As shown in the table, the pseudo mask performance gain of AdvCAM comes mainly from the refining procedure with IRN, while ours relies more on the high quality initial seed generated by our method. Nevertheless, our method achieves state-of-the-art performance under the IRN refinement settings. + +# 4.4. Segmentation Performance + +Generally, the generated pseudo masks are used to train a semantic segmentation network in a fully supervised manner. To make a fair comparison, we report DeepLab-LargeFOV and Deeplab-ASPP segmentation performance of our method and compare them with existing methods in Tab. 3 and Tab. 4, respectively. The SEAM trains a DeepLab-LargeFOV network with ResNet38 as the backbone, achieving $64.5\%$ and $64.7\%$ mIoU on PASCAL VOC val and test sets. With the same settings except equipped with our method, we increase the segmentation mIoU by $3.2\%$ and $1.7\%$ on val and test sets, showing substantial improvement. Moreover, our method with SEAM even surpasses many models with more powerful backbones. With DeepLab-LargeFOV and ResNet101, EPS equipped with our method achieves $72.3\%$ and $73.5\%$ mIoU on PASCAL + +Table 3. Segmentation performance (mIoU $(\%)$ ) on Pascal VOC val and test sets using DeepLab-LargeFOV. The best result is marked in bold and the improvements over baseline model is marked in red. $S$ means method using saliency maps. + +
MethodBackboneSvaltest
SEC [27] ECCV'16VGG16✓50.751.1
MDC [55] CVPR'18VGG16✓60.460.8
MCOF [51] CVPR'18ResNet101✓60.361.2
SeeNet [18] NIPS'18ResNet101✓63.162.8
Lee et al. [30] ICCV'19ResNet101✓66.567.4
OAA+ [21] ICCV'19ResNet101✓65.266.4
CIAN [15] AAAT'20ResNet101✓64.365.3
MCIS [45] ECCV'20ResNet101✓66.266.9
ICD [13] CVPR'20ResNet10167.868.0
ECS-Net [46] ICCV'21ResNet3866.667.6
Xu et al. [59] ICCV'21ResNet38✓69.068.6
SEAM [53] CVPR'20ResNet3864.565.7
Ours w/ SEAMResNet3867.7+3.267.4+1.7
EPS [32] CVPR'21ResNet101✓71.071.8
Ours w/ EPSResNet101✓72.3+1.373.5+1.7
+ +Table 4. Segmentation performance (mIoU (\%) on Pascal VOC val and test sets using DeepLab-ASPP. The best result is marked in bold and the improvements over baseline model is marked in red. $S$ means method using saliency maps. + +
MethodBackboneSvaltest
PSA [2] CVPR'18ResNet3861.763.2
IRN [1] CVPR'19ResNet5063.564.8
FlickrNet [29] CVPR'19ResNet101✓64.965.3
Zhang et al. [65] ECCV'20ResNet50✓66.666.7
Fan et al. [14] ECCV'20ResNet101✓67.266.7
Chen et al. [7] ECCV'20ResNet10165.766.6
Chang et al. [5] CVPR'20ResNet10166.165.9
CONTA [62] NIPS'20ResNet10166.166.7
SPML [22] ICLR'21ResNet10169.571.6
AdvCAM [31] CVPR'21ResNet10168.168.0
EDAM [56] CVPR'21ResNet101✓70.970.6
Yao et al. [61] CVPR'21ResNet101✓68.368.5
DRS [25] AAAI'21ResNet10171.271.4
Li et al. [34] AAAI'21ResNet101✓68.268.5
WSGCN [41] ICME'21ResNet10168.769.3
CDA [44] ICCV'21ResNet3866.166.8
CPN [63] ICCV'21ResNet3867.868.5
EPS [32] CVPR'21ResNet101✓70.970.8
Ours w/ EPSResNet101✓72.6+1.773.6+2.8
+ +VOC val and test sets. In addition, we train a DeepLab-ASPP network with our generated pseudo masks. As shown in Tab. 4, our method outperforms all existing methods, achieving new state-of-the-art performance on PASCAL VOC 2012 benchmark. We present some segmentation results in Fig. 5, from which we can find that our method works well for images of both simple and challenging scenes. + +![](images/b92efc1967bc0efd91ff23d0155c4190e0367cfd29bad706c04100d65d35bc03.jpg) +(a) + +![](images/f2e87980c62facfc363b46e8ea3a8728e56ad5e6450da561382b05db7397b8d8.jpg) +(b) + +![](images/595bb98774c706104ed89650ac0bf5cfbc084193fb2e6252450a226cb7f5a590.jpg) +(c) +Figure 5. Qualitative segmentation results on PASCAL VOC 2012 val set. (a) Images. (b) GT masks. (c) Segmentation masks predicted by DeepLab-ASPP (Ours w/ EPS). + +Table 5. Ablation performance (mIoU %) of our proposed method. + +
Methodtraintrain+CRFvalval+CRF
CAM47.4352.40--
SEAM (baseline)55.4156.8352.5453.70
Ablations:
+ Cross Prototype59.0861.9855.7558.33
+ Cross CAM60.3563.1057.3359.68
+ Intra View59.80-56.97-
+ Proto Mining60.9163.4058.2060.62
+ Pixel Sampling61.5464.0558.4160.81
Improvement+6.13+7.22+5.87+7.11
+ +# 4.5. Ablation Study + +To analyse how each component in our proposed method helps to improve WSSS, we present extensive ablation studies in this section. Here, all experiments are done with SEAM on PASCAL VOC 2012 dataset. + +Effectiveness of each component. First, we demonstrate the effectiveness of each component. The results are shown in Tab. 5. As can be seen, with the two cross-view semantic consistency regularization term, i.e. cross prototype contrast and cross CAM contrast, we improve the mIoU of SEAM from $55.41\%$ to $60.35\%$ on the train set, and from $52.54\%$ to $57.35\%$ on the val set. Furthermore, after applying the intra-view pixel-to-prototype contrast, we observe a slight performance drop on both train and val sets. We adopt two sample mining strategies to mitigate this issue, by which we increase the mIoU by $1.74\%$ and $1.44\%$ . Finally, with all these components, we increase the mIoU of SEAM by $6.13\%$ and $5.87\%$ on the train and val sets, showing significant improvements. + +Choices of $K$ . We empirically choose $K$ pixel embeddings per-class in a mini-batch with the highest CAM values to evaluate the prototype. A smaller $K$ indicates to use more confident pixels for estimation, while a larger $K$ could + +Table 6. Effects of $K$ for estimating the prototypes of our method. The results (mIoU (%)) are reported on PASCAL VOC 2012 train set. $K = 0$ means the SEAM baseline without contrast. + +
K048163264
mIoU55.4160.0260.8761.0861.5460.55
+ +Table 7. Ablations for more spatial transformations. The results (mIoU $(\%)$ ) are reported on PASCAL VOC 2012 train set. + +
RescaleFlipRotationTranslationmIoU
47.43
✓61.54
✓✓61.63
✓✓58.57
✓✓59.31
+ +probably incur some wrong pixels from other categories. We conduct experiments to analyse how $K$ affects the initial seed performance. As shown in Tab. 6, we test a wide range of $K$ . The results show that our proposed method is robust to the selection of $K$ . Eventually, we set $K = 32$ with the best performance. + +Spatial transformation. Similar to SEAM, the transformation in our method can be any spatial transformation. In our implementation, we rescale the source image of size $448 \times 448$ to $128 \times 128$ to get the target view in order to make sure the input size of the target view is a multiple of the output stride. This setting is slightly different from SEAM but remains almost identical to it. Following SEAM, we also adopt three transformations to evaluate our method: random rotation in $[-20, 20]$ degrees, translation by 16 pixels and horizontal flip. The results are shown in Tab. 7. It can be seen that simply incorporating different transformations is not much effective, a similar observation to SEAM. + +# 5. Conclusion + +In this paper, we propose weakly-supervised pixel-to-prototype contrast that provides pixel-level supervisory signals to narrow the supervision gap and improve image-level WSSS. The pixel-to-prototype contrast is performed on both cross-view and intra-view of an image, which imposes cross-view feature semantic consistency regularization and facilitates intra(inter)-class compactness(dispersion) of the feature space. Extensive experiments validate the superiority of our method. In future, we will explore more prototype estimation ways and more application scenarios of our method, such as fully-supervised and semi-supervised segmentation. + +Acknowledgement. The work was supported by the National Key Research and Development Program of China under Grant 2018YFB1701600, National Natural Science Foundation of China under Grant U20B2069. + +# References + +[1] Jiwoon Ahn, Sunghyun Cho, and Suha Kwak. Weakly supervised learning of instance segmentation with inter-pixel relations. In CVPR, 2019. 2, 6, 7 +[2] Jiwoon Ahn and Suha Kwak. Learning pixel-level semantic affinity with image-level supervision for weakly supervised semantic segmentation. In CVPR, 2018. 1, 2, 6, 7 +[3] Inigo Alonso, Alberto Sabater, David Ferstl, Luis Montesano, and Ana C. Murillo. Semi-supervised semantic segmentation with pixel-level contrastive learning from a class-wise memory bank. In ICCV, 2021. 3 +[4] Amy Bearman, Olga Russakovsky, Vittorio Ferrari, and Li Fei-Fei. What's the point: Semantic segmentation with point supervision. In ECCV, 2016. 1 +[5] Yu-Ting Chang, Qiaosong Wang, Wei-Chih Hung, Robinson Piramuthu, Yi-Hsuan Tsai, and Ming-Hsuan Yang. Weakly-supervised semantic segmentation via sub-category exploration. In CVPR, 2020. 2, 4, 6, 7 +[6] 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, 2015. 4 +[7] Liyi Chen, Weiwei Wu, Chenchen Fu, Xiao Han, and Yuntao Zhang. Weakly supervised semantic segmentation with boundary exploration. In ECCV, 2020. 7 +[8] 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. TPAMI, 2017. 4 +[9] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. 3 +[10] Xiaokang Chen, Yuhui Yuan, Gang Zeng, and Jingdong Wang. Semi-supervised semantic segmentation with cross pseudo supervision. In CVPR, 2021. 3 +[11] Jang Hyun Cho. Picie: Unsupervised semantic segmentation using invariance and equivariance in clustering. In CVPR, 2021. 4 +[12] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. *IJCV*, 2010. 6 +[13] Junsong Fan, Zhaoxiang Zhang, Chunfeng Song, and Tieniu Tan. Learning integral objects with intra-class discriminator for weakly-supervised semantic segmentation. In CVPR, 2020. 7 +[14] Junsong Fan, Zhaoxiang Zhang, and Tieniu Tan. Employing multi-estimations for weakly-supervised semantic segmentation. In ECCV, 2020. 7 +[15] Junsong Fan, Zhaoxiang Zhang, Tieniu Tan, Chunfeng Song, and Jun Xiao. Cian: Cross-image affinity net for weakly supervised semantic segmentation. In AAAI, 2020. 2, 7 +[16] Bharath Hariharan, Pablo Arbeláez, Lubomir Bourdev, Subhransu Maji, and Jitendra Malik. Semantic contours from inverse detectors. In ICCV, 2011. 6 +[17] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. 3 + +[18] Qibin Hou, Peng-Tao Jiang, Yunchao Wei, and Ming-Ming Cheng. Self-erasing network for integral object attention. In NIPS, 2018. 2, 7 +[19] Zilong Huang, Xinggang Wang, Jiasi Wang, Wenyu Liu, and Jingdong Wang. Weakly-supervised semantic segmentation network with deep seeded region growing. In CVPR, 2018. 2 +[20] Ashish Jaiswal, Ashwin Ramesh Babu, Mohammad Zaki Zadeh, Debapriya Banerjee, and Fillia Makedon. A survey on contrastive self-supervised learning. Technologies, 2021. 2 +[21] Peng-Tao Jiang, Qibin Hou, Yang Cao, Ming-Ming Cheng, Yunchao Wei, and Hong-Kai Xiong. Integral object mining via online attention accumulation. In ICCV, 2019. 1, 2, 7 +[22] Tsung-Wei Ke, Jyh-Jing Hwang, and Stella Yu. Universal weakly supervised segmentation by pixel-to-segment contrastive learning. In ICLR, 2021. 1, 3, 7 +[23] Zhanghan Ke, Di Qiu, Kaican Li, Qiong Yan, and Rynson WH Lau. Guided collaborative training for pixel-wise semi-supervised learning. In ECCV, 2020. 3 +[24] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. NIPS, 2020. 3 +[25] Beomyoung Kim, Sangeun Han, and Junmo Kim. Discriminative region suppression for weakly-supervised semantic segmentation. In AAAI, 2021. 2, 7 +[26] Hyo-Eun Kim and Sangheum Hwang. Deconvolutional feature stacking for weakly-supervised semantic segmentation. arXiv:1602.04984, 2016. 2 +[27] Alexander Kolesnikov and Christoph H Lampert. Seed, expand and constrain: Three principles for weakly-supervised image segmentation. In ECCV, 2016. 1, 7 +[28] Hyeokjun Kweon, Sung-Hoon Yoon, Hyeonseong Kim, Daehee Park, and Kuk-Jin Yoon. Unlocking the potential of ordinary classifier: Class-specific adversarial erasing framework for weakly supervised semantic segmentation. In ICCV, 2021. 6 +[29] Jungbeom Lee, Eunji Kim, Sungmin Lee, Jangho Lee, and Sungroh Yoon. Ficklenet: Weakly and semi-supervised semantic image segmentation using stochastic inference. In CVPR, 2019. 7 +[30] Jungbeom Lee, Eunji Kim, Sungmin Lee, Jangho Lee, and Sungroh Yoon. Frame-to-frame aggregation of active regions in web videos for weakly supervised semantic segmentation. In ICCV, 2019. 7 +[31] Jungbeom Lee, Eunji Kim, and Sungroh Yoon. Antiadversarily manipulated attributions for weakly and semi-supervised semantic segmentation. In CVPR, 2021. 6, 7 +[32] Seungho Lee, Minhyun Lee, Jongwuk Lee, and Hyunjung Shim. Railroad is not a train: Saliency as pseudo-pixel supervision for weakly supervised semantic segmentation. In CVPR, 2021. 1, 2, 6, 7 +[33] Junnan Li, Pan Zhou, Caiming Xiong, and Steven C. H. Hoi. Prototypical contrastive learning of unsupervised representations. In ICLR, 2021. 3 + +[34] Xueyi Li, Tianfei Zhou, Jianwu Li, Yi Zhou, and Zhaoxiang Zhang. Group-wise semantic mining for weakly supervised semantic segmentation. In AAAI, 2021. 7 +[35] Weizhe Liu, David Ferstl, Samuel Schulter, Lukas Zebedin, Pascal Fua, and Christian Leistner. Domain adaptation for semantic segmentation via patch-wise contrastive learning. arXiv:2104.11056, 2021. 3 +[36] Weide Liu, Zhonghua Wu, Henghui Ding, Fayao Liu, Jie Lin, and Guosheng Lin. Few-shot segmentation with global and local contrastive learning. arXiv:2108.05293, 2021. 3 +[37] Weide Liu, Chi Zhang, Guosheng Lin, Tzu-Yi Hung, and Chunyan Miao. Weakly supervised segmentation with maximum bipartite graph matching. In MM, 2020. 6 +[38] Shervin Minaee, Yuri Y Boykov, Fatih Porikli, Antonio J Plaza, Nasser Kehtarnavaz, and Demetri Terzopoulos. Image segmentation using deep learning: A survey. TPAMI, 2021. 1 +[39] Youngmin Oh, Beomjun Kim, and Bumsub Ham. Background-aware pooling and noise-aware loss for weakly-supervised semantic segmentation. In CVPR, 2021. 1 +[40] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv:1807.03748, 2018. 2 +[41] Shun-Yi Pan, Cheng-You Lu, Shih-Po Lee, and Wen-Hsiao Peng. Weakly-supervised image semantic segmentation using graph convolutional networks. In ICME, 2021. 7 +[42] Joshua David Robinson, Ching-Yao Chuang, Suvrit Sra, and Stefanie Jegelka. Contrastive learning with hard negative samples. In ICLR, 2021. 5 +[43] Wataru Shimoda and Keiji Yanai. Self-supervised difference detection for weakly-supervised semantic segmentation. In ICCV, 2019. 2 +[44] Yukun Su, Ruizhou Sun, Guosheng Lin, and Qingyao Wu. Context decoupling augmentation for weakly supervised semantic segmentation. In ICCV, 2021. 6, 7 +[45] Guolei Sun, Wenguan Wang, Jifeng Dai, and Luc Van Gool. Mining cross-image semantics for weakly supervised semantic segmentation. In ECCV, 2020. 2, 7 +[46] Kunyang Sun, Haoqing Shi, Zhengming Zhang, and Yongming Huang. ECS-net: Improving weakly supervised semantic segmentation by using connections between class activation maps. In ICCV, 2021. 6, 7 +[47] Meng Tang, Federico Perazzi, Abdelaziz Djelouah, Ismail Ben Ayed, Christopher Schroers, and Yuri Boykov. On regularized losses for weakly-supervised cnn segmentation. In ECCV, 2018. 1 +[48] Kai Tian, Shuigeng Zhou, and Jihong Guan. Deepcluster: A general clustering framework based on deep learning. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, 2017. 3, 4 +[49] Wouter Van Gansbeke, Simon Vandenhende, Stamatios Georgoulis, and Luc Van Gool. Unsupervised semantic segmentation by contrasting object mask proposals. In ICCV, 2021. 3 +[50] Wenguan Wang, Tianfei Zhou, Fisher Yu, Jifeng Dai, Ender Konukoglu, and Luc Van Gool. Exploring cross-image pixel contrast for semantic segmentation. In ICCV, 2021. 3, 5 + +[51] Xiang Wang, Shaodi You, Xi Li, and Huimin Ma. Weakly-supervised semantic segmentation by iteratively mining common object features. In CVPR, 2018. 7 +[52] Xinlong Wang, Rufeng Zhang, Chunhua Shen, Tao Kong, and Lei Li. Dense contrastive learning for self-supervised visual pre-training. In CVPR, 2021. 3 +[53] Yude Wang, Jie Zhang, Meina Kan, Shiguang Shan, and Xilin Chen. Self-supervised equivariant attention mechanism for weakly supervised semantic segmentation. In CVPR, 2020. 1, 2, 5, 6, 7 +[54] Yunchao Wei, Jiashi Feng, Xiaodan Liang, Ming-Ming Cheng, Yao Zhao, and Shuicheng Yan. Object region mining with adversarial erasing: A simple classification to semantic segmentation approach. In CVPR, 2017. 2 +[55] Yunchao Wei, Huaxin Xiao, Honghui Shi, Zequn Jie, Jiashi Feng, and Thomas S Huang. Revisiting dilated convolution: A simple approach for weakly-and semi-supervised semantic segmentation. In CVPR, 2018. 7 +[56] Tong Wu, Junshi Huang, Guangyu Gao, Xiaoming Wei, Xiaolin Wei, Xuan Luo, and Chi Harold Liu. Embedded discriminative attention mechanism for weakly supervised semantic segmentation. In CVPR, 2021. 6, 7 +[57] Zifeng Wu, Chunhua Shen, and Anton van den Hengel. Wider or deeper: Revisiting the resnet model for visual recognition. Pattern Recognition, 2019. 4 +[58] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018. 2 +[59] Lian Xu, Wanli Ouyang, Mohammed Bennamoun, Farid Boussaid, Ferdous Sohel, and Dan Xu. Leveraging auxiliary tasks with affinity learning for weakly supervised semantic segmentation. In ICCV, 2021. 7 +[60] Qi Yao and Xiaojin Gong. Saliency guided self-attention network for weakly and semi-supervised semantic segmentation. IEEE Access, 2020. 2 +[61] Yazhou Yao, Tao Chen, Guo-Sen Xie, Chuanyi Zhang, Fumin Shen, Qi Wu, Zhenmin Tang, and Jian Zhang. Nonsalient region object mining for weakly supervised semantic segmentation. In CVPR, 2021. 7 +[62] Dong Zhang, Hanwang Zhang, Jinhui Tang, Xian-Sheng Hua, and Qianru Sun. Causal intervention for weakly-supervised semantic segmentation. NIPS, 2020. 1, 6, 7 +[63] Fei Zhang, Chaochen Gu, Chenyue Zhang, and Yuchao Dai. Complementary patch for weakly supervised semantic segmentation. In ICCV, 2021. 6, 7 +[64] Liheng Zhang and Guo-Jun Qi. Wcp: Worst-case perturbations for semi-supervised deep learning. In CVPR, 2020. 3 +[65] Tianyi Zhang, Guosheng Lin, Weide Liu, Jianfei Cai, and Alex Kot. Splitting vs. merging: Mining object regions with discrepancy and intersection loss for weakly supervised semantic segmentation. In ECCV, 2020. 7 +[66] Xiaolin Zhang, Yunchao Wei, Jiashi Feng, Yi Yang, and Thomas S Huang. Adversarial complementary learning for weakly supervised object localization. In CVPR, 2018. 4 +[67] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, 2016. 1, 2 \ No newline at end of file diff --git a/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/images.zip b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0bc5a415aceb94d1435671d9a0612e291f4153dc --- /dev/null +++ b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5130ad69219d81b66a0cf398c22f3e11f1d114e66c857d6117fbdc492f8a93f6 +size 538206 diff --git a/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/layout.json b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..dbcdd828861fe30a46c2d9077430a08eaae65a99 --- /dev/null +++ b/weaklysupervisedsemanticsegmentationbypixeltoprototypecontrast/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0448758c73ff73e504645c243ed4b8a29b635d01ac7d78c15d60551a378fbf2a +size 449527 diff --git a/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_content_list.json b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..259e03a6d8efe047e929d0c5128fb21d46833d2c --- /dev/null +++ b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c01763bffe00ab6003a49d02902216d6df642dd26bd87818290d70d95835b34b +size 78176 diff --git a/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_model.json b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2fd7ee936c3eec10c42f631727b807f93f01369b --- /dev/null +++ b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e827957c14f1050503d33601fe06bcfc82b55a606f7405362d0ee57ad25aedf +size 99058 diff --git a/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_origin.pdf b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2bf153d2a705476b5c3ecb83d15bc9543bfadc74 --- /dev/null +++ b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/4a461ad1-0205-4aa5-a929-0579dee0e890_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aad8f0e8696774c723c7ca9d826f5fb1a0c5c6bd6396246c61491dc6033282cc +size 2417253 diff --git a/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/full.md b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..20db86f1f49b30ecb5a4bd50daf209606208d0aa --- /dev/null +++ b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/full.md @@ -0,0 +1,302 @@ +# Weakly Supervised Semantic Segmentation using Out-of-Distribution Data + +Jungbeom Lee $^{1}$ Seong Joon Oh $^{2,3}$ Sangwoo Yun $^{2}$ Junsuk Choe $^{4}$ Eunji Kim $^{1}$ Sungroh Yoon $^{1,5,*}$ + +$^{1}$ Department of Electrical and Computer Engineering, Seoul National University + +$^{2}$ NAVER AI Lab $^{3}$ University of Tübingen + +$^{4}$ Department of Computer Science and Engineering, Sogang University + +$^{5}$ Interdisciplinary Program in AI, AIIS, ASRI, INMC, and ISRC, Seoul National University + +# Abstract + +Weakly supervised semantic segmentation (WSSS) methods are often built on pixel-level localization maps obtained from a classifier. However, training on class labels only, classifiers suffer from the spurious correlation between foreground and background cues (e.g. train and rail), fundamentally bounding the performance of WSSS. There have been previous endeavors to address this issue with additional supervision. We propose a novel source of information to distinguish foreground from the background: Out-of-Distribution (OoD) data, or images devoid of foreground object classes. In particular, we utilize the hard OoDs that the classifier is likely to make false-positive predictions. These samples typically carry key visual features on the background (e.g. rail) that the classifiers often confuse as foreground (e.g. train), so these cues let classifiers correctly suppress spurious background cues. Acquiring such hard OoDs does not require an extensive amount of annotation efforts; it only incurs a few additional image-level labeling costs on top of the original efforts to collect class labels. We propose a method, W-OoD, for utilizing the hard OoDs. W-OoD achieves state-of-the-art performance on Pascal VOC 2012. The code is available at: https://github.com/naver-ai/w-ood. + +# 1. Introduction + +Pixel-wise labeling is labor-intensive [8]. Lots of research have been dedicated to supervising a semantic segmentation model with weaker forms of supervision than pixel-wise labelings, such as scribbles [52], points [3, 21], boxes [20, 31, 49], and class labels [27, 30, 33, 56]. We tackle the final category in this paper: weakly supervised semantic segmentation (WSSS) with class labels. + +WSSS methods utilizing class labels often follow a two-stage process. First, they generate pixel-level pseudo-target from a classifier using CAM variants [46, 63]. Then, they train the main segmentation network using the pseudo-target + +![](images/3c4504eee4539e7b975dae1038fce89a10849c5b0b7e16c49b6b88fa517c475a.jpg) +(a) Baseline +Figure 1. (a) Classifiers often confuse background cues to be a foreground concept due to spurious correlations (e.g. "rail" for "train"). (b) Our W-OoD employs hard OoD images as negative samples (e.g. "rail" is not "train") to resolve the confusion. + +![](images/20f13c6472aa86299cee6796e25e4f8697f89cbd71dd77965b7c58c33bbd6080.jpg) +(b) Ours +aannnnnne aennnnnne nnnnnnne + +![](images/b6ce19d021ba7f4b7524f156077d13c775f0d6746f6812b872c648af8b684f41.jpg) +OoD images + +generated in the first stage. Built on image-level labels only, the pseudo-target is known to suffer from the confusion between foreground and background cues. For example, given a database of duck images where ducks are typically waterborne, a classifier erroneously assigns higher scores on patches containing water than those containing ducks' feet [7, 22, 27, 34, 36, 62]. The same goes for foreground-background pairs like woodpecker-tree, snowmobile-snow, and train-rail. This is a fundamental problem that cannot be solved solely with the class labels; additional information is needed to learn to fully distinguish the foreground and background cues [7, 34, 36]. + +Researchers have thus sought various sources of additional guidance to separate the foreground and background cues, each with different pros and cons and different labeling-cost footprints. Image saliency [38, 41] is one of the most widely used ones [18, 28, 34, 43, 51, 60], for it naturally provides the prominent foreground object in the image in a class-agnostic fashion. However, saliency is not very effective for non-salient foreground objects (e.g. low-contrast objects or small objects). Low-level visual features like superpixels [25, 55], edges [19], object proposals [31, 43, 49], + +and optical flows [15,29] have also been considered. Though cost-effective, they tend to generate inaccurate object boundaries because such low-level information does not consider semantics associated with the class. + +In this paper, we propose another source of guidance that provides a distinction between the foreground and background cues. We propose to use the out-of-distribution (OoD) data that do not contain any of the foreground classes of interest. Examples include the rail-only images for the foreground class "train", since classifiers often confuse the rail for the train. By subduing the recognition of "train" on such rail cues in hard OoDs, models successfully distinguish such confusing cues. + +Obtaining such OoDs does not incur a significant amount of additional annotation efforts compared to collecting only the image-level labels. The OoD images are natural byproducts of the typical dataset collection procedure. Vision datasets with image-level category labels (e.g. Pascal [10], COCO [40], LVIS [11], and OpenImages [24]) all start with a pool of candidate images, from which images corresponding to one of the foreground classes are selected and included in the final dataset. The remaining pool, or the candidate OoD set, can be utilized as the source of OoD images. + +The candidate OoD set cannot be directly used for guiding the WSSS method for two reasons. First, general OoD images do not provide informative signals to distinguish difficult background cues from the foreground (e.g. rail from train). Second, it may still contain foreground objects. We address the first problem by selecting hard OoDs whereby classifiers falsely assign high prediction scores to one of the foreground classes. The second problem is addressed by a human-in-the-loop process where images containing foreground objects are manually pruned. While this requires additional human efforts, we emphasize that the extra cost is negligible. As we will show later (Sec. 4.3.1), we only need a tiny amount of hard OoD samples to improve the localization maps: even 1 hard OoD image per class boosts the localization performance by $2.0\%$ . Furthermore, the cost for collecting OoD samples is at the same order of magnitude as collecting the category labels for the foreground samples, as opposed to collecting e.g. segmentation maps. One can also re-direct the budget for collecting a few labeled foreground data to collecting a similar number of hard OoD samples to dramatically improve the WSSS performance. + +Given the additional guidance provided by OoD samples, we propose W-OoD, a method of training a classifier by utilizing the hard-OoDs. Note that our data collection procedure provides hard OoD samples which have different patterns and semantics in various contexts. One could ignore this diversity and treat every hard OoD as a combined background class; this approach has proved to be sub-optimal by our experiments. Instead, W-OoD considers every hard OoD sample with a metric-learning objective: increase the + +distance between the in-distribution and OoD samples in the feature space. This forces the background cues shared by the in-distribution and OoD samples (e.g. rail for train category) to be excluded from the feature-space representation. W-OoD results in high-quality localization maps and lead to the new state-of-the-art performance on the Pascal VOC 2012 benchmark for WSSS. + +We contribute (1) a new paradigm of utilizing the OoD samples to address the spurious correlations in weakly supervised semantic segmentation (WSSS); (2) a dataset of hard OoDs for 20 Pascal categories that will be published upon acceptance; and (3) a WSSS method, W-OoD, that exploits the hard OoDs and achieves the best-known performance on the Pascal VOC 2012 benchmark for WSSS. + +# 2. Related Work + +Weakly supervised learning: Most weakly supervised learning methods with image-level class labels are based on a class activation map (CAM) [63]. However, it is widely known that a CAM is limited to identifying small discriminative parts of a target object [1, 27, 28]. Several techniques have been proposed for obtaining the entire region of the target object. PSA [2] and IRN [1] consider pixel relationships to extend the object region to semantically similar areas using a random walk. SEAM [56] regularizes the classifier so that the localization maps obtained from differently transformed images are equivariant to those transformations. AdvCAM [30] and RIB [27] propose post-processing techniques of a trained classifier to obtain whole regions of the target object, by manipulating images or network weights. Although the identified regions are successfully extended by these methods, some spuriously correlated background regions tend to be erroneously identified together. CDA [50] adopts the cut-paste method to decouple the correlation between objects and their contextual background. However, it is difficult to accurately decouple the correlation using only class labels, which limits the performance improvement. + +Learning with external data: Several studies have considered utilizing additional external information to address the issue of the spurious correlation problem. Automated web searches can provide images [17, 47] or videos [15, 29] with class labels, although these labels may be inaccurate. Some methods [37, 51] utilize single-label images to obtain more information about in-distribution data. However, these additional sources still depend solely on classes of interest. Thus, they lack information about the separation between the foreground and background. Consequently, various types of additional supervision have been adopted. Some researchers [45, 53] employed image captions. However, these are expensive to obtain. Moreover, modeling vision-language relationships, which is required in those methods, is a non-trivial task. Kolesnikov et al. [22] proposed an active learning approach, wherein a person deter + +mines whether a specific pattern is in the foreground or not. This is a model-specific approach, so human intervention is required whenever a new model is trained. Saliency supervision [6, 54] is another popular additional information source [18, 27, 29, 34, 51, 57, 60]. However, it is not very effective for non-salient objects that are indistinguishable from the background or small objects [27, 34, 57]. + +# 3. Method + +We propose a method for collecting and utilizing OoD data for the WSSS with category labels. We describe the data collection procedure for hard OoD in Sec. 3.1. In Sec. 3.2, we introduce the method named W-OoD that trains a classifier with the collected hard-OoDs to generate the localization maps. Finally in Sec. 3.3, we show how to train a semantic segmentation network with the localization maps. + +# 3.1. Collecting the Hard OoD Data + +We describe the overall procedure for collecting an OoD dataset. The starting point is a candidate OoD set that consists mostly of images without the foreground categories of interest. The aim is to refine this set into a set of hard OoDs that will be used for the downstream WSSS methods. The overall procedure is described in Fig. 2. + +Where to get the candidate OoDs: The WSSS task with category labels as the weak supervision first requires the category labels on a set of training images. Building a category-labeled image dataset is typically a four-step process [10, 11, 24, 40]: (1) define the list $\mathcal{C}$ of foreground classes of interest, (2) acquire unlabelled images from various sources (e.g. world wide web), (3) determine for each image whether it contains one of the foreground classes, and (4) tag each image with the foreground category labels. Steps (3) and (4) are combined in some cases. A by-product of this procedure is the set of candidate images obtained from step (2) but not selected in step (3). We refer to this set as the candidate OoD set. For example, for Pascal VOC 2007 [10], step (2) has yielded 44,269 candidate images for annotation. Everingham et al. [10] report that 9,963 of them were finally selected as foreground data, while the rest were discarded. We make use of this discarded set that is likely to consist of background images. + +Hard OoD samples via ranking and pruning: Unfortunately, the candidate OoD data are imperfect. OoD data are often too diverse to contain meaningful information. For example, presenting an image of fish in an aquarium as a negative sample of the foreground class "train" will not introduce any meaningful supervision for the classifier (See fish in Fig. 2). It is the hard OoD samples that give much information; they are OoD samples confused by a classifier to be containing the foreground object. The rail images without train in Fig. 2 are examples of such. They provide informative negative supervision for the classifier to suppress the + +![](images/3d6b96242536358142de419b31f8f3584ae2b71e069a452ceeda347e7b5ebf60.jpg) +Figure 2. Collecting hard OoD data. Starting from the candidate OoD images at the top, we sequentially prune out easy OoDs and then false negatives for each foreground class $c \in \mathcal{C}$ . The procedure results in the hard OoD dataset. + +class score on spurious background cues. We thus rank the candidate OoD data according to the prediction scores $p(c)$ for the class $c$ of interest. We use the classifier trained on the images with foreground objects and the corresponding labels. We prune OoD samples with $p(c) < 0.5$ . This returns candidates for the hard OoD data. + +Manual pruning of positive samples: It is unrealistic to assume that the candidate OoD set will be free of foreground objects. There will be many missing annotations and corner cases. When they are ranked according to the foreground prediction scores, high-ranking images are likely to contain those missing positives. We thus need to manually filter out those positive samples. This manual refinement stage is the cost bottleneck in our pipeline. The cost depends directly on the positive rate $r$ , the proportion of positive images among the pruned set obtained by thresholding the prediction score $p(c) \geq 0.5$ . Letting $n$ be the required number of hard OoD images, the human worker needs to check on average $\frac{n}{1 - r}$ images. If there are some positive images with $e.g. r = 0.2$ , then the annotator needs to check $1.25n$ images to eventually obtain $n$ hard OoDs. We denote the resulting dataset as $\mathcal{D}_{\mathrm{odd}}$ , the hard OoD set. + +Surrogate source of OoD data: Theoretically speaking, it would be best to obtain the hard OoD set by replicating the dataset construction procedure for Pascal [10] to analyze and benchmark our method on Pascal. However, this is practically infeasible because one cannot crawl images with sim + +ilar characteristics as the 500,000 initial images that Pascal authors have crawled from Flickr in 2007 [10]. It is also not documented which category annotation tool has been used to filter out the background set. Another way to set up the experiment is to build a new dataset from scratch. However, this will not allow us to use the existing WSSS benchmarks like Pascal. In this paper, we source the candidate OoD data from another vision dataset: OpenImages [24]. To simulate the OoD data, we filter out 20 Pascal classes from the OpenImages dataset using the provided category labels. Note that OpenImages category labels are noisy: 19,794 categories are labeled first through image classifiers and then are refined by crowdsourced workers [24]. This is in stark contrast to Pascal: only 20 categories are labeled by a highly controlled pool of workers at a controlled offline event (called "annotation party") [10]. We thus expect the candidate OoD set sourced from OpenImages to contain more noise (i.e. foreground classes) than the set one would get from the original Pascal data collection process. + +# 3.2. Learning with Hard OoD Dataset + +Classifiers trained only on the in-distribution dataset $\mathcal{D}_{\mathrm{in}}$ often incorrectly identify spuriously correlated background regions as class-relevant patterns. We address this by using the hard out-of-distribution data $\mathcal{D}_{\mathrm{ood}}$ obtained in the previous section. One naive approach to utilize the hard OoD images is either to assign the uniform distribution over the labels for such images (no-information prior) [14, 32, 35] or to assign the "background" label to such images. However, since hard OoD images contain various semantics that convey meaningful information to each class, labeling these images with one background class ignores the diversity of OoD samples, resulting in a sub-optimal performance as shown in Sec. 4.3 and Table 5. + +To benefit from the diversity of hard-OoD images, we propose a metric-learning methodology that considers OoD images of individuals or small groups. To compute a metric-learning objective, we use the penultimate feature $z$ of the in-distribution classifier $\mathcal{F}_{\mathrm{in}}$ for an input $x$ ; we write $z_{\mathrm{in}}$ (resp. $z_{\mathrm{ood}}$ ) as the feature of $x_{\mathrm{in}} \in \mathcal{D}_{\mathrm{in}}$ (resp. $x_{\mathrm{ood}} \in \mathcal{D}_{\mathrm{ood}}$ ). We train a classifier $\mathcal{F}$ to ensure that $z_{\mathrm{in}}$ is significantly different from $z_{\mathrm{ood}}$ , thereby preventing information overlap between the features. To realize this, a clustering-based metric learning objective is proposed. + +Let $\mathcal{Z}_{\mathrm{in}}$ and $\mathcal{Z}_{\mathrm{ood}}$ be the sets of $z_{\mathrm{in}}$ and $z_{\mathrm{ood}}$ , respectively. We first construct a set of clusters $\mathcal{P}^{\mathrm{in}}$ (resp. $\mathcal{P}^{\mathrm{ood}}$ ) based on $\mathcal{Z}_{\mathrm{in}}$ (resp. $\mathcal{Z}_{\mathrm{ood}}$ ). Each cluster in $\mathcal{P}^{\mathrm{in}}$ contains features of $x_{\mathrm{in}}$ corresponding to each class $c \in \mathcal{C}$ , resulting in $|\mathcal{C}|$ clusters in $\mathcal{P}^{\mathrm{in}}$ . One straightforward way of constructing $\mathcal{P}^{\mathrm{ood}}$ is to cluster images according to their incorrectly predicted classes. This, however, is sub-optimal in practice because such clusters are highly heterogeneous. For example, images of lakes and images of trees are semantically different, yet a + +cluster based on the "bird" class will contain both. Therefore, we construct $\mathcal{P}^{\mathrm{odd}}$ by using a $K$ -means clustering algorithm on $\mathcal{Z}_{\mathrm{odd}}$ . + +We now have a set of clusters $\mathcal{P}^{\mathrm{in}} = \{\mathcal{P}_c^{\mathrm{in}}\}_{c=1}^{|\mathcal{C}|}$ and $\mathcal{P}^{\mathrm{ood}} = \{\mathcal{P}_k^{\mathrm{ood}}\}_{k=1}^K$ . The center of each cluster is computed using $p_k = \frac{1}{|\mathcal{P}_k|} \sum_{x \in \mathcal{P}_k} z(x)$ . We define the distance between the input image $x$ and each cluster $\mathcal{P}_k$ as the distance between $x$ 's feature $z(x)$ and the center $p_k$ , as follows: + +$$ +d (x, \mathcal {P} _ {k}) = \| z (x) - p _ {k} \| _ {2} \quad (1 \leq k \leq K). \tag {1} +$$ + +We design a loss $\mathcal{L}_{\mathrm{d}}$ to ensure that the distance between $x_{\mathrm{in}}$ and in-distribution clusters $\mathcal{P}^{\mathrm{in}}$ is small, but the distance between $x_{\mathrm{in}}$ and OoD clusters $\mathcal{P}^{\mathrm{ood}}$ is large, as shown below: + +$$ +\mathcal {L} _ {\mathrm {d}} = \sum_ {c: y _ {c} = 1} d \left(x _ {\text {i n}}, \mathcal {P} _ {c} ^ {\text {i n}}\right) - \sum_ {k \in \mathcal {K}} d \left(x _ {\text {i n}}, \mathcal {P} _ {k} ^ {\text {o o d}}\right), \tag {2} +$$ + +where $y \in \{0,1\}^{|\mathcal{C}|}$ is the multi-hot binary vector of foreground classes in image $x_{\mathrm{in}}$ and $\kappa$ is the set of clusters in $\mathcal{P}^{\mathrm{odd}}$ that are among the top- $\tau \%$ closest from $x_{\mathrm{in}}$ . This restriction of $\kappa$ ensures meaningful supervisory signals for the model. + +We also use the usual classification loss $\mathcal{L}_{\mathrm{cls}}$ . For in-distribution samples $x_{\mathrm{in}}$ , we use the binary cross entropy (BCE) losses against the label vector $y$ . For out-of-distribution samples $x_{\mathrm{odd}}$ , we use the same loss with the zero-vector label $y = (0, \dots, 0)$ . The classification loss for our classifier $\mathcal{F}$ is then + +$$ +\mathcal {L} _ {\mathrm {c l s}} = \frac {1}{| \mathcal {C} |} \sum_ {c = 1} ^ {| \mathcal {C} |} \left[ \mathcal {L} _ {\mathrm {B C E}} \left(\mathcal {F} ^ {c} \left(x _ {\mathrm {i n}}\right), y _ {c}\right) + \mathcal {L} _ {\mathrm {B C E}} \left(\mathcal {F} ^ {c} \left(x _ {\mathrm {o o d}}\right), 0\right) \right], \tag {3} +$$ + +where $\mathcal{F}^c$ is the prediction for class $c$ . The final loss $\mathcal{L}$ to train a classifier $\mathcal{F}$ is + +$$ +\mathcal {L} = \mathcal {L} _ {\mathrm {c l s}} + \lambda \mathcal {L} _ {\mathrm {d}}, \tag {4} +$$ + +where $\lambda > 0$ is a scalar balancing the two losses. + +Because our method adds an additional regularization $\mathcal{L}_{\mathrm{d}}$ to the existing classifier training, it can be seamlessly integrated into other methods, such as IRN [1], SEAM [56] and AdvCAM [30]. + +# 3.3. Training Segmentation Networks + +The classifier $\mathcal{F}$ trained by Eq. 4 generates a localization map using the CAM [63] technique. Since the naive CAM generates low-resolution score maps and provides only rough localization of objects, recent WSSS methods [27, 28, 30, 50, 56, 62] have proposed a framework for expanding the CAM score map to full resolution. They consider the CAM localization map as an initial seed and generate pseudo-ground-truth masks by refining their initial seeds with established seed refinement methods [1, 2, 16, 23]. In this work, we apply the IRN framework [1] on our localization maps to obtain the pseudo-ground-truth masks. They are subsequently used for training segmentation networks. + +Table 1. W-OoD improves initial seeds. We evaluate the qualities of various initial seeds and the effects of applygin W-OoD on them. Evaluated on Pascal VOC 2012 train set. All numbers are based on our re-implementation using the official codes. + +
MethodmIoUPrec.RecallF1-score
IRN_CVPR‘19 [2]49.561.972.766.9
+ W-OoD53.366.573.269.7
SEAM_CVPR‘20 [56]54.867.276.571.5
+ W-OoD55.968.576.772.4
AdvCAM_CVPR‘21 [30]55.566.877.671.8
+ W-OoD59.171.577.974.6
+ +Table 2. Quality of pseudo-GT masks. mIoU (%) of the initial seed (Seed), the seed with CRF (+CRF), and the pseudo ground truth mask (Mask) are evaluated on Pascal VOC 2012 train set. All the methods based based on IRN [1] with ResNet-50. + +
MethodSeed+ CRFMask
IRN_CVPR‘19 [1]49.554.366.3
MBMNet_ACMMM‘20 [42]50.2-66.8
CONTA_NeurIPS‘20 [62]48.8-67.9
CDA_ICCV‘21 [50]50.8-67.7
AdvCAM_CVPR‘21 [30]55.662.169.9
CSE_ICCV‘21 [26]56.062.8-
IRN + W-OoD (Ours)53.358.471.1
AdvCAM + W-OoD (Ours)59.165.572.1
+ +# 4. Experiments + +# 4.1. Experimental Setup + +In-Distribution Dataset: We conduct experiments on the Pascal VOC 2012 [10] dataset. Following the practice in weakly-supervised semantic segmentation (WSSS) [1,30, 56], we use the augmented training set containing 10,582 training images produced by Hariharan et al. [12]. For those training images, we only use the image-level category labels, following the protocol for WSSS. We use the pixel-wise ground-truth masks on val (1,449 images) and test (1,456 images) sets only for evaluation. We use the official Pascal VOC evaluation server for the test-set evaluation. + +Out-of-Distribution Dataset: As described in Sec. 3.1, we use the OpenImages [24] dataset to construct the candidate OoD set. As the result of prediction-score pruning and manual filtering, we obtain the hard OoD set $\mathcal{D}_{\mathrm{odd}}$ with 5,190 images. Examples are shown in the Appendix. + +Reproducibility: We follow experimental settings of IRN [1] for training a classifier and obtaining the initial seed, including the use of ResNet-50 [13]. For the setting defined in Sec. 3.2, we use $\lambda = 0.007$ , $\tau = 20$ , and $K = 50$ . For training a segmentation network, we use DeepLab-v2 [5] with two choices of backbones, ResNet-101 [13] and Wide ResNet-38 [58], following the practice in recent papers. All the backbones are pre-trained on ImageNet [9], following existing work [2,26,39,56,62]. + +Table 3. WSSS performance on Pascal. We show results on Pascal VOC 2012 val and test sets. WResNet denotes Wide ResNet [58]. Asterisks * denote reproduced numbers by us. + +
MethodBackbonevaltest
Supervision: Image-level tags + Saliency
FickleNet CVPR '19 [28]ResNet-10164.965.3
Sun et al. ECCV '20 [51]ResNet-10166.266.9
Yao et al. CVPR '21 [60]ResNet-10168.368.5
A'GNN TPAMI '21 [61]ResNet-10168.368.7
AuxSegNet ICCV '21 [59]WResNet-3869.068.6
EDAM CVPR '21 [57]ResNet-10170.970.6
Supervision: Image-level tags
IRN CVPR '19 [1]ResNet-5063.564.8
SSDD ICCV '19 [48]WResNet-3864.965.5
SEAM CVPR '20 [56]WResNet-3864.565.7
Chang et al. CVPR '20 [4]ResNet-10166.165.9
CONTA NeurIPS '20 [62]WResNet-3866.166.7
AdvCAM CVPR '21 [30]*ResNet-10167.567.1
CSE ICCV '21 [26]WResNet-3868.368.0
PMM ICCV '21 [39]WResNet-3868.569.0
AdvCAM + W-OoD (Ours)ResNet-10169.869.9
AdvCAM + W-OoD (Ours)WResNet-3870.770.1
+ +# 4.2. Experimental Results + +Quality of localization maps: As mentioned in Sec. 3.2, our method can be applied to other WSSS methods, since it only requires the addition of a loss term $\mathcal{L}_{\mathrm{d}}$ during the classifier training. We apply our method to three state-of-the-art WSSS methods that utilize the initial seeds: IRN [1], SEAM [56], and AdvCAM [30]. Table 1 presents the qualities of the initial seeds for the considered baselines as well as respective performances when combined with our W-OoD technique. We observe that our method improves all the metrics by a large margin for all three methods. In particular, W-OoD training significantly improves precision values (e.g. $+4.7\% \mathrm{p}$ for AdvCAM [30]), indicating that the resulting localization maps bleed into the background regions less frequently. This is what we expected to see as a result of including the hard OoD samples into training. Fig. 3 shows qualitative examples of the localization maps. They show that our method generates more precise maps around the actual foreground objects. Spuriously correlated background regions like rails for "train" and trees for "bird" are effectively suppressed by our method. Additionally, we observe that our method improves recall by expanding the retrieved region of the target object, as shown in the last column in Fig. 3. The increased precision gives room for further improvements in recall. + +Quality of pseudo-ground-truth masks: Table 2 compares qualities of intermediate masks leading to the pseudoground-truth masks among state-of-the-art methods as well as ours. Our pseudo ground-truth masks achieve an mIoU + +![](images/a33148021480671799b4890c32c6124bebb010ef47727dad1ade9024f0245f30.jpg) +Figure 3. Examples of localization maps. The localization maps are obtained from CAM (left) and AdvCAM [30] (right). In each case, we show the results using our W-OoD method on top. + +![](images/1d2b4dc08d603beb77b28797a52ae62fb4ba76472f4ee8333f18107cea09a5cb.jpg) +Figure 4. Examples of final segmentation results. Examples of semantic segmentation results on Pascal VOC 2012 val set for IRN [1], AdvCAM [30], and AdvCAM+Ours. + +value of 72.1, which outperforms the previous state of the art by a large margin. Note that CDA [50] is likewise motivated by the need to suppress spurious correlations between foreground and background cues, but has only used the in-distribution data to tackle the problem. It improves the initial seed of IRN [1] by $1.3\% \mathrm{p}$ mIoU $(49.5\rightarrow 50.8)$ , while our method improves it by $3.8\% \mathrm{p}$ mIoU $(49.5\rightarrow 53.3$ , in Table 1). We believe that in-distribution data are fundamentally limited in providing sufficient evidence for distinguishing certain background cues from foreground: if one always sees train on rail, how can one learn that rail is not part of the train? We believe this missing knowledge is effectively supplied by the hard OoD images. + +Final segmentation results: We present the WSSS benchmark results in Table 3. It achieve the best result among the variants using only image-level tags: $70.7\%$ mIoU on val and $70.1\%$ mIoU on test. In particular, using the same backbone ResNet-101 [13], our method produces $2.3\%$ better mIoU than the baseline AdvCAM [30]. Our method also outperforms other methods using additional saliency supervision [38, 41] that explicitly provides pixel-level information of salient objects in an image, except for EDAM [57]. Fig. 4 shows examples of semantic masks produced by IRN [1], AdvCAM [30], and our AdvCAM + W-OoD. In the examples, our method captures the extent of the target objects more precisely than the baselines. + +![](images/8fee98ebfc81e2f21cd0c297161641ad4371d9806f58497029765a6970fdb273.jpg) +Figure 5. Amount of hard OoD samples. We vary number of in-distribution training data $\mathcal{D}_{\mathrm{in}}$ (originally 10,582) and the hard OoD data (originally 0). (a) We fix $|\mathcal{D}_{\mathrm{in}}| = 10,582$ and vary $|\mathcal{D}_{\mathrm{ood}}|$ . (b) We fix $|\mathcal{D}_{\mathrm{in}}| + |\mathcal{D}_{\mathrm{ood}}| = 10,582$ and vary $|\mathcal{D}_{\mathrm{ood}}|$ . (c) We use $|\mathcal{D}_{\mathrm{in}}| = 2,000$ and $|\mathcal{D}_{\mathrm{ood}}| = 100$ . The box plots show the quantiles over five repeated experiments. + +![](images/bc8cc5831a0b4f5e7407328fc411b444eacb0d2f11d5297c9dd16cc408dc0086.jpg) + +![](images/61f1d0996b55f8ee1137e6dc836b528c39160fc697dae519715c39e54b56be0a.jpg) + +
KClusteringmIoU
20Predicted classes52.1
2052.4
30K-Means53.1
5053.3
7052.6
+ +Table 4. Constructing ${\mathcal{P}}^{\text{odd }}$ . We compare two methods for constructing ${\mathcal{P}}^{\text{odd }}$ for W- OoD training. We report the mIoU of the initial seeds on Pascal VOC 2012 train set. + +![](images/1103c0aac2548ea7cc4c063a463f7eb0e0a0d841d4a4a69864b422f7e97f9187.jpg) +Figure 6. Per-class seed qualities. We compare the baseline IRN [1] (denoted as "CAM" above) and the W-OoD augmented version for each class. Evaluated on Pascal VOC 2012 train set. Classes are sorted in the descending order of $\Delta$ improvement ( $\% p$ ). + +# 4.3. Analysis and Discussion + +# 4.3.1 Number of OoD Images + +We investigate the impact of the number of OoD images for our W-OoD training method. Fig. 5(a) shows the mIoU scores of the initial seed at different numbers of OoD images $(|\mathcal{D}_{\mathrm{ood}}|)$ while keeping the number of in-distribution images constant at $|\mathcal{D}_{\mathrm{in}}| = 10,582$ . The experiments were repeated five times to investigate the sensitivity of the result to different random subsets of $\mathcal{D}_{\mathrm{ood}}$ . We observe that already at 1 hard OoD sample per class $(|\mathcal{D}_{\mathrm{ood}}| = 20)$ , the performance boost is $2.0\%$ (49.8 → 51.8), though with a significant amount of variance. The marginal gain from additional hard OoD images diminishes with increasing number of samples. The performance variance also diminishes with an increased number of hard OoD samples. + +In the second experiment, we vary the number of hard OoD samples $|\mathcal{D}_{\mathrm{odd}}|$ while fixing the total number of image-level labeled samples: $|\mathcal{D}_{\mathrm{in}}| + |\mathcal{D}_{\mathrm{odd}}| = 10,582$ . This is a version of fixing the budget for in-distribution and out-of-distribution samples. Fig. 5(b) shows that the hard OoD images bring far greater unit gain than in-distribution images. Thus, given a fixed budget, it is advisable to spend at least some portion of it on collecting the hard OoD samples. + +In Fig. 5(c), we observe that, with 100 hard OoD images, we only need 2,000 in-distribution images to match the performance we obtain from the original 10,582 in-distribution images, enhancing the data efficiency by around $500\%$ . + +Table 5. Loss ablations. Effectiveness of each loss on the initial seed in mIoU(%) on Pascal VOC train set. + +
LossData(a)(b)(c)(d)(e)(f)
\( \mathcal{L}_{\mathrm{cls}} \)\( \mathcal{D}_{\text{in}} \)✓✓✓✓✓✓
\( \mathcal{D}_{\text{ood}} \)✓✓✓✓
\( \mathcal{L}_{\mathrm{d}} \)\( \mathcal{D}_{\text{in}} \)✓✓✓
\( \mathcal{D}_{\text{ood}} \)✓✓✓
mIoU49.550.052.550.252.353.3
+ +# 4.3.2 Effectiveness of Each Component + +K-Means clustering: Table 4 compares the two methods for constructing the $\mathcal{P}^{\mathrm{odd}}$ in Sec. 3.2. When the OoD clusters are based on the classes predicted by the classifier, the resulting mIoU is $52.1\%$ , which is not significantly different from that obtained using the K-means clustering method for the same $K$ value. The clustering method based on the predicted class limits $K$ to $|\mathcal{C}|$ , whereas $K$ values can be controlled in K-means clustering. At $K = 50$ , it produces an mIoU value of $53.3\%$ and the performance is stable across a broad range of $K$ values. Examples of OoD samples in each cluster are presented in the Appendix. + +Loss functions: We conduct ablation studies for each loss in Eq. 4. Both $\mathcal{L}_{\mathrm{cls}}$ and $\mathcal{L}_{\mathrm{d}}$ consist of terms for in-distribution $\mathcal{D}_{\mathrm{in}}$ and out-of-distribution $\mathcal{D}_{\mathrm{ood}}$ data. The effectiveness of each loss term as well as the dataset type is presented in Table 5. (a) is the result of using only $\mathcal{L}_{\mathrm{cls}}$ for $\mathcal{D}_{\mathrm{in}}$ , which is our baseline. The performance boost for (a) $\rightarrow$ (b) and (c) $\rightarrow$ (e) indicates that training the classifier to predict OoD images as background ( $\mathcal{L}_{\mathrm{cls}}$ on $\mathcal{D}_{\mathrm{ood}}$ ) is effective, though + +![](images/bc5504fedab2cbbfee776762b9a051add63ed2b572a26ea87e5fc5700160f160.jpg) +Epoch 0 + +![](images/86fb68aa95ba6851055896a61a567ce4ae7148a8cc61389e51affb6625b65b04.jpg) +Epoch 1 +Figure 7. Visualization of intermediate features. We visualize the intermediate features for "train" and "bird" classes, as well as the features for respective OoD samples, at different training stages. We use the T-SNE [44] dimensionality reduction technique. + +![](images/5e7e5a1dfe71e3500e5ac5889f18e0ddf95ff6ccf71c59372b4071976e3787ad.jpg) +Epoch 2 + +![](images/ed1cf1607fe100a0bff5bffa2a5839481d06f7278db344f9114d357165ced60a.jpg) +Epoch 3 + +![](images/5b57c5a537de599a50be6e245abf59c910064e7d119bde39612ead37bcc04cdf.jpg) +Epoch 4 + +with only marginal improvements. The improvement along $(\mathrm{b})\rightarrow (\mathrm{d})\rightarrow (\mathrm{f})$ signifies the importance of $\mathcal{L}_{\mathrm{d}}$ , in particular when used on the hard OoD data $\mathcal{D}_{\mathrm{odd}}$ . We also find that $\mathcal{L}_{\mathrm{d}}$ for $\mathcal{D}_{\mathrm{in}}$ is useful for stabilizing the performance: in $(\mathrm{e})\rightarrow (\mathrm{f})$ , the standard deviation decreases from 0.82 to 0.33. + +# 4.3.3 Analysis of Results by Class + +Different object classes exhibit different amounts of spurious correlation with background. For example, "train" objects are often confused with the rail background due to their high co-occurrence with rails. Objects like "tvmonitor", on the other hand, suffer less from this issue because of the variety of the co-occurring concepts: a TV can be freely put next to a wall, furniture, window, or any other indoor objects. We show the class-wise performances for the baseline IRN [1] and ours in Fig. 6. First of all, we note that our method improves the class-wise performances rather proportionately: 18 out of 21 classes have seen a performance improvement. Classes that have benefited most from our method are train, airplane, boat, bird, and horse. They are ones that are well-known for spurious background correlations: train-rail, airplane-sky/runway, boat-water, bird-tree/sky, and horse-meadow. + +On the other hand, a particularly large drop in mIoU is seen for the "dining table" class. We conjecture the spurious background correlation has actually been helping out the localization of the "dining table" objects. Many pixel-wise ground-truth evaluation mask for "dining table" objects erroneously include the objects put on it, such as plates, cutlery, and foods. By labeling OoD images, which contain those co-occurring objects not put on a dining table, as "no dining table", the model may correctly assign lower "dining table" scores on those objects, ironically harming the final performance measured on noisy masks. See Appendix for the examples. We believe there will be an additional performance gain if those wrong ground-truth masks are fixed. + +# 4.3.4 Manifold Visualization + +To observe the training dynamics of our method, we visualize the feature manifold at different stages of the W-OoD training. We collect two sets of images with respective labels "train" and "bird" from $\mathcal{D}_{\mathrm{in}}$ and two sets of images which are respectively falsely predicted as "train" and "bird" by $\mathcal{F}_{\mathrm{in}}$ + +from $\mathcal{D}_{\mathrm{odd}}$ . Using the classifier at epoch $e \in \{0, \dots, 5\}^1$ , we compute the features $z_{\mathrm{in}}$ and $z_{\mathrm{out}}$ from images drawn from $\mathcal{D}_{\mathrm{in}}$ and $\mathcal{D}_{\mathrm{odd}}$ , respectively. We use t-SNE [44] to reduce the dimensionality of each feature to 2 dimensions. Fig. 7 visualizes the features $z_{\mathrm{in}}$ and $z_{\mathrm{out}}$ after dimensional reduction using t-SNE. It is observed that, at the beginning of the epoch, $z_{\mathrm{in}}$ and $z_{\mathrm{out}}$ of each class are rarely distinguishable, indicating that the classifier encodes similar information for in-distribution and OoD images. However, as W-OoD training progresses, the two features gradually become distinct. This analysis supports the argument that our method allows the classifier to avoid modeling common information between in-distribution and OoD images, as intended. + +# 5. Conclusion and Future Directions + +We have proposed the use of a new source of information, the OoD data, for suppressing the spurious correlations learned by weakly supervised semantic segmentation (WSSS) methods. We have showcased the data collection pipeline whereby the suitable hard OoD images are obtained. By including those images as negative samples in addition to the original in-distribution foreground samples, we have been able to train a classifier with more accurate localization maps. Our method achieves a performance superior to existing WSSS methods based on image-level labels. In addition, we have empirically shown that the image-level labeling cost itself can be further reduced by using the hard OoD images, without sacrificing the WSSS performances. We have focused on using OoD images for training classifiers to produce accurate pseudo ground-truth masks; interesting future work will include exploiting the OoD images in training a segmentation network itself. + +Acknowledgements: This work was supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) [NO.2021-0-01343, Artificial Intelligence Graduate School Program (Seoul National University)], SNU-Naver Hyperscale AI Center, AIRS Company in Hyundai Motor and Kia through HMC/KIA-SNU AI Consortium Fund, and the BK21 FOUR program of the Education and Research Program for Future ICT Pioneers, Seoul National University in 2022. + +# References + +[1] Jiwoon Ahn, Sunghyun Cho, and Suha Kwak. Weakly supervised learning of instance segmentation with inter-pixel relations. In CVPR, 2019. +[2] Jiwoon Ahn and Suha Kwak. Learning pixel-level semantic affinity with image-level supervision for weakly supervised semantic segmentation. In CVPR, 2018. +[3] Amy Bearman, Olga Russakovsky, Vittorio Ferrari, and Li Fei-Fei. What's the point: Semantic segmentation with point supervision. In ECCV, 2016. +[4] Yu-Ting Chang, Qiaosong Wang, Wei-Chih Hung, Robinson Piramuthu, Yi-Hsuan Tsai, and Ming-Hsuan Yang. Weakly-supervised semantic segmentation via sub-category exploration. In CVPR, 2020. +[5] 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, 2017. +[6] Ming-Ming Cheng, Niloy J Mitra, Xiaolei Huang, Philip HS Torr, and Shi-Min Hu. Global contrast based salient region detection. TPAMI, 2014. +[7] Junsuk Choe, Seong Joon Oh, Seungho Lee, Sanghyuk Chun, Zeynep Akata, and Hyunjung Shim. Evaluating weakly supervised object localization methods right. In CVPR, 2020. +[8] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. +[9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. +[10] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. IJCV, 2010. +[11] Agrim Gupta, Piotr Dollar, and Ross Girshick. LVIS: A dataset for large vocabulary instance segmentation. In CVPR, 2019. +[12] Bharath Hariharan, Pablo Arbeláez, Lubomir Bourdev, Subhransu Maji, and Jitendra Malik. Semantic contours from inverse detectors. In ICCV, 2011. +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[14] Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In ICLR, 2019. +[15] Seunghoon Hong, Donghun Yeo, Suha Kwak, Honglak Lee, and Bohyung Han. Weakly supervised semantic segmentation using web-crawled videos. In CVPR, 2017. +[16] Zilong Huang, Xinggang Wang, Jiasi Wang, Wenyu Liu, and Jingdong Wang. Weakly-supervised semantic segmentation network with deep seeded region growing. In CVPR, 2018. +[17] Bin Jin, Maria V Ortiz Segovia, and Sabine Susstrunk. Webly supervised semantic segmentation. In CVPR, 2017. +[18] Seong Joon Oh, Rodrigo Benenson, Anna Khoreva, Zeynep Akata, Mario Fritz, and Bernt Schiele. Exploiting saliency for object segmentation from image level labels. In CVPR, 2017. + +[19] Tsung-Wei Ke, Jyh-Jing Hwang, and Stella X Yu. Universal weakly supervised segmentation by pixel-to-segment contrastive learning. In ICLR, 2021. +[20] Anna Khoreva, Rodrigo Benenson, Jan Hosang, Matthias Hein, and Bernt Schiele. Simple does it: Weakly supervised instance and semantic segmentation. In CVPR, 2017. +[21] Beomyoung Kim, Youngjoon Yoo, Chaeun Rhee, and Junmo Kim. Beyond semantic to instance segmentation: Weakly-supervised instance segmentation via semantic knowledge transfer and self-refinement. arXiv preprint arXiv:2109.09477, 2021. +[22] Alexander Kolesnikov and Christoph H Lampert. Improving weakly-supervised object localization by micro-annotation. In BMVC, 2016. +[23] Alexander Kolesnikov and Christoph H Lampert. Seed, expand and constrain: Three principles for weakly-supervised image segmentation. In ECCV, 2016. +[24] Alina Kuznetsova, Hassan Rom, Neil Alldrin, Jasper Uijlings, Ivan Krasin, Jordi Pont-Tuset, Shahab Kamali, Stefan Popov, Matteo Malloci, Alexander Kolesnikov, et al. The open images dataset v4. IJCV, 2020. +[25] Suha Kwak, Seunghoon Hong, and Bohyung Han. Weakly supervised semantic segmentation using superpixel pooling network. In AAAI, 2017. +[26] Hyeokjun Kweon, Sung-Hoon Yoon, Hyeonseong Kim, Daehee Park, and Kuk-Jin Yoon. Unlocking the potential of ordinary classifier: Class-specific adversarial erasing framework for weakly supervised semantic segmentation. In ICCV, 2021. +[27] Jungbeom Lee, Jooyoung Choi, Jisoo Mok, and Sungroh Yoon. Reducing information bottleneck for weakly supervised semantic segmentation. In NeurIPS, 2021. +[28] Jungbeom Lee, Eunji Kim, Sungmin Lee, Jangho Lee, and Sungroh Yoon. Ficklenet: Weakly and semi-supervised semantic image segmentation using stochastic inference. In CVPR, 2019. +[29] Jungbeom Lee, Eunji Kim, Sungmin Lee, Jangho Lee, and Sungroh Yoon. Frame-to-frame aggregation of active regions in web videos for weakly supervised semantic segmentation. In ICCV, 2019. +[30] Jungbeom Lee, Eunji Kim, and Sungroh Yoon. Antiadversarily manipulated attributions for weakly and semi-supervised semantic segmentation. In CVPR, 2021. +[31] Jungbeom Lee, Jihun Yi, Chaehun Shin, and Sungroh Yoon. Bbam: Bounding box attribution map for weakly supervised semantic and instance segmentation. In CVPR, 2021. +[32] Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training confidence-calibrated classifiers for detecting out-of-distribution samples. In ICLR, 2018. +[33] Sungmin Lee, Jangho Lee, Jungbeom Lee, Chul-Kee Park, and Sungroh Yoon. Robust tumor localization with pyramid grad-cam. arXiv preprint arXiv:1805.11393, 2018. +[34] Seungho Lee, Minhyun Lee, Jongwuk Lee, and Hyunjung Shim. Railroad is not a train: Saliency as pseudo-pixel supervision for weakly supervised semantic segmentation. In CVPR, 2021. + +[35] Saehyung Lee, Changhwa Park, Hyungyu Lee, Jihun Yi, Jonghyun Lee, and Sungroh Yoon. Removing undesirable feature contributions using out-of-distribution data. In ICLR, 2021. +[36] Kunpeng Li, Ziyan Wu, Kuan-Chuan Peng, Jan Ernst, and Yun Fu. Guided attention inference network. IEEE TPAMI, 2019. +[37] Kunpeng Li, Yulun Zhang, Kai Li, Yuanyuan Li, and Yun Fu. Attention bridging network for knowledge transfer. In CVPR, 2019. +[38] Yin Li, Xiaodi Hou, Christof Koch, James M Rehg, and Alan L Yuille. The secrets of salient object segmentation. In CVPR, 2014. +[39] Yi Li, Zhanghui Kuang, Liyang Liu, Yimin Chen, and Wayne Zhang. Pseudo-mask matters in weakly-supervised semantic segmentation. In ICCV, 2021. +[40] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dolkar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. +[41] Tie Liu, Zejian Yuan, Jian Sun, Jingdong Wang, Nanning Zheng, Xiaou Tang, and Heung-Yeung Shum. Learning to detect a salient object. TPAMI, 2010. +[42] Weide Liu, Chi Zhang, Guosheng Lin, Tzu-Yi HUNG, and Chunyan Miao. Weakly supervised segmentation with maximum bipartite graph matching. In ACMMM, 2020. +[43] Yun Liu, Yu-Huan Wu, Pei-Song Wen, Yu-Jun Shi, Yu Qiu, and Ming-Ming Cheng. Leveraging instance-, image-and dataset-level information for weakly supervised instance segmentation. TPAMI, 2020. +[44] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008. +[45] Johann Sawatzky, Debayan Banerjee, and Juergen Gall. Harvesting information from captions for weakly supervised semantic segmentation. In ICCV Workshop, 2019. +[46] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Gradcam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017. +[47] Tong Shen, Guosheng Lin, Chunhua Shen, and Ian Reid. Bootstrapping the performance of webly supervised semantic segmentation. In CVPR, 2018. +[48] Wataru Shimoda and Keiji Yanai. Self-supervised difference detection for weakly-supervised semantic segmentation. In ICCV, 2019. +[49] Chunfeng Song, Yan Huang, Wanli Ouyang, and Liang Wang. Box-driven class-wise region masking and filling rate guided loss for weakly supervised semantic segmentation. In CVPR, 2019. +[50] Yukun Su, Ruizhou Sun, Guosheng Lin, and Qingyao Wu. Context decoupling augmentation for weakly supervised semantic segmentation. ICCV, 2021. +[51] Guolei Sun, Wenguan Wang, Jifeng Dai, and Luc Van Gool. Mining cross-image semantics for weakly supervised semantic segmentation. In ECCV, 2020. +[52] Meng Tang, Abdelaziz Djelouah, Federico Perazzi, Yuri Boykov, and Christopher Schroers. Normalized cut loss for weakly-supervised cnn segmentation. In CVPR, 2018. + +[53] Daniel R Vilar and Claudio A Perez. Extracting structured supervision from captions for weakly supervised semantic segmentation. IEEE Access, 2021. +[54] Lijun Wang, Huchuan Lu, Yifan Wang, Mengyang Feng, Dong Wang, Baocai Yin, and Xiang Ruan. Learning to detect salient objects with image-level supervision. In CVPR, 2017. +[55] Xiang Wang, Shaodi You, Xi Li, and Huimin Ma. Weakly-supervised semantic segmentation by iteratively mining common object features. In CVPR, 2018. +[56] Yude Wang, Jie Zhang, Meina Kan, Shiguang Shan, and Xilin Chen. Self-supervised equivariant attention mechanism for weakly supervised semantic segmentation. In CVPR, 2020. +[57] Tong Wu, Junshi Huang, Guangyu Gao, Xiaoming Wei, Xiaolin Wei, Xuan Luo, and Chi Harold Liu. Embedded discriminative attention mechanism for weakly supervised semantic segmentation. In CVPR, 2021. +[58] Zifeng Wu, Chunhua Shen, and Anton Van Den Hengel. Wider or deeper: Revisiting the resnet model for visual recognition. Pattern Recognition, 2019. +[59] Lian Xu, Wanli Ouyang, Mohammed Bennamoun, Farid Boussaid, Ferdous Sohel, and Dan Xu. Leveraging auxiliary tasks with affinity learning for weakly supervised semantic segmentation. In ICCV, 2021. +[60] Yazhou Yao, Tao Chen, Guosen Xie, Chuanyi Zhang, Fumin Shen, Qi Wu, Zhenmin Tang, and Jian Zhang. Non-salient region object mining for weakly supervised semantic segmentation. In CVPR, 2021. +[61] Bingfeng Zhang, Jimin Xiao, Jianbo Jiao, Yunchao Wei, and Yao Zhao. Affinity attention graph neural network for weakly supervised semantic segmentation. TPAMI, 2021. +[62] Dong Zhang, Hanwang Zhang, Jinhui Tang, Xiansheng Hua, and Qianru Sun. Causal intervention for weakly-supervised semantic segmentation. In NeurIPS, 2020. +[63] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, 2016. \ No newline at end of file diff --git a/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/images.zip b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..412b3ada147de9d1f68141cc5ca5b471bef88f08 --- /dev/null +++ b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bc3aa06b81e423eda9b82ecd4e865471bbae6149df799bde125f20765dd6afb +size 652964 diff --git a/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/layout.json b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..79492f4c02b3b2afe78411945346ec56acce74e8 --- /dev/null +++ b/weaklysupervisedsemanticsegmentationusingoutofdistributiondata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23bc7b6cc3e9f773b7ce5ad2271620a1c4cfae1883fd9780dca65ea617be2507 +size 453501 diff --git a/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_content_list.json b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d4086abea09d323b739fd8b27734c0f55e197bd4 --- /dev/null +++ b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5da612f05ce67baba2c0d815061ad4573b45efcf7d028e15474adbfc6aedf169 +size 84873 diff --git a/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_model.json b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..67ef5725ca330e1ff4c9a550c9a9b1e649d3d25e --- /dev/null +++ b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd794d5ac36f0ca94d4484dc442194f2482718dbc8c2e3da55fc40a0acf275d4 +size 103873 diff --git a/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_origin.pdf b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..328f3e4c034a2dcb4a4eaa583cf996349c6afc83 --- /dev/null +++ b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/d7b8ff7c-cf93-4ab9-8d6f-ba979957d6d8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f821924b10a41cc10b9f5fb2628ae1184861d198f4f8081a8f93b2abc683f3e1 +size 774496 diff --git a/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/full.md b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7b77ad1089e625322ec0a514effdc5333e76049c --- /dev/null +++ b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/full.md @@ -0,0 +1,313 @@ +# Weakly Supervised Temporal Action Localization via Representative Snippet Knowledge Propagation + +Linjiang Huang $^{1,2}$ Liang Wang $^{3}$ Hongsheng Li $^{1,2}$ * + +1CUHK-SenseTime Joint Laboratory, The Chinese University of Hong Kong + +$^{2}$ Centre for Perceptual and Interactive Intelligence, Hong Kong + +$^{3}$ Institute of Automation, Chinese Academy of Sciences + +ljhuang524@gmail.com, wangliang@nlpr.ia.ac.cn, hsli@ee.cuhk.edu.hk + +# Abstract + +Weakly supervised temporal action localization aims to localize temporal boundaries of actions and simultaneously identify their categories with only video-level category labels. Many existing methods seek to generate pseudo labels for bridging the discrepancy between classification and localization, but usually only make use of limited contextual information for pseudo label generation. To alleviate this problem, we propose a representative snippet summarization and propagation framework. Our method seeks to mine the representative snippets in each video for propagating information between video snippets to generate better pseudo labels. For each video, its own representative snippets and the representative snippets from a memory bank are propagated to update the input features in an intra-and inter-video manner. The pseudo labels are generated from the temporal class activation maps of the updated features to rectify the predictions of the main branch. Our method obtains superior performance in comparison to the existing methods on two benchmarks, THUMOS14 and ActivityNet1.3, achieving gains as high as $1.2\%$ in terms of average mAP on THUMOS14. Our code is available at https://github.com/LeonHLJ/RSKP. + +# 1. Introduction + +Temporal action localization in videos has a wide range of applications in different scenarios. This task aims to localize action instances in untrimmed videos along the temporal dimension. Most existing methods [4, 18, 19, 46, 54] are trained in a fully supervised manner where both video-level labels and frame-wise annotations are provided. In contrast to these strong supervision based methods, weakly-supervised temporal action localization method attempt to localize action instances in videos, leveraging only video-level supervisions. This setting enables the method to by + +![](images/a0c60b538778b4a705d1415ae44be67fd9d37b4d3ee4c34779c36665c6872e1d.jpg) +Figure 1. Two examples of the action of "Clean and Jerk". The barcode is the ground-truth (GT). The line charts are snippet-wise classification scores. We show the detection results of two methods, TSCN [50] and STPN [33]. The instance in the orange box is hard for both the two methods, because most of the snippets show only a part of the athlete. In contrast, the instances (black box and green box) with frontal view and whole body is much easier to be detected. A direct way to address this issue would be to propagate (red lines) knowledge of representative snippets to other snippets. + +pass the manual annotations of temporal boundaries, which are laborious, expensive and prone to large variations [39]. + +Due to the absence of fine-grained annotations, existing works mainly embrace a localization-by-classification pipeline [42, 53], where a classifier is trained with video-level annotations of action categories [31] and is used to obtain a sequence of class logits or predictions, i.e., temporal class activation maps (TCAMs). Usually, detection results are obtained from TCAMs via a post-processing step [33,42] (e.g., thresholding) or a localization branch [23,41]. Therefore, the quality of TCAMs determines the upper bound of the model. However, there is generally be a discrepancy between classification and localization [20,22,24]. Since each video generally contains multiple snippets1, with only video-level annotations, the model would easily focus on the contextual background or discriminative snippets that contribute most to video-level classification, which hin + +ders the generation of high quality TCAMs. + +To address this issue, pseudo label-based methods [27, 35, 49, 50] were proposed to generate snippet-wise pseudo labels for bridging the gap between classification and localization. However, existing methods only leverage limited information, i.e., the information within each snippet, to generate pseudo labels, which is insufficient to generate high quality pseudo labels. In Figure 1, we show the detection results of two methods. The first method TSCN [50] is a pseudo label-based method, while the second method STPN [33] is a simple baseline model without using pseudo labels. As we can see, even if TSCN achieves much gain over STPN, neither of the two methods successfully detects the difficult action instance in the orange box, which only shows partial body of the athlete. Obviously, the pseudo labels generated from the inaccurate TCAMs are also inaccurate. In contrast, for the easy instance, e.g., the one in the blue box, both of the two methods accurately detect it. + +The above observation motivate us to introduce contextual information for pseudo label generation. Specifically, we propose to propagate the knowledge of those representative snippets (e.g., the black and blue boxes in Figure 1) in an intra- and inter-video manner to facilitate the pseudo label generation, especially for those difficult snippets (e.g., the orange box in Figure 1). To achieve this goal, a major issue is how to determine the representative snippets and how to propagate their useful knowledge to other snippets. Besides, it should be effective to summarize and propagate snippet-level knowledge across videos, so as to take advantage of the large variation of videos in a large scale dataset. + +We present a representative snippet knowledge propagation framework. To facilitate knowledge propagation, we propose to mine the representative snippets, which can mitigate the influence of outlier snippets to serve as a bridge to propagate knowledge between snippets. Specifically, we utilize the expectation-maximization (EM) attention [17] to handle the variations caused by different camera views [51], sub-action differences [8, 20], confusing background context [22, 24] and to capture the important semantic of each video, which are severed as the representative snippets in our method. After that, we employ a memory bank to store representative snippets of high confidence for each class. This design enables our method to leverage representative snippets in an inter-video fashion, and also avoids much GPU memory cost during training. Furthermore, to propagate the knowledge of representative snippets, we propose a bipartite random walk (BiRW) module, which integrates the random walk operation to update the features of the input video with intra- and inter-video representative snippets. The TCAMs of the updated features serve as online refined pseudo labels to rectify the predictions of the main branch. + +The contribution of this paper is three-fold. (a) We propose a novel representative snippet knowledge propagation framework for weakly supervised temporal action localization, which generates better pseudo labels via representative + +snippet knowledge propagation to effectively alleviates the discrepancy between classification and detection. (b) The proposed framework can be applied to most existing methods to consistently improve their localization performance. (c) Compared with state-of-the-art methods, the proposed framework yields improvements of $1.2\%$ and $0.6\%$ average mAP on THUMOS14 and ActivityNet1.3. + +# 2. Related Work + +As stated in [20, 30, 31], there is generally a discrepancy between classification and localization in this task. Recently, many efforts have been made to solve this issue. We divide these methods into four categories. + +The first category is the metric learning-based methods. For example, W-TALC [36], 3C-Net [32], RPN [7] and A2CL-PT [29] employed the center loss [44], clustering loss [48], triplet loss [40], etc. to learn intra-class compact features. However, these methods starts from the perspective of classification, that is, they learn video-level foreground features [7, 36] or class-wise features [29, 32] to enforce intra-class compactness. Whereas, these video-level features are aggregated from those discriminative snippets, they can hardly influence those less-discriminative features in the snippet-level. In contrast, our method is from the perspective of detection, which generates better snippet-wise pseudo labels by propagating the knowledge of representative snippets, so as to obtain better detection results. + +The second category is the erasing-based methods, whose representative methods are Step-by-Step Erosion [55] and A2CL-PT [29]. These methods is based on the adversarial complementary learning [52], which first finds the discriminative regions and then tries to weight more less-discriminative regions from the remaining regions. However, it is difficult to set a proper number of steps for different categories with different complexities. + +The methods of the third category are built on a multi-branch [20] or multi-attention architecture [9, 10, 22, 24]. These methods adopted a similar idea to the second category's methods, except for the parallel processing. To avoid trivial solutions, these methods require additional regularization terms to make branches or attention scores different or complementary. Likewise, it is difficult to define a proper number of branches or attentions for all action categories. Our method is also a multi-branch architecture. However, the additional branch generates online pseudo labels for the main branch. Therefore, instead of forcing branches to be different, we force them to be similar. + +The fourth category is the pseudo label-based methods. RefineLoc [35] is the first method that generates snippet-level hard pseudo labels for WTAL. However, it simply expanded previous detection results to obtain pseudo labels, which may result in over-complete proposals. EM-MIL [27] put the pseudo-label generation into an expectation-maximization framework. TSCN [50] proposed to generate + +![](images/5027f2dfe5e87630719431616cd6f0d056f429ba5415848009869de27daa9807.jpg) +Figure 2. The overview of our method. We first extract snippet-wise features by using a fixed-weighted backbone network appended with a small learnable network. We utilize the expectation-maximization (EM) Attention [17] to learn a Gaussian mixture model (GMM) for each video, whose mean vectors are treated as the representative snippets. We use a memory bank to store representative snippets with high prediction scores for each class. To propagate representative snippets, we propose a bipartite random walk (BiRW) module to gradually update the original features. Given the original features and the updated features, we feed them into three parallel classification heads with sharing parameters. The output TCAMs of the two branches of the updated features are first fused and then serve as the online refined pseudo labels to rectify the predictions of the main branch. + +snippet-level pseudo labels from late fusion attention sequence. UGCT [49] presented an uncertainty guided collaborative training strategy to generate pseudo labels with modality collaborative learning and uncertainty estimation. Despite the success of these methods, they leverage little contextual information for pseudo label generation. + +# 3. Proposed Method + +In this section, we elaborate on the proposed method. The illustration of the overall method is shown in Figure 2. + +Problem definition. Let $V = \{v_{t}\}_{t=1}^{L}$ be a video of temporal length $L$ . Each video is divided into a series of non-overlapping snippets. Assume that we have a set of $N$ training videos $\{V_{i}\}_{i=1}^{N}$ being annotated with their action categories $\{y_{i}\}_{i=1}^{N}$ , where $y_{i}$ is a binary vector indicating the presence/absence of each of $k$ action. During inference, for a video, we predict a set of action instances $\{(c, q, t_{s}, t_{e})\}$ , where $c$ denotes the predicted action class, $q$ is the confidence score, $t_{s}$ and $t_{e}$ represent the start time and end time. + +Overview. We propose a representative snippet knowledge summarization and propagation framework for generating better snippet-level pseudo labels to enhance the final localization performance. Pseudo labels have an important role for bridging the gap between classification and detection. Nevertheless, existing methods merely leverage contextual information for pseudo label generation, leading to inaccurate pseudo labels and compromising performance. Our key idea is to generate pseudo labels by propagating the knowledge of representative snippets, which act as a bridge between discriminative snippets and less-discriminative snippets, thereby indirectly propagate information between all snippets and producing accurate pseudo labels to improve the model's performance. In our method, we first extract video features by a feature extraction module. After that, we summarize the representative snippets from the extracted video features. The representative snippets with high confidence are maintained in a memory + +bank. For each video, we leverage both the intra- and inter-video representative snippets that are retrieved from the memory bank. A bipartite random walk module is introduced to update the video features with the two kinds of representative snippets. Given the video features and the updated video features, we feed them into three parallel classification heads with sharing parameters. The output TCAMs of the two branches corresponding to the updated features are first fused and then serve as the online refined pseudo labels to rectify the predictions of the main branch. + +Feature extraction. Given a video, we first divide it into a series of non-overlapping snippets. Following [33, 36], we utilize a fixed-weight backbone network, Inflated 3D (I3D) [3] pre-trained on the Kinetics-400 dataset [13], to encode appearance (RGB) and motion (optical flow) information into a $d = 2048$ dimensional feature for each snippet. The I3D features are encoded into latent embeddings $\mathbf{F} \in \mathbb{R}^{l \times d}$ with a convolutional layer, where $l$ is the number of video snippets of a video. We take $\mathbf{F}$ as the input of our model. + +Classification head. The classification head is used to generate TCAMs, it can be any existing WSTAL methods. To generate high-quality TCAMs and improve the lower bound of our method, we use the recent FAC-Net [9] as the classification head for its simple pipeline and promising performance. Note that, there are some modifications to FAC-Net in our method. First, we discard the class-wise foreground classification head in our method, since the commonly used class-agnostic attention head and multiple instance learning head already enable our method to achieve a high baseline performance. Second, we use the sigmoid rather than the softmax function to obtain normalized foreground scores. This setting enables our method to use the attention normalization term [50] to obtain highly confident representative snippets. Third, we do not use the hybrid attention strategy that is designed to alleviate the discrepancy between classification and detection. + +In the following sections, we first investigate how to obtain summarizations of the representative snippets and to + +propagate their information to all other snippets. + +# 3.1. Representative Snippet Summarization + +A naive way to obtain representative snippets would be to select the snippets with high prediction scores, i.e., discriminative snippets. However, as shown in Figure 3, even after large-scale pre-training, there are generally low similarities between discriminative snippets and other snippets of the same category. Intuitively, representative snippets should be able to describe most of the snippets of the same class, so as to act as a bridge to associate the snippets of the same class for knowledge propagation. It is therefore ineffective to directly propagate the information of the discriminative snippets to other snippets. Therefore, we propose to summarize the representations of video snippets to obtain representative snippets of each video. In Figure 3, we can see that using cluster centers via clustering video snippet features (e.g., $k$ -means, spectral clustering and agglomerative clustering) as the representative snippets achieves much better performance on building stronger relations with other snippets. According to our experiments, using the clustering methods to summarize representative snippets is important to achieve high detection performance. + +In this work, we employ the expectation-maximization (EM) attention [17] to generate the representative snippets of each video. EM attention uses a special EM algorithm based on Gaussian mixture model (GMM) [37]. Specifically, a separated GMM is adopted to capture the feature statistics of each video and models the distribution of $\mathbf{f}_i\in \mathbb{R}^d$ (the $i$ -th snippet feature of $\mathbf{F}\in \mathbb{R}^{l\times d}$ ) as a linear composition of Gaussians as follow, + +$$ +p \left(\mathbf {f} _ {i}\right) = \sum_ {k = 1} ^ {n} z _ {i k} \mathcal {N} \left(\mathbf {f} _ {i} \mid \boldsymbol {\mu} _ {k}, \boldsymbol {\Sigma} _ {k}\right), \tag {1} +$$ + +where $n$ is the number of Gaussians, $\pmb{\mu}_k\in \mathbb{R}^d$ $\pmb {\Sigma}_k\in \mathbb{R}^{d\times d}$ and $z_{ik}$ denote the mean, covariance and weight for the $k$ -th Gaussian. Following [17], we replace the covariance with identity matrix I and leave out it in the following equations. + +As shown in Figure 4 (top), the EM attention starts from the randomly initialized means $\pmb{\mu}^{(0)} \in \mathbb{R}^{n \times d}$ . At the $t$ -th iteration, it first performs the E step to calculate the new weights $\mathbf{Z}^{(t)} \in \mathbb{R}^{t \times n}$ of Gaussians as + +$$ +\mathbf {Z} ^ {(t)} = \operatorname {s o f t m a x} \left(\lambda \operatorname {N o r m} _ {2} (\mathbf {F}) \operatorname {N o r m} _ {2} \left(\boldsymbol {\mu} ^ {(t - 1)}\right) ^ {\top}\right), \tag {2} +$$ + +where $\lambda$ denotes a hyper-parameter to control the smoothness of the distribution. The $\mathrm{Norm}_2(\mathbf{F})$ denotes the $l_{2}$ -norm along each row of $\mathbf{F}$ . The softmax operation is performed along each row of $\mathbf{Z}$ . Therefore, $z_{ik}^{(t)}$ denotes the probability that the snippet feature $\mathbf{f}_i$ is generated by the $k$ -th Gaussian. After the E step, the M step turns to update the means $\pmb{\mu}$ as + +$$ +\boldsymbol {\mu} ^ {(t)} = \operatorname {N o r m} _ {1} \left(\mathbf {Z} ^ {(t)}\right) ^ {\top} \mathbf {F}, \tag {3} +$$ + +where $\mathrm{Norm}_1(\mathbf{Z}^{(t)})$ denotes the column-wise $l_{1}$ normalization for $\mathbf{Z}^{(t)}$ . We can see that Equation (3) updates the + +![](images/a78c1da5e203ef7f01103daac3e79ae89d514ec24be7b175e3e0bd3c025e8282.jpg) +Figure 3. We assign each representative snippet with the label of its nearest snippet and then select the snippets of the same category according to the ground truth. We plot the proportion of the number of snippets, whose similarities to the representative snippet are higher than a certain threshold (0.1:0.9), to the total number of snippets of the same category. The results of EM-Att is calculated upon our full model. Other results are based on the features of a well learned baseline model, which takes the video features $\mathbf{F}$ as input and contains one classification head. + +means using the weighted summation of the features $\mathbf{F}$ . The $i$ -th row and the $k$ -th column of $\mathrm{Norm}_1(\mathbf{Z}^{(t)})$ represents the membership values of the feature $\mathbf{f}_i$ to the $k$ -th Gaussian. Besides, the normalization also ensures the updated $\pmb{\mu}$ lies in the same embedding space as $\mathbf{F}$ . Therefore, alternately executing Equations (2) and (3) captures global contexts of a video in a non-local [43] but more efficient way, owing to the much smaller size of the means $\pmb{\mu}^{(t)} \in \mathbb{R}^{n \times d}$ compared with the video features $\mathbf{F} \in \mathbb{R}^{l \times d}$ ( $l \gg n$ ). + +We integrate two EM iterations in our network to obtain the promising representative snippets (i.e., $\pmb{\mu}^{(2)}$ ). As a result, unlike [17] that uses the moving averaging to update the initialized means $\pmb{\mu}^{(0)}$ to prevent gradient vanishing or explosion caused by too many iterations, we update the initialized means by standard back propagation. Besides, it is interesting that when we initialize $\pmb{\mu}^{(0)}$ with a (semi) orthogonal matrix [38], even if we fix the initialized means (i.e., EM-Att w/o BP in Figure 3), the obtained representative snippets are more representative than the cluster centers of other clustering methods. In our experiments, EM attention without back propagation achieves much better performance than other clustering methods. When we update the initial means $\pmb{\mu}^{(0)}$ by standard back propagation (i.e., EM-Att in Figure 3), they can capture the feature distribution of the dataset and achieves the optimal performance. + +To make the equations clear and avoid confusion, we denote the online calculated representative snippets as $\pmb{\mu}^a$ . + +# 3.2. Representative Snippet Memory Bank + +After obtaining the representative snippets of each video, we use a memory bank to store representative snippets of all videos with high confidence for each class. The insight is that different videos may contain action instances of the + +![](images/6ef0d332c59d903df80cf2f870038777e78b5b877c9c22a655ea4b6fa0c419e2.jpg) +Figure 4. Illustration of the representative snippet summarization (top) and representative snippet propagation (bottom). The gray lines denote the E step, while the red lines denote the M step. + +same class but with different appearances. Therefore, propagating representative snippets in an inter-video manner via the memory bank takes advantage of the large variation of many videos of each class to facilitate the network to recognize those difficult action instances. + +Specifically, we maintain two memory tables for storing the features of representative snippets and their scores, respectively. We denote the memory table of the representative snippets as $\mathbf{M} \in \mathbb{R}^{c \times s \times d}$ , where $c$ is the number of classes and $s$ denotes the number of memory slots (representative snippets) for each class. Given the representative snippets of a video, we utilize the action classifier in the classification head to obtain their class predictions. We then compare their prediction scores of the ground truth class with the representative snippets in the memory table $\mathbf{M}$ , the ones with higher prediction scores are archived into the memory table $\mathbf{M}$ . Simultaneously, the corresponding scores in the score memory table are also updated. In summary, we only keep the representative snippets of the top- $s$ scores in the memory table $\mathbf{M}$ . + +Consequently, for each video, we have the online representative snippets $\pmb{\mu}^a$ learned from the current video, and the offline representative snippets $\pmb{\mu}^e$ retrieved from the memory table $\mathbf{M}$ corresponding to the ground truth classes. + +# 3.3. Representative Snippet Propagation + +Given the online and offline representative snippets $\pmb{\mu}^a$ and $\pmb{\mu}^{e}$ , a challenge is how to propagate the representative snippets to snippet features $\mathbf{F}$ of the current video. Intuitively, a direct way is to use the affinity $\mathbf{Z}^*$ ( $*$ is $a$ or $e$ corresponding to $\pmb{\mu}^a$ or $\pmb{\mu}^{e}$ ) calculated by Equation (2) to conduct a random walk operation [1] as $\mathbf{Z}^*\pmb{\mu}^*$ . In practice, we would like the updated features do not deviate too far from the video features $\mathbf{F}$ . Therefore, the propagation process can be formulated as $\mathbf{F}^* = w\cdot \mathbf{Z}^*\pmb{\mu}^* + (1 - w)\cdot \mathbf{F}$ , where $w$ denotes a parameter $[0,1]$ that controls the trade-off between feature propagation and the original features. However, even if the representative snippets have high similarities with most of the snippets of the same class, it is + +impractical to fully propagate the knowledge of the representative snippets via a single pass of propagation. We find that, the representative snippets $\pmb{\mu}^{*}$ and the video features $\mathbf{F}$ actually make up a complete bipartite graph, whose affinities are depicted by $\mathbf{Z}^{*}$ . Therefore, we propose a bipartite random walk (BiRW) module to enable multiple passes of propagation to fully fuse representative snippets' knowledge into the video snippet features. + +Specifically, there are multiple iterations in the BiRW. At the $t$ -th iteration, the propagation process is formulated as + +$$ +\boldsymbol {\mu} ^ {* (t)} = w \cdot \operatorname {N o r m} _ {1} (\mathbf {Z} ^ {*}) ^ {\top} \mathbf {F} ^ {* (t - 1)} + (1 - w) \cdot \boldsymbol {\mu} ^ {* (0)}, \tag {4} +$$ + +$$ +\mathbf {F} ^ {* (t)} = w \cdot \mathbf {Z} ^ {*} \boldsymbol {\mu} ^ {* (t)} + (1 - w) \cdot \mathbf {F} ^ {* (0)}, \tag {5} +$$ + +where $\mathbf{F}^{*(0)}$ and $\pmb{\mu}^{*(0)}$ are the video snippet features $\mathbf{F}$ and the representative snippets $\pmb{\mu}^a$ or $\pmb{\mu}^e$ , respectively. As shown in Figure 4 (bottom), Equations (4) and (5) can be also viewed as a EM process, which fixes the affinity $\mathbf{Z}^*$ to alternately update $\mathbf{F}$ and $\pmb{\mu}^*$ . The representative snippets therefore not only are used for propagating representative knowledge (Equation (5)) but also serve as a bridge to propagate the knowledge between the features of $\mathbf{F}$ (Equation (4)). Due to their representativeness, they can better propagate information between features of the same class. This process can be conducted for multiple times to fully fuse representative snippets' knowledge. To avoid gradient vanishing or explosion caused by the unrolled computational graph, we use an approximate inference formulation as (the detail is available in the supplementary materials) + +$$ +\mathbf {F} ^ {*} = (1 - w) \left(\mathbf {I} - w ^ {2} \mathbf {Z} ^ {*} \operatorname {N o r m} _ {1} \left(\mathbf {Z} ^ {*}\right) ^ {\top}\right) ^ {- 1} \left(w \mathbf {Z} ^ {*} \boldsymbol {\mu} ^ {*} + \mathbf {F}\right). \tag {6} +$$ + +We can also follow Equation (6) to obtain further refined representative snippets to store in the memory bank. Nevertheless, we find that this way achieves comparable performance with using the original representative snippets. The reason may be that $\pmb{\mu}^{a}$ has been stable enough after several EM iterations. Besides, there is another feasible way to update the video features $\mathbf{F}$ by fixing the representative snippets $\pmb{\mu}^{*}$ and alternately updating $\mathbf{F}$ and $\mathbf{Z}^{*}$ . Nevertheless, its performance is comparable with Equations (4) and (5) but inferior to Equation (6). Note that, rather than concatenating $\pmb{\mu}^{a}$ and $\pmb{\mu}^{e}$ to propagate representative snippets, we use Equation (6) to propagate the knowledge of $\pmb{\mu}^{a}$ and $\pmb{\mu}^{e}$ , respectively. This design is to prevent $\pmb{\mu}^{a}$ , which is extracted from the same video of $\mathbf{F}$ , being dominated in the propagation. Consequently, after representative snippet propagation, we obtain the updated intra-video features $\mathbf{F}^{a}$ and the updated inter-video features $\mathbf{F}^{e}$ , respectively. + +# 3.4. Training Objectives + +Given the original video snippet features $\mathbf{F}$ and the updated features $\mathbf{F}^a$ , $\mathbf{F}^e$ , we feed them into three parallel classification heads with sharing parameters to output their TCAMs $\mathbf{T}$ , $\mathbf{T}^a$ and $\mathbf{T}^e$ , respectively. The TCAMs $\mathbf{T}^a$ and + +$\mathbf{T}^e$ are weightedly summed to obtain the TCAMs $\mathbf{T}^f$ that contains both intra- and inter-video representative snippet knowledge. We take $\mathbf{T}^f$ as the online pseudo labels for supervising the TCAMs $\mathbf{T}$ as + +$$ +\mathcal {L} _ {k d} = - \frac {1}{l} \sum_ {i = 1} ^ {l} \mathbf {T} ^ {f} (i) \log (\mathbf {T} (i)), \tag {7} +$$ + +where $l$ is the number of snippets. The total loss is the summation of the loss $\mathcal{L}_{kd}$ , the video classification loss $\mathcal{L}_{cls}$ of the three classification heads and the attention normalization loss $\mathcal{L}_{att}$ [50] that is only applied to the main branch. + +$$ +\mathcal {L} = \mathcal {L} _ {c l s} + \alpha \mathcal {L} _ {k d} + \beta \mathcal {L} _ {a t t}, \tag {8} +$$ + +where $\alpha$ and $\beta$ are balancing hyper-parameters. + +# 4. Experiments + +# 4.1. Datasets + +THUMOS14. [12] We use the subset from THUMOS14 that offers frame-wise annotations for 20 classes. We train the model on 200 untrimmed videos in its validation set and evaluate it on 212 untrimmed videos from the test set. + +ActivityNet1.3. [2] This dataset covers 200 daily activities and provides 10,024 videos for training, 4,926 for validation and 5,044 for testing. We use the training set to train our model and the validation set to evaluate our model. + +# 4.2. Implementation Details + +Training details. Our method is trained with a minibatch size of 10 and 16 with Adam [14] optimizer for THUMOS14 and ActivityNet1.3, respectively. The hyperparameters $w$ , $\lambda$ , $\alpha$ and $\beta$ are 0.5, 5.0, 1.0 and 0.1, respectively. Since the representative snippets are not well learned at the beginning, we only utilize the intra-video representative snippets in the first 100 epochs, and then add the memory bank into the training process. The training procedure stops at 200 epochs with the learning rate $5 \times 10^{-5}$ . + +Testing details. We take the whole sequence of a video as input for testing. When localizing action instances, the class activation sequence is upsampled to the original frame rate. We utilize the main branch and the branch of intra-video representative snippets for testing. Their video prediction scores and TCAMs are fused by weighted sum. During detection, We first reject the category whose class probability is lower than 0.1. Following [15], we use a set of thresholds to obtain the predicted action instances. + +# 4.3. Comparison with State-of-the-art Methods + +We compare our method with state-of-the-art weakly supervised methods and several fully supervised methods. The results are shown in Tables 1 and 2. On the THU-MOS14 dataset, our method evidently outperforms the previous weak-supervised approaches in terms of almost all metrics. On the important criterion: average mAP (0.1:0.5), + +Table 1. Results on ActivityNet1.3 validation set. AVG indicates the average mAP at IoU thresholds 0.5:0.05:0.95. + +
MethodmAP @ IoU
0.50.750.95AVG
TAL-Net [4]38.218.31.320.2
BSN [19]46.530.08.030.0
GTAN [25]52.634.18.934.3
BaS-Net (I3D) [15]34.522.54.922.2
A2CL-PT (I3D) [29]36.822.05.222.5
ACM-BANet (I3D) [30]37.624.76.524.4
TSCN (I3D) [50]35.321.45.321.7
WUM (I3D) [16]37.023.95.723.7
TS-PCA (I3D) [21]37.423.55.923.7
UGCT (I3D) [49]39.122.45.823.8
AUMN (I3D) [26]38.323.55.223.5
FAC-Net (I3D) [9]37.624.26.024.0
Ours (I3D)40.624.65.925.0
+ +we surpass the state-of-the-art method [6] by $1.2\%$ . We also notice that our method achieves better results at IoU 0.1 to 0.5 compared with some recent fully-supervised methods. Even if some methods (i.e., Weak $\dagger$ in Table 2) utilize additional weak supervisions, such as action frequency, our method still outperforms these methods, indicating the effectiveness of our method. On the larger ActivityNet1.3, our method still outperforms all existing weakly supervised methods by $0.6\%$ on average mAP. + +# 4.4. Ablation Study + +We conduct a series of ablation studies on THUMOS14. Unless explicitly stated, we do not utilize the memory bank. + +Representative snippet summarization. To validate the effectiveness of the representative snippets, we need to consider: (1) Is generating the representative snippets necessary? (2) If yes, what is an effective way to generate the representative snippets? To answer the two questions, we conduct several experiments in Tables 3 and 4. + +We first define a baseline model, which is the same as our main branch that comprises one classification head and also uses the attention normalization loss. As we can see, when we introduce the representative snippets and add the second branch that takes the refined features $\mathrm{F}^a$ as input, even if without the supervision between the two branches, the performance is significantly improved over the baseline model. This phenomenon demonstrates the importance of the representative snippets, which makes the model to focus on the representative snippets and thus improves the recognition ability for the whole action class. When we further utilize the TCAMs of the updated features as the online pseudo labels, our method achieves absolute gains of $4.1\%$ and $7.4\%$ in terms of average mAP, over the method with only representative snippets and the baseline model. To further validate the necessity of the representative snippets, we replace representative snippets with the original video features $\mathbf{F}$ , + +Table 2. Comparisons of detection performance on THUMOS14. UNT and I3D represent UntrimmedNet features and I3D features, respectively. $\dagger$ means that the method utilizes additional weak supervisions, e.g., action frequency. + +
SupervisionMethodFeaturemAP @ IoU (%)AVG (0.1:0.5)AVG (0.3:0.7)AVG (0.1:0.7)
0.10.20.30.40.50.60.7
FullSSN [54] (ICCV'17)-60.356.250.640.829.1--49.6--
BSN [19] (ECCV'18)---53.545.036.928.420.0-36.8-
GTAN [25] (CVPR'19)-69.163.757.847.238.8--55.3--
Weak †STAR [47] (AAAI'19)I3D68.860.048.734.723.0--47.0--
3C-Net [32] (ICCV'19)I3D59.153.544.234.126.6-8.143.5--
WeakCleanNet [23] (ICCV'19)UNT--37.030.923.913.97.1-22.6-
RPN [7] (AAAI'20)I3D62.357.048.237.227.916.78.146.527.636.8
TSCN [50] (ECCV'20)I3D63.457.647.837.728.719.410.247.028.837.8
EM-MIL [27] (ECCV'20)I3D59.152.745.536.830.522.716.445.030.437.7
A2CL-PT [29] (ECCV'20)I3D61.256.148.139.030.119.210.646.929.437.8
HAM-Net [10] (AAAI'21)I3D65.459.050.341.131.020.711.149.430.839.8
WUM [16] (AAAI'21)I3D67.561.252.343.433.722.912.151.632.941.9
AUMN [26] (CVPR'21)I3D66.261.954.944.433.320.59.052.132.441.5
CoLA [51] (CVPR'21)I3D66.259.551.541.932.222.013.150.332.140.9
TS-PCA [21] (CVPR'21)I3D67.661.153.443.434.324.713.752.033.942.6
UGCT [49] (CVPR'21)I3D69.262.955.546.535.923.811.454.034.643.6
ASL [28] (CVPR'21)I3D67.0-51.8-31.1-11.4---
CO2-Net [6] (MM'21)I3D70.163.654.545.738.326.413.454.435.644.6
D2-Net [31] (ICCV'21)I3D65.760.252.343.436.0--51.5--
FAC-Net [9] (ICCV'21)I3D67.662.152.644.333.422.512.752.033.142.2
OursI3D71.365.355.847.538.225.412.555.635.945.1
+ +Table 3. Evaluation of the necessity and effectiveness of the representative snippet generation. Baseline comprises one classification head and takes the video snippet features $\mathbf{F}$ as input. + +
MethodmAP @ IoU
0.30.50.7AVG
Baseline45.229.910.236.8
+ representative snippets48.733.111.540.1
+ pseudo label supervision54.537.312.544.2
+ memory bank55.838.212.545.1
replace μa with F52.435.511.742.4
+ +Table 4. Evaluation of different approaches of generating representative snippets. EM-Att denotes the EM attention. + +
MethodmAP @ IoU
0.30.50.7AVG
Discriminative snippets45.025.06.834.8
k-Means51.734.111.741.5
Agglomerative Clustering50.032.311.240.1
Spectral Clustering50.531.611.140.4
EM-Att w/o BP53.135.212.142.8
EM-Att54.537.312.544.2
+ +and thus the BiRW module becomes a vanilla random walk module. It is noteworthy that the replace $\mu^a$ with $\mathbf{F}$ in Table 3 also obtains significant gain over the baseline model, but $1.8\%$ lower on average mAP than our method using the representative snippets under the same setting. Besides, our method contains both the intra- and inter-video representative snippets achieves the best performance of $45.1\%$ on average mAP, indicating the importance of propagating the representative snippets across videos. + +To answer the second questions, we also explore sev- + +Table 5. Evaluation of the representative snippet propagation. + +
MethodmAP @ IoU
0.30.50.7AVG
Random walk Za μa45.025.06.834.8
Equation (6)54.537.312.544.2
Propagate scores49.528.88.238.5
Propagate features w/o Lcls48.228.48.337.7
+ +eral strategies for representative snippet generation. As discussed earlier, we first verify the way of selecting discriminative snippets. It is unsurprised that this way deteriorates the performance of the baseline model, because it makes the model only focus on those discriminative snippets and thus weakens the detection ability. In contrast, some traditional clustering methods, such as $k$ -means, agglomerative clustering and spectral clustering achieve evident gains over the baseline model. We also evaluate the DBSCAN [5]. However, as training progresses, it is hard to update proper hyper-parameters for DBSCAN, leading to very low performance. It is noteworthy that the EM-Att w/o BP achieves a high performance of $42.8\%$ in terms of average mAP, which is much better than other clustering methods. It may attribute to its orthogonal initialization, which enables the learned representative snippets to concentrate on different video parts. Besides, the performance is further improved by $1.4\%$ when we allow back propagation. More experimental results are provided in the supplementary materials. + +Representative snippet propagation. Several comparative experiments are conducted to evaluate the effectiveness of representative snippet propagation, with results posted in Table 5. We first evaluate some variants of the representative snippet propagation. We notice that the random walk + +![](images/cd6d01f39bce9701ba402a2fda8035639294d6a24b90173e50b14e2d7ffa420d.jpg) +Figure 5. The detection results of two implementations of Equations (4) and (5) with different iteration numbers. + +Table 6. The detection results of applying our method to existing methods. Embedding means we add a learnable network after the backbone network to learn the video features. The results of the original methods are reproduced. + +
MethodmAP @ IoU
0.30.50.7AVG
STPN [33] + embedding38.419.14.728.9
STPN + embedding + Ours46.521.85.833.7 ↑4.8
BM [34]45.226.28.735.3
BM + Ours47.429.39.237.7 ↑2.4
WUM [16]51.032.810.940.4
WUM + Ours53.534.012.742.4 ↑2.0
FAC-Net [9]53.234.413.742.9
FAC-Net + Ours55.838.413.345.2 ↑2.3
+ +$\mathbf{Z}^a \pmb{\mu}^a$ deteriorates the performance. In contrast, as shown in Figure 5, even if we weightedly sum $\mathbf{Z}^a \pmb{\mu}^a$ with the original features (i.e., iteration 1), the performance would be significantly improved, indicating that $\mathbf{Z}^a \pmb{\mu}^a$ deviates too much from the original video features $\mathbf{F}$ . Moreover, the performance improves as the number of iterations increases. However, when the number of iterations is too large, the performance slightly drops, which might be caused by gradient vanishing or explosion even if there are residual connections (weighted summation with the video features). Despite their promising performance, our proposed approximation inference obtain the optimal result. + +We further validate two more variants of propagation. The first variant, propagate scores, follows a knowledge ensembling way to propagate prediction scores of the representative snippets rather than their features. Therefore, only the main branch has the video-level classification losses. The second variant, propagate features $w / o \mathcal{L}_{cls}$ , also propagates the features of representative snippets but removes the video-level classification losses. Both variants have gains over the baseline model but are much inferior to our final solution. Therefore, the two additional branches not only provide online pseudo labels, but also enforce the model to focus on the representative snippets, thus improving the model's ability to localize action instances. + +Integrating our framework to existing methods. In Table 6, we replace our classification heads with some existing methods. In these experiments, we use the default settings of these methods to ensure fair comparisons. Besides, if there are additional losses in these methods, we only impose + +![](images/59f2331efc09722ef71890208355a50393726e7bfd2a458621b142a79cb6d1d6.jpg) +Figure 6. We show the qualitative results of two examples of shot-put and diving on THUMOS14 [12]. PL denotes the pseudo label. + +them on the main branch. As we can see, either for some early methods or state-of-the-art methods, our method can consistently improve their performances. + +# 4.5. Qualitative results + +We visualize some examples of detected action instances and generated pseudo labels in Figure 6. In the first example of shootout, compared with TSCN [50], our method generates more accurate pseudo labels to successfully detect the third action instance (black rectangle). In the second example of diving, our method leverages the knowledge of the representative snippets of background to effectively suppress the responses of the background. + +# 5. Conclusion and Limitation + +We propose a representative snippet summarization and propagation framework. Our method aims to generate better pseudo labels by propagating the knowledge of representative snippets. We summarize the representative snippets in each video and maintain a memory table to store representative snippets. For each video, the intra- and inter-video representative snippets are propagated to update the video features. The temporal class activation maps of the updated features serve as the online pseudo labels to rectify the predictions of the main branch. Our method achieves the state-of-the-art performance on two popular datasets and can consistently improve the performance of existing methods. + +Due to the matrix inversion during propagation, the training time of one epoch in our method is almost twice as long as the baseline model. We will resort to some efficient matrix inversion strategies to solve this issue in the future. + +# Acknowledgement + +This work is supported in part by Centre for Perceptual and Interactive Intelligence Limited, in part by the General Research Fund through the Research Grants Council of Hong Kong under Grants (Nos. 14204021, 14207319), in part by CUHK Strategic Fund. + +# References + +[1] David Aldous and Jim Fill. Reversible markov chains and random walks on graphs, 2002. 5 +[2] Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In CVPR, pages 961-970. IEEE, 2015. 6 +[3] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, pages 6299-6308. IEEE, 2017. 3 +[4] Yu-Wei Chao, Sudheendra Vijayanarasimhan, Bryan Seybold, David A Ross, Jia Deng, and Rahul Sukthankar. Rethinking the faster r-cnn architecture for temporal action localization. In CVPR, pages 1130–1139. IEEE, 2018. 1, 6 +[5] Martin Ester, Hans-Peter Kriegel, Jörg Sander, and Xiaowei Xu. A density-based algorithm for discovering clusters in large spatial databases with noise. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, pages 226-231, 1996. 7 +[6] Fa-Ting Hong, Jia-Chang Feng, Dan Xu, Ying Shan, and Wei-Shi Zheng. Cross-modal consensus network for weakly supervised temporal action localization. In ACM MM. ACM, 2021. 6, 7 +[7] Linjiang Huang, Yan Huang, Wanli Ouyang, and Liang Wang. Relational prototypical network for weakly supervised temporal action localization. In AAAI, volume 34, pages 11053-11060, 2020. 2, 7 +[8] Linjiang Huang, Yan Huang, Wanli Ouyang, and Liang Wang. Modeling sub-actions for weakly supervised temporal action localization. IEEE TIP, 30:5154-5167, 2021. 2 +[9] Linjiang Huang, Liang Wang, and Hongsheng Li. Foreground-action consistency network for weakly supervised temporal action localization. In ICCV, pages 8002-8011. IEEE, 2021. 2, 3, 6, 7, 8 +[10] Ashraful Islam, Chengjiang Long, and Richard Radke. A hybrid attention mechanism for weakly-supervised temporal action localization. In AAAI, volume 35, pages 1637-1645, 2021. 2, 7 +[11] Dinesh Jayaraman and Kristen Grauman. Slow and steady feature analysis: higher order temporal coherence in video. In CVPR, pages 3852-3861. IEEE, 2016. 1 +[12] Y.-G. Jiang, J. Liu, A. Roshan Zamir, G. Toderici, I. Laptev, M. Shah, and R. Sukthankar. THUMOS challenge: Action recognition with a large number of classes. http://crcv.ucf.edu/THUMOS14/, 2014. 6, 8 +[13] 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. 3 +[14] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[15] Pilhyeon Lee, Youngjung Uh, and Hyeran Byun. Background suppression network for weakly-supervised temporal action localization. In AAAI, volume 34, pages 11320-11327, 2020. 6 + +[16] Pilhyeon Lee, Jinglu Wang, Yan Lu, and Hyeran Byun. Weakly-supervised temporal action localization by uncertainty modeling. In AAAI, volume 35, pages 1854-1862, 2021. 6, 7, 8 +[17] Xia Li, Zhisheng Zhong, Jianlong Wu, Yibo Yang, Zhouchen Lin, and Hong Liu. Expectation-maximization attention networks for semantic segmentation. In ICCV, pages 9167-9176. IEEE, 2019. 2, 3, 4 +[18] Tianwei Lin, Xiao Liu, Xin Li, Errui Ding, and Shilei Wen. Bmn: Boundary-matching network for temporal action proposal generation. In ICCV, pages 3889-3898, 2019. 1 +[19] Tianwei Lin, Xu Zhao, Haisheng Su, Chongjing Wang, and Ming Yang. Bsn: Boundary sensitive network for temporal action proposal generation. In ECCV, pages 3-19. Springer, 2018. 1, 6, 7 +[20] Daochang Liu, Tingting Jiang, and Yizhou Wang. Completeness modeling and context separation for weakly supervised temporal action localization. In CVPR, pages 1298-1307. IEEE, 2019. 1, 2 +[21] Yuan Liu, Jingyuan Chen, Zhenfang Chen, Bing Deng, Jianqiang Huang, and Hanwang Zhang. The blessings of unlabeled background in untrimmed videos. In CVPR, pages 6176-6185. IEEE, 2021. 6, 7 +[22] Ziyi Liu, Le Wang, Wei Tang, Junsong Yuan, Nanning Zheng, and Gang Hua. Weakly supervised temporal action localization through learning explicit subspaces for action and context. In AAAI, volume 35, pages 2242-2250, 2021. 1, 2 +[23] Ziyi Liu, Le Wang, Qilin Zhang, Zhanning Gao, Zhenxing Niu, Nanning Zheng, and Gang Hua. Weakly supervised temporal action localization through contrast based evaluation networks. In ICCV, pages 3899-3908. IEEE, 2019. 1, 7 +[24] Ziyi Liu, Le Wang, Qilin Zhang, Wei Tang, Junsong Yuan, Nanning Zheng, and Gang Hua. Acsnet: Action-context separation network for weakly supervised temporal action localization. In AAAI, volume 35, pages 2233-2241, 2021. 1, 2 +[25] Fuchen Long, Ting Yao, Zhaofan Qiu, Xinmei Tian, Jiebo Luo, and Tao Mei. Gaussian temporal awareness networks for action localization. In CVPR, pages 344-353. IEEE, 2019. 6, 7 +[26] Wang Luo, Tianzhu Zhang, Wenfei Yang, Jingen Liu, Tao Mei, Feng Wu, and Yongdong Zhang. Action unit memory network for weakly supervised temporal action localization. In CVPR, pages 9969-9979. IEEE, 2021. 6, 7 +[27] Zhekun Luo, Devin Guillory, Baifeng Shi, Wei Ke, Fang Wan, Trevor Darrell, and Huijuan Xu. Weakly-supervised action localization with expectation-maximization multi-instance learning. In ECCV, pages 729-745. Springer, 2020. 2, 7 +[28] Junwei Ma, Satya Krishna Gorti, Maksims Volkovs, and Guangwei Yu. Weakly supervised action selection learning in video. In CVPR, pages 7587-7596. IEEE, 2021. 7 +[29] Kyle Min and Jason J Corso. Adversarial background-aware loss for weakly-supervised temporal activity localization. In ECCV, pages 283-299. Springer, 2020. 2, 6, 7 +[30] Md Moniruzzaman, Zhaozheng Yin, Zhihai He, Ruwen Qin, and Ming C Leu. Action completeness modeling with background aware networks for weakly-supervised temporal ac + +tion localization. In ACM MM, pages 2166-2174. ACM, 2020. 2, 6 +[31] Sanath Narayan, Hisham Cholakkal, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, and Ling Shao. D2-net: Weakly-supervised action localization via discriminative embeddings and denoised activations. In ICCV, pages 13608-13617. IEEE, 2021. 1, 2, 7 +[32] Sanath Narayan, Hisham Cholakkal, Fahad Shahbaz Khan, and Ling Shao. 3c-net: Category count and center loss for weakly-supervised action localization. In ICCV, pages 8679-8687. IEEE, 2019. 2, 7 +[33] Phuc Nguyen, Ting Liu, Gautam Prasad, and Bohyung Han. Weakly supervised action localization by sparse temporal pooling network. In CVPR, pages 6752-6761. IEEE, 2018. 1, 2, 3, 8 +[34] Phuc Xuan Nguyen, Deva Ramanan, and Charless C Fowlkes. Weakly-supervised action localization with background modeling. In ICCV, pages 5502-5511. IEEE, 2019. 8 +[35] Alejandro Pardo, Humam Alwassel, Fabian Caba, Ali Thabet, and Bernard Ghanem. Refineloc: Iterative refinement for weakly-supervised action localization. In Winter Conference on Applications of Computer Vision, pages 3319-3328. IEEE, 2021. 2 +[36] Sujoy Paul, Sourya Roy, and Amit K Roy-Chowdhury. W-talc: Weakly-supervised temporal activity localization and classification. In ECCV, pages 563-579. Springer, 2018. 2, 3 +[37] Sylvia Richardson and Peter J Green. On bayesian analysis of mixtures with an unknown number of components (with discussion). Journal of the Royal Statistical Society: series B (statistical methodology), 59(4):731-792, 1997. 4 +[38] Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.4 +[39] Konrad Schindler and Luc Van Gool. Action snippets: How many frames does human action recognition require? In CVPR, pages 1-8. IEEE, 2008. 1 +[40] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, pages 815-823. IEEE, 2015. 2 +[41] Zheng Shou, Hang Gao, Lei Zhang, Kazuyuki Miyazawa, and Shih-Fu Chang. Autoloc: Weakly-supervised temporal action localization in untrimmed videos. In ECCV, pages 154-171. Springer, 2018. 1 +[42] Limin Wang, Yuanjun Xiong, Dahua Lin, and Luc Van Gool. Untrimmednets for weakly supervised action recognition and detection. In CVPR, pages 4325-4334. IEEE, 2017. 1 +[43] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, pages 7794-7803. IEEE, 2018. 4 +[44] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, pages 499-515. Springer, 2016. 2 +[45] Laurenz Wiskott and Terrence J Sejnowski. Slow feature analysis: Unsupervised learning of invariances. Neural Computation, 14(4):715-770, 2002. 1 + +[46] Huijuan Xu, Abir Das, and Kate Saenko. R-c3d: Region convolutional 3d network for temporal activity detection. In ICCV, pages 5783-5792. IEEE, 2017. 1 +[47] Yunlu Xu, Chengwei Zhang, Zhanzhan Cheng, Jianwen Xie, Yi Niu, Shiliang Pu, and Fei Wu. Segregated temporal assembly recurrent networks for weakly supervised multiple action detection. In AAAI, volume 33, pages 9070-9078, 2019. 7 +[48] Hong-Ming Yang, Xu-Yao Zhang, Fei Yin, and ChengLin Liu. Robust classification with convolutional prototype learning. In CVPR, pages 3474-3482. IEEE, 2018. 2 +[49] Wenfei Yang, Tianzhu Zhang, Xiaoyuan Yu, Tian Qi, Yongdong Zhang, and Feng Wu. Uncertainty guided collaborative training for weakly supervised temporal action detection. In CVPR, pages 53-63. IEEE, 2021. 2, 3, 6, 7 +[50] Yuanhao Zhai, Le Wang, Wei Tang, Qilin Zhang, Junsong Yuan, and Gang Hua. Two-stream consensus network for weakly-supervised temporal action localization. In ECCV, pages 37-54. Springer, 2020. 1, 2, 3, 6, 7, 8 +[51] Can Zhang, Meng Cao, Dongming Yang, Jie Chen, and Yuexian Zou. Cola: Weakly-supervised temporal action localization with snippet contrastive learning. In CVPR, pages 16010-16019. IEEE, 2021. 2, 7 +[52] Xiaolin Zhang, Yunchao Wei, Jiashi Feng, Yi Yang, and Thomas S Huang. Adversarial complementary learning for weakly supervised object localization. In CVPR, pages 1325-1334. IEEE, 2018. 2 +[53] Tao Zhao, Junwei Han, Le Yang, and Dingwen Zhang. Equivalent classification mapping for weakly supervised temporal action localization. arXiv preprint arXiv:2008.07728, 2020. 1 +[54] Yue Zhao, Yuanjun Xiong, Limin Wang, Zhirong Wu, Xiaou Tang, and Dahua Lin. Temporal action detection with structured segment networks. In ICCV, pages 2914-2923. IEEE, 2017. 1, 7 +[55] Jia-Xing Zhong, Nannan Li, Weijie Kong, Tao Zhang, Thomas H Li, and Ge Li. Step-by-step erasion, one-by-one collection: A weakly supervised temporal action detector. In ACM MM, pages 35-44. ACM, 2018. 2 \ No newline at end of file diff --git a/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/images.zip b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..04cf8dc77af4e633fc3c5db3de2ad7fd2fa8bab9 --- /dev/null +++ b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6315b55f7b72d2cbf15b9beff2aa529c0404720aa63e2c071118287aa456323b +size 634682 diff --git a/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/layout.json b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..09db3718eab2c090a08406f7a4110c78a543e779 --- /dev/null +++ b/weaklysupervisedtemporalactionlocalizationviarepresentativesnippetknowledgepropagation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e6cd5d36b4792863c28a0a535d7e825efa640c915c7ea84d3ca133d9d8fd7c3 +size 443429 diff --git a/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_content_list.json b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ed48002dd4dff52180c55f82f254cfdd890c507f --- /dev/null +++ b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb4d75c886ea1d207ec72114a3ba471f0f9fe676eae810b5a91bd4ba1f1e6936 +size 81864 diff --git a/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_model.json b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..489663bcda69c64a036b364cc2cce7ac37a29108 --- /dev/null +++ b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11c0faf45fa9871e0ce72c37efeecbc32ec42e312b703cfdc28f8f3e39dead4f +size 99249 diff --git a/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_origin.pdf b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ac4e9542afe48be6d6f33bd42465824122b6e679 --- /dev/null +++ b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/f6b3a2ae-221c-4dab-958a-e0ba86da8aeb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2aac39fc5f8a3eab13baf5517dc514e6b387da683d43dd62da528819f9822f8 +size 2052490 diff --git a/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/full.md b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..65f5f04b990c3bd3aafc305cf7b1b16ab7befa0f --- /dev/null +++ b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/full.md @@ -0,0 +1,331 @@ +# Weakly Supervised Temporal Sentence Grounding with Gaussian-based Contrastive Proposal Learning + +Minghang Zheng $^{1}$ Yanjie Huang $^{1}$ Qingchao Chen $^{2}$ Yuxin Peng $^{1}$ Yang Liu $^{1,3*}$ + +$^{1}$ Wangxuan Institute of Computer Technology, Peking University $^{2}$ National Institute of Health Data Science, Peking University $^{3}$ Beijing Institute for General Artificial Intelligence + +{minghang, qingchao.chen, pengyuxin, yangliu}@pku.edu.cn + +# Abstract + +Temporal sentence grounding aims to detect the most salient moment corresponding to the natural language query from untrimmed videos. As labeling the temporal boundaries is labor-intensive and subjective, the weakly-supervised methods have recently received increasing attention. Most of the existing weakly-supervised methods generate the proposals by sliding windows, which are content-independent and of low quality. Moreover, they train their model to distinguish positive visual-language pairs from negative ones randomly collected from other videos, ignoring the highly confusing video segments within the same video. In this paper, we propose Contrastive Proposal Learning(CPL) to overcome the above limitations. Specifically, we use multiple learnable Gaussian functions to generate both positive and negative proposals within the same video that can characterize the multiple events in a long video. Then, we propose a controllable easy to hard negative proposal mining strategy to collect negative samples within the same video, which can ease the model optimization and enables CPL to distinguish highly confusing scenes. The experiments show that our method achieves state-of-the-art performance on Charades-STA and ActivityNet Captions datasets. The code and models are available at https://github.com/minghangz/cpl. + +# 1. Introduction + +Temporal sentence grounding aims at localizing the start and end time of the moment described by a given freeform natural language query in untrimmed videos. Automatic temporal sentence grounding enables us to efficiently find the video moment of interest rather than going through the whole video, which has broad application potential in video surveillance [6], video summarization [20], + +Query: A man puts on gloves ready to clean the snow from the car. + +![](images/747298c5ae32c9fba7f9d48a25f3eec0db81c2a3a24664ce0878fb939e2161c8.jpg) +Positive proposals + +![](images/6fb73b76dbe85d756f0b4ccaa38b94ae148e0e372464a281d35f13cbd96334f4.jpg) +Negative proposals + +Query: A man puts on gloves ready to clean the snow from the car. + +![](images/4bafe8b502972c05d3d38ca3b63e827c23e05a9d5404ad19ed0420207f93eeff.jpg) +A man appears with a brush Easy Hard +Take out gloves (beginning) Put on gloves Pick up a brush (climax) (ending) 55.6 s GT 90.9s +Figure 1. (a) Existing methods generate proposals by sliding window and focus on distinguishing negative proposals from other videos. (b) We use multiple learnable Gaussian functions to generate both positive and negative proposals to characterize the temporal structure of events. Our negative proposals are in the same video and collected from easy to hard. + +![](images/329b0d126fb27b9de2f1483e67f17341e4b848fad12225d8e5b70d1038fd9143.jpg) +Positive proposals (b) Ours + +![](images/2a726eefad4bf793ea95caec1d44ad387ff63a6e0e9e3ec9591738f642e2b250.jpg) +In In gloves as the snow Hard Easy Time Negative proposals + +etc. Fully supervised temporal sentence grounding has witnessed tremendous achievements recently, however, it needs laborious manual annotations of temporal boundaries for every query thus limiting its scalability and practicability in real-world applications. Therefore, the weakly supervised learning schemes, where only the video and natural language query are required during training, have gained more attention due to their low annotation cost and reasonable efficiency. + +Existing weakly supervised solutions employ either the multiple instance learning (MIL) based or reconstruction-based paradigms. Specifically, MIL-based methods [11, 12, 19, 21] normally define matched and mismatched video-language pairs as positive and negative samples, and learn the latent cross-modal semantic space by aligning the video-level visual-textual relationships. Reconstruction-based method [18, 24, 39] solves the task through joint learning with the reconstruction loss, assuming that the proposals + +that match the text should best reconstruct the entire query. However, both paradigms have the following limitations: + +Firstly, most existing methods generate the same proposals for all samples via sliding window (shown in Fig. 1(a)), regardless of their contents and difficulty, which is inefficient and of low quality. CNM [39] proposes to use single learnable Gaussian mask as the positive proposal which can characterize the inherent temporal structure of an event. However, an untrimmed long video usually comprises several events and these events often contain similar characters and backgrounds. This makes the model easy to optimize on some sub-optimal solutions when only predicting one positive proposal, resulting in a reduction in the recall rate. CNM [39] directly uses one minus the positive Gaussian mask as negative mask, which is unrealistic to describe the temporal structure of negative events and is easily distinguished by the model. Secondly, most existing methods heavily depend on the quality of randomly selected negative samples (other unpaired videos), as shown in Fig. 1(a), which are often easy to distinguish and cannot provide strong supervision signals. However, what the model needs for temporal sentence grounding is to distinguish the highly confusing video segments within the same video (e.g. a man in gloves and a man puts on gloves as shown in Fig. 1(b)). However, directly using the video segments outside the positive proposals as negative proposals will harm the model training during early training stage due to some misidentified negative proposals. + +To address the above limitations, we introduce a novel weakly supervised method namely Contrastive Proposal Learning(CPL), by generating multiple content-dependent proposals and mining negative samples from easy to hard within the same video. On the one hand, to characterize the multiple events in a long video, we use multiple learnable Gaussian functions to generate both positive (green curve in Fig. 1(b)) and negative (orange curves in Fig. 1(b)) proposals, where the negative proposals should be out of the positive ones and do not cover the corresponding positive proposals1. Moreover, to distinguish the positive from negative proposals in each video, we introduce the entire video as a reference point, as it contains both the ground truth and a large amount of redundant information. We require that the semantic alignment between the positive proposal and the query is expected to be higher than that of the entire video, while the semantic alignment of negative proposals should be lower. On the other hand, in contrast to learning from randomly selected negative samples from unpaired videos, we propose a controllable easy-to-hard negative proposal mining strategy. We collect negative proposals within the same video and enforce the negative propos + +als further away from the positive ones at the early training stages while proposals closer to the positive are learned at later stages. Because we observe that the negative proposals closer to the positive proposal are often harder to distinguish than those further away, mainly due to the smooth transition of events (similar background and semantics as shown in Fig. 1(b)). This dynamic curriculum strategy to mine samples can gradually reduce the ambiguity and thus facilitate to learn reliable intra-video samples and ease the model optimization. + +Our contributions are summarized as follows: (1) We propose to use multiple Gaussian functions to generate both positive and negative proposals from the same video. By introducing the entire video as a reference point, our proposal generation is content-dependent and efficient. (2) We propose a controllable Easy to Hard Negative sample mining strategy to collect negative proposals within the video and ease the model optimization. This enables our network to distinguish highly confusing scenes. (3) Experiments on Charades-STA [10] and ActivityNet Captions datasets [2, 15] demonstrate our method significantly outperforms existing weakly supervised methods. + +# 2. Related Work + +Fully Supervised Temporal Sentence Grounding. In the fully supervised setting, the precise start and end timestamps annotations for each video and query pair are required in training [10, 22, 30, 31, 38, 40]. Specifically, TALL [10] makes the first attempt to integrate the query and video feature to predict the start and end timestamps directly. The Structured Multi-Level Interaction Network (SMIN) [31] constructs a structured multi-level interaction module to optimize the use of the logic relationship between query and video segment. However, the fully supervised methods need laborious manual annotation of temporal boundaries thus limiting its scalability and practicability. Moreover, as studied in [22], the temporal boundary annotation is sometimes subjective and, possibly, not consistent across different annotators. And such issues are not adequately considered by many of the existing approaches. + +Weakly Supervised Temporal Sentence Grounding. Different from the fully supervised setting, the start and end timestamps are inaccessible during training for weakly supervised temporal sentence grounding. + +Firstly, the methods proposed in [5, 12, 18, 21, 26, 32] use sliding windows to generate proposals. The proposals are content-independent and heavily rely on prior knowledge to the length distribution of ground truth for the specific datasets and bring much extra computational cost for pre-processing. [13] proposes to use a learnable network to generate gate-shape masks as proposals for the action localisation task. However, the gate-shape mask assumes that all frames in the proposal are equally important, which is not + +optimal for sentence localization, as the events described in free-form natural language queries have more complex temporal structure. CNM [39] proposes to use single learnable Gaussian mask as the positive proposal and use one minus the Gaussian mask as negative proposal. However, an untrimmed long video usually comprises several events with similar characters and backgrounds, which makes predicting only single proposal easy to optimize on a suboptimal solution. In addition, such method does not reflect the temporal structure of negative proposals, which is easy for the model to distinguish them from positive ones. In our method, we utilize multiple Gaussian functions to generate both positive and negative content-dependent proposals with learnable parameters efficiently, and design a diversity loss to require these Gaussian functions to focus on different events in the video. These proposals will jointly participate in the inference process, from which the most relevant proposal is selected. + +Secondly, some methods like the weakly supervised Semantic Completion Network (SCN) [18] assume that a video segment paired with the query could reconstruct the sentence better. However, they do not consider the information contained in unpaired videos and queries, which could be used for contrastive learning. In our method, we also use the reconstruction mechanism to measure the semantic alignment, but utilize the negative proposals to perform contrastive learning. Further, other works [12, 21, 35] train the model to distinguish aligned video-query pairs and non-aligned ones collected from other videos. However, their video-query samples are often easy to distinguish, ignoring what the model really needs to distinguish is the highly confusing segments in the same video. Moreover, RTBPN [36] and CNM [39] consider the confrontation of the intra and inter samples made up of video-query pairs. However, if a mistake is made in the early stage of training, as training continues, the correct video segments would be suppressed, which will harm the training of the model. In our algorithm, we collect negative proposals outside the positive proposal, and introduce the whole video as a reference. Our negative proposals are more difficult to distinguish, enabling our network to distinguish highly confusing scenes. Additionally, in the early stage of training, our negative proposals are far from the positive ones, which reduces the negative impact of introducing negative proposals when the accuracy of positive proposal is not high in the early training stage. + +Curriculum learning. The curriculum learning method emulates the learning behavior of humans [1, 25]. It has many applications (e.g. image classification [27], object detection [16], et al.). As far as we know, we make the first attempt to explore a curriculum-style easy to hard negative proposals mining strategy and verify its effectiveness in temporal sentence grounding. + +# 3. Proposed Method + +# 3.1. Overall Framework + +CPL comprises the proposal generation module and the mask conditioned reconstruction module (In Fig. 2). + +For the proposal generation module, we use Gaussian masks to represent both positive and negative proposals within the same video. The frame features within each proposal will be aggregated based on the weight in the Gaussian curve, which characterizes the inherent temporal structure of events. To distinguish positive and negative proposals, we introduce the entire video as a reference, requiring the semantic similarity between the positive proposals and the query should be higher than that of the reference and the semantic similarity of the negative proposals should be lower. To ease the model optimization, we mine the negative proposals in the same video, collecting them from easy to hard (gradually close to the positive proposal but never overlap, as shown in Fig. 3). Note that we generate multiple positive proposals and try to make them diverse via a diversity loss $\mathcal{L}_{div}$ to improve the recall rate. + +For the mask conditioned reconstruction module, we use the video frames in each proposal to reconstruct the original query by a transformer to measure the proposal-query alignment, assuming that the better-aligned proposals can reconstruct the query better. Since the negative proposals do not contain any frames in the ground truth, we should not require them to reconstruct the query. Therefore, the reconstruction loss $\mathcal{L}_{rec}$ consists only of the cross-entropy loss of the positive proposal and the reference. Finally, we introduce an intra-video contrastive loss $\mathcal{L}_{IVC}$ to ensure that the reconstruction results of positive proposals are better than that of the entire video, while the reconstruction results of negative proposals should be worse. + +# 3.2. Multiple Positive Proposals Generation + +In this module, we fuse the information of video and text to generate multiple positive proposals, which depend on the content of video and query. Following CNM [39], we use the Gaussian masks as the proposals, which can characterize the inherent temporal structure of events. Unlike CNM [39] which only generates single positive proposal, we predict multiple positive proposals at the same time and encourage these proposals to be different through a diversity loss. Since a long untrimmed video usually contains multiple events, our method can efficiently find the potential event of interest and improve the recall rate. + +Feature Extraction. Given an untrimmed video and a natural language query, we firstly encode them into feature vectors. To be specific, each word of the query is embedded using GloVe [23] and the query is represented as $T = \{t_1, t_2, \dots, t_M\} \in \mathbb{R}^{M \times D_T}$ , where $M$ is the number of words and $D_T$ is the word feature dimension. The video is + +![](images/25a2f2003f25242b805bb7002025df7c07724ed3e1fdb59303410833d3d2d57c.jpg) +Proposal Generation Module +Mask Conditioned Reconstruction Module +Figure 2. The framework of our method. The proposal generation module uses Gaussian masks to represent both positive and negative proposals within the same video. To distinguish the positive and negative proposals, we introduce the entire video for each sample as a reference. Note that we generate multiple positive proposals and try to make them diverse via $\mathcal{L}_{div}$ to improve the recall rate. The mask conditioned reconstruction module uses the frame features conditioned on the proposal masks to reconstruct the query, as a measurement of the similarity between the proposal and query. $\mathcal{L}_{rec}$ is used to optimize our networks for a better reconstruction, and $\mathcal{L}_{IVC}$ performs a contrast between proposals, requiring the semantic similarity between the proposals and the query from large to small are positives, reference, and negatives. + +encoded with pre-trained 3D convolutional network [3,28], and represented as $V = \{v_{1}, v_{2}, \dots, v_{N}\} \in \mathbb{R}^{N \times D_{V}}$ , where $N$ is the number of extracted video features and $D_{V}$ is the feature dimension. + +Proposal Generation. We use transformer [29] to handle the multi-modal interaction of the video and text. Firstly, to pool the frame features and obtain the video representation, we append an additional learnable [CLASS] token $v_{\mathrm{cls}}$ [7] at the end of the video features: $\hat{V} = \{v_1,v_2,\dots,v_N,v_{\mathrm{cls}}\}$ . We use transformer to conduct cross-modal interaction between the embedded texts $T$ and video features $\hat{V}$ and obtain the hidden features $H = \{h_1,h_2,\dots,h_N,h_{\mathrm{cls}}\}$ that incorporates semantic and vision information: $H = \mathrm{D}(\hat{V},\mathrm{E}(T))\in \mathbb{R}^{N\times D_H}$ , where $\operatorname {E}(\cdot)$ is the transformer encoder, $\mathrm{D}(\cdot)$ is the transformer decoder, and $D_H$ is the dimension of the hidden features. More details about $\operatorname {E}(\cdot)$ and $\mathrm{D}(\cdot)$ will be provided in Sec. 4. To ensure the end-to-end training of our model, we adopt Gaussian functions as proposals. As $h_{\mathrm{cls}}$ combines all the frame and word features, we predict the center $c^p\in \mathbb{R}^K$ and width $w^{p}\in \mathbb{R}^{K}$ of our positive proposals through $h_{\mathrm{cls}}$ with a fully connected layer activated by Sigmoid function. To improve the recall rate, we will predict $K$ Gaussian masks $m^{\mathrm{p}}\in \mathbb{R}^{K\times N}$ as potential positive proposal candidates: + +$$ +\begin{array}{l} m _ {k i} ^ {p} = \frac {1}{\sqrt {2 \pi} \left(w _ {k} ^ {p} / \sigma\right)} \exp \left(- \frac {\left(i / N - c _ {k} ^ {p}\right) ^ {2}}{2 \left(w _ {k} ^ {p} / \sigma\right) ^ {2}}\right), \tag {1} \\ k = 1, \dots , K; \quad i = 1, \dots , N \\ \end{array} +$$ + +where $c_k^p, w_k^p$ are the center and width of the $k$ -th positive proposal which are learnable, and $\sigma$ is a hyperparameter which controls the width of the Gaussian curve. + +In order to make the K proposals as different as possible, we apply a diversity loss $\mathcal{L}_{div}$ introduced in [17] to $m^p$ : + +$$ +\mathcal {L} _ {d i v} = \left\| m ^ {p} m ^ {p ^ {\top}} - \lambda I \right\| _ {F} ^ {2} \tag {2} +$$ + +where $||\cdot ||_F$ denotes Frobenius norm of a matrix, and $\lambda \in [0,1]$ is a hyperparameter which controls the extent of overlap between proposals. The loss encourages proposals to have less overlap, prevents them from converging to the same center and width, and improves the recall rate. + +# 3.3. Negative Proposal Mining + +Unlike CNM [39] which directly uses one minus the Gaussian mask of positive sample as negative samples, we point out that negative proposals should have the same temporal structure of events as positive proposals, but are not so semantically relevant to the query. Thus we also use Gaussian functions to represent the them. Inspired by curriculum learning, we collect negative proposals from easy to hard to ease the optimization. We observe when the negative proposals are close to the positive ones, they are more confusing due to the similar background and semantics. Thus, we enforce the negative proposals further away from the positive ones at the early training stages while proposals closer to the positive are learned at later stages. Finally we use the mask conditioned reconstruction module to measure the + +![](images/f2d05d0d403bcece5afee884b4a721309bb9e0496789b3838fb2b948f14e30d5.jpg) +Negative Proposals Mining +Figure 3. We mine the difficulty of negative proposals, assuming that those negative proposals close to the positive proposal are more difficult to distinguish. We learn them from easy to hard to ease the model optimization. + +semantic similarity between proposals and query, and contrast between the positive and negative proposals to train our model. + +Negative Proposal Mining. As shown in Fig. 3, we generate two negative proposals (before and after the positive proposal). We fix one end of the two negative proposals at the boundary of the video, and represent the distance $\eta$ between the negative proposals and the positive proposal by the ratio of negative proposal's width $w^{n_1}$ , $w^{n_2}$ to the width of the corresponding side of the positive proposal $w^1$ , $w^2$ : + +$$ +w ^ {1} = c ^ {p} - \frac {w ^ {p}}{2}, w ^ {2} = 1 - c ^ {p} - \frac {w ^ {p}}{2} \tag {3} +$$ + +$$ +\frac {w ^ {n _ {1}}}{w ^ {1}} = \frac {w ^ {n _ {2}}}{w ^ {2}} = \eta \tag {4} +$$ + +As the training progresses, $\eta$ will gradually increase to make the negative proposals approach the positive proposal: + +$$ +\eta = \left(\frac {e}{e _ {\text {m a x}}}\right) ^ {0. 5} \in [ 0, 1 ] \tag {5} +$$ + +where $e$ is the current training epoch and $e_{max}$ is the total number of training epochs. Since one end of the negative proposal is fixed, the center $c^{n_1}, c^{n_2}$ of negative proposals can be calculated by: $c^{n_1} = \frac{w^{n_1}}{2}, c^{n_2} = 1 - \frac{w^{n_2}}{2}$ . Then, similar to Eq.(1), we can get the Gaussian mask of the negative proposals $m^{n_1}, m^{n_2}$ respectively. + +To help the model distinguish the positive and negative proposals, we introduce the entire video as a per sample reference $m^r$ : + +$$ +m ^ {r} = [ 1, 1, \dots , 1 ] \in \mathbb {R} ^ {N} \tag {6} +$$ + +Since the entire video contains the ground truth segment as well as lots of redundant information, the semantic similarity of the proposals and the query should satisfy: + +$$ +\mathrm {R} \left(m ^ {p}, Q\right) > \mathrm {R} \left(m ^ {r}, Q\right) > \mathrm {R} \left(m ^ {n}, Q\right) \tag {7} +$$ + +where $\mathbf{R}(\cdot)$ is a function that measures the semantic similarity between the query $Q$ and the proposal specified by the mask $m$ . + +Mask Conditioned Semantic Completion. To contrast between the positive and negative proposals, we use the mask conditioned reconstruction completion module inspired by SCN [18] and CNM [39] to measure the semantic relevance between the proposal and the query, assuming that the most relevant proposal should be able to best reconstruct the query using only the visual features in the proposal. + +We randomly mask 1/3 of the words in the original query with a specific symbol, and require the model to predict the next word given a prefix of the query and visual features within the proposal. We embed the masked query using GloVe [23] and reconstruct the original query based on the visual features within each positive and negative proposal using the mask conditioned transformer proposed in CNM [39]. The mask conditioned transformer will multiply the mask by the attention map before aggregating contextual information to prevent the leakage of vision features outside the proposal and keep the entire module differentiable to the proposal. Finally, we use the cross-entropy loss to measure the similarity of the reconstructed query and the original query. We denote the cross-entropy loss of the positive proposals, negative proposals, and the reference as $\mathcal{L}_{ce}^{p},\mathcal{L}_{ce}^{n1},\mathcal{L}_{ce}^{n2}\in \mathbb{R}^{K}$ , and $\mathcal{L}_{ce}^{r}\in \mathbb{R}$ respectively. + +Although we predicted $K$ positive proposals, only one video segment corresponds to the query. Therefore, we only keep the $k^{*}$ -th positive proposal with the smallest loss $\mathcal{L}_{ce}^p$ , because it is most semantically related to the query: + +$$ +k ^ {*} = \arg \min _ {k} \left(\mathcal {L} _ {c e} ^ {p} [ k ]\right) \tag {8} +$$ + +As only the positive proposal and the reference contain the segment related to the query, only $\mathcal{L}_{ce}^p [k^* ]$ and $\mathcal{L}_{ce}^r$ will participate in the optimization of our reconstruction network. The final reconstruction loss $\mathcal{L}_{rec}$ is formulated as: + +$$ +\mathcal {L} _ {r e c} = \mathcal {L} _ {c e} ^ {p} \left[ k ^ {*} \right] + \mathcal {L} _ {c e} ^ {r} \tag {9} +$$ + +As shown in (7), the semantic similarity between the positive proposal, negative proposal, and the reference should satisfy a certain relationship. Following CNM [39], we use the Intra-video Contrastive loss $\mathcal{L}_{IVC}$ to contrast between positive and negative proposals: + +$$ +\begin{array}{l} \mathcal {L} _ {I V C} = \max \left(\mathcal {L} _ {c e} ^ {p} \left[ k ^ {*} \right] - \mathcal {L} _ {c e} ^ {r} + \beta_ {1}, 0\right) + \\ \max \left(\mathcal {L} _ {c e} ^ {p} [ k ^ {*} ] - \mathcal {L} _ {c e} ^ {n _ {1}} [ k ^ {*} ] + \beta_ {2}, 0\right) + \tag {10} \\ \max \left(\mathcal {L} _ {c e} ^ {p} [ k ^ {*} ] - \mathcal {L} _ {c e} ^ {n _ {2}} [ k ^ {*} ] + \beta_ {2}, 0\right) \\ \end{array} +$$ + +where $\beta_{1}$ and $\beta_{2}$ are hyperparameters satisfying $\beta_{1} < \beta_{2}$ . $\mathcal{L}_{IVC}$ requires the loss $\mathcal{L}_{ce}$ of the positive proposal should be at least $\beta_{1}$ smaller than that of the reference, and at least $\beta_{2}$ smaller than that of the negative proposals. + +# 3.4. Model Training and Inference + +In this section, we describe the loss function we optimize to train our network and the model inference process. + +Training. Our network includes three parts of loss: the reconstruction loss $\mathcal{L}_{rec}$ in Eq.(9) is used to help the model to reconstruct query through the video features within our proposals, serving as a measurement of the alignment between the proposal and query; the Intra-video Contrastive loss $\mathcal{L}_{IVC}$ in Eq.(10) is used to train the model to generate the most semantically relevant positive proposals for the query; the diversity loss $\mathcal{L}_{div}$ in Eq.(2) is used to encourage the model to produce multiple different positive proposals. Finally, we compute a multi-task loss to train our network in an end-to-end manner, denoted by: + +$$ +\mathcal {L} = \mathcal {L} _ {\text {r e c}} + \alpha_ {1} \mathcal {L} _ {I V C} + \alpha_ {2} \mathcal {L} _ {\text {d i v}} \tag {11} +$$ + +where $\alpha_{1},\alpha_{2}$ are hyperparameters to balance the losses. + +Inference. Firstly, we can obtain the center $c^p$ and width $w^p$ in Eq.(1) of our predicted K positive proposals. To select the top-1 prediction from our $K$ proposals, we design two selection strategies: loss-based strategy and vote-based strategy. + +For the loss-based strategy, the cross-entropy loss $\mathcal{L}_{ce}^{p}$ of reconstructed query serves as the measurement of the reliability of each proposal. Thus, we select the positive proposal with the smallest loss as our final prediction. For the vote-based strategy, every positive proposal will participate in the selection. Inspired by the ensemble learning [41], we use the $K$ positive proposals to vote with each other to decide which one is our final top-1 prediction. Specifically, for each positive proposal, we calculate the IoU with the remaining $K - 1$ positive proposals and the sum of IoUs is the number of votes it obtained. And finally we choose the one with the highest number of votes as the final prediction. + +Finally, for the selected $k^*$ -th positive proposal, our predicted start $st$ and end $en$ timestamps are: + +$$ +\begin{array}{l} s t = \max \left(c _ {k ^ {*}} ^ {p} - w _ {k ^ {*}} ^ {p} / 2, 0\right) * D u a t i o n \\ e n = \min \left(c _ {k ^ {*}} ^ {p} + w _ {k ^ {*}} ^ {p} / 2, 1\right) * D u a t i o n \\ \end{array} +$$ + +To obtain the top-k predictions, we sort all the positive proposals by $\mathcal{L}_{ce}^{p}$ from small to large, and output the start and end timestamps by Eq.(12) for the top-k positive proposals. + +# 4. Experiments + +# 4.1. Datasets + +In order to evaluate the effectiveness of our method, we perform experiments on two publicly available datasets: Charades-STA [10], and ActivityNet Captions [2, 15]. + +Charades-STA. Charades-STA dataset contains 5338/1334 videos and 12,408/3720 video-query pairs for training/testing. We report our results on the test split. + +Table 1. Evaluation Results on the Charades-STA dataset ( $n \in \{1,5\}$ and $m \in \{0.3,0.5,0.7\}$ ). The numbers in bold are the best result, and the underlined ones are the second best result. Our CPL uses the loss-based strategy during inference and $\mathrm{CPL}^*$ uses the vote-based strategy during inference. + +
MethodR@1R@5
IoU=0.3IoU=0.5IoU=0.7IoU=0.3IoU=0.5IoU=0.7
TGA [21]32.1419.948.8486.5865.5233.51
CTF [5]39.827.312.9---
SCN [18]42.9623.589.9795.5671.8038.87
WSTAN [32]43.3929.3512.2893.0476.1341.53
BAR [34]44.9727.0412.23---
VLANet [19]45.2431.8314.1795.7082.8533.09
LoGAN [26]48.0431.7413.7189.0172.1737.58
MARN [24]48.5531.9414.8190.7070.0037.40
WSRA [9]50.1331.2011.0186.7570.5039.02
CCL [37]-33.2115.68-73.5041.87
CRM [12]53.6634.7616.37---
VCA [33]58.5838.1319.5798.0878.7537.75
LCNet [35]59.6039.1918.8794.7880.5645.24
RTBPN [36]60.0432.3613.2497.4871.8541.18
CNM [39]60.3935.4315.45---
CPL (ours)66.4049.2422.3996.9984.7152.37
CPL* (ours)65.9949.0522.6196.9984.7152.37
+ +ActivityNet Captions. ActivityNet Captions contains 10,009/4917/5044 videos and 37,417/17,505/17,031 video-query pairs for training/validation/testing. We report our results on the val_2 split. + +# 4.2. Evaluation Metric + +In order to test our method, similar to what have done in the previous work [12, 18], we choose the computation result of $\mathrm{R}@\mathrm{n}$ , IoU=m' as our evaluation metric, where $m$ is the predefined temporal Intersection over Union (IoU) threshold, and $n$ refers to the recall rate of top- $n$ predictions. In particular, this metric means that the percentage of predicted moments that have the IoU value larger than $m$ in our top $n$ predictions. We report results for R@1 and R@5 on both Charades-STA and ActivityNet Captions datasets. + +# 4.3. Implementation Details + +Data Preprocessing. We downsample each video every 8 frames and pre-extract it's vision feature using the C3D [28] model for ActivityNet Captions and I3D [3] model for Charades-STA. We use the pre-trained GloVe [23] word2vec for each word token to extract word embeddings. We set the maximum description length to 20, and the vocabulary size is 8000. + +Model Settings. For the transformer and the mask conditioned transformer, there are 3 layers with 4 attention heads for both the encoder and decoder. The dimension of their hidden state is 256. For the number of positive proposals, we set $K$ to 8 for Charades-STA and 5 for ActivityNet Captions. For the hyperparameters, we set $\sigma = 9$ , $\lambda = 0.15$ , $\beta_{1} = 0.1$ , $\beta_{2} = 0.15$ , $\alpha_{1} = 1$ for both datasets. We find + +Table 2. Evaluation Results on the ActivityNet Captions dataset $(n\in \{1,5\}$ and $m\in \{0.1,0.3,0.5\})$ . The numbers in bold are the best result, and the underlined ones are the second best result. Our CPL uses the loss-based strategy during inference and $\mathrm{CPL}^*$ uses the vote-based strategy during inference. + +
MethodR@1R@5
IoU=0.1IoU=0.3IoU=0.5IoU=0.1IoU=0.3IoU=0.5
WS-DEC [8]62.7141.9823.34---
VCA [33]67.9650.4531.0092.1471.7953.83
EC-SL [4]68.4844.2924.16---
MARN [24]-47.0129.95-72.0257.49
SCN [18]71.4847.2329.2290.8871.5655.69
BAR [34]-49.0330.73---
RTBPN [36]73.7349.7729.6393.8979.8960.56
CTF [5]74.244.323.6---
WSLLN [11]75.442.822.7---
LCNet [35]78.5848.4926.3393.9582.5162.66
CCL [37]-50.1231.07-77.3661.29
WSTAN [32]79.7852.4530.0193.1579.3863.42
CRM² [12]81.6155.2632.19---
CNM [39]78.1355.6833.33---
CPL, α2=0.179.8653.6731.2487.2463.0543.13
CPL*, α2=0.182.5555.7331.3787.2463.0543.13
CPL, α2=171.2350.0730.1494.2881.3265.79
+ +our model is sensitive to $\alpha_{2}$ . We set $\alpha_{2}$ to 1 on CharadesSTA, and to 0.1 or 1 on ActivityNet Captions (Details are in Sec.4.4). For the model training, we use Adam [14] optimizer with learning rate set to 0.0004. + +# 4.4. Comparisons to the State-Of-The-Art + +Tab. 1 and Tab. 2 compare the overall performance of CPL with previous works, where CPL uses the loss-based inference strategy and $\mathrm{CPL}^*$ uses the vote-based inference strategy. We can draw the following conclusions: (1) On Charades-STA dataset, compared with previous methods, our CPL achieves $10.05\%$ absolute gain on $\mathsf{R}@\mathsf{1}$ , IoU=0.5'. Our loss-based strategy and vote-based strategy have similar performance on Charades-STA dataset. (2) On ActivityNet Captions dataset, for $\mathbb{R}@\mathbb{1}$ we outperform all existing methods with vote-based strategy. We find that the accuracy of reconstruction on ActivityNet Captions is relatively lower, and choosing the final prediction by voting is more reliable. For $\mathbb{R}@\mathbb{5}$ , by carefully selecting $\alpha_{2} = 1$ to encourage more diversity among multiple proposals, our model performs best. (3) In practical applications, $\alpha_{2}$ can be set flexibly under different application requirements. The main reason is that the queries containing a complex relationship of multiple events are more difficult to reconstruct, resulting in less reliable measurement when choosing the best one from those positive proposals with a large diversity. + +Table 3. The ablation study of our different losses. + +
Loss UsedR@1
LrecLIVCLdivIoU=0.3IoU=0.5IoU=0.7mIoU
✓XX54.2420.496.7433.99
✓✓X60.3932.0812.9537.98
✓✓✓66.4049.2422.3943.48
+ +Table 4. The ablation study of positive and negative proposal generation processes. + +
Positive ProposalNegative ProposalR@1
IoU=0.3IoU=0.5IoU=0.7mIoU
FixedNone55.0728.9710.1334.06
LearnableNone61.6845.4720.1440.43
LearnableOther video65.6447.5621.3742.34
LearnableIntra-video66.4049.2422.3943.48
+ +Table 5. The ablation study of our training strategy that only the positive proposal with the smallest $L_{ce}^{p}$ participates in the optimization. + +
StrategyR@1
IoU=0.3IoU=0.5IoU=0.7mIoU
All (equally)54.8436.1618.4936.28
All (weighted)54.9437.4917.4836.44
One w/ smallest Lppce66.4049.2422.3943.48
+ +![](images/5d5525f9fdc44d75c3f64c2a8b13159192bad56c12d02be4a5b09b1e9a1776f0.jpg) +(a) + +![](images/901562f1161a202d51fc0151b9935801c8e2a2deb92dbbc76182c1a576d51d91.jpg) +(b) +Figure 4. Fig. 4a shows the effectiveness of learning negative proposals from easy to hard. Fig. 4b shows the ablation study of different number of positive proposals. + +# 4.5. Ablation Study + +To prove the effectiveness of different components of our CPL, we perform ablation studies on the Charades-STA with our loss-based strategy. + +Effectiveness of different losses. As Tab. 3 shows, we evaluate the effectiveness of $\mathcal{L}_{rec}$ , $\mathcal{L}_{IVC}$ , and $\mathcal{L}_{div}$ . The model with all these three losses performs best, indicating that the design of all of them is significant for our network. We also find that the diversity loss can significantly improve the performance of the model, which proves that generating + +multiple different positive proposals is beneficial to more accurately locating the event of interest in long videos. + +Effectiveness of Proposal Generation. (1) As the first two rows in the Tab. 4 show, we evaluate the effectiveness of our learnable positive proposals. The 'Fixed' means that we use sliding windows and policy gradient algorithm used by SCN [18] to select positive proposals, and the 'None' means no negative proposals are used. We can see that our learnable proposals are of high quality. (2) As the last two rows in the Tab. 4 show, we evaluate the effect of our negative proposals in the same video. It reveals the fact that mining negative proposals within the video plays an important role in improving the performance of our method. (3) Moreover, as shown in the Fig. 4a, we evaluate the effectiveness of introducing negative proposals from easy to hard. When negative proposals are always far away from positive proposals (i.e. $\eta = 0.2$ ), they are easy to distinguish and provide little information. When they are always close to the positive proposal (i.e. $\eta = 1$ ), they may bring wrong information especially at the early training stage where the accuracy of positive proposals is low. Dynamically adjusting $\eta$ and learning from easy to hard can effectively balance these two situations. + +Effect of multiple Positive Proposals. (1) As Fig. 4b shows, we evaluate the effectiveness of the number of positive proposals. We can see that the more the number of positive proposals, the higher the mIoU in general. But when the number of positive proposals is greater than 8, the gain is very small. Continuing to increase the number of positive proposals will increase the computational cost. (2) Tab. 5 shows the effectiveness of our training strategy that only the positive proposal with the smallest $\mathcal{L}_{ce}^p$ participates in optimization. The 'equally' means all the positive proposals participate equally, and 'weighted' means positive proposals with smaller $\mathcal{L}_{ce}^p$ will participate more. We can see that it's helpful to only optimize the positive proposal with the smallest $\mathcal{L}_{ce}^p$ (encourage one-to-one correspondence between positive proposals and query). + +# 4.6. Qualitative Results + +Fig. 5 shows some qualitative examples. P1 and P2 (in blue) are our positive proposals with the lowest top-2 loss $\mathcal{L}_{ce}^p$ . (1) As shown in Fig. 5(a) and (b), our method can achieve better results than SCN, proving that our negative proposals and references can provide more information. (2) As shown in Fig. 5(a), (b) and (c), comparing P1 and P2, the higher the ranking, and the more relevant the semantic meaning with the ground truth's. (3) Fig. 5(c) shows that the performance of CPL is relatively poor when the query contains complex relationships of multiple events. This may be caused by the low reconstruction accuracy in this situation. + +Query: Person reads through some pages in a book. + +![](images/4e3a0ad43bbcd8fa561cdbd96faf44a46c4b3ebd9a10b70dd84aa28be592c9ce.jpg) + +Query: A person runs around the house. + +![](images/6a349c99fb46aa075c0f1c63a32d2263733f5122ce98a5e604776e92dbd2c6ca.jpg) + +Query: The first guy drinks a beer then passes out and the second guy puts apong ball on his chest before leaving. + +![](images/86fcd643edb109a0e6e54736727de1f93d401994310621658d3007edaf4fbdc5.jpg) +Figure 5. Qualitative examples of our top-2 predictions. Fig. 5 (a) and (b) are from the Charades-STA dataset, and Fig. 5 (c) is from the ActivityNet Captions dataset respectively. + +# 5. Conclusion + +In this work, we propose a novel weakly supervised video moment localization method, called Contrastive Proposal Learning(CPL). Our CPL generates several learnable Gaussian masks as proposals, which are effective and of high quality. We propose a novel method to mine the negative proposals within the same video, and introduce the entire video as the reference, which enables the network to distinguish highly confusing scenes. Inspired by the curriculum learning, the difficulty of the negative proposals increases as the training continues, benefiting the optimization. Experiments on the Charades-STA and ActivityNet Captions datasets show the outstanding performance of CPL. Extensive ablation studies also verify the effectiveness of the components in CPL. + +Limitation Discussion: In this work, we focus on exploring how to learn high-quality proposals through the contrast of positive and negative proposals within the video. However, we find that when the query describes several events with complex relationship (with specified chronological order), our method may fail. How to better explore and represent the complex relationship between different events can be studied in future work. + +# 6. Acknowledgements + +This work is supported by the grants from the National Natural Science Foundation of China (61925201, 62132001, U21B2025) and Zhejiang Lab (NO. 2022NB0AB05). + +# References + +[1] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML '09, page 41-48, New York, NY, USA, 2009. Association for Computing Machinery. 3 +[2] Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 961-970, 2015. 2, 6 +[3] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. 4, 6 +[4] Shaoxiang Chen and Yu-Gang Jiang. Towards bridging event captioner and sentence localizer for weakly supervised dense event captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8425-8435, 2021. 7 +[5] Zhenfang Chen, Lin Ma, Wenhan Luo, Peng Tang, and Kwan-Yee K Wong. Look closer to ground better: Weakly-supervised temporal grounding of sentence in video. arXiv preprint arXiv:2001.09308, 2020. 2, 6, 7 +[6] Robert T Collins, Alan J Lipton, Takeo Kanade, Hironobu Fujiyoshi, David Duggins, Yanghai Tsin, David Tolliver, Nobuyoshi Enomoto, Osamu Hasegawa, Peter Burt, et al. A system for video surveillance and monitoring. VSAM final report, 2000(1-68):1, 2000. 1 +[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 4 +[8] Xuguang Duan, Wenbing Huang, Chuang Gan, Jingdong Wang, Wenwu Zhu, and Junzhou Huang. Weakly supervised dense event captioning in videos. arXiv preprint arXiv:1812.03849, 2018. 7 +[9] Zhiyuan Fang, Shu Kong, Zhe Wang, Charless Fowlkes, and Yezhou Yang. Weak supervision and referring attention for temporal-textual association learning, 2020. 6 +[10] Jiyang Gao, Chen Sun, Zhenheng Yang, and Ram Nevata. Tall: Temporal activity localization via language query, 2017. 2, 6 +[11] Mingfei Gao, Larry S Davis, Richard Socher, and Caiming Xiong. Wslln: Weakly supervised natural language localization networks. arXiv preprint arXiv:1909.00239, 2019. 1, 7 +[12] Jiabo Huang, Yang Liu, Shaogang Gong, and Hailin Jin. Cross-sentence temporal and semantic relations in video activity localisation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7199-7208, 2021. 1, 2, 3, 6, 7 +[13] Chen Ju, Peisen Zhao, Siheng Chen, Ya Zhang, Yanfeng Wang, and Qi Tian. Divide and conquer for single-frame temporal action localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13455-13464, 2021. 2 + +[14] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 7 +[15] R. Krishna, K. Hata, F. Ren, L. Fei-Fei, and J. C. Niebles. Dense-captioning events in videos. In 2017 IEEE International Conference on Computer Vision (ICCV), 2017. 2, 6 +[16] Siyang Li, Xiangxin Zhu, Qin Huang, Hao Xu, and C. C. Jay Kuo. Multiple instance curriculum learning for weakly supervised object detection, 2017. 3 +[17] Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. arXiv preprint arXiv:1703.03130, 2017. 4 +[18] Zhijie Lin, Zhou Zhao, Zhu Zhang, Qi Wang, and Huasheng Liu. Weakly-supervised video moment retrieval via semantic completion network, 2020. 1, 2, 3, 5, 6, 7, 8 +[19] Minuk Ma, Sunjae Yoon, Junyeong Kim, Youngjoon Lee, Sunghun Kang, and Chang D Yoo. Vlanet: Video-language alignment network for weakly-supervised video moment retrieval. In European Conference on Computer Vision, pages 156-171. Springer, 2020. 1, 6 +[20] Yu-Fei Ma, Lie Lu, Hong-Jiang Zhang, and Mingjing Li. A user attention model for video summarization. In Proceedings of the Tenth ACM International Conference on Multimedia, MULTIMEDIA '02, page 533-542, New York, NY, USA, 2002. Association for Computing Machinery. 1 +[21] Niluthpol Chowdhury Mithun, Sujoy Paul, and Amit K Roy-Chowdhury. Weakly supervised video moment retrieval from text queries. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11592-11601, 2019. 1, 2, 3, 6 +[22] Mayu Otani, Yuta Nakashima, Esa Rahtu, and Janne Heikkilä. Uncovering hidden challenges in query-based video moment retrieval. In BMVC, 2020. 2 +[23] Jeffrey Pennington, Richard Socher, and Christopher D 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. 3, 5, 6 +[24] Yijun Song, Jingwen Wang, Lin Ma, Zhou Yu, and Jun Yu. Weakly-supervised multi-level attentional reconstruction network for grounding textual queries in videos. arXiv preprint arXiv:2003.07048, 2020.1,6,7 +[25] Petru Soviany, Radu Tudor Ionescu, Paolo Rota, and Nicu Sebe. Curriculum learning: A survey, 2021. 3 +[26] Reuben Tan, Huijuan Xu, Kate Saenko, and Bryan A Plummer. Logan: Latent graph co-attention network for weakly-supervised video moment retrieval. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2083–2092, 2021. 2, 6 +[27] Ye Tang, Yu Bin Yang, and Yang Gao. Self-paced dictionary learning for image classification. In Proceedings of the 20th ACM international conference on Multimedia, 2012. 3 +[28] Du Tran, Lubomir Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 4489-4497, 2015. 4, 6 + +[29] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2017. 4 +[30] Hao Wang, Zheng-Jun Zha, Xuejin Chen, Zhiwei Xiong, and Jiebo Luo. Dual path interaction network for video moment localization. In Proceedings of the 28th ACM International Conference on Multimedia, MM '20, page 4116-4124, New York, NY, USA, 2020. Association for Computing Machinery. 2 +[31] Hao Wang, Zheng-Jun Zha, Liang Li, Dong Liu, and Jiebo Luo. Structured multi-level interaction network for video moment localization via language query. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7026-7035, June 2021. 2 +[32] Yuechen Wang, Jiajun Deng, Wengang Zhou, and Houqiang Li. Weakly supervised temporal adjacent network for language grounding. IEEE Transactions on Multimedia, 2021, 2, 6, 7 +[33] Zheng Wang, Jingjing Chen, and Yu-Gang Jiang. Visual co-occurrence alignment learning for weakly-supervised video moment retrieval. In Heng Tao Shen, Yueting Zhuang, John R. Smith, Yang Yang, Pablo Cesar, Florian Metze, and Balakrishnan Prabhakaran, editors, MM '21: ACM Multimedia Conference, Virtual Event, China, October 20 - 24, 2021, pages 1459-1468. ACM, 2021. 6, 7 +[34] Jie Wu, Guanbin Li, Xiaoguang Han, and Liang Lin. Reinforcement learning for weakly supervised temporal grounding of natural language in untrimmed videos, 2020. 6, 7 +[35] Wenfei Yang, Tianzhu Zhang, Yongdong Zhang, and Feng Wu. Local correspondence network for weakly supervised temporal sentence grounding. IEEE Transactions on Image Processing, 30:3252-3262, 2021. 3, 6, 7 +[36] Zhu Zhang, Zhijie Lin, Zhou Zhao, Jieming Zhu, and Xiuqiang He. Regularized two-branch proposal networks for weakly-supervised moment retrieval in videos. In Proceedings of the 28th ACM International Conference on Multimedia, pages 4098–4106, 2020. 3, 6, 7 +[37] Zhu Zhang, Zhou Zhao, Zhijie Lin, jieming zhu, and Xiuqiang He. Counterfactual contrastive learning for weakly-supervised vision-language grounding. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 18123-18134. Curran Associates, Inc., 2020. 6, 7 +[38] Yang Zhao, Zhou Zhao, Zhu Zhang, and Zhijie Lin. Cascaded prediction network via segment tree for temporal video grounding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 4197-4206, June 2021. 2 +[39] Minghang Zheng, Yanjie Huang, Qingchao Chen, and Yang Liu. Weakly supervised video moment localization with contrastive negative sample mining. In Proceedings of the AAAI Conference on Artificial Intelligence, 2022. 1, 2, 3, 4, 5, 6, 7 +[40] Hao Zhou, Chongyang Zhang, Yan Luo, Yanjun Chen, and Chuanping Hu. Embracing uncertainty: Decoupling and debias for robust temporal grounding, 2021. 2 +[41] Zhi-Hua Zhou. Ensemble learning. In Machine Learning, pages 181-210. Springer, 2021. 6 \ No newline at end of file diff --git a/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/images.zip b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6ac2dc75dbe57482d69d29b6a2f387dfe03db29f --- /dev/null +++ b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcf40d22aafc78cb67e4f1f8b4991649f24f31c405b5676215781bcb41d09f91 +size 483753 diff --git a/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/layout.json b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0999aa65b79b541910b9d89cda323bdd79d12ad8 --- /dev/null +++ b/weaklysupervisedtemporalsentencegroundingwithgaussianbasedcontrastiveproposallearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7731b17c212b4f3ea32aec3b81f1e49acd5ad5f93726337cb0fd431d93a7c37f +size 419821 diff --git a/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_content_list.json b/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fd2209fc5cfe398426192c8ac053b593691ff558 --- /dev/null +++ b/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a65f4d995d59b3c4a30c1efad38b184d197e4ab02a561bd2aa9b07a939a07d0b +size 87520 diff --git a/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_model.json b/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d8cecaa215abd1a3457a33e79ceb53425717c62a --- /dev/null +++ b/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42074e2539fa1ecec1a343490473b12ee1b184a5d4042ad43d6f82a7fd1d880e +size 103506 diff --git a/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_origin.pdf b/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..93cf1e1f4783be4041137eba08ee372f9ea6ed27 --- /dev/null +++ b/webqamultihopandmultimodalqa/84570593-7de7-4dd2-932d-ee095ed70429_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ceca9ce5e6d08a4586e81464d5c0b1d14861485200d7119996ecb098bcacbbf +size 4229193 diff --git a/webqamultihopandmultimodalqa/full.md b/webqamultihopandmultimodalqa/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8f1c8abfc25cb88b22593b19fa8ef606d4955012 --- /dev/null +++ b/webqamultihopandmultimodalqa/full.md @@ -0,0 +1,360 @@ +# WebQA: Multihop and Multimodal QA + +Yingshan Chang1 +Guihong Cao2 +1Carnegie Mellon University + +Mridu Narang2 +Jianfeng Gao3 +2Microsoft, Bing Search + +Hisami Suzuki2 Yonatan Bisk1,3 3Microsoft Research + +# Abstract + +Scaling Visual Question Answering (VQA) to the open-domain and multi-hop nature of web searches, requires fundamental advances in visual representation learning, knowledge aggregation, and language generation. In this work, we introduce WEBQA, a challenging new benchmark that proves difficult for large-scale state-of-the-art models which lack language groundable visual representations for novel objects and the ability to reason, yet trivial for humans. WEBQA mirrors the way humans use the web: 1) Ask a question, 2) Choose sources to aggregate, and 3) Produce a fluent language response. This is the behavior we should be expecting from IoT devices and digital assistants. Existing work prefers to assume that a model can either reason about knowledge in images or in text. WEBQA includes a secondary text-only QA task to ensure improved visual performance does not come at the cost of language understanding. Our challenge for the community is to create unified multimodal reasoning models that answer questions regardless of the source modality, moving us closer to digital assistants that not only query language knowledge, but also the richer visual online world. + +# 1. Introduction + +Web search is a multimodal experience: Will I find my answer on the image search tab or within text snippets? In contrast, most deployed Question Answering (QA) systems treat the web as a text-only landscape of facts to be extracted, ignoring the knowledge present in images. This has two fundamental limitations: 1. The text-based web is impoverished [3,4], and 2. This form of information extraction is inefficient. For example, when searching to see if a park has picnic tables, surfacing an image of the picnic area answers the question immediately, rather than wading through pages of reviews hoping someone happened to mention this fact. QA engines need to move to treating the Internet as a multimodal trove of information, but this requires multihop reasoning on either images or text. + +Q: At which festival can you see a castle in the background: Oktoberfest in Domplatz Austria or Tanabata festival in Hiratsuka, Japan? + +![](images/6c5808276705d12c6dc2e4a2b5e8180733bfb98fc11c2bf7b65c0be5aad17527.jpg) + +![](images/802164bb3136c6f067ef9c0eeff0deeb535586d6e8f3a81211a774e922f68f1d.jpg) +A: You can see a castle in the background at Oktoberfest in Domplatz, Austria + +![](images/f5ca0fa4ed97d12900f23bda50723a1b568e77fb40308e84c154e6c83788a881.jpg) +Figure 1. Example WEBQA dataset pipeline in which the question requires finding and reasoning about two relevant sources and discarding distractors to produce the correct natural language answer. + +![](images/0f3c5c97ab83cad4178f47dbef6ea13e0ddcaad45dce4febb85b8c2060187c1f.jpg) + +![](images/ea5f7908dfb7a208ad0f57e95abee469c0dee8bcb9c0dd898a9b1ca28edc1fff.jpg) + +![](images/315367edfc775bb8a303a489701eb8ed175fb69275e7c746dcbf4b765e53332b.jpg) + +![](images/e946132b573de562c046c8f13f631bec306399d36a0b2641dd3e6f08d24920c5.jpg) + +![](images/1c85139332cfeb75d9e7698aed8d7811cde58b66418f2df0d2516a24fde6426a.jpg) + +![](images/ace043b8875346f1b8324029028cbf38c67e69c09ba342b2834686f7799c9c12.jpg) + +![](images/4acf5a3c630a45071f66b0bcc9ee1c7add85aad440d7fc0dbe1f3dc210380308.jpg) + +To this end, datasets are rapidly emerging [10, 24, 28]. But they either use pre-defined templates for the curation of multihop multimodal QA pairs [28], or encourage a "question decomposition + rerouting to uni-modal model" approach to superficially solve the problem [10]. However, when humans absorb knowledge, there is no need to distinguish whether the knowledge was learned from books versus images, or whether a piece of knowledge is a composite of multiple scattered fragments versus being carried by a single one. We argue that genuine progress in reasoning over linguistic notions of meanings and visually grounded meanings under the same representation framework depends on the development of a unified system that indiscriminately treats snippets and images as knowledge carriers. On top of that, the goal includes better extraction, integration and summarization abilities in a heterogeneous information landscape. + +To facilitate this research intersection, in this work we propose a novel benchmark, WEBQA, for multi-hop, multimodal, open-domain question-answering where all questions are knowledge-seeking and resemble real-world use cases. Success on WEBQA requires a system to a) incorporate both text and images, b) retrieve relevant knowledge in either modality, c) aggregate information from multiple sources via logical or numerical reasoning, and d) generate + +
#Train#Dev#Test#ImgLen QLen A
VQA v2 [9]443K214K453K200K6.11.2
OKVQA [18]9.0K05.0K14.0K8.11.3
MultiModalQA [28]23.8K2.4K3.6K57.7K18.22.1
ManyModalQA [10]2.0K3.0K5.1K2.9K-1.0
MIMOQA [24]52.4K0.7K3.5K400.0K--
WEBQA (ours)34.2K5K7.5K390.0K17.512.5
+ +answers in natural language. We experiment with state-of-the-art multimodal reasoning and text generation models, whose failures indicate promising future directions. + +# 2. Related Work + +Many datasets and tasks can be broadly considered "question answering." For example, VQA [2, 9, 11, 18] is one of the widely studied tasks at the intersection of language and vision. Nevertheless, it is unclear how VQA models should be adapted to open-domain scenarios. This is largely due to the simplification of VQA tasks into classification over a fixed vocabulary of frequent answers. Recent work on video [15, 30, 32] has also adopted a multiple-choice format. In contrast, OK-VQA [18] broadens the task to knowledge-seeking questions. OK-VQA and our task differ in the role of images. Images in OK-VQA are regarded as part of the query rather than as part of the knowledge source, and can only be processed after retrieval. + +Within the natural language community, QA datasets are experiencing a similar transition from multiple-choice and span prediction to the harder free-form answer generation paradigm. Multi-hop question answering has recently taken the spotlight as it aligns with the multi-hop nature of how humans perform reasoning during knowledge acquisition, leading to a proliferation of benchmarks [27, 31, 34]. + +There have been several recent benchmarks for reasoning over input and contexts in multiple modalities [26]. MultiModalQA [28] made the first foray into complex questions that require reasoning over snippets, tables and images. It focuses on cross-modal heterogeneous knowledge extraction. However, questions are generated from templates. Once a template is detected the task reduces to filling in blanks with modality-specific answering mechanisms. + +ManyModalQA [10] also deals with snippets, images and tables. However, the primary challenge their design addresses is the choice of answer modality — rather than knowledge aggregation or extraction. Our focus is more about representing world knowledge in a unified space, than about distinguishing the answer modality, since mastering + +Table 1. Comparison of multimodal knowledge-seeking benchmarks by size and average question/answer lengths. $^{1}$ + +
Eval MetricsAnswer Schema
VQA v2 +OK-VQAmin{#human agreement/3, 1}Top training answers
MultimodalQAExact Match +F1Txt: span/Y/N +Img: Fixed vocab +Table: Y/N, cell, or op.
ManymodalQAClassification AccuracyContext word or vocab
MIMOQATxt: ROUGE-1/-2/-L or BLEU +Img: Precision@1/@2/@3Span prediction ++ Image retrieval
WEBQA (ours)Fluency: BARTScore +Keyword Acc: Recall/F1Complete NL sentence
+ +Table 2. Comparison of knowledge-seeking, multimodal benchmark metrics and answer schema. + +the former may naturally eliminate the need to classify questions according to the answer modality. + +Finally, MIMOQA [24] introduces a new concept of "Multimodal Input Multimodal Output" which highlights accompanying a textual answer with an image in order to enhance cognitive understanding. MIMOQA requires selecting a text span and an image from the context as an output pair. Their approach is nicely complementary to ours. Where we differ, is that our task also requires aggregation and summarization before producing the final natural language answer, whereas the outputs required by MIMOQA are not completely digested by the model. Here, we refer "digesting" to the ability to produce a reasonable output which cannot be directly copied from the input. + +Tables 1, 2 and Appendix E provide comparisons between WEBQA and related datasets. No existing multimodal or knowledge-seeking benchmark requires the answers to be complete, free-form natural language sentences, as opposed to extractive spans, or elements from a finite set. Additionally, previous work has not supported both natural language generation (NLG) evaluation and accuracy-style evaluation as we do. To this end, we highlight that a) in WEBQA more importance is attached to digesting, aggregating and summarizing information as answers cannot be simply copied from an existing text span or image patch, b) WEBQA requires the source retrieval stage in addition to VQA, which better simulates the full reasoning pipeline during a web search, and c) answers in the form of a natural language sentence better transit to downstream applications such as conversational agents and voice assistants. + +# 3. Task Formulation + +As in Fig 1, examples consist of a question $Q$ , a set of positive sources $s_1, \ldots, s_m$ (in green), a set of distractor sources $s_{m+1}, \ldots, s_n$ (in red) and an answer $A$ . Each source can be either a snippet or an (image, description) pair. Each image is accompanied by a description to resolve names or geographic information not present in the image itself, but + +serve as critical links to references in the question. We include both a restricted $(n\approx 40)$ and full $(n\approx 900K)$ setting. + +We decompose the task into two stages. First, given $Q$ and $s_1, s_2, \ldots, s_n$ , the model identifies the sources from which to derive the answer. The second stage is question answering where the model takes $Q$ and the chosen sources as context $C$ , to generate an answer $A$ . Ideally, a single-stage system would jointly process $Q, s_1, s_2, \ldots, s_n$ to produce $A, C$ , but we are unaware of any modeling approaches that can consume sufficiently large multimodal contexts to achieve this, so this is left to future work. + +# 4. WEBQA + +Following the paradigm popularized by search engines, we structure our data as having answers that can be found either via image search or general web (text) search. Note, WebQA does not contain questions that need an image and an (independent) snippet as knowledge sources. However, all image-based questions already require processing both images and text as image descriptions provide necessary information. Below we outline how both types of questions are collected, structured, and filtered for quality. + +# 4.1. Answers from Images + +We collect both multi-image questions that require stitching two images to answer and complex single-image questions. Rich multi-image questions do not naturally exist at scale in user search logs, likely because users do not issue queries they believe search engines cannot handle, thus we turn to crowdsourcing. + +We presented annotators with a set of six related images and asked them to produce three QA-pairs by selecting one or two images per pair that are necessary to answer the question. We require that at least one of the three pairs utilizes two distinct images. Additionally, we instructed annotators to avoid questions that: a) are simple facts (e.g. "How many wheels does a car have"); b) are easily answered by a text-only search; c) are bound to a specific image; d) ensure every question is meaningful without paired context. This elucidates one of the key differences between the well-known VQA task and ours. In most VQA style tasks, every question is about a paired image, whereas in our task images serve as knowledge sources over which to reason, and do not serve the role of augmenting the question. To assist annotators, each image is accompanied by a description extracted from Wikipedia. This description is only to be used to confirm the name or location of the objects depicted. The answer has to be derived from visual clues. + +Images were crawled from Wikipedia Commons via the Bing Visual Search API. Wikipedia's topic list cannot be + +used directly as most categories are (visually) uninteresting. We seeded with natural scenes and iteratively refined the image pool by removing categories flagged as (visually) uninteresting. This resulted in categories like animals, plants, attractions, and architecture (Fig 3). + +Hard Negative Mining. We produce a set of both text- and image-based hard negatives for models to sift through for every question. Text sources are extracted from relevant passages on Wikipedia based on noun chunks in the question, while limiting overlap to avoid false negatives. For images, we leverage Bing APIs to find similar images with respect to both the description (via Bing Image Search) and the visual content (via Bing Image Insight). In total, we collect 25K image-based questions, each requiring an average of 1.4 visual sources, and paired with 15.3 text and 15.9 visual distractors. Question prefixes are visualised in Fig 2. + +Categorization. We categorize questions into open and closed classes. Closed class questions include: color, shape, number (i.e. "how many"), yes/no (Y/N), and "multi-choice" (MC). The rest are open class questions. + +Adversarial splits. We construct our test set to be out-of-distribution when possible to reward models with better generalization and reasoning. For color, shape, and number questions, we partition the answer set and ensure that the majority class during training does not carry over to testing. For the + +![](images/9991ff5c4ec72ac714ff7a7ee1da799692587bcea6dd38015cf6986503d2b3a1.jpg) +Figure 2. Image question prefixes (see Appendix B). + +"Y/N" and "MC" classes, we trained models on 10 random train-test splits and consistently difficult samples across splits were placed in the test set. Finally, we randomly split questions from the open-class "other". + +# 4.2. Answers From Text + +We collected multi-hop QA pairs that involve combining knowledge from $\geq 2$ snippets. To generate diverse, yet consistent, topics for mining difficult multi-hop reasoning questions, we construct clusters of similar entities, but where text snippets had low overall n-gram overlap or semantic similarity (yielding 8K clusters). We provide annotators with four snippets to prevent and allow them to contribute facts they researched to help answer the question. + +Hard Negative Mining. For text distractors we mine passages from Wikipedia that contain noun phrases from the question and choose those with the highest lexical overlap + +
Descriptions
QuestionAnswerCorrectDistractCorrectDistract
Image16.4± 614.4± 613.3±1112.6±11—36.4±10
Text18.6± 810.7±10—14.1±1345.3±1238.3±10
+ +but lacking reference to the answer. For image distractors, we use the images and descriptions present on the aforementioned Wikipedia pages, again filtering for those with high lexical overlap. In total, we collected 24K text-based questions, each requiring 2.0 text sources, and paired with 14.6 text and 11.6 visual distractors. Lacking clear criteria for question categorization, we do not construct an adversarial test split, but instead simply sample randomly. + +# 4.3. Quality Control + +We ensure the data quality via crowdworkers training and expert-feedback-in-the-loop, which are found to be effective ingredients in crowdsourcing [19]. The initial pool of annotators were trained with a tutorial and selected via a qualification task. Additionally, we released the annotation task in batches to spot check quality after every batch, followed by sending constructive feedback to correct any deviation from our expectations. Workers who failed multiple times were de-qualified. Crowdsourcing data is challenging in that crowdworders are usually income-driven and will stick to a fixed answer generation pattern once they find it lucrative. To better align the crowdworkers' incentives with our goal, we generously bonus out-of-the-box thinking. All data was then also run through additional validation HITs to ensure agreement. Annotator pay averaged $13/hr overall (lower on the initial qualification and higher on the annotation/validation). Appendix A contains rubics and interfaces. + +# 4.4. Dataset Statistics + +In total, WEBQA has over 34K training QA pairs, with an additional 5K and 7.5K held out for development and testing. Overall Statistics are summarized in Table 4 and language distributions are p + +Table 3. Length distribution for different textual components. + +
ModalityTrainDevTest
Image18,9542,5113,464
Text17,8122,4554,076
+ +Table 4. Number of samples collected for each modality fold. + +Multi-hop. $44\%$ of image-based queries and $99\%$ of text-based queries require two or more knowledge sources. This is verified by crowdworkers during validation to ensure that multiple knowledge sources provide non-overlapping information and cannot be replaced by each other. Additionally, as image sources also require understanding the caption, even single-image queries require multi-source reasoning. + +![](images/2cf0d8863c4a28b9738d18a2a614f01de0dd5608f557e82b06996235a945c4fb.jpg) +Figure 3. Samples of common topics in the image-based (left) and text-based (right) folds of the data. + +![](images/1ceec9de54c581d2e8e27326d8b30fbb7871889cce2af8e99bb7277461462ccd.jpg) + +Topics. Fig 3 provides a qualitative sense of the wide range of topics covered in WEBQA. In contrast to MultiModalQA, the images in WEBQA concentrate on the natural-world, events, and locations rather than digital artifacts (e.g. posters/logos). Snippets also exhibit a wide range of topics from contemporary science to ancient mythology. When comparing the topic clouds, it is clear that image-based queries more often relate to physical entities while text-based queries tend to be more abstract. + +# 5. Metrics + +WEBQA requires a model to answer open-domain questions and cite its sources. Therefore, we evaluate model performance with respect to both relevant fact prediction and question answering. While fact retrieval is easily evaluated via F1, language fluency and accuracy metrics are nuanced. + +# 5.1. Question Answering Metrics + +Our task expects fluent and complete sentences as answers, which we believe are appropriate for applications such as voice assistants or conversation agents. Therefore, the quality is measured as both fluency and accuracy. On each testing sample we collected five full-sentence answers written by humans. In addition, we collected one keyword answer by asking human annotators to rephrase the full-sentence answer into a succinct minimal semantic form. + +Fluency. We measure fluency via BARTScore [35], a newly proposed NLG evaluation metric based on accurate measurement of paraphrase quality. BARTScore(A, B) measures the probability of generating $B$ from $A$ . In our setting, this is computed as BARTScore(r, c), which can be interpreted as the probability of generating a candidate given a reference. Since BARTScore is based on the generation likelihoods, it does not distribute neatly across $[0,1]$ . So we normalize BARTScore(r, c) by the identity score BARTScore(r, r). On top of that, we make the normalized score bounded by 1. Finally, we choose the best score for a candidate across all references, as illustrated in Eq. 1. + +$$ +\mathbf {F L} (c, R) = \max \left\{\min \left(1, \frac {\text {B A R T S c o r e} (r , c)}{\text {B A R T S c o r e} (r , r)}\right) \right\} _ {r \in R} \tag {1} +$$ + +This formulation a) prioritizes semantic agreement and is robust to functional words misplacement, b) does not heavily punish short sentences (i.e. $< 4$ words) as BLEU4 [20] does, c) penalizes word reordering / disfluencies d) and unlike BERTScore [37], which indiscriminately treats all colors or all shapes as nearly identical, BARTScore better captures small but critical differences. However, no language based embedding metrics accurately evaluate visual phenomena, so we also introduce an accuracy metric. + +Accuracy. To ensure answer accuracy we use the collected keywords. Note, our paradigm differs from both open-domain text QA which focuses on lexical F1 and visual QA which uses a multiple choice evaluation. F1 rewards copying the question even if the key information is missing (e.g. the wrong color or count is chosen). Conversely, multiple-choice paradigms are not applicable to evaluate generated sentences. The goals of measuring accuracy on WEBQA are: 1. Detect the presence of key entities. 2. Penalize the use of any incorrect entities. 3. Avoid penalizing semantically relevant but superfluous words. We are unaware of any solution to all of these criteria in the naturally mixed setting of our data (open-domain entities with a nearly closed-domain set of properties), so we propose an appropriate metric to tackle the different styles of answers. + +Given the aforementioned question categorization for visual queries, questions having closed answer domains should be evaluated via F1 that tests for precision (avoiding a model producing both Yes and No to game the met + +
qc“Answer Domain” Dqc
Union of keywords
color... across color queries
shape... across shape queries
number... and #s in references
Y/N{'yes', 'no'}
+ +Table 5. "closed" classes + +ric). We define the answer domains $D_{qc}$ of those question categories (qc) in Table 5. For the remaining visual queries and all textual queries, they have diverse and unrestricted answer domains. So, there are good reasons to believe that the probability of cheating by guessing a long list of keywords is small and would be penalized by BARTScore, so we evaluate accuracy via recall (RE). With $c$ as a candidate output, $K$ for correct answer keywords, and $qc$ for question category, Equation 2 sketches our Acc score. + +$$ +\mathbf {A c c} (c, K) = \left\{ \begin{array}{l} \text {i f} q c \in [ \text {c o l o r}, \text {s h a p e}, \text {n u m b e r}, \mathrm {Y} / \mathrm {N} ]: \\ F 1 (c \cap D _ {q c}, K \cap D _ {q c}) \\ \text {o t h e r w i s e}: \\ R E (c, K) \end{array} \right. \tag {2} +$$ + +Finally, we report the average combined fluency and accuracy score $\mathbf{FL}^{*}\mathbf{A}\mathbf{cc}$ across all test samples as a single evaluation result for a system. + +# 6. Baseline Models + +We test existing models on WEBQA in both fine-tuned and few-shot settings. The former fine-tunes a pre-trained vision-and-language transformer [38] on our source retrieval and QA tasks, while the latter (PICa [33]) prompts GPT-3 [5] with engineered prefixes. Note, since the answer space in WEBQA is inappropriate for the classification approach (3K answers) considered by most VQA models, these models [6, 17, 25, 29], cannot be applied in our generative task. At present, VLP [38] and Oscar [16] are the top generative multimodal transformers. Oscar is built on VLP so we chose VLP as more canonical but include the state-of-the-art visual features of VinVL implemented in Oscar+ [36]. Other recent models [7] may also have complementary strengths. To test the largest possible language model, we also run PICa [33] which leverages VinVL based captioning to augment GPT-3 with oracle source knowledge. Finally, to simulate the full retrieval setting, we ran zero-shot sparse and dense retrieval models over the entire collection of sources. + +# 6.1. Fine-tuning Approach + +We train two separate models for source retrieval and question answering on from released VLP [38] weights. + +Input Representation. Text segments, including the questions, answers, textual sources and image captions, are tokenized by the Bert-base-cased [8] tokenizer. Each image is represented by 100 regions predicted by an object detection model, which is a variant of Faster RCNN with an ResNeXt-101 FPN backbone, pretrained on Visual Genome [14]. We take the output of fc1 layer from the object detection network an 2048-dim feature and finetune the fc2 layer. We also experiment with the latest state-of-the-art representations from VinVL [36]. Comparing to ResNeXt-101 FPN, the major advances of VinVL include a larger backbone (ResNeXt-152), replacement of FPN by $\mathrm{C4^5}$ and better pretraining enriched by attribute information. + +Source Retrieval. Candidate sources $s_1, s_2, \ldots, s_n$ are fed to the model one by one. Each pass takes the concatenation of $<[\mathrm{CLS}], s_i, [\mathrm{SEP}], Q, [\mathrm{SEP}] >$ and estimates probability of a particular source being selected. Let $\mathcal{G}$ and $\mathcal{D}$ denote the set of gold sources and distractors for a sample. The loss function is as follows. + +Unlike the categories in Table 5 where it is wrong to output incorrect elements, including more elements in additional to the correct element in an answer may be correct if asked to compare the elements. We leave this to future NLG evaluation research as outside the scope of this work. +4see Appendix C for limitations of classification in WEBQA +5Prior work [12,36] has shown that C4 features are more effective for VL tasks due to its ImageNet weight initialization and inductive bias of the convolutional head. Both factors are not present in the MLP head of FPN. + +$$ +L o s s _ {r e t r i e v a l} = \sum_ {s _ {i} \in \mathcal {G}} \log p _ {s _ {i}} + \sum_ {s _ {i} \in \mathcal {D}} \log \left(1 - p _ {s _ {i}}\right) \tag {3} +$$ + +Question Answering. We feed $<[\mathrm{CLS}], S, [\mathrm{SEP}], Q, A, [\mathrm{SEP}] >$ to the Transformer, where attention masks are applied to tokens in $A$ to satisfy the auto-regressive property. We use standard Masked-Language-Modeling [8] loss during fine-tuning. We decode by iteratively appending a [MASK] to the end of the input, replacing it with a predicted token and appending a new [MASK] for the next timestep. Generation stops upon seeing [SEP], [PAD], or reaching a maximum length. We use beam search $(n = 5)$ and choose the most confident output for evaluation. + +Model Variants. In addition to the standard VLP trained on full data, we also include two modality-specific variants $\mathrm{VLP}^{\mathcal{T}}$ and $\mathrm{VLP}^{\mathcal{T}}$ , which are trained on image- or text-based queries only as opposed to the full data, in order to reveal gains and losses resulted from the complexity of presenting models with data from both modalities, + +# 6.2. Zero-shot Full-scale Retrieval Approach + +For end-to-end performance in an open-domain setting, we consider the entire collection of sources as our retrieval space (390k images and 540k text sources). Since running VLP-based retrieval of the test set over the entire source collection is prohibitively expensive ( $\sim 3$ years), we consider both sparse retrieval (BM25 [23]) and dense retrieval for a coarse filtering. Dense retrieval was achieved via CLIP [21] encoding all image and text sources, as well as all questions. Next, using the modality knowledge, we rank all image/text sources based on the question-source similarity. + +# 6.3. Few-shot Question Answering Approach + +PICa [33] is the strongest model on OK-VQA [18], where GPT-3 is prompted to generate answers given a few training samples as prefix. We adapt PICa to our QA task using oracle sources to provide an upper-bound for the best possible performance of the strongest known models. PICa (and GPT-3) exhibit unstable behaviors on source prediction when presented with $>4$ choices (as it is most familiar with 4-way multiple choice tasks). Due to the inability to fine-tune, we cannot construct a truly fair comparison of PICa with our other baselines on our full pipeline. + +We construct an input prefix by concatenating the pre-selected training examples, the context and the question of a testing sample. Since PICa's transformer backbone does not accept visual input, each image is described by three text + +![](images/77639ceb26f586d48ea8e8a7c906a561edaf96e63acbf1fa9742a570afaed46a.jpg) +Figure 4. Few-Shot GPT-3 prompts. + +segments, namely 1) a wikipedia description, b) a caption generated by Oscar+ [36] and c) a list of tags predicted by Oscar+. Limited by the maximum input length, we experimented with an 8-shot setting. If the input length exceeds the maximum length, we decrease the number of shots until it fits in the length budget. + +Training Example Selection. Training examples to be included in the prefix for each testing sample are selected according to both question and source similarities. We use CLIP [22] to extract text or image encodings for questions, oracle snippets and oracle images. When multiple sources exist, we take the average of pairwise similarities between sources in one sample and sources in the other. + +Prompt Design. We use XML-style brackets [13] to denote different text segments. See Fig 4 for what constitutes a prompt for a text- or image-based query. + +# 7. Results & Analysis + +Below we present results and analysis of our baselines' performance on WEBQA. We include question-only baselines for both VLP and PICa to investigate how effectively models use the sources. VLP scores 22.6 on the proposed metric when evaluated end-to-end (Table 6). Modest improvement can be achieved by knowing the gold sources, showing room for growth on retrieval correctness. We observe that the latest best-performing visual encoder, VinVL, does not lead to significant gains. This may support the argument that the missing aspects from the status quo are more reflected in cross-modal information sharing than in the imperfection of uni-modal representations. PICa achieves a large gain over VLP. Promising as it is, we later show that, while pursuing the benefits of scaling up is one thing, there is still a lot remaining to be done to combat the diminishing returns involved with scale [1]. We show that humans can perform our task with ease (i.e. achieving $>94$ Acc and $>55$ FL) computed via cross-evaluation on multiple (3-6) references provided by different annotators to + +
Source F1QA Pred. sourceQA Oracle source
FL ×Acc =FL ×Acc =
RestrictedVLP (Q-only)—34.922.213.434.922.213.4
VLP + VinVL68.942.636.722.644.640.424.5
70.944.238.924.145.742.225.9
PICa (Q-only)————47.643.428.8
PICa————57.161.640.1
FullCLIP(2)+VLP12.034.224.114.6———
CLIP(20)+VLP24.036.127.216.1———
Human90.5———55.194.352.4
+ +prove robustness and consensus. While models' FL scores are high, reaching human-level accuracy is not within sight. + +# 7.1. Source Retrieval + +Crucial to a complete system design is multimodal source retrieval. We investigate the effect of retrieval scale (Table 7) and dense versus sparse retrieval approaches. For the VLP-based model, sources are selected if its binary classification confidence is above a spec + +Table 6. We present both a "restricted" setting with relevant sources to pick between and a "full" setting in which retrieval includes all sources. Both VLP [38] and PICa [33] leverage VinVL [36] features. $\mathrm{CLIP}_{(20)}$ uses VLP to further filter to two sources for QA (Table 7) and is 8pts weaker than the restricted setting. + +
Query TypeImageText
Restr. BM2525.6143.75
VLP68.1369.48
Full BM2520.4328.15
CLIP(2)9.7113.96
CLIP(20)+VLP21.6826.01
+ +ified threshold. While the optimal thresholds for different models may vary, for fair comparisons we use 0.2, which is optimal for VLP on the development set. + +VLP achieves $>68\%$ F1 given a restricted set of candidates. Indicating that it can model semantic relevance, despite its lack of scalability. In comparison, we use simpler and less expensive approaches when scaling up to the full collection which causes our overall performance to degrade substantially (likely due both to the ambiguity and the weaker underlying document representations). The dense retrieval method suffers from a greater performance drop compared to sparse retrieval. Having VLP rerank the top 20 sources predicted by CLIP doubles F1, which holds promise for a future of large-scale coarse-to-fine retrieval that strikes a better accuracy-efficiency balance. See Appendix D for additional retrieval results. + +Table 7. Source Retrieval (F1↑) over $\sim 40$ sources (Restr.) or the full corpus. In $\mathrm{CLIP}_{(20)} + \mathrm{VLP}$ , VLP reranks the top 20 sources retrieved. + +
ImageText
YNMCColorShapeNumberOther
# samples9359812286220010584067
VLP (Q-only)16.149.03.90.80.527.918.1
VLP17.252.92.80.00.528.650.4
VLPI11.655.33.92.40.526.3—
VLPT——————48.6
Few PICa (Q-only)26.770.130.819.014.245.342.8
PICa27.470.142.517.313.848.774.8
Human10096.895.894.895.087.894.0
+ +Table 8. QA performance breakdown by question categories when presented with oracle sources: Acc ↑ + +# 7.2. Question Answering + +Table 8 provides an accuracy breakdown with respect to question categories. A noticeable pattern is that models are more capable of solving text-based queries than image-based queries. Both VLP and PICa greatly surpasses the question-only baseline and VLP performs favorably against $\mathrm{VLP}^{\mathcal{T}}$ , demonstrating reasonable use of sources and the effectiveness of combined training. + +On the other hand, image-based queries pose a much harder challenge. VLP and $\mathrm{VLP}^{\mathcal{I}}$ are no better than the question-only baseline on image-based queries. While this may be an issue of the sources being ignored, we also attribute this to the fact that the image-based testing samples are intentionally constructed to prevent the success of any superficial correlations that can be drawn from the training set (e.g. the majority answers in each category). We observe a similar issue with PICa. Although PICa consistently outperforms VLP, it does not demonstrate an appropriate utilization of the provided sources, which is especially true on "Y/N", "MC", "Shape", "Number" and "Other" question categories. PICa has a surprising amount of knowledge embedded in its parameters, but unlike with text, on images it shows very little improvement from the inclusion of visual sources, as such it is still lacking the ability to explicitly and effectively use the retrieved sources, which might be crucial for further progress towards human accuracy. + +We argue that performance is bottlenecked by the lossy textual representation of images consumed by PICa, thereby calling for concerted effort from both language and vision sides to build a unified representation rather than simply relying on one modality being translated to the other. For future research, we expect to explore whether symbolic or compositional representations in a structured problem space could equip a generative model with skills to perform aggregation beyond simple extraction. + +![](images/a6d993b29976de1ca7eddee0cc907fde37ecc382f698e66a508f217d2d84dc25.jpg) + +![](images/3d734fd78c3ed12e805c31be35e6b4534996ed248e9a76d25077e09f7d876148.jpg) + +Q: Are the land dinosaurs guarded by rail in both the Display Museum of Natural History in University of Michigan and the Museo Jurassic de Asturias? + +Pred: No, the land dinosaurs are not guarded by rail. + +KW: Yes + +Notes: The prediction is wrong but the output sentence is consistent in terms of negation. + +![](images/4e59710740639a3bd4f17544bef5e255aa6b4f113495e46e34e58ea2256c9e6d.jpg) + +Q: What is the sculpted bust at the Baroque library, Prague wearing on its head? + +Pred: The sculpted bust at the Baroque library, Prague is wearing a helmet on its head. KW: A flower wreath + +Notes: The model does not seriously consider the visual information. Comparing to a wreath, helmet is more likely to appear on a head and thereby being a safer choice. + +1. After the heavy 707 quad-jet was introduced in 1958, Boeing addressed the demand for shorter flight lengths from smaller airports. On December 5, 1960, the 727 was launched with 40 orders each from United Airlines and Eastern Air Lines. +2. The first airliner with jet power only was the Nene-powered Vickers VC.1 Viking G-AJPH, which first flew on 6 April 1948. + +Q: How many years after the flight of the first jet airliner was the Boeing 727 released? + +Pred: 727 + +KW: 12 years + +Notes: The model realizes a number is required, but being unable to perform arithmetic, simply copies a number from the snippets. + +1. Posterior reversible encephalopathy syndrome (PRES), also known as reversible posterior leukoencephalopathy syndrome (RPLS), is a rare condition in which parts of the brain are affected by swelling, usually as a result of an underlying cause. +2. The diagnosis is usually made by brain scan (MRI) on which areas of swelling can be identified. The treatment for PRES is supportive: removal of the cause or causes and treatment of any of the complications, such as anticonvulsants for seizures. + +Q: How is the condition also known as reversible posterior leukoencephalopathy syndrome (RPLS) diagnosed? + +Pred: It is diagnosed by swelling, usually as a result of an underlying cause. + +KW: by brain scan (MRI) + +Notes: The selected span from the first source is relevant but does not inform the diagnostic method + +Table 9. Common failures (see supplementary for additional predictions) include attempts at extraction or language model hallucinations. + +# 7.3. Qualitative Analysis + +Finally, we perform a qualitative analysis of the model's failures for both image- and text-based questions. Table 9 includes two image-based and two text-based examples with commentary (additional analysis in Appendix F). Both image questions are clean examples of producing logically consistent and fluent sentences which are incorrect. The first matches the negation but the answer should have been yes, while in the second, the model runs away with a very logical hallucination (heads wear helmets). + +In the text examples, we see a different pattern. Here the model is more easily able to copy facts from the source texts, but still demonstrates a lack of understanding or reasoning. In the first example, the model appears to know it is looking for a number, but choosing one via direct copying rather than performing the arithmetic necessary to combine both facts. In the second case, the model finds a relevant span selection (as is commonly the only thing necessary for text QA tasks), but does not understand that the question is asking about a method of diagnoses versus a symptom. + +None of the questions presented here require complex problem-solving skills. They follow rather simple implication, addition, or visual extraction patterns which are out of reach for current models (uni- or multi-modal). + +# 8. Conclusion + +WEBQA is a new multi-hop, multi-modal question answering challenge for our community. Designed to simulate the heterogeneous information landscape one might expect during a web search, WEBQA covers a series of open-domain general visual queries while also forcing models to still reason about text. Our task requires a system to determine relevant sources, perform aggregation and reasoning. We also propose a novel general recipe for evaluation on WEBQA which measures both fluency and accuracy. + +Neither the versatile V&L transformer nor the largescale text generator present a nearly-there solution. We provide both a restricted and full retrieval setup, to bridge multimodal QA and IR research. This dataset not only mirrors our everyday experience on the web, but provides a playground for the community to explore important subchallenges, targeting the creation of a single model for multimodal reasoning, knowledge aggregation, and open-domain visual understanding. + +WEBQA aims to facilitate research into constructing a single model which can 1) retrieve relevant documents, and 2) integrate information across a large context window including multiple paragraphs and images, in order to 3) generate fluent natural language answers. + +# References + +[1] Samira Abnar, Mostafa Dehghani, Behnam Neyshabur, and Hanie Sedghi. Exploring the limits of large scale pretraining. arXiv preprint arXiv:2110.02095, 2021. 6 +[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. 2 +[3] Emily M Bender and Alexander Koller. Climbing towards nlu: On meaning, form, and understanding in the age of data. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5185-5198, 2020. 1 +[4] Yonatan Bisk, Ari Holtzman, Jesse Thomason, Jacob Andreas, Yoshua Bengio, Joyce Chai, Mirella Lapata, Angeliki Lazaridou, Jonathan May, Aleksandr Nisnevich, Nicolas Pinto, and Joseph Turian. Experience Grounds Language. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020. 1 +[5] Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. *ArXiv*, 05 2020. 5 +[6] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In European conference on computer vision, pages 104-120. Springer, 2020. 5 +[7] Jaemin Cho, Jie Lei, Hao Tan, and Mohit Bansal. Unifying vision-and-language tasks via text generation. In International Conference on Machine Learning, pages 1931-1942. PMLR, 2021. 5 +[8] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 5, 6 +[9] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Bartra, and Devi Parikh. Making the V in VQA matter: Elevating the role of image understanding in Visual Question Answering. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[10] Darryl Hannan, Akshay Jain, and Mohit Bansal. Many-modalqa: Modality disambiguation and qa over diverse inputs. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 7879-7886, 2020. 1, 2 +[11] Drew A. Hudson and Christopher D. Manning. GQA: A new dataset for real-world visual reasoning and compositional question answering. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 6700-6709. Computer Vision Foundation / IEEE, 2019. 2 + +[12] Huaizu Jiang, Ishan Misra, Marcus Rohrbach, Erik Learned-Miller, and Xinlei Chen. In defense of grid features for visual question answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10267-10276, 2020. 5 +[13] Liwei Jiang, Jena D Hwang, Chandra Bhagavatula, Ronan Le Bras, Maxwell Forbes, Jon Borchardt, Jenny Liang, Oren Etzioni, Maarten Sap, and Yejin Choi. Delphi: Towards machine ethics and norms. arXiv preprint arXiv:2110.07574, 2021. 6 +[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. 5 +[15] Jie Lei, Licheng Yu, Mohit Bansal, and Tamara Berg. Tvqa: Localized, compositional video question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1369-1379, 2018. 2 +[16] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, pages 121-137. Springer, 2020. 5 +[17] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. Advances in Neural Information Processing Systems, 32:13-23, 2019. 5 +[18] Kenneth Marino, Mohammad Rastegari, Ali Farhadi, and Roozbeh Mottaghi. OK-VQA: A visual question answering benchmark requiring external knowledge. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 3195-3204. Computer Vision Foundation / IEEE, 2019. 2, 6 +[19] Nikita Nangia, Saku Sugawara, Harsh Trivedi, Alex Warstadt, Clara Vania, and Samuel R Bowman. What ingredients make for an effective crowdsourcing protocol for difficult nlu data collection tasks? In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics, 2021. 4 +[20] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318, 2002. 5 +[21] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, pages 8748-8763. PMLR, 2021. 6 +[22] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. arXiv:2103.00020, 02 2021. 6 + +[23] Stephen Robertson and Hugo Zaragoza. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends in Information Retrieval, 3(4):333-389, 2009. 6 +[24] Hrituraj Singh, Anshul Nasery, Denil Mehta, Aishwarya Agarwal, Jatin Lamba, and Balaji Vasan Srinivasan. Mimoqa: Multimodal input multimodal output question answering. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5317-5332, 2021. 1, 2 +[25] Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. Vl-bert: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530, 2019. 5 +[26] Alane Suhr, Stephanie Zhou, Ally Zhang, Iris Zhang, Hua-jun Bai, and Yoav Artzi. A corpus for reasoning about natural language grounded in photographs. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, pages 6418-6428, Florence, Italy, July 2019. Association for Computational Linguistics. 2 +[27] Alon Talmor and Jonathan Berant. The web as a knowledgebase for answering complex questions. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 641-651, 2018. 2 +[28] Alon Talmor, Ori Yoran, Amnon Catav, Dan Lahav, Yizhong Wang, Akari Asai, Gabriel Ilharco, Hannaneh Hajishirzi, and Jonathan Berant. Multimodalqa: Complex question answering over text, tables and images. arXiv preprint arXiv:2104.06039, 2021. 1, 2 +[29] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. arXiv preprint arXiv:1908.07490, 2019. 5 +[30] 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. 2 +[31] Johannes Welbl, Pontus Stenetorp, and Sebastian Riedel. Constructing datasets for multi-hop reading comprehension across documents. Transactions of the Association for Computational Linguistics, 6:287-302, 2018. 2 +[32] Semih Yagcioglu, Aykut Erdem, Erkut Erdem, and Nazli Ikizler-Cinbis. Recipeqa: A challenge dataset for multimodal comprehension of cooking recipes. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1358-1368, 2018. 2 +[33] Zhengyuan Yang, Zhe Gan, Jianfeng Wang, Xiaowei Hu, Yumao Lu, Zicheng Liu, and Lijuan Wang. An empirical study of gpt-3 for few-shot knowledge-based vqa. arXiv preprint arXiv:2109.05014, 2021. 5, 6, 7 +[34] Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. In Ellen Riloff, David + +Chiang, Julia Hockenmaier, and Jun'ichi Tsujii, editors, Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 2369-2380. Association for Computational Linguistics, 2018. 2 +[35] Weizhe Yuan, Graham Neubig, and Pengfei Liu. Bartscore: Evaluating generated text as text generation. arXiv preprint arXiv:2106.11520, 2021. 4 +[36] Pengchuan Zhang, Xiujun Li, Xiaowei Hu, Jianwei Yang, Lei Zhang, Lijuan Wang, Yejin Choi, and Jianfeng Gao. Vinvl: Revisiting visual representations in vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5579-5588, 2021. 5, 6, 7 +[37] Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675, 2019. 5 +[38] Luowei Zhou, Hamid Palangi, Lei Zhang, Houdong Hu, Jason J. Corso, and Jianfeng Gao. Unified vision-language pre-training for image captioning and VQA. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 13041-13049. AAAI Press, 2020. 5, 7 \ No newline at end of file diff --git a/webqamultihopandmultimodalqa/images.zip b/webqamultihopandmultimodalqa/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..85431e48ffb11ce31903184d6dcac004874fad73 --- /dev/null +++ b/webqamultihopandmultimodalqa/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20ab9908700e19a94f362f98eff57b7b445489c75950454ad9fefa28d8e91002 +size 465574 diff --git a/webqamultihopandmultimodalqa/layout.json b/webqamultihopandmultimodalqa/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d9fdae68bb0fc32ed5f8983b707d247295455b67 --- /dev/null +++ b/webqamultihopandmultimodalqa/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:608987222bbc65541d50eb9ff30b0d173d503f4d9eb0ac80e8af03999da3a7c8 +size 371095 diff --git a/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_content_list.json b/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e367342a3fd11aca3a8a140098cdd557d555eac5 --- /dev/null +++ b/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b74ba0f247d45f8b62b4e07013f0532c56396827ac3bf4b19ec0ef395bbbcda +size 72488 diff --git a/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_model.json b/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_model.json new file mode 100644 index 0000000000000000000000000000000000000000..536b4e6d704848690b870dbf3a23a891c3c0ca40 --- /dev/null +++ b/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:243d5e5076a95d7294a64114e220f4a8b2c3f8cacd0c77e96de1607475f952f2 +size 89704 diff --git a/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_origin.pdf b/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9b5204ef563f2e31d76e812a8ea407e73c42c8b6 --- /dev/null +++ b/whatdonavigationagentslearnabouttheirenvironment/42b78748-c0ad-4937-b7eb-e3cbdf219554_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80e663af251cc1cd033a1824369c771f476d918114353ba039e5682e57bb80bf +size 1566854 diff --git a/whatdonavigationagentslearnabouttheirenvironment/full.md b/whatdonavigationagentslearnabouttheirenvironment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b192e13bfe080f6551aa515559ca829840b6783f --- /dev/null +++ b/whatdonavigationagentslearnabouttheirenvironment/full.md @@ -0,0 +1,285 @@ +# What do navigation agents learn about their environment? + +Kshitij Dwivedi, Gemma Roig + +Goethe University Frankfurt + +dwivedi@em.uni-frankfurt.de, roig@cs.uni-frankfurt.de + +Aniruddha Kembhavi, Roozbeh Mottaghi + +PRIOR @ Allen Institute for AI + +anik@allenai.org, roozbehm@allenai.org + +# Abstract + +Today's state of the art visual navigation agents typically consist of large deep learning models trained end to end. Such models offer little to no interpretability about the learned skills or the actions of the agent taken in response to its environment. While past works have explored interpreting deep learning models, little attention has been devoted to interpreting embodied AI systems, which often involve reasoning about the structure of the environment, target characteristics and the outcome of one's actions. In this paper, we introduce the Interpretability System for Embodied agEnts (iSEE) for Point Goal and Object Goal navigation agents. We use iSEE to probe the dynamic representations produced by these agents for the presence of information about the agent as well as the environment. We demonstrate interesting insights about navigation agents using iSEE, including the ability to encode reachable locations (to avoid obstacles), visibility of the target, progress from the initial spawn location as well as the dramatic effect on the behaviors of agents when we mask out critical individual neurons. + +# 1. Introduction + +The research area of Embodied AI – teaching embodied agents to perceive, communicate, reason and act in their environment – continues to receive a lot of interest from the computer vision, natural language processing and robotics communities. A growing body of work has resulted in the emergence of several powerful and visually rich simulators including AI2-THOR [20], Habitat [25] and iGibson [37]; works that require agents to navigate [2], reason [5], collaborate [18], manipulate [12] and follow instructions [3]. + +While fast progress is being made across a variety of tasks and benchmarks, most solutions being employed are black box neural networks trained to either imitate a se + +![](images/92b414ec31894c8e072a3004acae6752edf72d4e00a0a47846b1fa4243717a3d.jpg) +Figure 1. The iSEE framework. (a) An agent learns to perform the OBJECTNAV or POINTNAV tasks. (b) We wish to explore what information is encoded in the hidden representations of the agent. (c) To achieve this, we evaluate how well the agent's hidden representation can predict human interpretable concepts e.g. target visibility in ObjectNav. (d) Then we apply an explainability method SHAP [23] to identify the top-k relevant units. + +quence of human/oracle actions or trained via reinforcement learning with a careful selection of positive and negative rewards. These models offer little to no interpretability out-of-the-box about the concepts and skills learned by the model or about the actions taken by the model in response to a task or observation. Developing interpretable systems is particularly important in embodied AI since we expect these systems to eventually be deployed onto robots that will navigate the real physical world and interact with people in it. + +In the image classification literature, a number of interpretability methods have been developed over the past few years [7, 14, 28, 49]. These methods rely on probing model activations via various inputs or generating synthetic inputs that lead to a spike in an activation. While such methods are useful in probing Embodied AI models, they do not take into account the rich metadata (such as perfect segmentation, depth maps, precise object localization, etc.) available in synthetic environments commonly used to train these + +models. Simulated worlds provide us a unique opportunity to expand interpretability research to embodied agents and develop new methods that take advantages of rich metadata. + +We propose a framework to interpret the hidden representations of embodied agents trained in simulated worlds. We apply our framework to two navigation tasks (Figure 1a): Object Navigation (OBJECTNAV) [6], the task of navigating to a target object and Point Goal Navigation (POINTNAV) [2], the task of navigating to a specified relative co-ordinate, within the AI2THOR environment; but our methods are general and can be easily applied to more tasks and other environments. We train agents to perform these tasks and then probe their hidden representations to evaluate if they encode aspects of their task, progress and surroundings (Figure 1b and 1c). We then apply the model interpretation method SHAP [23] to identify which hidden units are most relevant for predicting these concepts (Figure 1d). Our framework allows us to gather evidence towards answering two fundamental questions about a trained model: (1) Has the model learned a particular concept? (2) Which units within a recurrent layer encode this concept? Using this framework, we were able to find several interesting insights about OBJECTNAV and POINTNAV agents. + +The key contributions of this work are: + +- A new interpretability framework specialized for navigation agents with no linearity assumptions between concepts and hidden units. +- New insights about what navigation agents encode and in which units: + +- sparse target representation in OBJECTNAV (50/512 units) and POINTNAV (5/512 units); + +- learning of concepts such as reachable locations and visit history by OBJECTNAV agents; encoding of progress towards target and less reliance on visual information by POINTNAV agents. + +- Ablation experiments showing no impact on model performance after removal of $10\%$ units suggesting redundancy in the representation. + +# 2. Related Work + +We explore representations stored within an agent's hidden units by predicting a human interpretable piece of information about the agent and its environment. Our work is related to two directions in interpretability research: (1) Interpretability of individual hidden units and (2) Explaining model's predictions. + +Interpretability of hidden units. A common approach to investigate what a hidden unit encodes is to find the input image also referred to as "preferred image" that leads to a maximal activation of the unit of interest. The preferred image can be from within the examples in a dataset [49, 50] or obtained using gradient descent by optimizing over the input [13, 16, 28, 29, 39, 42]. One disadvantage of the meth- + +ods using preferred images is that it is difficult to quantify the association of a unit with a concept. To address this issue, NetDissect [7, 51] uses overlap of a unit's spatial activation with groundtruth segmentation maps of a human interpretable concept as a measure to quantify a unit's association with a concept. The idea was further extended in Net2vec [14] to investigate whether a single unit or a group of units encode a concept. However, these approaches require groundtruth pixel-level annotation for every concept of interest and therefore for new concepts, new annotations are required. On the other hand, simulation environments [20, 25, 37] have annotations readily available as a part of the metadata. However, given the vast amount of metadata beyond simply object information, there is a need to develop new methods for these environments to interpret embodied agents. Recent embodied AI works [43, 48] have started focusing in interpretability by linear decoding of concepts from hidden units [43] and finding computational structure of the agent's recurrent units using fixed point analysis [48]. Patel et al. [31] explored interpretation of emergent communication in collaborative embodied agents. However these works do not focus on identifying which hidden units encode a given concept which is one of the main contributions of the present work. + +Explaining model predictions. Saliency methods [4, 30, 33, 35, 40] use gradients to find which pixels of an image are relevant for model's prediction. Additive feature attribution methods [24, 34, 38] investigate the effect of adding an input feature in model prediction. A disadvantage of these methods is that they focus on explaining the model predictions on raw pixel level. To explain the model prediction using human-interpretable concepts, TCAV [19] and subsequent works [15, 17, 21] were proposed that use concept vectors instead of raw pixels to explain model prediction. To find concept vectors additional human annotations are required. In the embodied environments [20, 25, 37], we have the advantage of already annotated human interpretable concepts. + +The above two directions of research have been considered as independent directions of interpretability research - one focusing on interpreting what the hidden units learn and the other on interpreting the decisions made by the model. In this work, we observe the potential of linking two approaches to interpret what the hidden units learn by using human interpretable concepts. Specifically, we train an interpretable model (Gradient boosted Tree) to predict human interpretable concepts from the hidden units of the model and then apply a global model explainability method SHAP [23] to explain which units are relevant for which concept prediction. In this work, we use SHAP because (a) it provides a unique solution with three desirable properties: local accuracy, missingness and consistency [24], (b) it unifies several model agnostic [34, 38] and tree based explanation methods [1], and (c) it provides explanation on + +both local (single example) and global (dataset) levels. + +Embodied tasks. Several approaches have been proposed [8-11, 22, 26, 27, 32, 37, 41, 45-47, 52] to tackle the navigation problem, which is a core task in Embodied AI. In this paper, we analyze standard base models for two popular navigation tasks, PointNav [2] and ObjectNav [6]. + +# 3. Interpretability Framework + +We introduce the Interpretability System for Embodied agEnts (iSEE). iSEE probes agents at their understanding of the task given to them, their progress at this task and the environment they act in. This probing is done via training simple machine learning models that input network activations and output the desired information. Simulated environments provide us with a gamut of metadata about the agent, task and surroundings, allowing us to train a series of models for probing this information. iSEE also helps identifying specific neural units that store this information. This is done via computing the SHapley Additive exPlanations (SHAP) [36] values for individual neural units. Finally we study the effect of switching off individual neural units on the downstream tasks that the agents are trained for. + +We study embodied agents trained for POINTNAV [2] (navigation towards a specific coordinate in a room) and OBJECTNAV [6] (navigation towards a specific object). Our agents encode their visual observations via a convolutional neural network and encode their target/goal via an embedding layer. The outputs of the visual and goal encoders are fed into a gated recurrent unit (GRU) to add memory. The hidden units of the GRU are then linearly transformed into the policy (distribution over actions) (Figure 2a). There are more complex, customized models for each of these tasks that achieve higher performance. However, we utilize these simple, generic models that can be applied to various tasks and make the comparisons across tasks more fair. In this work, we use iSEE to probe the hidden units in the GRU and use gradient boosted trees (GBT) as the ML model to determine the presence of relevant information within these hidden units (Figure 2b). We focus here specifically on GRU units since (a) we are interested in analyzing dynamic visual representations (GRU units) as opposed to static visual representations (CNN visual encoder) and (b) some of our models use a frozen visual encoder and only optimize the parameters within the GRU. + +We now describe the metadata extracted from the simulator, probing for this metadata via building GBTs and using SHAP to identify individual hidden units that store the relevant information. + +# 3.1. Metadata + +We probe agents at their understanding of the target, their position in the scene, the reachability of objects in their surroundings and their memory of visited locations as they + +navigate their world. This information is easily extracted by us from the metadata provided by the simulator. + +Target Information: Agents trained for the OBJECT-NAV and POINTNAV tasks must navigate to the location of a specified object or a point, respectively. In either case, one might expect an agent to be able to estimate its positioning with respect to the goal. Therefore, at a given timestep $t$ , we extract metadata containing the distance $(R_{t})$ and orientation $(\theta_{t})$ of the agent from the target (Figure 2c). In OBJECT-NAV, an agent is successful if the object lies within $1\mathrm{m}$ of the agent and is visible; thus we additionally extract target visibility $(visible_{t})$ . Since an object may be visible in the frame but not within the specified distance to determine success, we also extract the percent of pixels covered by the target object using segmentation masks provided by AI2-THOR $(Area_{t})$ . + +Agent's information: Memory of how far and in what direction one has travelled can be relevant to avoiding revisiting locations in the scene. Therefore, we extract the agent's distance $(R_{a})$ and orientation $(\theta_{a})$ with respect to its starting location (Figure 2c). + +Reachability: For an agent to successfully navigate in a scene it should be able to detect obstacles and its path around them. Thus, we extract metadata to detect whether a particular location with respect to the agent's current location is reachable or not. Given an agent's location, we first extract all reachable gridpoints in the scene. Then, with the agent's location as the center we consider three concentric circles with radii=2, 4, and 6 times the grid size and locate points on these circle that are at angles from 0 to 360 in the steps of the agents rotation angle (=30 degrees). For each of these points $R_{r}$ , $\theta_{\text{angle}}$ , where $r$ is the radius and angle is the orientation of the grid point with respect to agent in degrees, we check whether the closest reachable gridpoint is within gridSize/√2 or not. Figure 2d illustrates such reachable gridpoints in the scene. + +Visited History: The metadata extracted above captures a global summary of the agent's movements. We also extract its local visit history. This is done by checking if a location (visited $l$ ), rotation (visited $l_r$ ) and camera horizon (visited $l_{rh}$ ) has been visited by the agent or not. + +# 3.2. Metadata extraction + +As the agent traverses around in a scene, we extract the GRU activations of the agent along with the agent and scene metadata described above. This is done within the training and validation scenes. The latest model architectures and training algorithms for POINTNAV and OBJECTNAV lead to very capable agents that (a) exhibit little variability in their trajectories (b) do not collide often (c) make few mistakes such as revisiting locations. Such trajectories are less useful to probe agents, since the events of interest occur sparsely. Hence we use human trajectories (trajectories + +![](images/04144f4be706e3f111565303d079a2d4931cc1f2569bd99d6bf82c94e9fb1826.jpg) + +![](images/1bae2c9f5c107866a5c67cc882a8514add966e58348e9de59900eef55549b1d7.jpg) + +![](images/72b2bf8aab1c0d93312846d5aaf02f8cfc3962373c483b407f46e4a3382c32c4.jpg) +Figure 2. iSEE: a) At a given timestep, AI2THOR generates an observation that is fed as input to the agent along with a goal embedding. For that time step, we also extract relevant event metadata from AI2THOR which is unseen by the agent. b) After sampling rollouts from multiple training and validation episodes, we train a gradient boosted tree to predict metadata from the agent's hidden representation (GRU units). We then apply SHAP, an explainability method that identifies the top-k most relevant units for predicting a given metadata type. c) At a given timestep, we extract agent's orientation with respect to its initial spawn location $(R_{a},\theta_{a})$ and target location $(R_{t},\theta_{t})$ . d) We extract reachable positions at distance 2,4,6 times the grid size and different angles with step size of 30 degrees to identify whether these locations can be reached by the agent or not. + +![](images/ea8fe122157a6a7e76ccda62a3d0fc5ae0eeea3ae68fcc41b9593b37dca1fad8.jpg) + +specified by humans navigating around) that encourage exploration and have intentional collisions and mistakes. Using a pre-defined set of human trajectories also enables us to fairly compare findings across agents. + +# 3.3. Metadata prediction + +We train GBTs to predict specific metadata concepts using the GRU's hidden units as inputs. GBTs are trained using episodes within the training scenes and evaluated using correlation between the predicted metadata and groundtruth metadata on the validation episodes. For a given model, we trained one GBT of depth $= 10$ for each concept using xgboost library. For binary variables (such as target visibility) we use the logistic loss function and for continuous variables (such as distance from target/agent's initial position) we use the mean squared error loss function. Total training and evaluation time of GBT was 8 seconds on a single NVIDIA RTX 2070 GPU. We use GBTs because: (1) they are more interpretable in comparison to many other ML models when the mapping from inputs to outputs is not + +linear; (2) allow exact computation of SHAP values as compared to other models where SHAP values can only be approximated [23]. + +# 3.4. Identifying explainable units using SHAP + +Given a set of hidden units, SHAP computes the importance of each individual unit by quantifying its contribution towards predicting a concept. SHAP values are based on a game theory concept called Shapley values [36]. We first train a GBT to predict a concept using all hidden units. We then use a subset of hidden units and mask other units to predict a concept using pretrained GBT. Then we add in a new hidden unit and compute the change in the model's prediction capability. This difference quantifies the contribution of a hidden unit with regards to the chosen subset. By averaging this contribution over all possible subsets of hidden units, we get the Shapley value of the unit of interest. For instance, we use this method to compute the contribution of a specific GRU hidden unit towards predicting the visibility of the specified target. Note that the obtained + +![](images/40e55624d1830de6d3841817c78403aeae011702f45f4d3a8c85b86615959d51.jpg) +Figure 3. Schematic to read a SHAP plot: The plot shows the top-4 relevant GRU units to predict the target visibility. Each row shows the distribution of SHAP values of a given GRU unit for all the examples in the validation set with each dot in the row corresponding to an individual data point. The color of the dot indicates whether the GRU unit's output was low or high for that data point. + +Shapley value indicates the impact of the hidden unit on the model's outcome for a single example. To quantify the global impact of hidden unit on model's outcome we calculate the mean of absolute SHAP values over all examples in the validation set (for more details please see Appendix A). + +Figure 3 is a SHAP beeswarm plot to visualize the global contribution of the top-k relevant GRU units. We use this plot to explain how one can interpret SHAP plots. This plot visualizes the contribution of the top 4 relevant units to predict target visibility. Each row corresponds to a given GRU unit, and each dot in the row corresponds to the GRU unit's Shapley value for a given example. Each row displays the distribution of SHAP values on all the samples of the validation set. The location of a dot on the x axis shows whether the impact of the GRU unit on model's prediction (i.e. Shapley value) is positive or negative. The GRU unit's value for a sample is visualized using the colorbar on right. As an example, for the circled dot in Figure 3, the Shapley value of GRU unit 10 is negative and the color of the dot indicates that GRU unit 10's value is also low. For the examples on the right side of x-axis the shapley values are positive and the GRU unit's values are also higher. This means that GRU unit 10 is positively correlated with target visibility. Using a similar logic GRU unit 477 seems to be negatively correlated with target visibility. In a nutshell, the SHAP plot shows the global contribution of a GRU unit in prediction of a concept (rows sorted by contribution), displays the distribution over the validation examples (points in each row) and indicates whether a unit is positively or negatively correlated with the concept (colors of the points in accordance with the x-axis values). + +# 4. Experimental Setup + +We use the AllenAct [44] framework to train models for the tasks OBJECTNAV and POINTNAV tasks in the iTHOR rooms within AI2THOR [20]. For both tasks, we use the + +![](images/4520364ad6b6df04fcb960739c7e3898e7d06aefff0e0cc976f5ec3d5a6dd95d.jpg) +Figure 4. Metadata prediction by OBJECTNAV GRU units: a) Reachability b) Target information c) Visited history + +same split of rooms for training and validation. + +# 4.1. OBJECTNAV Models and Baselines + +We consider two models for OBJECTNAV. The first model uses a frozen ResNet18 as the visual encoder and is named $R N_{ON}$ , while the second uses a 5 layer CNN (referred to as SimpleConv) as the visual encoder, denoted by $S C_{ON}$ . In $S C_{ON}$ , the visual encoder is optimized using the gradients of the actor critic loss. The visual representation is concatenated with the goal embedding which is then fed to a GRU. The GRU is connected to two linear layers predicting the policy and value. To ascertain if the representations learned by OBJECTNAV agents are due to training, we consider two randomly initialized models with the same architectures as the baselines. For the random ResNet model, named $R N_{ON}^{r}$ , we initialize ResNet with ImageNet weights and initialize the GRU randomly. For the random SimpleConv model, named $S C_{ON}^{r}$ , both the visual encoder and GRU are initialized randomly. $R N_{ON}$ and $S C_{ON}$ are trained for 300 Million steps using the default hyperparameters from the AllenAct framework. + +# 4.2. POINTNAV Models and Baselines + +Similar to OBJECTNAV models we consider a ResNet based model $(RN_{PN})$ and a SimpleConv based model $(SC_{PN})$ . The distance and orientation to target are used as a sensory input to the model for target information. The corresponding random baselines are named $RN_{PN}^{T}$ and $SC_{PN}^{T}$ . $RN_{PN}$ and $SC_{PN}$ are trained for 300 Million steps using the default hyperparameters from AllenAct. + +
ObjectNavPointNav
ResNet18SimpleConvResNet18SimpleConv
TrainedRNONSCONRNPNSCPN
RandomRNORSCORRNTRRNTRPN
+ +# 4.3. Human Trajectories + +After training the OBJECTNAV and POINTNAV models, we collect human sampled trajectories for the training and validation rooms. The training trajectories contain 59 episodes with average episode length of 480 while validation trajectories contain 42 episodes with average episode + +![](images/050027211c4b5e71855dd6a0d87d531211c5c323466116ebcba0694f7746ab2d.jpg) +b) + +![](images/bb82820001f29c8017e5b0ae3a9ab99045079587ab25e61fd4f4208c0f517f37.jpg) +c) + +![](images/b83dc225bdc343d1a2549fab450e2ad7e2e3fedbb819a00ccb7f52cdaee6d2b9.jpg) + +![](images/9ce9f9d6750590310e937a5dc4c442abb8e5b25d599ce9364fca058ffac02bbf.jpg) +d) Reachability units + +![](images/f82d2680ea763572cc5671b14555e1a71d8a4c749d7d611508fc6e2a816f7e50.jpg) +FloorPlan21_Toaster_6 +f) + +![](images/2d52677004d8e65a32a4a7eb4e0d9c84f1cf74e34c61d70fb4a00d157153be12.jpg) +Figure 5. Visualization of hidden units. a) Target Visibility Unit: Top-4 most relevant units to predict target distance. b) The bar plot on left shows unit 10's (target unit) response. The center image is agent's current observation. The polar plot on right shows the distance (in meters) and orientation of the agent (in degrees) wrt target. In this case, the agent is at around 3 meters away from the target and is oriented around 0 degrees. The response of unit 10 is negative. c) In this case, the agent is now closer to target (around 1 meters) and unit 10's (target unit) response is positive. d) Reachability Unit: Top-4 most relevant hidden units to predict reachability at distance $2 \times$ gridSize and theta zero. e) The bar plot on the left shows unit 402's (reachability unit) response. The polar plot on right shows if the locations at radii of 2, 4, $6 \times$ gridSize and a given orientation in degrees are reachable or not. In this case, all the locations ahead are green i.e. reachable. The response of unit 402 is negative. f) All the locations ahead are red i.e. not reachable. The response of unit 402 is positive. + +![](images/0896deb88f3649fea588ab905480af08b6295d5482a0edbab2c91de8ac3467fc.jpg) + +length of 470. The subject was encouraged to completely explore the rooms with intentional collisions and visits to previously visited locations with an episode length upper limit of 500. All 8 models are forced to follow these trajectories. The corresponding metadata and GRU activity was extracted resulting in 28,000 training samples and 20,000 validation samples for GBT training. + +# 5. Results + +# 5.1. OBJECTNAV + +The validation performance of OBJECTNAV models saturates at around 50 million steps, therefore we select a checkpoint right after 50 million steps from both models. $RN_{ON}$ (success $= 0.458$ , SPL $= 0.23$ ) significantly outperforms $SC_{ON}$ (success $= 0.124$ , SPL $= 0.056$ ). Here success indicates the fraction of episodes the agent successfully reached the target and SPL refers to Success weighted by Path Length introduced in [2]. We consider concepts de + +rived from metadata that are related to target information $(R_{t},\theta_{t},\text{visible}_{t},\text{Area}_{t})$ , reachability $(R_{r}\theta_{angle}$ where $r$ is the radius and angle is the orientation of the neighboring grid point w.r.t. the agent), agent's information $(R_{a},\theta_{a})$ and visited history (visited $l$ , visited $lr$ , visited $lrh$ ). + +Metadata prediction: We train GBTs to predict metadata from the GRU units. We observe that $R N_{ON}$ predicts reachability much better than the other three OBJECT-NAV models (Figure 4a) with a correlation of 0.45 and ROC_AUC=0.75 for reachability in front ( $R_{2}\theta_{000}$ ). We also observe an interesting pattern that prediction of reachability drops as one moves from 0 (front of the agent) to 180 (behind) degree then it starts increasing from 180 to 330 degrees suggesting the reachability of locations in front is more predictable than behind the agent. In Figure 4a, we show the results for reachability with radius = 2 × gridsize. We observe a similar pattern for radius = 4 × gridsize and radius = 6 × gridsize (refer to Appendix B). + +![](images/31ea8aee49f370d2e617e9f3089c308e7e43136823bf816fbd0b2a6a0f6000cc.jpg) +Figure 6. Impact of removing units from $R N_{ON}$ . + +For the target information $(R_{t},\theta_{t},\text{Area}_{t},\text{visible}_{t})$ $RN_{ON}$ shows a higher correlation than the other three models (Figure 4b). Visited history also (visited,visited,visited) shows a higher correlation for $RN_{ON}$ (Figure 4c). The agent's information $(R_{a},\theta_{a})$ is not predicted well and $RN_{ON}$ model shows a correlation similar to baselines suggesting this information is not learned by the agent during training (refer to Appendix B). Overall, we observe that $RN_{ON}$ learns the reachability, target relevant information and visited history from OBJECTNAV training. This suggests that these three features are very crucial for performing this task. + +While we present the results only on four concepts we also considered collision but found that it was poorly predicted for all 4 models (refer to Appendix B). + +Hidden unit visualization: To identify which hidden units are relevant to the mentioned concepts we apply SHAP on the two most interesting concepts (visible $t$ and $R_{2}\theta_{000}$ ). In Figure 5a we show the top-4 units that are most relevant in predicting the target visibility. On observing the SHAP plot of unit 10 (Figure 5a) we see that when the unit's value is higher it has a positive impact on target visibility and vice-versa suggesting that the unit's value is high when the target is visible (for aggregate SHAP values over units see Appendix E). The polar plots show the agent's trajectory (Figure 5 b,c), blue line represents trajectory and green dot indicates the agent's current location wrt target. Bar plot shows the RNN unit's response for current observation. Here, the target is a bowl; when the agent is away from the target its response is negative (Figure 5b) and when it is closer its response is positive (Figure 5c). These results also suggest that this unit might be positively correlated to target visibility. + +In Figure 5d, we show the top-4 units most relevant in predicting $R_{2}\theta_{000}$ (for distribution of aggregate SHAP values over units see Appendix E). On observing the SHAP plot of unit 402 (Figure 5d) we can see that when the unit's value is higher it has negative impact on $R_{2}\theta_{000}$ and vice-versa suggesting that the unit value is high when the location ahead is not reachable. In Figure 5e,f, the dots are located at radii $= 2, 4, 6 \times \text{stepsize}$ from the agent and at angles from 0 to 330 in steps of $30^{\circ}$ , where 0 is the front of the agent. Dot color indicates if the location is reachable + +(green) or not (red). Here, when the location in front of the agent is reachable the unit's response is negative (Figure 5e) and when there is an obstacle in front the unit's response is positive (Figure 5f). These results suggest that this unit might be detecting obstacles ahead. + +Unit ablation: While SHAP provides a way to quantify the impact of hidden units on the prediction of a particular metadata concept, it does not imply causality. To identify causality we perform an ablation and measure the impact on the evaluation metrics. We remove units relevant to visible $t$ and $R_{2}\theta_{000}$ prediction and measure the impact on the model's performance in terms of SPL, success, and episode length. We compare the ablation results to removing a random selection of units as a baseline. To remove a unit, we set the unit's activity as a constant that is equal to the mean of that unit's activity over the training episodes. + +In Figure 6, we observe that removing only 10 target units leads to a huge drop in SPL as compared to removing as many as 50 random units or units encoding reachability. As we remove more target units, the success also begins to drop. This suggests that target units are crucial and removing them first deteriorates the agents ability to identify targets thus leading to longer episodes and low SPL scores and beyond a certain point, the agent ability to be successful is also affected. Removing reachability units also leads to drop in SPL but the impact is not as drastic as in the case of target units. Interestingly removing reachability units lead to increase in success rate potentially due to an increase in exploration. Removing randomly selected units do not significantly impact any of the performance measures. + +# 5.2. POINTNAV + +Similar to OBJECTNAV, we choose checkpoints after 50 million steps for our POINTNAV models. $RN_{PN}$ (success $= 0.925$ , SPL $= 0.755$ ) and $SC_{PN}$ (success $= 0.878$ , SPL $= 0.712$ ) are highly successful at this task. We consider concepts derived from metadata that are related to target information $(R_t,\theta_t)$ , reachability $(R_r\theta_{angle}$ where $r$ is the radius and angle is the orientation of the neighboring grid point with respect to the agent), agent's information $(R_a,\theta_a)$ and visited history (visited $l$ , visited $lr$ , visited $lrh$ ). + +Metadata prediction: We train the GBTs to predict metadata from the GRU units. We first observe from Figure 7a (left) that reachability is predicted at all the angles well. Another interesting thing to note is that models that are not even trained on the POINTNAV task $(RN_{PN}^{r}$ and $SC_{PN}^{r})$ can predict reachability. This result is surprising as compared to OBJECTNAV, where the only model that predicted reachability well was the one that performed well on the ObjectNAV task $(RN_{ON})$ . Further, $RN_{ON}$ only predicted the reachability in the view of the agent. Our intuition for the above result is that this could be due to additional information from GPS + compass sensor that provides the distance + +![](images/d9a9b1dd87e8824b710f0036e24bdf55f02fd83c9b2e51f3ce795a66f304af9b.jpg) +Figure 7. Metadata prediction by POINTNAV GRU units: a) Reachability b) Target information and c) Agent information + +![](images/04c676d3c8228579659a8e14ecd6211cb46d32a4e97871bcf5c8c71824899734.jpg) + +![](images/be5ee5bd792f0da25fe26992bf3a19c353de62cfa878364e91fb0fe575948804.jpg) + +![](images/c4726f21993d7fc302c84f051c1bb9256a40c3abd59e60e1dddf0b73ccb223cb.jpg) + +![](images/2414e690a69356077b4eed1a73de3e92b35e63a68582a7a0237cbe37242555d6.jpg) + +![](images/4f0a132f9870b1160d09cfd69867f3dab153acaf27d6c6b30b00119908be8b16.jpg) +Figure 8. Impact of removing units from $SC_{PN}$ . + +![](images/f7d94ef8aacb8e5e2b12d109808d9c65b64e23ac464c8a26d1d5058616f6db5d.jpg) + +![](images/2903102b6d39f91018907b84370bb0191a0a9bfb1cf3fa1cb9f77b26ad740730.jpg) + +and orientation of the target. To tease apart the prediction due to visual sensor and GPS sensor we perform an ablation study where in one case we replace the output of the GPS sensor by random noise (visual-only; Figure 7a center) and in the other we replace the image with all zeros (only GPS; Figure 7a right). + +In the visual-only case, we now observe a pattern similar to OBJECTNAV where reachability in the field of view is more predictable than out of view. However, it is important to note that prediction of reachability does not improve with training $RN_{PN}$ suggesting that ResNet with ImageNet weights is sufficient to predict reachability required to solve POINTNAV. $SC_{PN}^{r}$ however does not seem to predict front reachability $(R_{2}\theta_{000})$ as effectively as $SC_{PN}$ suggesting that a random initialization is not sufficient to predict reachability required to solve POINTNAV. + +In the target-only case, we observe that the reachability of the backside of the agent is more predictable compared to the angles in the field of view. One possible explanation for this could be that when the distance between target and the agent changes in a given step that means the position at the back was reachable since the agent was there in the previous step. Therefore, using the change in GPS sensor values reachability at back can be predicted in some cases. + +The target distance and orientation is predictable when the GPS sensor is available for all the models (Figure 7b and Appendix C). This finding is expected as we provide this information as input, and when the GPS sensor is noise it can not be predicted (refer to Appendix C). Interestingly when the GPS sensor is available (Figure 7c and Appendix C), hidden units in trained POINTNAV models can predict the distance of the agent $(R_{a})$ from the initial spawn loca + +tion. When using the SHAP method to find the relevant units for predicting $R_{a}$ , we observe that top most relevant units have a constant value (refer to Appendix D) at almost every step in the episode and show very low variance in its output. On further inspection, we found that the 2 units in top-20 most relevant units for $R_{a}$ prediction were also relevant for target distance $R_{t}$ prediction. To predict $R_{a}$ , GBT might be using a combination of a constant unit(s) and unit that encodes the target information. + +Unit ablation: Similar to OBJECTNAV we perform ablations by removing units and measuring the impact on the metrics. As shown in Figure 8 removing random and reachability units have almost no impact on the performance. Even after removing 50 units we observe similar performance on all three metrics. Removing the units that are relevant for predicting $R_{a}$ causes a significant drop in the performance and on dropping 50 units both SPL and success rate almost reach zero. The episode length also reaches the highest possible value (500) set in the task definition i.e. the episode ends if agent takes 500 steps. On further inspection, we found that in top-50 $R_{a}$ units, there are 6 units from the top-50 $R_{t}$ units. This is the key reason why POINTNAV performance dropped as the target distance information is lost. We further performed an ablation by removing only these 6 target units, which resulted in a drastic drop. + +# 6. Conclusion + +We propose iSEE to investigate if concepts about the agent, environment and task are encoded in the hidden representation of embodied agents. While we focus on visual navigation agents trained in AI2-THOR, the framework is generic and can be applied to agents trained on any task in any virtual environment with relevant metadata available. Our analysis shows the OBJECTNAV agent encodes target orientation, reachability and visited locations history in order to avoid obstacles and visiting the same locations repeatedly. POINTNAV agents encode target orientation and its progress towards the target and show less reliance on visual information. + +# References + +[1] TreeInterpreter. https://github.com/andosa/treeInterpreter. [Accessed Nov, 2021]. 2 +[2] Peter Anderson, Angel X. Chang, Devendra Singh Chaplot, Alexey Dosovitskiy, Saurabh Gupta, Vladlen Koltun, Jana Kosecka, Jitendra Malik, Roozbeh Mottaghi, Manolis Savva, and Amir Roshan Zamir. On evaluation of embodied navigation agents. arXiv, 2018. 1, 2, 3, 6 +[3] 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. 1 +[4] Sebastian Bach, Alexander Binder, Gregoire Montavon, Frederick Klauschen, Klaus-Robert Müller, and Wojciech Samek. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. PloS one, 2015. 2 +[5] Dhruv Batra, Angel X. Chang, Sonia Chernova, Andrew J. Davison, Jia Deng, Vladlen Koltun, Sergey Levine, Jitendra Malik, Igor Mordatch, Roozbeh Mottaghi, Manolis Savva, and Hao Su. Rearrangement: A challenge for embodied AI. arXiv, 2020. 1 +[6] Dhruv Batra, Aaron Gokaslan, Aniruddha Kembhavi, Oleksandr Maksymets, Roozbeh Mottaghi, Manolis Savva, Alexander Toshev, and Erik Wijmans. Objectnav revisited: On evaluation of embodied agents navigating to objects. arXiv, 2020. 2, 3 +[7] David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations. In CVPR, 2017. 1, 2 +[8] Devendra Singh Chaplot, Dhiraj Prakashchand Gandhi, Abhinav Gupta, and Russ R Salakhutdinov. Object goal navigation using goal-oriented semantic exploration. In NeurIPS, 2020. 3 +[9] Prithvijit Chattopadhyay, Judy Hoffman, Roozbeh Mottaghi, and Aniruddha Kembhavi. Robustnav: Towards benchmarking robustness in embodied navigation. ArXiv, abs/2106.04531, 2021. 3 +[10] Changan Chen, Ziad Al-Halah, and Kristen Grauman. Semantic audio-visual navigation. In CVPR, 2021. 3 +[11] Heming Du, Xin Yu, and Liang Zheng. Learning object relation graph and tentative policy for visual navigation. In ECCV, 2020. 3 +[12] Kiana Ehsani, Winson Han, Alvaro Herrasti, Eli VanderBilt, Luca Weihs, Eric Kolve, Aniruddha Kembhavi, and Roozbeh Mottaghi. Manipulathor: A framework for visual object manipulation. In CVPR, 2021. 1 +[13] Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing higher-layer features of a deep network. University of Montreal, 1341(3):1, 2009. 2 +[14] Ruth Fong and Andrea Vedaldi. Net2vec: Quantifying and explaining how concepts are encoded by filters in deep neural networks. In CVPR, 2018. 1, 2 + +[15] Amirata Ghorbani, James Wexler, James Y Zou, and Been Kim. Towards automatic concept-based explanations. In NeurIPS, 2019. 2 +[16] Gabriel Goh, Nick Cammarata †, Chelsea Voss †, Shan Carter, Michael Petrov, Ludwig Schubert, Alec Radford, and Chris Olah. Multimodal neurons in artificial neural networks. Distill, 2021. 2 +[17] Yash Goyal, Amir Feder, Uri Shalit, and Been Kim. Explaining classifiers with causal concept effect (cace). arXiv, 2019. 2 +[18] Unnat Jain, Luca Weihs, Eric Kolve, Ali Farhadi, Svetlana Lazebnik, Aniruddha Kembhavi, and Alexander Schwing. A cordial sync: Going beyond marginal policies for multiagent embodied tasks. In ECCV, 2020. 1 +[19] Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, et al. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (tcav). In ICML, 2018. 2 +[20] Eric Kolve, Roozbeh Mottaghi, Winson Han, Eli Vanderbilt, Luca Weihs, Alvaro Herrasti, Daniel Gordon, Yuke Zhu, Abhinav Gupta, and Ali Farhadi. AI2-THOR: An Interactive 3D Environment for Visual AI. arXiv, 2017. 1, 2, 5 +[21] Chih kuan Yeh, Been Kim, Sercan Arik, Chun-Liang Li, Pradeep Ravikumar, and Tomas Pfister. On completeness-aware concept-based explanations in deep neural networks. In NeurIPS, 2020. 2 +[22] Juncheng Li, Xin Wang, Siliang Tang, Haizhou Shi, Fei Wu, Yueting Zhuang, and William Yang Wang. Unsupervised reinforcement learning of transferable meta-skills for embodied navigation. In CVPR, 2020. 3 +[23] Scott M. Lundberg, Gabriel Erion, Hugh Chen, Alex DeGrave, Jordan M. Prutkin, Bala Nair, Ronit Katz, Jonathan Himmelfarb, Nisha Bansal, and Su-In Lee. From local explanations to global understanding with explainable ai for trees. Nature Machine Intelligence, 2020. 1, 2, 4, 11 +[24] Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In NeurIPS, 2017. 2 +[25] Manolis Savva*, Abhishek Kadian*, Oleksandr Maksymets*, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, Devi Parikh, and Dhruv Batra. Habitat: A Platform for Embodied AI Research. In ICCV, 2019. 1, 2 +[26] Bar Mayo, Tamir Hazan, and Ayellet Tal. Visual navigation with spatial attention. In CVPR, 2021. 3 +[27] Arsalan Mousavian, Alexander Toshev, Marek Fiser, Jana Košecka, Ayzaan Wahid, and James Davidson. Visual representations for semantic target driven navigation. In ICRA, 2019. 3 +[28] Anh Nguyen, Alexey Dosovitskiy, Jason Yosinski, Thomas Brox, and Jeff Clune. Synthesizing the preferred inputs for neurons in neural networks via deep generator networks. In NeurIPS, 2016. 1, 2 +[29] Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. Feature visualization. Distill, 2017. 2 +[30] Daniel Omeiza, Skyler Speakman, Celia Cintas, and Komminist Weldermariam. Smooth grad-cam++: An enhanced inference level visualization technique for deep convolutional neural network models. arXiv, 2019. 2 + +[31] Shivansh Patel, Saim Wani, Unnat Jain, Alexander Schwing, Svetlana Lazebnik, Manolis Savva, and Angel X. Chang. Interpretation of emergent communication in heterogeneous collaborative embodied agents. In ICCV, 2021. 2 +[32] Santhosh K Ramakrishnan, Ziad Al-Halah, and Kristen Grauman. Occupancy anticipation for efficient exploration and navigation. In ECCV, 2020. 3 +[33] Sylvestre-Alvise Rebuffi, Ruth Fong, Xu Ji, and Andrea Vedaldi. There and back again: Revisiting backpropagation saliency methods. In CVPR, 2020. 2 +[34] Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. "why should i trust you?" explaining the predictions of any classifier. In KDD, 2016. 2 +[35] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017. 2 +[36] Lloyd S Shapley. 17. A value for $n$ -person games. 2016. 3, 4 +[37] Bokui Shen, Fei Xia, Chengshu Li, Roberto Mart'in-Mart'in, Linxi (Jim) Fan, Guanzhi Wang, S. Buch, Claudia. Pérez D'Arpino, Sanjana Srivastava, Lyne P. Tchapmi, Micael Edmond Tchapmi, Kent Vainio, Li Fei-Fei, and Silvio Savarese. igibson, a simulation environment for interactive tasks in large realistic scenes. In IROS, 2021. 1, 2, 3 +[38] Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In ICML, 2017. 2 +[39] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv, 2013. 2 +[40] Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg. Smoothgrad: removing noise by adding noise. arXiv, 2017. 2 +[41] Saim Wani, Shivansh Patel, Unnat Jain, Angel X. Chang, and Manolis Savva. Multion: Benchmarking semantic map memory using multi-object navigation. In NeurIPS, 2020. 3 +[42] Donglai Wei, Bolei Zhou, Antonio Torrabla, and William Freeman. Understanding intra-class knowledge inside cnn. arXiv, 2015. 2 +[43] Luca Weihs, Aniruddha Kembhavi, Kiana Ehsani, Sarah Pratt, Winson Han, Alvaro Herrasti, Eric Kolve, Dustin Schwenk, Roozbeh Mottaghi, and Ali Farhadi. Learning generalizable visual representations via interactive gameplay. In ICLR, 2021. 2 +[44] Luca Weihs, Jordi Salvador, Klemen Kotar, Unnat Jain, Kuohao Zeng, Roozbeh Mottaghi, and Aniruddha Kembhavi. Allenact: A framework for embodied ai research. arXiv, 2020. 5 +[45] Erik Wijmans, Abhishek Kadian, Ari S. Morcos, Stefan Lee, Irfan Essa, Devi Parikh, Manolis Savva, and Dhruv Batra. Dd-ppo: Learning near-perfect pointgoal navigators from 2.5 billion frames. In ICLR, 2020. 3 +[46] Mitchell Wortsman, Kiana Ehsani, Mohammad Rastegari, Ali Farhadi, and Roozbeh Mottaghi. Learning to learn how to learn: Self-adaptive visual navigation using meta-learning. In CVPR, 2019. 3 + +[47] Wei Yang, Xiaolong Wang, Ali Farhadi, Abhinav Gupta, and Roozbeh Mottaghi. Visual semantic navigation using scene priors. In ICLR, 2019. 3 +[48] Joel Ye, Dhruv Batra, Abhishek Das, and Erik Wijmans. Auxiliary tasks and exploration enable objectgoal navigation. In ICCV, 2021. 2 +[49] Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. arXiv, 2015. 1, 2 +[50] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014. 2 +[51] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. 2015. 2 +[52] Yuke Zhu, Roozbeh Mottaghi, Eric Kolve, Joseph J Lim, Abhinav Gupta, Li Fei-Fei, and Ali Farhadi. Target-driven visual navigation in indoor scenes using deep reinforcement learning. In ICRA, 2017. 3 \ No newline at end of file diff --git a/whatdonavigationagentslearnabouttheirenvironment/images.zip b/whatdonavigationagentslearnabouttheirenvironment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a5498746db2f2536c9cc0e07bc4910f0adb908a9 --- /dev/null +++ b/whatdonavigationagentslearnabouttheirenvironment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb406173266b400f048d0a86e2793581fe8ad16625b67dadb67a327027d19e1c +size 430852 diff --git a/whatdonavigationagentslearnabouttheirenvironment/layout.json b/whatdonavigationagentslearnabouttheirenvironment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2f5ec544447244811be04ecd79b8a9717ea8c112 --- /dev/null +++ b/whatdonavigationagentslearnabouttheirenvironment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:154368992bbb6d6b79c10633cf7fb2581dd07e90b430b6c24896c1dcbb2992fb +size 376814 diff --git a/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_content_list.json b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..657795a23df988dcb20a2e81f5fbdd04e838cea0 --- /dev/null +++ b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4377b3463645759d1e44deed664e6709823dedd05de7c0552199d8bd52b1d5bb +size 78375 diff --git a/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_model.json b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_model.json new file mode 100644 index 0000000000000000000000000000000000000000..aa0861a8302357847bff6ee990aa2e95118f37e1 --- /dev/null +++ b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d854b7f0366de39b918b01711610879dda73be9c4c04f38cd43d0a874babfcca +size 96589 diff --git a/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_origin.pdf b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..798a8e4593a41ad51fd78f9c8835b579fc347d0a --- /dev/null +++ b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/8cd488f2-ff84-498f-a973-c6ee2bb48e45_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:124787b43e679e9b8183b4bca6fa4c16ce42545b5a3a59c7dfe3e0b82bee1ae0 +size 4012728 diff --git a/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/full.md b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cb2aedac06c3ac9e0a5ac3fe17b38cdf2edc0e6d --- /dev/null +++ b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/full.md @@ -0,0 +1,265 @@ +# What Makes Transfer Learning Work for Medical Images: Feature Reuse & Other Factors + +Christos Matsoukas $^{1,2,3}$ , Johan Fredin Haslum $^{1,2,3}$ , Moein Sorkhei $^{1,2}$ , Magnus Söderberg $^{3}$ , Kevin Smith $^{1,2}$ + +$^{1}$ KTH Royal Institute of Technology, Stockholm, Sweden + +$^{2}$ Science for Life Laboratory, Stockholm, Sweden + +3 AstraZeneca, Gothenburg, Sweden + +# Abstract + +Transfer learning is a standard technique to transfer knowledge from one domain to another. For applications in medical imaging, transfer from ImageNet has become the de-facto approach, despite differences in the tasks and image characteristics between the domains. However, it is unclear what factors determine whether – and to what extent – transfer learning to the medical domain is useful. The longstanding assumption that features from the source domain get reused has recently been called into question. Through a series of experiments on several medical image benchmark datasets, we explore the relationship between transfer learning, data size, the capacity and inductive bias of the model, as well as the distance between the source and target domain. Our findings suggest that transfer learning is beneficial in most cases, and we characterize the important role feature reuse plays in its success. + +# 1. Introduction + +The goal of transfer learning is to reuse knowledge gained in one domain, the source domain, to improve performance in another, the target domain. Transfer learning is often used when data from the target domain is limited. Such is the case for medical imaging, where the expense of acquisition, the rareness of the disease, as well as legal and ethical issues limit data size. The lack of large public datasets has led to the widespread adoption of transfer learning from IMAGENET [10] to improve performance on medical tasks [27, 28, 39]. + +Despite its pervasive use, we do not yet fully understand what makes transfer learning from the natural to the medical domain work. In this paper, we endeavor to paint a more complete picture of which factors enable a successful transfer. Through a series of comprehensive experiments, we study the effectiveness of transfer learning as a function + +![](images/90bde27b9a434882640a627e0f586f50bd1dea88617cd55fb4cde7e49448eb3d.jpg) + +![](images/89a48af902569d5d1a385b6f30273a36cd7521e41a4ea6f00e0ac130b5f1165f.jpg) +nceptionV3 + +![](images/f798cd12596dab45d2cb6ce00afc9453cb92ffaeec5c622240a0aeb012e886f6.jpg) + +![](images/2654ede385f6d261ae02300425b5016be4661498e616f1d8c38b0b33560c00d5.jpg) +ResNet50 + +![](images/0fe789311bb1bad716b0ae044b65f231a591ebc1ed5f622cd5a8d92f0fb5c689.jpg) + +![](images/d41464de7f8f9f55be212674375ca284fe64cde06b9be0a802f084ecb14a1dc1.jpg) +APTOS 2019 +Figure 1. Factors affecting the utility of transfer learning from ImageNet to medical domains. The size of each dot represents relative increase in performance $\left(\frac{WT}{RI}\right)$ achieved transferring weights from ImageNet (WT) compared to random initialization (RI). The color of the dot indicates how much of the gain can be attributed to feature reuse (relative gains $\frac{WT - ST}{WT}$ from Table 1, normalized between the minimum and the maximum value for all settings, see Section 2 for details). Each panel shows the gains observed by a different model over five runs, in order of increasing inductive biases: DEiT-S, SWIN, INCEPTION and RESNET50. The benefits from transfer learning increase with (1) reduced data size, (2) smaller distances between the source and target domain, and (3) less inductive bias. Moreover, feature reuse correlates strongly with observed gains from transfer learning, suggesting that feature reuse plays an essential role - especially for ViTs which lack the inductive biases of CNNs. (*) indicates cases where feature reuse is less important, uncovered in [30, 36]. + +![](images/29214a798a3073d067d364d8787c50987b0e83a095784704f68d68cbaeec46e6.jpg) +CBIS-DDSM + +![](images/46b73999bea7c5babc92ca3b8783f53a6eef41339cbb0d2dbf91f99fa2bef7dc.jpg) +ISIC 2019 + +![](images/2b611958468b0d83f07318de2a54c933d95535e3a06fe251001ded74b82ca67c.jpg) +CheXpert + +![](images/f7817f870f7c88afec6e4c97fa82934b2566fc704ec0944fa7414b9ef4d9aa10.jpg) +PatchCamelyon + +of dataset size, the distance from the source domain, the model's capacity, and the model's inductive bias. Our findings, summarized in Figure 1, show that the benefits from transfer learning increase with: + +- reduced data size +- smaller distance between the source and target +- models with fewer inductive biases +- models with more capacity, to a lesser extent. + +We also find a strong correlation between the observed benefits from transfer learning and evidence for feature reuse. + +Much of our understanding about how transfer learning works was, until recently, based on the feature reuse hypothesis. The feature reuse hypothesis assumes that weights learned in the source domain yield features that can readily be used in the target domain. In practice, this means that weights learned on ImageNet provide useful features in the target domain, and do not change substantially during finetuning despite differences between the domains [4,5,13,34]. This hypothesis was recently challenged when Raghu et al. demonstrated that gains observed transferring to a medical task could largely be attributed to weight scaling and low-level statistics [36], which was later confirmed in [30]. + +We aim to bring some clarity to the role of feature reuse in this work. Because feature reuse is difficult to measure precisely, we examine it from multiple perspectives through a series of experiments. We find that when transfer learning works well: (1) weight statistics cannot account the majority of the gains (2) evidence for feature reuse is strongest. Our findings do not contradict those of [30, 36], rather, we show that they uncovered an isolated case (* in Figure 1)1 where feature reuse is less important: a large dataset, distant from IMAGENET. In this scenario, transfer learning yields only marginal benefits which can largely be attributed to the weight statistics. Our work paints a more complete picture, considering datasets with more variety in size and distance to the source domain, and concludes that feature reuse plays an important role in nearly all cases. + +We add to this picture with the finding that vision transformers (ViTs), a rising class of models with fewer inductive biases [11, 40], show a strong dependence on feature reuse in all the datasets we tested. We select four families of CNNs and ViTs with progressively stronger inductive biases and find that models with less inductive bias rely more heavily on feature reuse. Moreover, the pattern of feature reuse changes in models with less inductive bias. Specifically, feature reuse in ViTs is concentrated in early layers, whereas CNNs reuse features more consistently throughout the network. + +We share the code to reproduce our experiments, available at github.com/ChrisMats/features-reuse. + +# 2. Problem Formulation and Methodology + +The aim of this work is to examine transfer learning from the natural to the medical image domain. Our central question is: what factors determine if transferred representations are effective in the medical domain? Under what conditions do they yield improved performance? Is this affected by the size of the target dataset? The similarity/dissimilarity to the source dataset? What role does feature reuse play? Which of the source features are reused? And finally, what roles do the model's architecture and inductive biases play? + +To investigate these questions, we conduct a series of experiments considering a variety of medical image datasets, initialization strategies, and architectures with different levels of inductive bias. We also perform several ablation studies to characterize feature reuse at different depths throughout each network. The details of our methodology are described below. + +Datasets. We select datasets that help us characterize how the efficacy of transfer learning varies with properties of the data. For the source domain, we useImagenet throughout this work. For the target domain, we select a representative set of five standard medical image classification datasets. + +- APTOS2019 ( $N = 3,662$ ) High-resolution diabetic retinopathy images where the task is classification into 5 categories of disease severity [19]. +- CBIS-DDSM ( $N = 10,239$ ) A mammography dataset in which the task is to detect the presence of masses [23, 37]. +- ISIC 2019 ( $N = 25,331$ ) Dermoscopic images – the task is to classify among 9 different diagnostic categories of skin lesions [8,9,41]. +- CHEXPERT ( $N = 224$ , 316) Chest X-rays with labels over 14 categories of diagnostic observations [18]. +- PATCHCAMELYON ( $N = 327$ , 680) Patches of H&E stained WSIs of lymph node sections. The task is to classify each patch as cancerous or normal [2, 42]. + +We compute the Fréchet Inception Distance (FID) [17] between IMAGENET and the datasets listed above to measure similarity to the source domain (Figure 1 and Table 1). Although it may not be a perfect measure [6, 26], it gives a reasonable indication of relative distances between datasets. + +Architectures. To study the role of network architecture we selected two representative ViT models, DEiT [40] and SWIN [24], and two representative CNN models, RESNETs [16] and INCEPTION [38]. We selected these model types because they are widely studied and commonly used as backbones for other networks. To ensure a fair comparison we select architectural variants that are similar in capacity for our main experiments. + +Aside from their popularity, another reason we chose these models is to study the role of inductive bias in transfer learning - as each model has a unique set of inductive biases built in. The models, in increasing order of inductive bias are: DEiT, SWIN, INCEPTION, and RESNET. We start with the model with the least inductive biases, the DEiT family. Like the original ViT [11], DEiT is similar in spirit to a pure transformer - doing away with nearly all image-specific inductive biases, e.g. locality, translational equivariance, and hierarchical scale. According to Dosovitskiy et al., this causes pure ViTs like to generalize poorly when trained on insufficient amounts of data [11]. Recently, SWIN transformers were shown to outperform DEiTs and other ViTs onImagenet by reintroducing many inductive biases of CNNs. Combining self-attention with a hierarchical structure that operates locally at different scales, SWIN transformers have built locality, translational equivariance, and hierarchical scale into ViTs. Moving to CNNs, we include INCEPTION, an older CNN which features an inception block that processes the signal in parallel at multiple scales before propagating it to the next layer. Finally, we selected the ResNET family, as it is the most common and highly cited CNN backbone, and recent works have shown that ResNETs are competitive with recent SOTA CNNs [3]. + +Initialization methods. To understand the mechanism driving the success of transfer learning fromImagenet to the medical domain, we need to assess to what extent improvements from transfer learning can be attributed to feature reuse. Transfer learning is typically performed by taking an architecture, along with itsImagenet pretrained weights, and then fine-tuning it on the target task. Two things are transferred via this process: the model architecture and its learned weights. Raghu et al. showed that the actual values of the weights are not always necessary for good transfer learning performance [36]. One can achieve similar performance by initializing the network using its weight statistics. In this setting, transfer amounts to providing a good range of values to randomly initialize the network - eliminating feature reuse as a factor. + +To isolate the contribution of feature reuse vs. weight statistics, we employ three initialization strategies: + +- Weight transfer (WT) - transferring IMAGENET pretrained weights, +- Stats transfer $(ST)$ - sampling weights from a normal distribution whose mean and variance are taken layer-wise from an IMAGENET pre-trained model, +- Random init. $(RI) -$ Kaiming initialization [15]. + +Interrogating the differences between models initialized with these methods gives an indication as to what extent the transferred model reuses IMAGENET features. Furthermore, we can investigate where feature reuse is beneficial + +within the network by transferring weights (WT) up to block $n$ and initializing the remaining $m$ blocks using ST. We denote this setup WT-ST. For example, a ResNet50 with weight transfer up to conv1 is written ResNet50-WT-ST-1/5 $^2$ . + +Representational similarity. Looking more closely at feature reuse within the network, we ask the questions: how are features organized before and after fine-tuning – are they similar? Can feature similarity reveal feature reuse, or lack thereof? To answer these questions, we use Centered Kernel Alignment (CKA) to compute similarity between features within and across networks [21]. CKA's properties of invariance to orthogonal transformations and isotropic scaling allow meaningful quantitative comparisons between representations of different size. We compute CKA pairwise between every layer (in a single network or pair of networks) to provide a visual overview of network similarity. See Appendix A for details. + +Resilience of the transfer. It is difficult to directly measure whether transferred features are reused after fine-tuning. But, by investigating how "sticky" the transfer was - how much the weights drifted from their initial transferred values during fine-tuning - we can gain some insights. We use two different strategies to quantify the "stickiness" of the transfer: (1) we compute the $\ell_2$ distance between the initial weights and the weights after fine-tuning; (2) we measure the impact of resetting a layer's weights to their initial values, a property called re-initialization robustness by Zhang et al. [44]. Layers that undergo critical changes during fine-tuning (and thus exhibit low robustness) have either not re-used the transferred weights well or adapted strongly to the new domain. + +Analyzing transferred representations layer-wise. The next questions we wish to address are: Which parts of the network produce/reuse low-level vs. high-level features? And how do differences in representation between CNNs and ViTs impact transfer learning? The representational power and the effective receptive field of CNNs increase with depth. ViTs, on the other hand, “see” differently [35] – they maintain more uniform representations throughout, and can utilize both local and global features at every layer. + +To investigate these questions, we assess the representational power of the transferred features throughout the network. After initialization with WT, ST, and WT-ST, we fine-tune on the target dataset and apply a $k$ -NN evaluation protocol at the layers in question [7]. This compares the embedded representation of test samples to the $k = 200$ closest embeddings from the training set using cosine similarity. Essentially, this test allows us to see when high-level + +![](images/a5cbd70799cd315f02122513b4a39af95233e801b727df93f0ceebe7f39d2815.jpg) + +![](images/b0f24970b4eef4534d6bb97607b658113b4b8ffc2e42bc34c05d426df0fa4cb9.jpg) + +![](images/79b1443b8077e817a74d09e4f3360d32bd86e701a77644b4414cd36c9ead0855.jpg) + +![](images/1dc0efa0fd4ad983d992813d2d55a2686293d4d85466f1ab5e1eed2d6e374aba.jpg) +Figure 2. Which layers benefit from feature reuse? We evaluate the impact of weight transfer when using WT-ST initialization (WT fraction from 0 to 1, where $0 = \mathrm{ST}$ and $1 = \mathrm{WT}$ ). Lower performance on the left indicates that the network relies on transferred weights. $\star = \mathrm{RI}$ . The last panel reports the average relative gains for each model type averaged over all datasets. Details of WT-ST initialization can be found in Appendix H. + +![](images/98172c7fd4752fe4a8cc44afbd78c004c290c34740bfd3552ff84ae8f85b2c42.jpg) + +![](images/db434d75fa81716878a50255c82a9258462b13f9f7a794c1ef8779997cbc81ca.jpg) + +features emerge within the network. For CNNs, the embedding is obtained using global average pooling at the layer in question. For ViTs we follow a similar procedure, but with special modifications to handle theCLS token in DEiTs. TheCLS token processes information differently than the spatial tokens, carrying much of the information necessary for classification [11, 35, 40]. Therefore we construct the embeddings in three different ways: (1) using only the c1s token's activations, (2) using activations from the spatial tokens, (3) concatenating (1) and (2). + +Training procedure. Unless otherwise specified, we used the following training procedure for all experiments. Each dataset was divided into 80/10/10 train/test/validation splits, with the exception of APTOS2019, which was divided 70/15/15 due to its small size. Images were normalised and resized to $256 \times 256$ with the following augmentations applied: color jitter, random vertical and horizontal flips, and random crops $224 \times 224$ after rescaling. IMAGENET-pretrained weights were either available in PyTorch [33] or downloaded from the official repositories, in the cases of DEiT and SWIN. CNN and ViT models were trained with the Adam [20] and AdamW [25] optimizers respectively, with a batch size of 64. We performed independent grid searches to find suitable learning rates, and found that $10^{-4}$ works best for both CNNs and ViTs, except for RI which used $3 \times 10^{-4}$ . We used these as the base learning rates for the optimizers along with default 1,000 warm-up iterations. During training, we reduce the learning rate by a factor of 10 when the validation performance saturates, until we reach a final learning rate of $10^{-6}$ . For transformer models, we used the default patch size of $16 \times 16$ for the DEiT models and $4 \times 4$ for SWIN. For each run, we save + +
Model(# parameters)InitAPTOS2019, κ ↑DDSM, AUC ↑ISIC2019, Rec. ↑CheXpert, AUC ↑Camelyon, AUC ↑
n = 3,662FID = 160n = 10,239FID = 155n = 25,333FID = 141n = 224,316FID = 181n = 327,680FID = 202
DeiT-S(22M)RI0.684 ± 0.0170.907 ± 0.0050.576 ± 0.0130.740 ± 0.0060.921 ± 0.002
ST0.721 ± 0.0160.895 ± 0.0050.607 ± 0.0170.734 ± 0.0020.916 ± 0.005
WT0.894 ± 0.0170.949 ± 0.0110.824 ± 0.0080.792 ± 0.0010.962 ± 0.003
SWIN-T(29M)RI0.689 ± 0.0220.898 ± 0.0050.597 ± 0.0800.780 ± 0.0010.936 ± 0.002
ST0.722 ± 0.0170.900 ± 0.0040.654 ± 0.0080.785 ± 0.0000.948 ± 0.013
WT0.906 ± 0.0050.961 ± 0.0070.833 ± 0.0080.805 ± 0.0000.968 ± 0.006
InceptionV3(24M)RI0.835 ± 0.0120.923 ± 0.0030.668 ± 0.0080.794 ± 0.0010.956 ± 0.006
ST0.796 ± 0.0140.907 ± 0.0140.629 ± 0.0130.787 ± 0.0010.956 ± 0.003
WT0.873 ± 0.0070.939 ± 0.0100.758 ± 0.0110.797 ± 0.0000.958 ± 0.004
ResNet50(25M)RI0.845 ± 0.0220.919 ± 0.0050.664 ± 0.0160.796 ± 0.0000.948 ± 0.008
ST0.848 ± 0.0060.933 ± 0.0060.635 ± 0.0120.794 ± 0.0010.959 ± 0.003
WT0.888 ± 0.0040.957 ± 0.0030.795 ± 0.0110.800 ± 0.0010.960 ± 0.006
+ +Table 1. Performance of the models w.r.t different initializations. + +the initial checkpoint and the checkpoint with highest validation performance. + +# 3. Experiments + +In this section, we report our findings related to transfer learning and feature reuse. Unless otherwise stated, each experiment is repeated 5 times. We report the mean and standard deviation of the appropriate evaluation metric for each dataset: Quadratic Cohen Kappa for APTOS2019, Recall for ISIC, and ROC-AUC for DDSM, CHEXPERT, and PATCHCAMELYON. + +When is transfer learning to medical domains beneficial, and how important is feature reuse? To quantify the overall benefit of transfer learning and isolate the contribution of feature reuse, we compare weight transfer (WT), stats transfer (ST), and random initialization (RI). We also measure the distance between the source domain (IMAGENET) and target domains using Fréchet Inception Distance (FID) [17]. The results are reported in Table 1 and Figure 1. + +The overall trend we observe is the following: the benefits from transfer learning increase with (1) reduced data size, (2) smaller distances between the source and target domain, and (3) models with fewer inductive biases. We first consider the case where transfer learning is least beneficial: models with strong inductive biases applied to large datasets that poorly resemble IMAGENET. Here, gains from transfer learning are insignificant, e.g. for RESNET50 and INCEPTION applied to CHEXPERT and PATCHCAMELYON. The small benefits we do observe can be largely attributed to the weight statistics (ST), not feature reuse (WT), confirming previous observations [30, 36]. + +However, these findings do not carry over to ViTs. ViTs appear to benefit far more from feature reuse than CNNs. DEiT sees a strong boost from transfer learning on CHEXPERT and PATCHAMELYON, wholly attributed to weight transfer, implying strong feature reuse. SWIN, which reintroduces the inductive biases of CNNs, falls somewhere in the middle. A possible explanation for this behavior is that, owing to DEiT's lack of inductive bias, even the largest pub + +![](images/dbce1b09b35a48b7fbe4e91ba4ba20b0bb5ccbf63ab814f5886eb664984a0e92.jpg) +Figure 3. Layer-wise feature similarity using CKA. top: The CKA representational similarity as a function of model depth for WT initialized DEiT-S and RESNET50, before and after fine-tuning. bottom: Feature similarity between ST and WT initialized models after fine-tuning. See text for details. Full results appear in Appendix A. + +lic medical datasets lack sufficient examples to learn better features than those transferred from IMAGENET. + +The picture changes when we turn to small datasets. Here, transfer learning shows noteworthy gains for all models. However, the strength of the gains and the importance of feature reuse depends on the inductive biases of the model and the distance between the domains. DEiT and SWIN observe significant gains across the board, strongly attributed to feature reuse. RESNET50 and INCEPTION show reasonable gains from transfer learning on APTOS2019 and DDSM which can be partially attributed to feature reuse. Finally ISIC, the dataset which most closely resemblesImagenet, shows strong benefits for transfer learning and evidence for feature reuse for all models. + +Which layers benefit from feature reuse? We investigate where feature reuse occurs within the network by transferring weights (WT) up to block $n$ and initializing the remaining $m$ blocks using ST. The results appear in Figure 2. Here, we see distinctive trends revealing the differences between CNNs and ViTs. On large datasets, CNNs exhibit a relatively flat line indicating that, throughout the network, weight transfer (WT) offers no benefit over the statistics (ST). Here, most of the benefits of transfer learning come from the statistics, not feature reuse. For smaller datasets, CNNs show a linear trend implying that every layer sees some modest benefit from feature reuse. DEiT shows a markedly different trend across all datasets – a sharp jump in performance in early layers – indicating a strong dependence on feature reuse in these layers. This fits with previous works that have shown that local attention, which is crucial for good performance, is learned in early layers [7, 11]. + +![](images/312da0955d6645e5252c3ce5f17625ebaa3cab9c1e0a31d3d1d535c7a3e3b337.jpg) +Figure 4. $\ell_2$ distance of weights before and after fine-tuning. We report the mean $\ell_2$ distances between the initial and trained weights for different WT-ST initialization schemes, averaged over all datasets. Increased distances indicate that during training, the network larger changes the layer weights. More results can be found in Figure 17 in Appendix D. + +The importance of early layers we observe might be attributed to reuse of these local features which require huge amounts of data to learn [35]. SWIN exhibits properties of both DEiT and the CNNs, reflecting its mixture of inductive biases. On small datasets and those similar to IMAGENET SWIN closely mirrors DEiT, but shows trends resembling a CNN with enough data. General inductive bias trends can be seen comparing models in the last panel of Figure 2 which shows the average relative gains. For ViTs, fewer inductive biases necessitates extensive feature reuse but concentrated in the early layers. CNNs benefit from reused features to a lesser extent, but more consistently throughout the network, reflecting the hierarchical nature of the architecture. + +To summarize the findings thus far: the benefits of transfer learning are tied to feature reuse, and depend on the size of the dataset, proximity to IMAGENET, and the model's inductive biases. Next, we look for further evidence of feature reuse through different perspectives. + +What properties of transfer learning are revealed via feature similarity? We investigate where similar features occur within the network using CKA, a similarity measure described in Section 2. In Figure 3 (top) and Figure 9 in the Appendix, we visualize feature similarity resulting from transfer learning (WT), before and after fine-tuning. Red indicates high feature similarity. High feature similarity along the diagonal is evidence for feature reuse in the corresponding layers. For DEiT, we see feature similarity is strongest in the early- to mid-layers. In later layers, the trained model adapts to the new task and drifts away from theImagenet features. RESNET50 after transfer learning shows more broad feature similarity - with the exception of the final layers which must adapt to the new task. This fits with the compositional nature of CNN features, also reflected in layer-by-layer improvements in Figures 2 and 6. A common trend shared by both ViTs and CNNs is that when more data is available, the transition point from feature reuse to feature adaptation shifts towards earlier layers because the network has sufficient data to adapt more of the transferredImagenet features to the new task. + +![](images/592c3c296e07a55de8eb1e1dc3070de30bf9247f5cd7228e9c335ae9f1274a07.jpg) +Figure 5. Re-initialization robustness. We measure the impact of resetting the model's weights to their initial value, one layer at a time. Drops in performance indicate that during learning, the network made critical changes to the layer weights which indicate it has not reused the transferred weights well. See text for details. Full results appear in Appendix C. + +Which transferred weights change? Another way to investigate feature reuse is to measure how much the weights drifted from their initial values during fine-tuning. In Figure 4 and Appendix D we report the $\ell_2$ distance between the initial weights of each network and the weights after fine-tuning. The general trend is that transferred weights (WT) remain in the same vicinity after fine-tuning, more so when transfer learning gains are strongest (Figure 17). As the network is progressively initialized more with ST, the transferred weights tend to "stick" less well. Certain layers, however, undergo substantial changes regardless – early layers in ViTs (the patchifier) and INCEPTION, and the first block at each scale in ResNET50. These are the first layers to encounter the data, or a scale change. + +The final way we look at feature reuse is to measure the impact of resetting a layer's weights to its initial values, or its re-initialization robustness, reported in Figure 5 and Figure 16 of the Appendix. Layers with low robustness underwent critical changes during fine-tuning. Those transferred weights could not be reused directly and had to be adapted. Our main finding is that networks with weight transfer (WT) undergo few critical changes, indicating feature reuse. When transfer learning is least effective (RESNET on CHEXPERT and PATCHCAMELYON) the gap in robustness between WT and ST is at its smallest. Interestingly, in ViTs with partial weight transfer (WT-ST), critical layers often appear at the transition between WT and ST. Rather than change the transferred weights, the network quickly adapts. But following this adaptation, no critical layers appear. As the data size increases, ViTs make more substantial early changes to adapt to the raw input (or partial WT). Transferred weights in CNNs, on the other hand, tend to be less "sticky" than ViTs. We see the same general trend where WT is the most robust, but unlike ViTs where WT was robust throughout the network, RESNET50 exhibits poor robustness at the final layers responsible for classification, and also periodically within the network at critical layers where the scale changes, as observed by [44]. + +![](images/026c478822fff67d1e122c2bd0392851d99eacb30b9645a31569a3825e6f6687.jpg) +Figure 6. Predictive performance of features at different depths using $k$ -nn evaluation. top: $k$ -NN evaluation performance at different depths for RESNET50 (row one) and DEiT-S (row two), with varying WT-ST fractions. bottom: Maximum $k$ -NN evaluation score achieved at any depth for corresponding WT-ST initialization fraction, for each model type. See discussion in the text. Full results appear in Appendix B. + +Are reused features low-level or high-level? Above, we employed multiple techniques to investigate when and where feature reuse occurs within the network. With those experiments in mind, our aim now is to determine what role the reused features play. Are they low-level or high-level features? A good indicator for a high-level feature is that it can partition the data for the final task - a property we can measure layer-wise using the $k$ -NN evaluation. Results of the $k$ -NN test are given in Figure 6. + +First, we consider ViTs. Previously, we observed that early layers are most crucial for ViT performance (Figure 2). In the re-initialization experiment (Figure 5) we also noticed that critical changes in ViTs occur either directly after the input, or at the transition between WT and ST. From the $k$ -NN tests in Figure 6 and 16 in the Appendix, we see that the relevance of the features increases dramatically within these critical layers. Later layers do not seem to contribute further to solve the task3. In the bottom of Figure 6 we notice that the discriminative power of ViT features increases rapidly as we add more WT layers in the beginning, but it saturates approximately halfway through the network. Interestingly, in an ablation we present in Appendix I, we found that the first 5 blocks of DEiTs performs comparably with the full 12 blocks for transfer learning. Evidently, early feature reuse in ViTs combined with the small medical data size results in unutilized capacity in the later layers of the ViTs, which can effectively be thrown away. Thus, we find that features reused in these critical early layers of ViTs are responsible for the creation of high-level features. According to [11, 35], these same critical early layers are responsible for learning a mix of local and global features + +![](images/bd26fef8abab7425df4542aafbf12cf2781158024f6a9c7190bb0dd4a025e896.jpg) +Figure 7. The impact of weight transfer for different model capacities. We evaluate the impact of weight transfer when using WT-ST initialization as a function of model capacity. Larger models benefit more from transfer learning but the same architectures follow similar patterns. + +- an essential component for good performance which requires very large datasets to learn - explaining ViT's strong dependence on feature reuse in transfer learning. In Appendix E we confirm that WT transfer produces a mixture of local and global attention in early ViT layers, whereas ST initialization cannot learn to attend locally. Next we turn to the CKA experiments at the bottom of Figure 3. Here, we find that early layers of ST-initialized models are similar to features from the first half of the WT-initialized models. We see that if the network is denied these essential pre-trained weights, it attempts to learn them rapidly using only a few layers (due to lack of data), resulting in poor performance. + +The role of transferred features in CNNs is different, as one might expect. We saw in Figure 2 that performance benefits from feature reuse are more evenly distributed throughout CNNs, while the re-initialization experiment in Figure 5 revealed that the critical layers are also spread out throughout the network. The $k$ -NN test in Figure 6 further supports these findings - a jump in early layers corresponding to low-level feature extraction is followed by progressive improvements in the features as each layer adds complexity over the previous, until the final layer. Large periodic $k$ -NN increases correspond to critical layers in Figure 5. These trends nicely follow our understanding of compositional learning in CNNs. A notable outlier is ISIC, where $k$ -NN improvement is delayed. This is likely due to ISIC's similarity to IMAGENET, which allows mid-level transferred features to be reused more readily. From the bottom row of Figure 3 we further observe that CNNs seem to learn similar features from different initializations, suggesting that their inductive biases may somehow naturally lead to these features (although the final layers used for classification diverge). We also observe a trend where, given more data, the ST-initialization is able to learn some novel mid-to high-level features not found in IMAGENET. + +Capacity and convergence. In addition to the other transfer learning factors investigated thus far we consider model capacity. We repeat our main experiments using DEiTs and RESNETs with different capacities and report the results in + +![](images/92c54cbfa9aa86077ce5f1065883020d36d33499047b80d98ffd15e473b9ddca.jpg) +Figure 8. Transfer learning and convergence speed. left: Validation curves of RESNET50 and DEiT-S on CHEXPERT using a constant learning rate. right: Relative convergence speedups as a function of WT transferred layers. As we transfer more layers, the convergence speed of CNNs see increases linearly with the depth, while for ViTs rapid increases are observed for the first half of the network followed by a plateau. + +Figure 7. We observe slight increases in transfer learning performance as model size increases, but the patterns exhibited by the individual architectures do not change. + +Finally, we investigate the impact of transfer learning on convergence speed. Validation curves in Figure 8 demonstrate the speed-up from transfer learning, which we measure in the last panel. We observe that convergence speed monotonically increases with the number of WT layers, in line with the finding of [36]. Furthermore, we observe that CNNs converge faster at a roughly linear rate as we include more WT layers, while vision transformers see a rapid increase in convergence speed for the first half of the network but diminishing returns are observed after that. + +# 4. Discussion + +Related work. Recent investigations have looked into which situations transfer learning works and when it fails [12, 14, 22, 27, 31]. Kornblith et al. [22] illustrate that transferred features may be less generally applicable than previously thought. In [14], He et al. show that transfer learning does not necessarily result in performance improvements, even for similar tasks. Yosinski et al. [43] found early features tend to be more general, and as we move deeper into the network the features become more task-specific. They also showed, along with Azizpour et al., that benefits from transfer learning diminish as the distance between the source and target domain increases [1, 43]. Mustafa et al. showed that transfer learning using large architectures and orders of magnitude larger natural image pretraining datasets can yield significant improvements in medical imaging domains [29]. + +Most relevant to our work is the work of Raghu et al. [36], which investigates transfer learning from IMAGENET to CHEXPERT and a large proprietary retinopathy dataset similar to APTOS2019. While they found that transfer from IMAGENET provided a speed-up during training, they observed very little performance gains from transfer learning. The authors argued that the main benefits of transfer learning to the medical domain is not due to feature reuse, + +but rather to the weight statistics and over-parameterization of the models. Neyshabur et al. followed up their work, claiming that the observed speed-ups are due to the initialization and the low-level statistics of the data [30]. + +In this paper, we go beyond the previous works, providing a more comprehensive analysis that delves into feature reuse within the network. We add clarity to the previous findings by exploring a wider range of datasets, showing that transfer learning is indeed effective for smaller datasets. We consider new angles that the previous works ignored - e.g. the role of inductive biases and how transfer learning works for ViTs, as well as the how domain distance factors into transfer learning for medical images. + +Factors of transferability. In this work, we paint a more complete picture of transfer learning to the medical domain by considering more medical modalities, data sizes, and the model's capacity and inductive bias. It is our conclusion that, for the majority of situations, transfer learning from IMAGENET yields significant performance gains. Our findings do not contradict those of [30,36], rather, we show that they uncovered an isolated case where the yields from transfer learning are minimal and feature reuse is less important. + +We identify four factors that influence transfer learning from IMAGENET to the medical domain. The data size and distance from the source domain are important factors that should not be overlooked. Smaller datasets always benefit from transfer learning, and so do datasets that are close to the source domain. The model's capacity has a small effect, but inductive bias is another important factor – the benefits from transfer learning are negatively correlated with the strength of the model's inductive biases. Looking at the extremes from our study: DEiTs, with the weakest inductive bias, heavily depend on transfer learning across the board. RESNETs, the models primarily used in previous works with the strongest inductive bias, show only limited improvement for large datasets and datasets that are distant from IMAGENET. But when the data size is smaller (as is often the case in medical tasks) or more similar to IMAGENET, even RESNET's benefits become significant. + +The role of feature reuse. The importance of feature reuse in transfer learning has also been recently questioned [36]. In order to better understand what drives transfer learning, we examined feature reuse from a number of different angles. Our main take-away is that when transfer learning works well, there is strong evidence of feature reuse. Beyond this, we characterized feature reuse within the network in a number of ways. We identified that certain critical features are "sticky" and less prone to change through transfer learning – though which particular features stick depends on the architecture. We observed that early layers are most crucial for ViT performance, which reuse a mixture of local and global features learned onImagenet + +to perform competitively. ViT's inability to relearn these essential features on small medical data sizes explains their strong dependence on feature reuse. We also found that this pattern of early feature reuse in ViTs means that later layers can be discarded without strongly affecting performance. CNNs benefit differently from feature reuse. In CNNs, feature reuse occurs more uniformly, marked by progressive improvements in the features as each layer adds complexity over the previous. The slope of the improvement varies with data characteristics – it can even become flat, as found in [30, 36]. We confirmed that these differences are primarily associated with model's inductive bias, rather than capacity, through a series of ablations. + +Limitations and potential negative societal impact. An exhaustive study of the factors that impact transfer learning is impossible – countless models and datasets could have been included. Nevertheless, we tried to select relevant and representative datasets and model types, covering a more diverse selection than previously studied. A potential pitfall of this work is the use of FID [17], which may not provide a perfect measure of distance between datasets [6, 26]. + +Despite well-meaning intentions, applying deep learning to medical data opens the possibility of unanticipated negative impacts. Without proper consideration, models can learn to replicate unwanted biases in the data. Failures can erode the public trust, and models that operate on medical data must take care not to reveal patient information. + +# 5. Conclusions + +In this work we evaluate the benefits from transfer learning when working with medical images and how feature reuse and other factors, like the dataset and model characteristics, affect its usefulness. We show that when transfer learning works, it is because of increased reuse of learned representations, and that models with less inductive bias, small datasets and datasets that are closer to IMAGENET see greater gains from it. We demonstrate that models with low inductive bias rely on reuse of local representations, composed mainly in early layers, to perform competitively with models with high inductive bias, which benefit from feature reuse throughout the network, but often to a lesser extent. Our work focuses on transfer to the medical domain, but we believe that our findings may apply to other domains, which we leave for future work. + +Acknowledgements. This work was supported by the Wallenberg Autonomous Systems Program (WASP), Stockholm County (HMT 20200958), and the Swedish Research Council (VR) 2017-04609. We thank Emir Konuk for the thoughtful discussions. + +# References + +[1] Hossein Azizpour, Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Factors of transferability for a generic convnet representation. IEEE transactions on pattern analysis and machine intelligence, 38(9):1790-1802, 2016. 7 +[2] Babak Ehteshami Bejnordi, Mitko Veta, Paul Johannes Van Diest, Bram Van Ginneken, Nico Karssemeijer, Geert Litjens, Jeroen AWM Van Der Laak, Meyke Hermsen, Quirine F Manson, Maschenka Balkenhol, et al. Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer. Jama, 318(22):2199-2210, 2017. 2 +[3] Irwan Bello, William Fedus, Xianzhi Du, Ekin D Cubuk, Aravind Srinivas, Tsung-Yi Lin, Jonathon Shlens, and Barret Zoph. Revisiting resnets: Improved training and scaling strategies. arXiv preprint arXiv:2103.07579, 2021. 3 +[4] Yoshua Bengio. Deep learning of representations for unsupervised and transfer learning. In Proceedings of ICML workshop on unsupervised and transfer learning, pages 17-36. JMLR Workshop and Conference Proceedings, 2012. 2 +[5] Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798-1828, 2013. 2 +[6] Ali Borji. Pros and cons of gan evaluation measures. Computer Vision and Image Understanding, 179:41-65, 2019. 2, 8 +[7] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. arXiv preprint arXiv:2104.14294, 2021. 3, 5 +[8] Noel CF Codella, David Gutman, M Emre Celebi, Brian Helba, Michael A Marchetti, Stephen W Dusza, Aadi Kalloo, Konstantinos Liopyris, Nabin Mishra, Harald Kittler, et al. Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (isbi), hosted by the international skin imaging collaboration (isic). In 2018 IEEE 15th international symposium on biomedical imaging (ISBI 2018), pages 168-172. IEEE, 2018. 2 +[9] Marc Combalia, Noel CF Codella, Veronica Rotemberg, Brian Helba, Veronica Vilaplana, Ofer Reiter, Cristina Carrera, Alicia Barreiro, Allan C Halpern, Susana Puig, et al. Bcn20000: Dermoscopic lesions in the wild. arXiv preprint arXiv:1908.02288, 2019. 2 +[10] 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. 1 +[11] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2020. 2, 3, 4, 5, 6, 14 +[12] 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. 7 +[13] 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 +[14] Kaiming He, Ross Girshick, and Piotr Dólar. Rethinking imageNet pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4918-4927, 2019. 7 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026-1034, 2015. 3 +[16] 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. 2, 14 +[17] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017. 2, 4, 8 +[18] Jeremy Irvin, Pranav Rajpurkar, Michael Ko, Yifan Yu, Silviana Ciurea-Ilcus, Chris Chute, Henrik Marklund, Behzad Haghgoo, Robyn Ball, Katie Shpanskaya, et al. Chexpert: A large chest radiograph dataset with uncertainty labels and expert comparison. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pages 590-597, 2019. 2 +[19] Kaggle. Aptos 2019 blindness detection, 2019. 2 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 4 +[21] Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In International Conference on Machine Learning, pages 3519-3529. PMLR, 2019. 3 +[22] Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better imagenet models transfer better? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2661-2671, 2019. 7 +[23] Rebecca Sawyer Lee, Francisco Gimenez, Assaf Hoogi, Kanae Kawai Miyake, Mia Gorovoy, and Daniel L Rubin. A curated mammography data set for use in computer-aided detection and diagnosis research. Scientific data, 4:170177, 2017. 2 +[24] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. 2 +[25] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. 4 +[26] Mario Lucic, Karol Kurach, Marcin Michalski, Sylvain Gelly, and Olivier Bousquet. Are gans created equal? a + +large-scale study. arXiv preprint arXiv:1711.10337, 2017. 2,8 +[27] Christos Matsoukas, Johan Fredin Haslum, Magnus Söderberg, and Kevin Smith. Is it time to replace cnns with transformers for medical images? arXiv preprint arXiv:2108.09038, 2021. 1, 7 +[28] Mohammad Amin Morid, Alireza Borjali, and Guilherme Del Fiol. A scoping review of transfer learning research on medical image analysis using imagenet. Computers in biology and medicine, page 104115, 2020. 1 +[29] Basil Mustafa, Aaron Loh, Jan Freyberg, Patricia MacWilliams, Megan Wilson, Scott Mayer McKinney, Marcin Sieniek, Jim Winkens, Yuan Liu, Peggy Bui, et al. Supervised transfer learning at scale for medical imaging. arXiv preprint arXiv:2101.05913, 2021. 7 +[30] Behnam Neyshabur, Hanie Sedghi, and Chiyuan Zhang. What is being transferred in transfer learning? arXiv preprint arXiv:2008.11687, 2020. 1, 2, 4, 8 +[31] Jiquan Ngiam, Daiyi Peng, Vijay Vasudevan, Simon Kornblith, Quoc V Le, and Ruoming Pang. Domain adaptive transfer learning with specialist models. arXiv preprint arXiv:1811.07056, 2018. 7 +[32] Thao Nguyen, Maithra Raghu, and Simon Kornblith. Do wide and deep networks learn the same things? uncovering how neural network representations vary with width and depth. arXiv preprint arXiv:2010.15327, 2020. 11 +[33] 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 H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc., 2019. 4 +[34] Aniruddh Raghu, Maithra Raghu, Samy Bengio, and Oriol Vinyals. Rapid learning or feature reuse? towards understanding the effectiveness of maml. arXiv preprint arXiv:1909.09157, 2019. 2 +[35] Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? arXiv preprint arXiv:2108.08810, 2021. 3, 4, 5, 6, 11 +[36] Maithra Raghu, Chiyuan Zhang, Jon Kleinberg, and Samy Bengio. Transfusion: Understanding transfer learning for medical imaging. In Advances in Neural Information Processing Systems, pages 3342-3352, 2019. 1, 2, 3, 4, 7, 8 +[37] Rebecca Sawyer-Lee, Francisco Gimenez, Assaf Hoogi, and Daniel Rubin. Curated breast imaging subset of ddsm, 2016. 2 +[38] 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. 2 + +[39] Nima Tajbakhsh, Jae Y Shin, Suryakanth R Gurudu, R Todd Hurst, Christopher B Kendall, Michael B Gotway, and Jianming Liang. Convolutional neural networks for medical image analysis: Full training or fine tuning? IEEE transactions on medical imaging, 35(5):1299-1312, 2016. 1 +[40] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. In International Conference on Machine Learning, pages 10347-10357. PMLR, 2021. 2, 4, 14 +[41] Philipp Tschandl, Cliff Rosendahl, and Harald Kittler. The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific data, 5(1):1-9, 2018. 2 +[42] Bastiaan S Veeling, Jasper Linmans, Jim Winkens, Taco Cohen, and Max Welling. Rotation equivariant cnns for digital pathology. In International Conference on Medical image computing and computer-assisted intervention, pages 210-218. Springer, 2018. 2 +[43] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? arXiv preprint arXiv:1411.1792, 2014. 7 +[44] Chiyuan Zhang, Samy Bengio, and Yoram Singer. Are all layers created equal? arXiv preprint arXiv:1902.01996, 2019. 3, 6 \ No newline at end of file diff --git a/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/images.zip b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..55da9436904cac301d3395753e0768571c150336 --- /dev/null +++ b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e539d5c5e4edbfe13daf34e922e6e2dcc8426d87d72f727ee8b86dde7266525 +size 374323 diff --git a/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/layout.json b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4a817396af47fdb06874ced83111448202cc7f56 --- /dev/null +++ b/whatmakestransferlearningworkformedicalimagesfeaturereuseotherfactors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c380a5e762650af6b3eaabc4ec425cf2f218e8a0228c0146811db23d74f25fc +size 342834 diff --git a/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_content_list.json b/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..41882e80d4133cf672c22821ebfe4dca47c0737a --- /dev/null +++ b/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e87c958a96df24e1d4294f3b55f8e928514793bdf9319c6aec2500d125b5bc2 +size 82157 diff --git a/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_model.json b/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4b4dc4f0bfaf80ac780298e63b52e996c6399188 --- /dev/null +++ b/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1fc2bd5b318929e7aa118604f3046171acec3aae8f9ee0577418622e9c171cf +size 98313 diff --git a/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_origin.pdf b/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c1ca1cfeeb38d8f4edcdbf64c259b0847faf6d44 --- /dev/null +++ b/whatmattersformetalearningvisionregressiontasks/fd9d6fd9-198d-419d-a02f-cd13b1122ba7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54672d572b718e95f42ee07fd7b6535e969ad74ac8a387b09ed54fd176d9a9bb +size 3038530 diff --git a/whatmattersformetalearningvisionregressiontasks/full.md b/whatmattersformetalearningvisionregressiontasks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0a4178e554ca988e8a5e8d48a44901b3d6288458 --- /dev/null +++ b/whatmattersformetalearningvisionregressiontasks/full.md @@ -0,0 +1,268 @@ +# What Matters For Meta-Learning Vision Regression Tasks? + +Ning Gao $^{1,2}$ Hanna Ziesche $^{1}$ Ngo Anh Vien $^{1}$ Michael Volpp $^{2}$ Gerhard Neumann $^{2}$ Bosch Center for Artificial Intelligence $^{2}$ Autonomous Learning Robots, KIT + +{ning.gao, hanna.ziesche}@de.bosch.com anhvien.ngo@bosch.com {michael.volpp, gerhard.neumann}@kit.edu + +# Abstract + +Meta-learning is widely used in few-shot classification and function regression due to its ability to quickly adapt to unseen tasks. However, it has not yet been well explored on regression tasks with high dimensional inputs such as images. This paper makes two main contributions that help understand this barely explored area. First, we design two new types of cross-category level vision regression tasks, namely object discovery and pose estimation of unprecedented complexity in the meta-learning domain for computer vision. To this end, we (i) exhaustively evaluate common meta-learning techniques on these tasks, and (ii) quantitatively analyze the effect of various deep learning techniques commonly used in recent meta-learning algorithms in order to strengthen the generalization capability: data augmentation, domain randomization, task augmentation and meta-regularization. Finally, we (iii) provide some insights and practical recommendations for training meta-learning algorithms on vision regression tasks. Second, we propose the addition of functional contrastive learning (FCL) over the task representations in Conditional Neural Processes (CNPs) and train in an end-to-end fashion. The experimental results show that the results of prior work are misleading as a consequence of a poor choice of the loss function as well as too small meta-training sets. Specifically, we find that CNPs outperform MAML on most tasks without fine-tuning. Furthermore, we observe that naive task augmentation without a tailored design results in underfitting. + +# 1. Introduction + +Humans are able to rapidly learn the fundamentals of new tasks within minutes of experience based on prior knowledge. For instance, humans can classify novel objects by capturing the distinguishable properties (e.g., textures, shapes and scales) from only a few examples. Meta-learning is proposed to learn relevant knowledge from various tasks and generalize to unseen tasks with only a few + +![](images/85a3ac254cb77db2cb896828a7b53c769794481dc1e2e4d0f29422c2eae973df.jpg) +Figure 1. Meta-learning vision regression tasks are designed to i) identify the queried object from context and predict its position for target images (Distractor), ii) identify the object's canonical pose from context and predict the 1D rotation relative to the canonical pose for target images (ShapeNet1D), iii) predict the 2D rotation w.r.t. the canonical pose with random background (ShapeNet2D). Predictions are performed on unseen objects. + +samples. Of the various meta-learning algorithms, MAML-based models [1-4] and Neural Processes (NPs) [5-8] are two variants which are receiving increasing attention in the recent years. Both algorithms try to learn good prior knowledge from related tasks without expanding the learned parameters or sacrificing efficiency at inference. While these methods have shown promising results in many domains, such as few-shot classification [2, 9-12] and hyperparameter optimization [13-15], an extensive study on meta-learning vision regression tasks has not yet been conducted. This is in particular true for NPs which have mostly been investigated on tasks with low-dimensional input such as function regression or pixel-wise completion [16-19]. + +In this paper, we make two major contributions to the largely unexplored area of meta-learning on high-dimensional input tasks. On the algorithmic level, in- + +spired by SimCLR [20], we propose an improvement to NPs by employing contrastive learning at the functional space (FCL) and still train the model in an end-to-end fashion. On the experimental side, we propose two application datasets, object discovery and pose estimation, which are based on high-dimensional inputs and require the meta-learning models to learn and reason at an image level. + +For the first application we create a regression task called "Distractor" (see Fig. 1), where each image contains two objects, the queried object and a distractor object, placed at random positions. The goal of this task is to identify the queried object and predict its position in the image plane. Unlike previous tasks such as image completion, where each pixel is considered as an independent input, our task requires the model to learn a high-level representation from the entire image. The second application (i.e., pose estimation) is inspired by prior work [21-24] on the Pascal1D dataset. As this dataset shows limited object variations and features only 1D rotation around the azimuth axis, we generate two new datasets with increasing task diversity, e.g., by introducing random background, cross-categorical object variations and 2D rotation. Since the background is generated from real-world images instead of blank as in prior work, our datasets significantly increase the task difficulty and allow us to perform a thorough investigation of the performance for the considered meta-learning approaches. Examples of our datasets are shown in Fig. 1 where i) ShapeNet1D contains 1D rotations as in Pascal1D, however with larger object variations and ii) ShapeNet2D features 2D rotation and random background. + +For both applications, we evaluate the performance on novel objects at both intra-category (IC) and cross-category (CC) levels. The results on Distractor show that our proposed algorithmic improvements significantly increase the performance, indicating our methods can enhance the task expressivity. The results on pose estimation demonstrate that meta-learning can successfully be applied to predict poses of unknown objects, which has a huge potential in robotic grasping and virtual/augmented reality (VR/AR). + +Prior work [21-24] on Pascal1D also demonstrates that meta-learning algorithms suffer from overfitting, especially with limited training data. Our work analyzes the effect of different techniques commonly adopted in recent meta-learning methods (i.e., data augmentation, task augmentation, regularization and domain randomization) on aforementioned datasets. We empirically find that the meta-learning algorithms employed in our work ultimately lead to overfitting regardless of dataset size for both applications. Moreover, our work shows that the results in prior work [21, 22], where MAML typically performs best for such tasks, are misleading. In particular, we find Conditional Neural Processes (CNPs) [5] are more flexible and + +efficient than MAML in the investigated pose regression tasks. Additionally, we find that MAML [1] suffers from underfitting especially on large-scale datasets and depends heavily on hyperparameter tuning. + +The primary contributions of this work can be summarized as follows: (1) We investigate meta-learning algorithms on vision regression tasks and demonstrate their ability to tackle structured problems. (2) We propose functional contrastive learning on the task representation of CNPs and thereby improve its expressivity. (3) We quantitatively analyze various deep learning techniques to alleviate meta overfitting. Our results rectify misleading conceptions from prior work, e.g., that MAML performs best for such tasks. We also present insights and practical recommendations on designing and implementing meta-learning algorithms on vision regression tasks. + +# 2. Related Work + +Meta-Learning. In meta-learning, also known as learning to learn, a learning agent gains meta knowledge from previous learning episodes or different domains and then uses this acquired knowledge to improve the learning on future tasks [25]. MAML is an optimization-based meta-learning method and represents the meta knowledge as the model parameters, where learning good initial parameters can enable quick adaptation to new tasks with only few update steps on a small number of samples [1]. Different from MAML, Neural Processes (NPs) constitute a class of neural latent variable models and interpret meta-learning as conditional few-shot function regression [6]. Similar to Gaussian Processes, NPs model distributions over functions conditioned on contexts [6, 7, 26]. Meta-learning algorithms have been applied successfully in low-dimensional function regression [5-7, 16], image completion [8, 18, 19], few-shot classification [2, 9-12, 27], reinforcement learning [4, 28-31], and neural architecture search (NAS) [32-35]. Recent works [3, 21-23] go one step further and apply meta-learning to pose estimation using gray-scale images. However, in these studies, the prediction is restricted to 1D rotation and the employed loss function is ill-posed as it does not take the periodicity of rotation into consideration. Moreover, [36] proposes to improve meta-learning by adding contrastive representation learning from disjoint context sets. A follow-up work [37] further extends this idea to time series data by combining contrastive learning with ConvNP [8]. However, in contrast to these two methods which need to learn a representation in a self-supervised way and fine-tune on downstream tasks subsequently, we use functional contrastive learning (FCL) between context and target sets and train in an end-to-end fashion. + +Meta Overfitting. It is well-known that meta-learning al + +gorithms suffer from two notorious types of overfitting: i) Memorization overfitting occurs when the model only conditions on the input to predict the output instead of relying on the context set [21]; ii) Learner overfitting happens when the prediction model and meta-learner overfit only to the training tasks and cannot generalize to novel tasks even though the prediction can condition on the context set [22]. Recently, different methods have been proposed to mitigate those overfitting issues, e.g., adding a regularization term on weights to restrict the memorization [21]. However, tuning a regularization term between underfitting and overfitting is challenging [38]. Subsequently, a related work [22] applied task augmentation which helps both memorization and learner overfitting. Meanwhile, [23] proposed MetaMix and Channel Shuffle to linearly combine features of context and target sets and replace channels with samples from different tasks. Furthermore, Ni et al. [24] empirically showed that data augmentation can also alleviate meta overfitting. Moreover, they find that employing data augmentation on target set achieves better performance. However, extensive comparisons on how these methods perform individually or combinedly are missing. In this work, we separate these techniques into data augmentation (DA), task augmentation (TA), meta-regularization (MR) and domain randomization (DR), and quantitatively compare them in different combinations on the two aforementioned applications in order to arrive at a better understanding and consistent comparisons. + +# 3. Study Design + +We now briefly describe both MAML and CNP in a unified way. We assume that all tasks are sampled from the same distribution $p(\mathcal{T})$ , each task $\mathcal{T}_i$ includes a context set $\mathcal{D}_C^i = \{(x_{C,1},y_{C,1}),\dots,(x_{C,K},y_{C,K})\}_i$ and a target set $\mathcal{D}_T^i = \{(x_{T,1},y_{T,1}),\dots,(x_{T,M},y_{T,M})\}_i$ where $K$ and $M$ are the number of samples in each set which could be different for each task. The entire training dataset is denoted as $\mathcal{D} = \{\mathcal{D}_C^i,\mathcal{D}_T^i\}_{i = 1}^N$ where N is the number of tasks sampled for training. During inference, the model is tested on a new task $\mathcal{T}^{*}\sim p(\mathcal{T})$ given a small context set, from which it has to infer a new function $f^{*}:(\mathcal{D}_{C}^{*},x_{T}^{*})\to \hat{y}_{T}^{*}$ . In meta-learning, there are two types of learned parameters, the first is the meta-parameters $\theta$ , which are learned during a meta-training phase using $\mathcal{D}$ . The second is task-specific parameters $\phi^{*}$ which are updated based on samples from a new task $\mathcal{D}_C^*$ conditioned on the learned meta-parameters $\theta$ . Predictions can be constructed as $\hat{y}_T^* = f_{\theta ,\phi^*}(x_T^*)$ , where $f$ is the meta-model parameterized by $\theta$ and $\phi^{*}$ . + +MAML considers both $\theta$ and $\phi^{*}$ as weights of neural networks while CNP considers only $\theta$ as neural weights. Different from MAML, which updates $\phi^{*}$ by gradient optimization on the new task samples, CNP takes $\phi^{*}$ as task representation and predicts it from the context set as $\phi^{*} =$ + +$\bigoplus_{i=1}^{K} h_{\theta}(x_{C,i}^{*}, y_{C,i}^{*})$ . Here $\bigoplus$ is a permutation invariant operator, $h$ is an encoder parameterized by $\theta$ . Subsequently, a decoder $g_{\theta}$ will take $\phi^{*}$ as an additional input and output $\hat{y}_{T}^{*} = g_{\theta}(x_{T}^{*}, \phi^{*})$ . Note that meta-parameters $\theta$ are fixed after meta-training phase, therefore CNPs don't require any fine-tuning as MAML. + +# 3.1. Problem Setting + +In this paper, we consider two types of image-based regression tasks, namely object discovery and pose estimation. First, we propose a non-trivial object discovery task called Distractor, which is only used for evaluating CNP variants. In contrast to existing object detection tasks [39-42] that are designed to specify all object instances from an input image, our task aims to i) distinguish the queried object from other distractors and additionally ii) predict its 2D location in the image plane. Therefore, it is essential to learn a distinctive embedding $\phi^{*}$ that can represent various queried objects given their associated context images $\{x_{C,i}^{*}\}_{i = 1}^{K}$ and corresponding positions $\{y_{C,i}^{*}\}_{i = 1}^{K}$ . Note that the distractors are sampled randomly from all categories and in many cases their appearances closely resemble the queried object. Hence, it is expected that aggregating multiple context pairs helps extracting expressive information to disambiguate the tasks and thus improve the performance. + +The second task, pose estimation, is evaluated on three datasets, namely Pascal1D, ShapeNet1D and ShapeNet2D with incremental difficulty, caused e.g., by extending inference to unseen cross-category objects, adding random backgrounds and extending 1D rotations to 2D rotations. Note that in this task, each object has a random canonical pose, which has to be learned from a context set $D_C^*$ where $\{y_{C,i}^*\}_{i=1}^K$ are the ground-truth rotations of context images $\{x_{C,i}^*\}_{i=1}^K$ . + +We use these tasks for an exhaustive evaluation of meta-learning algorithms: i) We evaluate the performance of CNPs using different aggregation operators, i.e., mean [5], max, bayesian aggregation (BA) [43] and cross-attention (CA) [7]. ii) We evaluate MAML on Pascal1D and ShapeNet1D following [21, 22] and compare it with different CNP variants. iii) Furthermore, we investigate meta overfitting with respect to different choices, e.g., augmentations, regularization, aggregation operators and task properties. iv) Moreover, we combine functional contrastive learning (FCL) with CNPs and compare it with original CNPs. + +# 3.2. Datasets + +We generate Distractor that contains 12 object categories from ShapeNetCoreV2 [44], where each category includes 1000 randomly sampled objects. For each object we create $36128 \times 128$ gray-scale images, containing two objects with random azimuth rotation and 2D position (see + +Fig. 1). The data generation is based on an extended version of a prior open-source pipeline [26]. We choose 10 categories for training, where we reserve $20\%$ of the data for intra-category (IC) evaluation. The remaining 2 categories are only used for cross-category (CC) evaluation. The second dataset, Pascal1D [21], contains 65 objects from 10 categories. We randomly select 50 objects for training and the other 15 objects for testing. $100128 \times 128$ gray-scale images are rendered for each object with a random rotation in azimuth angle normalized between [0, 10]. Since the performance is limited due to the size of the dataset, we generate a larger dataset, ShapeNet1D which includes 30 categories. 27 of these are used during training and IC evaluation, the other 3 categories are used for CC evaluation. For each training category, we randomly sample 50 objects for training and 10 for IC evaluation while CC evaluation is performed on 20 objects for each unseen category. To further increase the task difficulty, we create ShapeNet2D which includes 2D rotations. We restrict the azimuth angles to the range $[0^{\circ}, 180^{\circ}]$ in order to reduce the effect of symmetric ambiguity while elevations are restricted to $[0^{\circ}, 30^{\circ}]$ . Furthermore, we use RGB images and employ randomly sampled real-world images from SUN2012 [45] as background instead of static background. + +# 3.3. Data Augmentation, Domain Randomization, Task Augmentation and Meta Regularization + +Data Augmentation (DA). We use standard image augmentation techniques in our work, i.e., Dropout and Affine for all tasks, and an additional CropAndPad for all pose regression tasks. Furthermore, we employ Contrast, Brightness and Blur for ShapeNet2D. Details are presented in ?? + +Domain Randomization (DR). For ShapeNet2D, we additionally employ DR [46] by regenerating background images for all training data after every 2k training iterations while the data used for evaluation remain the same. + +Task Augmentation (TA). Task augmentation adds randomness to each task in order to encourage the meta-learner to learn non-trivial solutions instead of simply memorizing the training tasks. Following [22], we sample random noise $\epsilon^{(t)}$ from a discrete set for each task and create new tasks by adding the noise to the regression targets: $D_C^{(t)} = \{x_{C,i}^{(t)},y_{C,i}^{(t)} + \epsilon^{(t)}\}_{i = 1}^K$ and $D_T^{(t)} = \{x_{T,i}^{(t)},y_{T,i}^{(t)} + \epsilon^{(t)}\}_{i = 1}^M$ . Specifically, we sample 2D position noise from a discrete set $\epsilon \in \{0,1,2,\dots,16\} ^2$ for Distractor. For Pascal1D, we use the same noise set $\{0.,0.25,0.5,0.75\}$ as proposed in [21, 22] while $\{0.,0.125,0.25,\dots,2\}$ for ShapeNet1D. In ShapeNet2D, we first only add random noise in the azimuth angle from the discrete set $\{-10^{\circ}, - 9^{\circ},\dots,20^{\circ}\}$ and in a second step add additional elevation noise from the set $\{-5^{\circ}, - 4^{\circ},\dots,10^{\circ}\}$ for further comparison. + +Meta Regularization (MR). Following Yin et al. [21], we employ MR on the weights $\theta$ of the neural networks. + +Furthermore, we find that it is crucial to fine-tune the coefficient $\beta$ which modulates the regularizer and task information stored in the meta-parameters $\theta$ . In our experiments, we use $\beta = 1e^{-4}$ for Pascal1D, $1e^{-7}$ for ShapeNet1D and ShapeNet2D. More details about MR are presented in ?? + +# 3.4. Functional Contrastive Learning (FCL) + +The representations learned by CNP are invariant under permutation of the elements within a given context set. This property is achieved by a permutation invariant aggregation mechanism, e.g., max aggregation. However, another desirable property of the representation is invariance across context sets of the same task. In particular, the representations of different context sets belonging to the same task should be close to each other in the embedding space, while representations of different tasks should be farther apart. To achieve this, we add an additional contrastive loss at the functional space and train the model in an end-to-end fashion. The contrastive cross-entropy loss is defined as follows [20]: + +$$ +\mathcal {L} _ {\mathrm {F C L}} = - \frac {2}{N} \sum_ {t = 1} ^ {N} \log \frac {\exp \left(\sin \left(\phi_ {C} ^ {(t)} \cdot \phi_ {T} ^ {(t)}\right) / \tau\right)}{D \left(\phi_ {C} ^ {(t)}\right) D \left(\phi_ {T} ^ {(t)}\right)}, \tag {1} +$$ + +where $N$ denotes the number of tasks per batch. $(\phi_C^{(t)},\phi_T^{(t)})$ denotes a positive pair of latent representations of a given task obtained from context and target set respectively. More specifically, the pairs are obtained via max aggregation $\phi_C^{(t)} = \max (r_{C,1}^{(t)},\dots ,r_{C,K}^{(t)})$ and $\phi_T^{(t)} = \max (r_{T,1}^{(t)},\dots ,r_{T,M}^{(t)})$ where $K$ denotes the number of context pairs per task and $M$ the number of target pairs per task. max returns the element-wise maximum over the latent variables $r_i = h_\theta (x_i,y_i)$ which are output by the encoder network $h_\theta$ for each context pair $(x_{i},y_{i})$ . $\tau$ is a temperature parameter, which is crucial for learning good representations (details are presented in ??). $\mathrm{sim}(\cdot)$ is the cosine similarity and $D(\phi_i^t)$ sums the similarity of all positive and negative pairs for $\phi_i^t$ .. + +$$ +D \left(\phi_ {i} ^ {t}\right) = \sum_ {k = 1} ^ {N} \sum_ {j \in \{C, T \}} \mathbb {1} _ {\{k \neq t \} \vee \{j \neq i \} ]} \exp \left(\frac {\sin \left(\phi_ {i} ^ {t} \cdot \phi_ {j} ^ {k}\right)}{\tau}\right), \tag {2} +$$ + +where $\mathbb{1}_{[\{k\neq t\} \vee \{j\neq i\}]}\in \{0,1\}$ is an indicator evaluating to 1 only if the representations are sampled from different tasks or different sets. The log-value in Eq. (1) can be interpreted as the weighted importance of the positive pair. Therefore, this loss function encourages the model to obtain large similarity for positive pairs and small for negative pairs. + +# 3.5. Objective Functions and Evaluation Metrics + +Pascal1D. Following prior work [21-23] we conduct experiments using the MSE score between predicted + +and ground-truth azimuth rotation for both training and evaluation. However, this loss function does not take the ambiguity of coterminal angles into account. Hence, it can hamper the training process, e.g., predicting $359^{\circ}$ for a ground-truth angle of $0^{\circ}$ incurs a higher loss than predicting $180^{\circ}$ . Nevertheless, we follow the same setup to obtain a fair comparison to prior works. + +ShapeNet1D. Instead of using MSE score, we use the "cosine-sine-loss" for training and a prediction error defined in terms of the angular degree for evaluation. The loss of a single sample is defined as: + +$$ +\mathcal {L} = | \cos (y) - \cos \left(y ^ {*}\right) | ^ {2} + | \sin (y) - \sin \left(y ^ {*}\right) | ^ {2}, \tag {3} +$$ + +where $y^{*}$ is the ground-truth rotation and $y$ the predicted rotation. The prediction error used for evaluation is defined as follows: + +$$ +\mathcal {E} = \min \left\{\mathcal {E} _ {y ^ {+}, y ^ {*}}, \mathcal {E} _ {y ^ {-}, y ^ {*}}, \mathcal {E} _ {y, y ^ {*}} \right\}, \tag {4} +$$ + +where + +$$ +\mathcal {E} _ {y ^ {\pm}, y ^ {*}} = | y \pm 3 6 0 - y ^ {*} |, \mathcal {E} _ {y, y ^ {*}} = | y - y ^ {*} |. +$$ + +ShapeNet2D. We represent the 2D rotation as quaternion in both training and evaluation. The loss of a single sample is accordingly defined as follows: + +$$ +\mathcal {L} = \min \left\{\left| q ^ {*} - \frac {q}{\| q \|} \right|, \left| q ^ {*} - \frac {- q}{\| q \|} \right| \right\}, \tag {5} +$$ + +where $q^{*}$ denotes the ground-truth unit quaternion and $q$ denotes the predicted quaternion. We empirically find that using this objective function achieves a better performance than constraining the scalar part of $q$ to be positive. We hypothesize that enforcing the scalar constraint breaks the continuity of the rotation representation and therefore hampers training. + +# 4. Experiments + +In this section we present experimental results1, perform a thorough analysis and provide insights and recommendations. Instead of presenting the results following the task sequence, we structure this section by different algorithmic choices and perform a systematic comparison over all tasks by raising different questions. ?? provides visualization examples of different tasks. + +MAML or CNPs? We compare MAML and CNPs on two pose estimation datasets, Pascal1D and ShapeNet1D. + +
MethodsMeanMaxBACAMaxFCL
No Aug6.025.114.635.133.70
6.896.175.916.394.61
DA2.672.452.442.652.00
4.103.753.974.083.05
TA6.296.186.336.325.45
7.197.047.027.026.66
TA+DA3.203.092.653.052.60
6.075.144.674.983.90
+ +Table 1. Prediction error (pixel) on euclidean distance in the 2D image plane for Distractor. Different aggregation methods and augmentations are employed. The first row shows results for intracategory (IC) evaluations, the second row for cross-category (CC). + +
MethodsMAMLCNP (Mean)CNP (CA)
No Aug1.69 (0.22)5.28 (0.51)4.66 (0.74)
MR1.90 (0.27)2.96 (0.21)3.33 (0.27)
TA1.02 (0.06)1.98 (0.22)1.36 (0.25)
DA2.10 (0.09)3.69 (0.13)2.90 (0.03)
TA+DA1.31 (0.14)2.29 (0.19)1.77 (0.33)
+ +Table 2. Pascal1D pose estimation error. MSE and standard deviations are calculated with 5 random seeds. + +
MethodsMAMLCNP (Max)CNP (CA)
No Aug25.2714.97 (0.37)8.19 (0.30)
21.6318.09 (0.21)9.13 (0.18)
MR13.2312.71 (0.26)8.87 (0.36)
16.5514.77 (0.35)8.43 (0.39)
TA23.0110.89 (0.27)7.92 (0.25)
20.5914.43 (0.55)9.18 (0.50)
DA14.698.64 (0.21)6.24 (0.15)
16.029.87 (0.35)6.54 (0.19)
TA+DA17.967.66 (0.18)5.81 (0.23)
18.798.66 (0.19)6.23 (0.12)
TA+DA+FCL-7.82 (0.08)6.44 (0.36)
-8.84 (0.04)6.74 (0.20)
TA+DA+MR13.4510.54 (0.37)8.28 (0.17)
14.4410.76 (0.30)8.04 (0.10)
+ +Table 3. ShapeNet1D pose estimation error(°). Results are calculated with 5 random seeds except for MAML. The first row presents results for IC and the second row for CC. + +We obtain similar results as [21, 22] on Pascal1D, where MAML performs better than CNPs and the latter shows more severe overfitting (see Tab. 2). However, Tab. 3 illustrates that both CNP variants outperform MAML with a large margin on ShapeNet1D. It is good to note that, the prediction errors of all methods in Tab. 2 after denormal + +![](images/554a5405950e3b0fd4393433282a250f0f67effb97e19b31d89a54f15906004e.jpg) +(a) Distractor + +![](images/db0e24639d82806f29a2a1d4ae18ec587cd4f005d4016f76c179d066b22dfc9c.jpg) +(b) ShapeNet2D +Figure 2. (a) CNP Prediction error (pixel) vs context number for the Distractor task using Max aggregation and Max + FCL (MaxFCL). Results are evaluated on novel objects from both intra-category (IC) and unseen cross-category (CC) levels. (b) CNP (CA) Prediction error vs context number for ShapeNet2D using DA + TA. (c) We compare a classical object detection method and CNP (Max) using same dataset for training on Distractor. The classical model is further fine-tuned on each new task. The results are shown in dependence of the number of images used for fine-tuning or as context set.(d) Prediction error between the fine-tuned model and CNP (CA) on ShapeNet1D. + +![](images/874f03fcd5a4cbfa3b014e227ad9a904e1f3b3da2c4598fce991cd7e4fd26dce.jpg) +(c) Distractor + +![](images/7c8ca8278f9e49dc94a5565651f9811d007d531c4b371f83b2512e35b760844b.jpg) +(d) ShapeNet1D + +izing are larger than $30^{\circ}$ , indicating the experiments of prior work on Pascal1D simply used too little meta-data to make informative conclusions about the quality of different algorithms. Our interpretation is that MAML tries to learn a good initial prior (global optimum) which needs to be optimized on each specific task (fine-tuned optimum) within few samples and updates. On small datasets, MAML can easily find a global optimum that satisfies all the training tasks. At the same time MAML also overfits less, since the fine-tuning from global to fine-tuned optimum happens during inference time. However, finding a global optimum is getting difficult for large-scale datasets due to the increasing task diversity. Consequently, more samples and updates are necessary to fine-tune the task-specific parameters $\phi$ (see Sec. 3), which also explains why MAML is sensitive to hyperparameter tuning [47]. Furthermore, MAML shows much longer training times than CNPs, which limits us to conduct exhaustive comparisons on more complicated tasks such as Distractor or ShapeNet2D. In contrast, CNPs use the local parameterization $\phi$ as a fixed dimensional output of the encoder, which forces the model to learn an informative low-rank representation from the contexts. Meanwhile, increasing data and task diversity will encourage the model to extract more expressive and mutual-exclusive task representations. + +DA, DR, TA or MR? From the results of different experiments presented in Tab. 1, Tab. 2, Tab. 3 and Tab. 4, it is obvious that DA improves the performance across all tasks and methods. Tab. 4 also shows the importance of DR on ShapeNet2D which cannot be simply compensated by DA. TA hinders the performance on Distractor but benefits all pose regression tasks. The reason for this is that, for Distractor, TA increases task complexity by shifting the origin of the image plain by the sampled noise, thus creating $\mathbf{N}^2$ copies of the original task, where $\mathrm{N} = 16$ is the number of non-zero elements in the noise set. However, since these task copies live in independent coordinate frames, the + +
MethodsIC (1e-2)CC (1e-2)
None38.33 (0.33)39.81 (0.31)
DR18.67 (0.13)20.05 (0.12)
DR+MR27.89 (0.61)28.99 (0.46)
DR+TAazi16.94 (0.13)18.42 (0.26)
DR+TAazi+ele16.62 (0.12)17.76 (0.35)
DA19.32 (0.09)17.98 (0.09)
DR+DA14.26 (0.09)13.91 (0.14)
DR+DA+TAazi+ele14.12 (0.14)13.59 (0.10)
DR+DA+TAazi+ele + FCL14.01 (0.09)13.32 (0.18)
+ +Table 4. Comparison of different augmentation techniques on ShapeNet2D. Results are calculated with 3 random seeds using CNP (CA) as baseline. + +increased task diversity is irrelevant to the original task. For pose regression tasks, by contrast, TA augments the canonical poses of the existing data, which coherently benefits the original task as the augmented canonical poses remain in the coordinate frame of the original task. Therefore, even though TA increases the cross-entropy $\mathcal{H}(Y|X)$ for both cases as demanded in [22], only the pose regression tasks gain additional benefits. MR results in underfitting as combining MR with augmentations leads to worse performance than using the same augmentations alone for both ShapeNet1D and ShapeNet2D (see Tab. 3 and Tab. 4). Furthermore, MR requires extensive fine-tuning on the regularization parameter $\beta$ (see Sec. 3.3) to modulate between underfitting and overfitting. + +Effect of the context set size in CNPs. We compare the prediction error w.r.t. the size of the context set for Distractor (see Fig. 2a) and ShapeNet2D (see Fig. 2b). Both figures show that increasing the context set size benefits the performance, indicating that both Max and CA aggregations can merge useful information from different + +
MethodsCASCAMCALMaxSMaxMMaxL
No Aug18.60 (0.78)12.08 (0.44)8.19 (0.30)30.44 (0.82)18.86 (0.34)14.97 (0.37)
19.95 (1.08)12.62 (0.87)9.13 (0.18)30.59 (1.14)21.78 (0.47)18.09 (0.21)
TA18.69 (0.87)10.70 (0.98)7.92 (0.25)21.67 (0.66)13.69 (0.27)10.89 (0.27)
19.24 (0.79)12.05 (0.73)9.18 (0.50)23.60 (0.88)16.76 (0.62)14.43 (0.55)
TA+DA7.86 (0.21)6.32 (0.11)5.81 (0.23)11.00 (0.16)8.23 (0.34)7.66 (0.18)
7.49 (0.35)6.48 (0.41)6.23 (0.12)12.98 (0.48)9.65 (0.40)8.66 (0.19)
+ +context pairs and thereby reduce the task ambiguity. In addition, we find that the model can further improve the performance given the size of context set surpasses the maximum number used for training (15 for both tasks). In particular, there is a small performance gap between intra- and cross-category evaluation for Distractor which is however absent for ShapeNet2D. We believe this indicates that Distractor has more task ambiguity than pose estimation and thus explains why Distractor gains more benefits from FCL than ShapeNet2D (see Tab. 1 and Tab. 4). + +CNPs vs pretrained models. It is a common practice in vision task to pretrain a model on a large-scale dataset (e.g., ImageNet [48]) in order to obtain good prior features and reduce training time. To conduct a fair comparison of this approach to our model regarding data efficiency, we first pretrain a classical object detection model jointly over all tasks using the same training data as for CNPs. After training has finished, we fine-tune the pretrained model further on each specific new task using different numbers of images. Results are shown in Fig. 2c for Distractor and Fig. 2d for ShapeNet1D, where the horizontal axis denotes the number of images used for fine-tuning or as contexts for CNPs, respectively. Both figures show that CNPs outperform the pretrained model especially for small numbers of contexts. In the Distractor task, CNP (Max) outperforms the fine-tuned model with a large margin after 25 context images are given. Note that CNPs are capable of transferring to various tasks simultaneously. In contrast, the pretrained model requires separate tuning on each given task, which results in a decreased performance on prior learning tasks. + +Which aggregation methods should I use? Cross-attention (CA) performs better than mean aggregation on Pascal1D (see Tab. 2) and Max on ShapeNet1D (see Tab. 3), while it achieves a similar performance to Max aggregation and BA on ShapeNet2D (see Tab. 6). In contrast, mean aggregation used in the original CNP performs the worst on both Pascal1D and ShapeNet2D. Our interpretation is that Mean assigns the same importance to each context while the + +Table 5. Performance on ShapeNet1D using small (S), medium (M) and large (L) training dataset sizes for CNP with cross-attention (CA) and Max aggregation. The first row presents results for intra-category (IC) and the second row for cross-category (CC) evaluation. MSE and standard deviations are calculated with 5 random seeds. + +
MethodsIC (1e-2)CC (1e-2)
CNP+Mean15.04 (0.08)15.45 (0.13)
CNP+Max14.20 (0.06)13.56 (0.28)
CNP+BA14.16 (0.08)13.56 (0.18)
CNP+CA14.12 (0.14)13.59 (0.10)
+ +Table 6. Comparison of aggregation methods on ShapeNet2D using DR+DA+TA. Results are calculated with 3 random seeds. + +other aggregation operators can allocate different weights. Max assigns a weight of one to a context and zero to all others for each dimension of the representation while BA assigns the weights predicted by another neural network. Meanwhile, CA assigns importance by comparing the similarity between context inputs $\{x_{C}^{i}\}_{i = 1}^{K}$ and target input $x_{T}$ at the feature space. + +Furthermore, we find that CA achieves competitive results on all pose estimation tasks but performs slightly worse than BA and Max on Distractor (see Tab. 1) though still better than mean aggregation. This indicates that CA helps in learning representations for object-centric images. Distractor, however, contains objects with random locations, requiring the model to disregard positional information. Methods like CA, which compare similarity between contexts and target over feature space, face inherent difficulties on Distractor. This is due to the fact that CNNs, owing to their translational equivariant nature, are prone to encode some positional information into the extracted image features. Consequently, CA, which compares the similarity directly on this feature space, inevitably forces the model to focus on positional similarity, which leads to a suboptimal allocation of importance. + +How much meta-data is essential? We split the training data of ShapeNet1D into subsets of three different sizes, with 10 objects per category for the small dataset (S), 30 objects per category for the medium dataset (M) and 50 for the large dataset (L). Afterwards, we test the performance of CNP with Max aggregation and CA on each of them. + +The results in Tab. 5 show that Max overfits on the small dataset by simply memorizing all training tasks while CA works much better. Moreover, CA trained on small dataset achieves a comparable performance with Max on large dataset after using TA and DA, and even outperforms Max on the cross-category level. Thus, we conclude that using CA in combination with augmentation techniques can drastically alleviate the overfitting problem and therefore requires less meta-data on object-centric vision tasks than Max. In contrast, MAML performs much worse on ShapeNet1D (L) (see Tab. 3) than CNPs and thus hardly profits from an increased dataset. + +Data augmentation. Tab. 7 shows the effect of each individual data augmentation technique (see Sec. 3.3) on ShapeNet2D. The first row contains results obtained with all techniques applied jointly. In the other rows, one of the techniques is removed respectively. We find that removing Affine leads to the worst performance which indicates that object-centric pose regression tasks are more sensitive to scale. On the other hand, omitting CropAndPad even leads to an performance increase. + +
MethodsValTest
All0.14170.1410
w/o CropAndPad0.14120.1368
w/o Affine0.16230.1743
w/o Dropout0.14520.1445
w/o Contrast0.14820.1406
w/o Brightness0.14540.1380
w/o Blur0.14260.1422
+ +Table 7. Comparison of different data augmentation techniques on ShapeNet2D using CNP (CA) + DR as baseline. + +
MethodsICCC
Same Ctx2.30 (0.04)3.46 (0.06)
Diff Ctx2.16 (0.05)3.25 (0.05)
Ctx & Target2.00 (0.02)3.05 (0.08)
+ +Table 8. Analysis of FCL + CNP on different choices of positive pairs using: i) the same context set with different augmentations (Same Ctx), ii) different context sets from the same task (Diff Ctx), iii) context and target sets (Ctx & Target). Prediction error (pixel) is calculated with 3 random seeds. + +Does FCL improve CNPs? Tab. 1 shows the evaluation on Distractor using different aggregation methods where $\mathrm{Max}_{\mathrm{FCL}}$ denotes Max aggregation with FCL. Modulating task representation by functional contrastive learning (FCL) alleviates meta overfitting across all augmentation + +levels and thus achieves a significant improvement in performance. Fig. 2a further compares the performance of Max and $\mathrm{Max}_{\mathrm{FCL}}$ for different context set sizes, showing that our methods can differentiate the queried object and distractors well, even for very small context sets. Furthermore, we investigate the influence of FCL on the predicted task representations over all 12 categories using different clustering metrics, where the results show that FCL leads to a more dispersed latent distribution compared to the original CNPs, which can improve generalization capability to unseen tasks. T-SNE visualizations of the task representations along with the results of cluster metrics are provided in ??. + +FCL on different sets. We compare FCL on three choices of positive pairs: i) We use the same context set but with different data augmentations. ii) We use different context sets sampled from the same task. iii) We use context and target sets from the same task. We test the performance on Distractor using Max aggregation and DA. For each choice, we run three experiments with different seeds and present the average performance in Tab. 8. Compared to Tab. 1, all three choices consistently outperform CNP (Max) while using FCL on context and target sets achieves the best performance. + +Limitations. Since meta-learning algorithms are data-driven methods, generalization depends on the diversity of training tasks. However, the augmentation methods used in our work are limited in their capability of creating new and diverse training tasks. Therefore, using a generative model to enrich training data could be one possibility to achieve higher diversity. Furthermore, concerning the class of NPs, we restricted ourselves to the deterministic CNPs in the experiments since we empirically found that using stochastic variants such as [6] does not benefit our tasks. We leave an in-depth exploration of stochastic NPs on vision tasks to future work. + +# 5. Conclusion + +In this paper, we investigate MAML and CNPs on several image-level regression tasks and analyze the importance of different choices in mitigating meta overfitting. Furthermore, we provide insights and practical recommendations of different algorithmic choices for CNPs with respect to various task settings. In addition, we combine CNPs with functional contrastive learning in task space and train in an end-to-end manner, which significantly improves the task expressivity of CNPs. We believe that our work can lay the basis for future work on designing and implementing meta-learning algorithms in image-based regression tasks. + +# References + +[1] C. Finn, P. Abbeel, and S. Levine, "Model-agnostic meta-learning for fast adaptation of deep networks," in Proceedings of the 34th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, D. Precup and Y. W. Teh, Eds., vol. 70. PMLR, 06-11 Aug 2017, pp. 1126-1135. [Online]. Available: https://proceedings.mlr.press/v70/finn17a.html 1, 2 +[2] A. Nichol, J. Achiam, and J. Schulman, “On first-order meta-learning algorithms,” ArXiv, vol. abs/1803.02999, 2018. 1, 2 +[3] C. Finn, A. Rajeswaran, S. Kakade, and S. Levine, "Online meta-learning," in Proceedings of the 36th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, K. Chaudhuri and R. Salakhutdinov, Eds., vol. 97. PMLR, 09-15 Jun 2019, pp. 1920-1930. [Online]. Available: https://proceedings.mlr.press/v97/finn19a.html 2 +[4] J. Yoon, T. Kim, O. Dia, S. Kim, Y. Bengio, and S. Ahn, “Bayesian model-agnostic meta-learning,” in Advances in Neural Information Processing Systems, S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, Eds., vol. 31. Curran Associates, Inc., 2018. [Online]. Available: https://proceedings.neurips.cc/paper/2018/file/e1021d43911ca2c1845910d84f40aeae-Paper.pdf 1, 2 +[5] M. Garnelo, D. Rosenbaum, C. Maddison, T. Ramalho, D. Saxton, M. Shanahan, Y. W. Teh, D. Rezende, and S. M. A. Eslami, “Conditional neural processes,” in Proceedings of the 35th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, J. Dy and A. Krause, Eds., vol. 80. PMLR, 10-15 Jul 2018, pp. 1704-1713. [Online]. Available: https://proceedings.mlr.press/v80/garnelo18a.html 1, 2, 3 +[6] M. Garnelo, J. Schwarz, D. Rosenbaum, F. Viola, D. J. Rezende, S. M. A. Eslami, and Y. W. Teh, “Neural processes,” in ICML Workshop on Theoretical Foundations and Applications of Deep Generative Models, 2018. 2, 8 +[7] H. Kim, A. Mnih, J. Schwarz, M. Garnelo, A. Eslami, D. Rosenbaum, O. Vinyals, and Y. W. Teh, "Attentive neural processes," in International Conference on Learning Representations, 2019. [Online]. Available: https://openreview.net/forum?id=SkE6PjC9KX 2,3 +[8] J. Gordon, W. P. Bruinsma, A. Y. K. Foong, J. Requeima, Y. Dubois, and R. E. Turner, “Convolutional conditional neural processes,” in International Conference on Learning Representations, 2020. [Online]. Available: https://openreview.net/forum?id=Skey4eBYPS 1, 2 +[9] F. Sung, Y. Yang, L. Zhang, T. Xiang, P. H. Torr, and T. M. Hospedales, “Learning to compare: Relation network for few-shot learning,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018, pp. 1199–1208. 1, 2 + +[10] J. Snell, K. Swersky, and R. Zemel, "Prototypical networks for few-shot learning," in Advances in Neural Information Processing Systems, I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, Eds., vol. 30. Curran Associates, Inc., 2017. [Online]. Available: https://proceedings.neurips.cc/paper/2017/file/cb8da6767461f2812ae4290eac7cbc42-Paper.pdf +[11] M. Ren, S. Ravi, E. Triantafillou, J. Snell, K. Swersky, J. B. Tenenbaum, H. Larochelle, and R. S. Zemel, “Meta-learning for semi-supervised few-shot classification,” in International Conference on Learning Representations, 2018. [Online]. Available: https://openreview.net/forum?id=HJcSzz-CZ +[12] O. Vinyals, C. Blundell, T. Lillicrap, k. kavukcuoglu, and D. Wierstra, "Matching networks for one shot learning," in Advances in Neural Information Processing Systems, D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, Eds., vol. 29. Curran Associates, Inc., 2016. [Online]. Available: https://proceedings.neurips.cc/paper/2016/file/90e1357833654983612fb05e3ec9148c-Paper.pdf 1, 2 +[13] Y. Wei, P. Zhao, and J. Huang, "Meta-learning hyperparameter performance prediction with neural processes," in Proceedings of the 38th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, M. Meila and T. Zhang, Eds., vol. 139. PMLR, 18-24 Jul 2021, pp. 11058-11067. [Online]. Available: https://proceedings.mlr.press/v139/wei21c.html 1 +[14] M. Volpp, L. P. Fröhlich, K. Fischer, A. Doerr, S. Falkner, F. Hutter, and C. Daniel, “Meta-learning acquisition functions for transfer learning in bayesian optimization,” in International Conference on Learning Representations, 2020. [Online]. Available: https://openreview.net/forum?id= ryeYpJSKwr +[15] L. Franceschi, P. Frasconi, S. Salzo, R. Grazzi, and M. Pontil, "Bilevel programming for hyperparameter optimization and meta-learning," in Proceedings of the 35th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, J. Dy and A. Krause, Eds., vol. 80. PMLR, 10-15 Jul 2018, pp. 1568-1577. [Online]. Available: https://proceedings.mlr.press/v80/franceschi18a.html 1 +[16] Q. Wang and H. Van Hoof, “Doubly stochastic variational inference for neural processes with hierarchical latent variables,” in Proceedings of the 37th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, H. D. III and A. Singh, Eds., vol. 119. PMLR, 13-18 Jul 2020, pp. 10018-10028. [Online]. Available: https://proceedings.mlr.press/v119/wang20s.html 1, 2 +[17] A. Norcliffe, C. Bodnar, B. Day, J. Moss, and P. Lio, "Neural {ode} processes," in International Conference on Learning Representations, 2021. [Online]. Available: https://openreview.net/forum?id=27acGyyI1BY + +[18] C. Louizos, X. Shi, K. Schutte, and M. Welling, "The functional neural process," in Advances in Neural Information Processing Systems, H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, Eds., vol. 32. Curran Associates, Inc., 2019. [Online]. Available: https://proceedings.neurips.cc/paper/2019/file/db182d2552835bec774847e06406bfa2-Paper.pdf 2 +[19] B.-J. Lee, S. Hong, and K.-E. Kim, “Residual neural processes,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 34, no. 04, pp. 4545–4552, Apr. 2020. [Online]. Available: https://ojs.aaii.org/index.php/AAAI/article/view/5883 1, 2 +[20] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, "A simple framework for contrastive learning of visual representations," in Proceedings of the 37th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, H. D. III and A. Singh, Eds., vol. 119. PMLR, 13-18 Jul 2020, pp. 1597-1607. [Online]. Available: https://proceedings.mlr.press/v119/chen20j.html 2, 4 +[21] M. Yin, G. Tucker, M. Zhou, S. Levine, and C. Finn, "Meta-learning without memorization," in International Conference on Learning Representations, 2020. [Online]. Available: https://openreview.net/forum?id=BkLFpEYwS2,3,4,5 +[22] J. Rajendran, A. Irpan, and E. Jang, “Meta-learning requires meta-augmentation,” in Advances in Neural Information Processing Systems, H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, Eds., vol. 33. Curran Associates, Inc., 2020, pp. 5705-5715. [Online]. Available: https://proceedings.neurips.cc/paper/2020/file/3e5190eeb51ebe6c5bbc54ee8950c548-Paper.pdf 2, 3, 4, 5, 6 +[23] H. Yao, L.-K. Huang, L. Zhang, Y. Wei, L. Tian, J. Zou, J. Huang, and Z. Li, “Improving generalization in meta-learning via task augmentation,” in Proceedings of the 38th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, M. Meila and T. Zhang, Eds., vol. 139. PMLR, 18-24 Jul 2021, pp. 11887-11897. [Online]. Available: https://proceedings.mlr.press/v139/yao21b.html 2, 3, 4 +[24] R. Ni, M. Goldblum, A. Sharaf, K. Kong, and T. Goldstein, "Data augmentation for meta-learning," in Proceedings of the 38th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, M. Meila and T. Zhang, Eds., vol. 139. PMLR, 18-24 Jul 2021, pp. 8152-8161. [Online]. Available: https://proceedings.mlr.press/v139/ni21a.html 2, 3 +[25] T. M. Hesperaies, A. Antoniou, P. Micaelli, and A. J. Storkey, “Meta-learning in neural networks: A survey,” IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 1-1, 2021. 2 + +[26] J. Gordon, J. Bronskill, M. Bauer, S. Nowozin, and R. Turner, "Meta-learning probabilistic inference for prediction," in International Conference on Learning Representations, 2019. [Online]. Available: https://openreview.net/forum?id=HkxStoC5F7 2, 4 +[27] R. Vuorio, S.-H. Sun, H. Hu, and J. J. Lim, “Multimodal model-agnostic meta-learning via task-aware modulation,” in Advances in Neural Information Processing Systems, H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, Eds., vol. 32. Curran Associates, Inc., 2019. [Online]. Available: https://proceedings.neurips.cc/paper/2019/file/e4da3b7fbbce2345d7772b0674a318d5-Paper.pdf 2 +[28] K. Rakelly, A. Zhou, C. Finn, S. Levine, and D. Quillen, "Efficient off-policy meta-reinforcement learning via probabilistic context variables," in Proceedings of the 36th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, K. Chaudhuri and R. Salakhutdinov, Eds., vol. 97. PMLR, 09-15 Jun 2019, pp. 5331-5340. [Online]. Available: https://proceedings.mlr.press/v97/ralkelly19a.html 2 +[29] T. Yu, D. Quillen, Z. He, R. Julian, K. Hausman, C. Finn, and S. Levine, “Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning,” CoRR, vol. abs/1910.10897, 2019. [Online]. Available: http://arxiv.org/abs/1910.10897 +[30] A. Gupta, R. Mendonca, Y. Liu, P. Abbeel, and S. Levine, “Meta-reinforcement learning of structured exploration strategies,” in Advances in Neural Information Processing Systems, S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, Eds., vol. 31. Curran Associates, Inc., 2018. [Online]. Available: https://proceedings.neurips.cc/paper/2018/file/4de754248c196c85ee4fbdcee89179bd-Paper.pdf +[31] M. W. Gondal, S. Joshi, N. Rahaman, S. Bauer, M. Wuthrich, and B. Scholkopf, “Function contrastive learning of transferable meta-representations,” in Proceedings of the 38th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, M. Meila and T. Zhang, Eds., vol. 139. PMLR, 18-24 Jul 2021, pp. 3755-3765. [Online]. Available: https://proceedings.mlr.press/v139/gondal21a.html 2 +[32] H. Liu, K. Simonyan, and Y. Yang, "DARTS: Differentiable architecture search," in International Conference on Learning Representations, 2019. [Online]. Available: https://openreview.net/forum?id=S1eYHoC5FX2 +[33] B. Zoph and Q. V. Le, “Neural architecture search with reinforcement learning,” in International Conference on Learning Representations, 2017. [Online]. Available: https://openreview.net/forum?id=r1Ue8Hcxg +[34] T. Elsken, B. Staffler, J. H. Metzen, and F. Hutter, "Meta-learning of neural architectures for few-shot learning," in + +IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. +[35] H. Lee, E. Hyung, and S. J. Hwang, "Rapid neural architecture search by learning to generate graphs from datasets," in International Conference on Learning Representations, 2021. [Online]. Available: https://openreview.net/forum?id=rkQuFUmUOg32 +[36] M. W. Gondal, S. Joshi, N. Rahaman, S. Bauer, M. Wuthrich, and B. Scholkopf, “Function contrastive learning of transferable meta-representations,” in Proceedings of the 38th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, M. Meila and T. Zhang, Eds., vol. 139. PMLR, 18-24 Jul 2021, pp. 3755-3765. [Online]. Available: https://proceedings.mlr.press/v139/gondal21a.html 2 +[37] K. Kallidromitis, D. Gudovskiy, K. Kazuki, O. Iku, and L. Rigazio, "Contrastive neural processes for self-supervised learning," in Asian Conference on Machine Learning, 2021. [Online]. Available: http://www.acml-conf.org/2021/conference/accepted-papers/266/2 +[38] H. Li, P. Chaudhari, H. Yang, M. Lam, A. Ravichandran, R. Bhotika, and S. Soatto, "Rethinking the hyperparameters for fine-tuning," in International Conference on Learning Representations, 2020. [Online]. Available: https://openreview.net/forum?id=B1g8VkHFPH 3 +[39] T.-Y. Lin, M. Maire, S. J. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. Zitnick, "Microsoft coco: Common objects in context," in Proceedings of the European Conference on Computer Vision (ECCV), 2014, pp. 740-755. 3 +[40] A. Geiger, P. Lenz, and R. Urtasun, "Are we ready for autonomous driving? the kitti vision benchmark suite," Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 3354-3361, 2012. +[41] M. Everingham, L. V. Gool, C. K. I. Williams, J. M. Winn, and A. Zisserman, “The pascal visual object classes (voc) challenge.” International Journal of Computer Vision, vol. 88, pp. 303–338, 2010. +[42] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. S. Bernstein, A. C. Berg, and L. Fei-Fei, "Imagenet large scale visual recognition challenge," International Journal of Computer Vision, vol. 115, pp. 211-252, 2015. 3 +[43] M. Volpp, F. Flürenbrock, L. Grossberger, C. Daniel, and G. Neumann, “Bayesian context aggregation for neural processes,” in International Conference on Learning Representations, 2021. [Online]. Available: https://openreview.net/forum?id=ufZN2-aehFa 3 +[44] A. X. Chang, T. A. Funkhouser, L. J. Guibas, P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, H. Su, J. Xiao, L. Yi, and F. Yu, "Shapenet: An information-rich 3d model repository," ArXiv, vol. abs/1512.03012, 2015. 3 + +[45] J. Xiao, J. Hays, K. A. Ehinger, A. Oliva, and A. Torralba, "Sun database: Large-scale scene recognition from abbey to zoo," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2010, pp. 3485-3492. 4 +[46] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P. Abbeel, "Domain randomization for transferring deep neural networks from simulation to the real world," in 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017, pp. 23-30. 4 +[47] A. Antoniou, H. Edwards, and A. Storkey, "How to train your MAML," in International Conference on Learning Representations, 2019. [Online]. Available: https://openreview.net/forum?id=HJGven05Y76 +[48] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, "Imagenet: A large-scale hierarchical image database," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2009, pp. 248-255. 7 \ No newline at end of file diff --git a/whatmattersformetalearningvisionregressiontasks/images.zip b/whatmattersformetalearningvisionregressiontasks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b387f7783bc03db060e224e82b2fc9e88a37be48 --- /dev/null +++ b/whatmattersformetalearningvisionregressiontasks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d099548caac6aa3ecc20c8d29484bee21bcc537d3b686d0aaa09128a085419ed +size 399165 diff --git a/whatmattersformetalearningvisionregressiontasks/layout.json b/whatmattersformetalearningvisionregressiontasks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..dc0cd1ce0e0d5b91cdc4d031290da09eca29dbe9 --- /dev/null +++ b/whatmattersformetalearningvisionregressiontasks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afbc16eb800e7eaf71aa9d0a9969ed3ca00aecfb50228cb3f228157ac2a132ea +size 359750 diff --git a/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_content_list.json b/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0c1fce6a08dd73ee67ddc681fed65d88da18581d --- /dev/null +++ b/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ece2e35ccc2abcceead5713ce6753bc34886a88b9a6abff349eab3f702bc218 +size 85081 diff --git a/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_model.json b/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..81da42f93c0be9aabe425979fdce437eb7c780c7 --- /dev/null +++ b/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d666b7820d937d80b9c8cf7f8ecdb3117c9f9774b936fb403357caa4624281 +size 107195 diff --git a/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_origin.pdf b/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e21dabc2117813da97371570ca6f04b7aaad62f4 --- /dev/null +++ b/whatsinyourhands3dreconstructionofgenericobjectsinhands/5e90efac-3f79-4a23-903d-c0a71efc0ec8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2922e236cf2d823c24af24e45ff9c22ce950876f50b355461a0cb6193bb8aa7f +size 7701290 diff --git a/whatsinyourhands3dreconstructionofgenericobjectsinhands/full.md b/whatsinyourhands3dreconstructionofgenericobjectsinhands/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3033f10c5934f0525b36348b5569752cab0ff502 --- /dev/null +++ b/whatsinyourhands3dreconstructionofgenericobjectsinhands/full.md @@ -0,0 +1,380 @@ +# What's in your hands? 3D Reconstruction of Generic Objects in Hands + +Yufei Ye12 + +Abhinav Gupta12 + +$^{1}$ Carnegie Mellon University + +yufeiy2@cs.cmu.edu + +gabhinav@fb.com + +Shubham Tulsiani + +Meta AI + +shubhtuls@cmu.edu + +https://judyyye.github.io/ihoi/ + +![](images/0a6df73e9479874520a3660926925f49f5ea41f4ef254bdc175fbbbea3f3be2a.jpg) + +![](images/086459201e134861d074c822e446ab429771a596abe0792c9b4a86d826eb57a7.jpg) +Figure 1. Given an RGB image depicting a hand holding an object, we infer the 3D shape of the hand-held object (rendered in the image frame and from a novel view). + +![](images/f6c8dbda0470dadb1bdf525f9de3a50393c0fce23ed1a8d78bd97eb4a7ed3f18.jpg) + +![](images/9743d04ac4abf5788c3093398ceaaa2abea513e842b3a6f3fe98a3249c0ff7f6.jpg) + +![](images/e48899919bd71dd7703bc6b663a42163ed030b0909324365abb8910741c144a6.jpg) + +![](images/b62ac75e7b7b82eef90424254942cf49929fdc2ee5cd74e086b3a57066bed311.jpg) + +![](images/5f9f253cd472b3e006998fc2304c7ea4c98aafbee0d626668d34d47127dd9223.jpg) + +![](images/30de89b1f7180735d41bf42385cd72484d7a7fa6f60b10092b0323268dd6a7ad.jpg) + +![](images/ad77572c959a2bb6a24c0a7f5bcc90c70600999885c281ac6525806fb3c32256.jpg) + +![](images/63492c930a7845bfacd1d5f6e31225568079063c90bd899488b4ec09835b9cc1.jpg) + +![](images/e0d2b4569f3d9e94b9253a8755b914529ff4700bd059049fb002fbb38e4f9b7f.jpg) + +![](images/70b1f8a69caaa8796e18655b8b692c5d5da58736de009ec8d74264ac4418bf7a.jpg) + +![](images/05237c5331802bb54b9e0dbbbbecd18434288df74322828e0a6a25d5fed185e5.jpg) + +![](images/ed1f5d4ed0c4e1f83499eb47263c9e2a88792af3cfd0441b84b7cd2308fc166a.jpg) + +![](images/aab28a60085f064ee1303f7108337692f5388f4aa3ad24de4557644e36846c6e.jpg) + +![](images/ec01758f1edabdcdcabbc399fa66ab9efab3688d2ee96725187d87984b3f3a2b.jpg) + +![](images/e7924c2d8d98d1e3eda8dba4ca261394f01fae207473d5622432283d6dc9ab62.jpg) + +![](images/dba864f85d819d8553118dfe485ffd82bd2fdcd99d6ef4f22fc2ad6540f5fc4d.jpg) + +![](images/8e3be495e6cc98f144a2802e1e7c0774c63c9e2cfbf0cf15c5fdb219c2b104f0.jpg) + +![](images/6789f1ae3289836a5665ecedfcf501905541a80ec0be7e19d0fb91e6cd6155ba.jpg) + +![](images/dd48a4557d534ed3a87ba576e0d6761cbca43c547691d53963f8f64cc644c81c.jpg) + +![](images/90e1c350bd42a585708d0f04c996dc13f74505a09eb71db7b93d62e996934dc3.jpg) + +# Abstract + +Our work aims to reconstruct hand-held objects given a single RGB image. In contrast to prior works that typically assume known 3D templates and reduce the problem to 3D pose estimation, our work reconstructs generic hand-held object without knowing their 3D templates. Our key insight is that hand articulation is highly predictive of the object shape, and we propose an approach that conditionally reconstructs the object based on the articulation and the visual input. Given an image depicting a hand-held object, we first use off-the-shelf systems to estimate the underlying hand pose and then infer the object shape in a normalized hand-centric coordinate frame. We parameterized the object by signed distance which are inferred by an implicit network which leverages the information from both visual feature and articulation-aware coordinates to process a query point. We perform experiments across three + +datasets and show that our method consistently outperforms baselines and is able to reconstruct a diverse set of objects. We analyze the benefits and robustness of explicit articulation conditioning and also show that this allows the hand pose estimation to further improve in test-time optimization. + +# 1. Introduction + +Humans interact with their surrounding world with their hands. Not only do we understand interaction as abstract concepts such as touching screens, squeezing balls, holding pens, etc., we also perceive their underlying 3D shape. Holding a pen means a stick lying on the purlicue and gripped by thumb, index, and middle fingers; holding a bowl is placing it on top of an up-facing palm. We aim to build a recognition system that can perceive and reason about the geometric information of hand-object interactions (HOI) for generic objects. + +Over the past decade, we have made significant advances in inferring the 3D shape of both hands and objects in isolation. Hand poses can be recovered in the form of 2D keypoints, 3D skeletons [34, 45-47, 74], or even full 3D meshes [2, 56] via either fitting templates or direct regression. On the other hand, recent works have also pursued scaling object reconstruction from estimating the 6D pose of one specific known object [51] to more generic objects, such as various instances within one category [23, 35, 39], or even pursuing a joint model for cross-category reconstruction [11, 22]. But one area where the progress has been quite limited is understanding human-object interactions (HOI) specifically for manipulable objects [14, 58]. + +Reconstruction of objects in hand in the wild is highly challenging and ill-posed due to lack of data, presence of mutual and self-occlusion. Current works [4, 17, 30, 41, 62] typically focus on reconstructing a handful of known object (3D model is given) which reduces reconstruction to a 6D pose estimation problem. We argue that knowing the 3D template of the object as a priori during inference is a strong assumption and prevents these systems from reconstructing unknown objects. Furthermore, they struggle to handle various object shapes in the wild as these templates are rigid and instance-specific. In contrast, our work studies hand-object reconstruction without object templates and instead focuses on reconstructing HOI for novel objects from images. + +Our key observation is that hand articulation is driven by the local geometry of the object. Thus, hand articulation provides strong cues for the object in interaction. Fingers curled like fists indicate thin handles in between while open palms are likely to interact with flat surfaces. Instead of treating the hand occlusion as noise to marginalize over, we explicitly consider hand pose as informative cues for the object it interacts with. We operationalize this idea by conditionally predicting the object shape based on hand articulation and the input image. Instead of estimating both hand pose and object shape jointly, we leverage advances in hand pose reconstruction to estimate hand pose first. Given the inferred articulated hand along with the input image, our approach then reconstructs the object in a normalized hand-centric coordinate frame. + +We evaluate our method across three datasets including synthetic and real-world benchmarks and compare ours with prior explicit and implicit HOI reconstruction methods that infer the shape of unknown objects independent of hand pose. Our articulation-conditioned object shape prediction consistently outperforms prior works by large margins and can reconstruct various objects in a wide range of shapes. We also analyze how our model benefits from articulation-aware coordinates. Lastly, we show that the initial hand pose estimation could be further improved by encouraging interaction between the predicted hand and the object. + +# 2. Related Work + +Hand pose estimation. Approaches tackling hand pose estimation from RGB(-D) images can be broadly categorized as being model-free and model-based. Model-free methods [10,34,45-47,52,53,74] typically detect 2D keypoints and lift them to 3D joints position or hand skeletons. Some works [10,18,49] then directly predict 3D meshes vertices from the 3D skeleton by coarse-to-fine generation. Model-based methods [2,56,59,72,73] leverage statistical models like MANO [55] whose low-dimensional pose and shape parameters can be directly regressed [2,56] or optimized [59,72,73]. These model-based methods are generally robust to occlusion, domain gap etc., and we build on these in our work. In particular, we use a state-of-the-art model-based reconstruction system [56] to first estimate hand pose and condition the inference of the hand-held object shape on this prediction. While our work primarily focuses on inferring the object shape given an off-the-shelf hand pose estimate, we also show that jointly reasoning about the geometric interaction between the predicted 3D object and the inferred hand pose can help improve the initial hand pose estimate. + +Single-view Object Reconstruction. Reconstructing objects from images is a long-standing problem, dating back to the seminal thesis from Larry Roberts [51], where 3D models were known and the problem was reduced to 6-DoF pose estimation. In the following decades, several works have since aimed to reconstruct more generic objects from images [1, 26, 33, 38]. Recent learning based-methods can learn category-specific networks for 3D prediction [6, 12, 36] across a broad class of objects, and can even do so without direct 3D supervision [23, 35, 39, 69]. Using stronger 3D supervision, other approaches have shown that it is possible to learn a common model across multiple categories, with output representations such as voxels [11, 20, 68], meshes [22, 25, 67], point clouds [16, 40], or primitives [15, 19, 63]. Closer to our work, neural implicit representations [9, 43, 48] have shown the impressive capacity for accurate reconstruction for different topology, and our work extends these to be articulation-conditioned for inferring 3D of hand-held objects. While the field of object reconstruction has witnessed remarkable progress, the state-of-the-art methods typically assume isolated and unoccluded objects in images – and cannot be directly leveraged for reconstructing hand-held objects. Even approaches that are robust to occlusion consider it as noisy context to marginalize over, instead of a source of signal for the shape of the underlying object. In contrast, our work shows that explicitly taking hand pose into account helps infer the 3D structure of objects more accurately. + +Reconstructing hand-held objects. Understanding HOI in 3D is a very challenging problem due to mutual occlu + +![](images/368439e43d111f9f9c3c10d22c65d385b290563704993207b6313af717ab096b.jpg) +Figure 2. Given an image of a hand-held object, we first use an off-the-shelf system to estimate hand articulation $\theta_{A}$ and the camera pose $\pi_w$ . With the predicted articulated hand along with the image, the object shape is reconstructed by an implicit network. For each query point $\mathbf{x}$ in canonical hand wrist frame, it is transformed to image space $\mathbf{x}_p$ to get visual feature $\phi = g(\mathbf{x}_p, I)$ . In parallel, we also encode its articulation-aware representation $\psi = h(\mathbf{x}; \theta)$ . Then we use an implicit decoder to predict signed distance value $s = f(\mathbf{x}, \phi, \psi)$ . + +sion and lack of data with annotation. To make inference tractable, prior works typically make the simplifying assumption of having access to known instance-specific templates (typically around 10 objects) [17, 27, 27, 28, 54, 60, 62, 64, 65] and infer these known objects under lab controlled environments. With access to instance-specific templates, they reduce the object reconstruction to 6D pose estimation and jointly predict both hand and object pose by reasoning about their interactions. The joint reasoning could be implicit feature fusion [8, 21, 41, 58, 62], explicitly leveraging geometric constraints like contact or collision [3, 4, 13, 24, 27, 71], or encouraging physical realism [50, 64]. In contrast, we focus on inferring hand-held object shape without knowing a corresponding template. Sharing this goal, work by Hasson et al. [31] predicts explicit genus-0 meshes and Karunratanakul et al. [37] predict a joint implicit field for reconstructing the hand and object. While these methods also perform model-free reconstruction, unlike our approach they independently infer the object shape and hand pose in a feed-forward manner. Instead, we formulate object reconstruction as conditional inference of 3D shape given the hand-articulation, and make our predictions in a normalized wrist frame, and show that this significantly improves performance. + +# 3. Method + +Given an image depicting a hand holding an object, we aim to reconstruct the 3D shape of the underlying object. Our key insight is that the hand articulation is predictive of the object shape within it, for example, fingers pinching together indicate a thin stick-like structure between them. We operationalize this intuition by explicitly conditioning the + +inference of the object shape on (predicted) hand articulation. + +As shown in Fig 2, we first use an off-the-shelf system to estimate hand articulation and predict the camera transformation that projects the canonical articulated hand to the image coordinates. Given the predicted hand along with the input image, we then infer the object shape via an articulation-conditioned reconstruction network. This network is implemented as a point-wise implicit function [48] that maps a query 3D point to a signed distance from the object surface, and the zero-level set of this function can be extracted as the object surface [42]. Instead of predicting this 3D shape in the image coordinate frame, our implicit reconstruction network infers it in a normalized frame around the hand wrist. This allows the network to learn relations between the hand articulation and object shape that are invariant to global transformations. + +More formally, given an input image $I$ , we first infer the underlying the hand pose $\theta$ and the camera pose $\pi$ . Then, for any point $\mathbf{x}$ in the normalized wrist frame, the object inference model takes in the query point with the image and predicts its signed distance function $s$ . More specifically, the projection of the point to image coordinates is used to obtain corresponding visual features $\phi = g(\pi(\mathbf{x}); I)$ . In parallel, we also encode its position relative to each hand joint to extract an articulation-aware representation $\psi = h(\mathbf{x}; \theta)$ . The point-wise visual feature and articulation embedding are then used by an implicit decoder to predict signed distance value $s = f(\phi, \psi)$ at the query point $\mathbf{x}$ . + +# 3.1. Preliminary: Hand Reconstruction + +We use an off-the-shelf system [56] to estimate hand articulation and associated camera pose from an input image. + +The reconstruction method is model-based which directly regresses a 45-dimensional articulation parameter $(\theta_A)$ and a 6-dim global rotation and translation $(\theta_w)$ along with a weak perspective camera. We rig the parametric MANO model by the predicted articulation pose $\theta_A$ to obtain an articulated hand mesh in a canonical frame around the wrist. To relate a point in the wrist frame to the image space, we first transform the hand by the predicted global transformation and then project it by the camera matrix. As an implementation detail, we convert the predicted weak perspective camera to a full perspective one as it helps to account for large perspective effects. In summary, we project a query point in the canonical wrist frame to the image by + +$$ +\mathbf {x} _ {p} = \pi_ {\theta_ {w}} (\mathbf {x}) = K T _ {\theta_ {w}} \mathbf {x} +$$ + +where $K$ is the camera intrinsic and $T_{\theta_w}$ is the global rigid transformation of the hand. + +# 3.2. Articulation-conditioned SDF + +Given the predicted hand articulation $\theta_{A}$ , and camera matrix $\pi_{\theta_w}$ , our articulation-conditioned object shape inference network takes an additional input image $I$ to output a signed distance field of the object. For a query point in the wrist coordinate frame, the point-wise network takes into account the query's corresponding visual feature from a visual encoder and its relative position to each joint from an articulation-aware positional embedder. The visual feature and the embedding are then passed to an implicit decoder along with the query to predict the signed distance. + +Visual encoder. The visual encoder first extracts the image feature pyramid at different resolutions. For a query 3D point in the wrist frame, the visual encoder projects it to the image coordinate and compute global and local feature from the pyramid. The global part allows us to reason about global context and generate more coherent object shapes. For example, realizing the object is a bottle helps the network to generate a cylinder shape. The local feature allows the prediction more consistent with the visual observation [57, 70]. + +The backbone of the visual encoder is implemented as ResNet [32]. The global feature is a linear combination of the averaged conv5 feature. The local feature for each point is an interpolated feature at image coordinate from where it is projected by the predicted camera $\phi[\pi_{\theta_w}(\mathbf{x})]$ , where $\phi$ denotes resnet feature and $\phi[x]$ represents a bilinear sample of the feature at a 2D location $x$ . The local feature sampling is implemented for every layer of the feature pyramid $\phi_{1,\dots,5}[x]$ . It allows the model to draw visual cues with various resolutions and receptive fields. + +Articulation positional embedder. Our key idea is that the hand pose is predictive of the object shape it interacts with. This is especially informative and complements the + +visual cues for reconstructing hand-held objects that are often occluded. We explicitly encode hand pose information for the query point via the articulation embedder. To do this, one naive way is to simply use identity mapping $\psi = \theta_A$ . However, this representation is not robust to hand prediction error as we show in ablation. Furthermore, it is not trivial for the network to relate the reconstruction metric space with the hand pose joint space. For example, if a point is within $2\mathrm{mm}$ from both index and thumb, it is very likely to have some object passing through. To better capture the structure of the problem, we encode the hand pose information by the position of the query points relative to the articulated joints. + +More specifically, the articulation embedder takes as input an articulation parameter $\theta_{A}$ and a point position in wrist frame $X$ to output the articulation-aware encoding $\psi = h(X;\theta_A)$ . The encoding is a concatenation of the coordinates relative to every joint. Given the articulation parameter $\theta_{A}$ , we run forward kinematics to derive transformation $T(\theta_{A}):\mathbb{R}^{3}\to \mathbb{R}^{45}$ that maps a point in wrist frame to each joint coordinate. The 15 joint coordinates are position encoded [66] and concatenated together as the final representation $h(\mathbf{x};\theta_A) = \gamma (T(\theta_A)\mathbf{x})$ where $\gamma$ is the positional encoder. For more details please refer to appendix. + +Implicit decoder. The decoder maps the query points with visual feature and articulation embedding to a signed distance value $f(\mathbf{x},\phi ,\psi) = s$ . These two representations $\phi ,\psi$ are concatenated together and passed along with the query point to the decoder. The decoder simply follows the design in DeepSDF [48] which consists of 8 layers of MLP with a skip layer. + +# 3.3. Training + +To learn our articulation conditioned neural implicit field, we rely on a training dataset where we assume known hand pose and 3D shape of the object in the image frame. We preprocess the data by sampling points inside and outside of the object around the hand to calculate the ground-truth SDF. $95\%$ of the points are sampled around the surface of the objects and others are sampled uniformly in the space. During training, the network optimizes to match the predicted SDF to the ground-truth at the sampled points with the eikonal term as a regularizer. + +$$ +\mathcal {L} = \| s - \hat {s} \| + \lambda \left(\| \nabla s \| - 1\right) ^ {2} +$$ + +After the network is learned, at inference time, we do not require knowledge of the object 3D shape in the canonical frame a priori which is a major limitation of most most prior works. + +# 3.4. Refining hand pose + +While our work primarily focuses on object reconstruction conditioned on a predicted hand pose, this initial pose + +![](images/f54496e182b5bb4e0fc1254e79caa025401241bcd37e9bb0eb420ffcc3bfa717.jpg) +Figure 3. Visualizing reconstruction from our method and two baselines [31, 37] on ObMan dataset from the image frame and a novel view. + +prediction, while reliable, is not perfect. As object reconstruction also leverages visual cues, our insight is that it can provide complementary information to further refine the predicted hand pose. During inference, we show that the predicted hand pose and object shape can therefore be further (jointly) optimized by enforcing physical plausibility – by encouraging contact while discouraging intersection. + +We optimize the articulation pose parameters with respect to these two interaction terms, which can be naturally incorporated with an SDF representation. To discourage intersection between the hand and object, we penalize if the points on the hand surface are predicted to have negative SDF values by the object reconstruction model. Following prior work [31], we encourage hand-object contact for specifically defined regions – if the surface points in these contact regions are near the object surface, they are encouraged to come even closer. + +$$ +\begin{array}{l} \min _ {\theta} \sum_ {\mathbf {x} \in \mathcal {H}} \| \max (- f (\mathbf {x}), 0) \| + \\ \sum_ {\mathbf {x} \in \mathcal {C}} \max (\| \min (f (\mathbf {x}) - \tau , 0) \| - \epsilon , 0) \\ \end{array} +$$ + +Note that the SDF $f$ is conditioned on articulation thus it is also a function of the hand pose $\theta$ . As we refine the hand pose, the SDF of the object also changes accordingly. One could continuously update the SDF every time the pose is updated but we use a simpler solution that fixes the SDF during hand pose optimization and only update it once using the final optimized pose $\theta$ . + +# 4. Experiments + +We compare our method with two model-free baselines [31, 37] on three datasets - one synthetic, and two real-world. We show that our approach outperforms baselines + +across these datasets, both in terms of object reconstruction and modeling hand-object interaction. We further analyze the benefit from explicitly considering hand pose and the benefit from our particular form of articulation-aware positional encoding. Lastly, we show that our reconstructed hand-held object could further refine the initial hand pose estimation and improve hand-object interaction. + +Datasets and Setup. We evaluate our method across three datasets. + +- ObMan [31] is a synthetic dataset that consists as 8 categories of 2772 objects from 3D warehouse [7]. The grasps are automatically generated by GraspIt [44], resulting in a total of $21\mathrm{K}$ grasps. The grasped objects are rendered over random backgrounds using Blender. We follow the standard splits where there is no overlap between the objects used in training and testing. +- HO-3D [29] is a real-world video dataset consisting of 103k annotated images capturing 10 subjects interacting with 10 common YCB objects [75]. The groundtruth is annotated using multi-camera reconstruction pipelines. To test on more shapes, we create a custom split by holding out one video sequence per object as test set. Please refer to the appendix for more details. +- MOW [5] dataset consists of a curated set of 442 images, spanning 121 object templates, collected from in-the-wild hand-object interaction datasets [14, 58]. It is more diverse in terms of both appearance and object shape compared to the HO3D dataset, but only provides approximate ground-truth. These object shape and hand pose annotations are obtained via a single-frame optimization-based method [5]. We use 350 randomly selected examples for training and the remaining 92 for evaluation. + +For the ObMan dataset, we use the hand pose predictor from Hasson et al. [31] as this system is specifically trained on this synthetic dataset. For HOI and MOW, we use the FrankMocap [56] system that is trained on multiple real-world datasets. Since HOI data with ground truth in the real world is scarce and lacks diversity in terms of object shape and appearance, we initialize our method and baselines with models pretrained on ObMan and finetune them on HO3D and MOW datasets. + +Evaluation metrics. We evaluate the quality of both, object reconstruction and the relation between object and hand. To evaluate the reconstruction quality, we first extract a mesh from the predicted SDF. Following prior works, we then evaluate the object reconstruction by reporting Chamfer distance (CD), but also report the F-score at $5\mathrm{mm}$ and $10\mathrm{mm}$ thresholds as Chamfer distance is more vulnerable to outliers [61]. Another desirable property for HOI reconstruction is that the interpenetration between the hand and + +
ObManHO3DMOW
F-5↑F-10↑CD↓Vol↓F-5↑F-10↑CD↓Vol↓F-5↑F-10↑CD↓Vol↓
HO [31]0.230.560.648.640.110.224.199.440.030.0649.825.6
GF [37]0.300.511.391.840.120.244.966.310.060.1340.18.82
Ours0.420.631.021.740.280.501.534.770.130.2423.119.4
+ +the object should be minimal, we also report the intersection volume between two meshes (in $cm^3$ ) as a measure of understanding the relations between the hand and object. + +Baselines. While most prior approaches require a known object template, recent work by Hasson et al. (HO) [31] and Karunratanakul et al. (GF) [37] can tackle the same task as ours – inferring the shape of a generic object from a single interaction image. HO jointly regresses MANO parameters to estimate hand pose and reconstructs the object in the camera frame. It is based on Atlas-Net [25], and deforms a sphere to infer the object mesh. Closer to our approach, GF is also based on a point-wise implicit network. It takes an image as input and outputs an implicit field that maps a point in the camera frame to a signed distance to both, the hand and object, while also predicting hand part labels. + +Our approach differs from these baselines in three main aspects. First, both prior approaches infer object shape independent of the predicted hand pose, while we formulate hand-held object reconstruction as conditional inference. Second, these baselines encode the visual information only via a global feature while we additionally use pixel-aligned local features. Third, while both baselines reconstruct objects in the camera frame, we predict them in a normalized wrist frame with articulation-aware positional encoding. Note that while our approach predicts 3D in a hand-centric frame, the evaluations are all performed in the image coordinate frame for fair comparison (using the predicted hand pose to transform our prediction). + +# 4.1. Results on ObMan + +We visualize the reconstructed objects and the corresponding hand poses in Figure 3. While baselines can predict the coarse shape of the object, they typically lose sharp details such as the corner of the phone and sometimes miss part of the surface of the object. This may be because they only use a global feature of the image that loses spatial resolution. In contrast, our method reconstructs shape that better aligns with the visual inputs from the original view and hallucinate the invisible part of the objects occluded by hands. + +This is also empirically reflected in quantitative results reported in Table 1. We outperform baselines by a large margin on F-score. Our improvement over baselines is particularly significant on the smaller threshold, indicating that our method is better to reconstruct local shape. In terms of Chamfer distance, ours is better than GF that is also based + +on implicit fields. Ours is not as good as HO in Chamfer distance probably because HO explicitly trains to minimize Chamfer distance with a regularizer on edge length which discourages large displacements from a sphere thus producing fewer outliers. + +# 4.2. Evaluation on real-world datasets + +We visualize the reconstruction in the image frame and a novel view in Figure 4 and Figure 5. GF can predict blobby cylinders but the reconstructed objects lack details in shape such as around the neck of the mustard bottle, and sometimes reconstructs a different object shape such as predicting boxes instead of scissors. In contrast, our method is able to generate diverse object shape more accurately including boxes, power drills, bottles, pens, cup, spray bottles etc. + +Table 1. Quantitative results for object reconstruction error using F-score (5mm, 10mm), Chamfer distance (mm) and intersection volume (cm $^3$ ). We compare our method with prior works [31, 37] on Obman, HO3D, MOW datasets. + +
train setF-5 ↑F-10 ↑CD ↓
ObMan0.140.274.36
MOW0.150.304.09
+ +Table 2. Cross-dataset generalization: we report quantitative results on HO3D for models pretrained on ObMan and MOW. + +Zero-shot transfer to HO3D. We also directly evaluate models that are only trained on ObMan and MOW datasets and report their reconstruction results on HO3D dataset. Both models without finetuning still outperform baselines trained on HO3D dataset. Interestingly, even though the MOW dataset only consists of 350 training images, which is significantly less compared to 21K images from the synthetic dataset, learning from MOW still helps cross-dataset generalization. It indicates the importance of diversity for in-the-wild training. Please see the qualitative result in the appendix. + +# 4.3. Ablations + +Importance of articulation conditioning. We analyze how hand articulation conditioning helps hand-held object reconstruction by constructing a variant of our method that only conditions on pixel-aligned image features. This approach is analogous to the one proposed by Saito et al. [57] where human 3D shape is inferred by a pixel-aligned implicit network. Table 3 reports results of this variant that do not explicitly consider hand articulation and we observe that the object reconstruction degrades by a large margin + +![](images/56705d3b3bf20dca249b7b62145b862efb92c7dbd524b1557cf0f78dda378da1.jpg) +Input + +![](images/5a313ce89a6355668939d0e941e2c687d1472a21f7bd74ed8701d6d371faf397.jpg) +HO + +![](images/7158300dcb229767d5e5ef2768ae6f6de73e32e74db2ad3ec99888068a958933.jpg) +GF + +![](images/d38f7368f50c6743fc98430dfc6847a7a41c81d037f13d65888e5a58a5d37204.jpg) +Ours +Figure 4. Visualizing reconstruction of our method and two baselines [31,37] on HO3D dataset in the image frame and from a novel view. + +![](images/fe1ddbb02e6b6daa384eae1e59c6d987645383f9337d36b7450d00fd1442ee3c.jpg) +Input + +![](images/2eaa14133ca2ebc767fc406e4c5d9532da38b076b64a03b5bc5bd51d0edfdb8b.jpg) +HO + +![](images/10f2a0c8421f0f67f468de9e937738fda90ee5251104fd535a30b99787edb886.jpg) +GF + +![](images/75c178dc4ad35b37725e7a3c75195d69433327f47bcfa4a2d8e6d867fe8054eb.jpg) +Ours +Figure 5. Visualizing reconstruction of our method and two baselines [31, 37] on MOW dataset in the image frame and from a novel view. + +
F-5 ↑F-10 ↑CD ↓Vol ↓
ObManOurs0.420.631.021.74
Ours w/o Art.0.370.561.893.93
HO3DOurs0.330.580.934.77
Ours w/o Art.0.270.481.186.30
MOWOurs0.130.2423.119.4
Ours w/o Art.0.100.1929.017.3
+ +Table 3. Analysis of articulation-conditioning: we report quantitative results of object error in F-score, Chamfer distane (CD), intersection volume on 3 datasets and compare ours with the ablation that only consider visual feature. + +while the intersection volume also doubles. This suggests that hand information provides a strong cue that is complementary to visual inputs. Figure 6 visualizes comparison between ours and the variant where our method can better respect hand-object physical relations such as objects do not penetrate the hands and the area around fingertips are likely to be in contact with objects. + +Representation of hand articulation matters for generalization. To represent articulation information, a natural alternative to our proposed articulation-aware positional encoding is to simply concatenate the query point with the + +![](images/73ea0701fe2310d00756429e81a2cf139ab486fe1e6c38c493e633d782f7b2e6.jpg) +Figure 6. Visualizing reconstruction of hand-held object with or without explicitly considering hand pose. + +MANO pose parameter $\theta_{A}$ , i.e. $\bar{h}(\mathbf{x};\theta_{A}) = [\mathbf{x},\theta_{A}]$ . The result in Table 4 shows that although it performs comparably when provided with ground-truth hand pose parameters, it degrades significantly when with predicted hand pose despite that we perform jitter augmentation on hand articulation for both methods. More interestingly, it performs even worse than the variant without articulation-aware encoding. This indicates that the object shape overfits to pose parameters which are constant within one example. In contrast, our articulation-aware positional encoding generalizes better. + +Robustness against hand prediction quality. We use + +
MethodF5 ↑F10 ↑CD ↓Vol↓
Art.-aware PE*0.490.700.921.73
Pose param.*0.460.661.251.44
Art.-aware PE0.420.631.021.74
Pose param.0.230.421.822.57
W/o art.0.370.561.893.93
+ +Table 4. Analysis of articulation-aware encoding: We compare different ways to incorporate hand articulation: articulation-aware positional encoding and pose parameters. Star indicates reconstruct object shape given ground truth hand articulation. + +
Noise LevelF5 ↑ObMan F10 ↑CD ↓F5 ↑HO3D F10 ↑CD ↓
Gaussian50% σ0.400.631.010.280.501.51
100% σ0.310.531.400.250.461.68
150% σ0.240.421.940.220.421.93
Prediction50%0.460.670.960.290.521.48
100% *0.420.631.020.280.501.53
200%0.350.561.280.260.471.67
BaselinesHO0.230.560.640.110.224.19
GF0.300.511.390.120.244.96
GT0%0.490.700.920.300.531.46
+ +![](images/1f25cf568815b20e2ff259840655f0ea0d17b6d047b86fceeff9859750d32cfd.jpg) + +![](images/6d30849dba5734547fbfee42fa887d0fa33d88db4d77b2df8f1b9d147ec53e0f.jpg) +Figure 7. Top: Object reconstruction given hand pose corrupted by Gaussian on Obman dataset. Bottom: Object reconstruction given hand pose corrupted by prediction error on HO3D dataset. + +![](images/dd92544dce2aeeaaa64b7ac7606a531c12d3260857cd591f90da71130d820e9b.jpg) +50% Prediction + +![](images/dfedc7704b3117bb8775d4409fdaebecb86576203aae9b78dc2002b4e6d03e0f.jpg) +100% Prediction + +![](images/42d35962e1163a7d669b316a4f939b1bf32edf49823bc9417689a06f8b69a22a.jpg) +200% Prediction + +![](images/9640702a5fe6c1a5871e79aea3c1cbc223b9be933cce2c7f8d19cc5927f6fc84.jpg) + +![](images/458658ec987c8e09fe0a9eca671c102fdbadfd38202275ff7a5c09f95f70c551.jpg) + +![](images/81cab1a497ea812de3f5e29772b31e5648a9c3019760b4d63f38dec432bfa80e.jpg) + +Table 5. Error analysis against hand pose noise. $\sigma$ is the average prediction error. * marks our unablated method. + +
F-5↑CD↓Vol↓Sim↓EPE↓
ours w/o rf0.171.021.743.328.9
ours w rf0.171.001.283.008.7
ours w GT pose0.200.921.732.44-
+ +Table 6. Test-time refinement. We report object error, intersection volume, simulation displacement and hand error before and after test-time refinement. + +hand poses corrupted by different levels of noise, either from Gaussian or more structured prediction noise. For the latter, we linearly interpolate (and even extrapolate) the true poses and off-the-shelf predictions. Our method still outperform baselines even when the predicted hand pose is with twice more error (Tab 5 and Fig 7). + +Test-time refinement improves hand pose. The object reconstruction above is obtained by direct feed-forward prediction. We then show that our articulation-conditioned ob + +![](images/1e7c2f6c01b80dcfe46fdbeeb9ec106eba9c6465d5b6b30b89f4c40c630a5a41.jpg) +Figure 8. Visualizing hand-object reconstruction before and after test-time refinement in the image frame and from two novel views. + +ject shape can in turn refine the initial hand pose estimation and improve the HOI quality. We report end point error (EPE in $mm$ ) for each joint on Obman dataset in Table 6. To evaluate HOI quality, we report intersection volume along with simulation displacement of the object. We follow prior works [31, 37, 64] to pass the HOI reconstruction to a simulator and report how much the object slips from hand after running simulation for a fixed amount of time. + +As shown in Table 6, both object and hand reconstruction improve after test-time refinement. The simulation displacement of the object drops with less intersection region. When ground truth hand articulation is provided, the object error and simulation displacement continue to improve. Figure 8 visualizes one example before and after refinement. Four finger tips are attracted to object surface while the thumb is pushed out of the object. + +# 5. Conclusion + +In this paper, we propose a method to infer implicit 3D shape of generic objects in hand. We explicitly treat predicted hand pose as a cue for object inference via an articulation-aware positional encoding. We have shown that this complements visual cues, especially when the hand-held object is occluded. While the results are encouraging, there are several limitations. For example, our work cannot be directly adapted to reconstructing dynamic grasps from videos where object consistency given varying articulation is required. Additionally, we require 3D ground-truth for training and it would be interesting to extend it with differentiable rendering techniques. Despite these challenges, we believe that our work on reconstructing hand-held generic objects takes an encouraging step towards understanding HOI for in-the-wild videos. + +Acknowledgements. The authors would like to thank Zhe Cao and Ilija Radosavovic for helping set up MOW dataset. We would also like to thank Aljosa Osep, Pedro Morgado, and Jason Zhang for their detailed feedback on manuscript. + +# References + +[1] Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M Seitz, and Richard Szeliski. Building rome in a day. ICCV, 2009. 2 +[2] Adnane Boukhayma, Rodrigo de Bem, and Philip HS Torr. 3d hand shape and pose from images in the wild. In CVPR, 2019. 2 +[3] Samarth Brahmbhatt, Chengcheng Tang, Christopher D. Twigg, Charles C. Kemp, and James Hays. Contact pose: A dataset of grasps with object contact and hand pose. In ECCV, 2020. 3 +[4] Zhe Cao, Ilija Radosavovic, Angjoo Kanazawa, and Jitendra Malik. Reconstructing hand-object interactions in the wild. ICCV, 2021. 2, 3 +[5] Zhe Cao, Ilija Radosavovic, Angjoo Kanazawa, and Jitendra Malik. Reconstructing hand-object interactions in the wild. In ICCV, 2021. 5 +[6] Thomas J Cashman and Andrew W Fitzgibbon. What shape are dolphins? building 3d morphable models from 2d images. TPAMI, 2012. 2 +[7] Angel X. Chang, Thomas A. Funkhouser, Leonidas J. Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, L. Yi, and Fisher Yu. Shapenet: An information-rich 3d model repository. ArXiv, 2015. 5 +[8] Yujin Chen, Zhigang Tu, Di Kang, Ruizhi Chen, Linchao Bao, Zhengyou Zhang, and Junsong Yuan. Joint hand-object 3d reconstruction from a single image with cross-branch feature fusion. TIP, 2021. 3 +[9] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In CVPR, 2019. 2 +[10] Hongsuk Choi, Gyeongsik Moon, and Kyoung Mu Lee. Pose2mesh: Graph convolutional network for 3d human pose and mesh recovery from a 2d human pose. In ECCV, 2020. 2 +[11] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In ECCV, 2016. 2 +[12] Timothy F Cootes and Christopher J Taylor. Active shape models—smart snakes'. In BMVC. 1992. 2 +[13] Enric Corona, Albert Pumarola, G. Alenyà, Francesc Moreno-Noguer, and Grégory Rogez. Ganhand: Predicting human grasp affordances in multi-object scenes. CVPR, 2020. 3 +[14] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Sanja Fidler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, and Michael Wray. Scaling egocentric vision: The epic-kitchens dataset. ECCV, 2018. 2, 5 +[15] Boyang Deng, Kyle Genova, Soroosh Yazdani, Sofien Bouaziz, Geoffrey Hinton, and Andrea Tagliasacchi. Cvxnet: Learnable convex decomposition. In CVPR, 2020. 2 +[16] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In CVPR, 2017. 2 + +[17] Guillermo Garcia-Hernando, Shanxin Yuan, Seungryul Baek, and Tae-Kyun Kim. First-person hand action benchmark with rgb-d videos and 3d hand pose annotations. In CVPR, 2018. 2, 3 +[18] Liuhao Ge, Zhou Ren, Yuncheng Li, Zehao Xue, Yingying Wang, Jianfei Cai, and Junsong Yuan. 3d hand shape and pose estimation from a single rgb image. In CVPR, 2019. 2 +[19] Kyle Genova, Forrester Cole, Avneesh Sud, Aaron Sarna, and Thomas Funkhouser. Local deep implicit functions for 3d shape. In CVPR, 2020. 2 +[20] Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In ECCV, 2016. 2 +[21] Georgia Gkioxari, Ross B. Girshick, Piotr Dólar, and Kaiming He. Detecting and recognizing human-object interactions. CVPR, 2018. 3 +[22] Georgia Gkioxari, Jitendra Malik, and Justin Johnson. Mesh r-cnn. In ICCV, 2019. 2 +[23] Shubham Goel, Angjoo Kanazawa, and Jitendra Malik. Shape and viewpoint without keypoints. In ECCV, 2020. 2 +[24] Patrick Grady, Chengcheng Tang, Christopher D. Twigg, Minh Vo, Samarth Brahmbhatt, and Charles C. Kemp. Contact: Optimizing contact to improve grasps. CVPR, 2021. 3 +[25] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. A papier-mâché approach to learning 3d surface generation. In CVPR, 2018. 2, 6 +[26] Abhinav Gupta, Alexei A Efros, and Martial Hebert. Blocks world revisited: Image understanding using qualitative geometry and mechanics. In ECCV, 2010. 2 +[27] Henning Hamer, Juergen Gall, Thibaut Weise, and Luc Van Gool. An object-dependent hand pose prior from sparse training data. In CVPR, 2010. 3 +[28] Shreyas Hampali, Mahdi Rad, Markus Oberweger, and Vincent Lepetit. Honnotate: A method for 3d annotation of hand and objects poses. 3 +[29] Shreyas Hampali, Mahdi Rad, Markus Oberweger, and Vincent Lepetit. Honnotate: A method for 3d annotation of hand and object poses. In CVPR, 2020. 5 +[30] Yana Hasson, Bugra Tekin, Federica Bogo, Ivan Laptev, Marc Pollefeys, and Cordelia Schmid. Leveraging photometric consistency over time for sparsely supervised hand-object reconstruction. CVPR, 2020. 2 +[31] Yana Hasson, Gül Varol, Dimitris Tzionas, Igor Kalevatykh, Michael J. Black, Ivan Laptev, and Cordelia Schmid. Learning joint reconstruction of hands and manipulated objects. In CVPR, 2019. 3, 5, 6, 7, 8 +[32] Kaiming He, X. Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, 2016. 4 +[33] Derek Hoiem, Alexei A Efros, and Martial Hebert. Automatic photo pop-up. In SIGGRAPH. 2005. 2 +[34] Umar Iqbal, Pavlo Molchanov, Thomas Breuel Juergen Gall, and Jan Kautz. Hand pose estimation via latent 2.5 d heatmap regression. In ECCV, 2018. 2 +[35] Angjoo Kanazawa, Shubham Tulsiani, Alexei A Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. In ECCV, 2018. 2 + +[36] Abhishek Kar, Shubham Tulsiani, Joao Carreira, and Jitendra Malik. Category-specific object reconstruction from a single image. In CVPR, 2015. 2 +[37] Korrawe Karunratanakul, Jinlong Yang, Yan Zhang, Michael J Black, Krikamol Muandet, and Siyu Tang. Grasping field: Learning implicit representations for human grasps. In 3DV. 3, 5, 6, 7, 8 +[38] Abhijit Kundu, Yin Li, and James M Rehg. 3d-rcnn: Instance-level 3d object reconstruction via render-and-compare. In CVPR, 2018. 2 +[39] Xueting Li, Sifei Liu, Kihwan Kim, Shalini De Mello, Varun Jampani, Ming-Hsuan Yang, and Jan Kautz. Self-supervised single-view 3d reconstruction via semantic consistency. In ECCV, 2020. 2 +[40] Chen-Hsuan Lin, Chen Kong, and Simon Lucey. Learning efficient point cloud generation for dense 3d object reconstruction. In AAAI, 2018. 2 +[41] Shaowei Liu, Hanwen Jiang, Jiarui Xu, Sifei Liu, and Xiaolong Wang. Semi-supervised 3d hand-object poses estimation with interactions in time. In CVPR, 2021. 2, 3 +[42] William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. SIGGRAPH, 1987. 3 +[43] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In CVPR, 2019. 2 +[44] Andrew T Miller and Peter K Allen. Graspit! a versatile simulator for robotic grasping. IEEE Robotics & Automation Magazine, 2004. 5 +[45] Franziska Mueller, Florian Bernard, Oleksandr Sotnychenko, Dushyant Mehta, Srinath Sridhar, Dan Casas, and Christian Theobalt. Operated hands for real-time 3d hand tracking from monocular rgb. In CVPR, 2018. 2 +[46] Franziska Mueller, Micah Davis, Florian Bernard, Oleksandr Sotnychenko, Micekal Verschooor, Miguel A Otaduy, Dan Casas, and Christian Theobalt. Real-time pose and shape reconstruction of two interacting hands with a single depth camera. ACM Transactions on Graphics (TOG), 2019. 2 +[47] Paschalis Panteleris, Iason Oikonomidis, and Antonis Argyros. Using a single rgb frame for real time 3d hand pose estimation in the wild. In WACV, 2018. 2 +[48] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In CVPR, 2019. 2, 3, 4 +[49] Akila Pemasiri, Kien Nguyen Thanh, Sridha Sridharan, and Clinton Fookes. Im2mesh gan: Accurate 3d hand mesh recovery from a single rgb image. arXiv, 2021. 2 +[50] Tu-Hoa Pham, Nikolaos Kyriazis, Antonis A Argyros, and Abderrahmane Kheddar. Hand-object contact force estimation from markerless visual tracking. TPAMI, 2017. 3 +[51] Lawrence G Roberts. Machine perception of three-dimensional solids. PhD thesis, Massachusetts Institute of Technology, 1963. 2 +[52] Grégory Rogez, Maryam Khademi, JS Supancic III, Jose Maria Martinez Montiel, and Deva Ramanan. 3d hand pose detection in egocentric rgb-d images. In ECCV, 2014. 2 + +[53] Grégory Rogez, James S Supancic, and Deva Ramanan. Understanding everyday hands in action from rgb-d images. In ICCV, 2015. 2 +[54] Javier Romero, Hedvig Kjellström, and Danica Kragic. Hands in action: real-time 3d reconstruction of hands in interaction with objects. In ICRA, 2010. 3 +[55] Javier Romero, Dimitrios Tzionas, and Michael J Black. Embodied hands: Modeling and capturing hands and bodies together. ToG, 2017. 2 +[56] Yu Rong, Takaaki Shiratori, and Hanbyul Joo. Frankmocap: Fast monocular 3d hand and body motion capture by regression and integration. ICCV Workshop, 2021. 2, 3, 5 +[57] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. ICCV, 2019. 4, 6 +[58] Dandan Shan, Jiaqi Geng, Michelle Shu, and David F Fouhey. Understanding human hands in contact at internet scale. In CVPR, 2020. 2, 3, 5 +[59] Srinath Sridhar, Franziska Mueller, Antti Oulasvirta, and Christian Theobalt. Fast and robust hand tracking using detection-guided optimization. In CVPR, 2015. 2 +[60] Srinath Sridhar, Franziska Mueller, Michael Zollhöfer, Dan Casas, Antti Oulasvirta, and Christian Theobalt. Real-time joint tracking of a hand manipulating an object from rgb-d input. In ECCV, 2016. 3 +[61] Maxim Tatarchenko, Stephan R Richter, René Ranftl, Zhuwen Li, Vladlen Koltun, and Thomas Brox. What do single-view 3d reconstruction networks learn? In CVPR, 2019. 5 +[62] Bugra Tekin, Federica Bogo, and Marc Pollefeys. $\mathrm{H} + \mathrm{o}$ : Unified egocentric recognition of 3d hand-object poses and interactions. In CVPR, 2019. 2, 3 +[63] Shubham Tulsiani, Hao Su, Leonidas J Guibas, Alexei A Efros, and Jitendra Malik. Learning shape abstractions by assembling volumetric primitives. In CVPR, 2017. 2 +[64] Dimitrios Tzionas, Luca Ballan, Abhilash Srikantha, Pablo Aponte, Marc Pollefeys, and Juergen Gall. Capturing hands in action using discriminative salient points and physics simulation. IJCV, 2016. 3, 8 +[65] Dimitrios Tzionas and Juergen Gall. 3d object reconstruction from hand-object interactions. In ICCV, 2015. 3 +[66] Ashish Vaswani, Noam M. Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. NeurIPS, 2017. 4 +[67] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. In ECCV, 2018. 2 +[68] Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In NeurIPS, 2016. 2 +[69] Yufei Ye, Shubham Tulsiani, and Abhinav Gupta. Shelf-supervised mesh prediction in the wild. In CVPR, 2021. 2 +[70] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelnerf: Neural radiance fields from one or few images. CVPR, 2021. 4 + +[71] Jason Y. Zhang, Sam Pepose, Hanbyul Joo, Deva Ramanan, Jitendra Malik, and Angjoo Kanazawa. Perceiving 3d human-object spatial arrangements from a single image in the wild. ECCV, 2020. 3 +[72] Xiong Zhang, Qiang Li, Hong Mo, Wenbo Zhang, and Wen Zheng. End-to-end hand mesh recovery from a monocular rgb image. In ICCV, 2019. 2 +[73] Yuxiao Zhou, Marc Habermann, Weipeng Xu, Ikhsanul Habibie, Christian Theobalt, and Feng Xu. Monocular real-time hand shape and motion capture using multi-modal data. In CVPR, 2020. 2 +[74] Christian Zimmermann and Thomas Brox. Learning to estimate 3d hand pose from single rgb images. In ICCV, 2017. 2 +[75] Berk Çalli, Arjun Singh, Aaron Walsman, Siddhartha S. Srinivasa, P. Abbeel, and Aaron M. Dollar. The ycb object and model set: Towards common benchmarks for manipulation research. ICAR, 2015. 5 \ No newline at end of file diff --git a/whatsinyourhands3dreconstructionofgenericobjectsinhands/images.zip b/whatsinyourhands3dreconstructionofgenericobjectsinhands/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ca05ff4488fd1e81ce6ad5cd2d830fd84d7b5d57 --- /dev/null +++ b/whatsinyourhands3dreconstructionofgenericobjectsinhands/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9191d65df6c22cafb4c1e01282bb7d32d1a21262a7a152d734ede497209049de +size 489909 diff --git a/whatsinyourhands3dreconstructionofgenericobjectsinhands/layout.json b/whatsinyourhands3dreconstructionofgenericobjectsinhands/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..af16763856a5b60c45210ab7419f289346b89f05 --- /dev/null +++ b/whatsinyourhands3dreconstructionofgenericobjectsinhands/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4eef6f18306d184f7ec6f829d46835b67e187cfef77a03066899211b48a76c0b +size 440874 diff --git a/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_content_list.json b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b2852a65dfef9a4e12852efd660276f398e1cd6f --- /dev/null +++ b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:571f321a9c2c68407f2ac68becd385d225572a914651e51a2b6b2492d310c93b +size 87661 diff --git a/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_model.json b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_model.json new file mode 100644 index 0000000000000000000000000000000000000000..49a39165268254ac8ece333231f9923f6b10ec13 --- /dev/null +++ b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22fcea214bb693f44ffd6e4ff166d8f3d4225001c47aeea7e24e7fafbc2fc637 +size 107699 diff --git a/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_origin.pdf b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cf8f5a87bc3453a513eb886fc15570e46661d73d --- /dev/null +++ b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/e44db181-d6ad-4bf9-a6cb-948128a26744_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5921f15679c0633a862cfd9b70890eae690c3838bfc432b167b3d4a0c942e688 +size 8225802 diff --git a/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/full.md b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c2bac3b1b7e009576ff9f739ca62a5b09d1c40fc --- /dev/null +++ b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/full.md @@ -0,0 +1,349 @@ +# What to look at and where: Semantic and Spatial Refined Transformer for detecting human-object interactions + +A S M Iftekhar*, Hao Chen*, Kaustav Kundu‡, Xinyu Li‡, Joseph Tighe‡, Davide Modolo‡ +AWS AI Labs; †University of California, Santa Barbara + +{hxen,kaustavk,-,tighej,dmodolo}@amazon.com; iftekhar@ucsb.edu + +# Abstract + +We propose a novel one-stage Transformer-based semantic and spatial refined transformer (SSRT) to solve the Human-Object Interaction detection task, which requires to localize humans and objects, and predicts their interactions. Differently from previous Transformer-based HOI approaches, which mostly focus at improving the design of the decoder outputs for the final detection, SSRT introduces two new modules to help select the most relevant object-action pairs within an image and refine the queries' representation using rich semantic and spatial features. These enhancements lead to state-of-the-art results on the two most popular HOI benchmarks: V-COCO and HICO-DET. + +# 1. Introduction + +Human-object interaction (HOI) detection is an important building block for complex visual reasoning, such as scene understanding [11, 51] and action recognition [50, 55], and its goal is to detect all HOI triplets $\langle \text{human}, \text{object}, \text{action} \rangle$ in each image. Fig. 1 shows an example of a HOI detection, where the person (i.e., the human) is denoted with a red bounding box, the sports ball (i.e., the object) with a yellow bounding box, and the action kick is what that human is performing with that object. + +The HOI literature can be divided into two-stage and one stage approaches. Two-stage approaches [12-14, 18, 19, 27, 30, 31, 33, 34, 39, 43, 46-48, 53, 54, 56] first use off-the-shelf detectors to localize all instances of people and objects independently. For each person and object bounding box pair, an interaction class is then predicted in the second stage. This sequential process has two main drawbacks [7, 25, 26]: (1) off-the-shelf object detectors are agnostic to the concept of interactions; and (2) enumerating over all pairs of person and object bounding boxes to predict an interaction class is time-consuming and expensive. In contrast, one-stage + +![](images/a61cfd54eed93d432f3dcaf8e83f8a5f8aed5a5e8610321853d828f4b02425e1.jpg) +Figure 1. Conceptual workflow of SSRT. Instead of just feeding the encoded image to the decoder, we pre-select object-action (OA) prediction candidates and encode them to semantic and spatial features. These features then refine the learnt queries in decoding to enable them to attend to more relevant HOI predictions. + +approaches detect all the components of an HOI triplet directly in an end-to-end fashion. Some earlier one-stage approaches used intermediate representations based on interaction points [32, 49] and union boxes [25] to predict these. However, such methods fail when the interacting human and object are far away from each other and when multiple interactions overlap (e.g., crowd scenes) [7, 42]. + +More recently, a new trend of one-stage approaches [7, 26, 42, 58] based on Transformer architectures [5, 10, 35] have been proposed to overcome these problems and improve the HOI detection performance. This paper belongs to this category of works (Fig. 1). At a high-level, these approaches first use a CNN backbone to extract image features and then feed them into an encoder-decoder architecture. Some approaches use two decoders to detect instances and interactions in parallel [7, 26]. while others follow a simpler design that directly predicts all the elements of an HOI triplet with a single decoder [42, 58]. While successful, this design suffers from two limitations: (i) not all object-action pairs are meaningful (e.g., a person cannot be 'cutting a pizza' when the pizza is far away from the person's location; and it is unusual for a person to be 'cutting a football'), + +simply relying on the one-shot network to reduce them may not be effective; and (ii) each simple query is decoded for all the rich elements of an HOI triplet (i.e., person location, object class and location, and interaction class), which is challenging, especially considering how HOI detection requires reasoning about complex relational structures in images. We address both of these limitations in our work. + +For this, we propose Semantic and Spatial Refined Transformer (SSRT), that solves the aforementioned limitations by predicting what subset of object-action pairs is relevant for an image, and using explicit semantic and spatial information to support and guide the queries, so that they can be decoded more reliably and are more aligned with the final detection. In details, SSRT improves the Transformer design of previous HOI detector by introducing two novel modules: a Support Feature Generator (SFG) and a Query Refiner (QR) (Fig. 2). The former generates semantic and spatial features from a set of pre-selected object-action (OA) pairs, while the latter integrates these features for decoding. + +Our approach achieves state-of-the-art results on both V-COCO [16] and HICO-DET [6] datasets, showing the importance and effectiveness of our semantic and spatial guidance for HOI detection. Finally, in an extensive ablation study, we also evaluate our model design and our parameter choices, to further highlight the SSRT's contributions. + +# 2. Related Work + +Two stage HOI detection networks detect objects and then detect HOIs among those detected objects. These networks rely on an off-the-shelf object detector [41] to localize objects. For detecting interactions among the detected objects these networks develop different novel techniques. Few works [13,34] consider humans and objects as nodes in graph networks. Another line of works [43, 46] utilize spatial and pose features to attend salient spatial regions of the images. Additionally, other works are using object affordance based architectures [20, 21] to deal with the long-tail distribution problem of the HOI detection datasets. Moreover, there are works [19, 30] that leverage the compositional nature of objects and interactions to detect HOIs. Another paradigm of two stage works utilize additional features like 3D representation of humans [29], semantic contexts [22, 34], segmentation masks [33]. However, performance of these networks are highly dependent on the quality of the object detection. Moreover, these networks suffer heavily to process the overwhelming number of non-interacting detected objects [57]. + +To deal with the issues faced by two stage networks, recent works [7, 9, 26, 42, 57, 58] are trying to detect HOIs in a one stage framework. These networks take images as input and directly detect and localize HOIs over those images. Initial one stage HOI detection networks [32, 49] focus on detecting pre-defined interaction points to detect in + +teractions. However, these heuristic based approaches often fail to find spatial contextual information. For getting richer contextual features many recent one stage HOI detection networks [7,26,42,58] adapt encoder-decoder based Transformer [45] like architecture inspired from the one stage object detection network DETR [5]. + +However, these networks do not consider the additional complexity of doing two related but different subtasks of object localization and interaction detection. The base network of these mentioned works is essentially an object detector network which is expanded for interaction detection. Therefore, it is beneficial to provide additional guidance to these networks. Moreover, these one stage networks do not leverage spatial and semantic cues that are proven to be beneficial to detect HOIs in few two-stage works [22, 44, 52]. In this respect, we propose a semantic and spatially refined transformer based architecture to detect HOIs in one single stage. Our superior numerical results over these state of the art methods prove our method's effectiveness. + +# 3. Technical Approach + +Most of today's Transformer-based HOI detection networks [7, 26, 42, 58] follow the DETR [5] architecture and focus on improving the design of the decoder outputs for the HOI task. Instead, our SSRT approach improves the overall design of the Transformer. Specifically, it adds two new modules between the encoder and the decoder: a Support Feature Generator (SFG) (Sec. 3.2) and a Query Refiner (QR) (Sec. 3.3) (Fig. 2). At a high level, SSRT works as follows: given an input image, it first extracts its features with a CNN backbone and then transform those using a transformer encoder. Instead of feeding the encoded features directly into the decoder, the features are sent to SFG to first generate a set of object-action (OA) prediction candidates (without localization). Then the SFG generates both spatial and semantic features using these candidates and aggregates them as support features. These support features are then sent to the QR to refine the learnable queries. Finally, the HOI Decoder takes the inputs as both the encoded features and the refined queries, and outputs a set of embeddings, each of which is used to predict an HOI output. + +# 3.1. Our Architecture + +Given an input image $\mathbf{x} \in \mathbb{R}^{H_0 \times W_0 \times C_0}$ , where $H_0, W_0, C_0$ denote the image height, width and color channels, SSRT first extracts a feature map $\mathbb{R}^{H \times W \times C}$ using a CNN backbone $(\mathbf{F})$ (e.g. ResNet-50 [17]). $\mathbf{F}(\mathbf{x})$ is then sent to a 1x1 convolution to reduce the channel dimension $C$ to a smaller value $d$ , and obtain $\mathbf{F}_c(\mathbf{x}) \in \mathbb{R}^{H \times W \times d}$ . Following previous works [7, 26, 42, 58], we add a fixed positional encoding $\mathbf{p} \in \mathbb{R}^{H \times W \times d}$ to the input feature of the encoder to supplement the positional information. The encoder follows the standard architecture of the transformer as a stack + +![](images/cdf885d9a12b4a84f968e862eb9792c3826b4126b1116da3e5d294ded519308c.jpg) +Figure 2. Overview of our SSRT network. Given an image, we extract features using a backbone and feed them to Transformer Encoder. The encoder's output is then sent to the Support Feature Generator (SFG), which first predicts and selects top-K object-action (OA) candidates, and then generates spatial and semantic features. Next, the aggregated features are sent to the Query Refiner (QR) to refine queries. Finally, The refined queries are decoded: each query is used to predict a human bounding box, an object bounding box, an interaction vector and an object class vector via interaction heads with small FFNs. + +of multi-head self-attention modules and a feed forward network (FFN). The encoded feature map $\mathbf{F}_e(\mathbf{x})\in \mathbb{R}^{H\times W\times d}$ is obtained as follows: + +$$ +\mathbf {F} _ {e} (\mathbf {x}) = \operatorname {E n c o d e r} \left(\mathbf {F} _ {c} (\mathbf {x}), \mathbf {p}\right) \tag {1} +$$ + +Instead of feeding $\mathbf{F}_e(\mathbf{x})$ only to the HOI decoder, we also send it to our SFG module. Here, we first predict $K$ pairs of (object, action) categories (i.e., OA pairs) present in the image and select a subset from them. We then use spatial and semantic cues for the OA prediction candidates to generate support features, $\mathbf{f}_{supp}(\mathbf{x})$ . The details of the SFG module are discussed in Sec. 3.2. The support features, $\mathbf{f}_{supp}(\mathbf{x})$ along with an initial set of queries, $\mathbf{Q} = \{\mathbf{q_i}|\mathbf{q_i}\in \mathbb{R}^d\}_{i = 1}^{N_q}$ are fed into the QR module. The query refiner module is a decoder like architecture which outputs a refined set of queries, $\mathbf{Q}^r (\mathbf{x}) = \{\mathbf{q_i^r}(\mathbf{x})|\mathbf{q_i^r}(\mathbf{x})\in \mathbb{R}^d\}_{i = 1}^{N_q}$ , i.e., + +$$ +\mathbf {Q} ^ {r} (\mathbf {x}) = \mathrm {Q R} (\mathbf {f} _ {\text {s u p p}} (\mathbf {x}), \mathbf {Q}) \tag {2} +$$ + +The details of the QR block are discussed in Sec. 3.3. Both the encoder output $\mathbf{F}_e(\mathbf{x})$ and the refined queries $\mathbf{Q}^r (\mathbf{x})$ are sent to the HOI decoder for the final decoding. Note that in contrast to the standard transformer architectures, the queries which are fed into the decoder are a function of the input image $\mathbf{x}$ . The goal of modeling it in this manner is to explicitly provide more guidance to the decoder so that it can generate more accurate HOI outputs. The HOI decoder follows the standard architecture of the transformer as a stack of multi-headed cross-attention units but no self-attention layers. The refined queries $\mathbf{Q}^r (\mathbf{x})$ are transformed into a set of output embeddings, $\mathbf{K}(\mathbf{x}) = \{\mathbf{k}_i(\mathbf{x})|\mathbf{k}_i(\mathbf{x})\in \mathbb{R}^d\}_{i = 1}^{N_q}$ , i.e., + +$$ +\mathbf {K} (\mathbf {x}) = \operatorname {D e c o d e r} \left(\mathbf {F} _ {e} (\mathbf {x}), \mathbf {p}, \mathbf {Q} ^ {r} (\mathbf {x})\right) \tag {3} +$$ + +where $\mathbf{p}$ is the positional embedding. Each query is designed to capture at most one HOI prediction. We feed these + +![](images/20c4c6af28cd41e341224f983203abd3d1ef01f17801df34a11921e95ea2f246.jpg) +Figure 3. Our Support Feature Generator (SFG) design. + +queries to four small Feed Forward Network (FFNs) to predict human bounding boxes $\mathbf{b}_h(\mathbf{x})\in [0,1]^4$ , object bounding boxes $\mathbf{b}_o(\mathbf{x})\in [0,1]^4$ , interaction prediction vectors $\mathbf{P}_{HOI}(\mathbf{x})\in [0,1]^{N_{act}}$ , and object class prediction vectors $\mathbf{P}_{obj}(\mathbf{x})\in [0,1]^{N_{obj}}$ , where $N_{act}$ and $N_{obj}$ are the number of interaction classes and number of object classes. $\mathbf{b}_o$ $\mathbf{b}_h$ and $\mathbf{P}_{HOI}$ are predicted with sigmoid functions, $\mathbf{P}_{obj}$ is predicted with softmax function. Like [42], we weigh our final interaction prediction vectors with the most confident object class predictions as: + +$$ +\mathbf {P} _ {H O I} (\mathbf {x}) = \mathbf {P} _ {H O I} (\mathbf {x}) * \max \left(\mathbf {P} _ {o b j} (\mathbf {x})\right) \tag {4} +$$ + +We discuss details on how to train this network in Sec. 3.4. + +# 3.2. Support Feature Generator + +The goal of SFG is to provide support to the transformer with additional semantic and spatial cues, as they play significant roles towards detecting all the rich HOI outputs. Specifically, semantic cues are important to help capture the human-object relations [52] while spatial cues are important to help accurately localize the humans and objects [43]. + +While explicitly using these cues have been proved successful in the two-stage solutions [43,52], it has not been exploited in one-stage approaches. In this block, we propose + +how to generate support features $\mathbf{f}_{\text{supp}}(\mathbf{x})$ for an image, which can then be used as inputs to the query refiner block and subsequently to the decoder. We first select $K$ high confident object-action (OA) candidates predicted from the encoder feature, $\mathbf{F}_e(\mathbf{x})$ , and enrich them with semantic and spatial embeddings to generate the support features (Fig. 3). + +OA Candidates Sampler. As shown in Fig. 3, we build a 3-layer FFN $g_{cls}$ on top of the average-pooled encoded features $\mathbf{F}_e(\mathbf{x})$ to predict the object-action (OA) candidates, i.e., $\mathbf{s}(\mathbf{x}) = \sigma(g_{cls}(\mathrm{avg-pool}(\mathbf{F}_e(\mathbf{x}))))$ , where $\mathbf{s}(\mathbf{x}) \in [0,1]^{N_s}$ , $N_s$ is the number of possible set of object-action (OA) pairs and $\sigma$ is the sigmoid function. Note how in this module, $\mathbf{s}(\mathbf{x})$ corresponds to the OA labels without localization. Among all predictions, we then select the top-K (object, action) candidates with the highest confidence. Let this set of selected candidates be represented by $\mathbf{S}_{\mathrm{cand}} = \{(y_{o,i}, y_{a,i})\}_{i=1}^K$ . + +Semantic Feature Generator. Recently, language-image models [23,40] have shown strong capabilities in generating high quality representations that can capture rich semantic and context information. We believe such embedding should be able to capture the relational structure and enrich the context of the transformer network. Therefore, we use a CLIP [40] text encoder to compute the semantic representation of each pre-selected OA candidate. Since CLIP works best with sentences (as opposed to single words), we convert each predicted OA into a full sentence before feeding it to the CLIP text encoder. For example, we transform the pair (phone,talk) into the sentence "A person is talking on the phone". The transformation is done automatically following certain pre-defined rules using scripts with tiny manual efforts. Finally we project these semantic features to the image feature space by using a linear projection layer (Fig. 3, top). For each OA candidate, $(y_{o,i},y_{a,i})\in \mathbf{S}_{\mathrm{cand}}$ we compute the semantic feature as follows: + +$$ +\mathbf {f} _ {s e m} \left(y _ {o, i}, y _ {a, i}\right) = \operatorname {E m b} _ {s e m} \left(y _ {o, i}, y _ {a, i}\right) \tag {5} +$$ + +where, $\mathrm{Emb}_{sem}$ is the semantic embedding function. + +Spatial Feature Generator. In two-stage HOI approaches, the spatial features are generated based on predicted human and object bounding boxes from off-the-shelf detectors [14, 43]. As these are not available for one-state approaches like ours, we propose to estimate bounding box locations using training data statistics. + +We define the relative spatial configuration (RSC) as the object bounding box location with respect to the human bounding box location, and estimate the RSC from the training data. Specifically, given a human $h$ and an object $o$ , we denote the human bounding box as $(x_h, y_h, w_h, h_h)$ and object bounding box as $(x_o, y_o, w_o, h_o)$ , where $(x, y)$ is the top left point and $(w, h)$ is width and height of the bounding box. Inspired by previous work [15], we define the RSC + +as $(\Delta x_{oh},\Delta y_{oh},\Delta w_{oh},\Delta h_{oh})$ , where: $\Delta x_{oh} = \frac{x_o - x_h}{w_h}$ $\Delta y_{oh} = \frac{y_o - y_h}{h_h}$ $\Delta w_{oh} = \log \frac{w_o}{w_h}$ and $\Delta h_{oh} = \log \frac{h_o}{h_h}$ We then consider for each interaction, $\Delta x_{oh},\Delta y_{oh}$ follow a bi-variate Gaussian distribution and $\Delta w_{oh},\Delta h_{oh}$ follow another bi-variate Gaussian distribution. We estimate essential parameters (mean, co-variance) for these variables using all the training samples for each OA label. We estimate the person bounding boxes in the similar way. + +Using these distributions, we then generate random samples as the human and object bounding boxes to create the spatial features. As shown in Fig. 3 we follow previous works [43] to generate the spatial map for each OA label. The spatial map is a $2 \times B \times B$ size binary map where in the first channel the location of the human bounding box is 1 and in the second channel the location of the object bounding box is 1. The rest of the locations in spatial map are zero. Finally we pass through this spatial map to 2 convolution layers followed by a linear projection layer to generate the spatial feature. For each OA candidate, $(y_{o,i}, y_{a,i}) \in \mathbf{S}_{\mathrm{cand}}$ , we compute the spatial features: + +$$ +\mathbf {f} _ {s p a} \left(y _ {o, i}, y _ {a, i}\right) = \operatorname {E m b} _ {s p a} \left(y _ {o, i}, y _ {a, i}\right) \tag {6} +$$ + +$\mathsf{Emb}_{spa}$ is the embedding function for the spatial features. + +Feature Aggregation. For each pre-selected OA candidate, $(y_{o,i},y_{a,i})\in \mathbf{S}_{\mathrm{cand}}$ , we have the semantic feature, $\mathbf{f}_{sem}(y_{o,i},y_{a,i})$ and the spatial feature, $\mathbf{f}_{spa}(y_{o,i},y_{a,i})$ These features are aggregated as follows: + +$$ +\mathbf {f} _ {a g r} \left(y _ {o, i}, y _ {a, i}\right) = g _ {a g r} \left(\mathbf {f} _ {s e m} \left(y _ {o, i}, y _ {a, i}\right), \mathbf {f} _ {s p a} \left(y _ {o, i}, y _ {a, i}\right)\right) \tag {7} +$$ + +where $g_{agr}$ is the aggregation function. We concatenate the features, $\mathbf{f}_{agr}(y_{o,i},y_{a,i})$ extracted for all candidates $\in \mathbf{S}_{\mathrm{cand}}$ and form the support feature, $\mathbf{f}_{supp}(\mathbf{x})\in \mathbb{R}^{K\times d}$ . + +# 3.3. Query Refiner + +The query refiner is designed to use the pre-selected OA candidates and support features generated from SFG module to refine the learnt queries that are randomly initialized. Ideally these pre-generated contextual signals should be able to guide the queries to be learnt to attend to more relevant candidates and reduce noisy predictions. To achieve this we cross-attend the learnt queries with support features. + +Specifically, as shown in Fig. 2, the query refiner is built on standard transformer decoder structure. The randomly initialized queries $\mathbf{Q} = \{\mathbf{q_i}|\mathbf{q_i}\in \mathbb{R}^d\}_{i = 1}^{N_q}$ first attend to themselves via self-attention. Then these queries attend to support features $\mathbf{f}_{supp}(\mathbf{x})$ generated from the SFG (Sec. 3.2) through cross-attention. Here, the support features serve as keys and values to the attention architecture. As a result, queries have additional direction to look for correct object-action in the encoded image features. In the final HOI decoder, queries attend to the encoded image features. The output of the decoder are the context-aware queries which contain rich cues to detect HOIs. + +# 3.4. Training details + +To train this network, we apply the same loss function as [42] at the outputs of the interaction head, $\mathbf{b}_o$ , $\mathbf{b}_h$ , $\mathbf{P}_{HOI}$ and $\mathbf{P}_{obj}$ . The loss calculation is composed of two stages: the bipartite matching stage between predictions and ground truths, and the loss calculation stage for the matched pairs. For the bipartite matching, we follow the training procedure of DETR [5] and use the Hungarian algorithm [28]. Then the loss is calculated on the basis of the matched pairs as follows: + +$$ +\mathcal {L} = \lambda_ {1} \mathcal {L} _ {\text {b o x}} + \lambda_ {2} \mathcal {L} _ {\text {i o u}} + \lambda_ {3} \mathcal {L} _ {\text {o b j}} + \lambda_ {4} \mathcal {L} _ {\text {H O I}}, \tag {8} +$$ + +where $\mathcal{L}_{\mathrm{box}}$ and $\mathcal{L}_{\mathrm{iou}}$ are $l_{1}$ and $GIOU$ loss applied to both human and object bounding boxes, $\mathcal{L}_{\mathrm{obj}}$ is a cross entropy loss for object prediction, and $\mathcal{L}_{\mathrm{HOI}}$ is a binary cross entropy loss for interaction prediction. $\lambda_1, \lambda_2, \lambda_3$ and $\lambda_4$ are hyperparameters selected following [42]. + +Additionally we use a binary cross entropy loss for the s output, which corresponds to the image-level (object, action) pair prediction. All these losses are trained in a multitask setting. + +# 4. Experimental settings + +Dataset & Metrics. We evaluate SSRT on the two most popular benchmark datasets: V-COCO [16] and HICO-DET [6]. V-COCO has 29 interaction classes. Following [31], we evaluate the performance on 24 interaction classes since 4 interaction classes have no object pair and 1 class has very few samples. This dataset has 2,533 training, 2,867 validation and 4,946 testing images. HICO-DET [6] has 600 human-object interaction classes. It consists of 38,117 training and 9,658 test images. + +We report mean average precision (mAP) on the test set for both V-COCO and HICO-DET datasets. A prediction is considered to be correct if the predicted human and object bounding boxes overlap (with IoU greater than 0.5) with the respective GT boxes and the predicted interaction class is correct. We follow the protocol established in [43] to evaluate results on the V-COCO dataset. For human actions that do not interact with any object, two evaluation scenarios are considered. Scenario 1 considers a strict evaluation criteria that requires the prediction of a null bounding box with coordinates $[0,0,0,0]$ , Scenario 2 relaxes this condition for such cases by ignoring the predicted bounding box for evaluation. We use the protocol from [6] to evaluate on the HICO-DET. The mAP metric is computed in default settings for three categories: Full (all 600 HOI classes), Rare (138 classes that have less than 10 training samples), Non-rare (462 classes that have more than 10 training samples). + +Implementation Details. The architecture design is similar to that of QPIC [42]. We use ResNet-50 and ResNet101 backbones [17]. The parameters of the network are initialized with DETR [5] trained on the COCO dataset [42]. + +Each of the encoder and decoder have 6 layers and 8 heads. The dimension inside the transformer architecture is 256. The total number of queries is 100. The initial learning rate of the backbone network is $10^{-5}$ , with others $10^{-3}$ . The weight decay is $10^{-4}$ . The learning rate is dropped at every 65 epochs and we train 150 epochs in total. We use the AdamW [36] optimizer and the batch size is 16. + +We experiment with the following semantic feature generator: (a) one-hot, (b) GLOVE [37], (c) CLIP [40]. In the spatial feature generator, we use a $2 \times 64 \times 64$ dimensional binary spatial map [14, 43]. For the human bounding box location, we select (16, 16) as the fixed top-left point, as in the evaluating HOI datasets interacting human bounding boxes are mostly confined at the top-left corner of the images [43]. Both spatial and semantic features are projected to a 256-dimensional space. + +# 5. Results + +In this section, we first compare the performance of our SSRT network with the SOTA methods in Sec. 5.1, followed by an ablation study to validate the design choices in Sec. 5.2. Finally, we show qualitative analysis in Sec. 5.3. + +# 5.1. Comparison with SOTA + +In Tables 1 and 2, we compare the performance of our SSRT model to the SOTA methods on the V-COCO [16] and HICO-DET [6] datasets respectively. We group the approaches into one-stage and two-stage. Following the literature, we report numbers of SSRT with both ResNet-50 (R-50) and ResNet-101 (R-101) backbones. Results show that our SSRT has achieved SOTA performance on both datasets with the ResNet-50 backbone, while ResNet-101 can improve the performance further. We outperform all the DETR based solutions (HOI-Trans, ASNet, HOTR and QPIC) on both datasets, and overall we achieve about $10\%$ improvement on V-COCO and $5\%$ improvement on HICO-DET comparing to the SOTA. + +# 5.2. Ablation Studies + +In this section, we do ablation for the different design choices of SSRT. We evaluate on V-COCO dataset with the ResNet-50 backbone. For each ablation, we change one parameter, and keep the other parameters at the best setting. + +Support Feature Generator Module. In Table 3a, we explore the benefits of using semantic and spatial features to generate features for the query refiner block. Comparing to the QPIC baseline (Row 1), using semantic features (Row 2) significantly improves the performance by +3.9 points. This demonstrates the effectiveness of using the semantic information to guide the HOI detection. On top of this, we explore two different ways to aggregate the semantic and + +
TypeMethodScenario 1Scenario 2
Two StageVCL [19]48.3-
DRG [13]51.0-
Wang et al. [47]52.3-
FCL [21]52.4-
PD-Net [56]52.6-
ACP [27]53.0-
FCMNet [33]53.1-
SG2HOI [18]53.3-
IDN [30]53.360.3
GTNet [22]56.260.1
SABRA [24]56.6-
One StageUnionDet [25]47.556.2
Wang et al. [49]51.0-
HOI-Trans [58]52.9-
ASNet [7]53.9-
GGNet [57]54.7-
HOTR [26]55.264.4
DIRV [12]56.1-
QPIC(R-50) [42]58.861.0
QPIC(R-101) [42]58.360.7
Ours (R-50)63.765.9
Ours (R-101)65.067.1
+ +Table 1. Performance comparisons on the V-COCO [16] test set. Best result is marked with bold and the second best result is marked with underline. + +
TypeMethodFullRareNon-rare
Two StageWang et al. [47]17.5716.8517.78
FCMNet [33]20.4117.3421.56
ACP [27]20.5915.9221.98
PD-Net [56]20.8115.9022.28
SG2HOI [18]20.9318.2421.78
VCL [19]23.6317.2125.55
DRG [13]24.5319.4726.04
SABRA [24]26.0916.2929.02
IDN [30]26.2922.6127.39
GTNet [22]26.7821.0228.50
ATL [20]28.5321.6430.59
FCL [21]29.1223.6730.75
One StageUnionDet [25]17.5811.7219.33
Wang et al. [49]19.5612.7921.58
PPDM [32]21.7313.7824.10
DIRV [12]21.7816.3823.39
HOI-Trans [58]23.4616.9125.41
PST [9]23.9314.9826.60
HOTR [26]25.1017.3427.42
ASNet [7]28.8724.2530.25
GGNet [57]29.1722.1330.84
QPIC(R-50) [42]29.0721.8531.23
QPIC(R-101) [42]29.9023.9231.69
Ours (R-50)30.3625.4231.83
Ours (R-101)31.3424.3133.32
+ +Table 2. Performance comparisons on the HICO-DET [6] test set. Best result is marked with bold and the second best result is marked with underline. + +spatial features: (1) concatenation (Row 3); and (2) elementwise multiplication (Row 4). Results show that elementwise multiplication gives the best performance, which we believe is because that multiplication operates as a gating mechanism that effectively fuses semantic and spatial information, as also observed in other work [38, 43]. + +Semantic Inputs. Table 3b explores different kinds of semantic input that can be encoded as semantic features. For this experiment, all varieties of semantic input are encoded by the CLIP [40] text embedding model. We explore the following types of semantic input: (a) action only: using only predicted action category from the encoder. For example, if the OA prediction is $\langle \text{laptop}, \text{work} \rangle$ , we only use the predicted action (i.e., "work" here) as the semantic input, (b) object-action (OA): Using the previous example, the semantic input here is $\langle \text{laptop}, \text{work} \rangle$ tuple, (c) semantic retrieval: In this approach we model the semantic input in a non-parametric fashion. Using a joint visual-semantic embedding network [40], we retrieve nearest OA semantic tuples based on the visual features of the input. The retrieved candidates are used as semantic input in this case. (d) V-COCO captions: Since V-COCO is a subset of the COCO dataset [8], we use the corresponding captions as additional input along with the image. In the last row of the table, we also experiment with the oracle setting, where we assume we have access to the ground truth (GT) OA tuple. The strong performance of the oracle model indicates that refining the queries in this manner is an effective direction to guide the network to focus on more relevant candidates. The best performing approach in the non-oracle setting uses OA tuple. There is still a non-trivial gap between it and using the oracle, indicating that there is still room to improve the HOI detection accuracy by further improving the quality of the pre-generated OA tuple candidates. + +It is interesting to note that using captions as additional input along with the image does not improve performance. This might be due to the fact that compared to the object-action candidate, the image captions can be noisy and sometimes too generic for the task (e.g. this photo has a horse etc.). Using only the action approach achieves a slightly worse performance than using the OA tuple as expected, as the former has no information about the object category. + +Number of Predictions as Semantics. We then ablate the different number of OA predictions candidate selected as the semantic inputs in Table 3c. We test with using topK, where $\mathrm{K} = 1,2,4,8$ and 13 HOI predictions as semantics. We stop at $\mathrm{K} = 13$ because the maximum number of HOI ground truths for V-COCO in each image is 13. To better understand the results, we not only list the final mAP metric, but also add the precision and recall for the prediction in the table. Results show that $\mathrm{K} = 4$ gives the best performance, and the performance gradually decreases when moving to + +
mAP
Base (QPIC)58.8
Base + Sem.62.7
Base + Sem.+ Sp. (concat.)62.9
Base + Sem.+ Sp. (multi.)63.7
+ +(a) Support Feature Generator Module. + +
mAP
action only63.1
OA63.7
semantic retrieval62.7
V-COCO captions62.6
Oracle HOI GT76.1
+ +(b) Semantic Inputs. + +
#Prec.Rec.mAP
185.323.462.9
275.141.263.3
462.568.663.7
837.181.563.4
1325.189.662.8
+ +(c) Numbers of HOI predictions selected as semantics. Prec. is precision and Rec. is recall. + +
mAP
One-hot vector63.0
GLOVE embedding [37]63.1
CLIP text embedding [40]63.7
+ +(d) Semantic embeddings. + +
mAP
Multi-variate parameter62.3
Bi-variate parameter62.0
Multi-variate spatial map63.0
Bi-variate spatial map63.7
+ +(e) Spatial feature designs. + +Table 3. Design choices on the semantic and spatial features. + +wards either direction (K=1 and K=13). As expected, K=1 gives the highest precision for prediction and K=13 gives the highest recall. But the optimal performance point (K=4) is in the middle, indicating that the trade-off between precision and recall of the prediction is important. Low recall corresponds to using lesser information for the query refiner block to produce representative enough queries for the decoder. Low precision affects the quality of input to the refiner block with increasing noise. + +Semantic Embeddings. We then evaluate different embedding methods in Table 3d. We test with (1) a one-hot vector from the prediction; (2) the GLOVE [37] encoder, and (3) the CLIP [40] text encoder. Results show that all embeddings achieve good performance, while CLIP achieves the best. This may due to the fact that CLIP encoder is learnt from large-scale image text-pairs and hence generates a stronger semantic embedding for the HOI task than others. One-hot results also give good performance, indicating that using the pre-selected OA candidates itself can still provide guidance to refine the queries. + +Spatial Feature Designs. We evaluate the performance of different spatial feature designs in Table 3e. For the relative spatial configuration (RSC) introduced in Sec. 3.2, we consider $(\Delta x_{oh}, \Delta y_{oh}, \Delta w_{oh}, \Delta h_{oh})$ to either follow a multi-variate distribution or follow two bi-variate distributions for $(\Delta x_{oh}, \Delta y_{oh})$ and $(\Delta w_{oh}, \Delta h_{oh})$ . With + +![](images/3b0e0570ea52e7a94372760b48fda9de23ab6cfdf10668443a5141f57417340b.jpg) +1. surfboard 0.894 | 0.001 + +![](images/50f89274d7a55062c36fc6e9f1ca8c3bd711c5baec06bdb3535d02b7ad738b94.jpg) +2. carry a backpack 0.442 | 0.231 + +![](images/f1e4c8d6502cc18ea1947bafcc471c02cf25503c904844613e56c2cee1105d8a.jpg) +3.work on computer 0.664|0.238 + +![](images/e712f05d12cd5a6aabcfd79c73de3e64ca9cafbc335be178ebe0970b149037c1.jpg) +4. catch a frisbee 0.636 | none +Figure 4. Qualitative results of SSRT compared to QPIC. For each image, the detection outputs of SSRT are marked in green while the outputs of QPIC are marked in red. The prediction scores are presented in the captions. If no matched bounding box pairs are detected then the score is marked as none. We observe that SSRT improves over QPIC in mainly two aspects: (1) increasing the confidence scores of the interaction predictions (sample 1-3); and (2) successfully detecting the person, object and interactions that are completely missed in QPIC (sample 4-6). + +![](images/bde7a8a4b0c8764691a021d2558a319bf7f6274b556427b3947bd0dbac7c0f84.jpg) +5.skateboard 0.894none + +![](images/9069fb9c37d9be9ba85905f813f9451f2520e2d1d82860fe44f297b2f10aa3e5.jpg) +6. sit on the chair 0.812 | none + +each distribution, we explore two types of features: (1) only using parameters of distributions as features (Row 1 and 2). Specifically, for multi-variate distribution we use mean, variance and co-variance among all combinations of $\Delta x_{oh}, \Delta y_{oh}, \Delta w_{oh}, \Delta h_{oh}$ as the feature, and for bi-variate distribution we use the mean and variance of all $\Delta x_{oh}, \Delta y_{oh}, \Delta w_{oh}, \Delta h_{oh}$ , plus only co-variance of $(\Delta x_{oh}, \Delta y_{oh})$ and of $(\Delta w_{oh}, \Delta h_{oh})$ as the feature. We concatenate them with semantic features as multiplication is not an option here; (2) we generate random samples from the distribution and then create the spatial map (Row 3 and 4) as introduced in Sec. 3.2. From Table 3e we can see that using spatial map always outperforms directly using parameters as features, which we believe is due to that spatial maps have a much higher dimension ( $2 \times 64 \times 64$ ) than direct parameters (14 or 17) that can learn richer spatial configurations. In addition, the bi-variate distribution generated spatial map outperforms the multi-variate one. + +Increased number of parameters of QPIC. Our design improves over QPIC by adding two novel modules (SFG and QR). To validate that SSRT's performance gain is from its design, rather than from its additional model capacity, we now experiment by increasing the number of parameter in QPIC's FFN to match those our approach (49.8M). Interestingly, QPIC's performance drops from 58.8 mAP to 57.9 mAP when its parameters are increased from 41.1M to 49.8M, likely due to overfitting. This clearly shows that + +![](images/cd3e7d9d99951b9c34b2f7de78538995505ac18d0b63d16d47b890430c200934.jpg) +(a) Hold a tennis racket. Scores: SSRT: 0.856 | QPIC: 0.001. + +![](images/1dee4aa9b013c4bbd33d39bb3dd68bfe8e1a87ce5757757defce7ea6a486707f.jpg) + +![](images/5ae519693e0a0592329c643034fd055f5bcd8a27266039e5c209e4444b142703.jpg) + +QPIC: 0.001. + +![](images/48628e946788ce6a0f6e974a9b8508df3814e999963651ff42ce4e018e724324.jpg) +(c) Talk on the phone. Scores: SSRT: 0.612 | QPIC: none. + +![](images/c5231857f5cb6256747e67a1dae2f7f01372cdd74e442774f008acb2e182fbe4.jpg) +Figure 5. Visualization of the attention. We extract the attention map from the last layer of the decoder. In each sub-figure, from the left to the right are (1) the original image with the ground truth; (2) the attention map of our SSRT, and (3) the attention map of QPIC. + +![](images/64058a1cccb4f15fa3550887ce25da76c275c07d67d554f07a5e939497e28248.jpg) + +![](images/fb2f7950b1f5f984990c4c8d433851f1f4c40eca5012a1ed1fe7c3d274fd82ae.jpg) +(b) Eat a pizza. Scores: SSRT: 0.761 | QPIC: 0.512. + +![](images/d9cef05d953063c53f30b80af58412e2d0303e3881e6521b60974a8b9f711b8d.jpg) + +![](images/675dc41a42f31afe6ab824bf995df180c7a7c1a39deed8b6680c7a4f02d92691.jpg) + +![](images/22c014d9cc1ca66cd745ff4d823ab57034c52e247685efb025f1537110fc8686.jpg) +(d) Cut with knife. Scores: SSRT: 0.757 | QPIC: none. + +![](images/bc1f6b3969e65b26f7d1922060e4e535b1e5ef731fec1987706717a5ad4de3f3.jpg) + +![](images/ee1bdf9db47d80f23136cb35668909ca10ce4024a6771799482347943cb82e2d.jpg) + +SSRT performance (63.7 mAP) comes from our design. + +Different ways of incorporating the information. Finally, we test three different ways of incorporating the semantic/ spatial information: (i) between the backbone and the encoder, (ii) as the input to the decoder, instead of using additional cross-attentions, (iii) to initialize the queries. None of these successfully matched SSRT's performance and didn't even improved over the performance of our QPIC baseline. This shows the importance of using such information properly. Upon analyzing these unsuccessful designs, we found that they were sensitive to the accuracy of the object-action (OA) selection and only when the ground truth OAs were used, their performance was better than QPIC. In contrast, SSRT is more robust to changes in OA selections, likely because it only uses the information as support features through additional cross-attention. + +# 5.3. Qualitative Results + +We show qualitative results of our SSRT and compare it with the baseline (QPIC). Fig. 4 shows results of examples selected from different interaction classes. We find that SSRT improves over QPIC mainly in two categories: (1) increasing the confidence scores of the action predictions (case 1-3); and (2) successfully detecting the person, object and actions that are completely missed (no bounding box output matches with GT) in QPIC (case 4-6). These improvement comes across different scenarios including: (1) small or nearly invisible objects (Sample 1, 4, 5, 6); (2) complex scenes (Sample 2); (3) multiple HOI predictions (Sample 3 and 6). + +To further understand the network behavior, we compare the attention maps from SSRT and QPIC in Fig. 5. Specifically, we extract the visual attention maps of the query that predicts the marked person and object bounding boxes from + +the last layer of the decoder. In Fig. 5a, both QPIC and SSRT can localize the person and the object, but QPIC fails to predict the action with a high confidence while SSRT does. Looking at the attention map we can see the attention from QPIC is on the roughly correct region but very coarse and noisy, while it from SSRT is much more refined and focused on the area of the interaction (the hand). Similarly in Fig. 5b, SSRT achieves higher confidence than QPIC, as the attention is more refined and focused on the interaction area (the mouth and the hand), while QPIC just focuses on the pizza. For images in Fig. 5c and Fig. 5d, QPIC completely misses the prediction while SSRT detects the full correct HOI. We see from the attention map that SSRT is able to attend to the right area while QPIC fails. Overall we see that SSRT has more refined and sharper attention, and is able to focus on small objects in complex scenes. + +# 6. Conclusion + +We proposed SSRT, a one-stage semantic and spatial refined transformer for detecting HOIs. SSRT generates semantic and spatial features based on pre-selected human-object prediction candidates and leverages them to not only enrich the context but also guide the queries to attend to more related predictions. SSRT achieved SOTA performance on both V-COCO and HICO-DET datasets, demonstrating the effectiveness of our solution. + +**Limitation.** Our approach requires fully-supervised HOI annotations for training, which are however extremely expensive to collect. In the future, it is important to explore novel HOI solutions that can learn from limited annotations and with less supervision. + +Licenses. We use the following datasets: V-COCO (CC BY 4.0 license), HICO-DET [1] and code packages: QPIC [2], CLIP [3], GLOVE [4]. + +# References + +[1] http://www-personal.umich.edu/~ywchao/hico/.8 +[2] https://github.com/hitachi-rd-cv/qpic.8 +[3] https://github.com/openai/CLIP.8 +[4] https://github.com/stanfordnlp/GloVe.8 +[5] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European Conference on Computer Vision, pages 213-229. Springer, 2020. 1, 2, 5 +[6] Yu-Wei Chao, Yunfan Liu, Xieyang Liu, Huayi Zeng, and Jia Deng. Learning to detect human-object interactions. In 2018, the winter conference on applications of computer vision (wacv), pages 381-389. IEEE, 2018. 2, 5, 6 +[7] Mingfei Chen, Yue Liao, Si Liu, Zhiyuan Chen, Fei Wang, and Chen Qian. Reformulating hoi detection as adaptive set prediction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9004-9013, 2021. 1, 2, 6 +[8] Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco captions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325, 2015. 6 +[9] Qi Dong, Zhuowen Tu, Haofu Liao, Yuting Zhang, Vijay Mahadevan, and Stefano Soatto. Visual relationship detection using part-and-sum transformers with composite queries. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3550-3559, 2021. 2, 6 +[10] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. 1 +[11] SM Eslami, Nicolas Heess, Theophane Weber, Yuval Tassa, David Szepesvari, Koray Kavukcuoglu, and Geoffrey E Hinton. Attend, infer, repeat: Fast scene understanding with generative models. NeurIPS, 2016. 1 +[12] Hao-Shu Fang, Yichen Xie, Dian Shao, and Cewu Lu. Dirv: Dense interaction region voting for end-to-end human-object interaction detection. In The AAAI Conference on Artificial Intelligence (AAAI), 2021. 1, 6 +[13] Chen Gao, Jiarui Xu, Yuliang Zou, and Jia-Bin Huang. Drg: Dual relation graph for human-object interaction detection. In Proc. European Conference on Computer Vision (ECCV), 2020. 1, 2, 6 +[14] Chen Gao, Yuliang Zou, and Jia-Bin Huang. ican: Instance-centric attention network for human-object interaction detection. In *British Machine Vision Conference*, 2018. 1, 4, 5 +[15] Georgia Gkioxari, Ross Girshick, Piotr Dólar, and Kaiming He. Detecting and recognizing human-object interactions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8359-8367, 2018. 4 +[16] Saurabh Gupta and Jitendra Malik. Visual semantic role labeling. arXiv preprint arXiv:1505.04474, 2015. 2, 5, 6 + +[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. 2, 5 +[18] Tao He, Lianli Gao, Jingkuan Song, and Yuan-Fang Li. Exploiting scene graphs for human-object interaction detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 15984-15993, 2021. 1, 6 +[19] Zhi Hou, Xiaojiang Peng, Yu Qiao, and Dacheng Tao. Visual compositional learning for human-object interaction detection. In European Conference on Computer Vision, pages 584-600. Springer, 2020. 1, 2, 6 +[20] Zhi Hou, Baosheng Yu, Yu Qiao, Xiaojiang Peng, and Dacheng Tao. Affordance transfer learning for human-object interaction detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 495-504, 2021. 2, 6 +[21] Zhi Hou, Baosheng Yu, Yu Qiao, Xiaojiang Peng, and Dacheng Tao. Detecting human-object interaction via fabricated compositional learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14646-14655, 2021. 2, 6 +[22] ASM Iftekhar, Satish Kumar, R Austin McEver, Suya You, and BS Manjunath. Gtnet: Guided transformer network for detecting human-object interactions. arXiv preprint arXiv:2108.00596, 2021. 2, 6 +[23] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V Le, Yunhsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. arXiv preprint arXiv:2102.05918, 2021.4 +[24] Daisheng Jin, Xiao Ma, Chongzhi Zhang, Yizhuo Zhou, Jiashu Tao, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, Zhoujun Li, Xianglong Liu, et al. Towards overcoming false positives in visual relationship detection. arXiv preprint arXiv:2012.12510, 2020. 6 +[25] Bumsoo Kim, Taeho Choi, Jaewoo Kang, and Hyunwoo J Kim. Unionet: Union-level detector towards real-time human-object interaction detection. In European Conference on Computer Vision, pages 498-514. Springer, 2020. 1, 6 +[26] Bumsoo Kim, Junhyun Lee, Jaewoo Kang, Eun-Sol Kim, and Hyunwoo J Kim. Hotr: End-to-end human-object interaction detection with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 74-83, 2021. 1, 2, 6 +[27] Dong-Jin Kim, Xiao Sun, Jinsoo Choi, Stephen Lin, and In So Kweon. Detecting human-object interactions with action co-occurrence priors. In European Conference on Computer Vision, pages 718–736. Springer, 2020. 1, 6 +[28] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83-97, 1955. 5 +[29] Yong-Lu Li, Xinpeng Liu, Han Lu, Shiyi Wang, Junqi Liu, Jiefeng Li, and Cewu Lu. Detailed 2d-3d joint representation for human-object interaction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10166–10175, 2020. 2 + +[30] Yong-Lu Li, Xinpeng Liu, Xiaogian Wu, Yizhuo Li, and Cewu Lu. Hoi analysis: Integrating and decomposing human-object interaction. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 5011-5022. Curran Associates, Inc., 2020. 1, 2, 6 +[31] Yong-Lu Li, Siyuan Zhou, Xijie Huang, Liang Xu, Ze Ma, Hao-Shu Fang, Yanfeng Wang, and Cewu Lu. Transferable interactiveness knowledge for human-object interaction detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3585-3594, 2019. 1, 5 +[32] Yue Liao, Si Liu, Fei Wang, Yanjie Chen, Chen Qian, and Ji-ashi Feng. Ppdm: Parallel point detection and matching for real-time human-object interaction detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 482–490, 2020. 1, 2, 6 +[33] Yang Liu, Qingchao Chen, and Andrew Zisserman. Amplifying key cues for human-object-interaction detection. In European Conference on Computer Vision, pages 248-265. Springer, 2020. 1, 2, 6 +[34] Ye Liu, Junsong Yuan, and Chang Wen Chen. Consnet: Learning consistency graph for zero-shot human-object interaction detection. In Proceedings of the 28th ACM International Conference on Multimedia, pages 4235-4243, 2020. 1, 2 +[35] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. 1 +[36] I Loshchilov and Hutter Frank. Decoupled weight decay regularization. iclr 2019, 2017. 5 +[37] Jeffrey Pennington, Richard Socher, and Christopher D 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. 5, 7 +[38] Khoi Pham, Kushal Kafle, Zhe Lin, Zhihong Ding, Scott Cohen, Quan Tran, and Abhinav Shrivastava. Learning to predict visual attributes in the wild. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13018-13028, 2021. 6 +[39] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Song-Chun Zhu. Learning human-object interactions by graph parsing neural networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 401-417, 2018. 1 +[40] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020, 2021. 4, 5, 6, 7 +[41] 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 +[42] Masato Tamura, Hiroki Ohashi, and Tomoaki Yoshinaga. Qpic: Query-based pairwise human-object interaction detec + +tion with image-wide contextual information. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10410-10419, 2021. 1, 2, 3, 5, 6 +[43] Oytun Ulutan, ASM Iftekhar, and Bangalore S Manjunath. Vsgnet: Spatial attention network for detecting human object interactions using graph convolutions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13617-13626, 2020. 1, 2, 3, 4, 5, 6 +[44] Oytun Ulutan, Swati Rallapalli, Mudhakar Srivatsa, Carlos Torres, and BS Manjunath. Actor conditioned attention maps for video action detection. In The IEEE Winter Conference on Applications of Computer Vision, pages 527-536, 2020. 2 +[45] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 2 +[46] Bo Wan, Desen Zhou, Yongfei Liu, Rongjie Li, and Xuming He. Pose-aware multi-level feature network for human object interaction detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 9469-9478, 2019. 1, 2 +[47] Hai Wang, Wei-shi Zheng, and Ling Yingbiao. Contextual heterogeneous graph network for human-object interaction detection. In European Conference on Computer Vision, pages 248-264. Springer, 2020. 1, 6 +[48] Tiancai Wang, Rao Muhammad Anwer, Muhammad Haris Khan, Fahad Shahbaz Khan, Yanwei Pang, Ling Shao, and Jorma Laaksonen. Deep contextual attention for human-object interaction detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 5694-5702, 2019. 1 +[49] Tiancai Wang, Tong Yang, Martin Danelljan, Fahad Shahbaz Khan, Xiangyu Zhang, and Jian Sun. Learning human-object interaction detection using interaction points. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4116-4125, 2020. 1, 2, 6 +[50] Jianchao Wu, Limin Wang, Li Wang, Jie Guo, and Gangshan Wu. Learning actor relation graphs for group activity recognition. In CVPR, 2019. 1 +[51] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, pages 418-434, 2018. 1 +[52] Bingjie Xu, Yongkang Wong, Junnan Li, Qi Zhao, and Mohan S Kankanhalli. Learning to detect human-object interactions with knowledge. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019. 2, 3 +[53] Dongming Yang, Yuexian Zou, Can Zhang, Meng Cao, and Jie Chen. Rr-net: Injecting interactive semantics in human-object interaction detection. arXiv preprint arXiv:2104.15015, 2021. 1 +[54] Frederic Z Zhang, Dylan Campbell, and Stephen Gould. Spatially conditioned graphs for detecting human-object interactions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13319-13327, 2021. 1 + +[55] Yubo Zhang, Pavel Tokmakov, Martial Hebert, and Cordelia Schmid. A structured model for action detection. In CVPR, 2019. 1 +[56] Xubin Zhong, Changxing Ding, Xian Qu, and Dacheng Tao. Polysemy deciphering network for human-object interaction detection. In Proc. Eur. Conf. Comput. Vis, 2020. 1, 6 +[57] Xubin Zhong, Xian Qu, Changxing Ding, and Dacheng Tao. Glance and gaze: Inferring action-aware points for one-stage human-object interaction detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13234-13243, 2021. 2, 6 +[58] Cheng Zou, Bohan Wang, Yue Hu, Junqi Liu, Qian Wu, Yu Zhao, Boxun Li, Chenguang Zhang, Chi Zhang, Yichen Wei, et al. End-to-end human object interaction detection with hoi transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11825-11834, 2021. 1, 2, 6 \ No newline at end of file diff --git a/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/images.zip b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9a5fbde95f4ebe2354d911825b64807dbfbd3d0d --- /dev/null +++ b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54eaaeeefaeeef7d5069c7b90149dd71e57ecd4d8d0447f047ddfb3e07e19537 +size 484142 diff --git a/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/layout.json b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7e5d99b3c3ad1fb13aa0529e90e30d07fc386946 --- /dev/null +++ b/whattolookatandwheresemanticandspatialrefinedtransformerfordetectinghumanobjectinteractions/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa152589f67fd06eb3de9918e0977fa3012b32a0968211a1fae02067ae712604 +size 435002 diff --git a/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_content_list.json b/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..de62c244e34d027fb8b1d82348a14b550cb9b661 --- /dev/null +++ b/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff35680515c2bae75da504f9c98a8e7562a75231d9463c52fccd711657b3cd75 +size 75592 diff --git a/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_model.json b/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a2494b24e94e1324f2219c32f284bad5d059eccc --- /dev/null +++ b/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a55159d6a283a08757dd7f0facdd7e435f3fca74d271ee8e8f793426580fdc91 +size 95869 diff --git a/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_origin.pdf b/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9a42c58522e0edc7fe84cd0d15ffc88b6f995dd2 --- /dev/null +++ b/whendoescontrastivevisualrepresentationlearningwork/360865e2-a44e-4725-8b12-368bd6a97eb2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ff87898b53e1b4fe9f98667b4bc0f8e803ab749e570472e63a49dfe8e26281d +size 2730019 diff --git a/whendoescontrastivevisualrepresentationlearningwork/full.md b/whendoescontrastivevisualrepresentationlearningwork/full.md new file mode 100644 index 0000000000000000000000000000000000000000..37d1df746bb593ebdb23909cf1c8feb834c0f1b9 --- /dev/null +++ b/whendoescontrastivevisualrepresentationlearningwork/full.md @@ -0,0 +1,266 @@ +# When Does Contrastive Visual Representation Learning Work? + +Elijah Cole1 Xuan Yang2 Kimberly Wilber2 Oisin Mac Aodha3,4 Serge Belongie5 + +$^{1}$ Caltech $^{2}$ Google $^{3}$ University of Edinburgh $^{4}$ Alan Turing Institute $^{5}$ University of Copenhagen + +# Abstract + +Recent self-supervised representation learning techniques have largely closed the gap between supervised and unsupervised learning on ImageNet classification. While the particulars of pretraining on ImageNet are now relatively well understood, the field still lacks widely accepted best practices for replicating this success on other datasets. As a first step in this direction, we study contrastive self-supervised learning on four diverse large-scale datasets. By looking through the lenses of data quantity, data domain, data quality, and task granularity, we provide new insights into the necessary conditions for successful self-supervised learning. Our key findings include observations such as: (i) the benefit of additional pretraining data beyond 500k images is modest, (ii) adding pretraining images from another domain does not lead to more general representations, (iii) corrupted pretraining images have a disparate impact on supervised and self-supervised pretraining, and (iv) contrastive learning lags far behind supervised learning on fine-grained visual classification tasks. + +# 1. Introduction + +Self-supervised learning (SSL) techniques can now produce visual representations which are competitive with representations generated by fully supervised networks for many downstream tasks [18]. This is an important milestone for computer vision, as removing the need for large amounts of labels at training time has the potential to scale up our ability to address challenges in domains where supervision is currently too difficult or costly to obtain. However, with some limited exceptions, the vast majority of current state-of-the-art approaches are developed and evaluated on standard datasets like ImageNet [40]. As a result, we do not have a good understanding of how well these methods work when they are applied to other datasets. + +Under what conditions do self-supervised contrastive representation learning methods produce "good" visual representations? This is an important question for computer vision researchers because it adds to our understanding of SSL and highlights opportunities for new methods. This is + +![](images/67e185e006afec77463391990c4b356a03d3497a354f97140bdf8c69debd0cdd.jpg) +Figure 1. What conditions are necessary for successful self-supervised pretraining on domains beyond ImageNet? We investigate the impact of self-supervised and supervised training dataset size, the downstream domain, image quality, and the granularity of downstream classification tasks. + +also an important question for domain experts with limited resources who might be interested in applying SSL to real-world problems. With these objectives in mind, we attempt to answer the following questions: + +(i) What is the impact of data quantity? How many unlabeled images do we need for pretraining, and when is it worthwhile to get more? How much labeled data do we need for linear classifier training or end-to-end fine-tuning on a downstream task? In which regimes do self-supervised features rival those learned from full supervision? +(ii) What is the impact of the pretraining domain? How well do self-supervised representations trained on one domain transfer to another? Can we learn more general representations by combining datasets? Do different pretraining datasets lead to complementary representations? +(iii) What is the impact of data quality? How robust are self-supervised methods to training time image corruption such as reduced resolution, compression artifacts, or noise? Does pretraining on corrupted images lead to poor downstream performance on uncorrupted images? +(iv) What is the impact of task granularity? Does SSL + +result in features that are only effective for "easy" classification tasks, or are they also useful for more challenging, "fine-grained" visual concepts? + +We address the above questions through extensive quantitative evaluation across four diverse large-scale visual datasets (see Figure 1). We make several interesting observations and recommendations including: + +- For an ImageNet-scale dataset, decreasing the amount of unlabeled training data by half (from 1M to 500k images) only degrades downstream classification performance by $1 - 2\%$ (Figure 2). In many contexts this trade-off is reasonable, allowing for faster and cheaper pretraining. This also indicates that current self-supervised methods coupled with standard architectures may be unable to take advantage of very large pretraining sets. +- Self-supervised representations that are learned from images from the same domain as the test domain are much more effective than those learned from different domains (Table 1). Self-supervised training on our current datasets may not be sufficient to learn representations that readily generalize to many contexts. +- Neither (i) combining datasets before pretraining (Table 2) nor (ii) combining self-supervised features learned from different datasets (Table 3) leads to significant performance improvements. More work may be required before self-supervised techniques can learn highly generalizable representations from large and diverse datasets. +- Pretraining on corrupted images affects supervised and self-supervised learning very differently (Figure 4). For instance, self-supervised representations are surprisingly sensitive to image resolution. +- Current self-supervised methods learn representations that can easily disambiguate coarse-grained visual concepts like those in ImageNet. However, as the granularity of the concepts becomes finer, self-supervised performance lags further behind supervised baselines (Figure 5). The contrastive loss may lead to coarse-grained features which are insufficient for fine-grained tasks. + +# 2. Related Work + +SSL for visual representations. Early self-supervised representation learning methods typically centered around solving hand-designed "pretext tasks" like patch location prediction [16], rotation prediction [20], inpainting [37], cross-channel reconstruction [59], sorting sequences of video frames [33], solving jigsaw puzzles [35], or colorization [58]. However, more recent work has explored contrastive learning-based approaches where the pretext task is to distinguish matching and non-matching pairs of augmented input images [28, 36, 48]. The prototypical example is SimCLR [8, 9], which is trained to identify the matching image using a cross-entropy loss. Other variations on the contrastive SSL framework include using a + +momentum encoder to provide large numbers of negative pairs (MoCo) [11, 25], adaptively scaling the margin in MoCo (EqCo) [62], and contrasting clustering assignments instead of augmented pairs (SwAV) [6]. Moving beyond the contrastive loss entirely, some papers recast the problem in a "learning-to-rank" framework (S2R2) [52], use simple feature prediction (SimSiam) [12], or predict the output of an exponential moving average network (BYOL) [24]. [4] investigates the role of negatives in contrastive learning, though we note that BYOL and SimSiam avoid using negatives explicitly. In this work, our focus is on self-supervised visual classification. We do not explore alternative settings such as supervised contrastive learning [31], contrastive learning in non-vision areas like language [39] or audio [41], or other methods that aim to reduce the annotation burden for representation learning such as large-scale weak supervision [34]. + +SSL beyond ImageNet. ImageNet classification has long been viewed as the gold standard benchmark task for SSL, and the gap between supervised and self-supervised performance on ImageNet has steadily closed over the last few years [6,8,24,25]. There is now a growing expectation that SSL should reduce our dependence on manual supervision in challenging and diverse domains which may not resemble the traditional object classification setting represented by ImageNet. A number of papers have studied how well self-supervised representations pretrained on ImageNet perform on downstream tasks like fine-grained species classification [56], semantic segmentation [5], scene understanding [24], and instance segmentation [25]. + +More recently, researchers have begun to study the effectiveness of contrastive learning when pretraining on datasets other than ImageNet. In the case of remote sensing, the unique properties of the data have motivated the development of domain-specific contrastive learning techniques [2,30]. In the medical domain, where images tend to be very dissimilar to ImageNet, it has been shown that contrastive pretraining on domain-specific images leads to significant gains compared to pretraining on ImageNet [9,43]. [32] compared the representations learned from five different datasets, and showed that in most cases the best performing representations came from pretraining on similar datasets to the downstream task. In the case of fine-grained data, [51] found that contrastive pretraining on images of animals and plants did not lead to superior performance on downstream bird classification compared to pretraining on ImageNet. These apparently conflicting observations may be explained by the relationship between the pretraining and downstream data distributions, which we investigate in our experiments. [60] and [50] pretrained on several different datasets and showed that there was surprisingly little impact on downstream detection and segmentation performance, unless synthetic data was used for pretraining [60]. + +[47] pretrained on very large datasets (JFT-300M [44] and YFCC100M [46]), but did not observe an improvement over ImageNet pretraining in the standard regime. + +We build on the above analysis by performing controlled, like-for-like, comparisons of SSL on several large datasets. This allows us to separate dataset-specific factors from general patterns in SSL performance, and deliver new insights into the necessary conditions for successful pretraining. + +Analysis of SSL. A number of works have explored questions related to the conditions under which SSL is successful. [42] showed that self-supervised representations generalize better than supervised ones when the downstream concepts of interest are less semantically similar to the pretraining set. [18] showed that contrastive pretraining on ImageNet performs well on downstream tasks related to object recognition in natural images, while leaving more general study of pretraining in different domains to future work. While these works show that SSL on ImageNet can be effective, our experiments demonstrate that current SSL methods can perform much worse than supervised baselines on non-ImageNet domains, e.g. fine-grained classification. + +Existing work has also investigated other aspects of SSL, e.g. [38] examined the invariances learned, [10] showed that easily learned features can inhibit the learning of more discriminative ones, [8, 50, 60] explored the impact of different image augmentations, [10, 50] compared representations from single vs. multi-object images, and [8, 23] varied the backbone model capacity. Most relevant to our work are studies that vary the amount of data in the pretraining dataset, e.g. [32, 50, 57, 60]. We extend this analysis by presenting a more detailed evaluation of the impact of the size of the unlabeled and labeled datasets, and investigate the role of data quality, data domain, and task granularity. + +# 3. Methods + +Datasets. We perform experiments on four complementary large-scale datasets: ImageNet [15], iNat21 [50], Places365 [61], and GLC20 [13]. Collectively, these datasets span many important visual properties, including: curated vs. "in-the-wild" images, fine- vs. coarse-grained categories, and object-centric images vs. scenes. Each dataset has at least one million images, which allows us to make fair comparisons against the traditional ImageNet setting. ImageNet (1.3M images, 1k classes) and Places365 (1.8M images, 365 classes) are standard computer vision datasets, so we will not describe them in detail. For ImageNet, we use the classic ILSVRC2012 subset of the full ImageNet-21k dataset. For Places365, we use the official variant "Places365-Standard (small images)" where all images have been resized to $256 \times 256$ . iNat21 (2.7M images, 10k classes) contains images of plant and animal species and GLC20 (1M images, 16 classes) consists of remote sensing images. As both are recent datasets, we discuss + +them in the supplementary material. + +Fixed-size subsets. For some experiments we control for dataset size by creating subsampled versions of each dataset with sizes: 1M, 500k, 250k, 125k, and 50k images. We carry out this selection only once, and the images are chosen uniformly at random. We refer to these datasets using the name of the parent dataset followed by the number of images in parentheses, e.g. ImageNet (500k). Note that subsets of increasing size are nested, so e.g. ImageNet (500k) includes all of the images in ImageNet (250k). These subsets are also static across experiments, e.g. ImageNet (500k) always refers to the same set of 500k images. With the exception of Figures 2 and 3, we use the full dataset for any type of supervised training (i.e. linear evaluation, fine tuning, or supervised training from scratch). We always report results on the same test set for a given dataset, regardless of the training subset used. + +Training details. All experiments in this paper are based on a ResNet-50 [26] backbone, which is standard in the contrastive learning literature [6, 8, 25]. We primarily perform experiments on SimCLR [8], a simple and popular contrastive learning method that contains all the building blocks for state-of-the-art self-supervised algorithms. We follow the standard protocol of first training with self-supervision alone and then evaluating the learned features using linear classifiers or end-to-end fine-tuning. Unless otherwise specified, we use hyperparameter settings based on [8] for all methods and datasets. While this may not lead to maximal performance, it is likely to be representative of how these methods are used in practice - due to the high computational cost of contrastive pretraining, extensive hyperparameter tuning is not feasible for most users. We also consider MoCo [25] and BYOL [24] in Figure 3. Full training details are provided in the supplementary material. + +# 4. Experiments + +We now describe our experiments in which we investigate the impact of data quantity, data domain, data quality, and task granularity on the success of contrastive learning. + +# 4.1. Data quantity + +First we consider the question of how much data is required to learn a "good" representation using SSL. There are two important notions of data quantity: (i) the number of unlabeled images used for pretraining and (ii) the number of labeled images used to subsequently train a classifier. Since labels are expensive, we would like to learn representations that generalize well with as few labeled images as possible. While unlabeled images are cheap to acquire, they still incur a cost because pretraining time is proportional to the size of the pretraining set. To understand when SSL is cost-effective, we need to understand how performance depends on these two notions of data quantity. + +To study this question, we pretrain SimCLR using different numbers of unlabeled images. Each pretrained representation is then evaluated using different numbers of labeled images. In Figure 2 we present these results for iNat21 (left column), ImageNet (center column), and Places365 (right column). We also include results for supervised training from scratch (in black). We show linear evaluation results in the top row and corresponding fine-tuned results in the bottom row. Each curve in a figure corresponds to a different pretrained representation. The points along a curve correspond to different amounts of supervision used to train a linear classifier or fine-tune the network. + +There is little benefit beyond 500k pretraining images. The gap between the 500k (blue) and 1M (orange) pretraining image curves is typically less than $1 - 2\%$ in top-1 accuracy. This means that for a dataset with one million images, we can trade a small decrease in accuracy for a $50\%$ decrease in pretraining time. If a $2 - 4\%$ top-1 accuracy drop is acceptable, then the pretraining set size can be reduced by a factor of four (from 1M to 250k). However, the difference between 50k (pink) pretraining images and 250k (green) pretraining images is substantial for each dataset, often in excess of $10\%$ top-1 accuracy. We conclude that SimCLR seems to saturate well before we get to ImageNet-sized pretraining sets. This is consistent with observations from the supervised learning literature, though more images are required to reach saturation [34]. + +Self-supervised pretraining can be a good initializer when there is limited supervision available. In the bottom row of Figure 2 we see that when only $10\mathrm{k}$ or $50\mathrm{k}$ labeled images are available, fine-tuning a SimCLR representation is significantly better than training from scratch. When supervision is plentiful, fine-tuned SimCLR representations achieve performance similar to supervised training from scratch. It is interesting to compare this to findings from the supervised setting which suggest that networks which are initially trained on distorted (i.e. augmented) images are unable to recover when subsequently trained with undistorted ones [1]. + +Self-supervised representations can approach fully supervised performance for some datasets, but only by using lots of labeled images. The ultimate goal of SSL is to match supervised performance without the need for large amounts of labeled data. Suppose we consider the rightmost point on the black curves in Figure 2 as a proxy for "good" supervised performance. Then in both the linear and fine-tuned cases, the gap between SimCLR (pretrained on 1M images) and "good" supervised performance is quite large unless well over 100k labeled images are used. For instance, the gap between "good" supervised performance and a classifier trained using 50k labeled images on top of SimCLR (1M) is around $11\%$ ( $11\%$ ) for Places365, $23\%$ ( $21\%$ ) for ImageNet, and $58\%$ ( $56\%$ ) for iNat21 in the lin + +ear (and fine-tuned) case. Although SSL works well when lots of supervision is available, further innovation is needed to improve the utility of self-supervised representations in the low-to-moderate supervision regime. + +iNat21 is a valuable SSL benchmark. Figure 2 shows a surprisingly large gap ( $\sim 30\%$ ) between supervised and self-supervised performance on iNat21 in the high supervision regime. In Figure 3 we see that other SSL methods exhibit similar limitations. The newer BYOL outperforms MoCo and SimCLR, but a considerable gap ( $\sim 25\%$ ) remains. The high supervised performance shows that the task is possible, yet the self-supervised performance remains low. It seems that iNat21 reveals challenges for SSL that are not apparent in ImageNet, and we believe it is a valuable benchmark for future SSL research. + +# 4.2. Data domain + +In the previous section we observed that increasing the pretraining set size yields rapidly diminishing returns. In this section we consider a different design choice: what kind of images should we use for pretraining? Since most contrastive learning papers only pretrain on ImageNet, this question has not received much attention. We take an initial step towards an answer by studying the properties of SimCLR representations derived from four pretraining sets drawn from different domains. + +We train SimCLR on iNat21 (1M), ImageNet (1M), Places365 (1M), and GLC20 (1M). By holding the pretraining set size constant, we aim to isolate the impact of the different visual domains. We present in-domain and cross-domain linear evaluation results for each representation in Table 1. In Table 2 we consider the effect of pretraining on pooled datasets, i.e. new image collections built by shuffling together existing datasets. Finally, in Table 3 we study different fused representations, which are formed by concatenating the outputs of different feature extractors. + +Pretraining domain matters. In Table 1 we see that in-domain pretraining (diagonal entries) consistently beats cross-domain pretraining (off-diagonal entries). The gap can be surprisingly large, e.g. in-domain pretraining provides a $12\%$ boost on iNat21 compared to the best cross-domain pretraining (ImageNet). One might have expected that a visually diverse dataset like ImageNet would lead to a better self-supervised representation than a more homogeneous dataset like GLC20 (even when evaluating on GLC20) but this is not what we observe. + +The off-diagonal entries of Table 1 show that training SimCLR on ImageNet leads to the best cross-domain performance, while GLC20 leads to the worst cross-domain performance. Since the pretraining protocols and dataset sizes are held constant, we suggest that the characteristics of the image sets themselves are responsible for the differences we observe. The strong cross-domain performance of + +![](images/033a351e04467df85fad975d0c698c8ba46e4b2db3d6c00b4ce360970217b43a.jpg) + +![](images/96de0e2fd3a3cdc6ef58d1a4ab28c5212565d424eb0b218e7d66e410db818ac2.jpg) +(a) Linear Evaluation + +![](images/f1b8064630bbc6fd0de60381b5abe416968a3f02dd956e03e07a8e87a11fe32c.jpg) + +![](images/ca1f3af5f37337ad36f5100b76a282312f29c90396677527041b85b41f35b0fa.jpg) +Figure 2. How much data does SimCLR need? Linear evaluation results (top row) and fine-tuning results (bottom row) as a function of the number of unlabeled images used for pretraining and the number of labeled images used for downstream supervised training. The "Supervised" curve (black) corresponds to training from scratch on different numbers of labeled images. It is the same for the top and bottom plots in each column. Most SSL papers focus on the "high data" regime, using $\sim 10^6$ images (e.g. all of ImageNet) for both pretraining and classifier supervision, but there are significant opportunities for improvement in the "low-data" regime. Even with $10^6$ labeled images for linear classifier training, SimCLR performs far worse than supervised learning on iNat21, suggesting that iNat21 could be a more useful SSL benchmark than ImageNet in future. + +![](images/7dedc2b803b8a5a705d0551c065a70fce82d188e6387cabf68f20ecd52be90de.jpg) +(b) Fine-Tuning + +![](images/660b000200e42097a71c83d1190e0d25aaca336aeb8200d171954b162fe9b1e2.jpg) + +![](images/88784b339088cc57cd915bb3f0022e97fd9a0a138e97aaf27066b069c11cf23a.jpg) +Figure 3. How does SimCLR compare to other self-supervised methods? Linear evaluation results on iNat21 for SimCLR, MoCo, and BYOL. All methods are pretrained on 1M images for 1000 epochs and follow the same linear evaluation protocol. The more recent BYOL performs better than the others, but a large gap remains to supervised performance. + +SimCLR pretrained on ImageNet may be due to semantic similarity – perhaps it is better to pretrain on a dataset that is semantically similar to the downstream task, even in a self-supervised context. This makes sense because there are classes in ImageNet that are similar to classes in iNat21 (animals) and Places365 (scenes). This also explains the weak performance of GLC20, since remote sensing imagery is + +
PretrainingiNat21ImageNetPlaces365GLC20
iNat21 (1M) SimCLR0.4930.5190.4160.707
ImageNet (1M) SimCLR0.3730.6440.4860.716
Places365 (1M) SimCLR0.2920.4910.5010.693
GLC20 (1M) SimCLR0.1870.3720.3290.769
Supervised (All Images)0.7910.7410.5390.826
+ +Table 1. Does pretraining domain matter? Linear evaluation results for representations derived from different million-image datasets. We train the linear classifiers using the full training sets. The results in the "Supervised" row correspond to supervised training from scratch on the full training set. We report MAP for GLC20 and top-1 accuracy for other datasets. In all cases, indomain pretraining outperforms cross-domain pretraining. In each column we highlight the best and second-best results. + +not similar to the other datasets. + +Adding cross-domain pretraining data does not necessarily lead to more general representations. We have seen that pretraining on different domains leads to representations with significantly differing capabilities. This leads to a natural question: what happens if we combine our datasets and then learn a representation? + +Table 2 gives linear evaluation results for SimCLR pretrained on different "pooled" datasets. In each row, $n$ images from dataset $A$ and $m$ images from dataset $B$ are shuffled together to produce a pretraining set of size $n + m$ . For instance, the pretraining dataset in the first row of Table 2 + +
PretrainingEvaluation
iNat21ImageNetPlaces365GLC20iNat21ImageNetPlaces365
250k250k--0.4440.5970.467
-250k250k-0.3340.5960.490
250k-250k-0.4280.5310.483
250k250k250k250k0.4100.5740.482
In-Domain (250k)0.4510.6080.485
In-Domain (500k)0.4770.6290.499
In-Domain (1M)0.4930.6440.501
+ +consists of 250k iNat21 images and 250k ImageNet images shuffled together. + +If we compare the "In-Domain (500k)" row against the (equally sized) pooled datasets in the first three rows of Table 2, we see that the in-domain pretraining on 500k images is always better. Similarly, the "In-Domain (1M)" row beats the 1M-image pooled dataset (consisting of 250k images from the four datasets). The more diverse pooled pretraining sets always lead to worse performance compared to the more homogeneous pretraining sets of the same size. + +Table 2 also allows us to say whether it is worthwhile to add pretraining data from a different domain (as opposed to swapping out some in-domain data for some data from a different domain, as we have been discussing so far). The "In-Domain $(250\mathrm{k})$ row is better than the 1M-image pooled dataset and almost all of the $500\mathrm{k}$ -image pooled datasets. It seems that adding pretraining data from a different domain typically hurts performance. In contrast, Figure 2 shows that increasing the amount of in-domain pretraining data consistently improves performance. + +We hypothesize that the reason for this lackluster performance is that diverse images are easier to tell apart, which makes the contrastive pretext task easier. If the contrastive task is too easy, the quality of the representation suffers [4, 10]. While more investigation is needed, the fact that increasing pretraining data diversity can hurt performance suggests a "diversity-difficulty trade-off" that should be considered when creating pretraining sets for SSL. + +Self-supervised representations can be largely redundant. From Table 1 it is clear that pretraining on different datasets leads to representations that differ significantly. For instance, iNat21 SimCLR beats ImageNet SimCLR on iNat21 (+12.4%) and ImageNet SimCLR beats iNat21 SimCLR on ImageNet (+12.7%). Do these representations learn complementary information, or do they just capture the same information to different degrees? + +Table 2. The effect of dataset pooling. Linear evaluation results for self-supervised representations derived from pooled datasets, where two or more datasets are shuffled together. We train the linear classifiers using the full training sets. The "In-Domain" results correspond to pretraining on subsets of the dataset named at the top of the column. Pooling datasets increase pretraining set size and diversity, but we find that performance decreases relative to comparable in-domain pretraining. The "In-Domain (1M)" row corresponds to the diagonal entries of Table 1. + +
ImageNetiNat21Dim.ImageNetiNat21
SimCLR-20480.6470.380
-SimCLR20480.5200.506
Sup.-20480.7110.434
-Sup.20480.4900.769
Sup.Sup.40960.7120.772
SimCLRSimCLR40960.6410.520
SimCLR & Sup.-40960.7200.472
-SimCLR & Sup.40960.5270.772
SimCLRSup.40960.6050.769
Sup.SimCLR40960.7170.553
+ +Table 3. The effect of representation fusion. Linear evaluation results for different combinations of supervised and self-supervised representations on ImageNet and iNat21. We train the linear classifiers using the full training sets. For comparability, the in-domain supervised results in this table (ImageNet Sup. evaluated on ImageNet and iNat21 Sup. evaluated on iNat21) are for linear classifiers trained on representations learned from full supervision. "Dim." is the representation dimensionality. In each column we highlight the best and second-best results. + +To probe this question we concatenate features from different pretrained networks and carry out linear evaluation on these "fused" representations. In Table 3 we present linear evaluation results for fused representations on ImageNet and iNat21. Combining ImageNet SimCLR and iNat21 SimCLR is worse than ImageNet SimCLR alone on ImageNet $(-0.6\%)$ , but better than iNat21 SimCLR alone on iNat21 $(+1.4\%)$ . These effects are small relative to the $>12\%$ difference between ImageNet SimCLR and iNat21 SimCLR. This suggests that the two self-supervised representations are largely redundant. + +There is a larger effect when combining supervised and self-supervised representations. For iNat21, adding ImageNet Sup. (i.e. supervised ImageNet features) on top of iNat21 SimCLR improves performance significantly $(+4.7\%)$ . However, adding iNat21 Sup. on top of ImageNet SimCLR actually decreases performance $(-4.2\%)$ . These results are consistent with the hypothesis that dataset semantics are important even for SSL. Since ImageNet is semantically broader than iNat21 (ImageNet has animal classes, but also many other things), features learned from ImageNet (supervised or self-supervised) should be more helpful for iNat21 than vice-versa. + +# 4.3. Data quality + +We have seen that the characteristics of the pretraining data can have a significant impact on the quality of self-supervised representations. In this section we dig deeper into this question by studying the impact of pretraining on artificially degraded images. This serves two purposes. First, this is a practical question since there are many settings where image quality issues are pervasive e.g. medical imaging [45] or camera trap data [3]. Second, it can help us understand the robustness properties of SSL. + +To create a corrupted dataset we apply a particular image + +![](images/7b9c611cb632c2960be739b2cebf6f4c6a893a6e29a3f1772d90a3917891c3c0.jpg) +Figure 4. What is the effect of pretraining image corruption? + +Decrease in linear evaluation accuracy on ImageNet due to pretraining on corrupted versions of the ImageNet training set. The zero point corresponds to pretraining (supervised or SimCLR) on uncorrupted images followed by linear evaluation. "Supervised" and "SimCLR" have different zero points. All linear classifiers are trained using the full uncorrupted ImageNet training set. + +corruption to each image in the dataset. This is a one-time offline preprocessing step, so corruptions that have a random component are realized only once per image. Given a corrupted dataset we then pretrain as normal. During linear evaluation, we use the original clean images for training and testing, i.e. the corrupted images are only used for pretraining. + +In Figure 4 we present linear evaluation results on ImageNet for a simple but diverse set of corruptions. The zero point corresponds to pretraining on uncorrupted images, and we measure how much performance drops when pretraining on corrupted images. The "Salt and Pepper" corruption is salt and pepper noise applied independently to each pixel, in each channel, with probability 0.01. The "JPEG" corruption is JPEG compression with a very low quality level of 10. For "Resize", we resize each image so that the short side is 256 pixels while preserving the aspect ratio. This reduces the resolution of the crops used for training. For our downsampling corruptions, we follow the resize operation with downsampling by $2\mathrm{x}$ or $4\mathrm{x}$ and then upsampling by the same factor. This holds constant the image size and the fraction of the image occupied by each object, but reduces resolution. Implementation details and examples can be found in the supplementary. + +Image resolution is critical for SSL. "Downsample (2x)" and "Downsample (4x)" are by far the most damaging corruptions for SimCLR, reducing accuracy by around $15\%$ and $34\%$ , respectively. Since SimCLR already involves extreme cropping, we might expect more robustness to changes in image resolution. This finding could be partially explained by the difficulty of generalizing to higher-resolution images during linear classifier training [49]. However, supervised pretraining faces the same challenge but the effect of downsampling is much less dramatic. This + +suggests that the performance drop is due to deficiencies in the features learned by SimCLR. + +SSL is relatively robust to high-frequency noise. "JPEG" and "Salt & Pepper" both add high-frequency noise to the image. For SimCLR, these corruptions have a much milder impact than the downsampling corruptions. One possible explanation is that downsampling destroys texture information, which is known to be a particularly important signal for convolutional neural networks [19, 29]. For supervised pretraining the ranking of corruptions is very different, with "JPEG" landing between 2x and 4x downsampling. + +# 4.4. Task granularity + +We have seen that the properties of pretraining datasets are important for determining the utility of self-supervised representations. But are there downstream tasks for which self-supervised representations are particularly well or poorly suited? We consider fine-grained classification and show that classification performance depends on task granularity, i.e. how fine or coarse the labels are. While there are formal methods for measuring dataset granularity [14], we claim by intuition that iNat21 is more fine-grained than ImageNet, which is more fine-grained than Places365. + +In Figure 5 we use label hierarchies (which are available for ImageNet, iNat21, and Places365) to explicitly study how performance depends on label granularity. We treat "distance from the root of the hierarchy" as a proxy for granularity, so labels further from the root are considered to be more fine-grained. We perform (i) linear classifier training (for SimCLR) and (ii) end-to-end training from scratch (for "Supervised") using the labels at the finest level of the taxonomy and re-compute accuracy values as we progressively coarsen the predictions and labels. We do not re-train at each level of granularity. A complete description of this process can be found in the supplementary materials. + +The performance gap between SSL and supervised learning grows as task granularity becomes finer. We start with the iNat21 results in Figure 5. The supervised and SimCLR pretrained models perform similarly at the coarsest levels of the label hierarchy ("Kingdom"). Both models perform worse as task granularity increases, but the SimCLR model degrades much more rapidly ("Species"). This suggests that SimCLR may fail to capture fine-grained semantic information as effectively as supervised pretraining. We also observe a growing supervised/self-supervised gap for ImageNet and Places365. The magnitude of this gap seems to track dataset granularity, since iNat21 (most fine-grained) has the largest gap and Places365 (least fine-grained) has the smallest gap. The fact that supervised learning achieves high performance on iNat21 while SSL lags behind suggests that iNat21 could be a valuable benchmark dataset for the next phase of SSL research. + +Are the augmentations destructive? State-of-the-art con + +![](images/f49133acf1b65324236ee6335f99316777629d6f819ab9cc426fc45c3d4577c2.jpg) +Figure 5. How does performance depend on label granularity? Linear evaluation at different levels of label granularity for iNat21, ImageNet, and Places365. Each plot compares supervised learning from scratch against a linear classifier trained on top of in-domain SimCLR. Both are trained using the full training sets. We plot top-1 accuracy against label granularity, which is more fine-grained as we move from left to right. The numbers on the $x$ -axis are the class counts at a given level of the label hierarchy. We do not re-train at coarser granularity levels, we just change the evaluation label set. The definitions of the hierarchy levels are given in the supplementary material. + +![](images/2cfaa767e5f032ac953e4102c585bde211eafbd6f6a0fba01cf7c4034b08d365.jpg) + +![](images/d19777468437ab9d490a0ce18d12a2521b813afc03a59a5ec85aaab308fc61d6.jpg) + +trastive learning techniques are designed for ImageNet, so the default augmentation policy may be poorly tuned for other datasets [56]. For instance, if color is a key fine-grained feature for species classification then the "color jitter" augmentation used by SimCLR may destroy important information for iNat21 classification. Could this explain the rapid drop in performance exhibited by iNat21 SimCLR for fine-grained classes? Notice that there is a similar, though less extreme, fine-grained performance drop for ImageNet SimCLR in Figure 5. Since the ImageNet-tuned augmentations are presumably not destructive for ImageNet, it does not seem likely that this fully explain our observations. + +Does contrastive learning have a coarse-grained bias? We hypothesize that the contrastive loss tends to cluster images based on overall visual similarity. The intuition is that fine-grained features are often subtle, and subtle features are unlikely to be very useful for distinguishing between pairs of images in the contrastive pretext task. If our hypothesis is correct then the boundaries between different clusters would not be well-aligned with the boundaries between fine-grained classes. This effect could be overlooked when evaluating on coarse-grained classes, but would become apparent on a more fine-grained task. Additional analysis is required to fully understand this "granularity gap" in SSL, which we leave to future work. + +# 5. Conclusion + +We have presented a comprehensive set of experiments to address several aspects of the question: when does contrastive visual representation learning work? In Section 4.1 we found that we need fewer than $500\mathrm{k}$ pretraining images before encountering severe diminishing returns. However, even the best self-supervised representations are still much worse than peak supervised performance without hundreds of thousands of labeled images for classifier training. In Section 4.2 we found that self-supervised pretraining on 1M images from different domains results in representations + +with very different capabilities, and that simple methods for combining different datasets do not lead to large gains. In Section 4.3 we showed that image resolution is critical for contrastive learning and, more broadly, that some image corruptions can degrade a self-supervised representation to the point of unusability while others have almost no impact. Finally, in Section 4.4 we found that supervised pretraining retains a substantial edge when it comes to fine-grained classification. These experiments highlight several areas where further research is needed to improve current SSL algorithms, most of which were not evident from traditional evaluation protocols, i.e. top-1 accuracy on ImageNet. + +Limitations. We mainly perform experiments using one self-supervised method. We focus on SimCLR because it reflects the essence of state-of-the-art contrastive learning methods without introducing additional architectural complexities. While our MoCo and BYOL experiments are not much different from SimCLR, it is important to validate our results on other self-supervised methods. It would also be interesting to explore alternative backbone architectures [7, 17], though after controlling for training settings, ResNet-50 remains competitive with newer architectures [54, 55]. We study only classification tasks, so additional work is also required to understand how these results translate to segmentation [53] or detection [27, 63]. Finally, we only consider datasets up to roughly ImageNet scale. We believe this is the most practical setting for most use cases, but it is possible that some patterns may be different for significantly larger datasets and models [21, 22]. + +Acknowledgements. We thank Mason McGill for detailed feedback, and Grant Van Horn, Christine Kaeser-Chen, Yin Cui, Sergey Ioffe, Pietro Perona, and the rest of the Perona Lab for insightful discussions. This work was supported by the Caltech Resnick Sustainability Institute, an NSF Graduate Research Fellowship (grant number DGE1745301), and the Pioneer Centre for AI (DNRF grant number P1). + +# References + +[1] Alessandro Achille, Matteo Rovere, and Stefano Soatto. Critical learning periods in deep neural networks. In ICLR, 2019. 4 +[2] Kumar Ayush, Burak Uzkent, Chenlin Meng, Kumar Tanmay, Marshall Burke, David Lobell, and Stefano Ermon. Geography-aware self-supervised learning. In ICCV, 2021. 2 +[3] Sara Beery, Grant Van Horn, and Pietro Perona. Recognition in terra incognita. In ECCV, 2018. 6 +[4] Tiffany Tianhui Cai, Jonathan Frankle, David J Schwab, and Ari S Morcos. Are all negatives created equal in contrastive instance discrimination? arXiv:2010.06682, 2020. 2, 6 +[5] Yue Cao, Zhenda Xie, Bin Liu, Yutong Lin, Zheng Zhang, and Han Hu. Parametric instance classification for unsupervised visual feature learning. In NeurIPS, 2020. 2 +[6] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In NeurIPS, 2020. 2, 3 +[7] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In ICCV, 2021. 8 +[8] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. 2, 3 +[9] Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. In NeurIPS, 2020. 2 +[10] Ting Chen, Calvin Luo, and Lala Li. Intriguing properties of contrastive losses. In NeurIPS, 2021. 3, 6 +[11] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv:2003.04297, 2020. 2 +[12] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In CVPR, 2021. 2 +[13] Elijah Cole, Benjamin Deneu, Titouan Lorieul, Maximilien Servajean, Christophe Botella, Dan Morris, Nebojsa Jojic, Pierre Bonnet, and Alexis Joly. The geolifeclef 2020 dataset. arXiv:2004.04192, 2020. 3 +[14] Yin Cui, Zeqi Gu, Dhruv Mahajan, Laurens Van Der Maaten, Serge Belongie, and Ser-Nam Lim. Measuring dataset granularity. arXiv:1912.10154, 2019. 7 +[15] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 3 +[16] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In ICCV, 2015. 2 +[17] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 8 + +[18] Linus Ericsson, Henry Gouk, and Timothy M Hospedales. How well do self-supervised models transfer? In CVPR, 2021. 1, 3 +[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 ICLR, 2019. 7 +[20] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In ICLR, 2018. 2 +[21] Priya Goyal, Mathilde Caron, Benjamin Lefaudeaux, Min Xu, Pengchao Wang, Vivek Pai, Mannat Singh, Vitaliy Liptchinsky, Ishan Misra, Armand Joulin, et al. Self-supervised pretraining of visual features in the wild. arXiv preprint arXiv:2103.01988, 2021. 8 +[22] Priya Goyal, Quentin Duval, Isaac Seessel, Mathilde Caron, Mannat Singh, Ishan Misra, Levent Sagun, Armand Joulin, and Piotr Bojanowski. Vision models are more robust and fair when pretrained on uncurated images without supervision. arXiv preprint arXiv:2202.08360, 2022. 8 +[23] Priya Goyal, Dhruv Mahajan, Abhinav Gupta, and Ishan Misra. Scaling and benchmarking self-supervised visual representation learning. In ICCV, 2019. 3 +[24] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. In NeurIPS, 2020. 2, 3 +[25] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020. 2, 3 +[26] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 3 +[27] Olivier J Henaff, Skanda Koppula, Jean-Baptiste Alayrac, Aaron van den Oord, Oriol Vinyals, and João Carreira. Efficient visual pretraining with contrastive detection. In ICCV, 2021. 8 +[28] Olivier J Henaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, SM Eslami, and Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv:1905.09272, 2019. 2 +[29] Katherine L Hermann, Ting Chen, and Simon Kornblith. The origins and prevalence of texture bias in convolutional neural networks. In NeurlPS, 2020. 7 +[30] Jian Kang, Ruben Fernandez-Beltran, Puhong Duan, Sicong Liu, and Antonio J Plaza. Deep unsupervised embedding for remotely sensed images based on spatially augmented momentum contrast. Transactions on Geoscience and Remote Sensing, 2020. 2 +[31] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. In NeurIPS, 2020. 2 + +[32] Klemen Kotar, Gabriel Ilharco, Ludwig Schmidt, Kiana Ehsani, and Roozbeh Mottaghi. Contrasting contrastive self-supervised representation learning pipelines. In ICCV, 2021. 2, 3 +[33] Hsin-Ying Lee, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Unsupervised representation learning by sorting sequences. In ICCV, 2017. 2 +[34] 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 ECCV, 2018. 2, 4 +[35] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In ECCV, 2016. 2 +[36] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv:1807.03748, 2019. 2 +[37] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In CVPR, 2016. 2 +[38] Senthil Purushwalkam and Abhinav Gupta. Demystifying contrastive self-supervised learning: Invariances, augmentations and dataset biases. In NeurIPS, 2020. 3 +[39] Nils Rethmeier and Isabelle Augenstein. Long-tail zero and few-shot learning via contrastive pretraining on and for small data. arXiv:2010.01061, 2020. 2 +[40] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 2015. 1 +[41] Aaqib Saeed, David Grangier, and Neil Zeghidour. Contrastive learning of general-purpose audio representations. In ICASSP, 2021. 2 +[42] Mert Bulent Sariyildiz, Yannis Kalantidis, Diane Larlus, and Karteek Alahari. Concept generalization in visual representation learning. In ICCV, 2021. 3 +[43] Hari Sowrirajan, Jingbo Yang, Andrew Y Ng, and Pranav Rajpurkar. Moco pretraining improves representation and transferability of chest x-ray models. In Medical Imaging with Deep Learning, 2021. 2 +[44] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In ICCV, 2017. 3 +[45] Siyi Tang, Amirata Ghorbani, Rikiya Yamashita, Sameer Rehman, Jared A Dunnmon, James Zou, and Daniel L Rubin. Data valuation for medical imaging using shapley value and application to a large-scale chest x-ray dataset. Scientific reports, 2021. 6 +[46] 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. 3 +[47] Yonglong Tian, Olivier J Henaff, and Aaron van den Oord. Divide and contrast: Self-supervised learning from uncu-rated data. In ICCV, 2021. 3 +[48] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In ECCV, 2020. 2 + +[49] Hugo Touvron, Andrea Vedaldi, Matthijs Douze, and Hervé Jégou. Fixing the train-test resolution discrepancy. In NeurIPS, 2019. 7 +[50] Wouter Van Gansbeke, Simon Vandenhende, Stamatios Georgoulis, and Luc Van Gool. Revisiting contrastive methods for unsupervised learning of visual representations. In NeurIPS, 2021. 2, 3 +[51] Grant Van Horn, Elijah Cole, Sara Beery, Kimberly Wilber, Serge Belongie, and Oisin Mac Aodha. Benchmarking representation learning for natural world image collections. In CVPR, 2021. 2 +[52] Ali Varamesh, Ali Diba, Tinne Tuytelaars, and Luc Van Gool. Self-supervised ranking for representation learning. arXiv:2010.07258, 2020. 2 +[53] Wenguan Wang, Tianfei Zhou, Fisher Yu, Jifeng Dai, Ender Konukoglu, and Luc Van Gool. Exploring cross-image pixel contrast for semantic segmentation. In ICCV, 2021. 8 +[54] Ross Wightman, Hugo Touvron, and Hervé Jégou. Resnet strikes back: An improved training procedure in timm. arXiv:2110.00476, 2021. 8 +[55] Tete Xiao, Mannat Singh, Eric Mintun, Trevor Darrell, Piotr Dollar, and Ross Girshick. Early convolutions help transformers see better. In NeurIPS, 2021. 8 +[56] Tete Xiao, Xiaolong Wang, Alexei A Efros, and Trevor Darryll. What should not be contrastive in contrastive learning. In ICLR, 2020. 2, 8 +[57] Xingyi Yang, Xuehai He, Yuxiao Liang, Yue Yang, Shang-hang Zhang, and Pengtao Xie. Transfer learning or self-supervised learning? a tale of two pretraining paradigms. arXiv:2007.04234, 2020. 3 +[58] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In ECCV, 2016. 2 +[59] Richard Zhang, Phillip Isola, and Alexei A Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In CVPR, 2017. 2 +[60] Nanxuan Zhao, Zhirong Wu, Rynson WH Lau, and Stephen Lin. What makes instance discrimination good for transfer learning? In ICLR, 2021. 2, 3 +[61] 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. 3 +[62] Benjin Zhu, Junqiang Huang, Zeming Li, Xiangyu Zhang, and Jian Sun. Eqco: Equivalent rules for self-supervised contrastive learning. arXiv:2010.01929, 2020. 2 +[63] Barret Zoph, Golnaz Ghiasi, Tsung-Yi Lin, Yin Cui, Hanxiao Liu, Ekin D Cubuk, and Quoc V Le. Rethinking pre-training and self-training. In NeurIPS, 2020. 8 \ No newline at end of file diff --git a/whendoescontrastivevisualrepresentationlearningwork/images.zip b/whendoescontrastivevisualrepresentationlearningwork/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e8a4da9bc92dea59ab45cd7897b147a559531c4c --- /dev/null +++ b/whendoescontrastivevisualrepresentationlearningwork/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95e9259a1d909cd1e16b1c688069520c2dffa9e46dafac02c556cd9de8c29c10 +size 296593 diff --git a/whendoescontrastivevisualrepresentationlearningwork/layout.json b/whendoescontrastivevisualrepresentationlearningwork/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9cbeec930c1dca23242d15b59f88a596a19d89d7 --- /dev/null +++ b/whendoescontrastivevisualrepresentationlearningwork/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f764879d6c4657ca7c0d81d914e5fa7a0489bcbfb659576b2076dc07a03bbdc1 +size 331220 diff --git a/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_content_list.json b/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f942076165496ae71a2aaf52ef148b76f874b40e --- /dev/null +++ b/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e97ef2024e301c90152a0b4637d2ba304bc4e70eca9a3e7a1d3f597b7221500f +size 82312 diff --git a/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_model.json b/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9aab25a4eadc7d02763852628038c16aad114077 --- /dev/null +++ b/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:602abcc3257cf2f19a2379ce0430281f8cde4e3686ee8a994bbae099f3eb83f3 +size 99965 diff --git a/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_origin.pdf b/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e51839a090914471c40628f0f3e5ef40542602d --- /dev/null +++ b/whentopruneapolicytowardsearlystructuralpruning/479f4ace-77a4-4d82-98ab-2d34e1bf79de_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34754f152c5decc6a55048aca5a846e158f02e803d539a0b69c1acd6b1a36e50 +size 1403864 diff --git a/whentopruneapolicytowardsearlystructuralpruning/full.md b/whentopruneapolicytowardsearlystructuralpruning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..587964bd484cbc48f8650c9d7cc38ab2a1e5cee3 --- /dev/null +++ b/whentopruneapolicytowardsearlystructuralpruning/full.md @@ -0,0 +1,344 @@ +# When to Prune? A Policy towards Early Structural Pruning + +Maying Shen, Pavlo Molchanov, Hongxu Yin, Jose M. Alvarez +NVIDIA + +{mshen, pmolchanov, dannyy, josea}@nvidia.com + +# Abstract + +Pruning enables appealing reductions in network memory footprint and time complexity. Conventional posttraining pruning techniques lean towards efficient inference while overlooking the heavy computation for training. Recent exploration of pre-training pruning at initialization hints on training cost reduction via pruning, but suffers noticeable performance degradation. We attempt to combine the benefits of both directions and propose a policy that prunes as early as possible during training without hurting performance. Instead of pruning at initialization, our method exploits initial dense training for few epochs to quickly guide the architecture, while constantly evaluating dominant sub-networks via neuron importance ranking. This unveils dominant sub-networks whose structures turn stable, allowing conventional pruning to be pushed earlier into the training. To do this early, we further introduce an Early Pruning Indicator (EPI) that relies on sub-network architectural similarity and quickly triggers pruning when the sub-network's architecture stabilizes. Through extensive experiments on ImageNet, we show that EPI empowers a quick tracking of early training epochs suitable for pruning, offering same efficacy as an otherwise "oracle" grid-search that scans through epochs and requires orders of magnitude more compute. Our method yields $1.4\%$ top-1 accuracy boost over state-of-the-art pruning counterparts, cuts down training cost on GPU by $2.4\times$ , hence offers a new efficiency-accuracy boundary for network pruning during training. + +# 1. Introduction + +The success of convolutional neural networks (CNNs) fuels the recent progress in computer vision, boosting up performance for classification, detection, and segmentation tasks [16, 35, 37]. While enjoying the accuracy benefits CNNs bring, a simultaneous increase in network complexity imposes higher memory footprint and computing power consumption, making deployment of CNNs on resource-constrained devices a challenging task [7, 29, 30]. In lieu of + +![](images/2aa82407e8786492d7d7082e313e72d9a606d1f64c3ddd6cffc081b6c9228128.jpg) +Figure 1. Pruning paradigm overview. Train-Prune-Finetune prunes after training, effective but costs additional training time; Prune-at-Initialization prunes right before training towards a smaller network, cuts down on training time but suffers notable performance degradation; Pruning-aware-Training (ours) prunes during training aiming at benefits from two worlds. It governs on post-pruning performance while aiming to minimize training time, via a new policy around Early Pruning Indicator (EPI) that signals an early optimal point to start pruning during training. + +computation-intensive networks, recent work turn to compression techniques for efficient models leveraging pruning [3, 15, 25, 29], quantization [5, 43, 46], knowledge distillation [19, 31, 45], neural architecture search [38, 41, 44], and architecture redesigns [21, 28, 39]. Among these, pruning demonstrates to be a widely adopted method that compresses pre-trained models before deployment. The primary goal of pruning aims to remove insignificant network parameters without impacting accuracy. In particular, structural pruning removes entire filters (or neurons) as such the resulting structural sparsity benefits legacy off-the-shelf platforms, e.g., CPUs, DSPs, and GPUs. + +In general, network pruning involves three key steps: (i) original training of a dense model for high accuracy, (ii) pruning away insignificant weights to remove redundancy, and finally (iii) fine-tuning the pruned model to recover performance [15, 26, 30]. Despite remarkable compactness delivered by the last two steps, the original training of an overparameterized network remains mostly untouched. Such approaches require a twice long time (resource) as an original training recipe given similar required computes for fine- + +tuning, making the entire pipeline slow, sometimes infeasible. For example, a very recent breakthrough in language modeling, a GPT-3 model [4], requires millions of dollars (more than 300 NVIDIA V100 GPU years) just for the initial training. Already aware of post-training redundancy, an interesting question arises - can we somehow prune a network during its initial training, as such the resulting sparsity can (i) immediately benefit training and (ii) save us from the costly additional fine-tuning upon training ends? + +One intuitive and ideal solution to this problem is pruning the network right at initialization even before training starts. The intriguing observation from the Lottery Ticket Hypothesis [9] hints potential to this task: it shows the (i) existence of small sub-models, identifiable via pruning, within a large dense model, that can (ii) be trained in isolation to achieve the same accuracy as its dense counterpart [9, 25]. This field has quickly evolved and recent approaches have enhanced policy for optimal sub-network at the initialization by preserving the loss or the gradient flow [8, 24, 42]. Despite rapid progress, the approaches of sub-network identification at the initialization remain challenging and still suffer noticeable accuracy loss [10, 12]. + +Instead of zero training, in this work, we showcase the benefits and practicability of pruning early during training. Doing so allows one to (i) save compute by training only pruned models most of the time, (ii) alleviate any extra finetuning by aligning the process with original training, while (iii) suppressing accuracy loss by moving slightly later into the training regime for pruning guidance. We name this approach pruning-aware-training (PaT). As shown in Fig. 1, unlike pruning-at-initialization, PaT takes full advantage of early-stage dense model training that is beneficial for rapid learning and optimal architecture exploration [1, 11], while aiming to identify the best sub-network as early as possible, rather than waiting till training ends as in conventional pruning. + +The key of benefiting from the training efficiency of PaT and saving training time relies on finding an early yet eligible point during training to start pruning. Existing methods that perform pruning during training [3, 10, 27, 33] have shown the efficacy of this direction by reducing the turnaround time. However, in most cases a fixed initial interval for pruning is set heuristically, or post-training statistics are required. In this work we focus on understanding how the starting point of pruning can be set automatically. + +We start by analyzing in depth the evolution of pruned architectures via performing trimming across all epochs rigorously and compare their suitability for pruning. Though laborious, this oracle estimate offers key insights on pruning during training. We observe an important property: agnostic of magnitude or gradient criterion, (i) pruning at early epochs results in different final architectures, but (ii) dominant architecture emerges within just a few epochs and sta + +bilizes thereafter till training ends, allowing conventional pruning to be pushed earlier into the training. + +Amid such property we further propose a novel metric, called Early Pruning Indicator (EPI), that estimates the structure similarity between networks resulted in pruning at consecutive epochs of the same base model. Given intrinsic access to model weights and gradients during training, EPI can be calculated very efficiently alongside initial training without bells and whistles, while helping avoid the otherwise lengthy grid search for starting epochs. Once the resulting pruning structure will not vary between epochs we argue and demonstrate it is safe to prune. As prior work [25] and we observe, structural pruning acts as an architecture search and tries to find the optimal number of neurons per layer. Therefore, we hypothesize that pruning can be performed as soon as the architecture of the dominant subnetwork becomes stable. We demonstrate that the proposed metric works across varying network architectures, pruning ratios, delivering consistent reductions in training time. + +Our main contributions are as follows: + +- We propose a novel metric called Early Pruning Indicator (EPI) that indicates an early point to start pruning during training. Our metric enables training to benefit from sparsity, significantly reducing training resources with minor accuracy drop. +- We demonstrate that for structural pruning (output channel pruning), initial dense training fuels accuracy boosts. Augmented by EPI, our pruning-aware-training outperforms pruning-at-initialization alternatives by a large margin. +- We show that EPI is agnostic to the pruning method used by showing efficacy for both magnitude-based and gradient-based pruning, enabling a new state-of-the-art boundary for training speedup through in-situ pruning. + +# 2. Related Work + +Network pruning. Mainstream pruning methods can be divided into three categories depending on when pruning is performed: 1) train-prune-finetune, 2) prune at initialization, and 3) prune while training. + +The first group, train-prune-finetune, performs pruning on a densely pre-trained network and then, fine-tune the resulting structure to recover the performance loss caused by pruning. There are many methods aiming at preserving the final accuracy [17, 29, 30] and minimize the output change of each layer [18, 26]. A key focus of these work resides in identifying redundant connections whose removal brings the least perturbation to the overall performance. While enabling plausible performance and improving efficiency at test time, the aforementioned approaches cannot yet bring any efficiency benefit to training. Quite in contrary, most recipes result in nearly doubled training time amid the re + +requirement for lengthy fine-tuning. + +Prune at initialization methods, backed by the Lottery Ticket Hypothesis [9], question the necessity of dense training for performance convergence [25]. A forerunner in this group is SNIP [24], an approach that identifies a trainable sub-network at initialization. Subsequently, other methods such as FORCE [8], GraSP [42], or SynFlow [40] have been proposed to improve performance. These methods make the training more efficient as they only train the sparse network. However, the reliability of pruning at initialization remains unsatisfactory facing inevitable performance gaps [10]. + +Prune while training methods rest in the middle by finding a trade-off between training efficiency and final accuracy. Literature falls under two streams towards this task: a) regularization-based methods that encourage sparsity during training [3, 13, 27], and b) sub-ticket selection methods via saliency that discard redundancy [2, 14, 17]. Our work belongs to the latter given its efficacy to quickly enforce a pruning ratio and ease-of-control during training. Under this realm, one line of work learns sub-networks during training [3, 27, 33]. Others, such as Frankle et al. [10], study the need of few training iterations before pruning in order to maximize the performance. These methods struggle to automatically identify the starting points at which pruning can be performed, while heavily relying on hand-crafted or post-training heuristics for decision making. + +Network similarity. Our policy explores the network similarity of two sub-networks resulted from pruning. A comprehensive review of network similarity measures was presented in [23]. These methods aim at comparing the representation between two fully trained models with different initialization, hence are not applicable to in-training gauging for pruning where weights and dominant architectures are both changing. To get the structural similarity for pruning, we focus on the number of remaining neurons across layers in a network when comparing with another one. The difference between these skeletons using coefficients can be directly measured by Spearman's [36] and Kendall's tau [22] rank correlation. However, these rank correlation metrics take into account the specific ranking and, more importantly, they would rely on all neurons in the network. Thus, they provide the same value for all pruning ratios. + +Of particular relevance to this work is [10] by Frankle et al. that proposes an approach to measure the instability of a network structure to understand pruning viability. One noticeable finding by this work shows that the best time to perform iterative magnitude pruning tends to be after some initial training. Interestingly it identifies a relationship between the model instability and the accuracy of the pruned network, though the instability measure proposed by the method can only be measured after training is completed, hence remains insufficient to directly signal when to start pruning during training. EarlyBERT [6], a work on + +Algorithm 1 Iterative pruning within one epoch +1: For prune ratio $\alpha$ , schedule the number of neurons to prune per step for $S$ steps via exponential scheduler [8], forming $\mathbf{m} \in \mathbb{R}^S$ +2: while $|\mathcal{P}| \leq \alpha |\mathcal{F}|$ do +3: Average importance calculated by (2) or (3) over multiple minibatches +4: $\mathcal{P}$ is the indices of $\mathbf{m}_i$ bottom-ranked neurons +5: $\mathbf{W}_{\mathcal{P}} \gets 0 \quad \triangleright$ remove pruned neurons +6: $\mathcal{R} = \mathcal{F} - \mathcal{P} \quad \triangleright$ the remaining neurons +7: Update $\mathbf{W}_{\mathcal{R}}; i \gets i + 1$ +8: end while + +NLP models, also studies the network similarity to guide the pruning. However, it uses the mask Hamming distance to measure the sub-network similarity. This requires the full pruning mask to be fixed between sub-networks, selecting the exact same neurons, thus impairing the flexibility. + +# 3. Method + +We next elaborate our early pruning algorithm in details. + +# 3.1. Objective Function + +Consider a neural network with $L$ layers, each layer specified by its weight $\mathbf{W}^l\in \mathbb{R}^{C_O^l\times C_I^l\times K^l\times K^l}$ $K$ being the kernel size and $C_I$ and $C_O$ being the number of input and output channels/neurons, respectively. Altogether, these parameters form the parameter set $\mathbf{W} = \{\mathbf{W}^l\}_{l = 1}^L$ for the network. Given a training set consisting of $N$ input-output pairs $\{(x_i,y_i)\}_{i = 1}^N$ , learning the parameters of a network under filter sparsity constraints can be expressed as solving the following optimization problem: + +$$ +\underset {\mathbf {W}} {\arg \min } \frac {1}{N} \sum_ {i = 1} ^ {N} \ell \left(y _ {i}, f \left(x _ {i}, \mathbf {W}\right)\right) + r (\mathbf {W}), \text {s . t .} \frac {| \mathcal {P} |}{| \mathcal {F} |} \geq \alpha \tag {1} +$$ + +where $\ell(\cdot)$ denotes the loss function that compares the network prediction to the ground-truth, $f(\cdot)$ encodes the network transformation, $r(\cdot)$ is a regularizer acting on the network parameters, and $\alpha$ is the target pruning ratio. $\mathcal{F} = \{\mathcal{F}^l\}_{l=1}^L$ represents the index set of all the neurons in the network. This index set can be divided into two disjoint sets $\mathcal{P} = \{\mathcal{P}^l\}_{l=1}^L$ and $\mathcal{R} = \{\mathcal{R}^l\}_{l=1}^L$ , representing the index sets of the pruned and remaining neurons respectively. We have $\mathcal{F} = \mathcal{P} \cup \mathcal{R}$ and $\mathcal{P} \cap \mathcal{R} = \emptyset$ . PaT involves three stages: dense training, network pruning, and sparse training. During initial dense training, the forward/backward passes are computed using all the filters in the network $f(x_i, \mathbf{W}_{\mathcal{F}})$ . While during sparse training, the forward/backward passes only use the remaining neurons $f(x_i, \mathbf{W}_{\mathcal{R}})$ . Akin to [29, 30], we follow the paradigm of iterative pruning that finishes within one epoch. More precisely, as shown in Algorithm 1, the process consists of the following two steps. First, at each training iteration, we + +compute the importance metric of each neuron according to a pruning criterion. Meanwhile we keep updating network weights as normal. Then, at each pruning step, we get the averaged importance score for all neurons, and then remove the neurons with the smallest importance values. Each pruning step is carried out after seeing multiple training batches, usually several hundreds of batches are more than sufficient [29]. Note that though containing several quick interactive steps, the entire pruning can be finished very quickly within one training epoch. + +For comprehensiveness we consider two popular criteria from literature - both magnitude-based and gradient-based schemes for neuron importance ranking: + +Magnitude-based criterion uses the $l_{2}$ -norm of the neuron weights to measure the relevance of a neuron: + +$$ +\mathcal {I} _ {n} ^ {l} = \left\| \mathbf {W} _ {n} ^ {l} \right\| _ {2} / \sqrt {P ^ {l}}, \tag {2} +$$ + +where $P^l = C_I^l \times K^l \times K^l$ denotes the number of parameters per filter at layer $l$ , and $n$ specifies the output neuron index within $\mathbf{W}^l$ . Such normalization ensures its comparability for neurons from different layers with different sizes [3]. Gradient-based criterion considers the Taylor expansion of the loss change to approximate the importance of a neuron. Initially, Molchanov et al. [30] proposed to estimate importance as a magnitude of the gradient-activation product, and more recently, SNIP [24] and FORCE [8] extended the idea to a parameter level. Specifically, gradient-based criterion using Taylor expansion for neurons can be defined as: + +$$ +\mathcal {I} _ {n} ^ {l} = \left| \sum_ {w \in \mathbf {W} _ {n} ^ {l}} g _ {w} w \right|, \tag {3} +$$ + +where $g_{w}$ is the gradient of the weight $w$ . The metric estimates an approximate change in the loss function once the neuron is removed. As suggested in [29], for networks using batch normalization, the best way to apply pruning is on the batch normalization layers instead of convolutional filters directly. Additionally, the loss of removing the channel can be approximated via accumulative effect of the learnable scale and shift: $\mathcal{I}_n^l = |g_{\gamma_n^l}\gamma_n^l +g_{\beta_n^l}\beta_n^l|$ , where $\gamma$ and $\beta$ are the weight and bias of the batch normalization layer, respectively. We empirically observe slight improvements using $L_{1}$ for pruning during training rather than the original $L_{2}$ as in [29] for post-training pruning. + +# 3.2. Towards Early Pruning + +Recall that our goal is to maximize the accuracy of the network while minimizing the compute required for training. This compute is usually dominated by the amount of time performing dense training. The sooner we prune the network, the less resources it requires to finish training. + +As both prior work [11] and we empirically observe, the early stage of neural network training imposes a rapid + +![](images/68d685b80b18380ccdcec7594f4762031c3fdadaae8494c7583270732befca96.jpg) +Figure 2. Structure of different sub-networks. Colored circles and solid lines are active neurons and connections. Sub-figures (a), (b) and (c) are three different sub-networks of the original network on the left. While these sub-networks having the same number of neurons in total, sub-networks (b) and (c) are in higher similarity. + +![](images/78f5a1bf93dad7cb65a7c2b380c0ed48c41fafd1942556f4ca010d23cd434e38.jpg) +(a) + +![](images/61a4dada2506de4332907bd24f6461cc6574d7c83d1e961663249111b0ca3eb4.jpg) +(b) + +![](images/8905e66d4d8d96f0bb2636e1e54b2c0440b4c89d99003ac85aa68bf1b0320024.jpg) +(c) + +motion in parameter space with large gradient magnitudes. This generates fruitful information for initial network convergence and a quick accuracy boost. With such a fact, an intuitive option for early pruning can be to analyze the emergence of important neurons at different training stages that the network gradually picks up for the underlying task, and then prune the insignificant ones right away. + +Given its intrinsic access to weights and gradients, training allows one to quickly rank all the neurons globally with very little extra compute. This allows the network to take a quick glimpse into the problem from the architecture space that is empirically observed informative [16, 20, 37], while we can quite efficiently track architectural convergence. + +To this end, we check after each training epoch for a sub-network specified by the top $k$ most important neurons globally according to the chosen pruning criterion. Close to but different from a final winning ticket, an intermediate helps identify dominant neurons, but remains not as strong as its final version, while constantly changing during training. However, as we will show later, the architecture of such sub-network changes rapidly in the first few epochs, then surprisingly shows minimal changes thereafter for the remaining epochs. Knowingly exploiting such fast convergence to stability and slow changes of dominate subnetwork thereafter, we argue and demonstrate pruning can be started as early as when its Top- $k$ sub-network stabilizes. Next, we explore network similarity to signal such stability. + +# 3.3. Early Pruning Indicator (EPI) + +We look into the structural similarity between dominant sub-networks to quantify architectural changes during training. Under a global neuron pruning scheme, merely using pruning ratio as a guidance fells short for this task: each pruning ratio can be easily satisfied by multiple variants, each sharing the same number of neurons while differing in architectures (see examples in Fig. 2). As an alternative, we examine the distribution of the number of remaining neurons across all layers per pruned network. + +Consider two sub-networks $\mathcal{N}_1$ and $\mathcal{N}_2$ under the same prune ratio containing the same number of remaining neurons. Let $n_{(1,l)}$ and $n_{(2,l)}$ be the number of neurons of $l_{th}$ layer in nets $\mathcal{N}_1$ and $\mathcal{N}_2$ respectively, then set $\{n_{(1,1)}, n_{(1,2)}, \dots, n_{(1,L)}\}$ describes the structure of the + +sub-network $\mathcal{N}_1$ , and similarly for $\mathcal{N}_2$ . For the $l_{th}$ layer, we define the normalized difference between $\mathcal{N}_1$ and $\mathcal{N}_2$ as + +$$ +d _ {l} \left(\mathcal {N} _ {1}, \mathcal {N} _ {2}\right) = \frac {\left| n _ {(1 , l)} - n _ {(2 , l)} \right|}{n _ {(1 , l)} + n _ {(2 , l)}}, \tag {4} +$$ + +yielding a range from zero to one. The lower the distance, the closer the layer structure is. On top of this we can now construct a pruning stability indicator $\Psi$ combining the similarity for all the layers in the network: + +$$ +\Psi \left(\mathcal {N} _ {1}, \mathcal {N} _ {2}\right) = 1 - \frac {1}{L} \sum_ {l = 1} ^ {L} d _ {l} \left(\mathcal {N} _ {1}, \mathcal {N} _ {2}\right), \tag {5} +$$ + +where $\Psi$ ranges from 0 to 1, with a lower value indicates high variations between the two sub-networks, and a high value indicates stability in the resulting network structure. + +Given a pruning stability indicator, the algorithm to decide when to prune is described in Algorithm 2. We first calculate the neurons' importance scores according to the pruning criterion at the end of each epoch $t$ . Get the top $k$ neurons by ranking the importance scores and the resultant sub-network structure $\mathcal{N}_t = \{n_{(t,1)}, n_{(t,2)}, \dots, n_{(t,L)}\}$ where $\sum_{l=1}^{L} n_{(t,l)} = k$ and $n_{t,l}$ is the number of neurons in the $l_{th}$ layer. Then calculate the sub-network structure similarities between $\mathcal{N}_t$ and $\mathcal{N}_{t-j}$ for $1 \leq j \leq r$ where $r$ is the range of past epochs that we want to have a structure comparison. We use the averaged structure similarity to reflect the structure stability, namely: + +$$ +\mathrm {E P I} _ {t} = \frac {1}{r} \sum_ {j = 1} ^ {r} \Psi \left(\mathcal {N} _ {t}, \mathcal {N} _ {t - j}\right). \tag {6} +$$ + +This structure stability score is constantly increasing during training. When it reaches a certain threshold $\tau$ , we can safely say that the resultant sub-network is reliable to achieve a good performance and we can start the pruning. + +# 4. Experiments + +We next experiment with varying architectures and pruning methods to showcase the strength of our proposed method for the classification task. In the appendix, we also demonstrate applicability to the task of object detection. + +Experimental Settings. We prune ResNet34, ResNet50 and MobileNetV1 neural network architectures on the ImageNet ILSVRC 2012 dataset [34] (1.3M images, 1000 classes). Unless otherwise stated each pruning uses one single node with 8 NVIDIA Tesla V100 GPUs. All experiments share the original training pipeline following PyTorch mixed-precision training under NVIDIA's recipe [32] with 90 epochs in total. The learning rate is warmed up linearly in the first 8 epochs, then follows a cosine decay over the entire training. We use PyTorch Distributed Data Parallel training and for each GPU with an individual batch size at 128. Our unpruned models achieve $77.32\%$ top-1 accuracy with ResNet50, $74.36\%$ with ResNet34 and $72.93\%$ with MobileNetV1. + +Algorithm 2 Pruning-aware-Training (PaT) +Input: Network with random initialized weights $\mathbf{W}_{\mathcal{F},0}$ , stability threshold $\tau$ , pruning ratio $\alpha$ , total epochs $T$ as in original recipe +Output: Pruned structure $\mathcal{R}$ ; trained weights $\mathbf{W}_{\mathcal{R},T}$ +1: enforce epoch status $\in$ {dense, prune, sparse} +2: epoch status $\leftarrow$ dense +3: for epoch $t = 0,1,\dots,T$ do +4: if epoch status is dense then +5: Train $\mathbf{W}_{\mathcal{F},t}$ by gradient descent +6: Get importance score averaged over the epoch +7: Get $(1 - \alpha)|\mathcal{F}|$ top ranked neurons to form $\mathcal{N}_t$ +8: Get EPI $_t$ with Eq. (6) +9: if $(\mathrm{EPI}_t \geq \tau)$ and $(\mathrm{EPI}_t \geq \mathrm{EPI}_{t-j})_{1 \leq j \leq 5}$ then +10: epoch status $\leftarrow$ prune +11: end if +12: else if epoch status is prune then +13: Prune $\alpha|\mathcal{F}|$ neurons with Algorithm 1 +14: Get $\mathcal{P}$ , update $\mathcal{R}$ +15: epoch status $\leftarrow$ sparse +16: else +17: Train $\mathbf{W}_{\mathcal{R},t}$ by gradient descent +18: end if +19: end for +20: Return $\mathcal{R}$ , $\mathbf{W}_{\mathcal{R},T}$ + +![](images/62e9293440e463645264ed21db4125c6bfb1a278da9488c538893c5d6d4eb042.jpg) +Figure 3. Accuracy as a function of the pruning epoch for prune aware training (PaT) in green, and the lottery ticket in gray for a ResNet50 on ImageNet. The dense version achieves $77.32\%$ accuracy. PaT yields better performance if the pruning starts after a few training epochs. However, if pruning occurs too late, the accuracy for PaT drops significantly. + +# 4.1. Understanding Early Pruning Epochs + +We start with understanding in depth the variations in final accuracy as a function of the starting pruning epoch. To do so, we analyze the accuracy changes by varying the starting pruning epoch, and continue training to the final epoch and check the associated accuracies. + +Pruning at different epochs. Fig. 3, in green, shows the top-1 accuracy obtained by pruning $50\%$ of the neurons on a ResNet50 using gradient-based criterion at various epochs during the 90-epoch training cycle. As shown, the accuracy drop for late pruning is significant as there is not enough time left for recovering. We also observe that, compared to pruning at initialization (at epoch 0), pruning after a few epochs consistently yields better performance. However, for all these experiments there is always a certain accuracy drop compared to the unpruned upper bound $(77.32\%)$ . + +Lottery ticket hypothesis for structural pruning. To better understand the role of early training with a dense model rather than a pruned model, we evaluate the idea of lottery-ticket hypothesis for structural pruning. We follow [9] and + +train from scratch a sub-network obtained by pruning using the original initialization. All pruning masks are collected from the previous experiment (Fig. 3). Results are shown in the same plot with a gray line. Note that, due to iterative nature of the pruning algorithm, for pruning at 0 we use the mask when the epoch is finished. When it is applied at the initialization as a lottery ticket, the final accuracy is slightly different. From these results, we can conclude that, in the structural pruning case, the lottery ticket hypothesis may not hold. Pruning the network during training performs better than training a winning ticket in isolation from scratch. + +Varying pruning ratio and architecture. We now take a closer look at the accuracy drop incurred when pruning occurs during the early stage of training (first 30 epochs from Fig. 3). Fig. 4 shows these results for different architectures using magnitude-based and gradient-based pruning respectively. As we can see, for magnitude-based pruning, there is a significant drop in accuracy if the pruning occurs too early, especially for large prune ratios. This effect is particularly clear if, for instance, we prune $50\%$ neurons of a ResNet50 at epoch 0 which makes the network not trainable. This is expected as the pruning ratio is large and the weights have not been updated at all. Therefore, it is not possible to estimate the importance of each neuron correctly. For gradient-based pruning, the accuracy drop varies depending on the architecture. In this case, pruning at initialization has less impact compared to magnitude-based pruning. For instance, pruning a ResNet34 or a MobileNetV1 leads to minimal drop in accuracy. For ResNet50, however, the accuracy drop increases as the pruning ratio increases. Thus, late pruning would be preferred to maximize performance. Let's see how we can find the optimal pruning epoch during a single training session. + +# 4.2. EPI-guided Pruning + +Given the previous results, we now demonstrate the ability of our approach to determine the optimal pruning epoch. Thus, in this experiment we compare our policy to a heuristic and a random policies. For heuristic policy, we consider setting the pruning epoch to 0 which is equivalent to pruning at initialization [8,24]. For the random policy, we select randomly a pruning epoch during the early stage of training, i.e. in the range [0,30]. We repeat the random policy experiment 100 times and report the mean of the results. + +Selecting the EPI threshold $(\tau)$ . Our method introduces a hyperparameter $\tau$ such that when EPI (Eq. 6) reaches it we can start pruning. We find that a universal value can be used for all architectures and all pruning ratios, however, it is sensitive to the pruning algorithm. To this end, we perform a sensitivity analysis on ResNet50 over pruning ratios of $10\% - 50\%$ with increments of $10\%$ and use a grid search to set the value that yields the best pruning result. As a result, we find $\tau = 0.983$ for magnitude-based + +
Network(s)Starting epoch for pruning
RandomInit. [8, 24]Pre-defined [11]EPI (ours)
MagnitudeResNet500.9403.6040.1150.091
ResNet340.2670.8380.3530.169
MobileNet-v16.285-0.1350.135
Overall2.4972.2210.2010.132
GradientResNet500.9922.7380.2670.092
ResNet340.1530.1220.2210.195
MobileNet-v10.1320.1860.1100.178
Overall0.4261.0150.1990.155
+ +Table 1. Absolute top-1 accuracy change relative to the results per oracle grid search for optimal pruning starting point. Lower is better. Init. refers to pruning at initialization using a structural version of FORCE [8], also equivalent to the structural and iterative SNIP [24]. Pre-define refers to heuristically pre-define a pruning start epoch 30, which we find empirically the last epoch not leading to a significant accuracy drop. This is aligned with [10] suggesting waiting for several training iterations before pruning. + +pruning and $\tau = 0.944$ for gradient-based pruning to be the best. We tuned this value for ResNet50, however, we will show its generalizability by performing tests on ResNet34, MobileNetV1 in the main text and SSD in the Appendix. + +Policy comparison. Tab. 1 shows the results of experiments for importance and magnitude based pruning under the guidance of our proposed EPI and the universal EPI threshold $\tau$ . We compare the results with random policy and heuristic policy of pruning at initialization. We report the average accuracy drop compared to best accuracy achieved via grid search for each network. The values for ResNet50 gradient-based pruning is averaged over prune ratios $10\% - 90\%$ ; all the rests are averaged over prune ratios $10\% - 50\%$ . We also report the overall average accuracy drop over three networks when using different policies to guide the pruning in row "overall". As shown, our policy clearly yields a significantly higher performance compared to random pruning. In the case of gradient-based pruning, our approach performs on par compared to heuristics on ResNet34 and MobileNetV1. Overall our approach performs better with less top-1 accuracy change. For magnitude-based pruning, our approach yields significantly better results compared to heuristics. The optimal pruning epoch varies for different architectures and different prune ratios, see the appendix for the sensitivity analysis to the stability threshold. + +# 4.3. Training Speedup + +We also calculate the actual training speedup when using our proposed EPI (Eq. 6) policy and the heuristic ones on ResNet50 gradient-based pruning. Fig. 5 shows the policies comparison result. + +Comparing to pruning at initialization. When compared with pruning at initialization (heuristic pruning at epoch 0), we achieve larger speed-up although we start prune later. That happens because of structural pruning, where pruning at different epochs might result in different structures: faster + +![](images/c1e544ee75650cae51bcd3261df9f40abe97732a7c8a4a51051f94f9c148515b.jpg) + +![](images/d73754c979e29a39e11c8225553dc04039e8fc1132b8f8dc550d420a4adbcaaa.jpg) +(a) Magnitude-based pruning + +![](images/b7bea595b76572ea3d05203d3cf2f4ae397187868315ab08ae749d940aefaf3c.jpg) + +![](images/3cb266aefbcc9f49178af5d73c4f3451be1aca207e88df0511602cc2a3323a4b.jpg) +Pruned Ratio + +![](images/0c9b2dbc9a01bb858b15d5a2641119e868fafe947b2337fb3a46a41b48b5e5f5.jpg) +Figure 4. The final ImageNet Top-1 accuracy of the pruned network when pruning occurs at different epochs during the early stage of training. We observe pruning at initialization tends to result in untrainable network with magnitude-based pruning method. For gradient-based method, we observe a higher degradation occur when more filters are pruned, and show pruning ratios up to $90\%$ on ResNet50. [Pruned Ratio] denotes the percentage of neurons removed. Results on MobileNetV3 are shown in the appendix. + +![](images/4c5125d51387d458583aa68bd9b5fb20aef3245c254f9dd2980e59e845f6fd9a.jpg) +(b) Gradient-based pruning + +![](images/0b61cc4d4251ba198df9788f36f895526fa82558c42953805b2900131eb8451a.jpg) + +![](images/792e55707622bcec61fa97b003d451aa9a0d0fe0ca9957433fbfca8767eeb42f.jpg) + +![](images/8bc5aec92c09b6d51c410dd8e5f96b3225af7b49690ffc78a45ee0a107693555.jpg) +Figure 5. Actual training speed-ups on ResNet50 with different prune ratios using different pruning policies. Actual speed measured on an NVIDIA TITAN V GPU at batch size 64. Top-right corner is preferred. + +or slower. It turns out that pruning at epoch 0 is very inefficient, as most neurons pruned are from deeper layers resulting in slow models; therefore, training speed-up is not huge and training such a model is more expensive than the one resulted from pruning at a later epoch. In the meantime, pruning at zero leads to larger accuracy drop especially with large prune ratios. + +Latency-aware pruning. We further apply latency-aware pruning using our policy, which aims to reduce the latency of the model and not only the number of parameters. For that, we penalize the neuron group's saliency with the latency reduction resulting from pruning them. Those neurons requiring larger compute will have lower importance and, therefore, more likely to be pruned. As shown in Fig. 5, using EPI-latency aware pruning yields models that are more GPU-friendly and faster. + +Training cost comparison. Training a dense ResNet50 on ImageNet with 8 NVIDIA Tesla V100 GPUs takes around + +
MethodTop-1 acc. ↑FLOPs (G)↓Starting epoch ↓Total train FLOPs reduc.(%) ↑
ResNet34GPWP [2]73.643.0874013.8
PaT (ours)73.502.9111125.6
ResNet50PT [27]74.732.303-30.0
LFPC [17]74.181.6123537.2
PaT (ours)74.851.6951350.3
+ +Table 2. Comparison with state-of-the-art in-training pruning methods. For a fair comparison we report here $10\%$ filter pruning for ResNet34 and $40\%$ filter pruning for ResNet50 as literature. + +9 hours and costs around \(220 on AWS. Considering a \(50 \%\)pruning ratio, the training cost of our method is \(\$ 154\)as we achieve up to \(30 \%\)training time reduction. In contrast, the total training cost for train- prune- finetune methods is around \(\$ 364\)as they need 90 additional retraining epochs. Thus, a \(2.4 \times\)training cost reduction. + +# 4.4. Comparisons with the State-of-the-art + +We also compare our method to prior arts on ImageNet dataset and present results in Tab. 2. Compared to GPWP [2], our method yields lower accuracy but a higher reduction in FLOPs. Compared to PruneTrain [27], we achieve higher accuracy and a significantly larger training FLOPs saving. LFPC [17] yields $0.67\%$ larger accuracy loss. Even with less FLOPs remaining in pruned model, LFPC requires $13\%$ more total training FLOPs as it needs more epochs for dense train. Overall, we prune much earlier than other techniques, and, therefore, reduce more training time. Moreover, while other techniques use heuristics to define the pruning epoch, we propose an automatic metric that scales with a universal threshold to automatically determine an early point. This helps create a new benchmark protocol by evaluating prior methods under the same setting. + +![](images/5512f7e5442dd58fa696176246091a4b977da8fd1681cc6547ac77d2ed06d525.jpg) +(a) magnitude-based EPI + +![](images/c3ae210e72908ed5bfa56f0157f9de5464a2d90a9b5a8a378eb1e2bfc544f639.jpg) + +![](images/d7dbcef4d0561451f3fb58d7be07b9e22b627f1d4d9146e7d7e91c5f403f50ee.jpg) +(b) gradient-based EPI + +![](images/2aa3256d57fcb41bf0606eee38027275382852fdcb38b4235787c803997c45a4.jpg) +Figure 6. Structure stability analysis for ResNet architectures for (a) magnitude-based and (b) gradient-based pruning. Dashed line shows the EPI threshold selected for each network under the pruning criterion. Results for MobilnetV1 can be found in the supplemental material. + +# 4.5. Ablation Studies + +Stability analysis. The goal of this experiment is to demonstrate that during the early stage of training, the dominate sub-network architecture varies significantly and slowly converges to the final architecture as the training progresses. To this end, we train different architectures to convergence and, in the process, we compute their EPI scores for subnetworks under different pruning ratios. Fig. 6 shows the results for this experiment for magnitude-based and gradient-based criterion respectively. As shown, the EPI score decreases as the pruning ratio increases. We also observe that, independently of the pruning method used, the stability grows rapidly in the early stage of training and then continues increasing steadily for later stages. These results are consistent with those presented in [11] showing a significant change in the network architecture at the beginning but not towards the end of training. + +Performance with similar structures. We now provide empirical support to the assumption that sub-networks with similar structures will likely perform similarly. That is, the performance relies on the structure rather than the neurons being selected during pruning. We use the ResNet50 and obtain the pruning mask with $50\%$ neurons off at epoch 10 using gradient-based ranking. Next, we obtain 10 variations of this mask by selecting different neurons in each layer while maintaining the number of neurons per layer. As a result, we get different neuron masks but the same sub-network structure. We train the initially pruned network to convergence and obtain a top1 accuracy of $73.98\%$ . Finally, we evaluate the performance of training to completion the checkpoint pruned using the 10 mask variations yielding an average top1 accuracy difference of only $0.36\% \pm 0.13\%$ . We also randomly generate 5 variations of masks that lead to different sub-network structures, which have an around 0.8 similarity score to the structure resulted from the original mask. We get an average performance difference of $0.53\% \pm 0.39\%$ . Note that, for a fair comparison, we use the same checkpoint for prune to minimize randomness due to different initialization. From these results, we can conclude networks with the same structure perform similarly. With different structures, the performance varies more. + +Compared to pruning pre-trained models. In many practical scenarios, people train a model (or use a pre-trained + +
prune ratiopost trained pruningEPI, equal epochsEPI, equal training time
10%77.17%77.69%77.74%
20%76.78%76.82%76.83%
30%76.18%76.23%76.55%
+ +Table 3. Comparison between pruning during training with EPI and pruning a pre-trained model. + +backbone) to solve the task at hand. However, there are computation or latency constraints at deployment. People might want to train a smaller model from scratch or prune and finetune the existing model. Both scenarios would benefit from EPI, as we show next. + +We compare pruning during training versus pruning pretrained models in Tab. 3. For pruning a pre-trained model (loading Pytorch weights from ResNet50 trained for 90 epochs, with acc. $77.32\%$ ), we do pruning in the same setting and then finetune it for 90 epochs (marked as post trained pruning). For a fair comparison when we apply EPI on a model trained from scratch we increase the total number of epochs to $90 + 90 = 180$ (column EPI, equal epochs). We clearly outperform pruning pre-trained weights, while saving compute costs. We get pruned models earlier, making the training even faster. Models from EPI can be finetuned for the same amount of clock time as post trained pruning, shown as column EPI, equal training time. This improves results even more as models get trained for more epochs. Again, applying EPI speeds up training right after pruning is complete, while pruning on pre-trained benefits pruning only after the training is finished. + +# 5. Conclusions + +We have introduced an approach to automatically determine when pruning can be performed during training without affecting the final accuracy and with the additional constraint of doing so as early as possible. To this end, we have proposed a policy based on Early Pruning Indicator (EPI), a metric to measure the stability of the sub-network structure. Our experiments on multiple pruning algorithms and pruning ratios have demonstrated the benefits of our method to reduce the accuracy drop when pruning a network and observe a significant reduction in training time. + +Limitations. Our experiments are mainly focused on image classification and object detection (in supplementary material). We leave for future work checking the generalizability of our policy to other learning tasks. + +# References + +[1] Alessandro Achille, Matteo Rovere, and Stefano Soatto. Critical learning periods in deep networks. In International Conference on Learning Representations, 2018. 2 +[2] S. A. Aketi, S. Roy, A. Raghunathan, and K. Roy. Gradual channel pruning while training using feature relevance scores for convolutional neural networks. IEEE Access, 8:171924-171932, 2020. 3, 7 +[3] Jose M Alvarez and Mathieu Salzmann. Learning the number of neurons in deep networks. In Advances in Neural Information Processing Systems, pages 2270-2278, 2016. 1, 2, 3, 4 +[4] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. 2 +[5] Yaohui Cai, Zhewei Yao, Zhen Dong, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Zeroq: A novel zero shot quantization framework. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13169-13178, 2020. 1 +[6] Xiaohan Chen, Yu Cheng, Shuohang Wang, Zhe Gan, Zhangyang Wang, and Jingjing Liu. Earlybert: Efficient bert training via early-bird lottery tickets. arXiv preprint arXiv:2101.00063, 2020. 3 +[7] Xiaoliang Dai, Peizhao Zhang, Bichen Wu, Hongxu Yin, Fei Sun, Yanghan Wang, Marat Dukhan, Yunqing Hu, Yiming Wu, Yangqing Jia, P Vajda, M Uytendaele, and Niraj K Jha. ChamNet: Towards efficient network design through platform-aware model adaptation. In CVPR, 2019. 1 +[8] Pau de Jorge, Amartya Sanyal, Harkirat S Behl, Philip HS Torr, Gregory Rogez, and Puneet K Dokania. Progressive skeletonization: Trimming more fat from a network at initialization. arXiv preprint arXiv:2006.09081, 2020. 2, 3, 4, 6 +[9] Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In International Conference on Learning Representations, 2019. 2, 3, 5 +[10] Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. Linear mode connectivity and the lottery ticket hypothesis. In International Conference on Machine Learning, 2020. 2, 3, 6 +[11] Jonathan Frankle, David J. Schwab, and Ari S. Morcos. The early phase of neural network training. In International Conference on Learning Representations, 2020. 2, 4, 6, 8 +[12] Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. In International Conference on Machine Learning, 2020. 2 +[13] Susan Gao, Xin Liu, Lung-Sheng Chien, William Zhang, and Jose M Alvarez. Vacl: Variance-aware cross-layer regularization for pruning deep residual networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pages 0–0, 2019. 3 +[14] Yue-Seng Goh and Eng-Chong Tan. Pruning neural networks during training by backpropagation. In Proceedings + +of TENCON'94-1994 IEEE Region 10's 9th Annual International Conference on: 'Frontiers of Computer Technology', pages 805-808. IEEE, 1994. 3 +[15] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. 1 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. corr abs/1512.03385 (2015), 2015. 1, 4 +[17] Yang He, Yuhang Ding, Ping Liu, Linchao Zhu, Hanwang Zhang, and Yi Yang. Learning filter pruning criteria for deep convolutional neural networks acceleration. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2009-2018, 2020. 2, 3, 7 +[18] Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4340-4349, 2019. 2 +[19] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 1 +[20] A. Howard, Menglong Zhu, Bo Chen, D. Kalenichenko, W. Wang, Tobias Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. ArXiv, abs/1704.04861, 2017. 4 +[21] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 1 +[22] Maurice G Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81-93, 1938. 3 +[23] Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. volume 97 of Proceedings of Machine Learning Research, pages 3519-3529, 09-15 Jun 2019. 3 +[24] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: Single-shot network pruning based on connection sensitivity. In International Conference on Learning Representations, 2019. 2, 3, 4, 6 +[25] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. In International Conference on Learning Representations, 2019. 1, 2, 3 +[26] Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. In Proceedings of the IEEE international conference on computer vision, pages 5058-5066, 2017. 1, 2 +[27] Sangkug Lym, Esha Choukse, Siavash Zangeneh, Wei Wen, Sujay Sanghavi, and Mattan Erez. Prunetrain: fast neural network training by dynamic sparse model reconfiguration. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, pages 1–13, 2019. 2, 3, 7 + +[28] 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. 1 +[29] Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11264-11272, 2019. 1, 2, 3, 4 +[30] Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. arXiv preprint arXiv:1611.06440, 2016. 1, 2, 3, 4 +[31] Ravi Teja Mullapudi, Steven Chen, Keyi Zhang, Deva Ramanan, and Kayvon Fatahalian. Online model distillation for efficient video inference. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3573-3582, 2019. 1 +[32] Nvidia. Convolutional networks for image classification in pytorch. https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/Classification/ConvNets#convolutional-networks-for-image-classification-in-pytorch, 2020.5 +[33] Oyebade Oyedotun, Djamila Aouada, and Bjorn Ottersten. Structured compression of deep neural networks with debiased elastic group lasso. In The IEEE Winter Conference on Applications of Computer Vision, pages 2277-2286, 2020. 2, 3 +[34] 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. Int. J. Comput. Vision, 115(3):211-252, Dec. 2015. 5 +[35] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2015. 1 +[36] Charles Spearman. The proof and measurement of association between two things. 1961. 3 +[37] 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, 4 +[38] 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/CVF Conference on Computer Vision and Pattern Recognition, pages 2820-2828, 2019. 1 +[39] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114. PMLR, 2019. 1 +[40] Hidenori Tanaka, Daniel Kunin, Daniel LK Yamins, and Surya Ganguli. Pruning neural networks without any data + +by iteratively conserving synaptic flow. arXiv preprint arXiv:2006.05467, 2020.3 +[41] Arash Vahdat, Arun Mallya, Ming-Yu Liu, and Jan Kautz. Unas: Differentiable architecture search meets reinforcement learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11266-11275, 2020. 1 +[42] Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In International Conference on Learning Representations, 2020. 2, 3 +[43] Tianzhe Wang, Kuan Wang, Han Cai, Ji Lin, Zhijian Liu, Hanrui Wang, Yujun Lin, and Song Han. App: Joint search for network architecture, pruning and quantization policy. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2078-2087, 2020. 1 +[44] 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/CVF Conference on Computer Vision and Pattern Recognition, pages 10734-10742, 2019. 1 +[45] Hongxu Yin, Pavlo Molchanov, Jose M Alvarez, Zhizhong Li, Arun Mallya, Derek Hoiem, Niraj K Jha, and Jan Kautz. Dreaming to distill: Data-free knowledge transfer via DeepInversion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8715-8724, 2020. 1 +[46] Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. arXiv preprint arXiv:1612.01064, 2016. 1 \ No newline at end of file diff --git a/whentopruneapolicytowardsearlystructuralpruning/images.zip b/whentopruneapolicytowardsearlystructuralpruning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9629deae5149d655448703daef6afac613bcd192 --- /dev/null +++ b/whentopruneapolicytowardsearlystructuralpruning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e01c78a8088b7b7d5ba9e320183d26d63aecc184f8e0283c712cb8b34cd48695 +size 298566 diff --git a/whentopruneapolicytowardsearlystructuralpruning/layout.json b/whentopruneapolicytowardsearlystructuralpruning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0251bbb360796693eaa4bb216b2413a7382b9adf --- /dev/null +++ b/whentopruneapolicytowardsearlystructuralpruning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60f1f3e348b04c5dd8c398c144ee06dbc43ccf88110b79bada1032304adfcdbc +size 422549 diff --git a/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_content_list.json b/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fea4367ebbf6088e11d25ca8f455e417e4dd03e3 --- /dev/null +++ b/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6081d54d380e20d03c358f708e58fadfe15f25f36d58097c535b7cfdd5d5971 +size 78481 diff --git a/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_model.json b/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7d557095ec72a14aa78b478700a645ec85b2f128 --- /dev/null +++ b/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:868f60fe872267c6fb31cd02ac0cf805d06ea053415caeea71cba141b4676d72 +size 97462 diff --git a/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_origin.pdf b/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3149b8c38fd237a20bd3872a8063336a3ffa08e2 --- /dev/null +++ b/whichimagestolabelforfewshotmedicallandmarkdetection/fc4a8fc8-d273-4f84-ab7c-200bf4515960_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1aa1a64bfa082b8caf20235bc3818bb26ba813044d43eb1fb8e4bcdec010c7b +size 1116476 diff --git a/whichimagestolabelforfewshotmedicallandmarkdetection/full.md b/whichimagestolabelforfewshotmedicallandmarkdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..49408fb7ffcb6b3962e93747a6b769256b78a41b --- /dev/null +++ b/whichimagestolabelforfewshotmedicallandmarkdetection/full.md @@ -0,0 +1,321 @@ +# Which images to label for few-shot medical landmark detection? + +Quan Quan $^{1}$ Qingsong Yao $^{1}$ Jun Li $^{1}$ S.Kevin Zhou $^{2,1}$ $^{1}$ Key Lab of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology + $^{2}$ University of Science and Technology of China + +# Abstract + +The success of deep learning methods relies on the availability of well-labeled large-scale datasets. However, for medical images, annotating such abundant training data often requires experienced radiologists and consumes their limited time. Few-shot learning is developed to alleviate this burden, which achieves competitive performances with only several labeled data. However, a crucial yet previously overlooked problem in few-shot learning is about the selection of template images for annotation before learning, which affects the final performance. We herein propose a novel Sample Choosing Policy (SCP) to select "the most worthy" images for annotation, in the context of few-shot medical landmark detection. SCP consists of three parts: 1) Self-supervised training for building a pre-trained deep model to extract features from radiological images, 2) Key Point Proposal for localizing informative patches, and 3) Representative Score Estimation for searching the most representative samples or templates. The advantage of SCP is demonstrated by various experiments on three widely-used public datasets. For one-shot medical landmark detection, its use reduces the mean radial errors on Cephalometric and HandXray datasets by $14.2\%$ (from $3.595\mathrm{mm}$ to $3.083\mathrm{mm}$ ) and $35.5\%$ (4.114mm to $2.653\mathrm{mm}$ ), respectively. + +# 1. Introduction + +It is widely known that the success of deep learning relies on data availability. Learning from datasets of a larger quantity and higher quality likely brings a higher performance and better generalization for neural networks. Yet, the labeling of datasets needs well-trained, highly-engaged radiologists for medical image analysis tasks [48, 49], which is especially challenging as physicians are costly and busy. + +To alleviate this problem, many researchers [3,17,19,34] utilize labeled data together with unlabeled data in a semisupervised style to boost performance. A classic method is mean teacher [17, 34], which aggregates multiple predictions of unlabeled data by a teacher model pre-trained from + +![](images/63aee8ccbb36a0e29d0ac8d524277a665cb1ac4d10d96588daeb33cb980216cf.jpg) +Figure 1. The distribution of the mean radial error (MRE) when choosing a different image as a template in one-shot medical landmark detection task. The x-axis refers to MRE and the y-axis refers to the percentage of MRE lying in the corresponding ranges. Evidently, the choice of template affects the performance significantly. + +labeled data. The aggregated results work as more reliable pseudo labels for unlabeled data in rest part of the method. Another group of researchers, aiming to achieve a high performance at a low labeling cost, propose a strategy to select instances for annotation incrementally [15, 31, 35, 45]. The basic idea is to first train a model with few labeled data, and then use the model to select instances from unlabeled data iteratively, which are annotated by specialists for the next round of training. Meanwhile, some researchers attempt to drain all potential of limited labeled data. With the power of self-training and self-supervised learning [1,4,24,39,43,47,51], it is possible to develop a robust, few-shot model even with several labeled samples. For example, Yao et al. [42] introduce a self-supervised proxy task that matches multi-layers features from images with different augmentations in the training stage, and use a single image as the template, whose patches centered at landmarks are matched with target images to make predictions. + +However, during our research following the work of [42], we observe an interesting phenomenon (see Figure 1). The template choice highly impacts the final performance. + +The mean radial error (MRE) of our trained model varies from $2.9\mathrm{mm}$ under the "best" template to $4.5\mathrm{mm}$ under the "worst" template. It is evident that there is a large gap lying between the best and the worst choices. Thus, a selection question naturally stands out: Regarding the "gap" over samples, how to find and annotate the most "valuable" images in order to achieve the best performance with a deep model trained under such a limited supervision? To the best of our knowledge, there is no ready answer to the above question. In this paper, we attempt to fill this blank. + +To answer this question, we have to address three difficulties. (1) No supervised signal: For a landmark detection task, there are no labels to guide our image selection — We need to find substitutes for landmarks; (2) No proper metric: Mean radial error (MRE) is often employed as a performance metric for landmark detection, but we cannot compute MRE when no landmarks are available — we need to find proxy for MRE; (3) Missing effective feature extraction: Can we train a deep model that effectively extracts the features for template selection? + +In this paper, we propose a framework named Sample Choosing Policy (SCP) to find the most annotation-worthy images as templates. First, to handle the situation of no landmark label, we choose handcrafted key points as substitutes for landmarks of interest. Second, to replace the MRE, we proposed to use a similarity score between a template and the rest based on the features of such potential key points. Third, considering landmark detection is a pixel-wise task, we apply pixel-wise self-supervised learning with all non-labeled data to build a basic feature extractor, which extracts features from each image. Finally, we can find out the subset of images with the highest similarities as the candidate templates to be labeled, from which a model is learned for few-shot landmark detection. With the help of SCP, we improve the MRE performance of one-shot medical landmark detection from $3.595\mathrm{mm}$ (with a random template) to $3.083\mathrm{mm}$ (with our selected template) in Cephalometric Xray dataset and $4.114\mathrm{mm}$ (with a random template) to $2.635\mathrm{mm}$ (with our selected template) in Hand Xray dataset; refer to Section 4. + +# 2. Related Work + +# 2.1. Active Learning + +Active Learning queries a user interactively to label picked examples, while maximizing the performance gain of neural networks [10, 29, 33, 35, 45, 50]. In active learning, the model is first initialized by a subset of annotated examples, and then a certain strategy is suggested to select samples to label from the unlabeled data pool. The decision of selecting a sample depends on the information gained from the model, which is measured by entropy, divergence, gradients, etc. For example, the decision-making + +![](images/22fe34ff931a62a143add8a4da82ed82ee32880a3787ae8334c6193bcfde1b65.jpg) +Figure 2. Difference from active learning. Deep models can remember and cluster the images or patterns they viewed. Instead of active learning (AL) tending to find the unfamiliar examples, our goal is to find the ones nearest to the center of latent space which we think more representative and important when only several images can be labeled. + +![](images/d0b37e25f04ab911396c140c5713647f23636297c0a96c4aaa06849ca9b8cb3a.jpg) + +strategy in [31, 35] is formed by a discriminator, assisted by a variational auto-encoder (VAE) that encodes the distribution of labeled data in a latent space. Kim et al [15] improve the strategy from a task perspective by updating it from a task-agnostic to task-aware style. More precisely, every selection in active learning aims to find hard examples in unlabeled dataset. However, the aforementioned selection question should be answered by a specific partition of samples, whose distribution is ideally as close as possible to the entire dataset, not just unfamiliar examples (Figure 2). In addition, some active learning methods like [29] also aim to collect core samples but require a labeled subset as a prerequisite. Given that, active learning is not the key to solving the selection problem. + +# 2.2. Self-supervised Learning + +Self-supervised learning (SSL) leverages information in data itself as the supervision, providing a solution for training from unlabeled data. Among all varieties of SSL, contrastive learning (CL) is one of the most powerful paradigms, leading to state-of-the-art performances in many vision tasks. Contrastive learning aims to pull the representations of similar samples closer, and dissimilar ones far apart. Most existing methods, like MoCo [7, 12], SimCLR [5, 6], BYOL [9] and BarlowTwins [44], are designed and optimized in instance-level comparisons, benefit the trained model with more discriminative and generalized representations. But it leads to sub-optimal representations for downstream tasks requiring pixel-level prediction, e.g., segmentation, object detection, and landmark detection. Recently there are some pixel-level methods attempting to learn dense feature representations. Multi-scale pixel-wise contrastive proxy task based on InfoNCE loss [11, 23] is introduced in [42] and achieves great performance in medical + +landmark detection, which is used for our feature extractor. + +# 2.3. Few-shot Learning + +Neural networks are often hampered when there are only a few training samples to provide supervisory signals. Few-shot learning (FSL) [16,21,27,52] is proposed to tackle this data scarcity problem, utilizing external prior knowledge to discover patterns in data. FSL has been employed successfully in tasks like segmentation [22, 46], detection [8, 32], etc. A typical example of FSL is the pretrain-finetune paradigm. For example, Bjorn et al. [2] leverage image reconstruction to pretrain a model, and finetune it with a few samples for the target facial landmark task. For medical landmark detection, some researchers treat the few labeled samples as templates. They start with a pre-trained model from other unlabeled data and make the predictions by matching target instances and templates. Yao et al. [42] introduce a pixel-wise multi-layer proxy task for self-supervision, which provides more generalized features utilized in the template-matching process. Lei et al. [18] propose another proxy task of predicting the relative offsets of two patches from an identical image. Not only that, the relative offsets also work as a metric in template matching. + +# 3. Method + +In this section, we introduce the proposed framework named Sample Choosing Policy (SCP) in detail. + +# 3.1. Sample choosing policy + +Landmark detection using template matching. Given a template $T$ , landmark detection for an image $X$ is first implemented via classical template matching. + +Denote the set of landmark by $P = \{p_1, p_2, \ldots, p_L\}$ . Suppose that $p_l^T \in P^T$ is the $l^{th}$ landmark point in the template $T$ , its corresponding landmark $p_l^X$ in the image $X$ is found by the following searching-and-maximizing problem: + +$$ +p _ {l} ^ {X} = \arg \max _ {p} s \left[ F _ {\theta} \circ T \left(p _ {l} ^ {T}\right), F _ {\theta} \circ X (p) \right]; p _ {l} ^ {T} \in P ^ {T}, \tag {1} +$$ + +where $p$ is coordinates of a pixel, $s$ is a similarity function, $F_{\theta}$ is a feature extractor, and $F_{\theta} \circ X(p)$ computes the feature map for the image $X$ and then extracts the feature vector at pixel $p$ . The maximum value of the similarity function $s$ achieved by $p_l^X$ is denoted by $r_l[T \to X]$ : + +$$ +r _ {l} [ T \rightarrow X ] = s [ F _ {\theta} \circ T (p _ {l} ^ {T}), F _ {\theta} \circ X (p _ {l} ^ {X}) ]. \qquad (2) +$$ + +The above landmark detection process considers only one template. When there are multiple templates $\{T_1, T_2, \ldots, T_M\}$ indexed by $m = 1:M$ , template matching is implemented by + +$$ +\left(m _ {l}, p _ {l} ^ {X}\right) = \arg \max _ {(m, p)} s \left[ F _ {\theta} \circ T _ {m} \left(p _ {l} ^ {T}\right), F _ {\theta} \circ X (p) \right], \tag {3} +$$ + +which finds the best template $T_{m_l}$ for each landmark $l$ as well as the matched landmark location $p_l^X$ . By the same token, the maximum value of the similarity function $s$ achieved by $(m_l, p_l^X)$ is denoted by $\hat{r}_l[\{T_m\} \to X]$ : + +$$ +\hat {r} _ {l} [ \{T _ {m} \} \to X ] = s [ F _ {\theta} \circ T _ {m _ {l}} (p _ {l} ^ {T}), F _ {\theta} \circ X (p _ {l} ^ {X}) ]. \quad (4) +$$ + +For the choice of similarity function, we utilize the commonly used cosine similarity function: + +$$ +s \left[ v ^ {T}, v ^ {X} \right] = \operatorname {C o s S i m} \left(v ^ {T}, v ^ {X}\right) = \frac {\left\langle v ^ {T} \cdot v ^ {X} \right\rangle}{\left| \left| v ^ {T} \right| \right| _ {2} \cdot \left| \left| v ^ {X} \right| \right| _ {2}}, \tag {5} +$$ + +where $v$ is a feature vector. + +Template selection. To single out the best $M$ templates among a set of images $\Omega = \{X_1, X_2, \ldots, X_N\}$ , we aim to seek the set of templates $\{T_m\}$ that contains "the most similar" landmark information for all landmarks and with respect to all images: + +$$ +\left\{\hat {T} _ {m} \right\} = \arg \max _ {\left\{T _ {m} \right\} \subset \Omega} \frac {1}{N} \sum_ {n} \frac {1}{L} \sum_ {l} \hat {r} _ {l} \left[\left\{T _ {m} \right\}\rightarrow X _ {n} \right]. \tag {6} +$$ + +The above optimization is combinatorial in nature as there are $\binom{N}{M}$ possible combinations, which are nearly impossible to exhaust in practice except for very small $M$ . Therefore, we randomly sample a large number (say 10,000) of combinations and pick the maximizing combination as an approximate solution. + +Substituting landmarks with key points. To implement template selection per Eq. (6), the knowledge of landmarks is assumed. However, even such knowledge is nonexistent before template selection. Therefore, we proposed to utilize potential key points to substitute landmarks. In particular, we utilize the classical multi-scale detector, SIFT, to find key points, where landmarks are likely to co-locate. + +For each image $X\in \Omega$ , we apply SIFT to get its corresponding $K$ key points $Q^{X} = \{q_{1}^{X},q_{2}^{X},\ldots ,q_{K}^{X}\}$ with the highest responses. Further, the SIFT key points for different images are not in correspondence, directly applying Eq. (3) is not possible. To address such an issue, we perform the template matching in a reverse order, that is, for an image $X$ with its key points $Q^{X}$ , we perform the following for each key point $q_{k}^{X}$ .. + +$$ +\left(m _ {k}, q _ {k} ^ {T}\right) = \arg \max _ {(m, q)} s \left[ F _ {\theta} \circ T _ {m} (q), F _ {\theta} \circ X \left(q _ {k} ^ {X}\right) \right], \tag {7} +$$ + +and record the achieved maximum as + +$$ +\hat {r} _ {k} \left[ X \rightarrow \left\{T _ {m} \right\}\right] = s \left[ F _ {\theta} \circ T _ {m _ {k}} \left(q _ {k} ^ {T}\right), F _ {\theta} \circ X \left(q _ {k} ^ {X}\right)\right]. \tag {8} +$$ + +Finally, we define the average similarity $R$ as the representative score of $\{T_m\}$ : + +$$ +R [ \{T _ {m} \} ] = \frac {1}{N} \sum_ {n} \frac {1}{K} \sum_ {k} \hat {r} _ {k} [ X _ {n} \rightarrow \{T _ {m} \} ]. \tag {9} +$$ + +![](images/be3ec356d911e2d8d576fa194eb2ddb190e75ea3999a06ca273f4d5c5747612b.jpg) +Figure 3. Overview of Sample Choosing Policy (SCP): SCP consists of three stages. Stage 1: Extract features $f_{i}$ from image $X_{i}$ via a self-trained deep model. Stage 2: Detect key points $Q^{X_{i}}$ by traditional method like SIFT from image $X_{i}$ . Stage 3: Evaluate similarities between filtered features $\hat{f}_{i}$ and features $g$ of templates $\{T_{m}\}$ , and record the average similarity $R[\{T_{m}\}]$ . The combination of templates with highest similarity $\hat{R}$ are selected as $\{\hat{T}_m\}$ . + +and Eq. (6) is accordingly adapted: + +$$ +\left\{\hat {T} _ {m} \right\} = \arg \max _ {\left\{T _ {m} \right\} \subset \Omega} R [ \left\{T _ {m} \right\} ] \tag {10} +$$ + +Construction of feature extractor using contrastive learning. To answer the question that what kind of deep model can support us to make selection, we start our analysis of Eq. (1), which maximizes the similarities between the same landmarks from different images. + +Without landmark labeling, we resort to contrastive learning, which is proven to be a reliable tool to learn a basic model without using any label information. Here, instead of instance-level self-supervised learning for visual recognition [9, 44], we adapt it for achieving the goal of (1). We do so by narrowing the distance between different views of an identical patch and extend the distance between different patches. For example, InfoNCE loss [23] is widely used and applied in our training for feature extractor, + +$$ +\mathcal {L} _ {\text {I n f o N C E}} = - \mathbb {E} \left[ \log \frac {\exp (\alpha)}{\exp (\alpha) + \sum \exp \left(\alpha^ {\prime}\right)} \right]; \tag {11} +$$ + +$$ +\alpha = s \left[ F _ {\theta} \circ X (p), F _ {\theta} \circ X _ {a u g} (p) \right]; +$$ + +$$ +\alpha^ {\prime} = s [ F _ {\theta} \circ X (p), F _ {\theta} \circ X (q) ], +$$ + +where $X_{aug}$ is a different version of $X$ by augmentation, and $p$ and $q$ are two different key points. + +We follow [41, 42] to construct a deep model trained via multi-layer pixel-wise contrastive loss function as our feature extractor. According to [42], we use VGG [30] as the backbone, followed with 5 blocks to reduce the dimension. + +This model is trained with a pixel-wise matching proxy task for over 500 epochs. + +The overall template selection pipeline. Based on the above discussion, our pipeline is summarized as in Figure 3, assuming the availability of the feature extractor $F_{\theta}$ , which is learned using the self-supervised pixel-wise matching task. First, we extract features from all images $\Omega$ and candidate templates $\{T_m\}$ for the following operations. Second, we extract key points $Q^{X}$ with the help of traditional key point detector SIFT. Third, we pair each image $X_{n}$ and the template group $\{T_m\}$ to obtain the similarity $r_n$ between $X_{n}$ and $\{T_m\}$ (Eq. (8)). The mean similarity $R_{\{T_m\}}$ of all pairs of $X_{n}$ and $\{T_m\}$ indicate the "representativeness" of $\{T_m\}$ to the whole dataset, and the best group of templates $\{\hat{T}_m\}$ achieving the maximum of mean similarity are our final selection (Eq. (9)). + +# 3.2. Refined landmark detection + +While landmark detection is implemented as template matching in Section 3.1, its detection performance is still limited as its feature detector is geared for all pixels not specifically for the landmarks. We further follow [42] to improve the detection of landmarks via semi-supervised learning. Another landmark detection deep model with a heatmap predictor and two offset predictors (offsets in x- and y-axis) is built for distilling with pseudo landmark labels predicted by the previous template matching model. The performance of the distilled model is geared toward landmarks of interest and is better than the previous model. + +![](images/f26a6eba43f732b82bdec1c623cae6cb84198ba23d1f469be46358f485c558cf.jpg) +Figure 4. Visual Comparison of templates from our policy and random selection. Column "Template/Test 1/Test 2" refers to the templates and two test images. The row "Ours" and "Random" refers to the template selected by our method and random selection, respectively. As shown in red dashed boxes, our template outperforms the random selected template in visualization. + +# 4. Experiments + +# 4.1. Datasets + +Cephalometric Xray: It is a widely-used public dataset for cephalometric landmark detection, containing 400 radiographs, and is provided in IEEE ISBI 2015 Challenge [14, 37]. There are 19 landmarks of anatomical significance labeled by 2 expert doctors in each radiograph. The averaged version of annotations by two doctors is set as the ground truth. The image size is $1935 \times 2400$ and the pixel spacing is $0.1\mathrm{mm}$ . The dataset is split into 150 and 250 for training and testing respectively, referring to the official division. + +Hand Xray: It is also a public dataset including 909 X-ray images of hands. The setting of this dataset follows [25]. The first 609 images are used for training and the rest for testing. The image size varies among a small range, so all images are resized to $384 \times 384$ . + +WFLW: This dataset is from [38] containing 10,000 faces with 7500 and 2500 in training and test sets, respectively. All images are collected from the WIDER FACE dataset [40] and manually labeled with 98 landmarks. The dataset contains different test subsets where the image appearances vary due to variations in pose, expression, and/or illumination or the presence of blur, occlusion, and/or make-up. + +# 4.2. Settings + +Metrics: Following the official challenge [14, 37], mean radial error (MRE) and successful detection rate (SDR) in four radii (2mm, 2.5mm, 3mm, and 4mm) are applied, based on the Euclidean distance between prediction and ground truth. In addition, similarity via Eq. (9) is demonstrated for comparison. For the WFLW dataset, the performance of facial landmark detection is reported by normal + +ized mean error (NME), failure rate at $10\%$ NME (FR@10), and area-under-the-curve (AUC) of the Cumulative Error Distribution (CED) curve. + +Implementation details: All of our models are implemented in PyTorch, accelerated by an NVIDIA RTX GPU. Following [41, 42], the feature extractor is optimized by Adam optimizer for 3500 epochs for self-supervised training. The learning rate is initialized with 0.001, and decayed by half every 500 epochs. It takes 6 hours to converge with batch size set to 8. + +# 4.3. The performance of SCP + +Few-shot medical landmark detection: Firstly, experiments are conducted on different numbers of templates for Cephalometric dataset. For Table 1, $M$ denotes the number of templates used in experiment. The columns "ours" refer to the results achieved by the proposed method, while "random" means to the average results of multiple rounds of training (we use 1,000 trials), with standard variations. The column "best" and "worst" refer to the best or worst results in multiple tries, respectively. + +As shown in Table 1, our approach cannot find the best templates, instead, it finds a fairly good choice well above the average performance. When there is only one template, the best template achieves $2.863\mathrm{mm}$ in MRE. Although the template we choose achieves an MRE of only $3.083\mathrm{mm}$ , it is much better than the average MRE $3.595\mathrm{mm}$ . Another fact revealed by Table 1 is the "diminishing return" phenomenon: As the number of templates increases, the difference of maximum similarities and performances between choices tends to be smaller. In our experiment, we find that when $M$ achieves 75 (half of the dataset) or more, our template selection policy has little effect because of sufficient modeling of the appearance variance in medical images. + +The predictions by one template from our method and random selection are visualized in Figure 4. Our predictions around ears and nose locate more closer to the ground-truth landmarks than those by random template, which has consistent performance in MRE, quantitatively. + +Besides, another group of experiments are conducted on Hand Xray dataset. The proposed SCP is applied on Hand Xray dataset to obtain the suggested $M$ templates. Following settings in [42], evaluation model is built. Results are listed in Table 1, showing reliable improvements (e.g., MRE reduced by $35.5\%$ (4.114mm to 2.653mm)). As reported above, MRE results of 5/10/15 templates perform a bit worse than that of 1 template (e.g., the MRE is 2.891mm for 5 templates, but 2.653mm for 1 template). The dataset size of Hand Xray (609 images) is much bigger than that of Cephalometric (150 images). We speculate that the diversity of Hand Xray dataset could not be well "represented" by such small group of templates. The smaller the number of templates is, the more randomness it underlies. So it + +Table 1. Comparison of different numbers of templates on the ISBI 2015 Challenge [37] and Hand Xray [42] testsets. The landmarks are detected based template matching. + +
DatasetMSimilarity (↑)MRE (↓) (mm)
oursrandomoursrandombestworst
Cephalometric10.5540.519±0.0173.0833.595±0.3812.8634.952
20.6380.604±0.0122.8403.177±0.2272.6614.090
30.6760.646±0.0092.7423.019±0.1872.5733.875
40.6990.672±0.0082.6772.912±0.1642.5123.674
50.7090.690±0.0072.5712.850±0.1412.4863.458
Hand Xray10.3630.288±0.0522.6354.114±3.5662.46843.81
50.5320.482±0.0212.8913.188±0.4932.3776.268
100.6010.547±0.0132.7693.070±0.3462.2894.808
150.6150.581±0.0112.6642.989±0.3112.2594.245
500.6900.673±0.0062.5242.740±0.2192.2403.775
+ +Table 2. Comparison of the state-of-the-art landmark detection approaches and our refined approach on the ISBI 2015 Challenge [37] testset. + +
ModelLabeled imagesMRE (↓) (mm)SDR (↑) (%)
2mm2.5mm3mm4mm
Ibragimov et al. [13]*150-68.1374.6379.7786.87
Lindner et al. [20]*1501.7770.6576.9382.1789.85
Urschler et al. [36]*150-70.2176.9582.0889.01
Payer et al. [26]*150-73.3378.7683.2489.75
Payer et al. [26]†252.5466.1273.2779.8286.82
Yao et al. [42]†252.1755.8366.6576.8889.13
SCP (Ours w/ refinement)252.0658.0068.5279.1390.40
Payer et al. [26]†106.5249.4957.9165.8775.07
Yao et al. [42]†102.3053.1163.5874.3487.17
SCP (Ours w/ refinement)102.2455.4164.6775.2687.38
Payer et al. [26]†512.3427.3532.9438.4845.28
Yao et al. [42]†52.4449.9260.8371.7685.13
SCP (Ours w/ refinement)52.3352.2563.0573.9586.27
Yao et al. [42]†12.9037.1648.0460.0277.72
SCP (Ours w/ refinement)12.7443.7953.0564.1279.05
+ +* copied from their original papers. +$\dagger$ re-implemented with limited labeled images. + +makes sense the results tend to be stable when the number of templates increases. + +Refined landmark detection results: To compare with supervised landmark detection methods, we follow [42] and apply semi-supervised refinement based on the self-supervised results to achieve better performance (refer to Section 3.2). Our methods and [42] are trained with labeled and unlabeled data, while [13, 20, 26, 36] are trained with labeled images. As in Table 2 our method outperforms others when labels are limited (e.g., the MRE is $2.33\mathrm{mm}$ for SCP with 5 labeled images, $2.44\mathrm{mm}$ for [42], and $12.34\mathrm{mm}$ for [26]), and achieves detection results comparable to the supervised methods that are trained based on even more labeled images (e.g., the MRE for [26] with 25 labeled images + +is $2.54\mathrm{mm}$ + +Facial landmark detection: We attempt to apply our templates selection method for [2] to improve the performance on facial landmark detection. The pre-trained model from the first stage of [2] is integrated into the proposed framework, which suggest the $M$ instances with the highest mean similarities ( $M = 50$ in our experiment). In order to eliminate unstable factors, models with the first $M$ instances or instances from our policy are both trained for 5 times. The evaluation is conducted on full and make-up test split of WFLW dataset. The results are listed in Table 3 where our method significantly improves NME from 9.131 to 8.998 in full split and from 8.724 to 8.578 in make-up split. + +Table 3. Improvements on WFLW dataset based on [38] with 50 labeled images. + +
WFLW dataset
FullNME(↓)FR@10(↓)AUC(↑)
Original†9.131±0.31627.506±1.7850.278±0.021
Ours8.998±0.12927.475±0.8400.285±0.002
Make-upNME(↓)FR@10(↓)AUC(↑)
Original†8.724±0.05425.79±1.6890.283±0.003
Ours8.578±0.18825.79±0.9890.284±0.003
+ +$\dagger$ re-implemented from [2] + +# 5. Ablation Study + +# 5.1. Key Point Proposal + +Q: How good is the use of SIFT key points as substitutes for landmarks? Figure 5 demonstrate the relationship between landmarks and potential key points from handcraft methods in feature level (Eq. (9)). The similarities calculated by potential key points are positively correlated with those by landmarks to a large extent. Thus, we pick the potential key points as the substitutes. It should be noted that excessive key points will not improve performance but increase the computational cost (e.g. $2.571\mathrm{mm}$ for 100 key points and $2.599\mathrm{mm}$ for 150 key points in Table 5), but sparse key points will lead to performance degradation (e.g. MRE increase from $2.571\mathrm{mm}$ to $2.670\mathrm{mm}$ as the number of key points decrease from 100 to 50.) + +Q: Do other kinds of handcrafted key points also work in our framework? In the proposed method, we use SIFT points as the potential key points to avoid estimating features of all pixels. To compare with other key point detection methods, we adopt SIFT, SURF, ORB, and random selection as our key point selectors. For SIFT, SURF, and ORB, we detect the key points and then filter out some very close points. For random selection, we randomly select 100 points as the key points. The results are listed on Table 4, where we find the performance of SURF is close to SIFT, and both greatly exceed the random filtering (e.g., SIFT/SURF are both $2.571\mathrm{mm}$ for 5 templates, and greater than $2.835\mathrm{mm}$ of random points). The locations of ORB key points concentrate in several areas and performs less robust than SIFT and SURF. + +# 5.2. Selection Policy + +Q: How good is the proposed similarity correlated with MRE? The metric of MRE is widely used for evaluating the landmark detection performance. Therefore, it is of interest to know how the proposed similarity is correlated with MRE. Figure 6 presents such a plot, which nicely shows a strong (negative) correlation coefficient of $-0.675$ . This enables us to utilize the proposed similarity function as a + +![](images/ee230d3505067aa7be1a2377668f4b1c868e25bd7f751f6f64adfd5476054922.jpg) +Figure 5. Similarities of potential key points vs. landmarks. The correlation coefficient (CC) of potential key points and landmarks is 0.462, thus we think it is feasible to replace landmarks with potential key points when estimating similarities. + +![](images/13ec3a42dd90a2ed3225a9a4b40b8acb5cfb3aca63e3206c931244c50d8a86f7.jpg) +Figure 6. Mean Similarity vs. Mean Radial Error (MRE). Similarities are estimated by calculating the average similarities of all landmarks. The correlation coefficient (CC) of the two indicators is -0.675, indicating a strong, negative correlation. + +proxy of MRE, which is more convenient for us to estimate when there is no label. + +$Q$ : What about other selection methods? We also try some other methods based on ideas from active learning. VAAL [31] is a typical active learning framework which we re-implement and start with random 5 instances. Next, we obtain $N(N = 5)$ instances suggested by VAAL to be templates. Uncertainty and Entropy are also common tools for active learning [28]. We re-implement the framework by connecting one encoder with two classifiers, and train by classifying all instances and enlarging the difference of outputs from two classifiers. Finally, we estimate the entropy + +Table 4. Comparison for different SSL methods and different traditional key point detectors on Cephalometric dataset. + +
MMRE (↓) (mm)
OursSSL methodsKey Point Detectors
BYOL-m [9]BYOL [9]SIFTSURFORBRandom
13.0833.3663.3623.0803.2083.6683.181
22.8463.0863.0852.8462.9013.2963.219
32.7433.0082.8772.7432.7872.8962.860
42.6732.8942.7612.6732.6212.6212.887
52.5712.7622.7392.5712.5712.6772.835
+ +Table 5. Ablation study of different number of SIFT key points and searches for selecting best templates on Cephalometric dataset. + +
AblationNumSimilarity (↑)MRE (↓) (mm)
Keypoints500.71282.670
750.70992.623
1000.71172.571
1500.71052.599
Searches10000.70802.711
100000.71052.703
500000.71082.577
1000000.71172.571
+ +Table 6. Comparison with different sampling methods on Cephalometric dataset. + +
MethodSimilarity(↑)MRE(↓) (mm)
Ours0.7092.571
VAAL [31]0.691±0.0042.851±0.077
Loss(MSE)0.695±0.0082.766±0.093
Uncertainty0.694±0.0052.876±0.074
Entropy0.692±0.0062.847±0.094
+ +(of one-hot vectors), uncertainty (difference of two classifiers) and loss as metrics to suggest templates to label. As shown in Table 6, VAAL needs labeled data to initialize, and performs badly in only one iteration. MSE works while uncertainty and entropy are not, where the probable reason is that patterns in medical images appear simple for both classifiers which give similar predictions and cause very low uncertainty for all images and low entropy to distinguish instances clearly. + +Q: How does the number of combinations affect the final performance? As the number of templates increase, it becomes much harder to iterate all combinations. Therefore, we randomly choose the templates in limited iterations to find the best combination. We conduct an experiment about the number of random selections which is shown in Table 5. As the number of random selections increases, we have more chances to find the combination with a larger similarity, which yields better landmark detection perfor + +mance. + +# 5.3. Self-supervised Method + +Q: Can self-supervised methods affect our performance? In the proposed method, we leverage the proxy task in [42] to pre-train our feature extractor. In addition, we implement other self-supervised methods, including BYOL [9] in pixel level, and BYOL with multi-layer training (BYOL-m). From Table 4 we discover the strong correlation between the performance of self-supervised models and the quality of selection results and our model with multi-layer InfoNCE outperforms others in feature extraction (e.g. $3.083\mathrm{mm}$ for ours and $3.366 / 3.263\mathrm{mm}$ for others) due to more fitting the landmark detection task. + +# 6. Conclusion and Future work + +We propose Sample Choice Policy (SCP) for few-shot medical landmark detection task, a novel framework for screening out the representative instances to reduce labor on annotation and achieve high performance simultaneously. SCP learns to map the consistent anatomical information into feature spaces by solving a self-supervised proxy task and extracting representative patches from all images in the first stage. Simultaneously, SCP leverages traditional key point detector to pick out valuable patches with a large local variation or steep edges in images as the representatives. Finally, SCP estimates the relevance between images by averaging the similarities between their representative patches, and selects the images with high average relevance with all other images. Our extensive experiments show that SCP outperforms the conventional policies of template selection and, after refinement, achieves state-of-the-art performances for few-shot medical landmark detection. In the future, we plan to further improve the efficiency and accuracy of finding out the best templates by designing deep models that extract more representative features and to explore the idea of template selection for other applications such as image segmentation. + +# References + +[1] Riddhish Bhalodia, Ladislav Kavan, and Ross T Whitaker. Self-supervised discovery of anatomical shape landmarks. In MICCAI, pages 627-638. Springer, 2020. 1 +[2] Björn Browatzki and Christian Wallraven. 3fabrec: Fast few-shot face alignment by reconstruction. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 6109-6119. IEEE, 2020. 3, 6, 7 +[3] Runnan Chen, Yuexin Ma, Lingjie Liu, Nenglun Chen, Zhiming Cui, Guodong Wei, and Wenping Wang. Semi-supervised anatomical landmark detection via shape-regulated self-training. arXiv preprint arXiv:2105.13593, 2021. 1 +[4] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, pages 1597-1607. PMLR, 2020. 1 +[5] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey E. Hinton. A simple framework for contrastive learning of visual representations. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 1597-1607. PMLR, 2020. 2 +[6] Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey E. Hinton. Big self-supervised models are strong semi-supervised learners. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. 2 +[7] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. 2 +[8] Zhibo Fan, Yuchen Ma, Zeming Li, and Jian Sun. Generalized few-shot object detection without forgetting. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 4527-4536. Computer Vision Foundation / IEEE, 2021. 3 +[9] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H. Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Ávila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, and Michal Valko. Bootstrap your own latent - A new approach to self-supervised learning. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. 2, 4, 8 +[10] Denis A. Gudovskiy, Alec Hodgkinson, Takuya Yamaguchi, and Sotaro Tsukizawa. Deep active learning for biased datasets via fisher kernel self-supervision. In 2020 IEEE/CVF Conference on Computer Vision and Pattern + +Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 9038-9046. Computer Vision Foundation / IEEE, 2020. 2 +[11] Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Yee Whye Teh and D. Mike Titterington, editors, Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2010, Chia Laguna Resort, Sardinia, Italy, May 13-15, 2010, volume 9 of JMLR Proceedings, pages 297-304. JMLR.org, 2010. 2 +[12] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross B. Girshick. Momentum contrast for unsupervised visual representation learning. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 9726-9735. Computer Vision Foundation / IEEE, 2020. 2 +[13] Bulat Ibragimov, Boštjan Likar, F Pernus, and Tomáž Vrtovec. Computerized cephalometry by game theory with shape-and appearance-based landmark refinement. 2015. 6 +[14] Kaggle. Cephalometric X-Ray Landmarks Detection Challenge, https://www.kaggle.com/jiahongqian/cephalometric-landmarks/discussion/133268.5 +[15] Kwanyoung Kim, Dongwon Park, Kwang In Kim, and Se Young Chun. Task-aware variational adversarial active learning. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 8166-8175. Computer Vision Foundation / IEEE, 2021. 1, 2 +[16] Namyeong Kwon, Hwidong Na, Gabriel Huang, and Simon Lacoste-Julien. Repurposing pretrained models for robust out-of-domain few-shot learning. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021. 3 +[17] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016. 1 +[18] Wenhui Lei, Wei Xu, Ran Gu, Hao Fu, Shaoting Zhang, and Guotai Wang. Contrastive learning of relative position regression for one-shot object localization in 3d medical images, 2021. 3 +[19] Han Li, Long Chen, Hu Han, and S. Kevin Zhou. Conditional training with bounding map for universal lesion detection. CoRR, abs/2103.12277, 2021. 1 +[20] Claudia Lindner and Tim F Cootes. Fully automatic cephalometric evaluation using random forest regression-voting. Scientific Reports, 6:33581, 2016. 6 +[21] Lu Liu, William L. Hamilton, Guodong Long, Jing Jiang, and Hugo Larochelle. A universal representation transformer layer for few-shot image classification. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021. 3 +[22] Khoi Nguyen and Sinisa Todorovic. FAPIS: A few-shot anchor-free part-based instance segmenter. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR + +2021, virtual, June 19-25, 2021, pages 11099-11108. Computer Vision Foundation / IEEE, 2021. 3 +[23] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 2, 4 +[24] Cheng Ouyang, Carlo Biffi, Chen Chen, Turkay Kart, Huaqi Qiu, and Daniel Rueckert. Self-supervision with superpixels: Training few-shot medical image segmentation without annotation. In ECCV, pages 762-780. Springer, 2020. 1 +[25] Christian Payer, Darko Stern, Horst Bischof, and Martin Urschler. Integrating spatial configuration into heatmap regression based cnns for landmark localization. Medical Image Anal., 54:207-219, 2019. 5 +[26] Christian Payer, Darko Štern, Horst Bischof, and Martin Urschler. Integrating spatial configuration into heatmap regression based cnns for landmark localization. Medical image analysis, 54:207-219, 2019. 6 +[27] Mengye Ren, Michael Louis Iuzzolino, Michael Curtis Mozer, and Richard S. Zemel. Wandering within a world: Online contextualized few-shot learning. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021. 3 +[28] Pengzhen Ren, Yun Xiao, Xiaojun Chang, Po-Yao Huang, Zhihui Li, Xiaojiang Chen, and Xin Wang. A survey of deep active learning. CoRR, abs/2009.00236, 2020. 7 +[29] Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: A core-set approach. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018. 2 +[30] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. 4 +[31] Samarth Sinha, Sayna Ebrahimi, and Trevor Darrell. Variational adversarial active learning. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 5971-5980. IEEE, 2019. 1, 2, 7, 8 +[32] Bo Sun, Banghuai Li, Shengcai Cai, Ye Yuan, and Chi Zhang. FSCE: few-shot object detection via contrastive proposal encoding. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 7352-7362. Computer Vision Foundation / IEEE, 2021. 3 +[33] Iiris Sundin, Peter Schulam, Eero Siivola, Aki Vehtari, Suchi Saria, and Samuel Kaski. Active learning for decision-making from imbalanced observational data. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 6046-6055. PMLR, 2019. 2 +[34] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets im + +prove semi-supervised deep learning results. arXiv preprint arXiv:1703.01780, 2017. 1 +[35] Toan Tran, Thanh-Toan Do, Ian D. Reid, and Gustavo Carneiro. Bayesian generative active deep learning. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 6295-6304. PMLR, 2019. 1, 2 +[36] Martin Urschler, Thomas Ebner, and Darko Štern. Integrating geometric configuration and appearance information into a unified framework for anatomical landmark localization. Medical image analysis, 43:23-36, 2018. 6 +[37] Ching-Wei Wang, Cheng-Ta Huang, Jia-Hong Lee, Chung-Hsing Li, Sheng-Wei Chang, Ming-Jhih Siao, Tat-Ming Lai, Bulat Ibragimov, Tomaz Vrtovec, Olaf Ronneberger, et al. A benchmark for comparison of dental radiography analysis algorithms. Medical Image Analysis, 31:63-76, 2016. 5, 6 +[38] Wayne Wu, Chen Qian, Shuo Yang, Quan Wang, Yici Cai, and Qiang Zhou. Look at boundary: A boundary-aware face alignment algorithm. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 2129-2138. IEEE Computer Society, 2018. 5, 7 +[39] Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V Le. Self-training with noisy student improves imagenet classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10687-10698, 2020. 1 +[40] Wei Yang, Shuang Li, Wanli Ouyang, Hongsheng Li, and Xiaogang Wang. Learning feature pyramids for human pose estimation. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 1290-1299. IEEE Computer Society, 2017. 5 +[41] Qingsong Yao, Zecheng He, Hu Han, and S Kevin Zhou. Miss the point: Targeted adversarial attack on multiple landmark detection. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 692-702. Springer, 2020. 4, 5 +[42] Qingsong Yao, Quan Quan, Li Xiao, and S. Kevin Zhou. One-shot medical landmark detection. CoRR, abs/2103.04527, 2021. 1, 2, 3, 4, 5, 6, 8 +[43] Qingsong Yao, Li Xiao, Peihang Liu, and S Kevin Zhou. Label-free segmentation of Covid-19 lesions in lung ct. IEEE Transactions on Medical Imaging, 2021. 1 +[44] Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny. Barlow twins: Self-supervised learning via redundancy reduction. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 12310-12320. PMLR, 2021. 2, 4 +[45] Beichen Zhang, Liang Li, Shijie Yang, Shuhui Wang, Zheng-Jun Zha, and Qingming Huang. State-relabeling adversarial active learning. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 8753-8762. Computer Vision Foundation / IEEE, 2020. 1, 2 + +[46] Na Zhao, Tat-Seng Chua, and Gim Hee Lee. Few-shot 3d point cloud semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 8873-8882. Computer Vision Foundation / IEEE, 2021. 3 +[47] Hong-Yu Zhou, Shuang Yu, Cheng Bian, Yifan Hu, Kai Ma, and Yefeng Zheng. Comparing to learn: Surpassing image pretraining on radiographs by comparing image representations. In MICCAI, pages 398-407. Springer, 2020. 1 +[48] S. Kevin Zhou, Hayit Greenspan, Christos Davatzikos, James S. Duncan, Bram van Ginneken, Anant Madabhushi, Jerry L. Prince, Daniel Rueckert, and Ronald M. Summers. A review of deep learning in medical imaging: Imaging traits, technology trends, case studies with progress highlights, and future promises. Proceedings of the IEEE, 2021. 1 +[49] S. Kevin Zhou, Daniel Rueckert, and Gabor Fichtinger. Handbook of Medical Image Computing and Computer-Assisted Intervention. Academic Press, 2019. 1 +[50] Zongwei Zhou, Jae Y. Shin, Lei Zhang, Suryakanth R. Gurudu, Michael B. Gotway, and Jianming Liang. Fine-tuning convolutional neural networks for biomedical image analysis: Actively and incrementally. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 4761-4772. IEEE Computer Society, 2017. 2 +[51] Jiuwen Zhu, Yuexiang Li, Yifan Hu, Kai Ma, S Kevin Zhou, and Yefeng Zheng. Rubik's cube+: A self-supervised feature learning framework for 3d medical image analysis. Medical Image Analysis, 64:101746, 2020. 1 +[52] Kai Zhu, Yang Cao, Wei Zhai, Jie Cheng, and Zheng-Jun Zha. Self-promoted prototype refinement for few-shot class incremental learning. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 6801-6810. Computer Vision Foundation / IEEE, 2021. 3 \ No newline at end of file diff --git a/whichimagestolabelforfewshotmedicallandmarkdetection/images.zip b/whichimagestolabelforfewshotmedicallandmarkdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4064dd96f95e6f0110347ee59e53546c59b0cc3b --- /dev/null +++ b/whichimagestolabelforfewshotmedicallandmarkdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6b994590636189547a0c83c491c00654e4bf91dea2bf214de486cc07456993e +size 632122 diff --git a/whichimagestolabelforfewshotmedicallandmarkdetection/layout.json b/whichimagestolabelforfewshotmedicallandmarkdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..262abac2f7ff44e6466dc51c1d81fa888d5accbe --- /dev/null +++ b/whichimagestolabelforfewshotmedicallandmarkdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8245ac24cb33a935d14d5baa6e0cf0b7f5fa50abc8e855a58e3d12d98a1e6a3 +size 400032 diff --git a/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_content_list.json b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fae1ad41eb1131ef3cd584f066e6cf5f268ed87c --- /dev/null +++ b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3d3b59145f21766fe0acea8ded2b1de42c135625c4828064f72b185ef9e95b3 +size 72119 diff --git a/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_model.json b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bd0aa44b870562d1b2e71ec4697c7068305b5003 --- /dev/null +++ b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3357899ac655b66a6e90217f7244b7bb46c5b709995124d0c896d05d2d482d2 +size 87366 diff --git a/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_origin.pdf b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..86320f31fc0ea0d0506c7a3952072eeb2d985acb --- /dev/null +++ b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/860973ca-9cc2-4376-9760-cc4ac8e97c33_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbaa67c7d2260c1718b1e0246e632bdfb0394b525e18f205068f43916dfc9156 +size 1223452 diff --git a/whichmodeltotransferfindingtheneedleinthegrowinghaystack/full.md b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6ba327c17f822ca7950e94b3237cae52051e9724 --- /dev/null +++ b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/full.md @@ -0,0 +1,268 @@ +# Which Model to Transfer? Finding the Needle in the Growing Haystack + +Cedric Renggli* ETH Zurich + +Andre Susano Pinto +Google Research + +Luka Rimanic ETH Zurich + +Joan Puigserver Google Research + +Carlos Riquelme +Google Research + +Ce Zhang ETH Zurich + +Mario Lucic Google Research + +# Abstract + +Transfer learning has been recently popularized as a data-efficient alternative to training models from scratch, in particular for computer vision tasks where it provides a remarkably solid baseline. The emergence of rich model repositories, such as TensorFlow Hub, enables the practitioners and researchers to unleash the potential of these models across a wide range of downstream tasks. As these repositories keep growing exponentially, efficiently selecting a good model for the task at hand becomes paramount. We provide a formalization of this problem through a familiar notion of regret and introduce the predominant strategies, namely task-agnostic (e.g. ranking models by their ImageNet performance) and task-aware search strategies (such as linear or kNN evaluation). We conduct a large-scale empirical study and show that both task-agnostic and task-aware methods can yield high regret. We then propose a simple and computationally efficient hybrid search strategy which outperforms the existing approaches. We highlight the practical benefits of the proposed solution on a set of 19 diverse vision tasks. + +# 1. Introduction + +Services such as TensorFlow Hub or PyTorch Hub offer a plethora of pre-trained models that often achieve state-of-the-art performance on specific tasks in the vision domain. The predominant approach, namely choosing a pre-trained model and fine-tuning it to the downstream task, is an effective and data efficient approach [12, 13, 18, 23, 33, 35]. Perhaps surprisingly, this approach is also effective when the pre-training task is significantly different from the target task, such as when applying an ImageNet pre-trained model to diabetic retinopathy classification [20]. Fine-tuning often entails adding several more layers to the pre-trained deep network and tuning all the parameters using a limited + +amount of downstream data. Due to the fact that all parameters are being updated, this process can be extremely costly in terms of compute [35]. Fine-tuning all models to find the best performing one is becoming computationally infeasible. A more efficient alternative is to simply train a cheap classifier on top of the learned representation (e.g. pre-logits). However, the performance gap with respect to fine-tuning can be rather large [13, 14]. + +This raises a very practical question: Given a new task, how to pick the best model to fine-tune? This question was intensively studied in recent years and existing approaches can be divided into two groups: (a) task-agnostic model search strategies, which rank pre-trained models independently of the downstream task (e.g. ranking the models by ImageNet accuracy, if available) [14], and (b) task-aware model search strategies, which make use of the downstream dataset in order to rank models (e.g. kNN classifier accuracy as a proxy for fine-tuning accuracy, or using the metalearned Task2Vec representations) [1, 16, 22]. Most of the prior work attempts to answer this question by using a homogeneous sets of pre-trained models whereby the models share the same architecture or they were trained on the same dataset. However, this does not reflect the current landscape of models available in online repositories. + +As a result, several practically relevant questions remained open. Firstly, how do existing methods compare in the presence of both "generalist models" (e.g. models trained on a relatively diverse distribution such as ImageNet) and "expert models" (e.g. trained on domain-specific datasets such as plants), across a diverse collection of datasets? Secondly, is there a method which strikes a good balance between computational cost and performance? + +Our contributions. In this paper, we provide a large-scale, systematic empirical study of these questions. (i) We define and motivate the model search problem through a notion of regret. We conduct the first study of this problem in a realistic setting focusing on heterogeneous model pools. (ii) We consider 19 downstream tasks on a heterogeneous set of 46 models grouped into 5 representative sets. (iii) We highlight the dependence of the performance of each strata + +egy on the constraints of the model pool, and show that, perhaps surprisingly, both task-aware and task-agnostic proxies suffer a large regret on a significant fraction of downstream tasks. (iv) Finally, we develop a hybrid approach which generalizes across model pools as a practical alternative. + +# 2. Background and related work + +We will now introduce the main concepts behind the considered transfer learning approach where the pre-trained model is adapted to the target task by learning a mapping from the intermediate representation to the target labels [21, 29, 31, 32], as illustrated in Figure 1. + +(I) Upstream models. The variety of data sources, losses, neural architectures, and other design decisions, leads to a variety of upstream models. The user has access to these models, but cannot control any of these dimensions, nor access the upstream training data. +(II) Model search. Given no limits on computation, the problem becomes trivial – exhaustively fine-tune each model and pick the best performing one. In practice, however, one is often faced with stringent requirements on computation, and the aim of the second stage in Figure 1 is therefore to select a relatively small set of models for finetuning. Selecting this set of models is the central research question of this paper (cf. Figure 2). +(II A) Task-agnostic search strategies. These approaches rank models before observing the downstream data [14] and consequently select the same model for every task. The most popular approach can be summarized as follows (i) Pick the model with the highest test accuracy on ImageNet, otherwise (ii) pick the one trained on the largest dataset. If there is an (approximate) tie, pick the model with most parameters. +(II B.1) Task-aware search strategies. In contrast to the task-agnostic approach, task-aware methods may use the downstream data, thus requiring additional computation. The idea is to extract the learned representations from the pretrained model, train a linear or a $k\mathrm{NN}$ classifier on those representations, and select the models that achieve highest accuracy. Note that this requires at least one forward-pass for each instance of the dataset, and for every model, so the computational complexity grows linearly with the model pool size. Nevertheless, this approach is usually several orders of magnitude faster than fine-tuning. Strictly speaking, one can apply an early stopping strategy to the fine-tuning procedure which allows a finer control of the accuracy-time tradeoff. We study this in Section 5.4, whereas in Section 6 we discuss and contrast with other task-aware search strategies. +(II B.2) Meta-learned task-aware search strategies. The idea is to calculate the transfer learning performance for each task in a benchmark set. Given a new dataset, the model search part is performed by finding the best model(s) of the nearest benchmark task, for instance given + +by learned task embedding on all the benchmark tasks and the downstream dataset. While a single task embedding can be computed efficiently by training a single probenetwork, meta-learned approaches require to initially evaluate the performance of all models across each benchmark task. In addition, the list of transfer learning performances needs to be expanded whenever either new models or new benchmark datasets are added. We have simulated this setting by considering the most prominent such approach, namely Task2Vec [1], and provide some preliminary results in Appendix H. In Section 6, we elaborate this approach, along with other related work in this category (e.g. such as semantic-based search strategies [6, 27, 34]), and contrast it to the search strategies we consider in this work. +(III) Downstream training. In this stage, the selected model is adapted to the downstream task (cf. Figure 1). The predominant approach is to fully or partially apply the pretrained neural network as a feature extractor. The head (e.g. last linear layer) of the pre-trained model is replaced with a new one, and the whole model is trained on the target data. This process is commonly referred to as fine-tuning and it often outperforms other methods [5, 14, 20, 25]. + +# 3. Computational budget and regret + +The main aim of this work is the study of simple methods to filter and search pre-trained models before stepping into the -more expensive- fine-tuning process. Formally, we define a search method $m(\mathcal{M}, \mathcal{D})$ with budget $B$ as a function which takes a set of models $\mathcal{M}$ and a downstream dataset $\mathcal{D}$ as input, and outputs a set of distinct models $S_{m} \subseteq \mathcal{M}$ with $|\mathcal{S}_{m}| = B$ . Those $B$ models are then all fine-tuned to obtain the best test accuracy on the downstream task $\mathcal{D}$ . + +Budget and regret. Fine-tuning represents the largest computational cost so, accordingly, we define the number of models that are fine-tuned as the computational complexity of a given method. Given any fixed budget $B$ , we would like to return a set $S$ which includes the models resulting in good performance downstream. In particular, we define the notion of absolute regret of a search strategy $m$ and a pool of models $\mathcal{M}$ on dataset $\mathcal{D}$ as + +$$ +\underbrace {\underset {m _ {i} \in \mathcal {M}} {\max } \mathbf {E} [ t (m _ {i} , \mathcal {D}) ]} _ {\text {O R A C L E}} - \underbrace {\mathbf {E} \left[ \underset {s _ {i} \in \mathcal {S} _ {m}} {\max } t (s _ {i} , \mathcal {D}) \right]} _ {s (m)}, \tag {1} +$$ + +where $t(m, \mathcal{D})$ is the test accuracy achieved when fine-tuning model $m$ on dataset $\mathcal{D}$ . The first expectation is taken over the randomness in the $t(\cdot)$ operator, that is, the randomness in fine-tuning and due to a finite sampled test set. In addition to the randomness in $t(\cdot)$ , the second expectation also accounts for any potential randomization in the algorithm that computes $S_m$ . We define $s(m)$ as the expected maximal test accuracy achieved by any model in the set $S_m$ , the set of models returned by a fixed strategy $m$ . In our case, kNN is deterministic as all the downstream data + +![](images/22c790add7b9c02c5c0261b1e054b9abcd550256c8420761151f195bf22295ec.jpg) + +![](images/10b11133ded628216d4bf02d2990eb9b8ae15be2a30356b4d53f9dff97fe2240.jpg) + +![](images/5fdb50d716abc4e0de415898e5125a4e32027b198c5c58cc90bc314b1a9588bd.jpg) + +![](images/378064261059a4c50964e2cac9e11914d0c9cecda824dd4b9ad5560ffa26c1e2.jpg) +Figure 1. Transfer learning setup: (1) Upstream models Pre-training of models from randomly initialized weights on the (large) upstream datasets; (2) Model search Either downstream task independent or by running a proxy task, i.e. fixing the weights of all but the last layer and training a linear classifier or deploying a kNN classifier on the downstream dataset; (3) Downstream training Unfreezing all the weights, optimizing all layers (incl. pre-defined ones) on the downstream dataset. + +![](images/3e0a192f1e55443f4cb69cf4acb69d707e4350e1791141d9cb66c63b834bd74b.jpg) + +![](images/7f7bdf3aa7ad3e726eca7444e23eaa9f836503cff1f2bc7ec6cc3ad522aae813.jpg) + +![](images/8f214f1b2ff1568eeae9c2194896a6ca1f68a9f0bbf0147d814a0b3efa144985.jpg) + +![](images/5f59aeb2ec85459bf77cbf2b595d8675da922feb8a8ed9677a2ac7ad81ec86d7.jpg) +Figure 2. Model search methods: (A) Task-agnostic methods do not see the downstream task, producing the same ranking of models for all possible tasks (e.g. using the highest ImageNet accuracy); (B.1) Task-aware methods deploy a proxy (e.g. linear evaluation) for each model on user's dataset; (B.2) Meta-learned task-aware methods use a collection of datasets ahead of time for the subsequent model search (e.g. Task2Vec [1], exploring dataset similarities and copying the ranking of the closest dataset). + +is used, whereas the linear model depends on the randomness of stochastic gradient descent. To enable comparability between datasets of different difficulty as well as a comparison between two selection strategies $m_{1}$ , and $m_{2}$ , we define their relative delta as + +$$ +\Delta (m _ {1}, m _ {2}) := \frac {s (m _ {1}) - s (m _ {2})}{1 - \operatorname* {m i n} (s (m _ {1}) , s (m _ {2}))}, \tag {2} +$$ + +with $s(\cdot) \in [0,1]$ as defined in Equation 1. Substituting $s(m_1)$ by the ORACLE value, and $s(m_2)$ by $s(m)$ leads to the relative regret $r(m)$ . We discuss the impact of alternative notions in Section 5.4. + +# 4. Experimental design + +Our goal is to assess which model search strategies achieve low regret when presented with a diverse set of models. As discussed, there are three key variables: (i) The + +set of downstream tasks, which serve as a proxy for computing the expected regret of any given strategy, (ii) the model pool, namely the set we explore to find low-regret models, and (iii) the transfer-learning algorithms. + +# 4.1. Datasets and models + +Datasets. We use VTAB-1K, a few-shot learning benchmark composed of 19 tasks partitioned into 3 groups - natural, specialized, and structured [35]. The natural image tasks include images of the natural world captured through standard cameras, representing generic objects, fine-grained classes, or abstract concepts. Specialized tasks contain images captured using specialist equipment, such as medical images or remote sensing. The structured tasks are often derive from artificial environments that target understanding of specific changes between images, such as predicting the distance to an object in a 3D scene (e.g. DeepMind Lab), counting objects (e.g. CLEVR), or detecting orientation (e.g. dSprites for disentangled representations). Each task has 800 training examples, 200 validation examples, and the full test set. This allows us to evaluate model search strategies on a variety of tasks and in a setting where transfer learning offers clear benefits with respect to training from scratch [35]. + +Models. The motivation behind the model pools is to simulate several use-cases that are ubiquitous in practice. We collect 46 classification models (cf. Appendix A): + +15 models trained on the ILSVRC 2012 (ImageNet) classification task [24], including Inception V1-V3 models [28], ResNet V1 and V2 (depth 50, 101, and 152) [10], MobileNet V1 and V2 [11], NasNet [36] and PNASet [15] networks. +16 ResNet-50-V2 models trained on (subsets of) + +JFT [22]. These models are trained on different subsets of a larger dataset and perform significantly better on a small subset of downstream tasks we consider (i.e. they can be considered as experts). + +- 15 models from the VTAB benchmark $^2$ , with a diverse coverage of losses (e.g. generative, self-supervised, self-supervised combined with supervised, etc.) and architectures. In all cases the upstream dataset was ImageNet, but the evaluation was performed across the VTAB benchmark which does not include ImageNet. + +# 4.2. Model pools + +(A) Identifying good resource-constrained models (RESNet-50, DIM2048). Here we consider two cases: (i) RESNet-50: All models with the number of parameters smaller or equal to ResNet50-V2. While the number of parameters is clearly not the ideal predictor, this set roughly captures the models with limited memory footprint and inference time typically used in practice. Most notably, this pool excludes the NasNet and PNsNet architectures, and includes the expert models. (ii) DIM2048: The transfer strategies discussed in Section 2 might be sensitive to the size of the representation. In addition, restricting the representation size is a common constraint in practical settings. Hence, we consider a model pool where the representation dimension is limited to a maximum of 2048. +(B) Identifying expert models in presence of non-experts (EXPERT). We consider a pool of 16 ResNet-50-V2 models from [22]. These models which we considered as experts are trained on different subsets of a larger dataset. As the number of available models and the upstream training regimes increase, the number of such experts is likely to increase. As such, this presents a realistic scenario in which an expert for the target task may be present, but it is hard to identify it due to the presence of other models, some of which might perform well on average. +(C) Do better task-agnostic models transfer better (IMNETACCURACIES)? This pool offers the ability to choose an upstream representation-learning technique that is best suited for a specific downstream task. This pool is mainly used to validate the idea that (a) ImageNet models transfer well across different tasks [9, 12] and that (b) better ImageNet models transfer better [14]. +(D) All models (ALL). Finally, we consider the hardest setting, namely when the model pool contains all 46 models and no conceptual nor computational restrictions are in place. We note that: EXPERT $\subset$ RESNET-50 $\subset$ DIM2048 $\subset$ ALL and IMNETACCURACIES $\subset$ ALL. + +# 4.3. Evaluation procedures + +Fine tuning. To assign a downstream test accuracy to each pair of model and task, we use the median test performance of 5 models obtained as follows: (i) Add a lin + +ear layer followed by a softmax layer and train a model on all examples of the training set. (ii) Fine-tune the obtained model twice, considering two learning rates, and 2500 steps of SGD and a batch size of 512 [35]. (iii) Return the model with the highest validation accuracy. Note that in this case, the entire model, and not only the linear layer, is retrained. As a result, there are 10 runs for each model and we obtain 8740 trained models $(46 \times 19 \times 5 \times 2)$ . + +Linear evaluation. We train a logistic regression classifier added to the model representations (fixed) using SGD. We consider two learning rates (0.1 and 0.01) for 2500 steps and select the model with the best validation accuracy. For robustness we run this procedure 5 times and take the median validation accuracy out of those resulting values. As a result, we obtain again 8740 models. + +$k\mathbf{NN}$ evaluation. We compute the validation accuracy by assigning to each of the 200 validation samples the label of the nearest training example (i.e. $k = 1$ ) using standard Euclidean distance. + +# 5. Key experimental results + +In this section we challenge common assumptions and highlight the most important findings of this study, whilst the extended analysis containing all the plots and tables can be found in the supplementary material. We remark that in the main body we only consider three main pools of models - ALL, RESNET-50 and EXPERT, as we see them as the most representative ones. Since DIM2048 behaves very similarly to RESNET-50, whereas IMNETACCURACIES is used only to confirm the findings of [14], the results of ablation studies involving these two pools can be found in Appendix D. Finally, in this section we mainly investigate linear evaluation as the task-aware choice; all the corresponding plots for kNN can be found in Appendix E. + +# 5.1. High regret of task-agnostic strategies + +Figure 3 shows the results for task-agnostic methods with budget $B = 1$ and $B = 2$ on the ALL, RESNET-50, and EXPERT pools. We observe a significant regret, particularly for RESNET-50 and EXPERT pools (30% of the datasets have a relative regret larger than 25% on those two pools). This highlights the fact that task-agnostic methods are not able to pick expert models, in particular on natural and structured datasets. As more experts become available, this gap is likely to grow, making it clear that task-agnostic strategies are inadequate on its own. + +# 5.2. Are task-aware always a good predictor? + +Intuitively, having access to the downstream dataset should be beneficial. We evaluate both the linear and the $k\mathrm{NN}$ predictor as detailed in Section 4. Figure 4 provides our overall results for the linear model, whereas analogous results for $k\mathrm{NN}$ are presented in Appendix E. The method struggles on some structured datasets (in particular on DSPR-LOC). + +![](images/b3c29956579a2d7fbf6e568ea3ce04b16f02b125b442f5258dc8e2a97aa7b5e8.jpg) + +![](images/63c6c5d74871f7b9d60fa09ecb252db61ae6f8499bc452db448601c0bbbaa048.jpg) + +![](images/8eb12a9ce69ddc0978eaef85b2eeb0346826c545eeb47e4385c477fd2460533a.jpg) + +![](images/53c10807cc9a8576c9903c7bcf683620c539c4924a6f3ca25f5034990815c2d0.jpg) +Figure 4. Task-aware strategies (linear). Relative regret for $B = 1$ (transparent) and $B = 2$ (solid) on the ALL, RESNET-50, and EXPERT pools. Compared to task-agnostic strategies, we observe improvement on natural datasets (except SVHN) and on restricted pools (except DSPR-LOC), due to its ability to properly choose experts. + +![](images/c7f5f831e029683014c50f9b3aa954c1f6d7fc21f7c5b593d3c1854b21b4e197.jpg) +Figure 3. Task-agnostic strategies. Relative regret $(r(m)$ , cf. Section 3) with $B = 1$ (transparent) and $B = 2$ (solid) on the ALL, RESNET-50 and EXPERT pools, bearing in mind that there is only one task-agnostic model in EXPERT. By definition, task-agnostic strategies exclude experts yielding high regret on the RESNET-50 and EXPERT pools, particularly on natural or structured datasets. + +![](images/be0b3a4aeb5d1b9020f44dc9d04095bfd7da9ce366da829065e49a8569d07d8e.jpg) + +Compared to the task-agnostic strategy, as presented in Figure 5 for $B = 1$ , we observe significant improvements on restricted model pools. The EXPERT pool benefits the most: linear evaluation outperforms task-agnostic methods on almost every dataset (task-aware is only outperformed on three datasets by more than $1\%$ , and by $10\%$ in the worst case on the KITTI-DIST dataset). On the other hand, task-agnostic and task-aware strategies seem to outperform each other on a similar number of datasets and by a comparable magnitude in the ALL pool. This suggests that no single strategy uniformly dominates all the others across pools. + +In order to understand this further, we perform an ablation study where we plot the linear and $k$ -NN regret on the IMNETACCURACIES pool in Appendix D. In Figures 15 and 16 we observe that task-aware search methods perform rather poorly when having access only to different architectures trained on the same upstream data. The IMNETACCURACIES models are included in the ALL pool, and in some datasets some of those models are the best-performing ones. + +Performance of the $k\mathrm{NN}$ predictor is on par on half of the datasets across the pools, and slightly worse than linear evaluation on the other half. We present these findings in Figure 20 in Appendix E. + +# 5.3. Hybrid approach yields the best of both worlds + +A hybrid approach that selects both the top-1 task-agnostic model and the top- $(B - 1)$ task-aware models leads to strong overall results. Figure 6 shows how the hybrid + +approach with linear evaluation as the task-aware method significantly outperforms its linear counterpart with $B = 2$ . This is most noticeable in the ALL pool where the task-agnostic model provides a large boost on some datasets. + +As we saw in Figure 5, when looking at the ALL pool, the task-agnostic candidate tends to beat the linear one on datasets such as DSPR-LOC, SVHN or EUROSAT. Similarly, the linear candidate model clearly outperforms its task-agnostic counterpart on many natural datasets such as FLOWERS or PETs. A comparison of Figures 5 and 6 reflects how the dominance of linear-only strategy vanishes on most datasets when confronted with the hybrid approach. For the RESNET-50 and EXPERT pools, as expected, the hybrid algorithm preserves the good picks of the linear proxy. That said, we observe an increase of $36\%$ on DSPR-LOC in the RESNET-50, and $11\%$ on KITTI-DIST. Both are structured datasets on which the linear proxy task performs poorly, as shown in Figure 4. + +The hybrid strategy requires to fine-tune at least two models. Given that it performs well across all model pools and datasets, this is a reasonable price to pay in practice, and we suggest its use as the off-the-shelf approach. Figures 21 and 22 in Appendix E depict the results for $k\mathrm{NN}$ . In Expert models, the second $k\mathrm{NN}$ pick tends to beat the task-agnostic one - hurting the $k\mathrm{NN}$ hybrid outcomes. Overall, the hybrid linear approach consistently outperforms the one based on $k\mathrm{NN}$ . + +![](images/c97950f7b07204d5e3e7cccd8b5edff7ed2ae27e98607cc560ff926a00178c2c.jpg) + +![](images/bbb93692d63bd964a341f2ec6550417024eb1acdb4ffadfeebb53ecf5f5f5e69.jpg) +Figure 6. Hybrid linear (positive if better) vs Linear evaluation (negative if better) for $B = 2$ . We observe that hybrid linear significantly outperforms linear with the same budget on the ALL pool. Even though for RESNET-50 and EXPERT pools there are datasets on which linear performs better than hybrid, the amounts in which it does are usually small. We note that most significant gains of hybrid come on certain structured datasets, the hardest task for every strategy. + +![](images/07891ebe3f3bc1694b24a2efc6a887d33fad2a84a6595745ba0c82306f43cd50.jpg) +Figure 5. Task-agnostic (positive if better) vs Task-aware (linear) (negative if better) for $B = 1$ . On the ALL pool, the methods perform in a similar fashion, with respect to the number of datasets and the amount in which one outperforms the other. When one restricts the pool to RESNET-50 or EXPERT task-aware methods outperform the task-agnostic method on most datasets. The relative delta is defined in Equation 2 in Section 3. + +![](images/89cee3ad8969327811f7c378506f02aaacc8970968a33ad4d8181875dbad32e8.jpg) + +# 5.4. Further ablation studies + +How does the computational budget impact the findings? We have seen that for a limited budget of $B = 2$ the proposed hybrid method outperforms the other strategies. A natural question that follows is: how do these methods perform as a function of the computational budget $B$ ? In particular, for each budget $B$ , we compute how frequently does a strategy pick the best model. The results are shown in Figure 7. We observe that the hybrid linear strategy outperforms all individual strategies on the ALL pool. Furthermore, it also outperforms a strong impractical task-agnostic oracle which is allowed to rank the models by the average fine-tune accuracy over all datasets. Our hybrid strategy achieves an on par performance with the linear approach on pools on which linear performs well. When task-aware strategies perform badly (e.g. pools without expert models), hybrid linear is significantly stronger (as seen in Figure 17 in Appendix D). These empirical results demonstrate that the hybrid strategy is a simple yet effective practical choice for a model search strategy. + +Alternative evaluation scores. Both [14] and [16] compute the correlation between the ImageNet test accuracy and the average fine-tune accuracy across datasets. Although this provides a good task-agnostic evaluation method for the average performance (cf. Figure 1, right, in + +[14]), it can be significantly impacted by outliers that have poor correlations on a specific dataset (cf. Figure 2, middle row, in [14]). In Appendix B we highlight another limitation of using correlation scores in the context of model-search strategies across heterogeneous pools. Nevertheless, we empirically validate that ranking the models based on their ImageNet test accuracy on the IMNETACCURACIES pool transfers well to our evaluation setting (cf. Figure 14 in the Appendix D). Furthermore, we show that reporting the differences of logit-transformed accuracies (log-odds) leads to similar conclusions as ours (cf. Appendix C). We opt for the relative regret $r(m)$ , defined in Section 3, as it is more intuitive and contained in $[-1, 1]$ . + +Impact of the $k\mathrm{NN}$ hyperparameters. The $k\mathrm{NN}$ classifier suffers from the curse of dimensionality [26], which is why we study the impact of the dimension (i.e. the representation size) on the $k\mathrm{NN}$ evaluation. We fix a dataset, and plot a model's $k\mathrm{NN}$ score versus its representation dimension. In order to have a single point per dimension and avoid an over-representation of the expert models that are all of the same architecture, we choose the model with the best $k\mathrm{NN}$ accuracy. By calculating the Pearson correlation coefficient between the dimension and the respective $k\mathrm{NN}$ scores, we observe a moderate anti-correlation $(R < -0.5)$ for 3 datasets, a moderate correlation $(R > 0.5)$ for 3 other + +![](images/da1b31ecb4bd95e898db3f18d00973f97d57f21be107981355fb8a53a01f997e.jpg) + +![](images/49b88abb537f328ed71de515bba26a11d51150f9f413054db48e864681870f29.jpg) +Figure 7. Optimal picks as a function of the computational budget. The number of picked models (relative) with zero regret across three representative pools. We note that hybrid linear outperforms all other methods on ALL, whilst being comparable with the linear strategy on restricted pools where linear alone already performs well. Here, the task-agnostic oracle refers to a method which ranks models based on their average accuracy across all datasets (more details Section 5.4). + +![](images/44b58c00421c01547e692abf554f35c59591b5b1f8fd8185970cfce97adf1b47.jpg) + +![](images/e2e19ee960ab636d4395a83c240b3ea075bc3f29c840adbec0060464605d1adc.jpg) + +datasets, and either small or no correlation for the remaining 13 datasets. Based on this empirical evidence we conclude that there is no significant correlation between the kNN classifier accuracy and the dimension. We provide more details in Figure 23 of Appendix F. Regarding $k$ , our preliminary experiments with $k = 3$ offered no significant advantages over $k = 1$ . + +Early stopping and fine-tuning. Early stopping approach, namely fine-tuning the entire network only for a small number of iterations, allows one to explore the accuracy vs. time tradeoff. However, it is understood that results heavily depend on the neural architectures and hyperparameters used during pre-training (e.g. models trained with Batch normalization necessitate a different strategy). In our experiments, summarized in Appendix I, we do not exhibit any benefits which generalize beyond certain specific settings that would favor this strategy over the simple linear proxy (cf. Figures 28). + +# 6. Other related work + +Given access to the meta-data such as the source datasets, one could compare the upstream and downstream datasets [3]; blend the source and target data by reweighting the upstream data to reflect its similarity to the downstream task [18]; or construct a joint dataset by identifying subsets of the upstream data that are well-aligned with the downstream data [8]. These approaches are restricted to one model per upstream dataset, while also being less practical as they necessitate training a new model as well as access to upstream datasets, which might be unavailable due to proprietary or privacy concerns. + +Additionally, best-arm identification bandits algorithms suggest the successive elimination of sub-optimal choices [7] derived by fine-tuning models for shorter time. This combines model selection and downstream training, noting that it suffers from the same limitations as the partial fine-tuning proxy approach described Section 5.4. + +Other task-aware strategies. Alternative approaches such as H-Score [2], LEEP [19] or NCA [30] replace the + +computation of the linear classifier's weights on top of the frozen weights by using a cheaper estimator for the classifier's accuracy. These estimators are derived using a pseudo label distribution by analyzing the classification output of the pre-trained models. All three approaches have a clear limitation in supporting only those cases in which a classification head for the original task is provided together with each pre-trained model. Furthermore, the theoretical guarantees are given with respect to linear classification models trained on top of the frozen representations only. As observed with LEEP, albeit on natural datasets only, fine-tuning achieves significantly better test accuracies than a linear classifier, which further invites for better understanding of using linear accuracy as a proxy for fine-tuning, noting that linear correlations are not necessarily transitive. Furthermore, training a single linear layer, or calculating the kNN accuracy on top of transformed representations, is typically much less computational demanding than running the inference itself, and both steps can easily be overlapped. Recently, [16] introduced the Mean Silhouette Coefficient (MSC) to forecast a model's performance after fine-tuning on time series data. We omit this approach due to its provable relation to a linear classifier proxy, whilst being similar to $k\mathrm{NN}$ with respect to capturing non-linear relationships. Finally, [22] utilize $k\mathrm{NN}$ as a cheap proxy task for searching models in a set of experts with the same architecture without quantifying and evaluating the regret. LFC/LGC [4] are comparable to the early stopping strategy, which instead of using the gradient at the initialization point to compare models, follows this gradient for a small number of iterations. We note that this related work evaluates its proposed strategy in a fairly homogeneous model pool, a setting in which many task-aware methods and the corresponding early-stopping strategies have less room to fail. + +Meta-learned strategies. Meta-learned search strategies aim at reducing the linear complexity of having to run inference and training a subsequent model with the downstream dataset on all pre-trained models for performing a model search. Such approaches typically contain a + +meta-learning part that precedes the actual search component by making use of a set of benchmark datasets. These datasets do not have to be related to the datasets used to train models upstream. In fact, in our scenario, the upstream datasets are unknown or inaccessible to the model search method, thereby rendering the benchmark datasets independent from the pre-trained models. The computational complexity of performing the search is moved to the meta-learning part by calculating the task embedding and fine-tuning all pre-trained models on a set of benchmark datasets, as described in Section 2 for Task2Vec [1]. This computationally intensive task could be re-used by subsequent model search queries with different downstream datasets, but would typically need to be maintained by the provider of pre-trained model repositories. We simulate the performance of Task2Vec in our experimental setting in Appendix H. We observe that meta-learned task-aware strategies can be improved by task-agnostic search methods (cf. Figure 25) for the budget of $B = 1$ , but not necessarily for a larger budget. Investigating the impact of benchmark datasets and larger fine-tune budget for these methods is beyond the scope of this work and represents an interesting line of future work. + +Another line of related work is Taskonomy [34] which finds the best source dataset(s), or nearest benchmark task in the meta-learned context, by exhaustively exploring the space of all possibilities. While it achieves promising results, it is not directly comparable to our approach: (i) the input domain and data is assumed to remain constant and tasks are only different in their labels, (ii) the chosen architecture keeps the weights of the encoder frozen, and the decoder trained on top usually consists of multiple fully connected layers, opposed to our fine-tuning regime with a single linear layer on top. Improvements by [6] and [27] make Taskonomy faster, but they still do not distinguish multiple models trained on the same dataset, nor bypass the constraints described previously. Finally, for generalization of this approach beyond classification tasks, Mensink et al. [17] extensively studied transfer behaviour across different types of tasks. They suggest that a task-agnostic strategy of selecting the model fine-tune on the largest possible dataset will perform well, whereas if a task-aware strategy is able to find a model trained on a most similar source, if it exists, it should outperform the task-agnostic strategy. + +# 7. Conclusions, limitations, and future work + +Transfer learning offers a data-efficient solution to train models for a range of downstream tasks. As we witness an increasing number of models becoming available in repositories such as TensorFlow Hub, finding the right pre-trained models for target tasks is getting harder. Fine-tuning all of them is not an option. In practice, the computational budget is limited and efficient model search strategies become paramount. We motivate and formalize the problem of ef + +ficient model search through a notion of regret, and argue that regret is better suited to evaluate search algorithms than correlation-based metrics. Empirical evaluation results for the predominant strategies, namely task-agnostic and task-aware search strategies, are presented across several scenarios, showing that both can sometimes yield high regret. In other words, for any individual method we study, there exists a pool of models on which the method fails. Finally, we propose a simple and computationally efficient hybrid search strategy which consistently outperforms the existing approaches over 19 diverse vision tasks and across all the defined model pools. + +Limitations and future work. In order to further stress-test the generalization of analyzed strategies, the number of relevant model pools could be increased by incorporating more diverse upstream tasks, in particular neural architectures, losses, and datasets. This would potentially yield more expert models, making the task both more challenging and more important, further highlighting the advantages of an effective search strategy. Secondly, we observe that task-aware methods consistently perform poorly in specific cases, such as when we consider diverse architectures trained only on ImageNet. There is no obvious reason for such failures. Similarly, there seems to be a clear pattern where task-aware methods perform significantly worse on structured datasets than on natural ones. We hypothesize that this is due to the lack of adequate expert models for these domains. However, an in-depth analysis of these specific cases might be beneficial and insightful. + +Social impact. We examine and propose a mixed model search strategy focusing solely on maximizing downstream accuracy. Applying such a search strategy blindly might enable hurtful biases present in pre-trained models, or in the datasets used to train the models upstream, to propagate into the models trained downstream. Quantifying the impact of transfer learning and different search strategies beyond accuracy is left as future work, whereby we encourage users of online pre-trained models to check for biases and fairness issues after fine-tuning on their custom datasets. + +Acknowledgements. We thank Jeremiah for the inspiration to work on a search functionality of TF-Hub models, and Josip for reviewing our paper internally. CZ and the DS3Lab gratefully acknowledge the support from the Swiss State Secretariat for Education, Research and Innovation (SERI)'s Backup Funding Scheme for European Research Council (ERC) Starting Grant TRIDENT (101042665), the Swiss National Science Foundation (Project Number 200021_184628, and 197485), Innosuisse/SNF BRIDGE Discovery (Project Number 40B2-0_187132), European Union Horizon 2020 Research and Innovation Programme (DAPHNE, 957407), Botnar Research Centre for Child Health, Swiss Data Science Center, Alibaba, Cisco, eBay, Google Focused Research Awards, Kuaishou Inc., Oracle Labs, Zurich Insurance, and the Department of Computer Science at ETH Zurich. + +# 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. IEEE International Conference on Computer Vision, pages 6430-6439, 2019. 1, 2, 3, 8, 23 +[2] Yajie Bao, Yang Li, Shao-Lun Huang, Lin Zhang, Lizhong Zheng, Amir Zamir, and Leonidas Guibas. An information-theoretic approach to transferability in task transfer learning. IEEE International Conference on Image Processing, pages 2309-2313, 2019. 7 +[3] Bishwaranjan Bhattacharjee, John R Kender, Matthew Hill, Parijit Dube, Siyu Huo, Michael R Glass, Brian Belgodere, Sharath Pankanti, Noel Codella, and Patrick Watson. P21: Predicting transfer learning for images and semantic relations. IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 760-761, 2020. 7 +[4] Aditya Deshpande, Alessandro Achille, Avinash Ravichandran, Hao Li, Luca Zancato, Charless Fowlkes, Rahul Bhotika, Stefano Soatto, and Pietro Perona. A linearized framework and a new benchmark for model selection for fine-tuning. arXiv preprint arXiv:2102.00084, 2021. 7 +[5] 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. International Conference on Machine Learning, 2014. 2 +[6] Kshitij Dwivedi, Jiahui Huang, Radoslaw Martin Cichy, and Gemma Roig. Duality diagram similarity: a generic framework for initialization selection in task transfer learning. European Conference on Computer Vision, 2020. 2, 8 +[7] Eyal Even-Dar, Shie Mannor, and Yishay Mansour. Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems. Journal of Machine Learning Research, 2006. 7 +[8] Weifeng Ge and Yizhou Yu. Borrowing treasures from the wealthy: Deep transfer learning through selective joint finetuning. IEEE Conference on Computer Vision and Pattern Recognition, 2017. 7 +[9] Kaiming He, Ross Girshick, and Piotr Dólar. Rethinking imagenet pre-training. IEEE Conference on Computer Vision and Pattern Recognition, 2019. 4 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. IEEE Conference on Computer Vision and Pattern Recognition, 2016. 3 +[11] 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. 3 +[12] Minyoung Huh, Pulkit Agrawal, and Alexei A Efros. What makes ImageNet good for transfer learning? arXiv preprint arXiv:1608.08614, 2016. 1, 4 +[13] Alexander Kolesnikov, Xiaohua Zhai, and Lucas Beyer. Revisiting self-supervised visual representation learning. IEEE + +Conference on Computer Vision and Pattern Recognition, 2019. 1 +[14] Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better Imagenet models transfer better? IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 4, 6, 13, 14, 16 +[15] 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. European Conference on Computer Vision, 2018. 3 +[16] Amiel Meiseles and Lior Rokach. Source model selection for deep learning in the time series domain. IEEE Access, 2020. 1, 6, 7, 13 +[17] Thomas Mensink, Jasper Uijlings, Alina Kuznetsova, Michael Gygli, and Vittorio Ferrari. Factors of influence for transfer learning across diverse appearance domains and task types. arXiv preprint arXiv:2103.13318, 2021. 8 +[18] Jiquan Ngiam, Daiyi Peng, Vijay Vasudevan, Simon Kornblith, Quoc V Le, and Ruoming Pang. Domain adaptive transfer learning with specialist models. arXiv preprint arXiv:1811.07056, 2018. 1, 7 +[19] Cuong V Nguyen, Tal Hassner, Cedric Archambeau, and Matthias Seeger. Leep: A new measure to evaluate transferability of learned representations. International Conference on Machine Learning, 2020. 7 +[20] Maxime Aquab, Leon Bottou, Ivan Laptev, and Josef Sivic. Learning and transferring mid-level image representations using convolutional neural networks. IEEE Conference on Computer Vision and Pattern Recognition, 2014. 1, 2 +[21] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 2009. 2 +[22] Joan Puigcerver, Carlos Riquelme, Basil Mustafa, Cedric Renggli, André Susano Pinto, Sylvain Gelly, Daniel Key-sers, and Neil Houlsby. Scalable transfer learning with expert models. International Conference on Learning Representa-tions, 2021. 1, 4, 7, 11 +[23] Maithra Raghu, Chiyuan Zhang, Jon Kleinberg, and Samy Bengio. Transfusion: Understanding transfer learning for medical imaging. Advances in Neural Information Processing Systems, 2019. 1 +[24] 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, 2015. 3 +[25] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. CNN features off-the-shelf: An astounding baseline for recognition. IEEE Conference on Computer Vision and Pattern Recognition, 2014. 2 +[26] Robert R Snapp, Demetri Psaltis, and Santosh S Venkatesh. Asymptotic slowing down of the nearest-neighbor classifier. Advances in Neural Information Processing Systems, 1991. 6 +[27] Jie Song, Yixin Chen, Jingwen Ye, Xinchao Wang, Chengchao Shen, Feng Mao, and Mingli Song. Depara: + +Deep attribution graph for deep knowledge transferability. IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3922-3930, 2020. 2, 8 +[28] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the Inception architecture for computer vision. IEEE Conference on Computer Vision and Pattern Recognition, 2016. 3 +[29] Chuanqi Tan, Fuchun Sun, Tao Kong, Wenchang Zhang, Chao Yang, and Chunfang Liu. A survey on deep transfer learning. International Conference on Artificial Neural Networks, 2018. 2 +[30] Anh T Tran, Cuong V Nguyen, and Tal Hassner. Transferability and hardness of supervised classification tasks. IEEE International Conference on Computer Vision, pages 1395–1405, 2019. 7 +[31] Zirui Wang. Theoretical guarantees of transfer learning. arXiv preprint arXiv:1810.05986, 2018. 2 +[32] Karl Weiss, Taghi M Khoshgoftaar, and DingDing Wang. A survey of transfer learning. Journal of Big data, 2016. 2 +[33] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? Advances in Neural Information Processing Systems, 2014. 1 +[34] Amir R Zamir, Alexander Sax, William Shen, Leonidas J Guibas, Jitendra Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2, 8 +[35] 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. 1, 3, 4 +[36] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3 \ No newline at end of file diff --git a/whichmodeltotransferfindingtheneedleinthegrowinghaystack/images.zip b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2474dfc9e8933ec5175fd9261d58327f9b224bf7 --- /dev/null +++ b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a45a3ec449f4f0d303d7387abb7995d4f29cdc53c5164bf893c3ab0812d3cabe +size 376602 diff --git a/whichmodeltotransferfindingtheneedleinthegrowinghaystack/layout.json b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..065c367281dbbcebc63755efee46dff3d088c6c0 --- /dev/null +++ b/whichmodeltotransferfindingtheneedleinthegrowinghaystack/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b57e49a7c34a320b037ed7e4eee3a49b47450c1d17fe64069aaf853c8ca015a +size 347169 diff --git a/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_content_list.json b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2e45072c2dc918d71c315e11dab5cb5b94c578e8 --- /dev/null +++ b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2a0656de891ede7fc07b89b864bef07d46b28543cdf139b9ed52779112a168a +size 92404 diff --git a/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_model.json b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_model.json new file mode 100644 index 0000000000000000000000000000000000000000..85629bebff3c1acf583b7a3455418fc163fdfc0a --- /dev/null +++ b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6cb86a2002da3139a2e4d877c4201b0b4617769ad795fc24290c6b534219835 +size 112868 diff --git a/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_origin.pdf b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8977f28b231b85c338852d30ca9c6f1ce889a736 --- /dev/null +++ b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/66b36652-2924-4112-b710-76400b811567_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89ace84dcc978b7da97225cf6f7995f0f3793c26580d0ffd0183ea740359b959 +size 4783653 diff --git a/whosehandsarethesehanddetectionandhandbodyassociationinthewild/full.md b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ce83d16e403d0799efa0cda0f6ec5ce7942df929 --- /dev/null +++ b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/full.md @@ -0,0 +1,367 @@ +# Whose Hands are These? + +# Hand Detection and Hand-Body Association in the Wild + +Supreeth Narasimhaswamy1, Thanh Nguyen2, Mingzhen Huang3, Minh Hoai1,2 + +1Stony Brook University, 2VinAI Research, 3University at Buffalo + +# Abstract + +We study a new problem of detecting hands and finding the location of the corresponding person for each detected hand. This task is helpful for many downstream tasks such as hand tracking and hand contact estimation. Associating hands with people is challenging in unconstrained conditions since multiple people can be present in the scene with varying overlaps and occlusions. + +We propose a novel end-to-end trainable convolutional network that can jointly detect hands and the body location for the corresponding person. Our method first detects a set of hands and bodies and uses a novel Hand-Body Association Network to predict association scores between them. We use these association scores to find the body location for each detected hand. We also introduce a new challenging dataset called BodyHands containing unconstrained images with hand and their corresponding body locations annotations. We conduct extensive experiments on BodyHands and another public dataset to show the effectiveness of our method. Finally, we demonstrate the benefits of hand-body association in two critical applications: hand tracking and hand contact estimation. Our experiments show that hand tracking and hand contact estimation methods can be improved significantly by reasoning about the hand-body association. Code and data can be found at http://vision.cs.stonybrook.edu/~supreeth/BodyHands/ + +# 1. Introduction + +Hand analysis is an important problem in Computer Vision with applications in human understanding, action, gesture, and sign-language recognition. The visual analysis of human hands is also vital for Augmented & Virtual Reality applications. Although the Computer Vision community has studied problems such as hand detection [7, 13, 23, 24, 30, 39, 49, 58, 59], hand pose estimation [17, 44, 51, 66, 67], hand tracking [48, 52, 53, 55, 63], and hand contact estimation [5, 33, 36, 47], there has been no significant effort in studying hand-body association. + +![](images/36ace31edc6db71980effc8c513b53fc45170a181f6e50432cc9e39a0710b0ea.jpg) +Figure 1. Hand Detection & Hand-Body Association. We develop a method to detect hands and their corresponding body locations. Hands and bodies belonging to the same person have bounding boxes in the same color and identification numbers. + +In this work, we study the problem of detecting hands in an image and finding the location of the corresponding person for each detected hand. This task is useful for action recognition and scene understanding, especially for multiple-person images and videos. For example, it is helpful to identify people when understanding hand gestures in human-human communication. Another example is to assess the motor and social skills of children with mental disorders by tracking their hands and how hands interact with objects and other people in a tabletop game. Hand-body association helps develop safety applications and assists people working with hand-held tools in manufacturing settings. + +Detecting hands and associating them with suitable bodies is challenging in unconstrained conditions. As shown in Fig. 1, an image may contain multiple people with substantial overlaps and occlusions between hands and bodies. One approach is to detect hands and people separately and use heuristics based on their sizes, distances, or overlapping areas to establish correspondences between hands and bodies. However, such methods do not perform well due to the extreme articulation of hands and bodies, leading to tremendous variations in the relative locations and sizes between a hand and the corresponding human body. An alternative method is to use a human pose detector to find + +the skeleton of humans and find the hands of each detected pose in the image. However, pose detection by itself is unreliable. For a scene of congregated or interacting people, the hand and arm of one person might be entangled with the skeleton of another person. Furthermore, the pose detector might not detect poses for everyone in the image, especially for people who are partially occluded or partly outside the camera's field of view. Thus we cannot solely rely on pose detection to associate hands with people. Our experiments empirically show that pose-based approaches are unreliable for associating hands and bodies. + +This work proposes a novel convolutional architecture that can jointly detect hands and bodies and associate them. Specifically, we build upon MaskRCNN [18], a state-of-the-art object detector, and extend it by adding a novel Hand-Body Association Network module. We first use a Region Proposal Network to generate candidate hand and body proposal boxes. We then use the bounding box regression and mask generation heads to obtain the bounding box and segmentation maps for hands and bodies. The detected hands and bodies are then passed to the Hand-Body Association Network to obtain an association between them. + +The Hand-Body Association Network has two novel modules. The first module is the Overlap Estimation Module that uses the visual features of hands and bodies to estimate if they can overlap. Intuitively, if a hand and a body have no overlap, they cannot belong to the same person. The converse, however, does not hold; a hand and a body can overlap even though they belong to different people. For instance, in the proposed BodyHands dataset, more than $33\%$ of the people have their hands overlapping with other people. The overlap is a piece of mutual geometric information between two regions. Learning mutual geometric information between hands and bodies using their appearance features allows learning-rich discriminative representations useful for associating hands and bodies. The second module is the Positional Density Module that uses hand features to estimate a density over possible body locations for each detected hand. Intuitively, the appearance and location of a hand provide some cues for estimating its body location. However, directly locating the body from the hand can be difficult due to the tremendous variation in relative scales between hands and bodies and mutual occlusions between people. We thus first estimate a density over possible locations and use these density values to find compatible matching for all hand-body pairs using the Hungarian Algorithm. + +We also contribute a large-scale dataset of unconstrained images containing annotations for hand locations and their corresponding body locations. The dataset has around 20K images with bounding box annotations for more than 57K hand and 63K body instances. This dataset has numerous images containing multiple people with varying degrees of occlusions and overlap, where it is challenging to detect and + +associate hands and bodies. + +Finally, we demonstrate the benefits of the hand-body association in two crucial downstream tasks: hand tracking and hand physical contact estimation. We show that hand tracking and hand contact estimation methods can be improved by reasoning about the hand-body association. + +# 2. Related Work + +Hand Analysis. Hands have been extensively studied by the Computer Vision community and there are methods for hand detection [7, 12, 13, 21, 23, 24, 30, 35, 39, 45, 58, 59], hand pose estimation [9, 10, 17, 22, 25, 28, 44, 46, 51, 60, 66, 67], hand tracking [32, 48, 52, 53, 55, 63], and hand contact estimation [5, 33, 36, 47]. However, previous works do not consider the problem of hand-body association. Existing works mostly focus on constrained scenarios such as ego-centric perspectives with a single subject in a video. In such cases, the full body is not always visible, and it may not be essential to find them. Some works analyze hands in unconstrained conditions [35, 36, 47] but they do not address this problem either. Zhou et al. [64] address the problem of hand-raiser recognition in classroom scenarios. However, their work is developed for indoor classroom environments and is unsuitable for unconstrained outside environments. Lee et al. [26] and Tsutsui et al. [54] study the problem of hand disambiguation in egocentric videos. However, they identify only the person's identity but not their body locations. On the other hand, we try to address the hand-body association problem, and our work focuses mainly on third-person views. + +Hand datasets. Although there are several datasets with annotated hand locations, such as [35, 36], they do not have annotations for the corresponding body locations. Another option would be to use human pose datasets [1, 2, 27], which have human body joint locations. However, such datasets do not have bounding box annotations for hands. Zhou et al. [64] propose a dataset containing hand and body locations, but they develop the dataset in indoor environments. Moreover, their dataset is not publicly available. Bambach et al. [3] propose a dataset containing 48 videos of first-person interaction between two people. However, they provide annotations for only hand locations but not body locations. Jin et al. [20] develop the COCO-WholeBody dataset by annotating hand key points for images from the COCO dataset. Compared to this dataset, the proposed BodyHands dataset has a higher number of crowded images with significant overlaps and occlusions between people; $34\%$ people in BodyHands have their hands overlapping with different people compared to $19\%$ from COCO-WholeBody. + +![](images/4e95f35b5359cdf9745f712c13baef3aff75bae7235fadd109b68db4c5e01368.jpg) +Figure 2. Proposed Architecture. A ResNet network extracts the backbone features of the input image. We use the feature maps of hand and body proposal boxes to obtain their bounding boxes and binary segmentation masks. The Overlap Estimation Module uses the feature maps of the hand and body to predict if they can overlap, i.e., $\mathbb{P}(I(\mathbf{h},\mathbf{b}) = 1)$ . The Positional Density Module uses the hand features and the output from the Overlap Estimation Module to estimate the conditional likelihood $\mathbb{P}(\mathbf{b}\mid \mathbf{h},I(\mathbf{h},\mathbf{b}) = 1)$ . The outputs from these two modules are combined to obtain the likelihood that the body $\mathbf{b}$ belongs to the hand $\mathbf{h}$ , i.e., $\mathbb{P}(\mathbf{b}|\mathbf{h})$ . We use the estimated conditional likelihood to find compatible matching for all hand-body pairs using the Hungarian Algorithm (used only during inference). + +# 3. Problem Definition and Proposed Method + +This section describes the proposed architecture that can jointly detect hands and bodies and provide an association score between them. We also provide details on the training objective that allows training the proposed architecture end-to-end. In the following subsection, we will first formally define the problem. + +# 3.1. Problem Definition + +Given an image $\mathbf{I} \in \mathbb{R}^{H \times W \times 3}$ , our goal is to: + +1. Detect the bounding box locations $\mathbf{H} = \{\mathbf{h}_i\in \mathbb{R}^4: 1\leq i\leq m\}$ and $\mathbf{B} = \{\mathbf{b}_j\in \mathbb{R}^4: 1\leq j\leq n\}$ for hands and bodies, respectively. Here, $m$ and $n$ denote the number of hands and bodies in the image $\mathbf{I}$ . Each bounding box is represented by a 4-dimensional vector for its left, top, right, bottom locations. +2. For each detected hand $\mathbf{h} \in \mathbf{H}$ , we need to associate a body $\mathbf{b} \in \mathbf{B}$ such that the following two constraints are satisfied: (1) each hand $\mathbf{h} \in \mathbf{H}$ is associated with exactly one body $\mathbf{b} \in \mathbf{B}$ ; (2) each body $\mathbf{b} \in \mathbf{B}$ can be associated to at most two hands in $\mathbf{H}$ . Note that we consider any visible regions of the human as the body. Therefore when the detector fails to detect any humans, i.e., $\mathbf{B} = \emptyset$ , we treat a hand bounding box as its corresponding person bounding box. + +# 3.2. Architecture Overview + +We illustrate the proposed architecture in Fig. 2. We build upon a two-stage object detector [15, 16, 18, 43] such as MaskRCNN. Given an input image, we use a ResNet to obtain backbone features and a Region Proposal Network to obtain proposals corresponding to two object classes: hands and bodies. We then use the RoIAlign operation to extract features corresponding to these proposals and perform bounding box regression and mask generation. + +For each detected hand $\mathbf{h} \in \mathbf{H}$ , we use a novel Hand-Body Association Network to estimate the conditional + +likelihood $\mathbb{P}(\mathbf{b}|\mathbf{h})$ over all the detected bodies $\mathbf{b}\in \mathbf{B}$ . The conditional $\mathbb{P}(\mathbf{b}|\mathbf{h})$ denotes the probability that the body $\mathbf{b}$ is associated with the hand $\mathbf{h}$ . We use $\mathbb{P}(\mathbf{b}|\mathbf{h})$ as weights of a bipartite graph between hands and bodies and pose the hand-body association problem as finding a maximum-weighted assignment satisfying the constraints described by the problem definition in Sec 3.1. We finally use the Hungarian algorithm [34] to obtain a solution for this matching problem. We implement the Hand-Body Association Network as a new branch of MaskRCNN and train this module end-to-end together with other MaskRCNN components. + +# 3.3. Hand-Body Association Network + +The inputs to the Hand-Body Association Network are the set of detected hands $\mathbf{H}$ and bodies $\mathbf{B}$ . For each detected hand instance $\mathbf{h} \in \mathbf{H}$ , it outputs the conditional-likelihood $\mathbb{P}(\mathbf{b}|\mathbf{h})$ over all bodies $\mathbf{b} \in \mathbf{B}$ . The probability $\mathbb{P}(\mathbf{b}|\mathbf{h})$ is high whenever the body $\mathbf{b}$ belongs to the hand $\mathbf{h}$ , otherwise it is low. We show that under some independence assumptions, the term $\mathbb{P}(\mathbf{b}|\mathbf{h})$ can be factorized as a product of two terms involving overlap between $\mathbf{h}$ and $\mathbf{b}$ and positional density over $\mathbf{b}$ : + +$$ +\mathbb {P} (\mathbf {b} | \mathbf {h}) = \underbrace {\mathbb {P} \left(I _ {\mathbf {h} , \mathbf {b}} = 1\right)} _ {\text {o v e r l a p b e t w e e n h & b}} \cdot \underbrace {\mathbb {P} (\mathbf {b} | \mathbf {h} , I _ {\mathbf {h} , \mathbf {b}} = 1)} _ {\text {d e n s i t y o v e r b}}. \tag {1} +$$ + +To see this, we first note an important relationship between the hands and body that belong to the same person. Since hands are a part of the human body, a hand bounding box and a body bounding box that belong to the same person must have a positive overlap. In other words, if a hand and a body have no overlap, they cannot belong to the same person. The converse, however, does not hold. Hands and bodies can overlap even though they belong to different people. For instance, in the proposed BodyHands dataset, more than $33\%$ of people have their hands significantly overlapping with other people. Formally, if we let $I_{\mathrm{h,b}}$ be an indicator random variable to denote whether $\mathbf{h}$ + +and $\mathbf{b}$ have any overlap, we have + +$$ +\mathbb {P} (\mathbf {b} | \mathbf {h}, I _ {\mathbf {h}, \mathbf {b}} = 0) = 0. \tag {2} +$$ + +We can use the law of total probability and condition over possible values of $I_{\mathbf{h},\mathbf{b}} \in \{0,1\}$ to write: + +$$ +\begin{array}{l} \mathbb {P} (\mathbf {b} \mid \mathbf {h}) = \mathbb {P} (I _ {\mathbf {h}, \mathbf {b}} = 0 \mid \mathbf {h}) \cdot \mathbb {P} (\mathbf {b} \mid \mathbf {h}, I _ {\mathbf {h}, \mathbf {b}} = 0) \\ + \mathbb {P} \left(I _ {\mathbf {h}, \mathbf {b}} = 1 \mid \mathbf {h}\right) \cdot \mathbb {P} (\mathbf {b} \mid \mathbf {h}, I _ {\mathbf {h}, \mathbf {b}} = 1), \tag {3} \\ \end{array} +$$ + +Combining Eq. (2) and Eq. (3), we get: + +$$ +\mathbb {P} (\mathbf {b} \mid \mathbf {h}) = \mathbb {P} (I _ {\mathbf {h}, \mathbf {b}} = 1 \mid \mathbf {h}) \cdot \mathbb {P} (\mathbf {b} \mid \mathbf {h}, I _ {\mathbf {h}, \mathbf {b}} = 1). \tag {4} +$$ + +The independence assumption $\mathbb{P}(I_{\mathbf{h},\mathbf{b}} = 1|\mathbf{h}) = \mathbb{P}(I_{\mathbf{h},\mathbf{b}} = 1)$ reduces Eq. (4) to Eq. (1). We learn the probabilities $\mathbb{P}(I_{\mathbf{h},\mathbf{b}} = 1)$ using the Overlap Estimation Module and $\mathbb{P}(\mathbf{b}\mid \mathbf{h},I_{\mathbf{h},\mathbf{b}} = 1)$ using the Positional Density Module. + +Overlap Estimation Module. This module takes as input the visual features corresponding to the hand bounding box $\mathbf{h}$ and the body bounding box $\mathbf{b}$ and estimate the probability of them overlapping each other. Specifically, we use a neural network $f_{\text{overlap}}$ to model $\mathbb{P}(I_{\mathbf{h},\mathbf{b}} = 1) \coloneqq f_{\text{overlap}}(\mathbf{h},\mathbf{b})$ . + +We implement $f_{\text{overlap}}$ as an additional branch of MaskRCNN using convolutional and fully-connected layers. This network module is computationally light and we learn their parameters together with MaskRCNN during training using the following binary cross-entropy loss: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {o v e r l a p}} := - Y _ {\mathbf {h}, \mathbf {b}} ^ {(g t)} \log f _ {\text {o v e r l a p}} (\mathbf {h}, \mathbf {b}) \\ - \left(1 - Y _ {\mathbf {h}, \mathbf {b}} ^ {(g t)}\right) \log \left(1 - f _ {\text {o v e r l a p}} (\mathbf {h}, \mathbf {b})\right). \tag {5} \\ \end{array} +$$ + +In the above, $Y_{\mathbf{h},\mathbf{b}}^{(gt)}$ denotes the groundtruth and is equal to 1 if $\mathbf{h}$ and $\mathbf{b}$ overlap and 0 otherwise. + +Note that we predict $f_{\text{overlap}}(\mathbf{h}, \mathbf{b})$ using the appearance features of the hand and the body rather than computing the overlap between bounding boxes $\mathbf{h}$ and $\mathbf{b}$ directly. This is because the overlap is a piece of mutual geometric information between two regions. Learning mutual geometric information between hands and bodies using their appearance features allows learning-rich discriminative representations useful for associating hands and bodies. We show this empirically in our experiments. + +Positional Density Module. We use this module to model the term $\mathbb{P}(\mathbf{b}\mid \mathbf{h},I_{\mathbf{h},\mathbf{b}} = 1)$ in Eq. (1). Specifically, given any hand $\mathbf{h}$ , for any possible body location $\mathbf{b}$ with $I_{\mathbf{h},\mathbf{b}} = 1$ , we model this probability using the following distribution: + +$$ +f _ {\text {d e n s i t y}} \left(\mathbf {b} \mid \mathbf {h}, I _ {\mathbf {h}, \mathbf {b}} = 1\right) \propto \exp \left(- \frac {\left| \left| \mathbf {b} ^ {\mathbf {h}} - \mu_ {\text {b o d y}} ^ {\mathbf {h}} \right| \right|}{2 \sigma^ {2}}\right). \tag {6} +$$ + +In the above equation, $\mu_{body}^{\mathbf{h}}\in \mathbb{R}^{4}$ is the mean body location relative to the hand $\mathbf{h}$ , $\mathbf{b}^{\mathbf{h}}$ is an encoding of the body box coordinates $\mathbf{b}$ relative to the hand $\mathbf{h}$ , and $\sigma$ is a tunable hyperparameter. More specifically, inspired by the bounding box regression formulation in FasterRCNN [42], we use + +$$ +\mathbf {b} ^ {\mathbf {h}} = \left(\frac {\mathbf {b} _ {x} - \mathbf {h} _ {x}}{\mathbf {h} _ {w}}, \frac {\mathbf {b} _ {y} - \mathbf {h} _ {y}}{\mathbf {h} _ {h}}, \log \frac {\mathbf {b} _ {w}}{\mathbf {h} _ {w}}, \log \frac {\mathbf {b} _ {h}}{\mathbf {h} _ {h}}\right). \tag {7} +$$ + +In the above, $(\mathbf{h}_x,\mathbf{h}_y)$ denotes the $(x,y)$ coordinates of the center of $\mathbf{h}$ , $\mathbf{h}_w$ and $\mathbf{h}_h$ denotes the width and height of $\mathbf{h}$ . Similarly, $(\mathbf{b}_x,\mathbf{b}_y)$ denotes the $(x,y)$ coordinates of the center of $\mathbf{b}$ , $\mathbf{b}_w$ and $\mathbf{b}_h$ denotes the width and height of $\mathbf{b}$ . We predict $\mu_{body}^{\mathrm{h}}$ in Eq. (6) using the appearance features and bounding box location of the hand $\mathbf{h}$ . + +Intuitively, the appearance features and location of the hand provide some cues on estimating its body location. However, directly locating the body from hand features can be difficult due to the tremendous variation in relative scales between hands and bodies and mutual occlusions between people. We, therefore, first estimate a density over possible locations and use these density values to find compatible matching for all hand-body pairs using the Hungarian Algorithm. If the body $\mathbf{b}$ is far from the estimated mean body location $\mu_{body}^{\mathrm{h}}$ , then $\mathbb{P}(\mathbf{b}|\mathbf{h},I_{\mathbf{h},\mathbf{b}} = 1)$ is small, and therefore according to Eq. (1), $\mathbb{P}(\mathbf{b}|\mathbf{h})$ is also small. + +We can efficiently implement the network $f_{density}$ as an additional branch of MaskRCNN using convolutional and fully-connected layers. We train $f_{density}$ together with MaskRCNN end-to-end by minimizing the smooth- $L1$ loss [15] between the predicted $\mu_{body}^{\mathbf{h}}$ and the groundtruth body $\mathbf{b}_{(gt)}^{\mathbf{h}}$ associated with the hand $\mathbf{h}$ : + +$$ +\mathcal {L} _ {\text {d e n s i t y}} := \sum_ {i = 1} ^ {4} \operatorname {S m o o t h} - L _ {1} \left(\mu_ {\text {b o d y}} ^ {\mathbf {h}} [ i ] - \mathbf {b} _ {(g t)} ^ {\mathbf {h}} [ i ]\right), \tag {8} +$$ + +In the above equation, $\mu_{body}^{\mathbf{h}}[i]$ and $\mathbf{b}_{(gt)}^{\mathbf{h}}[i]$ denote the $i^{th}$ components of four dimensional vectors $\mu_{body}^{\mathbf{h}}$ and $\mathbf{b}_{(gt)}^{\mathbf{h}}$ . + +# 3.4. Training Objective + +We train the proposed Hand-Body Association network together with the MaskRCNN end-to-end by optimizing the following multi-task loss: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {c l s}} + \mathcal {L} _ {\text {b o x}} + \mathcal {L} _ {\text {m a s k}} + \mathcal {L} _ {\text {a s s o c i a t i o n}}. \tag {9} +$$ + +Here, $\mathcal{L}_{cls}$ , $\mathcal{L}_{box}$ , $\mathcal{L}_{mask}$ denote the classification, the bounding box regression, and the segmentation mask losses for the detection. These are the standard losses used in MaskRCNN [18]. The term $\mathcal{L}_{association}$ denotes the hand-body association loss and is defined as: + +$$ +\mathcal {L} _ {\text {a s s o c i a t i o n}} := \lambda_ {1} \mathcal {L} _ {\text {o v e r l a p}} + \lambda_ {2} \mathcal {L} _ {\text {d e n s i t y}}, \tag {10} +$$ + +In the above, $\mathcal{L}_{\text{overlap}}$ denotes the loss for the Overlap Estimation Module and $\mathcal{L}_{\text{density}}$ is the loss for the Positional Density Module. These losses are defined in Eq. (5) and Eq. (8). The scaling factors $\lambda_{1}$ and $\lambda_{2}$ are tunable hyperparameters denoting the relative importance between the overlap estimation and positional density estimation. + +# 3.5. Hungarian Hand-Body Assignment + +Given a set of detected hands $\mathbf{H} = \{\mathbf{h}_i:1\leq i\leq m\}$ , bodies $\mathbf{B} = \{\mathbf{b}_j:1\leq j\leq n\}$ , and the conditional distribution $\mathbb{P}(\mathbf{b}|\mathbf{h})$ estimated from the Hand-Body Association network, we need an assignment strategy to match hands and bodies subject to the constraints described in Sec. 3.1. + +We follow the bipartite matching strategy and use $\mathbb{P}(\mathbf{b}|\mathbf{h})$ as the weight between hand $\mathbf{h}$ and body $\mathbf{b}$ in the bipartite graph. We obtain a maximum-weighted assignment between the detected hands $\mathbf{H}$ and bodies $\mathbf{B}$ using the Hungarian Algorithm [34]. + +Note that the Hungarian algorithm matches each hand with exactly one body, but also it produces an undesirable result: each body can match to at most one hand. However, we need the flexibility to match a body to two hands. We provide a simple solution to this by duplicating $\mathbf{B}$ to ensure that each body is present exactly twice before running the Hungarian algorithm. This ensures that a body can have two hands associated with them. + +# 4. BodyHands Dataset + +This section describes BodyHands, the new dataset collected to develop and evaluate hand-body association methods. BodyHands is a large-scale dataset containing unconstrained images with annotations for hand and body locations and correspondences. + +Dataset Source. We built the BodyHands dataset starting from the images from the ContactHands dataset [36]. ContactHands is a large-scale dataset containing unconstrained images annotated with hand polygon locations and their contact states. It has images from popular datasets such as MS COCO [27], PASCAL VOC [14], Oxford-Hand [30], TV-Hand [35], and COCO-Hand [35]. We chose the ContactHands dataset for several reasons. First, we wanted to develop a dataset that we can use to train methods that robustly detect and associate hands and bodies regardless of shape, size, skin tone, and motion blur. Second, we want to detect and associate hands and bodies in challenging cases where people have mutual occlusions. Third, we wanted to use hand-body association in existing applications such as hand contact estimation and thus require contact state annotations. The ContactHands dataset has numerous images which satisfy these requirements. + +Annotation and Quality Control. We hired several annotation workers to annotate our dataset. For each person with + +![](images/5e77e5d69cc8e6efae9b1606fdf2f0d810b31cf7a190f29df67ee3eefeeb0dce.jpg) + +![](images/fccc309e7fe1c7dd569bf0bb628852d6ced5f3ae3144fe9eba854ebf0a086cad.jpg) + +![](images/eb93263f3fb36f24e4267c27cbab9b75d75158a98c2f40611c1e2b6e9ee92576.jpg) + +![](images/cd8f7f9b25ca78ab45f453c74432e1ff4fb48d8d27fe792ea02be9f7f5698b9f.jpg) +Figure 3. Representative images from the BodyHands dataset. Hands and bodies belonging to the same person have bounding boxes in the same color and identification numbers. + +![](images/963c2d391f7c5b095661d84d6224fa7023759aa5ceba31fdee69396d21be6b08.jpg) + +![](images/e838eb346b91b3c83708e3b5ad18d9efeb8940fad80bae05711546ce577936ae.jpg) + +![](images/7b838503ffa906e1e2db2d0564d84d0af6d28cf6ec1ed24609207be837b232b1.jpg) + +an annotated hand instance in the ContactHands dataset, we asked an annotator to draw a rectangular bounding box around the person and enter an identification number for the hand and the body. The hands and body which belong to the same person have the same identification number and therefore serve as an association between hands and bodies. We asked the annotators to draw the human bounding box to include all visible parts of the person. If an image contains $N$ people who did not have hand location annotations, we asked annotators to annotate body bounding boxes for all $N$ people if $N \leq 5$ and for at least five people otherwise. This can help us use such human bounding boxes as negative pairs with other hand instances. We also instructed the annotators to ensure that each body has at most two hands associated with it, and also each hand is associated with precisely one body. Thus, every hand instance in our dataset has a body associated with it. When hands are the only visible regions of the person, we use the hand bounding box as the human bounding box. There are some human bounding boxes with no associated hands; this is when hands are occluded or not visible. We collected annotations in batches and manually verified the annotation results ourselves. + +Statistics. The BodyHands dataset has 20,490 images with 57,898 annotated polygons for hands and 63,095 axis-parallel rectangular bounding boxes for people. There are 19,810 people with one annotated hand, 19,044 people with two annotated hands, and 24,241 annotated people with no annotated hands (because their hands were either occluded or too small). We use the same training and test splits as the ContactHands dataset to be backward compatible. Fig. 3 shows some representative images. We provide more statistics in the supplementary material. + +# 5. Experiments + +In this section, we describe two sets of experiments. The first experiments analyze the proposed method's hand-body association performance and benchmark it against several other baseline methods. The second set of experiments demonstrates the benefits of hand-body association for hand tracking and hand contact estimation. + +# 5.1. Hand-Body Association Experiments + +This subsection describes the evaluation metrics used and experimental results for the hand-body association task. + +# 5.1.1 Evaluation Metrics + +We measure the hand detection performance using the standard VOC Average Precision (AP) metric. To measure the hand-body association performance, we consider two metrics: (1) Conditional Accuracy for body association. We define this as the percentage of correctly associated bodies among the correctly detected hand instances. Here we define that a body is correctly associated with the hand if the Intersection over Union (IoU) between the associated body box and the corresponding ground truth body box is greater than 0.5. We call this conditional accuracy since we only consider associated bodies corresponding to the correctly detected hand instances. Note that a hand detection is correct if the IoU between the detected hand bounding box and a ground truth bounding box is greater than 0.5. (2) Joint AP for hand detection and body association. In this metric, a detected hand is considered a true positive if: (a) the Intersection over Union (IoU) between the bounding box of the detected hand and a ground truth hand bounding box is greater than 0.5; and (b) the Intersection over Union (IoU) between the body bounding box associated with the detected hand instance and the ground truth body bounding box is greater than 0.5. + +# 5.1.2 Competing Methods and Comparison Results + +We conducted several experiments to measure the hand-body association performance and compare them to the proposed method. Note that in the proposed method variant with an option to match the detected hand to itself, we allow the hand box to be its corresponding body box when running the Hungarian Algorithm. We summarize the results in Table 1. The proposed method outperforms other methods by a significant margin. We describe the methods in the comparison below. + +2D Human Pose. We run different 2D pose estimation methods such as OpenPose [8, 50, 56], Keypoint Communities [61] and DOPE [57] to obtain hand keypoints and body joints. We obtain the hand bounding boxes and corresponding body bounding boxes using these keypoints and joints. We use a less-stricter evaluation protocol since the detected hand keypoints can be very noisy: we consider a hand to be a true positive if its bounding box has positive IoU with a ground-truth bounding box. These methods do not perform well since obtaining accurate hand and body pose in unconstrained conditions is challenging. + +MaskRCNN + X. We train MaskRCNN using a ResNet101 backbone to detect hands and bodies. We then use the Hungarian matching algorithm to match hands to bodies us + +![](images/5466e7dd2a6de8c0b48b99a05c2d1794b637fd27d1c71160ec811869d8a9d934.jpg) +Success + +![](images/0e4c4fa5f4c44f31c5b9ce73b985e335defbb38df1ad9ee85a501b779f0b3d1e.jpg) +Success + +![](images/4e2eae52e290fa0037050c3764bee433945d3e6cc16d2bc2af23e58c4de7aae7.jpg) +Failure + +![](images/11020b6a4a283429a734e24fd4211c59fad5a532e2d0a2b085cc573c30dd67fd.jpg) + +![](images/2dfdfdcdb496a80b8766b475e008782a2b7e764cc90eb8129184510bfba9aa6e.jpg) + +![](images/0f1f0cb608ca82118d1bab307c5a30713be8e4ee0829f1ce8e3ff49c9ac20b88.jpg) + +![](images/9feaf6deec7b22a4be16731a7458dc3a74352ca0cde1201ec947dbe8647f4a9a.jpg) + +![](images/a2e8f1a025e44039983290613fc6df01f6858c598edacbbaddb8565307c1b647.jpg) + +![](images/a7f82a330256701ea3a2f5de802a4dbc4c78ab921d52550aeccfb6a686edf065.jpg) + +![](images/a613781d7f11a2a71996ecade6bb49370dd974abc51cf8df17ddfaa6da466a6e.jpg) +Figure 4. Qualitative results and failure cases. We visualize hands and bodies that belong to the same person using the same color and identification numbers. + +![](images/777ab3a64eea6e1dc2ceece37cf348a9960fd409b20f98286f5315d441c5ae65.jpg) + +![](images/e90c9e9eaac9dbd8ac1ed506fa26787603ea0053f6eeb5c290f20b1ea822f858.jpg) + +ing several cost functions: (1) Feature Distance first extracts MaskRCNN's box regression 1024-dimensional feature vectors for hands and bodies and then uses the $L_{2}$ distance between these feature vectors; (2) Feature Similarity first extracts MaskRCNN's box regression 1024-dimensional feature vectors for hands and bodies, and then uses the inner product between these feature vectors; (3) Location Distance uses the $L_{2}$ distance between the center of the detected hand and body bounding boxes; (4) IoU uses the Intersection over Union (IoU) overlap between the detected hand and body bounding boxes. + +Ablation Studies. We conduct ablation studies to study the effects of different components of the proposed method. Specifically, we train three different models using the training set of BodyHands: (1) the proposed method without the Overlap Estimation Module; (2) the proposed method without the Positional Density Module; and (3) the proposed method using overlap computed from hand and bounding boxes instead of Overlap Estimation Module. The Joint AP on the BodyHands test set of these methods are $59.03\%$ , $50.29\%$ , and $60.34\%$ , respectively. These results show that both the overlap estimation module and the positional density module are helpful for the hand-body association. + +Qualitative Results. Fig. 4 shows some qualitative results and failure cases from our method. Failure cases are mainly due to incorrect hand detections and false body association, especially in crowded images. + +# 5.2. Benefits of Hand-Body Association + +The ability to associate each detected hand to a human body is beneficial for many downstream tasks. This subsection demonstrates the benefits of this ability for two such tasks: hand tracking and hand contact estimation. + +
DatasetBodyHandsCOCO-WholeBody [20]
MethodHand APCond. AccuracyJoint APHand APCond. AccuracyJoint AP
DOPE9.0932.512.2715.0247.569.09
OpenPose39.6974.0327.8130.2282.9718.65
Keypoint Communities33.6271.4820.7144.3987.9140.89
MaskRCNN + Feature Distance84.8241.3823.1675.9259.9738.44
MaskRCNN + Feature Similarity84.8239.1223.3075.9253.6033.72
MaskRCNN + Locaction Distance84.8272.8350.4275.9278.4750.92
MaskRCNN + IoU84.8274.5251.7475.9279.5353.08
Proposed84.8283.4463.4875.9288.0562.87
Proposed (with hand self-association option)84.8284.1263.8775.9288.6962.92
+ +Table 1. Hand detection and hand-body association performance of several methods evaluated on BodyHands and COCO-WholeBody. + +# 5.2.1 Hand-Body Association for Hand Tracking + +Hand tracking is essential with many applications, including gesture recognition and skill evaluation. We hypothesize that the ability to associate hands with human bodies can improve tracking results. Intuitively, by associating hands with human bodies and linking human bodies across frames, we can establish correspondence between detected instances of the same hand across different frames, reducing identity switches in tracking. + +# Proposed hand tracking method and other baselines. + +Tracking hands is a multi-object tracking (MOT) problem, and a popular approach to address this problem is tracking by detection. This approach consists of two main steps: (1) detecting hands in individual video frames and (2) linking the detected hands between frames to form hand tracks. We adopt this tracking by detection approach in this work. For detection, we use our network trained for hand detection and hand-body association. For linking, we use the Hungarian algorithm [34] to optimize for the best set of one-to-atmost-one correspondence between a set of detected hands in frame $t$ and a set of previously established hand tracks up until frame $t - 1$ . The matching outcome by the Hungarian algorithm depends on the affinity/cost matrix that defines the compatibility/cost for matching a hand to a hand tracklet. A popular approach is to define the affinity based on the Intersection over the Union (IoU) value between two detected objects (i.e., hands in this case). We will refer to this as the Hand-IoU baseline. However, hands are fast-moving objects, and the location and size of a hand can change drastically from one frame to the next. Thus, linking hands using Hand-IoU leads to incorrect identity switches in many cases. We consider a simple approach for linking based on hand-body association that treats a hand-and-body pair as a single identity. We define their affinity for two hand-body pairs detected at two different frames based on the weighted sum of the hand IoU and the body IoU. We refer to this method as Hand-&-Body-IoU. We also consider several other linking methods as follows. In Re-ID, the matching cost between two detected hands is defined based on the distance between the corresponding embed + +ding vectors. In Pose-based, we use LightTrack [37] to detect and track skeleton keypoints and associate each detected hand instance to a skeleton based on the distances between the predicted wrist keypoint and center of the detected hand bounding box. Flow-based is the method that uses optical flows to link detections. Here, we use the average optical flows for pixels inside the detected object to link it with detection in the previous frame. + +Evaluation dataset. There were no publicly available datasets for tracking hands in unconstrained environments. Most of the existing datasets [11, 31, 38, 40, 41] for hand tracking was captured in constrained environments such as ego-centric perspectives and contained only one or two hands. To evaluate hand tracking methods in unconstrained conditions, we collected 20 videos from YouTube and manually annotated hand bounding boxes and their trajectories. Specifically, we annotated every 15 frames, and altogether the dataset has 3299 annotated frames, 8893 hand instances, and 131 hand trajectories. We call this dataset YoutubeHands-20, and this dataset has many videos that contain multiple people interacting in the scene, so tracking hands in such cases is challenging. YoutubeHands-20 has now been expanded to a larger dataset YoutubeHands containing 200 videos [19]. + +Evaluation metric. To evaluate hand tracking performance, we use the standard multi-object-tracking evaluation metrics [4, 29]: False Positives (FP), False Negatives (FN), Identity Switches (IDs), and Multiple Object Tracking Accuracy (MOTA). MOTA is the combined metric, and it is considered the most crucial metric to quantify the overall detection and tracking performance. + +Tracking results. Table 2 compares the tracking results of all methods. CenterTrack [65] and FairMot [62] are end-to-end methods in which object detection and association are performed together. To the best of our knowledge, there is no publicly available large-scale hand tracking datasets to train these methods. We do our best to train these two methods: first, we use static images from TVHand [35] and COCOHand [35] datasets to pre-train these methods. We then use the VIVAHandTracking [41] dataset to fine- + +
FP↓FN↓IDs↓MOTA↑
FairMOT [62]41238591148.6
CenterTrack [65]3763909210.7
MPNTrack [6] (offline)1192107454541.4
CenterTrack (our detection)458155375042.5
Re-ID681128481742.0
Hand-IoU681128462446.1
Flow-based681128488240.7
Pose-based681128459146.8
Hand- & Body-IoU (proposed)681128443650.0
+ +tune them to perform hand tracking. We also conducted experiments by replacing the detection component of CenterTrack with the proposed hand detector. MPNTrack [6] is an offline tracking method. We pre-train MPNTrack on the VIVA [41] dataset and then use hands detected from our method as inputs to the tracker. These methods do not work well on hands, perhaps because they are geared towards less deformable classes such as pedestrians and vehicles. + +The methods Re-ID, Hand-IoU, Flow-based, Pose-based, and Hand-&-Body-IoU use the same hand detector, so they have the same FP and FN. The main differences are how we link the detected hands into tracks. As seen, using both hands and bodies for linking yields the highest MOTA. + +# 5.2.2 Hand-Body Assoc. for Physical Contact Analysis + +We now demonstrate the benefits of hand-body association for recognizing the physical contact state of a hand, which could be: (1) No-Contact, (2) Self-Contact, (3) Person-Contact, and (4) Object-Contact. These conditions are not mutually exclusive, and a hand can be in more than one state. Recognizing the physical contact states of hands has many applications in human understanding, augmented reality, and virtual reality. + +Contact state recognition is a complex problem in general, and the most challenging category to recognize is Person-Contact, with the current state-of-the-art result being $39.51\%$ Average Precision (AP) [36]. This is due to the difficulty of distinguishing between Person-Contact and Self-Contact. The visual appearance of a hand and its surrounding local context can determine if the hand is touching a body part. However, it is not easy to know if this body part is part of the same person (Self-Contact) or a different person (Person-Contact). Next, we will describe two approaches to improve the performance of Person-Contact recognition by reasoning about the hand-body association. + +Heuristic method. We consider a simple post-processing heuristic to improve the performance of an off-the-shelf contact estimation network [36] as follows. Given a detected hand $H$ and its person-contact score $s$ obtained by running the pre-trained hand-contact network of [36], our simple heuristic method will adjust $s$ while leaving the scores of other contact states unchanged. We provide more details about this in the supplementary material. The heuris- + +Table 2. Hand tracking results. + +
NCSCOCPCmAP
Previous SoTA [36]62.4854.3173.3439.5157.41
Leveraging hand-body association
Heuristic62.4854.3173.3440.8957.56
End-to-end64.7456.1274.3247.0960.56
+ +Table 3. Hand contact estimation results. The states NC, SC, PC, OC, denotes No-Contact, Self-Contact, Person-Contact, and Object-Contact, respectively. We can advance the state-of-the-art by leveraging the ability to associate detected hands to bodies. + +tic improves the AP for detecting other person-contact from $39.51\%$ to $40.89\%$ . This heuristic is simple, but is only possible because we have a network that tells us who is the self person among the set of detected people. Next, we will describe an end-to-end trainable network that jointly performs contact state estimation and body association. + +End-to-end method. We build a new architecture that extends the proposed method in Sec. 3 with an additional branch to estimate the contact state of a detected hand. The inputs to this new branch are the RoI feature maps of the detected hand and the corresponding body. We concatenate the RoI features and use fully-connected layers to obtain the contact state scores for the hand. We train this new architecture end-to-end using the following multi-task loss: $\mathcal{L} := \mathcal{L}_{cls} + \mathcal{L}_{box} + \mathcal{L}_{mask} + \mathcal{L}_{association} + \mathcal{L}_{contact}$ . The losses $\mathcal{L}_{cls}, \mathcal{L}_{box}, \mathcal{L}_{mask}, \mathcal{L}_{association}$ are the same as described in Eq. (9). The term $\mathcal{L}_{contact}$ is the loss for contact state of the hand. Following [36], we define $\mathcal{L}_{contact}$ to be the sum of four independent binary cross-entropy losses corresponding to four possible contact states. We train this architecture on the training set of ContactHands [35] and evaluate its performance on the test set of ContactHands. This method improves the AP for Person-contact from $39.51\%$ to $47.09\%$ . We summarize the results in Table 3. + +# 6. Conclusions, limitation, and societal impact + +We investigated a new problem of detecting hands and associating them with their corresponding bodies. We introduced a novel architecture based on MaskRCNN, and we also contributed a large-scale dataset of images annotated with hand locations and corresponding body locations. Finally, we demonstrated the benefits of this new problem in two tasks, hand tracking and hand contact estimation. + +The potential negative social impacts of the work are similar to most action and activity recognition applications, where privacy could be a concern. Our code will be available for research usage. However, one must be cautious when using it to support the making of accusations or decisions since our method still makes many mistakes. + +Acknowledgements. This work was partially supported by DARPA PTG HR00112220001 award. The content of the information does not necessarily reflect the position or the policy of the Government, and no official endorsement should be inferred. + +# References + +[1] Mykhaylo Andriluka, Leonid Pishchulin, Peter Gehler, and Bernt Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. 2 +[2] Mykhaylo Andriluka, Umar Iqbal, Eldar Insafutdinov, Leonid Pishchulin, Anton Milan, Juergen Gall, and Bernt Schiele. Posetrack: A benchmark for human pose estimation and tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 +[3] Sven Bambach, Stefan Lee, David J. Crandall, and Chen Yu. Lending a hand: Detecting hands and recognizing activities in complex egocentric interactions. In Proceedings of the International Conference on Computer Vision, 2015. 2 +[4] Keni Bernstein and Rainer Stiefelhagen. Evaluating multiple object tracking performance: the clear mot metrics. EURASIP Journal on Image and Video Processing, 2008:1-10, 2008. 7 +[5] Samarth Brahmbhatt, Chengcheng Tang, Christopher D. Twigg, Charles C. Kemp, and James Hays. ContactPose: A dataset of grasps with object contact and hand pose. In The European Conference on Computer Vision (ECCV), August 2020. 1, 2 +[6] Guillem Brasó and Laura Leal-Taixe. Learning a neural solver for multiple object tracking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6247-6257, 2020. 8 +[7] Patrick Buehler, Mark Everingham, Daniel P Huttenlocher, and Andrew Zisserman. Long term arm and hand tracking for continuous sign language tv broadcasts. In Proceedings of the British Machine Vision Conference, 2008. 1, 2 +[8] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 6 +[9] Zhe Cao, Ilija Radosavovic, Angjoo Kanazawa, and Jitendra Malik. Reconstructing hand-object interactions in the wild. In Proceedings of the International Conference on Computer Vision, 2021. 2 +[10] Yu-Wei Chao, Wei Yang, Yu Xiang, Pavlo Molchanov, Ankur Handa, Jonathan Tremblay, Yashraj S. Narang, Karl Van Wyk, Umar Iqbal, Stan Birchfield, Jan Kautz, and Dieter Fox. Dexycb: A benchmark for capturing hand grasping of objects. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2 +[11] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Antonino Furnari, Jian Ma, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, and Michael Wray. Rescaling egocentric vision. CoRR, abs/2006.13256, 2020. 7 + +[12] Xiaoming Deng, Yinda Zhang, Shuo Yang, Ping Tan, Liang Chang, Ye Yuan, and Hongan Wang. Joint hand detection and rotation estimation using cnn. IEEE Transactions on Image Processing, 2018. 2 +[13] Eng-Jon Ong and R. Bowden. A boosted classifier tree for hand shape detection. In Proceedings of the International Conference on Automatic Face and Gesture Recognition, 2004. 1, 2 +[14] Mark Everingham, Luc Gool, Christopher K. I. Williams, John Winn, and Andrew Zisserman. The PASCAL visual object classes (VOC) challenge. International Journal of Computer Vision, 88(2):303-338, 2009. 5 +[15] Ross Girshick. Fast R-CNN. In Proceedings of the International Conference on Computer Vision, 2015. 3, 4 +[16] 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, 2014. 3 +[17] Yana Hasson, Gul Varol, Dimitrios Tzionas, Igor Kalevatykh, Michael J. Black, Ivan Laptev, and Cordelia Schmid. Learning joint reconstruction of hands and manipulated objects. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2 +[18] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask R-CNN. In Proceedings of the International Conference on Computer Vision, 2017. 2, 3, 4 +[19] Mingzhen Huang, Supreeth Narasimhaswamy, Saif Vazir, Haibin Ling, and Minh Hoai. Forward propagation, backward regression, and pose association for hand tracking in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2022. 7 +[20] Sheng Jin, Lumin Xu, Jin Xu, Can Wang, Wentao Liu, Chen Qian, Wanli Ouyang, and Ping Luo. Whole-body human pose estimation in the wild. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. 2, 7 +[21] Leonid Karlinsky, Michael Dinerstein, Daniel Harari, and Shimon Ullman. The chains model for detecting parts by their context. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2010. 2 +[22] Dong Uk Kim, Kwang In Kim, and Seungryul Baek. End-to-end detection and pose estimation of two interacting hands. In Proceedings of the International Conference on Computer Vision, 2021. 2 +[23] Mathias Kolsch and Matthew Turk. Robust hand detection. In Proceedings of the International Conference on Automatic Face and Gesture Recognition, 2004. 1, 2 +[24] Pavan. M. Kumar, Andrew Zisserman, and Philip. H. S. Torr. Efficient discriminative learning of parts-based models. In Proceedings of the International Conference on Computer Vision, 2009. 1, 2 + +[25] Taein Kwon, Bugra Tekin, Jan Stühmer, Federica Bogo, and Marc Pollefeys. H2o: Two hands manipulating objects for first person interaction recognition. In Proceedings of the International Conference on Computer Vision, 2021. 2 +[26] Stefan Lee, Sven Bambach, David J. Crandall, John M. Franchak, and Chen Yu. This hand is my hand: A probabilistic approach to hand disambiguation in egocentric video. In 2014 IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2014. 2 +[27] Tsung-Yi Lin, Michael Maire, Serge Belongie, Lubomir Bourdev, Ross Girshick, James Hays, Pietro Perona, Deva Ramanan, C. Lawrence Zitnick, and Piotr Dólar. Microsoft COCO: Common objects in context. In Proceedings of the European Conference on Computer Vision, 2014. 2, 5 +[28] Shaowei Liu, Hanwen Jiang, Jiarui Xu, Sifei Liu, and Xiaolong Wang. Semi-supervised 3d hand-object poses estimation with interactions in time. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2 +[29] Anton Milan, Laura Leal-Taixe, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv arXiv:1603.00831, 2016. 7 +[30] Arpit Mittal, Andrew Zisserman, and P. H. S. Torr. Hand detection using multiple proposals. In Proceedings of the British Machine Vision Conference, 2011. 1, 2, 5 +[31] 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 Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 1284–1293, 2017. 7 +[32] Franziska Mueller, Florian Bernard, Oleksandr Sotnychenko, Dushyant Mehta, Srinath Sridhar, Dan Casas, and Christian Theobalt. Generated hands for real-time 3d hand tracking from monocular rgb. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 +[33] Lea Müller, Ahmed A. A. Osman, Siyu Tang, Chun-Hao P. Huang, and Michael J. Black. On self-contact and human pose. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2021. 1, 2 +[34] James Munkres. Algorithms for the assignment and transportation problems. Journal of the Society of Industrial and Applied Mathematics, 5(1):32-38, March 1957. 3, 5, 7 +[35] Supreeth Narasimhaswamy, Zhengwei Wei, Yang Wang, Justin Zhang, and Minh Hoai. Contextual attention for hand detection in the wild. In Proceedings of the International Conference on Computer Vision, 2019. 2, 5, 7, 8 +[36] Supreeth Narasimhaswamy, Trung Nguyen, and Minh Hoai. Detecting hands and recognizing physical contact in the wild. In Advances in Neural Information Processing Systems, 2020. 1, 2, 5, 8 + +[37] Guanghan Ning and Heng Huang. Lighttrack: A generic framework for online top-down human pose tracking. Proceedings of CVPRW 2020 on Towards Human-Centric Image/Video Synthesis and the 4th Look Into Person (LIP) Challenge, 2020. 7 +[38] Tomas Pfister, James Charles, Mark Everingham, and Andrew Zisserman. Automatic and efficient long term arm and hand tracking for continuous sign language tv broadcasts. In British Machine Vision Conference, 2012. 7 +[39] Pramod Kumar Pisharady, Prahlad Vadakkepat, and Ai Poh Loh. Attention based detection and recognition of hand postures against complex backgrounds. International Journal of Computer Vision, 2013. 1, 2 +[40] Chen Qian, Xiao Sun, Yichen Wei, Xiaou Tang, and Jian Sun. Realtime and robust hand tracking from depth. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. 7 +[41] Akshay Rangesh, Eshed Ohn-Bar, Mohan M Trivedi, et al. Driver hand localization and grasp analysis: A vision-based real-time approach. In IEEE International Conference on Intelligent Transportation Systems, 2016. 7, 8 +[42] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems, 2015. 4 +[43] 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, 2015. 3 +[44] Javier Romero, Dimitrios Tzionas, and Michael J. Black. Embodied hands: Modeling and capturing hands and bodies together. Proceedings of the ACM SIGGRAPH Conference on Computer Graphics, 2017. 1, 2 +[45] Kankana Roy, Aparna Mohanty, and Rajiv Ranjan Sahay. Deep learning based hand detection in cluttered environment using skin segmentation. In Proceedings of ICCV Workshops, 2017. 2 +[46] Viktor Rudnev, Vladislav Golyanik, Jiayi Wang, Hans-Peter Seidel, Franziska Mueller, Mohamed Elgharib, and Christian Theobalt. Eventhands: Real-time neural 3d hand pose estimation from an event stream. In Proceedings of the International Conference on Computer Vision, 2021. 2 +[47] Dandan Shan, Jiaqi Geng, Michelle Shu, and David F. Fouhey. Understanding human hands in contact at internet scale. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2020. 1, 2 +[48] Toby Sharp, Cem Keskin, Duncan Robertson, Jonathan Taylor, Jamie Shotton, David Kim, Christoph Rhemann, Ido Leichter, Alon Vinnikov, Yichen Wei, Daniel Freedman, Eyal + +Krupka, Andrew Fitzgibbon, Shahram Izadi, and Pushmeet Kohli. Accurate, robust, and flexible real-time hand tracking. In ACM Conference on Human Factors in Computing Systems, 2015. 1, 2 +[49] Roy Shilkrot, Supreeth Narasimhaswamy, Saif Vazir, and Minh Hoai. WorkingHands: A hand-tool assembly dataset for image segmentation and activity mining. In Proceedings of the British Machine Vision Conference, 2019. 1 +[50] Tomas Simon, Hanbyul Joo, Iain Matthews, and Yaser Sheikh. Hand keypoint detection in single images using multiview bootstrapping. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 6 +[51] Adrian Spurr, Jie Song, Seonwook Park, and Otmar Hilliges. Cross-modal deep variational hand pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1, 2 +[52] Srinath Sridhar, Franziska Mueller, Antti Oulasvirta, and Christian Theobalt. Fast and robust hand tracking using detection-guided optimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015. 1, 2 +[53] Srinath Sridhar, Franziska Mueller, Michael Zollhoefer, Dan Casas, Antti Oulasvirta, and Christian Theobalt. Real-time joint tracking of a hand manipulating an object from rgb-d input. In Proceedings of European Conference on Computer Vision (ECCV), 2016. 1, 2 +[54] Satoshi Tsutsui, Yanwei Fu, and David J. Crandall. Whose hand is this? person identification from egocentric hand gestures. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). 2 +[55] Robert Y. Wang and Jovan Popovic. Real-time hand-tracking with a color glove. ACM Transactions on Graphics, 28(3), 2009. 1, 2 +[56] Shih-En Wei, Varun Ramakrishna, Takeo Kanade, and Yaser Sheikh. Convolutional pose machines. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016. 6 +[57] Philippe Weinzaepfel, Romain Brégier, Hadrien Combaluzier, Vincent Leroy, and Grégory Rogez. Dope: Distillation of part experts for whole-body 3d pose estimation in the wild. In Proceedings of European Conference on Computer Vision, 2020. 6 +[58] Ying Wu, Qiong Liu, and Thomas S. Huang. An adaptive self-organizing color segmentation algorithm with application to robust real-time human hand localization. In Proceedings of the Asian Conference on Computer Vision, 2000. 1, 2 +[59] Xiaojin Zhu, Jie Yang, and A. Waibel. Segmenting hands of arbitrary color. In Proceedings of the International Conference on Automatic Face and Gesture Recognition, 2000. 1, 2 + +[60] Linlin Yang, Shicheng Chen, and Angela Yao. Semi-hand: Semi-supervised hand pose estimation with consistency. In Proceedings of the International Conference on Computer Vision, 2021. 2 +[61] Duncan Zauss, Sven Kreiss, and Alexandre Alahi. Keypoint communities. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021. 6 +[62] Yifu Zhan, Chunyu Wang, Xinggang Wang, Wenjun Zeng, and Wenyu Liu. A simple baseline for multi-object tracking. arXiv preprint arXiv:2004.01888, 2020. 7, 8 +[63] Fan Zhang, Valentin Bazarevsky, Andrey Vakunov, Andrei Tkachenka, George Sung, Chuo-Ling Chang, and Matthias Grundmann. Mediapipe hands: On-device real-time hand tracking. arXiv preprint arXiv:2006.10214, 2020. 1, 2 +[64] Huayi Zhou, Fei Jiang, and Ruimin Shen. Who are raising their hands? hand-raiser seeking based on object detection and pose estimation. In Proceedings of The 10th Asian Conference on Machine Learning, 2018. 2 +[65] Xingyi Zhou, Vladlen Koltun, and Philipp Krahenbuhl. Tracking objects as points. ECCV, 2020. 7, 8 +[66] Christian Zimmermann and Thomas Brox. Learning to estimate 3d hand pose from single rgb images. In Proceedings of the International Conference on Computer Vision, 2017, 1, 2 +[67] Christian Zimmermann, Duygu Ceylan, Jimei Yang, Bryan Russell, Max Argus, and Thomas Brox. Freihand: A dataset for markerless capture of hand pose and shape from single rgb images. In Proceedings of the International Conference on Computer Vision, 2019. 1, 2 \ No newline at end of file diff --git a/whosehandsarethesehanddetectionandhandbodyassociationinthewild/images.zip b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e0ff49de025d6a106100171f33b8100ed03e139b --- /dev/null +++ b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fca596ca7d645ddae34061191aa2ecc331aa77f9fe7f90d7eea16877078cbf7 +size 407598 diff --git a/whosehandsarethesehanddetectionandhandbodyassociationinthewild/layout.json b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..69d3126cbe3cd0bbc5b447c873ee5a93a9cf04a6 --- /dev/null +++ b/whosehandsarethesehanddetectionandhandbodyassociationinthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89ca609f59b19e2802530ec53c85b46b5b3ee8b947d4db90d85ddb2714413eab +size 476616 diff --git a/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_content_list.json b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..847a77c0db0930f8d742e4f1dd8e7b400fbdfb8e --- /dev/null +++ b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8f6d006f510ade9c60fb2c2f52021c97ec94dc6c919cb390110add26289e0a2 +size 83073 diff --git a/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_model.json b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..44c75cbe2b792f6c524d200a5aeb020851090545 --- /dev/null +++ b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce0e52e8c54d0993ed9d2d957ef43a52c049e1c7cb926de621c9ce9264a77281 +size 100690 diff --git a/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_origin.pdf b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..64b3000d1d7c056eca973285d4cb7a1212a5c856 --- /dev/null +++ b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/e218b392-a78b-4e51-8cd0-34228395079f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58e34a5f5995296f63e8d9e11b25cbe143cf9aaae1406ef921106f4b9f71d349 +size 774613 diff --git a/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/full.md b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3289cbb9e3e63542fe0e7a2e3509fbad518b6bab --- /dev/null +++ b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/full.md @@ -0,0 +1,297 @@ +# Whose Track Is It Anyway? Improving Robustness to Tracking Errors with Affinity-based Trajectory Prediction + +Xinshuo Weng $^{1,3}$ , Boris Ivanovic $^{3}$ , Kris Kitani $^{1}$ , Marco Pavone $^{2,3}$ + +$^{1}$ Robotics Institute, Carnegie Mellon University $^{2}$ Department of Aeronautics and Astronautics, Stanford University $^{3}$ NVIDIA Research + +# Abstract + +Multi-agent trajectory prediction is critical for planning and decision-making in human-interactive autonomous systems, such as self-driving cars. However, most prediction models are developed separately from their upstream perception (detection and tracking) modules, assuming ground truth past trajectories as inputs. As a result, their performance degrades significantly when using real-world noisy tracking results as inputs. This is typically caused by the propagation of errors from tracking to prediction, such as noisy tracks, fragments and identity switches. To alleviate this propagation of errors, we propose a new prediction paradigm that uses detections and their affinity matrices across frames as inputs, removing the need for error-prone data association during tracking. Since affinity matrices contain "soft" information about the similarity and identity of detections across frames, making prediction directly from affinity matrices retains strictly more information than making prediction from the tracklets generated by data association. Experiments on large-scale, real-world autonomous driving datasets show that our affinity-based prediction scheme reduces overall prediction errors by up to $57.9\%$ , in comparison to standard prediction pipelines that use tracklets as inputs, with even more significant error reduction (up to $88.6\%$ ) if restricting the evaluation to challenging scenarios with tracking errors. + +# 1. Introduction + +Tightly integrating multi-object tracking and trajectory prediction methods within an autonomy stack is a significant challenge due to the fact the most prior works develop multi-object tracking [5,14,17,28,38,39,41,42,49] and trajectory prediction [8, 12, 15, 16, 20, 32, 43, 46] approaches in isolation. Recently, [40, 45] showed that feeding the out + +![](images/812f7cdb7047f0b65d921e60f2a859dfabbb03401aeec9e9ba5ef2f32f4745b2.jpg) +Figure 1. In contrast to standard tracking-prediction pipelines, our affinity-based prediction (Affinipred) skips data association, directly using detections and affinity matrices as prediction inputs. + +puts of a modern tracking method directly into a prediction model can significantly degrade performance (e.g., up to $28 \times$ higher prediction error) in comparison to the common idealized prediction setting using perfect inputs (i.e., ground truth trajectories). Unfortunately, this challenge of integration with an explicit consideration of robustness to tracking errors is still largely under-explored in the field. + +Why does prediction accuracy significantly drop when using tracking results as inputs? Prior work [40, 45] has shown that tracking errors such as identity switches and fragments, which induce velocity or orientation estimation errors, are to blame. Typically, identity switches occur from mistakes in data association when two different objects are marked as the same due to ambiguity, e.g., their appearance or geometric features are similar or they are very close. Fragments occur when data association fails to find a detection to match with an existing tracklet. + +Now, is there an effective way to avoid these tracking errors from propagating to prediction? In this work, we argue that there is: skip data association altogether as shown in Fig. 1, since it may cause identity switches and fragments. Our key insight can be summarized as follows: Broadly, data association converts a "soft" affinity matrix (comprised of scalars between 0 and 1) to a boolean matrix (containing only 0 or 1) through a "hard" matching. By removing the + +data association step, we aim to preserve this "soft" information that is otherwise thrown away when "hard" matching is performed during data association. Because we skip the data association step, our method can be more accurate in the case where the affinity values are similar between two pairs of objects and it is ambiguous to perform correct matching and easy to make data association errors. + +Contributions. We propose to directly use raw detections and intermediate tracking results, i.e., affinity matrices, as inputs to prediction. To fully exploit the raw detections and affinity matrices for prediction, we propose: + +(1) An Affinity-based prediction (Affinipred) framework that removes the need for input past trajectories and also the error-prone data association step. +(2) A transformer architecture that models joint attention between all detections at all input frames and can deal with a variable size of detections across frames. +(3) An affinity-based attention mechanism that directly incorporates full object affinity information across time. + +In addition to the above contributions, Affinipred also leverages advancements from prior work by using a conditional variational autoencoder (CVAE) [18] to produce multi-modal predictions [21, 32], performing joint interaction modeling in the decoder to produce scene-consistent predictions [11, 35], and incorporating maps in the inputs to capture environmental information [47, 48]. + +# 2. Related Work + +Trajectory Prediction. Significant advancements in trajectory prediction [4, 15, 16, 19-21, 29-31] have been made in recent years. Yet, almost invariably, these works address trajectory prediction in an idealized setting, i.e., using ground truth past trajectories as inputs for training and evaluation, with no direct accounting of perception errors. As a result, it is non-trivial to transfer models trained in this idealized setting to the real world, where we typically use noisy tracking results as inputs to prediction. Therefore, mitigating the propagation of errors from tracking to prediction is of critical importance, and serves as the motivation of this work. Different from prior work, our affinity-based prediction does not assume ground truth trajectories as inputs and provides significantly higher robustness to tracking errors. + +Tracking-Prediction Integration. Although the majority of prior work focuses on trajectory prediction separately from tracking, there have been a few works which address the integration of tracking and prediction. For example, [23] proposed an end-to-end cascading detection, tracking and prediction network that is jointly optimized for these three tasks. Similarly, [43] proposed a parallelized tracking and prediction framework that can also be jointly optimized. Although these end-to-end methods yield increased performance, they do not explicitly account for tracking errors + +during prediction. Thus, if tracking results accumulated over frames contain errors, these errors will have a detrimental impact on prediction, as shown in [40, 45]. + +The closest, albeit concurrent, works to ours are [40, 45], which have both identified the impact of tracking errors on prediction and are seeking solutions. [45] propose enforcing prediction consistency at every frame to fix tracking errors, in turn improving prediction accuracy. Since data association is prone to errors, [40] propose to use multi-hypothesis data association (MHDA) [10, 25] for prediction. Similar to our idea, the use of MHDA also aims to preserve more information in the affinity matrices by generating multiple sets of tracking results, thereby increasing the likelihood of passing accurate tracking results as inputs to prediction. In short, both [40, 45] improve prediction robustness by raising the quality of its inputs, i.e., the tracklets generated by tracking, but make no modifications to the prediction model. In contrast, we present a novel prediction framework that uses affinity matrices rather than tracklets as inputs, thereby completely removing the chances of errors occurring in data association and passing more information to prediction. + +Joint Social-Temporal Modeling. In scenarios with many interacting agents, an agent's future behavior depends highly on its belief of other agents' behaviors. As a result, an important aspect of trajectory prediction is agent-agent interaction modeling, also known as social-temporal modeling. The most popular approach in prior work is to model social-temporal interactions in a cascaded order, i.e., first temporal modeling followed by social modeling, exemplified by RNNs and Graph Neural Networks (GNNs) [20, 32, 43], or Transformers and RNNs [6]. However, since social and temporal modeling are not performed jointly, social modeling loses access to agent information in previous frames (this information has already been compressed in temporal modeling). Accordingly, there are recent works which argue that it is beneficial to jointly model social-temporal interactions, e.g., interleaving social and temporal transformers [24, 44, 46] or GNNs [26] in an iterative manner. We use a similar joint social-temporal modeling mechanism by allowing agent features at any frame to directly attend over features of other agents at any frame. Unlike prior work, we do not have access to agent identity information during joint social-temporal modeling so we use the joint affinity matrix to inject the "soft" identity information. + +3D Multi-Object Tracking. The goal of online tracking is to match previously-computed tracklets with current detections to form new tracklets up to the current frame, and then incrementally obtain trajectories over the entire sequence. During this process, an intermediate affinity matrix is often computed where each entry represents the pairwise similarity between a past tracklet and current detection. A matching algorithm, such as the Hungarian algorithm [37], can then be used to perform "hard" matching, assigning de + +tectons to tracklets. Compared to the standard tracking-prediction pipeline that uses tracklets as inputs to prediction, we use the intermediate affinity matrices as inputs, preserving strictly more "soft" information for prediction. + +# 3. Problem Formulation + +The goal of multi-agent trajectory prediction is to learn a function $\mathcal{F}$ that can predict a sequence of future locations for every agent in the scene. Let $\mathcal{Y} = (\mathcal{Y}_1, \mathcal{Y}_2, \dots, \mathcal{Y}_N) \in \mathbb{R}^{N \times K \times 2}$ denote $N$ frames of $K$ agents' future trajectories. At frame $t$ , $\mathcal{Y}_t = (\pmb{y}_t^1, \pmb{y}_t^2, \dots, \pmb{y}_t^K) \in \mathbb{R}^{K \times 2}$ denotes the $K$ agents' ground positions, where each position is represented as a tuple $\pmb{y}_t^k = (u_t^k, v_t^k) \in \mathbb{R}^2$ . + +In prior work, the inputs to the function $\mathcal{F}$ are typically the past trajectories of the same $K$ agents from the previous $M$ frames $\mathcal{X} = (\mathcal{X}_{1 - M},\dots ,\mathcal{X}_0)$ and an optional map $\mathcal{M}$ of the scene. However, obtaining perfect past trajectories through tracking is challenging and data association errors can easily be propagated to prediction. Accordingly, we seek a different solution that instead uses a list of raw (unassociated) detections $\mathcal{D} = (\mathcal{D}_{1 - M},\dots ,\mathcal{D}_0)$ (Sec. 4.1) and their affinity matrices $\mathcal{A} = (\mathcal{A}_{2 - M}^{1 - M2},\dots ,\mathcal{A}_0^{-1})$ between pairs of frames (Sec. 4.2), as shown in Fig. 2 (top left) and (bottom left). Since the future is uncertain and can evolve in many different ways, predictions for each agent should also be multi-modal. Thus, we aim to learn a function $\mathcal{F}$ that can map $(\mathcal{D},\mathcal{A})$ (and optionally $\mathcal{M}$ ) and sampled latent variables $\mathcal{Z} = (z_{1},\dots ,z_{K})$ to future trajectories $\mathcal{V}$ : + +$$ +\mathcal {Y} = \mathcal {F} (\mathcal {D}, \mathcal {A}, \mathcal {M}, \mathcal {Z}). \tag {1} +$$ + +# 4. Affinity-based Prediction (Affinipred) + +The network of our approach is illustrated in Fig. 2, it is comprised of five key components: (1) A past embedding layer that encodes features of all flattened detections and optionally a map in past frames; (2) An affinity construction module that converts individual affinity matrices between two frames into one joint affinity matrix between all detections from all frames; (3) A transformer encoder with affinity-based attention for interaction modeling between all detections that outputs context features, which can then be used to generate the prior $p_{\theta}$ ; (4) A transformer decoder that predicts future trajectories autoregressively from embeddings, context and sampled latent variables; (5) Another transformer decoder that generates the posterior $q_{\phi}$ from ground truth (GT) future trajectories and context. + +# 4.1. Input Representation: Detections + +To avoid using potentially erroneous tracking results to perform prediction, we operate directly from raw detections. While this removes the need for data association, it poses two challenges: incompleteness and loss of identity. + +Incompleteness. Due to a variety of reasons (occlusion, large distances, sensor failures, small object sizes, etc), state-of-the-art detectors often struggle to provide stable detections across all frames. This means that some objects, although present in the scene, may be not detected in some frames. For example, in Fig. 2 (top left), the blue object is detected in frames $t = -2$ and $t = 0$ , but not in frame $t = -1$ . Note that the object colors (denoting identity) in Fig. 2 are only used for illustration, and there is actually no identity information in the detections used by our method. Here, we denote raw detections at frame $t$ as $D_{t} = (d_{t}^{1}, d_{t}^{2}, \dots, d_{t}^{K_{t}})$ , where $K_{t}$ is the number of objects detected at time $t$ (which can change across frames). + +Loss of Identity. Since detections across frames are unassociated, we do not have a sequence of data for each object. As a result, standard sequence modeling techniques, e.g., RNNs, cannot be applied to extract trajectory-level features. Further, detections with the same index across frames (i.e., $d_{t}^{k}$ and $d_{t - 1}^{k}$ ) do not necessarily have the same identity. + +Our Solution. To appropriately process detection inputs while accounting for the above challenges, we propose a joint social-temporal transformer architecture (Sec. 4.3 and 4.5) with affinity-based attention (Sec. 4.4). First, the joint social-temporal transformer models interactions between all detections across all frames so it can operate with a variable number of objects in each frame. Second, we inject affinity matrices into our affinity-based attention module (Sec. 4.4) as separate inputs that preserve "soft" similarity and identity information between all detections. + +# 4.2. Input Representation: Affinity Matrices + +Since affinity matrices provide strictly more information than the identity estimations produced by "hard" matching, affinity is a core facet of our method's input representation. Given $K_{t-1}$ detections at frame $t-1$ and $K_t$ detections at frame $t$ , an affinity matrix $\mathcal{A}_t^{t-1} \in \mathbb{R}^{K_{t-1} \times K_t}$ has entries $a_{ij} \in \mathbb{R}$ that represent the similarity (or probability of corresponding to the same identity, if normalized) between $d_{t-1}^i$ and $d_t^j$ , where $i \in [1, K_{t-1}]$ and $j \in [1, K_t]$ denote the row and column index of $\mathcal{A}_t^{t-1}$ , respectively. + +Affinity matrices are typically obtained as intermediate results from online multi-object tracking methods [41, 49]. However, there are two challenges in using them for prediction: (1) Since online tracking methods aim to solve data association incrementally over frames, affinity matrices are only computed between consecutive frames, e.g., $\mathcal{A}_{-1}^{-2}$ and $\mathcal{A}_0^{-1}$ , as shown in Fig. 2 (bottom left). As a result, we do not have direct affinity matrices between detections in nonconsecutive frames; (2) Affinity matrices are typically computed between tracklets in the last frame and detections in the current frame, since tracklets are already associated up to the last frame. As a result, the estimated affinity matrix + +![](images/5174a5411dc033f3c9a42ad59935c234032837b36da5a8e4d230fa2e1f734345.jpg) +Figure 2. Affinity-based Prediction. Given inputs of past data (raw detections $\mathcal{D}$ , map $\mathcal{M}$ , and affinity matrices $\mathcal{A}$ between consecutive frames), our goal is to predict multiple samples of future trajectories $\widehat{\mathcal{V}}$ . To model joint social-temporal attention, all detections are flattened $\mathcal{D}^f$ before extracting $\mathcal{O}$ via the past embedding layer. To recover the order of time information in raw detections, a time encoding $\tau$ is added to $\mathcal{O}$ to form the input embedding $\mathcal{E}$ . Then, a transformer encoder containing a series of self-attention blocks is applied to output context embeddings $\mathcal{C}$ , with the "soft" object identity information contained in $\mathcal{A}$ injected through affinity-based attention. During training, future trajectories $\mathcal{V}$ are also encoded via a transformer decoder to compute the posterior $q_{\phi}$ so that a KL loss $\mathcal{L}_{\mathrm{kl}}$ can be applied between the prior $p_{\theta}$ and posterior $q_{\phi}$ . To produce multimodal predictions, latent variables $\mathcal{Z}$ are sampled from the prior (during testing) or the posterior (during training). By combining $\mathcal{Z}$ with detections at frame $t = 0$ (blue, gray, red objects), we can predict their future locations $\widehat{\mathcal{V}}$ in an autoregressive manner via another transformer decoder and an output layer. Finally, a reconstruction loss $\mathcal{L}_{\mathrm{res}}$ between $\mathcal{V}$ and $\widehat{\mathcal{V}}$ is also used to trains the network. For illustration purposes, we only show $M = 3$ past frames ( $t = -2$ , $t = -1$ , and $t = 0$ ) in the figure. + +might be inaccurate at a frame if the tracklet construction in the previous frame is inaccurate. We will discuss potential solutions to these challenges in Sec. 6. + +# 4.3. Transformer Encoder + +Past Embedding. We use a transformer encoder to model the joint social-temporal attentions between all detections in all frames. As transformers operate on sequences of data, we first flatten detections into a sequence $\mathcal{D}^f\in \mathbb{R}^{K_{\mathrm{sum}}\times 2} = (d_{1 - M}^1,\dots ,d_{1 - M}^{K_{1 - M}},d_{2 - M}^1,\dots ,d_0^1,\dots ,d_0^{K_0})$ where $K_{\mathrm{sum}} = \sum_{t = 1 - M}^{0}K_{t}$ is the number of detections in all past frames. Then, a past embedding (fully-connected) layer is used to convert $\mathcal{D}^f$ into a list of feature embeddings $\mathcal{O} = (\pmb{o}_{1 - M}^{1},\dots ,\pmb{o}_{0}^{K_{0}})\in \mathbb{R}^{K_{\mathrm{sum}}\times d_{f}}$ + +Map Encoding. If available, a map can also (optionally) be included as an input to our model. Specifically, given an object's position $\pmb{d}_t^k = (u_t^k, v_t^k)$ , we crop a local map $\mathcal{M}_t^k$ around the object from the global map $\mathcal{M}$ . Then, a convolutional neural network (CNN) encodes the local map as a vector $\pmb{m}_t^k$ that is concatenated with the object's position before feeding into the past embedding layer. + +Time Encoding. After flattening detections along the time dimension, the timestamp of each object is lost. To recover the order of time information for embeddings, we apply positional encoding as in [36], modified to instead encode time so that objects present at the same timestamp have the same time encoding. This time encoding $\pmb{\tau}_{t}^{k}$ is added to the feature embedding $\pmb{o}_{t}^{k}$ for each object to form the overall input embedding $e_{t}^{k}$ to the transformer encoder. + +Joint Social-Temporal Modeling. Inspired by the original transformer [36], we apply a series of self-attention blocks to the input embeddings $\mathcal{E} = (e_{1 - M}^{1},\dots ,e_{0}^{K_{0}})$ , where each block contains a multi-head attention, layer normalization, feed-forward network, and another layer normalization. Each input embedding $e_t^k$ is also projected into key, query, and value, which are used to compute attention (Sec. 4.4). After $B$ attention blocks, the transformer encoder outputs context features $\mathcal{C} = (c_{1 - M}^{1},\dots ,c_{0}^{K_{0}})$ . + +Overall, our transformer encoder has two key characteristics: (1) Since the inputs are objects from all past frames, our transformer encoder allows an object at any frame to directly attend to any another object in any frame, enabling + +$$ +\begin{array}{c} \mathcal {A} _ {- 1} ^ {- 2} \\ \mathcal {A} _ {0} ^ {- 1} \end{array} \xrightarrow {\text {A f f i n i t y C o n s t r u c t i o n}} \mathcal {A} ^ {\text {j o i n t}} = \begin{array}{c} t = - 2 \\ t = - 1 \\ t = 0 \end{array} \begin{array}{c} \begin{array}{c c c} t = - 2 & t = - 1 & t = 0 \\ \mathbb {I} & \mathcal {A} _ {- 1} ^ {- 2} & 0 \\ \mathcal {A} _ {- 1} ^ {- 2 T} & \mathbb {I} & \mathcal {A} _ {0} ^ {- 1} \\ 0 & \mathcal {A} _ {0} ^ {- 1 T} & \mathbb {I} \end{array} \end{array} +$$ + +Figure 3. Joint Affinity Construction. To construct $\mathcal{A}^{\mathrm{joint}}$ , used in affinity-based attention, we first fill its diagonal with identity matrices $\mathbb{I}$ , since object identities are fixed in the same timestamp. We then fill the off-diagonal blocks of $\mathcal{A}^{\mathrm{joint}}$ with individual two-frame affinity matrices when available, otherwise they are left as zeros. In this example with $M = 3$ past frames, we can fill in affinity matrices $\mathcal{A}_0^{-1}$ (between frame -1 and 0) and $\mathcal{A}_{-1}^{-2}$ (between frame -2 and -1). + +social attention across time, i.e., joint social-temporal modeling. This differs from prior works which use a two-stage approach (e.g., social then temporal or vice versa); (2) Since the inputs are flattened, our transformer encoder can operate on a variable number of objects across frames. + +# 4.4. Affinity-based Attention + +Joint Affinity Construction. To enable joint attention between all detections in all past frames, we first need to construct the joint affinity matrix $\mathcal{A}^{\mathrm{joint}}\in \mathbb{R}^{K_{\mathrm{sum}}\times K_{\mathrm{sum}}}$ from individual two-frame affinity matrices $\mathcal{A}$ . As an example, let $M = 3$ (three past frames). In this case, there are two individual affinity matrices, $\mathcal{A} = (\mathcal{A}_{-1}^{-2},\mathcal{A}_0^{-1})$ . As shown in Fig. 3, the joint affinity $\mathcal{A}^{\mathrm{joint}}$ is a (tridiagonal) block matrix composed of the affinity matrices $\mathcal{A}_{-1}^{-2},\mathcal{A}_0^{-1}$ , identity matrix $\mathbb{I}$ , and zeros. The diagonal of $\mathcal{A}^{\mathrm{joint}}$ is identity because the same object $k$ at the same timestamp $t$ must have the same identity to itself. The off-diagonal blocks of $\mathcal{A}^{\mathrm{joint}}$ are filled with individual two-frame affinity matrices (for consecutive frames) and zeros otherwise. + +Affinity-based Attention. Since an object's future trajectory depends on both its past motion and the motion of other objects, our affinity-based attention models both types of dependency. In general, these types of dependency may have different effects on prediction, so we use separate attention weights to model them by projecting the key $\mathcal{K} \in \mathbb{R}^{K_{\mathrm{sum}} \times d_f}$ and query $\mathcal{Q} \in \mathbb{R}^{K_{\mathrm{sum}} \times d_f}$ into two sets: + +$$ +\mathcal {K} _ {\text {s e l f}} = \mathcal {K} \boldsymbol {W} _ {\text {s e l f}} ^ {\mathcal {K}}, \quad \mathcal {Q} _ {\text {s e l f}} = \mathcal {Q} \boldsymbol {W} _ {\text {s e l f}} ^ {\mathcal {Q}}, \tag {2} +$$ + +$$ +\mathcal {K} _ {\text {o t h e r}} = \mathcal {K} \boldsymbol {W} _ {\text {o t h e r}} ^ {\mathcal {K}}, \quad \mathcal {Q} _ {\text {o t h e r}} = \mathcal {Q} \boldsymbol {W} _ {\text {o t h e r}} ^ {\mathcal {Q}}, \tag {3} +$$ + +where $\mathcal{K}_{\mathrm{self}}, \mathcal{Q}_{\mathrm{self}} \in \mathbb{R}^{d_f \times d_f}$ are used to compute the attention of the object to itself (or to objects that have a high affinity value with it), and $\mathcal{K}_{\mathrm{other}}, \mathcal{Q}_{\mathrm{other}}$ are used to compute the attention of the object to others. We then combine these attention weights in an affinity-aware manner by using the joint affinity matrix $\mathcal{A}^{\mathrm{joint}}$ as a mask: + +$$ +\mathcal {W} = \mathcal {A} ^ {\text {j o i n t}} \odot \left(\mathcal {Q} _ {\text {s e l f}} \mathcal {K} _ {\text {s e l f}} ^ {T}\right) + (1 - \mathcal {A} ^ {\text {j o i n t}}) \odot \left(\mathcal {Q} _ {\text {o t h e r}} \mathcal {K} _ {\text {o t h e r}} ^ {T}\right), \tag {4} +$$ + +where $\odot$ is an element-wise product and the combined attention weight $\mathcal{W} \in \mathbb{R}^{K_{\mathrm{sum}} \times K_{\mathrm{sum}}}$ is a matrix. Finally, we can compute the attended output as in [36]: + +$$ +\mathcal {V} ^ {\prime} = \operatorname {s o f t m a x} \left(\frac {\mathcal {W}}{\sqrt {d _ {f}}}\right) \mathcal {V}, \tag {5} +$$ + +where the output embeddings $\mathcal{V}' \in \mathbb{R}^{K_{\mathrm{sum}} \times d_f}$ are used as inputs to the rest of the operations in the attention block. + +# 4.5. Transformer Decoder + +Different from the transformer encoder that computes the self-attention between all detections, our transformer decoder computes the cross-attention between detections and future positions. As shown in Fig. 2, our transformer decoder is used in two places: (1) to model attention between detections and predicted trajectories in an autoregressive manner, and (2) to model attention between detections and GT future trajectories to compute the posterior. In both places, the only difference is that the query embeddings are projected from the predicted positions via the prediction embedding layer or from the GT future trajectories via the future embedding layer. Both embedding layers are fully-connected, similar to the past embedding layer as introduced in Sec. 4.3. Affinity-based attention and time encoding are also used in both transformer decoders, and the key and value embeddings are projected from the context feature $\mathcal{C}$ from the transformer encoder. + +# 4.6. Multi-Modal Prediction + +To produce multi-modal predictions, we apply the standard CVAE framework, sampling latent values $\mathcal{Z}$ at runtime and conditioning the model with them to produce multiple plausible joint realizations of agent futures. + +CVAE Posterior. Following standard CVAE trajectory prediction works [9,43], the posterior $q_{\phi}(z_t^k | \mathcal{D}, \mathcal{M}, \mathcal{Y})$ is computed with a two-layer Multi-Layer Perceptron followed by two separate fully-connected layers to compute the mean $\pmb{\mu}_t^k$ and variance $\pmb{\sigma}_t^k$ of a Gaussian for each input detection $d_t^k$ . Latent variables $\mathcal{Z} = (z_{1 - M}^{1}, \dots, z_{0}^{K_{0}}) \in \mathbb{R}^{K_{\mathrm{sum}} \times d_{z}}$ can then be sampled for all detected objects during training, which are concatenated with the raw detections $\mathcal{D}^f$ and (optionally) map features to compute the input embeddings during autoregressive prediction. Finally, the posterior is computed using the outputs from the transformer encoder $\mathcal{C}$ and GT future transformer decoder, incorporating information about both the future $(\mathcal{Y}, \mathcal{M})$ and the past $(\mathcal{D}, \mathcal{M})$ . + +CVAE Prior. The network for computing the prior is similar to the network for computing posterior, except that its inputs are the context feature $\mathcal{C}$ that do not contain any information from the future GT trajectories. During testing, we can sample multiple latent variables $\mathcal{Z} = (z_{1 - M}^{1},\dots ,z_{0}^{K_{0}})$ from the prior $p_{\theta}(z_t^k |\mathcal{D},\mathcal{M})$ to predict multiple samples of object future trajectories. + +# 4.7. Training Details + +Which agents to predict? Since raw detections are different from trajectory inputs in standard trajectory prediction, a key question is for which objects should we predict? For example, one can predict future locations for all $K_{\mathrm{sum}}$ objects detected in past frames. However, some detections in past frames may belong to the same object (although this is unknown in advance), so predicted trajectories may be duplicated, requiring subsequent matching and filtering. + +Another way is to predict trajectories only for the $K_{0}$ objects detected in the current frame ( $t = 0$ ). In this way, no duplicate predictions are made for objects with the same identity, however, some objects might not have predictions if they are not detected in frame $t = 0$ due to detector failure. In this work, we choose to make $K = K_{0}$ rather than $K_{\mathrm{sum}}$ , matching standard data processing procedures used in prior works, e.g., [15,40], and challenges (nuScenes [7], ETH/UCY [22,27]), to enable a fair comparison. + +Detection Matching with GT. To train Affinipred, we use GT future trajectories as supervision signals for each detection that needs to be predicted. Accordingly, this requires matching the $K_{0}$ detections at frame $t = 0$ with GT future trajectories. Following the standard matching scheme used for official evaluation in the nuScenes challenge [7], we use a distance threshold $d_{\mathrm{thres}}$ and Hungarian matching [37]. During training, we filter out detections at frame $t = 0$ that are not successfully matched with GT (a small percentage), i.e., objects that are most likely false positives. + +Autoregressive Prediction. During both training and testing, we perform autoregressive prediction. Object positions are predicted sequentially, with predictions at $t$ serving as inputs when predicting the next timestamp $t + 1$ . Using Fig. 2 as an example, we begin with detections at frame $t = 0$ as inputs (blue, gray and red objects). Then, our output layer converts the transformer decoder output to predicted positions $\widehat{\mathcal{Y}}_1 = (\widehat{\mathbf{y}}_1^1,\dots ,\widehat{\mathbf{y}}_1^{K_0})$ at frame $t = 1$ . By iteratively applying this process, we can obtain predictions in all $N$ future frames $\widehat{\mathcal{Y}} = (\widehat{\mathcal{Y}}_1,\dots ,\widehat{\mathcal{Y}}_N)$ . + +Training Objectives. We optimize our Affinipred network by minimizing two loss functions: (1) A reconstruction loss between the $K_{0}$ predicted $\widehat{\mathcal{V}}$ and GT trajectories $\mathcal{V}$ ; and (2) a KL divergence loss between the CVAE prior and posterior for each object being predicted: + +$$ +\begin{array}{l} \mathcal {L} = \alpha \mathcal {L} _ {\mathrm {r e s}} + \beta \mathcal {L} _ {\mathrm {K L}} = \alpha | | \widehat {\mathcal {Y}} - \mathcal {Y} | | _ {2} \\ + \beta \sum_ {k = 1} ^ {K _ {0}} \mathrm {K L} \left(q _ {\phi} \left(\boldsymbol {z} _ {0} ^ {k} | \mathcal {D}, \mathcal {M}, \mathcal {Y}\right) \mid p _ {\theta} \left(\boldsymbol {z} _ {0} ^ {k} | \mathcal {D}, \mathcal {M}\right)\right), \tag {6} \\ \end{array} +$$ + +where $\alpha, \beta \in \mathbb{R}_{>0}$ are loss function weights. Here, only the prior and posterior of the $K_{0}$ objects are used because we only predict these objects detected at frame $t = 0$ . + +# 5. Experiments + +Our affinity-based prediction scheme has two core goals: (1) Improve overall prediction performance in a realistic setting when using tracking results as inputs, and (2) Increase robustness to upstream tracking errors. To evaluate our method's efficacy in addressing these, we make use of standard prediction datasets, but use detection and tracking results as inputs rather than GT past trajectories. In addition to evaluating prediction accuracy for all detected objects ("global evaluation"), we follow [40] and evaluate prediction performance for objects with certain types of tracking errors ("targeted evaluation"), to evaluate our method's robustness to tracking errors. At a high level, we find that our affinity-based prediction significantly improves real-world prediction performance and robustness to tracking errors, compared to standard tracklet-based prediction. + +# 5.1. Implementation Details + +Hyper-parameters. We use $\alpha = \beta = 1$ in Eq. (6), $d_{f} = 256$ for embeddings, $d_{z} = 32$ for latent variables, and $d_{\mathrm{thres}} = 2$ when matching detections with GT trajectories. + +Network Architecture. We use a 4-layer CNN to extract 32-dimensional map features. We use one fully-connected layer in all four embedding layers (past, future, prediction embedding, and output). We use $B = 2$ attention blocks in both the transformer encoder and decoder, and 8 heads in the affinity-based multi-head attention. + +Data Pre-processing. We apply linear interpolation and extrapolation to impute missing data in any of the past $M$ and future $N$ frames. We also apply three types of data augmentation to increase the robustness of prediction with respect to tracking errors. In particular, we inject identity switches (IDS), fragments (FRAG), and noise. For IDS, we swap the identity of two objects in the current frame with $30\%$ probability if they are within 5 meters. For FRAG, we randomly drop data in past frames with $30\%$ probability. Finally, we perturb the $u, v$ positions of each object with a maximum magnitude of 0.4 of its width and length in previous frames. + +# 5.2. Evaluation Methodology + +Baselines. In all experiments, we compare against a standard tracking-prediction pipeline that is composed of a detector, tracker, and prediction model. On KITTI, these are PointRCNN [34], AB3DMOT [41], and PTP [43], respectively. On nuScenes, these are Megvii [50], AB3DMOT [41], and PTP [43], respectively. We also compare against MTP [40], a strong, recent work that tackles the same problem of improving prediction robustness to upstream tracking errors. Specifically, MTP [40] explicitly accounts for tracking errors in prediction via multi-hypothesis data association. To fairly compare with these baselines, we use the same detection and tracking methods to obtain the inputs. + +Datasets. We use the standard KITTI [13] and nuScenes [7] autonomous driving datasets for evaluation. Since there is no official prediction evaluation server for KITTI, we evaluate on the KITTI tracking [1] validation set, using the standard train/val splits from [33]. We consider three main object categories during evaluation: cars, pedestrians and cyclists. To fairly compare against [40], we use $M = 10$ past frames and predict $N = 10$ future frames. To match objects with their GT trajectories, we compute 3D Intersection over Union (IoU) and use a standard threshold of 0.5 [41]. + +For nuScenes, we follow official prediction challenge guidelines [2]: (1) using the official train, val, test splits [3]; (2) evaluating only on vehicle classes; (3) using $M = 4$ past frames to predict $N = 12$ future frames; and (4) using a threshold distance of 2 meters when matching predictions with GT trajectories to compute metrics. Although we follow official nuScenes evaluation guidelines, it is important to note that the $\min\mathrm{ADE}_S$ , $\min\mathrm{FDE}_S$ values in Tables 1 through 4 are not comparable to values on the nuScenes leaderboard (which use GT past trajectories for evaluation). + +Metrics. To evaluate prediction accuracy, we use the standard Minimum Average and Final Displacement Error metrics over $S$ predicted samples (minADES, minFDEs): + +$$ +\min \mathrm {A D E} _ {S} = \min _ {s} \frac {1}{K _ {0}} \sum_ {k = 1} ^ {K _ {0}} \frac {1}{N _ {\text {v a l i d}} ^ {k}} \sum_ {t = 1} ^ {N} \mathrm {F} _ {m} ^ {k} | | \widehat {\boldsymbol {y}} _ {s t} ^ {k} - \boldsymbol {y} _ {t} ^ {k} | | _ {2}, +$$ + +$$ +\min \mathrm {F D E} _ {S} = \min _ {s} \frac {1}{K _ {0}} \sum_ {k = 1} ^ {K _ {0}} \left| \left| \widehat {\boldsymbol {y}} _ {s T _ {k}} ^ {k} - \boldsymbol {y} _ {T _ {k}} ^ {k} \right| \right| _ {2}, +$$ + +where $K_{0}$ is the number of objects detected in the current frame, $\hat{\pmb{y}}_{st}^{k}$ is the predicted position of object $k$ at frame $t$ in the $s^{\mathrm{th}}$ sample. Since not all objects have complete GT future trajectories (e.g., they may leave the scene early), a frame-wise mask $F_{m}^{k}$ is used for object $k$ to compute errors only on the frames where GT exists. As a result, the number of total evaluated frames for object $k$ is $N_{\mathrm{valid}}^{k} \leq N$ . Similarly, when computing $\min \mathrm{FDE}_S$ , $T_{k} \leq N$ is the last frame of object $k$ . Lastly, we evaluate with $S = 20$ on KITTI and $S = 10$ on nuScenes to have a fair comparison with [40]. + +Tracking Evaluation. In order to analyze prediction performance on objects with tracking errors, it is necessary to determine which objects have tracking errors. Following [40], we consider two common tracking errors: identity switches (IDS) and fragments (FRAG). We use the standard 3D tracking evaluation code released in [41] to identify which objects have IDS/FRAG errors per frame. + +# 5.3. Results and Analysis + +Targeted Evaluation. Table 1 summarizes the performance of all methods for objects with tracking errors. We can see that our method significantly outperforms all others on every dataset and tracking error type. For instance, on nuScenes objects with IDS, we reduce $\min\mathrm{ADE}_S$ by $71.8\%$ (from 3.923 to 1.106), and reduce $\min\mathrm{FDE}_S$ by $74.5\%$ + +
DatasetsTargetsMethodsminADESminFDES
KITTIIDSPointRCNN+AB3DMOT+PTP, S=202.8204.514
MTP [40], S=200.7471.173
MTP [40], S=4000.7071.093
Affinipred (Ours), S=200.5160.792
KITTIFRAGPointRCNN+AB3DMOT+PTP, S=201.6212.155
MTP [40], S=201.3351.688
MTP [40], S=4001.3051.627
Affinipred (Ours), S=201.0631.381
nuScenesIDSMegvii+AB3DMOT+PTP, S=108.34513.892
MTP [40], S=103.9236.210
MTP [40], S=2003.3215.052
Affinipred (Ours), S=101.1061.584
nuScenesFRAGMegvii+AB3DMOT+PTP, S=1014.52021.815
MTP [40], S=108.47612.105
MTP [40], S=2007.69710.606
Affinipred (Ours), S=104.4865.600
+ +Table 1. Prediction performance for objects with IDS/FRAG. + +(from 6.210 to 1.584). Importantly, we can directly compare to MTP [40] because our method uses the same detection and tracking outputs (including intermediate affinity matrices) as MTP [40]. Thus, the set of considered IDS/FRAG objects is exactly the same for both methods. + +Our method's performance is further highlighted when comparing against a standard detection-tracking-prediction system that uses the same detection [34, 50] and tracking [41] methods. For example, on nuScenes objects with IDS, we reduce $\min\mathrm{ADE}_S$ by $86.7\%$ (from 8.345 to 1.106), and reduce $\min\mathrm{FDE}_S$ by $88.6\%$ (from 13.892 to 1.584). All these results confirm that our affinity-based prediction has significantly improved the robustness of prediction with respect to IDS and FRAG, which is reasonable as the standard detection-tracking-prediction system does not explicitly account for tracking errors. + +Global Evaluation. Table 3 summarizes the performance of methods for all detected objects. Similar to the trend in targeted evaluation, our method significantly outperforms a standard detection-tracking-prediction pipeline. For example, we reduce $\min\mathrm{ADE}_S$ by $57.9\%$ (from 2.320 to 0.977) on nuScenes. Also, our method significantly outperforms MTP [40], even when allowing it $20\times$ more samples. The magnitude of error reduction our method achieves in Table 3 is less drastic than in Table 1 because global evaluation also includes objects whose future trajectories are easier to predict, i.e., without any upstream detection or tracking errors. + +Ablation Study. Table 2 summarizes the results, where the last row corresponds to our full method. In the second-last row, we replace our method's core advancement (the use of affinity and detection inputs) with tracklets, and observe a significant drop in both targeted and global performance. This signifies that our core contribution is effective at both improving overall prediction performance and improving model robustness to tracking errors. + +We then disable GT matching, meaning future tracklets from tracking are used in place of GT future trajectories + +
MethodsIDSFRAGGlobal
Extra/Inter.AugmentationGT matchingAffinityminADESminFDESminADESminFDESminADESminFDES
3.4085.1248.08510.2461.6252.960
✓2.7054.0676.8928.2271.2642.136
✓✓2.4643.5316.6228.0581.2151.963
✓✓✓1.7922.6424.9886.1931.1431.882
✓✓✓✓1.1061.5844.4865.6000.9771.628
+ +Table 2. Ablation experiments on the nuScenes prediction test set. $S = {10}$ samples are used to predict $N = {12}$ future frames. + +
DatasetsMethodsminADESminFDES
KITTIPointRCNN+AB3DMOT+PTP, S=200.1850.278
MTP [40], S=200.1620.238
MTP [40], S=4000.1460.203
Affinipred (Ours), S=200.1290.194
nuScenesMegvii+AB3DMOT+PTP, S=102.3203.819
MTP [40], S=101.5852.512
MTP [40], S=2001.3251.979
Affinipred (Ours), S=100.9771.628
+ +during training. Since tracklets are noisy, performance sensibly decreases in all settings. Finally, we disable data augmentation and imputation (linear extrapolation and interpolation), and the resulting decrease in performance confirms that these pre-processing steps are also important to improve prediction robustness, especially so for objects with IDS and FRAG errors. Interestingly, even without these data pre-processing steps and affinity-based inputs, our base prediction network performs similarly to MTP [40]. + +Training with Augmented GT. As we have seen in Table 2, augmenting the inputs with IDS, FRAG, and noises during training improves prediction accuracy and robustness to tracking errors. Seeing this, one may wonder if we can apply the same augmentations to a standard tracklet-based prediction method that is trained with GT trajectories. How would this compare to our Affinipred? + +To answer this question, we train a tracklet-based version of our base prediction network (i.e., the second row of Table 2) on nuScenes with different tracking error augmentations applied to GT trajectories (as described in Section 5.1). Table 4 summarizes the results and shows that, even with the combination of all three input data augmentations, a tracklet-based method trained with GT trajectories is also outperformed by our Affinipred, which is the case for both objects with ID switches and fragments. + +Runtime Speed. The speed of our method depends on the number of objects present per input frame. On a single GeForce RTX 2080, our method can run at 4.7 FPS with an average of 30 detections per input frame. There are a number of ways to make our method faster beyond this, such as switching from autoregressive to batch predictions, optimizing the network architecture to reuse computation, and generally optimizing our (currently unoptimized PyTorch) codebase for performance. + +Table 3. Prediction performance for all detected objects. + +
InputsAugmentationIDSFRAG
IDSFRAGNoisesminADESminFDESminADESminFDES
GT traj.2.8784.1367.3149.136
✓1.3831.9065.1606.264
✓2.5773.6956.6107.830
✓1.8972.5576.0607.460
✓✓✓1.3141.8244.7735.959
Affi. + Det.✓✓✓1.1061.5844.4865.600
+ +Table 4. Performance of a tracklet-based variant of our method trained with augmented GT trajectories compared to our affinity-based prediction scheme on nuScenes. Data imputation with extra/interpolation is used for both methods. + +# 6. Limitations and Conclusions + +There are two main limitations (and thus areas of future work) in our affinity-based prediction method (Affinipred). First, how can one obtain affinity matrices between nonconsecutive frames? Further, how can one obtain affinity matrices between two frames of detections rather than between past tracklets and current detections (Sec. 4.2)? Along these lines, an interesting area of future work is to design an affinity estimation network that can directly output the joint affinity matrix $\mathcal{A}^{\mathrm{joint}}$ . Second, is there an elegant way to predict the futures of all objects present in any past frame, rather than only those detected in the current frame? Such a capability would be useful for handling occlusions, being able to predict for objects that were in a past frame but are occluded in the current frame. + +In conclusion, we present a novel affinity-based prediction scheme that only requires detections and their affinity matrices across frames as inputs, entirely removing the need for error-prone data association. Since affinity matrices contain "soft" information about the similarity and identity of detections across frames, making prediction using affinity matrices retains strictly more information than making prediction using tracklets generated by data association. Experiments on the KITTI and nuScenes autonomous driving datasets show that our affinity-based prediction scheme reduces overall prediction errors by up to $57.9\%$ in comparison to standard tracklet-based prediction pipelines, with even more significant error reductions (up to $88.6\%$ ) when restricting evaluation to objects with tracking errors. + +# References + +[1] KITTI Tracking Dataset. http://www.cvlabs.net/datasets/kitti/eval_tracking.php.7 + +[2] nuScenes Prediction Challenge Guidelines. https : / / www . nuscenes . org / prediction ? externalData $\equiv$ all&mapData $\equiv$ all&modalities $=$ Any.7 +[3] nuScenes Prediction Data Split. https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/eval/prediction/splits.py.7 +[4] A. Alahi, K. Goel, V. Ramanathan, A. Robicquet, L. Fei-Fei, and S. Savarese. Social LSTM: Human Trajectory Prediction in Crowded Spaces. IEEE Conf. on Computer Vision and Pattern Recognition, 2016. 2 +[5] Nuri Benbarka, Jona Schroder, and Andreas Zell. Score refinement for confidence-based 3D multi-object tracking. IEEE/RSJ Int. Conf. on Intelligent Robots & Systems, 2021. 1 +[6] Manoj Bhat, Jonathan Francis, and Jean Oh. Trajformer: Trajectory Prediction with Local Self-Attentive Contexts for Autonomous Driving. Machine Learning for Autonomous Driving Workshop at Conf. on Neural Information Processing Systems, 2020. 2 +[7] Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, and Qiang Xu. nuScenes: A Multimodal Dataset for Autonomous Driving. IEEE Conf. on Computer Vision and Pattern Recognition, 2020. 6, 7 +[8] Defu Cao, Jiachen Li, Hengbo Ma, and Masayoshi Tomizuka. Spectral Temporal Graph Neural Network for Multivariate Time-series Forecasting. Proc. IEEE Conf. on Robotics and Automation, 2021. 1 +[9] Hao Cheng, Wentong Liao, Xuejiao Tang, Michael Ying Yang, Monika Sester, and Bodo Rosenhahn. Exploring Dynamic Context for Multi-path Trajectory Prediction. Proc. IEEE Conf. on Robotics and Automation, 2021. 5 +[10] Ingemar J. Cox and Sunita L. Hingorani. An Efficient Implementation of Reid's Multiple Hypothesis Tracking Algorithm and Its Evaluation for the Purpose of Visual Tracking. IEEE Transactions on Pattern Analysis & Machine Intelligence, 1996. 2 +[11] Alexander Cui, Abbas Sadat, Sergio Casas, Renjie Liao, and Raquel Urtasun. LookOut: Diverse Multi-Future Prediction and Planning for Self-Driving. IEEE Int. Conf. on Computer Vision, 2021. 2 +[12] Stuart Eiffert, Kunming Li, Mao Shan, Stewart Worrall, Salah Sukkarieh, and Eduardo Nebot. Probabilistic Crowd GAN: Multimodal Pedestrian Trajectory Prediction using a Graph Vehicle-Pedestrian Attention Network. IEEE Robotics and Automation Letters, 2020. 1 +[13] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are We Ready for Autonomous Driving? the KITTI Vision Benchmark Suite. IEEE Conf. on Computer Vision and Pattern Recognition, 2012. 7 +[14] Xusen Guo and Kai Huang. 3D Object Detection and Tracking on Streaming Data. Proc. IEEE Conf. on Robotics and Automation, 2020. 1 +[15] Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks. IEEE Conf. on Computer Vision and Pattern Recognition, 2018. 1, 2, 6 + +[16] Boris Ivanovic and Marco Pavone. The Trajectory: Probabilistic Multi-Agent Trajectory Modeling With Dynamic Spatiotemporal Graphs. IEEE Int. Conf. on Computer Vision, 2019. 1, 2 +[17] Aleksandr Kim, Aljosa Osep, and Laura Leal-Taixe. Eager-MOT: 3D Multi-Object Tracking via Sensor Fusion. Proc. IEEE Conf. on Robotics and Automation, 2021. 1 +[18] Diederik P Kingma and Max Welling. Auto-Encoding Variational Bayes. arXiv:1312.6114, 2013. 2 +[19] Kris M Kitani, Brian D Ziebart, James Andrew Bagnell, and Martial Hebert. Activity Forecasting. European Conf. on Computer Vision, 2012. 2 +[20] Vineet Kosaraju, Amir Sadeghian, Roberto Martín-Martín, Ian Reid, S. Hamid Rezatofighi, and Silvio Savarese. SocialBiGAT: Multimodal Trajectory Forecasting using BicycleGAN and Graph Attention Networks. Conf. on Neural Information Processing Systems, 2019. 1, 2 +[21] Namhoon Lee, Wongun Choi, Paul Vernaza, Christopher B. Choy, Philip H.S. Torr, and Manmohan Chandraker. DESIRE: Distant Future Prediction in Dynamic Scenes with Interacting Agents. IEEE Conf. on Computer Vision and Pattern Recognition, 2017. 2 +[22] Alon Lerner, Yiorgos Chrysanthou, and Dani Lischinski. Crowds by Example. Computer Graphics Forum, 2007. 6 +[23] Ming Liang, Bin Yang, Wenyuan Zeng, Yun Chen, Rui Hu, Sergio Casas, and Raquel Urtasun. PnPNet: End-to-End Perception and Prediction with Tracking in the Loop. IEEE Conf. on Computer Vision and Pattern Recognition, 2020. 2 +[24] Yicheng Liu, Jinghuai Zhang, Liangji Fang, Qinhong Jiang, and Bolei Zhou. Multimodal Motion Prediction with Stacked Transformers. IEEE Conf. on Computer Vision and Pattern Recognition, 2021. 2 +[25] Yun Li Long, Hui Xu, and Wei An. An Algorithm for Tracking Multiple Targets. IEEE Transactions on Automatic Control, 1979. 2 +[26] Abduallah Mohamed, Kun Qian, Mohamed Elhoseiny, and Christian Claudel. Social-STGCNN: A Social Spatio-Temporal Graph Convolutional Neural Network for Human Trajectory Prediction. IEEE Conf. on Computer Vision and Pattern Recognition, 2020. 2 +[27] Stefano Pellegrini, Andreas Ess, Konrad Schindler, and Luc Van Gool. You'll Never Walk Alone: Modeling Social Behavior for Multi-Target Tracking. IEEE Int. Conf. on Computer Vision, 2009. 6 +[28] Johannes Pöschmann, Tim Pfeifer, and Peter Protzel. Factor Graph based 3D Multi-Object Tracking in Point Clouds. IEEE/RSJ Int. Conf. on Intelligent Robots & Systems, 2020. 1 +[29] Nicholas Rhinehart, M Kris, and Paul Vernaza. R2P2: A ReparameteRized Pushforward Policy for Diverse, Precise Generative Path Forecasting. European Conf. on Computer Vision, 2018. 2 +[30] Nicholas Rhinehart, Rowan McAllister, Kris Kitani, and Sergey Levine. PRECOG: PREdiction Conditioned On Goals in Visual Multi-Agent Settings. IEEE Int. Conf. on Computer Vision, 2019. 2 + +[31] Alexandre Robicquet, Amir Sadeghian, Alexandre Alahi, and Silvio Savarese. Learning Social Etiquette: Human Trajectory Understanding In Crowded Scenes. European Conf. on Computer Vision, 2016. 2 +[32] Tim Salzmann, Boris Ivanovic, Punarjay Chakravarty, and Marco Pavone. Trajectory: Dynamically-Feasible Trajectory Forecasting With Heterogeneous Data. European Conf. on Computer Vision, 2020. 1, 2 +[33] Samuel Scheidegger, Joachim Benjaminsson, Emil Rosenberg, Amrit Krishnan, and Karl Granstr. Mono-Camera 3D Multi-Object Tracking Using Deep Learning Detections and PBM Filtering. IEEE Intelligent Vehicles Symposium, 2018. 7 +[34] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. PointR-CNN: 3D Object Proposal Generation and Detection from Point Cloud. IEEE Conf. on Computer Vision and Pattern Recognition, 2019. 6, 7 +[35] Yichuan Charlie Tang and Ruslan Salakhutdinov. Multiple Futures Prediction. Conf. on Neural Information Processing Systems, 2019. 2 +[36] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. Conf. on Neural Information Processing Systems, 2017. 4, 5 +[37] H W Kuhn. The Hungarian Method for the Assignment Problem. Naval Research Logistics, 1955. 2, 6 +[38] Sukai Wang, Yuxiang Sun, and Ming Liu. PointTrackNet: An End-to-End Network for 3D Object Detection and Tracking from Point Cloud. Proc. IEEE Conf. on Robotics and Automation, 2020. 1 +[39] Yongxin Wang, Kris Kitani, and Xinshuo Weng. Joint Object Detection and Multi-Object Tracking with Graph Neural Networks. Proc. IEEE Conf. on Robotics and Automation, 2021. 1 +[40] Xinshuo Weng, Boris Ivanovic, and Marco Pavone. MTP: Multi-hypothesis Tracking and Prediction for Reduced Error Propagation. arXiv:2110.09481, 2021. 1, 2, 6, 7, 8 +[41] Xinshuo Weng, Jianren Wang, David Held, and Kris Kitani. 3D Multi-Object Tracking: A Baseline and New Evaluation Metrics. IEEE/RSJ Int. Conf. on Intelligent Robots & Systems, 2020. 1, 3, 6, 7 +[42] Xinshuo Weng, Yongxin Wang, Yunze Man, and Kris Kitani. GNN3DMOT: Graph Neural Network for 3D Multi-Object Tracking with 2D-3D Multi-Feature Learning. IEEE Conf. on Computer Vision and Pattern Recognition, 2020. 1 +[43] Xinshuo Weng, Ye Yuan, and Kris Kitani. PTP: Parallelized Tracking and Prediction with Graph Neural Networks and Diversity Sampling. IEEE Robotics and Automation Letters, 2021. 1, 2, 5, 6 +[44] Cunjun Yu, Xiao Ma, Jiawei Ren, Haiyu Zhao, and Shuai Yi. Spatio-Temporal Graph Transformer Networks for Pedestrian Trajectory Prediction. European Conf. on Computer Vision, 2020. 2 +[45] Rui Yu and Zihan Zhou. Towards Robust Human Trajectory Prediction in Raw Videos. arXiv:2108.08259, 2021. 1, 2 +[46] Ye Yuan, Xinshuo Weng, Yanglan Ou, and Kris Kitani. AgentFormer: Agent-Aware Transformers for Socio- + +Temporal Multi-Agent Forecasting. IEEE Int. Conf. on Computer Vision, 2021. 1, 2 +[47] Wenyuan Zeng, Ming Liang, Renjie Liao, and Raquel Urtasun. LaneRCNN: Distributed Representations for Graph-Centric Motion Forecasting. IEEE/RSJ Int. Conf. on Intelligent Robots & Systems, 2021. 2 +[48] Lingyao Zhang, Po-Hsun Su, Jerrick Hoang, Galen Clark Haynes, and Micol Marchetti-Bowick. Map-Adaptive Goal-Based Trajectory Prediction. Conf. on Robot Learning, 2020. 2 +[49] Wenwei Zhang, Hui Zhou, Shuyang Sun, Zhe Wang, Jianping Shi, and Chen Change Loy. Robust Multi-Modality Multi-Object Tracking. IEEE Int. Conf. on Computer Vision, 2019. 1, 3 +[50] Benjin Zhu, Zhengkai Jiang, Xiangxin Zhou, Zeming Li, and Gang Yu. Class-Balanced Grouping and Sampling for Point Cloud 3D Object Detection. IEEE Conf. on Computer Vision and Pattern Recognition, 2019. 6, 7 \ No newline at end of file diff --git a/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/images.zip b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..324eba9398863e7238bc36b91560b87e1c47427f --- /dev/null +++ b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd8e4a927a275bb2379ccbbdf218957a4f1890ba6ae42a553c795c2866c7db4e +size 371130 diff --git a/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/layout.json b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5521231e4388273efe4fd19d7b1e3c7242044f47 --- /dev/null +++ b/whosetrackisitanywayimprovingrobustnesstotrackingerrorswithaffinitybasedtrajectoryprediction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64f527494c93761c301e7de1f9112c5de975a867ef226ef5832d53d2f9f7ae15 +size 472585 diff --git a/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_content_list.json b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8c753d022f1f56054340b25c5955a6bc1185fba4 --- /dev/null +++ b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0446daedb624d748a34ea45cd2c1653ae27757d58c1f1988c496049013b6478b +size 73812 diff --git a/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_model.json b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..25241b1dc6a7ad4746faaed7e4e1bf1c2775dc29 --- /dev/null +++ b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d194fc5bf21662fab1c708d6f71c1c607b7087929f8ed6c7a7350f06dfcf5f2 +size 87042 diff --git a/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_origin.pdf b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2c1b69de6552ddcf9aa410c47e07ce2af09eacde --- /dev/null +++ b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/43f474b0-feb5-46e0-bf79-ddd51e69e9cd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b7e3c5bf37657d5d1922a6a00aea3d1349d2d06026896bba4c9cd3c33e96c3e +size 1516968 diff --git a/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/full.md b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/full.md new file mode 100644 index 0000000000000000000000000000000000000000..33611751e2de1ed6bc5bfb4b66337fa4b17c2320 --- /dev/null +++ b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/full.md @@ -0,0 +1,264 @@ +# Why Discard if You can Recycle?: A Recycling Max Pooling Module for 3D Point Cloud Analysis + +Jiajing Chen, Burak Kakillioglu, Huantao Ren, Senem Velipasalar +Syracuse University, Electrical Engineering and Computer Science Dept., Syracuse, NY, USA +{jchen152, bkakilli, hren11, svelipas}@syr.edu * + +# Abstract + +In recent years, most 3D point cloud analysis models have focused on developing either new network architectures or more efficient modules for aggregating point features from a local neighborhood. Regardless of the network architecture or the methodology used for improved feature learning, these models share one thing, which is the use of max-pooling in the end to obtain permutation invariant features. We first show that this traditional approach causes only a fraction of 3D points contribute to the permutation-invariant features, and discards the rest of the points. In order to address this issue and improve the performance of any baseline 3D point classification or segmentation model, we propose a new module, referred to as the Recycling MaxPooling (RMP) module, to recycle and utilize the features of some of the discarded points. We incorporate a refinement loss that uses the recycled features to refine the prediction loss obtained from the features kept by traditional max-pooling. To the best of our knowledge, this is the first work that explores recycling of still useful points that are traditionally discarded by max-pooling. We demonstrate the effectiveness of the proposed RMP module by incorporating it into several milestone baselines and state-of-the-art networks for point cloud classification and indoor semantic segmentation tasks. We show that RPM, without any bells and whistles, consistently improves the performance of all the tested networks by using the same base network implementation and hyper-parameters. The code is provided in the supplementary material. + +# 1. Introduction + +3D point cloud data analysis has a wide range of application areas, including autonomous driving, robotics, and + +![](images/3f58d8eed21ce31dbc560ceab6404a67a277f96d93fe975d241bd1d8cf3f6ff8.jpg) +Figure 1. Motivation. In most point-based models, after several layers of neighbor feature aggregation and learning, an $N \times M$ feature matrix is obtained, where $N$ is the number of points and $M$ is each point's dimension. Max-pooling is performed at the end to obtain permutation-invariant features. Max-pooling keeps features from only part of the points (red boxes), while discarding some points' features entirely (all purple rows). + +simultaneous localization and mapping (SLAM). With the ever-increasing availability of 3D sensors, deep learning-based 3D point cloud processing has made significant strides over the past few years. However, different from 2D structured image data, 3D point cloud data is a set of unordered points, and has varying cardinality. Thus, traditional Convolution Neural Networks (CNNs) cannot be readily applied to 3D point cloud data. + +PointNet [12] is a pioneering 3D point cloud analysis work using end-to-end deep learning. It employs max-pooling operation as a symmetric function to obtain permutation-invariant features from 3D point clouds. Each point is processed independently by a shared multilayer perceptron (MLP), which does not account for local relationship of neighboring points. To remedy this, later works proposed other network structures or improved point feature aggregation approaches [13, 14, 22, 24, 27], while still employing the same max pooling operation. However, as the point feature aggregation module becomes more complex, the computational cost of the whole network increases, + +since it needs to go through several neighbor feature aggregation layers to learn a good feature representation. + +One common theme with most of the existing approaches is their use of traditional max-pooling. Fig. 1 illustrates the max-pooling operation, where red and purple boxes are the kept and discarded features, respectively. For each of the M features, the feature with the highest value among N points is kept. Thus, some points (all-purple rows) may have no contribution in this process, since none of their features are included in the final permutation-invariant feature vector. Moreover, for most point cloud classification or segmentation networks, the main computational load is due to the neighbor feature aggregation or point feature learning module. At the end, if only a small group of points contribute to the final prediction vector, and the rest of the point features are discarded, then this is also an inefficient use of the computational resources. + +So, why discard if you can recycle? In order to recycle the precious set of discarded features, which are usually obtained by some complex feature aggregation and learning modules or complex network structures, we propose a novel Recycling Max-Pooling (RMP) module. The proposed RMP module performs repeated max-pooling operations among the points that were discarded by the previous max-pooling step to obtain the corresponding permutation-invariant features for training. The proposed RMP module uses the new set(s) of permutation-invariant features, obtained from the discarded points, to refine the original set of features obtained by the first max-pooling operation, and increase the performance of the original network. + +Contributions. The main contributions of this work include the following: + +- We first show that many baseline approaches throw away a significant portion of points after using traditional max-pooling, and this affects the model performance. +- We also show that the features thrown away indeed provide comparable performance, to the features that are kept by a baseline model, when used by themselves. Thus, it is wasteful to discard them for not only computational reasons but also for performance reasons. +- We propose a novel Recycling Max-Pooling Module (RPM) to recycle these still informative features for improved performance. To the best of our knowledge, this is the first work to explore the recycling of discarded point features, and investigate how to take advantage of a bigger portion of the point cloud. +- Our method allows refining the original permutation-invariant features only during the training process to improve a baseline network's performance. +- We provide extensive experimental results and comparisons with multiple milestone and state-of-the-art (SOTA) methods on various datasets, including ModelNet40 [23], ScanObjectNN [21] and S3DIS [1]. The results show + +that when the proposed RPM module is incorporated into these networks, it consistently improves the performance on point cloud classification and indoor point cloud semantic segmentation tasks. + +# 2. Related Work + +CNNs have been proved to work well on tasks involving 2D images, such as image classification [7, 18], object detection [15, 16], and semantic segmentation [10, 17]. However, different from 2D images, 3D point cloud data is unstructured, making CNNs not readily applicable to tasks involving 3D point clouds. To address this problem, PointNet [12] showed that permutation-invariant features can be obtained from 3D point clouds by a symmetric function, and used max-pooling operation for this purpose. Many following methods have been proposed based on this idea [12, 22, 24, 25], and all these methods use max-pooling at the end of their models. Similar to the survey in [26], we classify point cloud analysis methods into 3 categories: (i) multi-view based models; (ii) Volumetric models; (iii) point-based methods. + +i. Multi-view-based models usually transform 3D point cloud data into 2D images by projection, and then apply existing 2D image processing models to perform prediction. A multi-view CNN (MVCNN) is proposed in [19] to perform 3D point cloud classification and segmentation by first projecting 3D point cloud into 2D images from different perspectives, and then using a CNN model to extract features from those 2D images. To address the issue of information loss, due to 3D to 2D projection, SnapNet [2] generates pairs of RGB and depth images, by taking snapshots of a point cloud, and performs point cloud semantic segmentation with the help of depth images. SimpleView [6], a more recent multi-view based method, presents that the choice of training strategy, such as learning rate decay, optimizer choice etc., has significant effect on network's performance. It first projects point cloud into six orthogonal planes to create sparse depth images, and then applies ResNet [7] to perform classification with a SOTA accuracy. + +ii. Volumetric models first transform an unstructured 3D point cloud data into voxel-frames, and then use 3D CNN to perform classification and segmentation. VoxNet [11] is an earlier voxel-based model applying 3D CNN to voxelized point cloud data. However, large memory requirement and long training times are the main drawbacks of this approach. SEGCloud [20] first converts point cloud into coarse voxels, 3D fully convolutional network performs prediction on those voxels, and the prediction result will be transferred back to the raw 3D points via trilinear interpolation. PointGrid [8] is a 3D convolution-based method, which divides space into a number of grid cells. From each grid cell, a fixed number of points is selected to allow the network to learn higher-order local approximation functions. Instead of partition + +ing points into Cartesian voxels, Cylinder3D [28] partition points into cylindrical voxels. This method is more suitable for large-scale and sparsely distributed point clouds. + +iii. Point-based models take raw 3D point as input directly. By performing the max-pooling operation, permutation invariant features are obtained. PointNet [8] is a pioneering work in this category. Yet, performing max-pooling among all points causes losing some local information. To address this problem, PointNet++ [13] uses a hierarchical structure. Farthest Point Sampling (FPS) is performed first to group the point cloud into local neighborhoods in each layer. Then a shared PointNet is run on each of these groups separately and aggregates all neighborhoods together for final classification and/or segmentation. DGCNN [22] proposes a dynamic edge convolution, in which the feature of every point is calculated based on its own K-nearest neighborhood that constantly changes at different layers. DPFA [3] adopts DGCNN's structure, but with an attention mechanism to aggregate neighboring points' features. GDANet [25] introduces the Geometry-Disentangle Module to dynamically disentangle point clouds into the contour and flat parts of 3D objects. In each layer, features from contour part and flat part refine all points's features for final prediction. CurveNet [24] proposes a novel point feature aggregation method, and provides SOTA performance on the ModelNet40 [23] dataset. In each layer, points learn how to make up a curve and curve's feature is learned for final prediction. + +# 3. Recycling Max Pooling (RMP) Module + +Our Recycling Max Pooling (RMP) module is designed to improve the performance of networks that use max-pooling operation during 3D point cloud processing. Instead of performing max-pooling only once, and discarding a significant portion of perfectly useful features, RMP module performs the max-pooling operation repeatedly among the points that were discarded in the previous max-pooling stage. This way permutation-invariant features are collected at multiple levels, which are then recycled to refine and improve the performance of the original model, which only uses features kept after the first max-pooling operation. The motivation behind the RMP module is provided in Sec. 3.1. + +# 3.1. Motivation + +We first perform an analysis of the percentage of points kept/utilized or discarded by several baseline models using traditional max-pooling. Our studies provide two key findings: (i) points that are discarded by the traditional max-pooling can provide comparable performance when used by themselves, (ii) a model's prediction accuracy is correlated with the point utilization percentage. + +![](images/a8d74eb100fd7c1e8e19c14ec3a92d29534a7835b4679a6075dd15fb6fc87048.jpg) +Figure 2. Distribution of the number of points kept after one max-pooling. Distributions for different models have distinct means. Lighter and darker shades represent the values at the beginning and end of the training, respectively. + +# 3.1.1 Points Utilization Analysis + +While existing point-based models focus on developing different point feature learning and neighbor feature aggregation modules (usually with increasing complexity), they use the same max-pooling operation in the end for permutation-invariance. As shown in Fig. 1, max-pooling operation discards features of some points entirely. To analyze the percentage of the points discarded, and its effect on the model performance, we perform experiments with PointNet, PointNet++ and DGCNN. These baselines were chosen since most point-based methods have been developed based on these three networks. After training, PointNet, PointNet++ and DGCNN are tested on the ModelNet40 classification dataset, and the number of points kept after the traditional max-pooling is recorded for each test sample. Table 1 shows the mean and standard deviation (stdev) for the number of points kept after max-pooling, and also shows the accuracy for three different models. For all the models (except PointNet++, the number of points before max-pooling is 1024. For PointNet++, a fixed number of points are sampled in each layer, thus, there are 256 points before max-pooling. Different models have different mean values, but all have small stdev values. It can also be seen that the prediction accuracy is positively correlated with the point utilization percentage, indicating that wisely recycling some of the discarded points has the promise of increasing the prediction accuracy. Fig. 2 shows the distribution of the number of points kept after max-pooling for different models, where lighter and darker shades represent the values at the beginning (when models have random weights) and end of the training, respectively. The distributions at the end of the training are the shifted versions of those before training to the right, indicating that the training process is finding various points with useful features and increasing the number of points kept after the max-pooling. This provides motivation that recycling some of these discarded points is favorable. More motivation to come in Sec. 3.1.2. + +
ModelNo.of Pnts before Max-PoolingMean of no. of kept pntsstdev of no. of kept pnts% of kept pntsAccuracy
PointNet1024335.839.632.80%90.12%
PointNet++256184.215.272.00%93.07%
DGCNN1024456.530.544.60%92.51%
+ +We have also analyzed the number of points kept after max-pooling for each class. After recording the number of utilized points for each sample of each class, we applied a normal distribution test [4,5] on the data. For all three models, the number of points selected after max-pooling follows a normal distribution for most (32 to 33) of the 40 classes (a table is provided in the Suppl. material). We can observe that the number of points kept after max-pooling is related to the sample shape's complexity, i.e. for more complex shapes, more points are kept to represent the shape information, or vice versa. After these findings, in the next section, we analyze whether any of these discarded points and their features are useful for the task at hand. + +# 3.1.2 Analysis of the Potential of Discarded Points + +To analyze the potential of discarded points, we perform experiments by only using their permutation-invariant features (obtained via repeated applications of max-pooling) for the classification task on ModelNet40. As shown in Fig. 1, with point-based approaches, after several feature aggregation layers, a point feature matrix $P_1^f \in \mathbb{R}^{N_1 \times M}$ is obtained, where $N_1$ is the number of points before the first max-pooling, and $M$ is the feature dimension. After the first max-pooling, a permutation invariant feature vector $F_1 \in \mathbb{R}^M$ is obtained together with the feature matrix of the discarded points $P_2^f \in \mathbb{R}^{N_2 \times M}$ , where $N_2$ is the number of the discarded point after the first max-pooling. Then, we apply max-pooling on $P_2^f$ to obtain $F_2 \in \mathbb{R}^M$ . This recycling process can be repeated $n$ times to obtain the $n^{th}$ level permutation-invariant feature vector $F_n \in \mathbb{R}^M$ . + +In order to explore the potential of permutation-invariant features from different levels, we obtain $F_{1}$ , $F_{2}$ and $F_{3}$ for PointNet, PointNet++ and DGCNN, and use them individually to test on the ModelNet40 classification task. Accuracy values obtained with $F_{1}$ , $F_{2}$ and $F_{3}$ are provided in Table 2. For all three models, $F_{2}$ and $F_{3}$ , by themselves, provide very similar and comparable performance to $F_{1}$ , yet all existing models, to our best knowledge, only make use of $F_{1}$ for final prediction when these discarded points indeed have useful features that should be recycled. + +Table 1. Point utilization analysis of different models that use traditional max-pooling. stdev is the standard deviation. Models not utilizing any features from most points have lower accuracy. + +
ModelUsing F1Using F2Using F3
PointNet90.12%89.64%89.56%
PointNet++93.06%92.76%92.92%
DGCNN92.51%92.22%92.01%
+ +Table 2. Classification accuracy obtained when permutation-invariant features $\mathbf{F}_1, \mathbf{F}_2$ and $\mathbf{F}_3$ are used by themselves. + +# 3.2. Recycling Max Pooling Module + +Motivated by the findings in Sec. 3.1, we propose the Recycling Max-Pooling (RMP) module to increase the percentage of utilized points by recycling the points, which are discarded by the traditional max-pooling, for training. Using the notation introduced in Sec. 3.1.2, combining $F_{1}, F_{2}, \dots, F_{n}$ simply by concatenation or addition is not the most preferable approach, which is also supported by our experiments (please see Suppl. material). Instead, our proposed RMP module first obtains $F_{1}, F_{2}, \dots, F_{n}$ by recycling the discarded points, and then refines $F_{1}$ by designing a hierarchical loss function as illustrated in Fig. 3. This loss function incorporates classification loss and refinement loss, which are described below: + +![](images/f433a2652d980261267ee8fa94ee0948b6528ed162bd4e0e294cebe8b4bf534b.jpg) +Figure 3. Proposed RMP module. After the point feature aggregation and learning, the classification loss and refinement loss are obtained by different level's permutation invariant feature. + +# 3.2.1 Classification Loss + +The classification losses $L_1^c, L_2^c, \ldots, L_n^c$ are calculated based on the individual predictions of permutation-invariant features, $F_1, F_2, \ldots, F_n$ , respectively. $L_i^c$ is the cross-entropy loss between $\hat{y}_i$ and $y_i$ , where $y_i$ is the one-hot encoded ground truth, and $\hat{y}_i$ is the soft-max prediction obtained based on $F_i$ for $i \in \{1, \ldots, n\}$ . Then, the classification loss is defined as: + +$$ +L ^ {c} = \sum_ {i = 1} ^ {n} L _ {i} ^ {c}. \tag {1} +$$ + +Since different sets of point features are sampled at each recycling max-pooling level, and the classifier is trained on + +these different batches of points, this allows the classifier to learn and generalize better. + +# 3.2.2 Refinement Loss + +In [9], an Augmenter network is used to transform the input point cloud. Then, the augmented loss, obtained by feeding the augmented data to target promotion network, is used to refine the original loss. Inspired by this, we design our refinement loss function to refine $\pmb{F}_{1}$ by $\pmb{F}_{2}, \pmb{F}_{3}, \dots, \pmb{F}_{n}$ . Contrary to [9], we do not employ another network to improve the target network. Instead, we only perform several layers of max-pooling, and use the permutation-invariant features $\pmb{F}_{i} (i \neq 1)$ , obtained at each recycling layer, to refine $\pmb{F}_{1}$ . + +According to the analysis in Sec. 3.1.2 and Table 2, the accuracy obtained by only using $\pmb{F}_i$ , where $i \in \{2,..,n\}$ , is lower than the one obtained from $\pmb{F}_1$ , which means $L_i^c > L_1^c$ . Thus, we define the refinement loss for the recycling level $i$ as follows: + +$$ +L _ {i} ^ {r} = \left| 1 - e ^ {\left(L _ {i} ^ {c} - \rho_ {i} L _ {1} ^ {c}\right)} \right| \tag {2} +$$ + +$$ +\rho_ {i} = \alpha_ {i} \cdot e ^ {\left(\sum_ {m = 1} ^ {k} y _ {m} \cdot \hat {y _ {m}}\right)}, \tag {3} +$$ + +where $\alpha_{i} > 1$ , $k$ is the number of classes, and $y_{m}$ and $\hat{y_{m}}$ are the ground truth and the prediction based on $F_{1}$ , respectively. During the training process, the classification losses $L_1^c$ , $L_2^c$ , ..., $L_n^c$ are minimized as described in Sec. 3.2.1. By incorporating $\rho_{i}$ , Eqn. (2) promotes $L_1^c < L_i^c$ for $i \in \{2, \dots, n\}$ , so that best point utilization can still be achieved after the first max-pooling operation. Minimizing the $L_i^r$ in Eqn. (2) aims to obtain $L_i^c \approx \rho_i L_1^c$ making $L_i^c$ slightly larger (adjusted by $\rho_{i}$ ) than $L_1^c$ . It is also not desirable for $L_i^c$ to be too large, which would contradict the goal of minimizing (1). Thus, to avoid $L_i^c$ , and in turn $L_i^c - \rho_i L_1^c$ , to get too large, we take absolute value of the difference, so that $L_i^c$ is restricted and $L_i^r >= 0$ . + +At the early stages of the training, the features are not yet very reliable, which might make the refinement loss not that beneficial. Therefore, we dynamically adjust the $\rho_{i}$ as in Eqn. (3). When the predictions are not good, i.e. $\sum_{m = 1}^{k}y_{m}\cdot \hat{y_{m}}\approx 0$ then $\rho_{i} = \alpha_{i}$ . This places more attention on the predictions made based on $F_{1},F_{2},\dots,F_{n}$ .When each level's prediction performance becomes stable, $\rho_{i}$ increases and $F_{1}$ starts to be refined by $F_{2},\ldots ,F_{n}$ . The overall refinement loss is defined as $L^r = \sum_{i = 2}^n L_i^r$ .Combining the classification loss $(L^{c})$ and refinement loss $(L^{r})$ ,the final loss function is defined as: + +$$ +L = (1 - \lambda) \cdot L ^ {c} + \lambda \cdot L ^ {r}, \tag {4} +$$ + +where $\lambda$ determines the weight of the refinement loss. + +# 4. Experiments + +In order to show that the proposed RMP module is generalizable, and can improve the performance of various networks, we have incorporated the RMP module to several milestone works and recent SOTA methods to perform point cloud classification and indoor semantic segmentation. In all the experiments (except ablation studies), we perform max-pooling twice ( $n = 2$ ), i.e. we only use one additional recycling layer. Thus, compared to training the original network, the RMP module does not cause significant overhead. + +As stated in [6], the training setup has a great impact on a network's performance. To perform fair and commensurate comparison, all the models are trained on the same machine, with the same configuration. The accuracy for the classification experiments is evaluated without any voting, i.e., Accuracy $= \frac{T}{T + F}$ , where T and F are true and false classification, respectively. This is done to show the performance improvement provided solely by our proposed RMP module. Thus, an original model's accuracy reported here can be slightly different from what is reported in the corresponding papers. + +During training, the accuracy values tends to fluctuate when a model's performance is close to converging. Thus, the highest recorded accuracy, from all training epochs, can not always reflect a network's learning ability. Thus, we also report the smoothed accuracy, which is computed by + +$$ +S A _ {n} = \beta \cdot S A _ {n - 1} + (1 - \beta) \cdot A _ {n}, \tag {5} +$$ + +where $SA_{n}$ and $A_{n}$ are the smoothed and highest accuracy values, respectively, at epoch $n$ . $\beta \in [0,1]$ , and is set to be 0.99 here. + +# 4.1. Point Cloud Classification on ScanObjectNN + +In this experiment, we evaluate several milestone baselines and SOTA methods, namely CurveNet [24], DPFA [3], GDANet [25], DGCNN [22], PointNet++ [13] and PointNet [12], with and without our proposed RMP module incorporated. We perform point cloud classification on the ScanObjectNN dataset [21] without the background. This dataset contains 15k objects from 15 categories. Some example objects from this dataset are shown in Fig. 4. As can be seen, missing object parts and nonuniform distribution of points make this dataset more challenging. Table 3 + +![](images/a1dc42288f36642e7234c34794fdf09401d152df31f0f97cd44c0672321f02d4.jpg) +Figure 4. Example objects from the ScanObjectNN dataset. + +
Model NameHighest Acc.Smoothed Acc.
PointNet79.39%76.82%
PointNet++88.17%84.75%
DGCNN83.10%79.95%
GDANet84.23%81.29%
DPFA84.24%80.73%
CurveNet83.84%81.52%
PointNet (+RMP)80.57% (↑1.18%)77.43% (↑0.61%)
PointNet++ (+RMP)89.02% (↑0.85%)85.38% (↑0.63%)
DGCNN (+RMP)87.0% (↑3.97%)82.42% (↑2.47%)
GDANet (+RMP)86.27% (↑2.04%)82.75% (↑1.46%)
DPFA (+RMP)85.93% (↑1.69%)81.94% (↑1.21%)
CurveNet (+RMP)85.54% (↑1.7%)81.93% (↑0.41%)
+ +shows the accuracy values of different SOTA networks with and without using our proposed RMP module. It can be seen that for all six models, the proposed RMP module provides consistent improvement in both the highest (as high as $3.97\%$ ) and smoothed accuracy values. Another observation is that, compared to the other five models, the RMP provides the least improvement over PointNet++. This is expected, since PointNet++ performs several samplings before the first max pooling. As shown in Table 1, PointNet++ has only 256 points before the first max-pooling operation, after which $72\%$ of 256 points is already utilized for prediction. Thus, there is a smaller amount of points left, decreasing the amount of useful features for recycling. + +# 4.2. Point Cloud Classification on Modelnet40 + +In this experiment, we evaluate the same baselines as in the above experiment with and without our proposed RMP module on the Modelnet40 [23] dataset for classification. This dataset contains 12,311 CAD models covering 40 manmade object categories, and is split into a training set containing 9843 objects, and a testing set containing 2468 objects. Some examples from this dataset are shown in Fig. 5. Table 4 shows the accuracy values of different SOTA networks with and without using our proposed RMP module. It can be seen that for all six models, the proposed RMP module provides consistent improvement in both the highest and smoothed accuracy values. + +![](images/a05383b396c5eedd9bd252a4e9abec6830e5ced9d6a4748c96886f49b1faa3a9.jpg) +Figure 5. Example objects from the ModelNet40 dataset + +Table 3. Classification results on the ScanObjectNN dataset. The proposed RMP module provides consistent improvement over all baselines in both the highest and smoothed accuracy values. Black bold font and blue font show the best performance and the highest increase provided, respectively. + +
Model NameHighest Acc.Smoothed Acc.
PointNet90.12%88.73%
PointNet++93.06%90.69%
DGCNN92.51%91.30%
GDANet92.30%90.59%
DPFA93.10%91.38%
CurveNet92.82%92.55%
PointNet (+RMP)90.60% (↑0.48%)88.74% (↑0.01%)
PointNet++ (+RMP)93.27% (↑0.21%)92.26% (↑1.57%)
DGCNN (+RMP)93.15% (↑0.64%)91.69% (↑0.39%)
GDANet (+RMP)93.27% (↑0.97%)91.70% (↑1.2%)
DPFA (+RMP)93.67% (↑0.57%)91.84% (↑0.46%)
CurveNet (+RMP)93.42% (↑0.6%)92.98% (↑0.43%)
+ +Table 4. Classification results on the ModelNet40 dataset. The proposed RMP module provides consistent improvement over all baselines in both the highest and smoothed accuracy values. Black bold and blue fonts show the best performance and the highest increase provided, respectively. + +Comparing Tables 3 and 4, the proposed RMP module provides more accuracy improvement over the original networks on the ScanObjectNN dataset. This can be explained by the fact that the distribution of points in the ScanObjectNN dataset are more irregular and objects have missing parts. Thus, only the features of the points, kept after one max-pooling, might not be sufficient to fully represent object shape information. By learning from permutation-invariant features obtained at different layers, a more complete shape information is obtained. + +# 4.3. Semantic Segmentation on S3DIS + +Among the six models tested for the classification task on the ScanObjectNN and Modelnet40 datasets, PointNet, DGCNN and DPFA offer max-pooling based semantic segmentation network structures in their papers. Thus, we also integrated our RMP module on these three models to evaluate it on a different task of semantic segmentation. PointNet++ also has the semantic segmentation structure, but its segmentation model is based on interpolation and upsampling rather than max-pooling. Thus, PointNet++ is not included in the semantic segmentation experiments. + +S3DIS dataset [1] is a large indoor point cloud dataset. It contains 6 areas covering 271 rooms. Each point belongs to one of 13 classes: {clutter, ceiling, floor, wall, beam, column, door, window, table, chair, sofa, bookcase, board}. Following PointNet [12], we divide each room into blocks of $1m \times 1m \times z$ , where $z$ is the room height in meters. 4096 points are randomly selected from each block as the input to the network. For these 6 areas, 6-fold cross validation is performed for all the models with and without our RMP module. At each fold, one area is set aside for testing, and the models are trained on the remaining areas. The results are summarized in Table 5. For all of the 6 areas, both the overall accuracy (OA) and mIoU of all three models are increased. The average of all 6 folds is also reported showing + +both OA and mIoU are improved for all 3 models. Example outputs for qualitative comparison are shown in Fig. 6. + +
Testing AreaModelOAMIoU
Area1PointNet77.31%51.60%
DGCNN82.10%62.94%
DPFA90.32%70.29%
PointNet(+RMP)82.84% (↑5.53%)59.22% (↑7.62%)
DGCNN(+RMP)85.62% (↑3.52%)63.78% (↑0.84%)
DPFA(+RMP)90.63% (↑0.31%)71.75% (↑1.46%)
Area2PointNet72.33%34.96%
DGCNN78.24%36.95%
DPFA87.71%53.95%
PointNet(+RMP)78.62% (↑6.29%)39.7% (↑4.74%)
DGCNN(+RMP)79.88% (↑1.64%)43.02% (↑6.07%)
DPFA(+RMP)90.63% (↑2.92%)54.93% (↑0.98%)
Area3PointNet83.47%47.46%
DGCNN88.74%62.03%
DPFA90.45%66.04%
PointNet(+RMP)84.91% (↑1.44%)57.57% (↑10.11%)
DGCNN(+RMP)89.7% (↑0.96%)70.23% (↑8.2%)
DPFA(+RMP)90.58% (↑0.13%)66.14% (↑0.1%)
Area4PointNet73.05%35.71%
DGCNN80.62%42.65%
DPFA85.94%51.08%
PointNet(+RMP)76.93% (↑3.88%)41.25% (↑5.54%)
DGCNN(+RMP)82.51% (↑1.89%)45.72% (↑3.07%)
DPFA(+RMP)87.81% (↑1.87%)53.87% (↑2.79%)
Area5PointNet78.76%42.00%
DGCNN82.60%46.97%
DPFA87.47%52.96%
PointNet(+RMP)79.05% (↑0.29%)43.23% (↑1.23%)
DGCNN(+RMP)84.25% (↑1.65%)48.54% (↑1.57%)
DPFA(+RMP)88.17% (↑0.7%)54.58% (↑1.62%)
Area6PointNet83.81%57.86%
DGCNN84.53%64.57%
DPFA92.20%75.23%
PointNet(+RMP)85.72% (↑1.91%)63.9% (↑6.04%)
DGCNN(+RMP)87.94% (↑3.41%)71.89% (↑7.32%)
DPFA(+RMP)92.34% (↑0.14%)77.33% (↑2.1%)
6-fold Cross Validation AveragePointNet78.12%44.94%
DGCNN83.16%52.68%
DPFA89.02%61.59%
PointNet(+RMP)81.35% (↑3.23%)50.81% (↑5.87%)
DGCNN(+RMP)84.39% (↑1.23%)57.2% (↑4.52%)
DPFA(+RMP)89.75% (↑0.73%)63.17% (↑1.58%)
+ +Table 5. Segmentation results on the S3DIS dataset with 6-fold cross validation. Overall, the proposed RMP module increases both the Overall Accuracy (OA) and mean Intersection over Union (mIoU) for all models. + +# 5. Ablation Study + +Since recent works GDANet and DPFA both adopt the feature-wise neighbor searching strategy proposed in DGCNN, we used DGCNN as the baseline network to perform the ablation studies. Since the benefits of the proposed RMP are more evident on irregular and/or incomplete point sets (as discussed in Sec. 4.1), ScanObjectNN datasets is used for the ablation studies. + +# 5.1. Analysis of $n$ , the number of Max-Poolings + +We studied the effect of the number of times max-pooling operation is repeated. For this experiment, $\alpha = 1.7$ and $w = 0.5$ . When $n = 1$ , it reduces to the original network. Fig. 7(b), shows the plot of the smoothed and highest + +accuracy values versus $n$ . The best smoothed and highest accuracy values are obtained when $n = 2$ and $n = 3$ , respectively. When $n$ is increased further the performance degrades. This makes sense since the first 2 or 3 max-pooling levels pick up most of the points with useful features, capturing an object's shape etc., and the remaining points might contain more noise than useful information. Fig. 7 (a) shows the smoothed accuracy plot of DGCNN, incorporating the RMP module, versus the training epochs, for different numbers of max-pooling operation. The curves for $n = 2$ and $n = 3$ almost entirely overlap, and provide the highest accuracy. + +# 5.2. Analysis of weight value $\lambda$ + +In Eqn. (4), $\lambda$ is the weight of the refinement loss determining its contribution to the overall loss function. We analyze the effect of different values of $\lambda$ on the performance when $n = 2$ and $\alpha = 2.1$ . The results are shown in Table 6. As can be seen, as the value of $\lambda$ increases from 0.5 to 0.8, the accuracy values also increase in general. The accuracy improvement ranges between $0.85\%$ and $3.97\%$ , and the highest performance increase is obtained when $\lambda = 0.8$ . When $\lambda > 0.8$ , the performance does not increase anymore. This makes sense, since when $\lambda = 1$ , e.g., the overall loss is equal to the refinement loss, i.e. the classification loss is not used. This is not the right approach, since it does not make sense to use the refinement loss if each $F_{i}$ is not equipped with the prediction ability (also supported by the results in the table). + +
ModelλHighest Acc.Smoothed Acc.
DGCNNNone83.10%79.95%
DGCNN (+RMP)0.583.95%(↑0.85%)81.32%(↑1.37%)
DGCNN (+RMP)0.685.14%(2.04%)81.79%(↑1.84%)
DGCNN (+RMP)0.785.03%(↑1.93%))81.82%(↑1.87%)
DGCNN (+RMP)0.887.07%(↑3.97%)82.42%(↑2.47%)
DGCNN (+RMP)0.984.69%(↑1.59%)81.54%(↑1.59%)
DGCNN (+RMP)123.44%(↓59.66%)25.48%(↓54.47%)
+ +Table 6. Analysis of different $\lambda$ values on the accuracy + +# 5.3. Analysis of hyper-parameter $\alpha$ + +In Eqn. (2), $\alpha_{i}$ is a constant, which is used to compute the refinement loss of $L_{i}^{r}$ , which is employed for $F_{i}$ to refine $F_{1}$ . For this ablation study, we only perform recycling once, i.e. max-pooling is performed a total of 2 times ( $n = 2$ ). Thus, we only have $\alpha_{2}$ , which is referred to as $\alpha$ here for simplicity. The value of $\lambda$ is set to 0.5. We analyze the effect of different $\alpha$ values on accuracy, and the results are shown in Table 7. When $\alpha$ is 1.2, 1.5 or 1.8, the improvement provided over DGCNN ranges between $1.02\%$ and $1.7\%$ . $\alpha = 1.5$ provides the highest performance increase for both the highest $(1.7\%)$ and smoothed accuracy $(1.87\%)$ . When $\alpha$ is 2.1 the improvement provided over DGCNN is slightly less $(0.85\%)$ compared to other $\alpha$ values. + +![](images/053760adb3e80ebd08fcc371d7e7916706aa3a6d17b35757f24367ca8c80fd0e.jpg) +Figure 6. Example segmentation outputs for qualitative comparison. Outputs of PointNet, DGCNN and DPFA without (w/o) and with (w/) incorporating our proposed RMP module. Some regions are marked by black ellipses to show the improvement provided by RMP. + +![](images/fea81911f39b790c98b25879503d61af160c050b05e01be72dc41558aeeea2b9.jpg) +(a) + +![](images/4a6ccb2a385bb9573960f77cfe48ba0b53e8ee0d4000ef1f4fbc9b30e059ad2f.jpg) +(b) +Figure 7. Analysis of number of max-pooling levels $(n)$ (a) Smoothed accuracy plot during training for different values of $n$ , (b) the smoothed and highest accuracy values versus $n$ . + +
ModelαHighest Acc.Smoothed Acc.
DGCNNNone83.10%79.95%
DGCNN(+RMP)1.284.12%(↑1.02%)81.09%(↑1.14%)
DGCNN(+RMP)1.584.80%(↑1.70%)81.82%(↑1.87%)
DGCNN(+RMP)1.884.46%(↑1.36%)81.75%(↑1.80%)
DGCNN(+RMP)2.183.95%(↑0.85%)81.32%(↑1.37%)
+ +# 5.4. Analysis of the number of input points + +In order to analyze the performance with varying input point sparsity, we evaluated DGCNN, with and without the proposed RMP module, by using 512, 1024 and 2048 points, in turn, as input. The results are shown in Table 8. With the proposed RMP module, the accuracy obtained with 512 points (when input data is sparse) is almost the same as the one with 1024 points (0.78% difference), since the RMP module allows making use of more points via recycling. RMP module improves the performance of DGCNN by 2.04% even when only 512 input points are used. Over different number of input points, the RMP module provides a stable performance increase. + +Table 7. Analysis of different $\alpha$ values on the accuracy. + +
ModelNo. of Inp. PntsHighest Acc.Smoothed Acc.
DGCNN51281.97%78.96%
DGCNN102483.10%79.95%
DGCNN204884.18%81.19%
DGCNN(+RMP)51284.01%(↑2.04%)80.86%(↑1.9%)
DGCNN(+RMP)102484.79%(↑1.69%)81.74%(↑1.79%)
DGCNN(+RMP)204886.73%(↑2.55%)83.15%(↑1.96%)
+ +# 5.5. Analysis of Training Time + +The training times of different models, with and without the proposed RMP module, on the ScanObjectNN dataset + +are listed in Table 9. Original GDANet and CurveNet provide very slight increase (1.3% and 1.57%, resp.) in the smoothed accuracy compared to DGCNN, while requiring much longer training time (5.5 to 6.5 fold increase) due to their complex feature aggregation layers. In contrast, our proposed RMP module increases the highest accuracy of DGCNN by 3.97%, with only a small overhead on training time (10.97s or 1.46 fold increase per epoch). Since the recycling is only performed during training, our approach does not affect the inference times. + +Table 8. Analysis of performance with different number of input points + +
ModelTraining time (s)Highest Acc.Smoothed Acc.
DGCNN23.5383.10%79.95%
DGCNN (+RMP)34.5087.07% (↑3.97%)82.42(↑2.47%)
GDANet129.4184.23%81.29%
GDANet (+RMP)137.9886.27% (↑2.04%)82.75%(↑1.46%)
CurveNet152.7783.84%81.52%
CurveNet (+RMP)158.0985.54%(↑1.7%)81.93%(↑0.41%)
+ +Table 9. Per epoch training time and accuracy of different models on the ScanObjectNN dataset + +# 6. Discussion and Conclusion + +Max-pooling is a commonly used approach to obtain permutation-invariant features for point cloud processing tasks. In this paper, we have first shown that methods using traditional max-pooling throw away a significant portion of points and that the features of these discarded points indeed provide comparable performance, to the features that are initially kept, when used by themselves. Thus, it is wasteful to discard them for not only computational reasons but also for performance reasons. To address this, we have proposed a novel Recycling Max-Pooling Module (RMP) to recycle these still informative features for improved performance. We have presented the refinement loss that, when combined with the classification loss, allows recycled features to refine the initially kept features. We have performed extensive experiments on the ModelNet40, ScanObjectNN, and S3DIS datasets for classification and segmentation tasks, and shown that the proposed RMP module is generalizable to various networks, and consistently improves the performance of several SOTA baselines. Since the proposed approach goes through an extra level to recycle the discarded features during training, this performance improvement comes with a slight increase in the training time. + +# References + +[1] I. Armeni, O. Sener, A. R. Zamir, H. Jiang, I. Brilakis, M. Fischer, and S. Savarese. 3d semantic parsing of large-scale indoor spaces. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1534-1543, 2016. 2, 6 +[2] A. Boulch, B. Le Saux, and N. Audebert. Unstructured point cloud semantic labeling using deep segmentation networks. 3DOR@ Eurographics, 3, 2017. 2 +[3] J. Chen, B. Kakillioglu, and S. Velipasalar. Background-aware 3d point cloud segmentation with dynamic point feature aggregation. arXiv:2111.07248, 2021. 3, 5 +[4] R. D'AGOSTINO and E. S. Pearson. Tests for departure from normality. empirical results for the distributions of b 2 and b. Biometrika, 60(3):613-622, 1973. 4 +[5] R. B. d'Agostino. An omnibus test of normality for moderate and large size samples. Biometrika, 58(2):341-348, 1971. 4 +[6] A. Goyal, H. Law, B. Liu, A. Newell, and J. Deng. Revisiting point cloud shape classification with a simple and effective baseline. International Conference on Machine Learning, 2021. 2, 5 +[7] 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, pages 770-778, 2016. 2 +[8] T. Le and Y. 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, 3 +[9] R. Li, X. Li, P.-A. Heng, and C.-W. Fu. Pointaugment: an auto-augmentation framework for point cloud classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6378-6387, 2020. 5 +[10] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. 2 +[11] D. Maturana and S. 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. 2 +[12] C. R. Qi, H. Su, K. Mo, and L. 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, 5, 6 +[13] C. R. Qi, L. Yi, H. Su, and L. J. Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. arXiv preprint arXiv:1706.02413, 2017. 1, 3, 5 +[14] S. Qiu, S. Anwar, and N. Barnes. Geometric back-projection network for point cloud classification. IEEE Transactions on Multimedia, 2021. 1 +[15] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779-788, 2016. 2 + +[16] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. Advances in neural information processing systems, 28:91-99, 2015. 2 +[17] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. 2 +[18] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 2 +[19] H. Su, S. Maji, E. Kalogerakis, and E. Learned-Miller. Multiview convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE international conference on computer vision, pages 945-953, 2015. 2 +[20] L. Tchapmi, C. Choy, I. Armeni, J. Gwak, and S. Savarese. Segcloud: Semantic segmentation of 3d point clouds. In 2017 international conference on 3D vision (3DV), pages 537-547. IEEE, 2017. 2 +[21] M. A. Uy, Q.-H. Pham, B.-S. Hua, D. T. Nguyen, and S.-K. Yeung. Revisiting point cloud classification: A new benchmark dataset and classification model on real-world data. In International Conference on Computer Vision (ICCV), 2019, 2, 5 +[22] Y. Wang, Y. Sun, Z. Liu, S. E. Sarma, M. M. Bronstein, and J. M. Solomon. Dynamic graph cnn for learning on point clouds. Acm Transactions On Graphics (tog), 38(5):1-12, 2019. 1, 2, 3, 5 +[23] Z. Wu, S. Song, A. Khosla, F. Yu, L. Zhang, X. Tang, and J. 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, 3, 6 +[24] T. Xiang, C. Zhang, Y. Song, J. Yu, and W. Cai. Walk in the cloud: Learning curves for point clouds shape analysis. arXiv preprint arXiv:2105.01288, 2021. 1, 2, 3, 5 +[25] M. Xu, J. Zhang, Z. Zhou, M. Xu, X. Qi, and Y. Qiao. Learning geometry-disentangled representation for complementary understanding of 3d object point cloud. arXiv preprint arXiv:2012.10921, 2020. 2, 3, 5 +[26] J. Zhang, X. Zhao, Z. Chen, and Z. Lu. A review of deep learning-based semantic segmentation for point cloud. IEEE Access, 7:179118-179133, 2019. 2 +[27] Z. Zhang, B.-S. Hua, and S.-K. Yeung. Shellnet: Efficient point cloud convolutional neural networks using concentric shells statistics. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1607-1616, 2019. 1 +[28] X. Zhu, H. Zhou, T. Wang, F. Hong, Y. Ma, W. Li, H. Li, and D. Lin. Cylindrical and asymmetrical 3d convolution networks for lidar segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9939-9948, 2021. 3 \ No newline at end of file diff --git a/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/images.zip b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a6458a779187c7ff427512e2eecd6219af104f75 --- /dev/null +++ b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb2f8015e327e2f91c0694e7585ac171db5cca9e160c9363dc44e03aa79a2497 +size 687736 diff --git a/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/layout.json b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1fc568f712319dbd510132ed0e191fb54f452510 --- /dev/null +++ b/whydiscardifyoucanrecyclearecyclingmaxpoolingmodulefor3dpointcloudanalysis/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caec79ffc13c3ac3b798554f12b3f774235d2d6a07b9b600964293228e712baf +size 375284 diff --git a/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_content_list.json b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9f284e950e7c3867b7ca948af9273156c9b8de91 --- /dev/null +++ b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f1c25b0ac60bf4b0e263861a71c913d352d3501e48937f3036ef7cfe62ddb47 +size 93107 diff --git a/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_model.json b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3ef24f74b2a04082f74d387b1330836f2291200c --- /dev/null +++ b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fd23623b002bce9fe40a0cf0e51c4b7f7ddd7c14d2237cbebf460c139f04560 +size 117434 diff --git a/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_origin.pdf b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6d80c452d6a449d72f81fff4c572b3922ed0753f --- /dev/null +++ b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/abdbee56-04a9-41e8-bddc-3295ea478558_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ea74b32fa3f0eed130f22a0f1fe29390706e99e4da8dcead82b8009035d15bf +size 8271590 diff --git a/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/full.md b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6b68a3bad16b50a1153a6731203a30babb4c32e3 --- /dev/null +++ b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/full.md @@ -0,0 +1,406 @@ +# WildNet: Learning Domain Generalized Semantic Segmentation from the Wild + +Suhyeon Lee + +Hongje Seong + +Seongwon Lee + +Euntai Kim* + +School of Electrical and Electronic Engineering, Yonsei University, Seoul, Korea + +{hyeon93, hjseong, won4113, etkim}@yonsei.ac.kr + +# Abstract + +We present a new domain generalized semantic segmentation network named WildNet, which learns domain-generalized features by leveraging a variety of contents and styles from the wild. In domain generalization, the low generalization ability for unseen target domains is clearly due to overfitting to the source domain. To address this problem, previous works have focused on generalizing the domain by removing or diversifying the styles of the source domain. These alleviated overfitting to the source-style but overlooked overfitting to the source-content. In this paper, we propose to diversify both the content and style of the source domain with the help of the wild. Our main idea is for networks to naturally learn domain-generalized semantic information from the wild. To this end, we diversify styles by augmenting source features to resemble wild styles and enable networks to adapt to a variety of styles. Furthermore, we encourage networks to learn class-discriminant features by providing semantic variations borrowed from the wild to source contents in the feature space. Finally, we regularize networks to capture consistent semantic information even when both the content and style of the source domain are extended to the wild. Extensive experiments on five different datasets validate the effectiveness of our WildNet, and we significantly outperform state-of-the-art methods. The source code and model are available online: https://github.com/suhyeonlee/WildNet. + +# 1. Introduction + +Domain generalized semantic segmentation aims to better predict pixel-level semantic labels on multiple unseen target domains while learning only on the source domain. Unfortunately, the domain shift between the source and target domains makes a segmentation model trained on the given source data behave stupidly on the unseen target data, as shown in Fig. 1b. In domain generalization (DG), the low generalization performance for unseen domains is obviously due to overfitting to the source domain. Since the + +![](images/e31b66eb812293a4add658008e04dcad207eafdd9d70468ebe2944c2dee8bb06.jpg) +(a) Unseen domain image + +![](images/40fbef3623732c063991a7e1031790f079e91b6e4811e52b7c04ba0fde1221bd.jpg) +(b) Baseline (mIoU $35.16\%$ + +![](images/33a2f5c29ec26fa03e19c77382bb2ada85bd2463cb2584983252de24713734c7.jpg) +(c) RobustNet (mIoU $36.58\%$ + +![](images/8db1597558fe8b33dd3318d45857deaf7306ac910f856ae31b927919f9506fac.jpg) +(d) Ours (mIoU $44.62\%$ +Figure 1. Semantic segmentation results on (a) an unseen domain image. The models are trained on GTAV [46] train set and validated on Cityscapes [10] validation set. (b) Baseline model overfits the source domain and performs poorly with mIoU $35.16\%$ on the unseen target domain. (c) RobustNet [7], a state-of-the-art method, improved mIoU to $36.58\%$ by whitening the style, but still has low generalization capability. (d) Our WildNet achieves superior generalization performance with mIoU $44.62\%$ by learning various styles and contents from the wild. More qualitative results on other datasets are available in the supplementary material. + +model cannot see any information about the target domains in the learning process and even unlabeled target images are not provided unlike domain adaptation (DA), it over-learns the statistical distribution of the given source data. + +Recently, some studies [7, 29, 41, 42] have proposed learning the domain-generalized content feature by 'removing' domain-specific style information from the data to prevent overfitting to the source domain. Based on the correlation between the feature's covariance matrix and style [13, 14], they assumed that only content features would remain if elements of features considered the domain-specific style were whitened [23, 30, 50, 53]. However, since the content and style are not orthogonal, whitening the style may cause a loss of semantic content, which is indispensable for semantic category prediction. As a result, they predict semantic categories from incomplete content features and have difficulty making accurate predictions, as shown in Fig. 1c. + +In this paper, we propose a new domain generalized semantic segmentation network called WildNet, which learns + +the domain-generalized semantic feature by 'extending' both content and style to the wild. Although some previous works [22,45,62] utilized various styles from the wild, e.g., ImageNet [11] for real styles and Painter by Numbers [38] for unreal styles, they overlooked that the high generalization ability comes from learning not only various styles but also various contents. In contrast to previous studies, our main idea is to naturally learn domain-generalized semantic information by leveraging a variety of contents and styles from the wild, without forcing whitening on domain-specific styles. + +To extend both content and style to the wild, we present four effective learning methods. (i) Based on the relevance of style and feature statistics, feature stylization diversifies the style of the source feature by transferring the statistics of the wild feature to the source feature over several layers. (ii) To prevent overfitting to the source contents, we propose content extension learning to increase the intra-class content variability in the latent embedding space. Extending content from source to wild helps networks make generalized predictions on unseen contents. (iii) To prevent overfitting to the source style, we propose style extension learning to encourage networks to adapt to the various styles extended to the wild. (iv) Finally, semantic consistency regularization enables networks to capture consistent semantic information even when both the content and style of the source domain are extended to the wild. With the proposed learning methods, our WildNet learns domain-generalized semantic features by leveraging a variety of contents and styles from the wild. Extensive experiments over multiple domains show that our network achieves superior performance on domain generalization for semantic segmentation. + +Our main contributions are as follows: + +- We present a novel domain generalized semantic segmentation network named WildNet, which learns domain-generalized semantic features by leveraging a variety of contents and styles from the wild. +- We propose four learning techniques to train domain-generalized networks by extending both the content and style of the source domain to the wild. These enable our model to make reliable predictions on various unseen target domains without training on them. +- Our network achieves superior performance in extensive experiments on domain generalization for semantic segmentation constructed over multiple domains. + +# 2. Related Work + +# 2.1. Domain Adaptation and Generalization + +Domain adaptation (DA) aims to increase the performance on the target domain by reducing the domain gap between the source and target domains. In semantic segmentation, DA is exploited to tackle the effort of annotating + +pixel-level categories in an image. Most DA methods train networks using the 'given' target images via image translation [17, 20, 33, 60, 64], feature alignment [21, 44, 55-57], and self-training [16, 29, 32, 40, 63] strategies. However, it is hard to acquire target images from various environments during the learning process, and efforts to retrain networks are required whenever applying networks to a new target domain. + +To overcome these limitations, domain generalization (DG) has recently attracted considerable attention. However, most DG studies have focused on image classification and there are only a few recent studies on semantic segmentation. In this study, we deal with DG for semantic segmentation. Unlike DA, DG does not have access to the target domains during the learning process. To make reliable predictions on various 'unknown' target domains, most existing studies focus on whitening [7], normalizing [41], and diversifying [22, 45, 62] styles to avoid overfitting to the style of the source domain. This paper focuses on extending both the content and style of the source domain to the wild [11], enabling networks to learn domain-generalized semantic features from diversified contents and styles. + +# 2.2. Contrastive Learning + +Contrastive learning [9, 39] is a strategy that minimizes the distance from a positive sample and maximizes the distance from a negative sample in the embedding space. Recently, He et al. [18] used a dynamic dictionary with a queue and Chen et al. [3] used two views of the same image as a positive pair to learn visual representations. To diversify a positive pair, a recent work [12] proposed to use the positive's nearest neighbor in the latent space as a positive. After supervised contrastive learning [27] has been proposed, there are recent efforts to apply contrastive learning to fully- and semi-supervised semantic segmentation [1, 65, 66]. To obtain positive samples, these works perform image augmentation or store features using label information in a memory bank [58]. These enhance class discrimination in the seen source domain but do not guarantee improving class discrimination in various unseen domains. To adapt contrastive learning to DG for semantic segmentation, we propose a learning method using the wild-stylized feature and its closest wild content as positive samples. + +# 2.3.Free ImageNet + +Most studies regard ImageNet [11] as free and use it to pre-train networks. The ImageNet pre-trained model is commonly used in various fields such as object detection [34, 68], semantic segmentation [8, 54], panoptic segmentation [6, 35, 59], and video object segmentation [51], and is considered to be the same basis. The ImageNet pretrained model is also used in most DA and DG for semantic segmentation methods, and ImageNet is used to borrow + +![](images/08439e504d76633f50602cecf370ce47ba4f403652e040173d97c32db7379f9d.jpg) +Figure 2. The overall learning process of WildNet. Our model is trained with four proposed methods: FS, CEL, SEL, and SCR. FS augments source features to resemble wild styles using the statistics of wild features, and the augmented features are used for CEL, SEL, and SCR. CEL performs contrastive learning using the augmented features and the wild features closest to them as positive samples and other class features as negative samples. SEL enables networks to learn task-specific information from features with diversified styles, and SCR regularizes networks to capture consistent semantic information from features with diversified contents and styles. With the proposed learning methods, our model learns domain-generalized semantic features by leveraging contents and styles from the wild. + +various styles [22, 62]. In this paper, we focus on learning domain-generalized networks by leveraging a variety of contents and styles from ImageNet. + +# 3. Proposed Method + +In this section, we introduce four learning techniques consisting of Feature Stylization (FS), Content Extension Learning (CEL), Style Extension Learning (SEL), and Semantic Consistency Regularization (SCR) for learning domain-generalized features by extending both the content and style of the source domain to the wild. Our WildNet achieves superior generalization ability with them and the overall learning process is outlined in Fig. 2. + +# 3.1. Problem Setup and Overview + +Domain generalization (DG) aims to enhance the generalization capability on both the seen source domain $S$ and unseen target domains $\mathcal{T} = \{\mathcal{T}_1,\dots,\mathcal{T}_N\}$ . Let $\phi$ be a semantic segmentation model that outputs pixel-wise category predictions $p$ from image $x$ . This model consists of a feature extractor $\phi_{feat}$ and classifier $\phi_{cls}$ . In DG, when we train the model, we have access to the source domain training dataset + +$D^{s} = \{(x^{s},y^{s})\}$ while inaccessible to the target domains, where $x^{s}\in \mathbb{R}^{H\times W\times 3}$ is an image, $y^{s}\in \mathbb{R}^{H\times W\times K}$ is its pixel-wise label, and $K$ is a number of semantic categories. The baseline model is trained with the segmentation loss + +$$ +\mathcal {L} _ {\text {o r i g}} = - \frac {1}{H W} \sum_ {h = 1} ^ {H} \sum_ {w = 1} ^ {W} \sum_ {k = 1} ^ {K} y _ {h w k} ^ {s} \log \left(\phi \left(x ^ {s}\right)\right). \tag {1} +$$ + +In this paper, we focus on extending both the content and style of the source domain to obtain high generalization performance on unknown target domains $\mathcal{T}$ . We utilize the unlabeled wild dataset $D^{w} = \{x^{w}\}$ , which has various contents and styles. At each training iteration, a random pair of source and wild images is provided as input, and the style and content of the source image are extended to the wild domain $\mathcal{W}$ in the feature space. With the help of the wild, our network naturally learns domain-generalized semantic information from a variety of contents and styles. After the training, the model is evaluated on validation sets of both the seen source domain $S$ and unseen target domains $\mathcal{T}$ . + +# 3.2. Feature Stylization + +As style is related to feature statistics [14, 15, 24, 26, 31] and the distributional shift due to style differences lies + +mainly in shallow layers of networks [41], the styles of features can be diversified by adjusting the statistics of features from shallow layers. In this work, we diversify the styles of the source features with the help of wild styles by adding several AdaIN [24] layers to the feature extractor in the learning process. This enables us to augment source features to resemble wild styles without losing spatial information. + +Let $\phi_l$ be the $l$ -th layer of networks $\phi$ and let $z_l$ be the feature output from $\phi_l$ when image $x$ is input into $\phi$ . To allow networks to learn domain-generalized semantic information from various wild-style features, we swap the style of the source feature $z_l^s$ from the source image $x^s$ with the style of the wild feature $z_l^w$ from the wild image $x^w$ . In the $l$ -th layer, we transfer the style of $z_l^w$ to $z_l^s$ and obtain the wild-stylized feature $z_l^{sw}$ as + +$$ +z _ {l} ^ {s w} = \sigma \left(z _ {l} ^ {w}\right) \frac {z _ {l} ^ {s} - \mu \left(z _ {l} ^ {s}\right)}{\sigma \left(z _ {l} ^ {s}\right)} + \mu \left(z _ {l} ^ {w}\right) \tag {2} +$$ + +where $\mu (z_l)$ and $\sigma (z_l)$ are channel-wise mean and standard deviation of feature $z_{l}$ , respectively. Because the distribution of $z_{l}^{s}$ is re-normalized with channel-wise statistics of $z_{l}^{w}$ , the style of $z_{l}^{s}$ is swapped to the wild-style while maintaining the spatial information. + +The wild-stylized feature $z_{l}^{sw}$ is input into layer $l + 1$ and $z_{l + 1}^{sw} = \phi_{l + 1}(z_{l}^{sw})$ is output from the layer. $z_{l + 1}^{sw}$ can be swapped repeatedly in the style of $z_{l + 1}^{w}$ as + +$$ +z _ {l + 1} ^ {s w} := \sigma \left(z _ {l + 1} ^ {w}\right) \frac {z _ {l + 1} ^ {s w} - \mu \left(z _ {l + 1} ^ {s w}\right)}{\sigma \left(z _ {l + 1} ^ {s w}\right)} + \mu \left(z _ {l + 1} ^ {w}\right). \tag {3} +$$ + +By the above equation, feature $z^{sw}$ is swapped in the style of $z^w$ over multiple layers. As the layer deepens, semantic information should be captured more important than style, so FS applies only to some shallow layers in this work. + +# 3.3. Content Extension Learning + +In this subsection, we propose to extend the contents in the source domain to the wild. One of the reasons for overfitting to the source domain is that networks overlearn a limited amount of source content. We address this issue by increasing the intra-class content variability with content extension in the latent embedding space. To this end, we add a projection head $\phi_{proj}$ independently of the classification head $\phi_{cls}$ after the feature extractor $\phi_{feat}$ and extend the source contents to the wild in the embedding space. + +When a source image $x^{s}$ and wild image $x^{w}$ enter the feature extractor $\phi_{feat}$ , it outputs the source feature $z^{s}$ , wild-stylized source feature $z^{sw}$ , and wild feature $z^{w}$ . The projection head $\phi_{proj}$ receives features $z^{s}, z^{sw}$ , and $z^{w}$ and outputs pixel-level projected content features $z_{proj}^{s}, z_{proj}^{sw}$ , and $z_{proj}^{w}$ , respectively. All projected features are normalized by $z = z / \max(\|z\|_2, \epsilon)$ along the channel dimension. At each training iteration, $z_{proj}^{w}$ is flattened and stored in the wild-content dictionary $Q \in \mathbb{R}^{C_q \times N_q}$ where $C_q$ is the number of channels of projected features and $N_q$ is the dictionary size. Our model uses the dynamic dictionary structure + +![](images/06f9307367dd5aabf82b8bfa38de665af482874f93489668362b51960f30c124.jpg) +wild image $x^w$ + +![](images/8ccd2d29d3467acc32954a2cadf1b45d50e567e209e16b1f6a9bc7dce0c86f67.jpg) +source image $\mathbf{x}^{\mathrm{s}}$ +Figure 3. Visualization of source-to-wild matching pixels on the cropped source and wild images. We extend the source content to the wild content closest to the wild-stylized source content corresponding to the source pixel. The source content is encouraged to come close to the wild content in the embedding space. This improves the generalization ability of our model to unseen contents. + +![](images/f2d8e38c4a3503ce3e478eb6c49da6e162e2b9ffb023e5585562812a455e855b.jpg) +wild image $x^w$ + +in [18] as $Q$ without a momentum update. We diversify contents by extending the source contents to the wild-stylized source contents and then to the wild domain using $Q$ . + +Here we focus on that the projected source feature $z_{i}^{s1}$ and projected wild-stylized feature $z_{i}^{sw}$ corresponding to the $i$ -th pixel of the source image $x^{s}$ contain exactly the same semantic information, but content perturbation exists. In order to obtain reliable semantic information from unseen contents, networks should be able to cluster contents containing the same semantic information, distinguishing them from contents containing other semantic information. To achieve this objective, we adapt the contrastive learning strategy [39] to pixel-level instances in a supervised manner and define the source content extension loss for the $i$ -th pixel as follows: + +$$ +\mathcal {L} _ {S C E} ^ {i} = - \log \frac {\psi \left(z _ {i} ^ {s} , z _ {i} ^ {s w}\right)}{\psi \left(z _ {i} ^ {s} , z _ {i} ^ {s w}\right) + \sum_ {j = 1} ^ {N _ {z}} \mathbb {1} _ {i j} ^ {s} \psi \left(z _ {i} ^ {s} , z _ {j} ^ {s w}\right)}, \tag {4} +$$ + +$$ +\psi \left(z _ {i} ^ {s}, z _ {i} ^ {s w}\right) = \exp \left(z _ {i} ^ {s} \cdot z _ {i} ^ {s w} / \tau\right), \tag {5} +$$ + +where $\mathbb{1}_{ij}^{s}$ is the negative pixel indicator that equals 1 if $y_{i}^{s}$ and $y_{j}^{s}$ are different and 0 if they are the same, $N_z$ is the number of pixels and the temperature parameter $\tau$ is set to 0.07. We train the model only with reliable samples, ignoring ambiguous positive and negative samples by excluding pixels of unknown classes and pixels in other positions of the same class. Eq. (4) encourages $z_{i}^{s}$ and $z_{i}^{sw}$ to be close, while also encouraging $z_{i}^{s}$ to move away from all negative class contents. Then, the pixel-wise loss can be applied to the entire source image by + +$$ +\mathcal {L} _ {S C E} = \frac {1}{N _ {z}} \sum_ {i = 1} ^ {N _ {z}} \mathcal {L} _ {S C E} ^ {i}. \tag {6} +$$ + +Eq. (6) encourages networks to make generalized predictions by reducing the distance in the embedding space between source contents and wild-perturbed source contents. + +Next, we further extend the source contents to the wild by utilizing the wild-content dictionary $Q$ . In the learning process, $Q$ stores diverse pixel-level wild contents, which may not exist in the source domain. Thus, if we carefully select wild-content with semantic information that each pixel + +needs to learn and then use it to train networks, networks become more robust to wild-content perturbations. Since there is no class information in the wild set $D^w$ , Eq. (4) cannot be directly applied to this wild content extension. We address this issue from the perspective that similar semantic contents will be located close to each other in the embedding space. Inspired by [12], we take the wild content $z_k^w$ closest to the wild-stylized source content $z_i^{sw}$ from $Q$ as + +$$ +z _ {k} ^ {w} = \underset {q \in Q} {\arg \min } \| z _ {i} ^ {s w} - q \| _ {2} \tag {7} +$$ + +and encourage the source content $z_{i}^{s}$ to come close to it. Since $z_{i}^{sw}$ and $q$ are normalized early on, Eq. (7) can be calculated efficiently using a dot product and rewritten as + +$$ +z _ {k} ^ {w} = \underset {q \in Q} {\arg \max } \left(z _ {i} ^ {s w} \cdot q\right). \tag {8} +$$ + +Fig. 3 shows the wild content $z_{k}^{w}$ matched to the source content $z_{i}^{s}$ using the stylized source content $z_{i}^{sw}$ . In this way, we provide various contents of the wild to the networks without category information. Now Eq. (4) can be adapted to the wild content extension as follows: + +$$ +\mathcal {L} _ {W C E} ^ {i} = - \log \frac {\psi \left(z _ {i} ^ {s} , z _ {k} ^ {w}\right)}{\psi \left(z _ {i} ^ {s} , z _ {k} ^ {w}\right) + \sum_ {j = 1} ^ {N _ {z}} \mathbb {1} _ {i j} ^ {s} \psi \left(z _ {i} ^ {s} , z _ {j} ^ {s w}\right)}. \tag {9} +$$ + +In the wild content extension, we reuse the negative samples of the source content extension. Some negative extension approaches may give better performance and we left this for future work. Then we can apply the pixel-wise wild content extension loss to the entire source image by + +$$ +\mathcal {L} _ {W C E} = \frac {1}{N _ {z}} \sum_ {i = 1} ^ {N _ {z}} \mathcal {L} _ {W C E} ^ {i}. \tag {10} +$$ + +By combining the source content extension loss and wild content extension loss, the CEL loss is defined as + +$$ +\mathcal {L} _ {C E L} = \mathcal {L} _ {S C E} + \mathcal {L} _ {W C E}. \tag {11} +$$ + +Our model learns to capture generalized semantic information from diverse contents by using the proposed CEL loss. + +# 3.4. Style Extension Learning + +Another reason for overfitting to the source domain is that networks overlearn a limited amount of the source style [36,43,67]. To address this issue, FS has diversified the styles of the source feature with the help of the wild. Interestingly, the style of the source features has changed while preserving spatial information, but networks fail to predict semantic categories from the wild-stylized feature as shown in Fig. 4f. In this subsection, we propose SEL for adapting networks to diversified styles. SEL aims to allow networks to naturally adapt to various styles by learning task-specific information from the wild-stylized feature. + +When the wild-stylized source feature $z^{sw}$ enters the classification head $\phi_{cls}$ , it outputs the pixel-wise softmax segmentation map $p^{sw} \in \mathbb{R}^{H \times W \times K}$ . Because $z^{sw}$ is the + +![](images/7faaf3ebab9dab1dd81e1b10a0234d094046c943fb96a5786eca6fe2d4d22ade.jpg) +(a) $x^{s}$ + +![](images/885153d1386a0347ba54fabccba1f208248411122a1b026430d479546bcdb36a.jpg) +(b) $x^{w}$ + +![](images/dd7954f18ca57c0cc367f89b7dd3b462a3679f1341fb7c12f9d1da7f4072aeee.jpg) +(c) rec. image from $z^{sw}$ + +![](images/6c1b676162cd6cf406795528aeaac750150a936feb182bd1a580dfc07cc24e0e.jpg) +(d) $y^{s}$ + +![](images/a28c35d7c2e6a59a77a614ebc5729f5fcf5083482115a171cdb7b937d064037b.jpg) +(e) prediction on $z^s$ + +![](images/7fab0ec4dd5e3addf015f11f0f5c16d34c89b3ecfff6ffe468222b9af5f8689d.jpg) +(f) prediction on $z^{s w}$ + +Figure 4. Given the (a) source image and (d) label, FS stylizes the source feature with the wild feature from the (b) wild image. To visualize the wild-stylized feature, (c) we reconstructed an image from the wild-stylized feature using U-Net [48]. Contrary to (e) accurate predictions from the source feature, networks (f) fail to make correct predictions from the wild-stylized feature even though the spatial information of the source feature remains the same. To address this issue, we apply SEL loss to allow networks to learn task-specific information from the wild-stylized features. + +wild-stylized source feature in which the style of the feature from $x^{s}$ has been swapped with that of the feature from $x^{w}$ , networks must predict the semantic label $y^{s}$ of $x^{s}$ from $z^{sw}$ . For this objective, we train networks by minimizing the following SEL loss: + +$$ +\mathcal {L} _ {S E L} = - \frac {1}{H W} \sum_ {h = 1} ^ {H} \sum_ {w = 1} ^ {W} \sum_ {k = 1} ^ {K} y _ {h w k} ^ {s} \log \left(p _ {h w k} ^ {s w}\right). \tag {12} +$$ + +Our model learns task-specific information from the wild-stylized features by applying the SEL loss. This enables our model to naturally learn domain-generalized semantic information from various styles. + +# 3.5. Semantic Consistency Regularization + +For high generalization capability on unseen domains, the classifier should capture consistent semantic information from features [5, 25], even if there are perturbations in both the style and content. However, as shown in Figs. 4e and 4f, the predicted result $p^{sw}$ of the wild-stylized source feature $z^{sw}$ differs from the predicted result $p^s$ of the source feature $z^s$ . Although SEL allows networks to learn task-specific information from $z^{sw}$ , this does not guarantee that $p^{sw}$ and $p^s$ are identical. To address this issue, we propose SCR that regularizes networks to capture consistent semantic information even when both the content and style of the source domain are extended to the wild. SCR aims to train networks so that the predicted probability distributions $p^{sw} = \phi_{cls}(z^{sw})$ from the wild-stylized source features get closer to the $p^s = \phi_{cls}(z^s)$ from the source features. To this end, we adapt the Kullback-Leibler (KL) divergence loss as + +$$ +\mathcal {L} _ {S C R} = - \frac {1}{H W} \sum_ {h = 1} ^ {H} \sum_ {w = 1} ^ {W} \sum_ {k = 1} ^ {K} p _ {h w k} ^ {s} \log \frac {p _ {h w k} ^ {s}}{p _ {h w k} ^ {s w}}. \tag {13} +$$ + +With the SCR loss, our model learns consistent semantic information even with perturbations of style and content by the proposed wild extension methods. + +# 4. Experiments + +# 4.1. Datasets + +Real semantic segmentation datasets. Cityscapes [10], BDD100K [61] and Mapillary [37] consist of 2975, 7000, and 18000 images for train set and 500, 1000, and 2000 for validation set. We consider 19 classes that are compatible with other datasets. In all of the tables, C, B, and M denote Cityscapes, BDD100K, and Mapillary, respectively. + +Synthetic semantic segmentation datasets. GTAV [46] contains 24966 images rendered from the Grand Theft Auto V game engine. It has 12403, 6382, and 6181 images for train, validation, and test sets, respectively. SYNTHIA [49] contains 9400 images and we split it into 6580 and 2820 images for train and validation sets, following [7]. In all tables, G and S denote GTAV and SYNTHIA, respectively. + +Wild dataset. ImageNet [11] is a large-scale image classification dataset used for network pre-training in most studies. In this paper, we use images without class labels as wild domain data. The generalization performance according to the number of images used for training our WildNet is presented in Table 6a. + +# 4.2. Experimental Setup + +We conduct extensive experiments over five different semantic segmentation datasets and report the mean intersection over union (mIoU) score on several domain generalization scenarios: GTAV $\rightarrow$ {Cityscapes, BDD100K, Mapillary, SYNTHIA, GTAV} and Cityscapes $\rightarrow$ {GTAV, BDD100K, Mapillary, SYNTHIA, Cityscapes}. For fair comparisons with other DG methods, we re-implement IBN-Net [41] and RobustNet [7] on our baseline models and $\dagger$ denotes our re-implemented models. Our model is trained on one source domain train set (GTAV or Cityscapes) and validated on five domain validation sets (four unseen domains and one seen domain). To show the overall domain generalization performance, we additionally report the average value of mIoU on five domain validation sets (Avg). In all of the tables, the best results for each domain are marked in bold. + +# 4.3. Implementation Details + +We adapt ResNet-50, ResNet-101 [19], and VGG-16 [52] with DeepLabV3+ [2] as segmentation networks, and all backbones are pre-trained on ImageNet [11]. In the ResNet-based models, we use the SGD optimizer [47] with a momentum of 0.9 and weight decay of 5e-4. The initial learning rate is set to 2.5e-3 and is decreased using the polynomial policy with a power of 0.9. We train the models for 60K iterations with a batch size of 8. In the VGG-based models, we use the Adam optimizer [28] with a momentum of (0.9, 0.99). The initial learning rate is set to 1e-5 and the batch size is set to 8. Following [7], we apply random scal + +
MethodsCBMSGAvg
Baseline [41]22.20---61.00-
IBN-Net [41]29.60---64.20-
Baseline [62]32.4526.7325.66---
DRPC [62]37.4232.1434.12---
Baseline [4]23.29-----
ASG [4]31.89-----
Baseline [7]28.9525.1428.1826.2373.4536.39
RobustNet [7]36.5835.2040.3328.3072.1042.50
Baseline [45]31.70-----
GLTR [45]38.60-----
Baseline35.1629.7131.2927.9771.1739.06
†IBN-Net [41]36.5234.1838.7430.4170.7842.12
†RobustNet [7]38.7835.6440.3828.9770.1642.78
WildNet (Ours)44.6238.4246.0931.3471.2046.33
+ +Table 1. Comparison of mIoU(%) using ResNet-50 as backbone under the domain generalization setting $\mathrm{G} \rightarrow \{ \mathrm{C},\mathrm{B},\mathrm{M},\mathrm{S},\mathrm{G}\}$ . + +
MethodsCBMSGAvg
Baseline [62]33.5627.7628.33---
DRPC [62]42.5338.7238.05---
Baseline [22]33.4027.3027.90---
FSDR [22]44.8041.2043.40---
Baseline [45]34.0028.1028.60---
GLTR [45]43.7039.6039.10---
Baseline35.7334.0633.4229.0671.7940.81
†IBN-Net [41]37.6836.6436.7530.8470.3942.46
†RobustNet [7]37.2638.6638.0930.1770.5342.94
WildNet (Ours)45.7941.7347.0832.5171.9147.81
+ +Table 2. Comparison of mIoU(%) using ResNet-101 as backbone under the domain generalization setting $\mathrm{G} \rightarrow \{ \mathrm{C},\mathrm{B},\mathrm{M},\mathrm{S},\mathrm{G}\}$ . + +ing within a range of [0.5, 2.0] and random cropping with a size of $768 \times 768$ . The output size of the projection head is $192 \times 192$ and we use uniformly sampled $64 \times 64$ size feature maps for CEL to prevent memory issues. For the diversity of the wild content dictionary, the wild feature maps are stored after uniform sampling with a size of $16 \times 16$ . The FS layer replaces first batch normalization and is added immediately after the addition operation of the first two residual blocks in ResNet, and it added right after the first ReLU after the first three maxpool layers in VGG. After training, all FS layers, projection head, and wild-content dictionary are removed, and our model can be applied to multiple unseen domains without further training on the target domains. + +# 4.4. Comparison with DG methods + +We compare our results with existing DG methods: IBNNet [41], DRPC [62], ASG [4], FSDR [22], RobustNet [7], and GLTR [45]. Table 1 shows the generalization performance of the ResNet-50 model trained on GTAV. We evaluate models on five validation sets consisting of four unseen domains, including the Cityscapes, BDD100K, Map + +
MethodsCBMSGAvg
Baseline [62]30.0424.5926.63---
DRPC [62]36.1131.5632.25---
Baseline [4]19.89-----
ASG [4]31.47-----
Baseline [22]------
FSDR [22]38.3034.4037.60---
Baseline [45]31.40-----
GLTR [45]37.20-----
Baseline24.6826.4123.6024.7366.3633.16
†IBN-Net [41]30.2530.0931.8726.2265.4736.78
†RobustNet [7]30.1329.2233.9626.1664.7336.84
WildNet (Ours)39.1834.4940.7527.2564.5741.25
+ +Table 3. Comparison of mIoU(%) using VGG-16 as backbone under the domain generalization setting $\mathrm{G} \rightarrow \{ \mathrm{C},\mathrm{B},\mathrm{M},\mathrm{S},\mathrm{G}\}$ . + +
MethodsGBMSCAvg
Baseline [41]29.40---64.50-
IBN-Net [41]37.90---67.00-
Baseline [7]42.5544.9651.6823.2977.5148.00
RobustNet [7]45.0050.7358.6426.2076.4151.40
Baseline40.5042.3520.678.0876.3037.58
†IBN-Net [41]45.2846.6156.7826.4175.4750.11
†RobustNet [7]45.2848.2156.9726.5974.9150.39
WildNet (Ours)47.0150.9458.7927.9575.5952.06
+ +Table 4. Comparison of mIoU(%) using ResNet-50 as backbone under the domain generalization setting $\mathrm{C} \rightarrow \{ \mathrm{G},\mathrm{B},\mathrm{M},\mathrm{S},\mathrm{C}\}$ . + +
LorigLCELLSELLSCRCBMSGAvg
✓35.1629.7131.2927.9771.1739.06
✓✓41.2535.9540.0631.2668.7543.46
✓✓✓43.6138.6943.1731.4070.5245.48
✓✓✓✓44.6238.4246.0931.3471.2046.33
+ +Table 5. Effect of the proposed losses on the domain generalization setting $\mathrm{G} \rightarrow \{ \mathrm{C},\mathrm{B},\mathrm{M},\mathrm{S},\mathrm{G}\}$ using ResNet-50 as backbone in mIoU(%) . Losses ${\mathcal{L}}_{orig},{\mathcal{L}}_{CEL},{\mathcal{L}}_{SEL}$ ,and ${\mathcal{L}}_{SCR}$ are defined in Eq. (1),Eq. (11),Eq. (12), and Eq. (13), respectively. + +illary, and SYNTHIA datasets, and one seen domain of GTAV. To demonstrate the high generalization ability over multiple domains, we also report the average value of the mIoU on the five domains. Our WildNet shows remarkably superior generalization capabilities, significantly outperforming other methods in all unseen target domains except the source domain. In particular, compared with the re-implemented results, we demonstrate that extending both the content and style is more effective in learning domain-generalized information than removing the domain-specific style. Given in Tables 2 and 3, we achieve superior generalization ability with ResNet-101 and VGG-16 models. Our model trained on Cityscapes also outperforms other DG methods as shown in Table 4. Extensive comparative experiments of different backbones on various domains demonstrate the superiority of our model. + +# 4.5. Ablation Studies + +In this subsection, extensive experiments with ResNet-50 model on the DG scenario from GTAV to Cityscapes, BDD100K, Mapillary, SYNTHIA, and GTAV are conducted to study the effectiveness of each component in the proposed method. Table 5 shows the effect of the proposed losses on domain generalization. The baseline model trained only with $\mathcal{L}_{orig}$ overfits the source domain and has poor performance on unseen domains. Even with only $\mathcal{L}_{CEL}$ applied, our model achieves an Avg of $43.46\%$ with $+4.40\%$ improvement. This shows the importance of content diversification that is overlooked in many studies. Further, we make the wild-stylized features learn task-specific information with $\mathcal{L}_{SEL}$ to achieve an Avg of $45.48\%$ , and regularize the model to learn consistent semantic information with $\mathcal{L}_{SCR}$ , finally achieving an Avg of $46.33\%$ . Next, we conduct more ablations for important components. + +Number of wild images. In Table 6a, the number of wild images used to train our model is considered. Even if only 10 wild images are used, the generalization performance is significantly enhanced by $+5.54\%$ compared with the baseline by preventing overfitting to the source domain. Moreover, the generalization performance of the model gradually improves as the number of wild images used increases. This shows that the extension of both content and style to the wild helps networks to learn domain-generalized semantic features. + +Amount of FS. Table 6b shows the influence of the amount of FS on generalization performance. By replacing only the first batch normalization with FS, we can extend contents and styles to the wild based on diversified stylized features and improve generalization performance compared to baseline by $+5.23\%$ . Adding FS to some shallow layers boosts performance further. However, applying FS to deeper layers degrades performance slightly, as semantic content should be captured more important than style as the layer deepens. A suitable amount of FS, which does not disturb the semantic information, helps to train the generalized model by augmenting the source features to have various wild styles. + +Size of wild content dictionary. Table 6c shows sensitivity to the size of the wild content dictionary. Extending the source content to the wild improves generalization performance, and even when extended to wild content within a mini-batch of size 2048 without a content dictionary, our model achieves higher generalization performance than without content extension. We take size of 393216. + +FS with wild style. In Table 6d, we show the effect of FS using statistics of wild features on the generalization performance of the model. To apply FS without the help of the wild, the mean and standard deviation of the source features were multiplied by random values in the range [0.5, 1.5] and then used instead of the statistics of the wild features. The + +
Num.CBMSGAvg
Baseline35.1629.7131.2927.9771.1739.06
1042.4336.8242.1530.6670.9244.60
10043.2937.7143.9330.6770.9345.31
100043.7038.2743.5630.8070.9445.45
1000043.8737.9844.1931.0470.8545.59
All44.6238.4246.0931.3471.2046.33
+ +(a) Number of wild images used in the training process. + +
Residual GroupsCBMSGAvg
Baseline35.1629.7131.2927.9771.1739.06
143.0935.2841.3630.5171.1944.29
1-243.4336.9041.3430.3671.3344.67
1-344.6238.4246.0931.3471.2046.33
1-444.0337.8343.3930.2470.4545.19
1-543.4934.9143.2630.0070.0544.34
+ +(b) FS applied to different amounts of residual groups. + +
SizeCBMSGAvg
None43.8538.6442.7028.6271.0744.98
204843.6438.5143.9429.1071.1445.27
4915243.8139.0144.9729.4171.4445.73
39321644.6238.4246.0931.3471.2046.33
+ +(c) Size of the wild content dictionary. + +
MethodsCBMSGAvg
Baseline35.1629.7131.2927.9771.1739.06
Random42.6734.8438.7130.3671.1443.54
Wild44.6238.4246.0931.3471.2046.33
+ +(d) Effect of FS with the statistics of the wild features. + +
MethodsCBMSGAvg
Random43.8338.7545.1030.6571.1045.89
Uniform44.6238.4246.0931.3471.2046.33
+ +(e) Comparison of sampling methods for CEL. + +Table 6. Ablation Study. For each setting, we report mIoU(%) using ResNet-50 as backbone in DG scenario: G→{C,B,M,S,G}. + +![](images/9e00f3b588f03031ffa1c6b898f554f39c5bd8a31b9336747e516b73148da85e.jpg) +Figure 5. Visualization of extended wild contents. More visualizations are available in the supplementary material. + +random FS improves performance compared to baseline by $+4.48\%$ , which shows the importance of diversifying styles. Furthermore, wild FS demonstrates that learning a natural style of the wild is much better with a gain of $+7.27\%$ . + +Sampling methods. By using sampled feature maps, CEL stores various wild contents in the fixed-size dictionary and reduces memory consumption due to pixel-level contrastive loss calculations. Since two adjacent pixels have almost similar semantic information, uniform sampling makes learning more diverse contents than random sampling, leading to high generalization performance as shown in Table 6e. + +# 5. Discussion + +# 5.1. Qualitative Analysis + +To analyze the wild content extension, we visualize the wild contents closest to the stylized source contents in Fig. 5. As can be seen in the figure, the source content is extended to wild content with semantic information similar to itself, e.g., the road under the car, the wheel of the bicycle, and the head of a man wearing a hat. Our model learns domain-generalized features by inducing source content closer to these wild content in the feature space. With + +learning various wild contents, WildNet makes reliable predictions on unseen contents. Figs. 1 and 4 show segmentation results and visualization of wild-stylized features, and further analysis is provided in the supplementary material. + +# 5.2. Limitations and Future Works + +We have shown that the source content extends to wild content with semantic information similar to itself. However, similar semantic information in the two contents does not guarantee that the classes of the two contents are always the same, as observed for the rider of Fig. 5. Extending the rider with the hat to the person with the hat may bridge between the rider-class and person-class. Our future works will involve positive content selection using predicted class probabilities on wild images and negative content extension to further boost the class discrimination ability. + +# 6. Conclusion + +We presented WildNet which exploits unlabeled wild images for domain-generalized semantic segmentation. Our approach effectively extends style and content from source to wild, resulting in drastic performance improvement even we leverage 10 wild images. In contrast to previous studies that exploit generalization cues only from style, we additionally exploit the potential to generalize domain from content. We thoroughly ablated to demonstrate the efficacy of our WildNet and achieved superior segmentation performance under several domain generalization scenarios. We believe that our approach provides an opportunity to utilize huge amounts of unlabeled data for domain generalization. + +Acknowledgement. This research was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (NRF-2019R1A2C1007153). + +# References + +[1] Inigo Alonso, Alberto Sabater, David Ferstl, Luis Montesano, and Ana C Murillo. Semi-supervised semantic segmentation with pixel-level contrastive learning from a class-wise memory bank. In ICCV, 2021. 2 +[2] 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 801-818, 2018. 6 +[3] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, pages 1597-1607. PMLR, 2020. 2 +[4] Wuyang Chen, Zhiding Yu, Zhangyang Wang, and Animashree Anandkumar. Automated synthetic-to-real generalization. In ICML, pages 1746-1756. PMLR, 2020. 6, 7 +[5] Yun-Chun Chen, Yen-Yu Lin, Ming-Hsuan Yang, and Jia-Bin Huang. Crdoco: Pixel-level domain transfer with cross-domain consistency. In CVPR, pages 1791-1800, 2019. 5 +[6] 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, pages 12475-12485, 2020. 2 +[7] Sungha Choi, Sanghun Jung, Huiwon Yun, Joanne T Kim, Seungryong Kim, and Jaegul Choo. Robustnet: Improving domain generalization in urban-scene segmentation via instance selective whitening. In CVPR, pages 11580-11590, 2021. 1, 2, 6, 7 +[8] Sungha Choi, Joanne T Kim, and Jaegul Choo. Cars can't fly up in the sky: Improving urban-scene segmentation via height-driven attention networks. In CVPR, pages 9373-9383, 2020. 2 +[9] Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, volume 1, pages 539-546. IEEE, 2005. 2 +[10] 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. 1, 6 +[11] 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. 2, 6 +[12] Debidatta Dwibedi, Yusuf Aytar, Jonathan Tompson, Pierre Sermanet, and Andrew Zisserman. With a little help from my friends: Nearest-neighbor contrastive learning of visual representations. In ICCV, 2021. 2, 5 +[13] Leon Gatys, Alexander S Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. NeurIPS, 28:262-270, 2015. 1 +[14] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In CVPR, pages 2414-2423, 2016. 1, 3 +[15] Leon A Gatys, Alexander S Ecker, Matthias Bethge, Aaron Hertzmann, and Eli Shechtman. Controlling perceptual fac + +tors in neural style transfer. In CVPR, pages 3985-3993, 2017. 3 +[16] Xiaoqing Guo, Chen Yang, Baopu Li, and Yixuan Yuan. Metacorrection: Domain-aware meta loss correction for unsupervised domain adaptation in semantic segmentation. In CVPR, pages 3927-3936, 2021. 2 +[17] Jianzhong He, Xu Jia, Shuaijun Chen, and Jianzhuang Liu. Multi-source domain adaptation with collaborative learning for semantic segmentation. In CVPR, pages 11008-11017, 2021. 2 +[18] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, pages 9729-9738, 2020. 2, 4 +[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 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. In ICML, 2018. 2 +[21] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcts in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. 2 +[22] Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. Fsdr: Frequency space domain randomization for domain generalization. In CVPR, pages 6891-6902, 2021. 2, 3, 6, 7 +[23] Lei Huang, Dawei Yang, Bo Lang, and Jia Deng. Decorated batch normalization. In CVPR, pages 791-800, 2018. 1 +[24] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, pages 1501-1510, 2017. 3, 4 +[25] Takashi Isobe, Xu Jia, Shuaijun Chen, Jianzhong He, Yongjie Shi, Jianzhuang Liu, Huchuan Lu, and Shengjin Wang. Multi-target domain adaptation with collaborative consistency learning. In CVPR, pages 8187-8196, 2021. 5 +[26] Yongcheng Jing, Yezhou Yang, Zunlei Feng, Jingwen Ye, Yizhou Yu, and Mingli Song. Neural style transfer: A review. IEEE Transactions on Visualization and Computer Graphics, 26(11):3365-3385, 2019. 3 +[27] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. In NeurIPS, volume 33, 2020. 2 +[28] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 6 +[29] Suhyeon Lee, Junhyuk Hyun, Hongje Seong, and Euntai Kim. Unsupervised domain adaptation for semantic segmentation by content transfer. In AAAI, pages 8306-8315, 2021. 1, 2 +[30] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. In NeurIPS, pages 385-395, 2017. 1 +[31] Yanghao Li, Naiyan Wang, Jiaying Liu, and Xiaodi Hou. Demystifying neural style transfer. In *IJCAI*, pages 2230–2236, 2017. 3 + +[32] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In CVPR, pages 6936–6945, 2019. 2 +[33] Haoyu Ma, Xiangru Lin, Zifeng Wu, and Yizhou Yu. Coarse-to-fine domain adaptive semantic segmentation with photometric alignment and category-center regularization. In CVPR, pages 4051-4060, 2021. 2 +[34] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In ECCV, pages 116-131, 2018. 2 +[35] Rohit Mohan and Abhinav Valada. Efficientps: Efficient panoptic segmentation. International Journal of Computer Vision, 129(5):1551-1579, 2021. 2 +[36] Hyeonseob Nam, HyunJae Lee, Jongchan Park, Wonjun Yoon, and Donggeun Yoo. Reducing domain gap by reducing style bias. In CVPR, pages 8690-8699, 2021. 5 +[37] Gerhard Neuhold, Tobias Ollmann, Samuel Rota Bulo, and Peter Kontschieder. The mapillary vistas dataset for semantic understanding of street scenes. In ICCV, pages 4990-4999, 2017. 6 +[38] Kiri Nichol. Painter by numbers, wikiart. https://www.kaggle.com/c/painter-by-numbers, 2016.2 +[39] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. 2, 4 +[40] Fei Pan, Inkyu Shin, Francois Rameau, Seokju Lee, and In So Kweon. Unsupervised intra-domain adaptation for semantic segmentation through self-supervision. In CVPR, pages 3764-3773, 2020. 2 +[41] Xingang Pan, Ping Luo, Jianping Shi, and Xiaou Tang. Two at once: Enhancing learning and generalization capacities via ibn-net. In ECCV, pages 464-479, 2018. 1, 2, 4, 6, 7 +[42] Xingang Pan, Xiaohang Zhan, Jianping Shi, Xiaou Tang, and Ping Luo. Switchable whitening for deep representation learning. In ICCV, pages 1863-1871, 2019. 1 +[43] Kwanyong Park, Sanghyun Woo, Inkyu Shin, and In So Kweon. Discover, hallucinate, and adapt: Open compound domain adaptation for semantic segmentation. In NeurIPS, volume 33, pages 10869-10880, 2020. 5 +[44] Sujoy Paul, Yi-Hsuan Tsai, Samuel Schulter, Amit K Roy-Chowdhury, and Manmohan Chandraker. Domain adaptive semantic segmentation using weak labels. In ECCV, pages 571-587. Springer, 2020. 2 +[45] Duo Peng, Yinjie Lei, Lingqiao Liu, Pingping Zhang, and Jun Liu. Global and local texture randomization for synthetic-to-real semantic segmentation. IEEE Transactions on Image Processing, 30:6594-6608, 2021. 2, 6, 7 +[46] Stephan R Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In ECCV, pages 102-118. Springer, 2016. 1, 6 +[47] Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400-407, 1951. 6 +[48] 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. 5 + +[49] German Ros, Laura Sellart, Joanna Materzynska, David Vazquez, and Antonio M Lopez. The synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes. In CVPR, pages 3234-3243, 2016. 6 +[50] Subhankar Roy, Aliaksandr Siarohin, Enver Sangineto, Samuel Rota Bulo, Nicu Sebe, and Elisa Ricci. Unsupervised domain adaptation using feature-whitening and consensus loss. In CVPR, pages 9471-9480, 2019. 1 +[51] Hongje Seong, Seoung Wug Oh, Joon-Young Lee, Seongwon Lee, Suhyeon Lee, and Euntai Kim. Hierarchical memory matching network for video object segmentation. In ICCV, pages 12889–12898, 2021. 2 +[52] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 6 +[53] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In ECCV, pages 443-450. Springer, 2016. 1 +[54] Andrew Tao, Karan Sapra, and Bryan Catanzaro. Hierarchical multi-scale attention for semantic segmentation. arXiv preprint arXiv:2005.10821, 2020. 2 +[55] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In CVPR, pages 7472-7481, 2018. 2 +[56] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In CVPR, pages 2517-2526, 2019. 2 +[57] Haoran Wang, Tong Shen, Wei Zhang, Ling-Yu Duan, and Tao Mei. Classes matter: A fine-grained adversarial approach to cross-domain semantic segmentation. In ECCV, pages 642-659. Springer, 2020. 2 +[58] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pages 3733-3742, 2018. 2 +[59] Yuwen Xiong, Renjie Liao, Hengshuang Zhao, Rui Hu, Min Bai, Ersin Yumer, and Raquel Urtasun. Upsnet: A unified panoptic segmentation network. In CVPR, pages 8818-8826, 2019. 2 +[60] Yanchao Yang and Stefano Soatto. Fda: Fourier domain adaptation for semantic segmentation. In CVPR, pages 4085-4095, 2020. 2 +[61] Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darryll. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In CVPR, pages 2636-2645, 2020. 6 +[62] Xiangyu Yue, Yang Zhang, Sicheng Zhao, Alberto Sangiovanni-Vincentelli, Kurt Keutzer, and Boqing Gong. Domain randomization and pyramid consistency: Simulation-to-real generalization without accessing target domain data. In ICCV, pages 2100-2110, 2019. 2, 3, 6, 7 +[63] Pan Zhang, Bo Zhang, Ting Zhang, Dong Chen, Yong Wang, and Fang Wen. Prototypical pseudo label denoising and target structure learning for domain adaptive semantic segmentation. In CVPR, pages 12414-12424, 2021. 2 + +[64] Yiheng Zhang, Zhaofan Qiu, Ting Yao, Dong Liu, and Tao Mei. Fully convolutional adaptation networks for semantic segmentation. In CVPR, pages 6810-6818, 2018. 2 +[65] Xiangyun Zhao, Raviteja Vemulapalli, Philip Andrew Mansfield, Boqing Gong, Bradley Green, Lior Shapira, and Ying Wu. Contrastive learning for label efficient semantic segmentation. In ICCV, pages 10623-10633, 2021. 2 +[66] Yuanyi Zhong, Bodi Yuan, Hong Wu, Zhiqiang Yuan, Jian Peng, and Yu-Xiong Wang. Pixel contrastive-consistent semi-supervised semantic segmentation. In ICCV, pages 7273-7282, 2021. 2 +[67] Kaiyang Zhou, Yongxin Yang, Yu Qiao, and Tao Xiang. Domain generalization with mixstyle. In ICLR, 2021. 5 +[68] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In ICLR, 2020. 2 \ No newline at end of file diff --git a/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/images.zip b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3ccda2657d1362b001d937a6ea89e5102be624d6 --- /dev/null +++ b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a365f209e8842cc2bdb528148bb567f7fdc8771bacfff7e96d2fa23f05e4df81 +size 630689 diff --git a/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/layout.json b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2380f2c06366d1ab8eca55333451d9760799f1db --- /dev/null +++ b/wildnetlearningdomaingeneralizedsemanticsegmentationfromthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89e1a13ddef35e1859bf597b4458607e5e383abe7f06ed09c55e5d179cb5ed85 +size 514121 diff --git a/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_content_list.json b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..003971f768b12a1ffb989353e819e705810e6c13 --- /dev/null +++ b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:063d0144b778032031d653a0c7a59b15bac69ee719b89f818be8c9a77746328c +size 97147 diff --git a/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_model.json b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f2c3657fa1ca0d9db3a0116b9bd8331fa1c799e5 --- /dev/null +++ b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79d429cf32033174a30c9069cd97e176210d490a349db395911885fb63d1fb0a +size 123076 diff --git a/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_origin.pdf b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..79b8fb29ec12397cf7ca3e0d42247803be232214 --- /dev/null +++ b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/8906b91b-5f4e-45dc-9b18-aa71956dc7ee_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc22f67bc1e217bea848684bad37d47e9bef90cddec45956498e5f235501c81b +size 6247684 diff --git a/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/full.md b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6d61be97a4d14eb570336ef2727581cab33e82cc --- /dev/null +++ b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/full.md @@ -0,0 +1,398 @@ +# Winoground: Probing Vision and Language Models for Visio-Linguistic Compositionality + +Tristan Thrush\*, Ryan Jiang†, Max Bartolo§, Amanpreet Singh¶, Adina Williams†, Douwe Kiela¶, Candace Ross†* + +Hugging Face; † Facebook AI Research; ‡ University of Waterloo; § University College London + +tristan@huggingface.co, ccross@fb.com + +# Abstract + +We present a novel task and dataset for evaluating the ability of vision and language models to conduct visio-linguistic compositional reasoning, which we call Winoground. Given two images and two captions, the goal is to match them correctly—but crucially, both captions contain a completely identical set of words, only in a different order. The dataset was carefully hand-curated by expert annotators and is labeled with a rich set of fine-grained tags to assist in analyzing model performance. We probe a diverse range of state-of-the-art vision and language models and find that, surprisingly, none of them do much better than chance. Evidently, these models are not as skilled at visio-linguistic compositional reasoning as we might have hoped. We perform an extensive analysis to obtain insights into how future work might try to mitigate these models' shortcomings. We aim for Winoground to serve as a useful evaluation set for advancing the state of the art and driving further progress in the field. The dataset is available at + +https://huggingface.co/datasets/facebook/winoground. + +# 1. Introduction + +Despite the impressive performance of pretrained vision and language transformers on a wide variety of multimodal tasks [43, 47, 50], they remain poorly understood [6, 15, 42, 61]. One important question is to what extent such models are able to conduct unimodal and multimodal compositional reasoning. For humans, the visual differences between images depicting "the tree is in the shopping cart" and "the shopping cart is in the tree" will be blatantly obvious, even when the words in the captions are identical—but is the same true for machines? + +While matching simple images and captions may seem almost too trivial a task, recent work in NLP has shown + +![](images/40bf18fe087cbd0655f4be461d6c0b8ba903b4ffb9288b3b690f0708a4a8e62e.jpg) +(a) some plants surrounding a lightbulb +Figure 1. An example from Winoground. The two sentences contain the same words but in a different order. The task of understanding which image and caption match is trivial for humans but proves much more difficult for vision and language models. Every model that we tested (UNITER, ViLLA, VinVL, VisualBERT, ViLT, LXMERT, ViLBERT, UniT, CLIP, VSE++, and VSRN) fails to correctly pair the images and captions, except the large checkpoint of ViLLA by a very thin margin (0.00013 confidence). + +![](images/28e4c4427d981bc98358128b8c1bea8cf09171b4617f083421a36c33d0f2f385.jpg) +(b) a lightbulb surrounding some plants + +that transformers are often remarkably insensitive to word order [63]. Understanding the relationship between text in captions and corresponding visual content is a fundamental goal of computer vision, and the fact that different word orders correspond to wildly different visual depictions should be reflected in the capabilities of our models. + +Motivated by this, we propose a novel task, called Winoground, for measuring visio-linguistic compositional reasoning, whereby two images and two captions have to be matched correctly; both captions contain exactly the same set of words, ordered in such a way that each describes primarily one of the images. To perform well on Winoground, models must not only encode text and images well (i.e., be sensitive to the compositional structure present in each modality), but they also must be able to synthesize information across the two modalities. + +We draw inspiration from the Winograd Schema Challenge [40], which tests the commonsense capabilities of models. In the challenge, a model is given two sentences + +that minimally differ and is tasked with performing coreference resolution. The Winograd twin sentence format has been used for a variety of language-related tasks [53,54,82]. In this work, we study the image-grounding of twin sentences with identical but differently ordered words. + +Winoground was hand-crafted by expert annotators and is labeled with a rich set of fine-grained tags to assist in analyzing model performance. In efforts to shed better light on what exactly models learn, the NLP community has designed a wide variety of "probing tasks": specialized, targeted tasks meant specifically for evaluation. The primary purpose of Winoground is to serve as a probing task for vision and language models. See Fig. 1 for an example. + +We evaluate a variety of state-of-the-art vision and language (V&L) transformers [9, 19, 31, 36, 43, 47, 50, 68, 81] and RNN-based models [17, 41]. Surprisingly, all of the models rarely—and if so only barely—outperform chance. Our findings indicate that the visio-linguistic compositional reasoning capabilities of these models fall dramatically short of what we might have hoped. + +In what follows, we introduce the Winoground task and dataset. We then describe the models we tested and discuss our findings. Next, we conduct an analysis of the performance of different models. We hope that insights from this work will lead to more robust vision and language models. + +# 2. Related Work + +Visio-linguistic stress testing. There are a number of existing multimodal stress tests about correctly understanding implausible scenes [10], exploitation of language and vision priors [8, 23], single word mismatches [58], hate speech detection [22, 28, 37, 83], memes [35, 67], ablation of one modality to probe the other [18], distracting models with visual similarity between images [29], distracting models with textual similarity between many suitable captions [13], collecting more diverse image-caption pairs beyond the predominately English and North American/Western European datasets [46], and probing for an understanding of verb-argument relationships [26] or specific model failure modes [59, 62]. Many of these stress tests rely only on synthetically generated images, often with minimal visual differences, but no correspondingly minimal textual changes [71]. Other datasets test models with a single caption [66] or a single image [5, 33]. There are also purely visual stress tests with naturalistic images: ImageNet-C/ImageNet-P [27] tests models on perturbations for a variety of image features. Unlike Winoground, these stress tests tend to come from existing datasets that have images and text from typical training domains, such as Conceptual Captions [57], COCO [44], Visual7W [84] and VQA [2, 23]. None of them hold the set of words constant in the captions, which is what allows us to carefully test for compositional reasoning without any biases stemming from + +the presence of altogether different words. While it is theoretically possible for unstructured bag of words models to do well on these previous datasets, that is not possible on Winoground. + +Probing. Measuring what exactly a model knows about word order and linguistic structure has been explored in natural language processing. Sinha et al. [63] found that word order information does not have a large impact on performance when pretraining large transformer language models, across a variety of metrics. This suggests that transformers use high-level word co-occurrence statistics, which gives the illusion of an understanding of word order. Other work in this space has tried to understand what models know about syntax [20, 24, 30, 45, 49, 64, 74] or the complex interaction between syntactic and semantic categories [34, 69, 72, 73]. + +Winograd schemas. The Winograd Schema Challenge [40] was named after a coreference resolution problem presented by Terry Winograd [76]. The goal is to correctly resolve (an) ambiguous referent(s) in two English sentences. The sentences have a minor difference that changes how a human resolves the referent. Winograd schema examples are easily handled by humans, and commonsense reasoning is said to be required [3]. For example, in the sentence "The city councilmen refused the demonstrators a permit because they [feared/advocated] violence", the pronoun they can either refer to the councilmen or to the demonstrators depending on which word is chosen. The format has been used in a variety of other tasks and datasets. For instance, Sakaguchi et al. [54] introduce WinoGrande: a large-scale approach to building a Winograd Schema dataset that uses Amazon Mechanical Turk to generate sentences instead of expert annotators like the original work of Levesque et al. [40]. Other approaches use ambiguous pronouns in sentences to probe for gender biases in models [53, 82]. See Kotcijan et al. [38] for an in-depth review. Winoground is the first work to apply these ideas to the vision and language domain, by using twin captions with identical word content and two images that are each associated with one caption over the other. + +# 3. Winoground + +In this section, we describe how the dataset was constructed and how performance on the task is to be measured. + +# 3.1. Dataset + +The Winoground dataset was hand-curated by four expert annotators with extensive experience in vision and language research as well as computational linguistics. Let $(C_0, I_0)$ and $(C_1, I_1)$ be two image-caption pairs. An example satisfies the Winoground schema if and only if: + +![](images/7f11ff72503aeb9351489836e2a9a7e70d32beee7bc796dde25ca07d1cb43b2e.jpg) +(a) there is [a mug] in [some grass] + +![](images/35d5ca2532a56f2a98615e1a8f65fe5ba84a96f75368f1e0dcfbc96cebf1b748.jpg) +(b) there is [some grass] in [a mug] + +![](images/d00154221e913e93d2aa329864e79a1890c49917ace5d37b0e72db6d83e8524d.jpg) +(c) a person [sits] and a dog [stands] + +![](images/e152ff5d7639e76a7e517377db121dc8e3dc1f9196ad63b51e9a4a49c205cb70.jpg) +(d) a person [stands] and a dog [sits] + +![](images/5509ce81e726e26c6094c305f3d13bb6af22a779e11ff7ffe4108370de1bce6b.jpg) +(e) it's a [truck] [fire] + +![](images/f4e30d467d617ffd2c18917c0e54d174854ce03afe5e4d9b9e2da36e49ec6979.jpg) +(f) it's a [fire] [truck] + +Object + +Relation + +Both + +![](images/7991a50ebc05a7366f2320cd8d0f41f9b204f8a374e5c58a77d12523e8ea6fb8.jpg) +(a) the kid [with the magnifying glass] looks at them [] + +![](images/db7c14e7b4d2ef09b065b4c9f88996e4ad22bca920accb8ad28260c6e987f14d.jpg) +(c) the person with the ponytail [packs] stuff and other [buys] it + +![](images/d7902e0bb5160cf50eea09537796f53a81a7d8fbd7dbd30b45caca2f57c75d83.jpg) + +![](images/25d870300962f5e1c246ccc1d0bdb701e1e90592f2788b425a0944245c489f72.jpg) +(b) the kid [] looks at them [with the magnifying glass] +Figure 3. Examples from our dataset for the swap-dependent linguistic tags (top) and visual tags (bottom). The visual examples are additionally tagged with the Relation tag, and 1, 2, and 1 main predicates from left to right. The linguistic examples are additionally tagged with 2, 1, and 1 main predicates from left to right. + +![](images/89c11d5b6e2ddacfad4b836e8505eede1ca70ba534916895b7ddd8bbef89602a.jpg) +(e) there are [three] people and [two] windows +(d) the person with the ponytail [buys] stuff and other [packs] it +(f) there are [two] people and [three] windows + +![](images/b4f9c90a1166c471ce0ac9190e8d23be5b7d2a6f1c67006916d9c01d9006ea7a.jpg) + +Pragmatics + +Series + +Symbolic + +- $(C_0, I_0)$ and $(C_1, I_1)$ are preferred by the annotator over $(C_1, I_0)$ and $(C_0, I_1)$ ; and +- $C_0$ and $C_1$ have the same words and/or morphemes but the order differs. + +We have secured a license from Getty Images to distribute images for research purposes. Thus, the expert annotators were given access to the Getty Images API [21], and tasked with jointly creating captions and finding images to compose examples. We encouraged them to be as creative as possible, and to mark each of their examples with fine-grained linguistic tags. If applicable, annotators also marked examples with one or more visual reasoning tags. + +The annotators created a total of 70 linguistic tags for the swaps that make caption pairs different. This set of tags + +
CategoryTagCount
Linguisticswap-dep.Object141
Relation233
Both26
Linguisticswap-indep.1 Main Pred293
2 Main Preds108
VisualSymbolic41
Series31
Pragmatics24
+ +Table 1. Linguistic and visual tag counts in the Winoground dataset. Every example has a linguistic tag; only examples that contain the visual phenomena have visual tags. + +can be split into three broad groups: objects, relations, and swaps involving both relations and objects. Object swaps reorder elements such as noun phrases that tend to refer to objects in the real world. Relation swaps reorder elements such as verbs, adjectives, prepositions, and/or adverbs, which tend to take nouns referring to objects as semantic arguments [1]. Swaps of both relations and objects can involve two separate swaps, or can involve a single swap that changes parts of speech (e.g., "it's a [fire] [truck]" vs. "it's a [truck] [fire]"). Examples of each broad tag group can be seen in Fig. 3. For examples for each fine-grained linguistic tag, see Appendix C. + +Separately, the annotators tagged examples for how many main predicates were in the captions, which is not dependent on the specific swap happening between the two captions. For example, "left is blue and right is red" has two main predicates and "water is in a bottle" has one main predicate. It turned out that all examples in Winoground have either one main predicate or two. + +Finally, examples were tagged from a set of three nonmutually exclusive visual reasoning tags, which are tied in some way to the images in an example, and not necessarily the captions. The "Pragmatics" tag comprises examples where the images need to be interpreted non-literally due to idiomatic uses of language in a caption (e.g. "it starts with Z and ends with A" describing an image of a Zebra) or due to attachment preferences of prepositional phrases in the captions (e.g. "the kid looks at them with the magnifying glass" describing an image of a child looking at someone through a magnifying glass with greater confidence than an image of a child looking at someone while holding a magnifying glass at their side). The "Symbolic" tag represents whether a symbolic depiction of something must be understood to make a correct prediction (e.g., objects in a child's drawing). Lastly, the "Series" tag is given to examples where both images come from the same photo series on Getty, which typically means that the same people occur in both + +images, with a similar background and in similar lighting. + +See Fig. 3 for representative examples of the tags, and Tab. 1 for tag counts. As noted, Winoground is a probing dataset and so we prioritize clean, expert annotations over mere size. Our dataset has 1600 image-text pairs in total, with 800 correct and 800 incorrect pairings. These comprise 400 examples, with 800 unique captions and images. + +# 3.2. Metrics + +Performance on Winoground is computed according to three different metrics that evaluate different aspects of the models' visio-linguistic reasoning abilities. The first metric is the text score, which measures whether a model can select the correct caption, given an image. Given images $I_0$ and $I_1$ and captions $C_0$ and $C_1$ , the text score for an example $(C_0, I_0, C_1, I_1)$ is computed according to: + +$$ +f \left(C _ {0}, I _ {0}, C _ {1}, I _ {1}\right) = \left\{ \begin{array}{l l} 1 & \text {i f} s \left(C _ {0}, I _ {0}\right) > s \left(C _ {1}, I _ {0}\right) \\ & \text {a n d} s \left(C _ {1}, I _ {1}\right) > s \left(C _ {0}, I _ {1}\right) \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {1} +$$ + +where $s(\cdot)$ is the model's score for the image/caption pair. This metric tests whether the ground truth caption for a given image in our dataset is scored higher than the alternative caption and whether this holds for the other image/caption pair in the example too. + +The second metric is the image score, which measures whether a model can select the correct image, given a caption. Given images $I_0$ and $I_1$ and captions $C_0$ and $C_1$ , the image score for an example is computed according to: + +$$ +g \left(C _ {0}, I _ {0}, C _ {1}, I _ {1}\right) = \left\{ \begin{array}{l l} 1 & \text {i f} s \left(C _ {0}, I _ {0}\right) > s \left(C _ {0}, I _ {1}\right) \\ & \text {a n d} s \left(C _ {1}, I _ {1}\right) > s \left(C _ {1}, I _ {0}\right) \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {2} +$$ + +This metric tests whether the ground truth image for a given caption is scored higher than the image corresponding to the alternative caption and whether this holds vice versa. + +Our final metric combines the previous two. In their analysis of the Winograd Schema Challenge, Elazar et al. [16] find that evaluation metrics tend to overestimate model performance by computing scores for the twin sentences individually instead of as a set. So, we also evaluate using the group score, where every combination for a given example $\{(C_0,I_0),(C_0,I_1),(C_1,I_0),(C_1,I_1)\}$ must be correctly scored by the model in order for the example to be considered correct. The group score in our framework is computed according to: + +$$ +h \left(C _ {0}, I _ {0}, C _ {1}, I _ {1}\right) = \left\{ \begin{array}{l l} 1 & \text {i f} f \left(C _ {0}, I _ {0}, C _ {1}, I _ {1}\right) \\ & \text {a n d} g \left(C _ {0}, I _ {0}, C _ {1}, I _ {1}\right) \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {3} +$$ + +# 4. Experimental Setup + +We evaluate various configurations of the following multimodal transformers: CLIP [50], LXMERT [68], UniT [31], UNITER [9], VILLA [19], VinVL [81], ViLT [36], VisualBERT [43] and ViLBERT [47]. We also evaluate several configurations of two types of RNN-based models: VSE++ [17] and VSRN [41]. We detail differences between these models and provide a high-level overview in Tab. 2. We also establish a human baseline using crowdworkers, as described in Sec. 4.3. + +# 4.1. Vision & Language Transformers + +Image and language embedding. All transformer models we evaluate use a pretrained BERT tokenizer [12], except CLIP, which uses a Byte-Pair Encoding tokenizer [56] trained from scratch. For the image embedding, five transformers (VisualBERT, ViLBERT, LXMERT, UNITER, ViLLA) [9, 19, 43, 47, 68] use region features extracted from the fc6 layer of a Faster R-CNN [52] trained on Visual Genome [39]. VinVL trains its own feature extractor on a large combined dataset from public sources with a unified object vocabulary [81]. The CLIP and ViLT that we test both use Vision Transformer (ViT) [14]. In ViT, images are flattened into patches that are linearly projected and combined with a position encoding. UniT [31] alternatively uses a transformer network [70] on top of a convolutional network following Carion et al. [7]. + +Single-stream vs. dual-stream encoders. Vision and language transformers are mainly single- or dual-stream models: the embeddings for the image and text modalities are either concatenated and then jointly encoded (single-stream), or encoded by two separate modality-specific encoders with optional cross-modality fusion (dual-stream). Five of our transformers are single-stream [9, 19, 36, 43, 81]. VinVL additionally concatenates object tags, which are the set of objects detected by the X152-C4 model during feature extraction, to the language tokens before encoding. All single-stream models use merged attention, where the language and visual input attend to both themselves and the other modality. The dual-stream transformers we evaluate are CLIP, UniT, LXMERT and ViLBERT [31, 47, 50, 68]. CLIP lacks cross-modal attention. ViLBERT has language-only transformer layers that are then fused by cross-modal transformer layers. LXMERT and UniT each use language-only and vision-only layers that are also fused by cross-modal transformer layers, which perform a combo of modality-specific attention and coattention across modalities. + +Pretraining objectives. V&L transformers use a number of pretraining objectives including but not limited to + +
ModelDatasets# Images, Captions (Millions)ArchitectureAttention
VinVL [81]VQA, GQA, VG-QA, COCO, Flickr30k, CC, SBU1.89, 4.87single-streammerged
UNITER [9]COCO, VG, CC, SBU4.20, 9.58single-streammerged
ViLLA [19]COCO, VG, CC, SBU4.20, 9.58single-streammerged
VisualBERT [43]COCO, NVLR20.30, 0.52single-streammerged
ViLT [36]COCO, VG, SBU, CC4.10, 9.85single-streammerged
LXMERT [68]COCO, VG0.18, 9.18dual-streammodality-specific, co-attn, merged
ViLBERT [47]CC3.30, 3.30dual-streammodality-specific, co-attn, merged
UniT [31]COCO detect., VG detect., VQAv2, SNLI-VE QNLI, MNLI-mm, QQP, SST-20.69, 1.91dual-streammodality-specific, merged
CLIP [50]-400.00, 400.00dual-streammodality-specific
VSE++ and VSRN_COCOCOCO0.11, 0.57dual-stream-
VSE++ and VSRN_Flickr30kFlickr30k0.03, 0.16dual-stream-
+ +Table 2. A high-level overview of the differences between the models we evaluate by the pretraining datasets, architecture, and attention mechanisms between the modalities. We omit datasets that were only used to train backbones. We exclude the language embedding from this table as every model uses a pretrained BERT tokenizer, except CLIP, VSE++, and VSRN. The pretraining datasets include COCO [44], Visual Genome (VG) [39], Conceptual Captions (CC) [57], SBU Captions [48], Flickr30k [79], VQA 2.0 [23], VCR [80], NLVR2 [66], SNLI-VE [78], QNLI [51], MLNI-mm [75], QQP [32], and SST-2 [65]. CLIP uses their own dataset for pretraining. + +masked language modeling, masked region modeling (classification of object classes and regression over image features) and image-text matching. As we are evaluating a model's ability to determine if an image and a corresponding caption match, we specifically select V&L transformers that are pretrained with an image-text matching classification head or that produce a similarity score between the two modalities1. + +# 4.2. Multimodal RNNs + +To determine whether low performance on Winoground is unique to transformer-based models, we include results for two sequence-based models, which are VSRN [41] and $\mathrm{VSE}++$ [17]. Both $\mathrm{VSE}++$ and VSRN have a loss function that prioritizes minimizing the hardest negative's score. The hardest negative is the highest-scoring image-caption pair that is not correct. Intuitively, this type of loss function could enable models to get higher scores on Winoground in particular and may be useful in future work. Although we show later in the paper that VSRN and $\mathrm{VSE}++$ do not do well, perhaps due to issues besides the loss function. Both models use a GRU [11] to get language embeddings and a separate pipeline to get image embeddings. Scores for image-caption pairs are found by taking an inner-product of the embeddings. VSE's image encoder is a linear projection of the embedding from a backbone (either ResNet152 [25] or VGG19 [60]). In VSRN, a ResNet101-based Faster R-CNN with graph convolutions on top is used to get a sequence of features which are fed into a GRU. The GRU's last hidden state is then used as the image embedding. + +# 4.3. Human Performance + +We employed crowd workers on the Amazon Mechanical Turk platform to establish a more conservative human baseline than the expert annotator upper bound of a perfect + +score. Like the models, annotators are shown one image and one caption at a time. Annotators are asked the binary choice question "Does the caption match the image?" All 1600 combinations of images and captions are labeled by at least ten annotators. We compute the human image-caption score as the ratio of annotators who said the image/caption pair match over the total number of annotators for the pair. More details about the human labelling interface, onboarding criteria, and quality control are provided in Appendix E. + +# 5. Results + +# 5.1. Compared to humans + +As observed in Tab. 3, the models struggle across the board on Winoground, often performing close to or below random chance. Comparatively, as expected, the human performance is high across the full range of linguistic and visual phenomena. For the text score, we observe $\sim 50\%$ absolute difference between humans and the best performing models—UNITER, VILLA VinVL, ViLT and CLIP—with the remaining models at or below chance performance. + +The human performance is only slightly lower for the image score, whereas all models perform much worse. Even the highest performing model, VinVL, has a $\sim 70\%$ performance gap compared to humans. This gap is not unique to our dataset: in prior work [17] [50], models also tend to perform significantly better on caption retrieval compared to image retrieval. More investigation is required to pinpoint the reasons: perhaps textual encoders are stronger, or the text modality has different biases. + +Lastly, we consider the group score. For humans, it is not appreciably lower than their text and image scores. All of the models are below random chance here as well. We report confidence intervals for these results in Appendix A. + +# 5.2. Results by Tags + +For the swap-dependent linguistic tags, human performance is highest on object, followed by the relation and + +
ModelTextImageGroup
MTurk Human89.5088.5085.50
Random Chance25.0025.0016.67
VinVL37.7517.7514.50
UNITERlarge38.0014.0010.50
UNITERbase32.2513.2510.00
ViLLALarge37.0013.2511.00
ViLLABase30.0012.008.00
VisualBERTbase15.502.501.50
ViLT (ViT-B/32)34.7514.009.25
LXMERT19.257.004.00
ViLBERTbase23.757.254.75
UniITfMfinetuned19.506.254.00
CLIP (ViT-B/32)30.7510.508.00
VSE++COCO (ResNet)22.758.004.00
VSE++COCO (VGG)18.755.503.50
VSE++Flickr30k (ResNet)20.005.002.75
VSE++Flickr30k (VGG)19.756.254.50
VSRNCOCO17.507.003.75
VSRNFlickr30k20.005.003.50
+ +Table 3. Results on the Winoground dataset across the text, image and group score metrics. Results above random chance in **bold**. + +then both. For the swap-independent linguistic tags, humans do better on examples with two main predicates, which tend to contain longer and more complicated sentences. The models perform poorly on every category, but they largely show the opposite pattern. They perform better on examples with simpler and shorter sentences which more often have swaps at the morpheme level (see Tab. 4). One exception to the low model performance is that CLIP performs comparably to the humans on the both tag text score—the 26 examples with the both tag have some of the shortest and least compositional captions in our dataset (e.g. "presenting the watch" vs "watching the present"). + +We also evaluate performance for the visual reasoning tags as shown in Tab. 5. Models and humans are particularly good at the symbolic examples, but the models are poor comparatively. On the pragmatics tag, humans have the lowest performance. Ten crowdworkers probably didn't capture slight pragmatics preferences that our expert linguist annotators agreed on. One example that the crowd-workers failed is Fig. 3(a): "the kid [with the magnifying glass] looks at them []". All ten annotators said that "the kid with the magnifying glass looks at them" was acceptable for both images, but captured the correct preference for the second caption. This reveals a limitation in how the task was presented to humans: our hypothesis is that if we gave humans both images and both captions at the same time, or if significantly more human annotators gave their + +judgements, then the human scores would be substantially higher. Finally, models do worst on the series tag where most get a $0\%$ group score, which indicates that they are always choosing one image over the other regardless of the caption (or vice versa). + +# 6. Discussion + +Despite the fact that every model struggled on Winoground compared to humans, we hope to gain further insights by analyzing which aspects of these models could contribute to their performance differences. + +# 6.1. Capabilities of Encoders + +Richer features. UNITER, VILLA, VinVL, ViLT and CLIP are the only models that get above random chance performance in Tab. 3, and only for the text score. We hypothesize that these models perform better than others due to their richer features (unimodal features for CLIP, multimodal features for the others). A potential explanation could be the large-scale pretraining used by CLIP, the large training dataset used to train the object detector for VinVL, or the ViT approach for image features used by ViLT and CLIP that encodes every portion of the image. + +Common failure modes. We highlight again that nearly all of the models fail (with $0\%$ group score) on the same image series tag. One explanation is that the models' visual encoders might be too weak to correctly discriminate between substantially similar images. This could cause the models to fall back on their unimodal priors, picking one caption or image over the other in the majority of the four potential caption-image pairings. + +Heat maps. We show a heatmap in Fig. 4 of the word-region alignment between ViLT's vision and language features as a visualization for a model with some of the best performance on our dataset. ViLLA and UNITER are also trained with word-region alignment and we provide their heatmaps in Appendix D. + +Complicated captions. The above-chance models do worse on examples with longer captions, possibly due to weak language encoding abilities. As shown in Tab. 6, caption length and lower model performance significantly correlate for the best models, even though the correlation is reversed for humans. The examples with the shortest captions are also the least compositional; they are primarily the examples where the parts of speech change between swapped words, or where there is a morpheme-level swap. Finally, we show in Tab. 6 correlations between caption perplexity2 and model scores. We found that there is typically a weak correlation between models assigning an image-caption pair a higher score and a caption having low perplexity. + +
ModelTextObject ImageGroupTextRelationGroupTextBothGroupTextImageGroupTextImageGroup
MTurk Human92.2090.7888.6589.2790.5686.7076.9257.6957.6987.3385.6282.5395.3796.3093.52
VinVL36.8817.7314.1837.7717.6014.1642.3119.2319.2339.3821.2317.4733.338.336.48
UNITERlarge39.0112.779.9336.0514.169.8750.0019.2319.2340.0716.4413.3632.417.412.78
UNITERbase34.0411.359.2230.0414.1610.3042.3115.3811.5435.2714.7311.9924.079.264.63
ViLLAlarge36.8814.8911.3537.3412.8811.1634.627.697.6939.7317.1214.3829.632.781.85
ViLLAbase33.3315.609.9327.049.016.0138.4619.2315.3833.2214.0410.2721.306.481.85
VisualBERTbase19.152.130.7112.882.151.7219.237.693.8516.442.741.7112.961.850.93
ViLT (ViT-B/32)31.9115.609.2236.9111.598.1530.7726.9219.2335.2717.1211.6433.335.562.78
LXMERT22.709.226.3817.605.582.5815.387.693.8519.188.565.1419.442.780.93
ViLBERTbase29.0810.647.0919.313.001.7234.6226.9219.2323.978.905.8223.152.781.85
UniITfMfinetuned17.735.672.1318.034.723.4342.3123.0819.2321.586.854.1113.894.633.70
CLIP (ViT-B/32)34.757.806.3822.758.585.5880.7742.3138.4635.2713.0110.2718.523.701.85
VSE++COCO (ResNet)21.996.381.4223.619.015.5819.237.693.8525.009.594.7916.673.701.85
VSE++COCO (VGG)17.732.132.1318.457.303.8626.927.697.6918.494.792.7419.447.415.56
VSE++Flickr30k (ResNet)20.576.383.5518.884.292.1526.923.853.8521.586.513.4215.740.930.93
VSE++Flickr30k (VGG)17.734.962.8419.746.875.1530.777.697.6920.556.164.7917.596.483.70
VSRNCOCO15.604.962.1318.887.734.7215.3811.543.8517.127.193.7718.526.483.70
VSRN Flickr30k16.314.962.1321.034.293.8630.7711.547.6920.895.823.7717.592.782.78
+ +Table 4. The results by linguistic tag. Results above chance are in bold. + +
ModelSymbolicPragmaticsSame Image Series
TextImageGroupTextImageGroupTextImageGroup
MTurk Human96.4392.8692.8658.8241.1841.1895.6591.3091.30
VinVL25.0017.8614.2929.415.885.8834.7817.3913.04
UNITERlarge39.2928.5717.8635.290.000.004.358.700.00
UNITERbase46.4314.2914.2929.4117.6511.768.708.700.00
ViLLALarge39.2914.2910.7117.650.000.0017.394.350.00
ViLLABase42.8617.8614.2929.415.885.8813.048.704.35
VisualBERTbase28.570.000.005.880.000.0013.040.000.00
ViLT (ViT-B/32)28.5717.8610.7135.290.000.0026.090.000.00
LXMERT28.573.573.5717.655.880.008.704.350.00
ViLBERTbase28.5710.717.1429.415.885.8813.040.000.00
UniITfinituned14.2910.717.1417.655.885.8821.744.354.35
CLIP (ViT-B/32)39.293.573.5735.295.885.888.700.000.00
VSE++COCO (ResNet)32.1410.7110.7123.5311.760.0013.044.354.35
VSE++COCO (VGG)17.8614.297.1417.650.000.0013.044.354.35
VSE++Flickr30k (ResNet)21.433.570.0023.530.000.0017.394.350.00
VSE++Flickr30k (VGG)28.5710.7110.7111.760.000.0013.044.350.00
VSRNCOO7.143.570.0011.760.000.0013.040.000.00
VSRN Flickr30k21.433.573.5735.2911.765.888.704.354.35
+ +Table 5. The results by visual tag. Results above chance are in bold. + +# 6.2. By Architecture & Type of Attention + +As shown in Tabs. 3 to 5, both single-stream and dual-stream models perform significantly worse than humans on the text, image and group scores. We find at least one single-stream model and at least one dual-stream model are above chance for most of our experiments, suggesting there is not a distinct performance difference by architecture. Although, six single-stream models do above chance overall, compared to only one dual-stream model (CLIP). CLIP was trained on an order of magnitude more data than the other models. Across all types of attention, models struggled compared to humans. But, compared to the random baseline, models that use merged attention (VinVL, VILLA, UNITER and ViLT) and modality-specific attention (CLIP) performed above chance on the full Winoground dataset; + +none of the remaining models, which all use co-attention in conjunction with single-modality and/or merged attention, performed above chance. + +# 6.3. By Multimodal Pretraining Dataset Size + +We find highly significant correlations between the size of the multimodal pretraining dataset and the scores, if we remove CLIP as an outlier. Tab. 7 shows these correlations, and Appendix B has graphs showing each model's score versus the pretraining data size. The training data for unimodal components (e.g. an image backbone or preinitialized unimodal language model embeddings) is not included in these calculations. + +![](images/6e1883be32be4c2b53ed7150170a89ef61d70753c604f9cbc801008ccd4b95ff.jpg) +a brown dog is on a white couch + +![](images/3a553b06e1af2f8a14a4ff800f0018c390f5511a62b2d87236f6d82d74b03a5b.jpg) + +![](images/00ff602e638ef2f248474b2a2f4b18d851a8f0893ea8bb6aa920302a3fe8d5e5.jpg) + +![](images/0cb60d76ee814d24f52dfe2154094e18e0b3425e3a462e8e8d05aae445af3b31.jpg) + +![](images/5eb56c54d22081af6a7c8b2bb6f783e2aee9cd4aa7abbc0eddef0ef0d9de1208.jpg) + +![](images/dcb89b347f6df20421179ee7165b52997d09783dd0f1718b23f471704f2cf193.jpg) + +![](images/e98d1af1352cdba66184f02f588b82cd1212ea9486b90763610b73d275850628.jpg) +a white dog + +![](images/d31e4790d3eb76b01d57f870ac78ead167bfdda1356d51dabd32212df8458424.jpg) +Figure 4. Word-region alignment scores between the image and text features for ViLT [36] on examples from Winoground. In this case study, ViLT appears to disregard the information from adjectives. E.g., the heatmaps highlight the brown dog just as strongly regardless of whether the text was "brown dog" or "white dog". + +![](images/d40db0e328008ca2831944e774b41fad479cef8bcaddc3e9a828d0f1db10ba2c.jpg) +is on a +brown couch + +![](images/2d1b02e506a6733e667ba34b6633c1e66eced657a985888835d46ea2e1205668.jpg) + +![](images/f051a191d6806951c2e82563b4ed41c3805526c486db95aae300cc3217ea5d64.jpg) + +![](images/285cdbdde024790177688bcfac4acd7a667db7f27699ace2f51546a14e2280f2.jpg) + +![](images/8e87ca07250e4ee6bb7193ffebd41cb6c406b255c0e3cf499a365a9cc3640081.jpg) +circular food on heart-shaped wood + +![](images/2a3b71bbf51013645105d0c00a806771b52e481340a93d1c64ee4a4969632eee.jpg) + +![](images/84b21bc1cc2a1116170ffc8d1d45004ef48633b8d96b7b0460cf836b41fa52d8.jpg) + +![](images/9622677c617eee319ab87b221a573e504a341a1310e50723809c6c318108e3b4.jpg) + +![](images/f82f2c657d16655667d2ebdb74e4a3d9b105bb30b3e67f10af3b14e72c12008b.jpg) +heart-shaped food on circular wood + +![](images/d8317dc6130f9fd87d1e6b523c6bc2d302030e727f05bf43f215a49292e1586b.jpg) + +![](images/7e1f0a55b06c8b1e30e475f954a98f0dfcafcfadfacdee13888dd1e07ae3ed15.jpg) + +![](images/2b1c9b3d331e19ff9be96059a20033541dbe6f453f72d95b98bc6dc2aba2e448.jpg) + +![](images/e089d65e1af9788a3b29ca4107da539e3a1efafacb955c467f1c80ed6e5e5d32.jpg) + +![](images/fe7708f40c1f5b970b4a082f5d61d27be9d50da45b650481038565765385d1d8.jpg) + +
ModelPerplexityCaption Length
Corr.p-valueCorr.p-value
MTurk Human0.050.070.200.00
VinVL-0.050.04-0.200.00
UNITERlarge-0.010.57-0.160.00
UNITERbase-0.030.22-0.140.00
ViLLALarge-0.020.39-0.120.01
ViLLABase-0.040.13-0.110.03
VisualBERTbase-0.040.15-0.060.22
ViLT (ViT-B/32)-0.040.16-0.160.00
LXMERT-0.040.12-0.110.02
ViLBERTbase-0.040.11-0.140.00
UniITITMfinetuned-0.010.73-0.020.73
CLIP (ViT-B/32)-0.040.09-0.220.00
VSE++COCO (ResNet)-0.050.040.010.90
VSE++COCO (VGG)-0.040.080.030.56
VSE++Flickr30k (ResNet)-0.020.430.020.67
VSE++Flickr30k (VGG)0.010.74-0.100.04
VSRNCOCO-0.070.01-0.050.36
VSRN Flickr30k-0.020.32-0.050.29
+ +# 7. Conclusion + +We introduced a novel task and dataset, Winoground, aimed at measuring visio-linguistic compositional reasoning in state of the art vision and language models. We demonstrate that models fall short, in most cases performing no better than chance. Our findings highlight that there is more work to be done. Particularly, the field could investi + +Table 6. (left) The correlation between model image-caption scores and the caption perplexity from GPT2. (right) The correlation between the model group scores and the caption length. + +
Pretraining ModalityScoreCorr.p-value
ImageText0.840.00
Image0.760.00
Group0.750.00
CaptionText0.770.00
Image0.750.00
Group0.710.00
+ +Table 7. Correlations between the number of pretraining images and captions and the model text, image, and group scores. CLIP is excluded as an outlier. + +gate possible strengths of single-stream models, the compilation of more pretraining data, improving image-encoding capabilities, and pretraining objectives that emphasize similar but wrong images. We hope that our task and dataset will help guide research in this important direction. + +Broader Impact & Limitations. Winoground is English-only and translation to other languages may be nontrivial [46]. Expert curation is time-consuming and our dataset is limited in size. Multimodal datasets containing images of people require thoughtful consideration of how people are represented (see [4] for a detailed analysis of the stereotypes present in many multimodal datasets). We used gender underspecified human denoting terms (e.g., person, child) to avoid issues with inferring gender identity from images [55]. Our annotators disproportionately come from the USA and the same could be true for our crowdworkers. See Appendix F for our ethics statement. + +# References + +[1] Daniel Altshuler, Terence Parsons, and Roger Schwarzschild. A Course in Semantics. MIT Press, 2019. 3 +[2] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In ICCV, 2015. 2 +[3] David Bender. Establishing a human baseline for the winograd schema challenge. In Modern Artificial Intelligence and Cognitive Science, 2015. 2 +[4] Abeba Birhane, Vinay Uday Prabhu, and Emmanuel Kahembwe. Multimodal datasets: misogyny, pornography, and malignant stereotypes. In arXiv preprint arXiv:2110.01963, 2021.8 +[5] Yonatan Bitton, Gabriel Stanovsky, Roy Schwartz, and Michael Elhadad. Automatic generation of contrast sets from scene graphs: Probing the compositional consistency of GQA. In NAACL: Human Language Technologies, 2021. 2 +[6] Jize Cao, Zhe Gan, Yu Cheng, Licheng Yu, Yen-Chun Chen, and Jingjing Liu. Behind the scene: Revealing the secrets of pre-trained vision-and-language models. In ECCV, 2020. 1 +[7] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020. 4 +[8] Wei-Lun Chao, Hexiang Hu, and Fei Sha. Being negative but constructively: Lessons learnt from creating better visual question answering datasets. In arXiv preprint arXiv:1704.07121, 2017. 2 +[9] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In ECCV, 2020. 2, 4, 5 +[10] Myung Jin Choi, Antonio Torralba, and Alan S. Willsky. Context models and out-of-context objects. In Pattern Recognition Letters, 2012. 2 +[11] Junyoung Chung, Caglar Gulcehr, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. In NeurlPS, 2014. 5 +[12] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In *NAACL: Human Language Technologies*, 2019. 4 +[13] Nan Ding, Sebastian Goodman, Fei Sha, and Radu Soricut. Understanding image and text simultaneously: a dual vision-language machine comprehension task. In arXiv preprint arXiv:1612.07833, 2016. 2 +[14] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. In ICLR, 2021. 4 +[15] Zi-Yi Dou, Yichong Xu, Zhe Gan, Jianfeng Wang, Shuo-hang Wang, Lijuan Wang, Chenguang Zhu, Zicheng Liu, Michael Zeng, et al. An empirical study of training end + +to-end vision-and-language transformers. In arXiv preprint arXiv:2111.02387, 2021. 1 +[16] Yanai Elazar, Hongming Zhang, Yoav Goldberg, and Dan Roth. Back to square one: Artifact detection, training and commonsense disentanglement in the winograd schema. In EMNLP, 2021. 4 +[17] Fartash Faghri, David J. Fleet, Jamie Ryan Kiros, and Sanja Fidler. Vse++: Improving visual-semantic embeddings with hard negatives. In BMVC, 2018. 2, 4, 5 +[18] Stella Frank, Emanuele Bugliarello, and Desmond Elliott. Vision-and-language or vision-for-language? on cross-modal influence in multimodal transformers. In EMNLP, 2021. 2 +[19] Zhe Gan, Yen-Chun Chen, Linjie Li, Chen Zhu, Yu Cheng, and Jingjing Liu. Large-scale adversarial training for vision-and-language representation learning. In NeurIPS, 2020. 2, 4, 5 +[20] Jon Gauthier, Jennifer Hu, Ethan Wilcox, Peng Qian, and Roger Levy. SyntaxGym: An online platform for targeted evaluation of language models. In ACL: System Demonstrations, 2020. 2 +[21] https://www.gettyimages.com/.3 +[22] Raul Gomez, Jaume Gibert, Lluis Gomez, and Dimosthenis Karatzas. Exploring hate speech detection in multimodal publications. In ICCV, 2020. 2 +[23] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Bartra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. In CVPR, 2017. 2, 5 +[24] Kristina Gulordava, Piotr Bojanowski, Edouard Grave, Tal Linzen, and Marco Baroni. Colorless green recurrent networks dream hierarchically. In *NAACL: Human Language Technologies*, 2018. 2 +[25] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5 +[26] Lisa Anne Hendricks and Aida Nematzadeh. Probing image-language transformers for verb understanding. In ACLIJCNLP, 2021. 2 +[27] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In ICLR, 2019. 2 +[28] Homa Hosseinmardi, Sabrina Arredondo Mattson, Rahat Ibn Rafiq, Richard Han, Qin Lv, and Shivakant Mishra. Detection of cyberbullying incidents on the instagram social network. In arXiv preprint arXiv:1503.03909, 2015. 2 +[29] Hexiang Hu, Ishan Misra, and Laurens van der Maaten. Evaluating text-to-image matching using binary image selection (bison). In ICCV, 2019. 2 +[30] Jennifer Hu, Jon Gauthier, Peng Qian, Ethan Wilcox, and Roger Levy. A systematic assessment of syntactic generalization in neural language models. In ACL, 2020. 2 +[31] Ronghang Hu and Amanpreet Singh. Unit: Multimodal multitask learning with a unified transformer. In arXiv preprint arXiv:2102.10772, 2021. 2, 4, 5 +[32] Shankar Iyer, Nikhil Dandekar, and Kornel Csernai. First quora dataset release: Question pairs, 2017. 5 + +[33] Justin Johnson, Bharath Hariharan, Laurens Van Der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In CVPR, 2017. 2 +[34] Katharina Kann, Alex Warstadt, Adina Williams, and Samuel R. Bowman. Verb argument structure alternations in word and sentence embeddings. In SCiL, 2019. 2 +[35] Douwe Kiela, Hamed Firooz, Aravind Mohan, Vedanuj Goswami, Amanpreet Singh, Pratik Ringshia, and Davide Testuggine. The hateful memes challenge: Detecting hate speech in multimodal memes. In arXiv preprint arXiv:2005.04790, 2020. 2 +[36] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In ICML, 2021. 2, 4, 5, 8 +[37] Hannah Rose Kirk, Bertram Vidgen, Paul Röttger, Tristan Thrush, and Scott A Hale. Hatemoji: A test suite and adversarily-generated dataset for benchmarking and detecting emoji-based hate. In arXiv preprint arXiv:2108.05921, 2021. 2 +[38] Vid Kocijan, Thomas Lukasiewicz, Ernest Davis, Gary Marcus, and Leora Morgenstern. A review of winograd schema challenge datasets and approaches. In arXiv preprint arXiv:2004.13831, 2020. 2 +[39] 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. In arXiv preprint arXiv:1602.07332, 2016. 4, 5 +[40] Hector Levesque, Ernest Davis, and Leora Morgenstern. The winograd schema challenge. In Conference on the Principles of Knowledge Representation and Reasoning, 2012. 1, 2 +[41] Kunpeng Li, Yulun Zhang, Kai Li, Yuanyuan Li, and Yun Fu. Visual semantic reasoning for image-text matching. In ICCV, 2019. 2, 4, 5 +[42] Linjie Li, Zhe Gan, and Jingjing Liu. A closer look at the robustness of vision-and-language pre-trained models. In arXiv preprint arXiv:2012.08673, 2020. 1 +[43] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. VisualBERT: A Simple and Performant Baseline for Vision and Language. In arXiv preprint arXiv:1908.03557, 2019. 1, 2, 4, 5 +[44] 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, 2014. 2, 5 +[45] Tal Linzen, Emmanuel Dupoux, and Yoav Goldberg. Assessing the ability of lstms to learn syntax-sensitive dependencies. In TACL, 2015. 2 +[46] Fangyu Liu, Emanuele Bugliarello, Edoardo Maria Ponti, Siva Reddy, Nigel Collier, and Desmond Elliott. Visually grounded reasoning across languages and cultures. In EMNLP, 2021. 2, 8 +[47] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. ViL-BERT: Pretraining Task-Agnostic Visiolinguistic Represent + +tations for Vision-and-Language Tasks. In NeurIPS, 2019. 1, 2, 4, 5 +[48] Vicente Ordonez, Girish Kulkarni, and Tamara Berg. Im2text: Describing images using 1 million captioned photographs. In NIPS, 2011. 5 +[49] Prasanna Parthasarathi, Koustuv Sinha, Joelle Pineau, and Adina Williams. Sometimes we want ungrammatical translations. In Findings of the Association for Computational Linguistics: EMNLP, 2021. 2 +[50] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 1, 2, 4, 5 +[51] Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100,000+ questions for machine comprehension of text. In arXiv preprint arXiv:1606.05250, 2016.5 +[52] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. 4 +[53] Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. Gender bias in coreference resolution. In arXiv preprint arXiv:1804.09301, 2018. 2 +[54] Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: An adversarial winograd schema challenge at scale. In AAAI, 2020. 2 +[55] Morgan Klaus Scheuerman, Jacob M. Paul, and Jed R. Brubaker. How computers see gender: An evaluation of gender classification in commercial facial analysis services. In ACM: Human Computer Interaction, 2019. 8 +[56] Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In arXiv preprint arXiv:1508.07909, 2015. 4 +[57] Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In ACL, 2018. 2, 5 +[58] Ravi Shekhar, Sandro Pezzelle, Yauhen Klimovich, Aurelie Herbelot, Moin Nabi, Enver Sangineto, and Raffaella Bernardi. "foil it! find one mismatch between image and language caption". In ACL, 2017. 2 +[59] Oleksii Sidorov, Ronghang Hu, Marcus Rohrbach, and Amanpreet Singh. Textcaps: a dataset for image captioning with reading comprehension. In ECCV, 2020. 2 +[60] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for largescale image recognition. In CVPR, 2015. 5 +[61] Amanpreet Singh, Vedanuj Goswami, and Devi Parikh. Are we pretraining it right? digging deeper into visio-linguistic pretraining. In arXiv preprint arXiv:2004.08744, 2020. 1 +[62] Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang, Xinlei Chen, Dhruv Batra, Devi Parikh, and Marcus Rohrbach. Towards vqa models that can read. In CVPR, 2019. 2 + +[63] Koustuv Sinha, Robin Jia, Dieuwke Hupkes, Joelle Pineau, Adina Williams, and Douwe Kiela. Masked language modeling and the distributional hypothesis: Order word matters pre-training for little. In EMNLP, 2021. 1, 2 +[64] Koustuv Sinha, Prasanna Parthasarathi, Joelle Pineau, and Adina Williams. UnNatural Language Inference. In ACLIJCNLP, 2021. 2 +[65] Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, A. Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013. 5 +[66] Alane Suhr, Mike Lewis, James Yeh, and Yoav Artzi. A corpus of natural language for visual reasoning. In ACL, 2017. 2, 5 +[67] Shardul Suryawanshi and Bharathi Raja Chakravarthi. Findings of the shared task on troll meme classification in Tamil. In Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages, 2021. 2 +[68] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. In EMNLP-IJCNLP, 2020. 2, 4, 5 +[69] Tristan Thrush, Ethan Wilcox, and Roger Levy. Investigating novel verb learning in BERT: Selectional preference classes and alternation-based syntactic generalization. In Proceedings of the Third BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, 2020. 2 +[70] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 4 +[71] Ramakrishna Vedantam, Arthur Szlam, Maximillian Nickel, Ari Morcos, and Brenden M Lake. Curi: A benchmark for productive concept learning under uncertainty. In ICML, 2021. 2 +[72] Alex Warstadt, Yu Cao, Ioana Grosu, Wei Peng, Hagen Blix, Yining Nie, Anna Alsop, Shikha Bordia, Haokun Liu, Alicia Parrish, Sheng-Fu Wang, Jason Phang, Anhad Mohananey, Phu Mon Htut, Paloma Jeretic, and Samuel R. Bowman. Investigating BERT's knowledge of language: Five analysis methods with NPIs. In EMNLP-IJCNLP, 2019. 2 +[73] Alex Warstadt, Alicia Parrish, Haokun Liu, Anhad Mohananey, Wei Peng, Sheng-Fu Wang, and Samuel R. Bowman. BLiMP: The benchmark of linguistic minimal pairs for English. In TACL, 2020. 2 +[74] Adina Williams, Andrew Drozdov, and Samuel R. Bowman. Do latent tree learning models identify meaningful structure in sentences? In TACL, 2018. 2 +[75] Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In arXiv preprint arXiv:1704.05426, 2017. 5 +[76] Terry Winograd. Understanding natural language. In Cognitive psychology, 1972. 2 +[77] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chau-mond, Clement Delangue, Anthony Moi, Pierrick Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama + +Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In EMNLP: System Demonstrations, 2020. 6 +[78] Ning Xie, Farley Lai, Derek Doran, and Asim Kadav. Visual entailment task for visually-grounded language learning. In arXiv preprint arXiv:1811.10582, 2018. 5 +[79] Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. In TACL, 2014. 5 +[80] Rowan Zellers, Yonatan Bisk, Ali Farhadi, and Yejin Choi. From recognition to cognition: Visual commonsense reasoning. In CVPR, 2019. 5 +[81] Pengchuan Zhang, Xiujun Li, Xiaowei Hu, Jianwei Yang, Lei Zhang, Lijuan Wang, Yejin Choi, and Jianfeng Gao. Vinvl: Revisiting visual representations in vision-language models. In CVPR, 2021. 2, 4, 5 +[82] Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. Gender bias in coreference resolution: Evaluation and debiasing methods. In arXiv preprint arXiv:1804.06876, 2018. 2 +[83] Haoti Zhong, Hao Li, Anna Cinzia Squicciarini, Sarah Michele Rajtmajer, Christopher Griffin, David J Miller, and Cornelia Caragea. Content-driven detection of cyberbullying on the instagram social network. In *IJCAI*, 2016. 2 +[84] Yuke Zhu, Oliver Groth, Michael Bernstein, and Li Fei-Fei. Visual7w: Grounded question answering in images. In CVPR, 2016. 2 \ No newline at end of file diff --git a/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/images.zip b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1b94b4448776575798dfcbdeb5497baec5d4e5ef --- /dev/null +++ b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2990a791eafb409d94800e5a9b4837cb639b1b8eba30bfd31314c7fe40adbfd +size 723774 diff --git a/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/layout.json b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..66714dba4066d442d3ae6e1bf287ee180afa6204 --- /dev/null +++ b/winogroundprobingvisionandlanguagemodelsforvisiolinguisticcompositionality/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bee7adabcdef4e27d427fd2c187f527948241d0f8be198d3e81b41771902655f +size 449114 diff --git a/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_content_list.json b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..72dc42a4b79f9b3237fce6a0d5d9fb5cc70666b1 --- /dev/null +++ b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2deca9babdb37b91ecc3f58c4349e83589e3e8e0b6c846bffbb5788aad260f97 +size 88522 diff --git a/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_model.json b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6c197559aabff0072c65dad0acc76efc26e5d16f --- /dev/null +++ b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8477b390d5472caa73870a9cbf126a1c1498636c65d82c9330e443146ef8822f +size 110520 diff --git a/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_origin.pdf b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..207d868a53158628cd7cf506cd5dad87f8dc138e --- /dev/null +++ b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/20090ebe-7d95-4694-8142-10e775f21a31_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6940980fd1549eb6c8c4e40368eac3c2e5c1ffdb426f3d3c979e1a22e24b4a1a +size 2896614 diff --git a/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/full.md b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..38d6b1ee08c5781e4660fcb7bb9f9ca0e2b67dc9 --- /dev/null +++ b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/full.md @@ -0,0 +1,355 @@ +# Wnet: Audio-Guided Video Object Segmentation via Wavelet-Based Cross-Modal Denoising Networks + +Wenwen Pan $^{1,\dagger}$ , Haonan Shi $^{1,\dagger}$ , Zhou Zhao $^{1,*}$ , Jieming Zhu $^{2}$ , Xiuqiang He $^{2}$ , Zhigeng Pan $^{3}$ , Lianli Gao $^{4}$ , Jun Yu $^{5}$ , Fei Wu $^{1,6}$ , Qi Tian $^{7}$ , $^{1}$ Zhejiang University, $^{2}$ Huawei Noah's Ark Lab, $^{3}$ Hangzhou Normal University, $^{4}$ The University of Electronic Science and Technology of China, $^{5}$ Hangzhou Dianzi University, $^{6}$ Shanghai Institute for Advanced Study of Zhejiang University, $^{7}$ Huawei Cloud & AI + +{wenwenpan, shihn, zhaozhou}@zju.edu.cn, jiemingzhu@ieee.org, hexiuqiang1@huawei.com, zgpan@hznu.edu.cn, lianli.gao@uestc.edu.cn, yujun@hdu.edu.cn, wufei@cs.zju.edu.cn, tian.qil@huawei.com + +# Abstract + +Audio-Guided video object segmentation is a challenging problem in visual analysis and editing, which automatically separates foreground objects from the background in a video sequence according to the referring audio expressions. However, existing referring video object segmentation works mainly focus on the guidance of text-based referring expressions, due to the lack of modeling the semantic representations of audio-video interaction contents. In this paper, we consider the problem of audio-guided video semantic segmentation from the viewpoint of end-to-end denoising encoder-decoder network learning. We propose the wavelet-based encoder network to learn the cross-modal representations of the video contents with audio-form queries. Specifically, we adopt the multi-head cross-modal attention layers to explore the potential relations of video and query contents. A 2-dimension discrete wavelet transform is merged into the transformer encoder to decompose the audio-video features. Next, we maximize mutual information between the encoded features and multi-modal features after cross-modal attention layers to enhance the audio guidance. Then, a self attention-free decoder network is developed to generate the target masks with frequency-domain transforms. In addition, we construct the first large-scale audio-guided video semantic segmentation dataset. The extensive experiments show the effectiveness of our method1. + +![](images/e2655ce5157b54ade31a73d80a727b7ab461f60403759523679fc2ec7760c560.jpg) +Figure 1. The audio-guided video object segmentation task. + +# 1. Introduction + +Referring video object segmentation aims to segment video objects referred by given language expressions, which has attracted wide attention due to its applicability to many practical problems including video analysis and video editing [33,35,49,50,61]. Currently, most referring video object segmentation approaches mainly focus on the guidance of text-guided referring expressions [18, 19, 31, 33, 35, 49, 61, 63], which can learn the multi-modal representation from the interaction network layer, and then generate the object masks to the given text references. The existing works have achieved promising performance in text-based video object segmentation, but they may still be ineffectively applied to the audio-guided video object segmentation due to the lack of modeling the semantic representation of audio-video interaction contents. + +The audio-guided video analysis is a simulation of human cognition, comparing with the text-guided analysis [44]. Humankind use speech exclusively long before the invention of writing. People also learn and use language in the real world, as to collaborate, describe and relate their visual environment, talk about each other, and so on. Furthermore, in the natural scene, audio interaction is more convenient and common than text interaction. Although audio + +inputs can be converted to text inputs through ASR models [3, 4, 46], the process will produce unavoidable losses. Since Harwath and Glass's collection of spoken captions for Flickr8k [14], more works address cognitive and linguistic questions [8, 10-12]. Other work addresses applied tasks, including multi-modal retrieval [22], cross-modality alignment [13, 27], retrieving speech in different languages using images as a pivot modality [1, 26, 39], and speech-to-speech retrieval [1, 39]. Our work focuses on the audio-guided video object segmentation tasks, shown as Fig. 1. The audio guidance often contains rich semantic information, such as the accent, emotion and speed. These extra factors can facilitate the object segmentation. The same object can correspond to different pronunciations, while the same pronunciation can point to different objects. Thus, the simple extension of the existing segmentation works based on text-based guidance is difficult for modeling the semantic representation of audio-video interaction contents. Inspired by MulT [51], we use multi-head cross-modal attention layers to fuse the video embeddings and audio embeddings. Different from the MulT model [51], we extend dimensions of inputs and apply it to large-scale natural language datasets. The cross-modal transformers referred to text embeddings are all removed. + +One other bottleneck is the noise problem, derived from acquisition noise and fusing noise [7]. For the acquisition noises, we use a pre-trained MFCC model [5] to extract acoustic features, which is widely used in automatic speech and speaker recognition. In this paper, we focus on the processing of fusing noise. There is a large gap between video and audio representations. The joint representations reflect important information considering multi-modal alignment. Audio and video features have different redundant parts (i.e. irrelevant phonemes and pixels), likewise termed as noise. These noises are difficult to handle only by convolution operations and attention mechanisms in the time domain. As mentioned in [29], noises are likely to concentrate at high frequencies. Recently, Fnet [30] has been proposed to learn the frequency-domain-level representation with Fourier transforms for recognition tasks, while it only aims to speed up the encoder architectures but fails to obtain improvement in performances. Low-pass filtering on Fourier analysis cannot effectively distinguish the high-frequency parts of the required signal from the high-frequency interference caused by noise. If the low-pass filtering is too narrow, parts of the required signal are treated as noise and its morphological information is erased, which leads to the distortion of the original signal [45]. + +Motivated by this, we integrate the 2-dimension discrete wavelet (DWT) transform into the transformer encoder, which replaces self-attention layers with DWT layers. The DWT denoising has proved its effectiveness in image denoising [25, 45, 52], but has not been used in multi-modal + +representation yet to our knowledge. We are the first to devise the DWT-transformer for the audio-visual joint representation to filter the noise and outliers, as a priori. The layers of the whole transformer encoder are reduced, which obtains a sizable performance boost in terms of speed and model consumption. Inspired by the AMDIM [2], we maximize mutual information between the encoded features and multi-modal features after the cross-modal attention to enhance the audio guidance. + +The main contributions of this paper are as follows: (i) Unlike the previous studies, we study the problem of audio-guided video object segmentation from the viewpoint of end-to-end denoising encoder-decoder network learning. (ii) We propose the wavelet-based encoder network to learn the cross-modal representations of the video contents with audio-form queries. (iii) We construct a large-scale dataset for audio-guided video object segmentation and validate the effectiveness of our proposed method through extensive experiments. + +# 2. Related Work + +# 2.1. Referring Expression object Segmentation + +The referring expression segmentation task has attracted increasing research interest [18, 19, 31, 33, 35, 49, 61, 63] in recent years. Hu et al. [18] formulate this task as an image-region-wise classification problem. Li et al. [31] employ multi-scale image features from multiple convolutional layers. Qiu et al. [41] further enhance visual features and introduce an adversarial mechanism. Some works [33, 35, 49, 50, 61] make more interactions between the image and natural language query. Furthermore, the attention module [61, 63] is introduced to the segmentation task. To enhance the accuracy, further works successfully model the dependencies of cross-modal information [20], informative words of the expression [21] and localization information of the referent instances [24]. Moreover, Luo et al. [34] achieve a joint learning of referring expression comprehension and segmentation. [28] extends technologies to video data and incorporated temporal coherency. For the video data, existing methods commonly employ dynamic convolutions [9, 54] to adaptively generate convolutional filters, or leverage cross-modal attention [38, 55, 62] to compute the correlations among input visual and linguistic embeddings. However, these works cannot handle the noise problem of audio-video joint representations. + +# 2.2. Speech-Based Video Analysis + +Comparing with the text-guided video analysis, audioguided analysis is a more precise simulation of human cognition to the world [44]. Actually, people use speech exclusively long before the invention of writing. Harwath et al. [14] collect spoken captions for Flickr8k, and then much + +Table 1. The statistics of the AVOS dataset. + +
RVOSA2DJ-HMDBTotal
Number of Audio11,2266,65692918,811
+ +research [7, 12, 17, 47] begins to attach importance to this task. Some works emphasize the cognitive and linguistic questions, such as understanding how different learned layers correspond to visual stimuli [8, 10], learning linguistic units [11, 12] or how visually grounded representations can help understand lexical competition in phonemic processing [15]. Ramon Sanabria et al. [44] propose dual encoder models that can be used for efficient multimodal retrieval. However, these works take less consideration of video object segmentation. + +# 3. Audio-Guided-VOS Dataset (AVOS) + +There are previous works that constructed referring segmentation datasets for videos. Gavrilyuk et al. [9] extended the A2D [58] and J-HMDB [23] datasets with natural sentences. Seo et al. constructed the first large-scale referring video object segmentation dataset called RVOS [48]. + +To facilitate audio-based video object segmentation, we have constructed a large-scale audio-guided dataset, Audio-Guided-VOS (AVOS) $^2$ , with referring audio expressions as Tab. 1. AVOS is the extension of RVOS [48], A2D [58] and J-HMDB [23]. We select the three datasets for their rich scene information. To obtain audio annotations, we employ 36 speakers to read the sentences totally. To ensure the recording quality, all the speakers are required to read proficiently, do not stammer, stuck and other situations. The sampling rate is 44,100K or above, the sampling number is 16 bits, and the speaking speed is 100-150 words per minute. Speaking speed should be normal speaking speed, or TV announcer speaking speed. The word accuracy of text files and audio files is not less than $99\%$ under manual checking. The average length of each recording is 5 to 6 seconds, about 28 hours in total. Moreover, we have run two rounds of inspections. We not only correct the pronunciation in the recordings, but also correct grammar and spelling errors in the original texts. The ratio of the training set, the test set and the validation set is $75:15:10$ . + +# 4. Proposed Method + +We present a video sequence as $\mathbf{v} = \{\mathbf{v}_{\mathrm{i}}\}_{\mathrm{i} = 1}^{\mathrm{n}}$ where $\mathbf{v}_{\mathrm{i}}$ is the pre-extracted visual feature of the i-th frame and n is the frame number of the video. Each video is associated with an audio query, denoted by $\mathbf{q} = \{\mathbf{q}_{\mathrm{i}}\}_{\mathrm{i} = 1}^{\mathrm{m}}$ where $\mathbf{q}_{\mathrm{i}}$ is the feature of i-th frame and m is the frame number of the audio. The goal of the audio-guided video object segmentation is to predict binary segmentation masks $\mathbf{S} = \{\mathbf{S}_{\mathrm{i}}\in \{0,1\}^{\mathrm{W_{o}\times H_{o}}}\}_{i = 1}^{\mathrm{n}}$ + +# 4.1. Analysis on Wavelet Transform + +As to the convolutional neural network, each convolutional layer is composed of several convolutional units, and the parameters of each convolutional unit are optimized by back propagation algorithm. Convolution operations aim to extract different features of inputs, represented as follows. + +$$ +W (\tau) = \int_ {- \infty} ^ {\infty} f (t) g (\tau - t) \mathrm {d} t. \tag {1} +$$ + +The convolution kernel in the convolution layer is relatively fixed. Audio-video joint representations contain rich time-frequency characteristics, which are more suitable for window functions that vary in the time-frequency domain. The wavelet can be represented as follows. + +$$ +W (a, \tau) = \frac {1}{\sqrt {a}} \int_ {- \infty} ^ {\infty} f (t) \psi \left(\frac {t - \tau}{a}\right) \mathrm {d} t, \tag {2} +$$ + +where scaling function $\psi_{a,\tau}(t) = a^{-\frac{1}{2}}\psi (\frac{t - \tau}{a})$ and $a$ is the scale, which is inversely proportional to the frequency. The operation of the traditional convolution layer and wavelet have the commonality. The difference is $g(\tau -t)$ and $\psi \left(\frac{t - \tau}{a}\right)$ . Audio and video features have different redundant parts (i.e. irrelevant phoneme and pixel), termed as noises. The noises from the video and audio inputs are distributed among most features after the cross-modal attention. These noises are difficult to handle only by convolution operations in the time domain. As mentioned in [29], noises are likely to concentrate at high frequencies. Fnet [30] proposes to use Fourier sublayers to replace the self-attention layers. However, low-pass filtering on Fourier analysis cannot effectively distinguish the high-frequency part of the required signal from the high-frequency interference caused by noise. Wavelet can well retain the peak value and mutation part of the useful signal required in the original signal. It has good time-frequency localization characteristics and can be expressed linearly as: + +$$ +W _ {x} = W _ {f} + W _ {e}, \tag {3} +$$ + +where $W_{e}$ is the wavelet coefficients controlled by noise. We can use threshold quantization to reconstruct denoising joint representations. Furthermore, we can obtain improvements by replacing self-attention layers with the DWT layers in terms of the model consumption and speed. + +# 4.2. Overview + +As Fig. 2 illustrated, our model can be divided into five modules: visual encoder, audio encoder, transformer encoder, transformer decoder and segmentation module. + +Visual Encoder. We employ ResNet-50 [16] as our backbone network to extract visual features from an input frame. + +![](images/26b903c715a62552526276c34a96e5fdfd1912c8b297373ae57bbd0897a63dab.jpg) +Figure 2. The whole framework for our segmentation model. + +To include spatial information of the visual feature, we augment 3-dimensional spatial coordinates following [56], denoted as $\mathbf{v} = \{\mathbf{v}_i\}_{i=1}^n$ . The output of the backbone is $\mathbf{B} \in \mathbf{R}^{n \times c \times H \times W}$ . c represents the original video dimension. A $1 \times 1$ convolution is used to reduce the dimension to $\mathbf{R}^{n \times d \times H \times W}$ . We then flatten the dimensions as $d \times (n \times H \times W)$ . + +Audio Encoder. MFCCs are the features widely used in automatic speech and speaker recognition. Following [37], we capture information about lower frequencies than higher frequencies by non-linear scaling and thus acts as a human ear. A set of MFCCs is encoded as a multi-hot vector and projected onto an embedding space using the 1D convolution, denoted as $\mathbf{q} = \{\mathbf{q}_i\}_{i=1}^m$ . + +Transformer Encoder and Decoder. We devise a transformer encoder-decoder framework for our audio-guided video object segmentation model. The model is in end-to-end manners. The transformer encoder is employed to learn the cross-modal representations of the video contents with audio-form queries. We first apply the layer normalization to the visual features and audio features, respectively. Next, we devise a wavelet-based cross-modal module to fuse the two modalities and achieve denoised joint representations. Each encoder layer consists of a multi-head attention module [53] and a fully connected feed-forward network. Then, we maximize the mutual information between the cross-modal representations and the encoded representations. During this stage, the temporal order is the same as the order of the initial input. + +The transformer decoder aims to generate the top pixel features that can represent the target object of each frame. Motivated by Fnet [30], we also replace the self-attention sublayers with simple linear transformations. The self attention-free decoder can better handle audio-video encoding. Besides the Fourier layers, we follow the standard ar + +chitecture of the transformer, using multi-headed encoder-decoder attention mechanisms. Following [56], the decoder then takes a small fixed number of learned positional embeddings (object queries) as inputs, and attends to the encoder output. The overall predictions follow the input frame order. We remove all self-attention layers in the transformer encoder-decoder framework to reduce model computation. Details of the transformer are in 4.3 and 4.4. + +Object Sequence Segmentation. The module aims to predict the mask sequence for the target object. We capture the object predictions $\mathbf{O}$ , backbone features $\mathbf{B}$ and encoded feature maps $\mathbf{E}$ from the previous layers, shown in Fig. 2. First, we employ an attention module to calculate the similarity map between $\mathbf{O}$ and $\mathbf{E}$ . Following [56], we only compute the features of its corresponding frame. Next, we fuse the similarity map, $\mathbf{B}$ and $\mathbf{E}$ of the corresponding frames, following the DETR [6]. $\mathbf{B} \in \mathbf{R}^{\mathrm{n} \times \mathrm{c} \times \mathrm{H} \times \mathrm{W}}$ , $\mathbf{E} \in \mathbf{R}^{\mathrm{d} \times \mathrm{n} \times (\mathrm{H} \times \mathrm{W})}$ , $\mathbf{O} \in \mathbf{R}^{\mathrm{n} \times \mathrm{d}}$ , where $\mathrm{n}$ denotes the frame numbers, $\mathrm{c}$ and $\mathrm{d}$ denote the dimension. Then, we use a deformable convolution as the last layer of the fusion. Thus, the mask features for the target object of different frames are achieved. Finally, the 3D convolution, which three 3D convolutional layers and group normalization layers [57] with ReLU activation function, is employed to obtain the mask sequence. + +# 4.3. DWT-Based Transformer Encoder + +Comparing with the text-guided semantic segmentation, audio-based segmentation suffers from severe noise problems [44], derived from acquisition noise and fusing noise. For the acquisition noises, we use a pre-trained MFCC models [37] to extract acoustic features. For the fusing noise, we propose a DWT-based transformer encoder to realize multimodal encoding and joint feature denoising. + +We consider visual modality and audio modality, with + +![](images/f08247d7404d4940c07211e511f0332dafb4b7c6b85739919623fea8c7ab6db7.jpg) +Figure 3. The process of the denoising operation. + +two potentially non-aligned sequences from each of them, denoted as $\mathbf{v}^{\mathbf{p}}\in \mathbf{R}^{\mathrm{T}_{\mathrm{v}}\times \mathrm{d}_{\mathrm{v}}}$ and $\mathbf{q}^{\mathbf{p}}\in \mathbf{R}^{\mathrm{T}_{\mathrm{a}}\times \mathrm{d}_{\mathrm{q}}}$ . $\mathrm{T}_{(\cdot)}$ represents the sequence length (audio or video), and $\mathrm{d}_{(\cdot)}$ represents the dimension, respectively. Inspired by the multimodal transformer in MulT [51], we attend to interactions between multi-modal sequences across distinct time steps and latently adapt streams from audio modality to visual modality. We assume the input of the cross-modal attention is a sequence of queries $\mathbf{Q} = \mathbf{v}^{p}\mathbf{W}_{Q}$ , keys $\mathbf{K} = \mathbf{q}^{p}\mathbf{W}_{K}$ and values $\mathbf{V} = \mathbf{q}^{p}\mathbf{W}_{V}$ . The cross-modal attention is calculated by + +$$ +\operatorname {A t t e n t i o n} _ {a \rightarrow v} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) = \operatorname {S o f t m a x} (\frac {\mathbf {Q} ^ {\top} \mathbf {K}}{\sqrt {\mathrm {d} _ {\mathrm {k}}}}) \mathbf {V} ^ {\top}, (4) +$$ + +where $\mathrm{d_k}$ is the query dimensions and Softmax operation is performed on every row. We employ multi-head attention layers [53], which consists of $H$ paralleled cross-modal attention layers. Finally, we obtain cross-modal representation $\mathbf{f} \in \mathbf{R}^{\mathrm{T}_{\mathrm{v}} \times \mathrm{d}_{\mathrm{v}}}$ . + +Noise problem can be derived from acquisition (pause, environment noise, etc.) and alignment. For the acquisition noises, we use a pre-trained MFCC model [5] to extract acoustic features, which is widely used in automatic speech and speaker recognition. There is a large gap between video and audio representations. The joint representations reflect important information considering multi-modal alignment. Attention is an importance estimate in the time domain, while the frequency domain can reflect another granularity of importance estimate. For multi-modal tasks, the importance of the frequency band requires consideration of interactive alignment information, and the high frequency part is more likely to be noisy information unrelated to alignment. For example, the noise can be parts of the audio irrelevant to the content of the video, or parts of the video irrelevant the audio features. To deal with the noise problem, we adopt 2d + +Discrete Wavelet Transform (DWT) for the joint representation. The reason for using DWT instead of DFT is that DFT is more likely to lose useful information at high frequencies, resulting in a decrease in actual performance. + +The proposed algorithm is a hybrid approach that uses spatial and transform-domain information. Wavelet transform decomposes a signal into its sub-bands using a series of high-pass and low-pass filters. As noise is generally categorized as a high-frequency component, it is easier to separate it from the signal using wavelet transform. The decomposition of frequency content depends on the number of levels of DWT. The cross-modal representations $\mathbf{f} \in \mathbf{R}^{\mathrm{T}_{\mathrm{v}} \times \mathrm{d}_{\mathrm{v}}}$ serve as the input signal. The DWT separates filtering operations on rows and columns. $\mathrm{A}_{j,\mathrm{u}}$ and $\mathrm{C}_{j,\mathrm{u}}^{\mathrm{k}}$ denote scaling and wavelet coefficients at scale $j$ for the given signal $\mathbf{f}$ where $k = 1,2,3$ . We'll be working with separable orthonormal filters so 2D filters can be expressed as a product between low pass filter $h$ and high pass filter $g$ . The coefficients at scale $j$ can be obtained from coefficients at scale $j + 1$ . We can obtain $\mathbf{A}_{j,u}$ and $\mathbf{C}_{j,u}^k$ as follows. + +$$ +\begin{array}{l} \mathbf {A} _ {j, u} = \sqrt {2} \sum_ {u} h h (l - 2 u) \mathbf {A} _ {j + 1, l}; \\ \mathbf {C} _ {j, u} ^ {1} = \sqrt {2} \sum_ {u} h g (l - 2 u) \mathbf {A} _ {j + 1, l}; \\ \mathbf {C} _ {j, u} ^ {2} = \sqrt {2} \sum_ {u} g h (l - 2 u) \mathbf {A} _ {j + 1, l}; \\ \mathbf {C} _ {j, u} ^ {3} = \sqrt {2} \sum_ {u} g g (l - 2 u) \mathbf {A} _ {j + 1, l}. \\ \end{array} +$$ + +To implement the filter bank, we use two-stage filter banks. In the first stage, rows of two-dimensional signal are convolved with $h, g$ filters and then we downsample columns by 2. In the next stage, columns are convolved with the filters $h, g$ and we keep only even indexed rows. A $n \times d_v$ cross-modal signal is transformed into four $\frac{n}{2} \times \frac{d_v}{2}$ signal after the two stages. + +Next, we perform threshold quantization on the high-frequency coefficients $C_{\mathrm{j,u}}^{\mathrm{k}}$ of wavelet decomposition. For the high-frequency coefficients (in three directions) of each layer from layer 1 to layer $N$ , a threshold value is selected for threshold quantization. We adopt VisuShrink threshold $\alpha$ with a soft threshold function. For $\phi = \max |C_{\mathrm{j,u}}^{\prime \mathrm{k}}|$ , the filter operations can be represented as follows ( $k \in [1,2,3]$ ). + +$$ +\mathrm {C} _ {j, u} ^ {\prime k} [ x, y ] = \operatorname {s g n} \left(\mathrm {C} _ {j, u} ^ {k} [ x, y ]\right) \left(\left| \mathrm {C} _ {j, u} ^ {k} [ x, y ] \right| - \alpha \phi\right) _ {+} \tag {6} +$$ + +Then, we perform the wavelet reconstruction of the signal. The wavelet is reconstructed according to the low frequency coefficients of the $N$ -th layer of wavelet decomposition and the high-frequency coefficients from the 1st layer to the $N$ -th layer after quantization. + +$$ +\mathbf {f} _ {\mathbf {n}} = \operatorname {D W T I n v e r s e} \left(\mathbf {A} _ {j, u}, \mathbf {C} ^ {\prime k} _ {j, u}\right), \tag {7} +$$ + +where $\mathbf{f}_{\mathbf{n}}$ is the denoised joint representation. The $\mathbf{f}_{\mathbf{n}}$ serves as the input of the following feed-forward layers and layer norm. Finally, we obtain the encoded representation $\mathbf{E}$ . + +# 4.4. Self Attention-Free Decoder + +Due to the fusion between the audio and video signal, joint representations are more suitable for processing in the frequency domain. We adopt the decoder without the self-attention layers to achieve speedups. Inspired by [30], each layer consists of a Fourier mixing sublayer followed by a feed-forward sublayer. We replace the self-attention sublayer of each transformer decoder layer with a Fourier sublayer. A 2D DFT is applied to its embedding input. One 1D DFT is along the sequence dimension, $\mathbb{F}_{seq}$ , and one 1D DFT is along the hidden dimension $\mathbb{F}_{hidden}$ . + +$$ +y = \mathbb {R} \left(\mathbb {F} _ {\text {s e q}} \left(\mathbb {R} \left(\mathbb {F} _ {\text {h i d d e n}} (x)\right)\right)\right), \tag {8} +$$ + +We only keep the real part of the result. After the Fourier layers, we employ the multi-head attention layers. The object prediction $\mathbf{O}$ is obtained. + +# 4.5. Training of Wnet + +Among the whole model, the loss function includes the mask loss, the box loss and the mutual loss. + +$$ +\mathcal {L} = \lambda_ {1} \mathcal {L} _ {\text {m a s k}} + \lambda_ {2} \mathcal {L} _ {\text {b o x}} + \mathcal {L} _ {\text {m u t u a l}}, \tag {9} +$$ + +where $\lambda_1, \lambda_2$ aim to adjust the three losses. The mask loss for supervising the predictions is defined as a combination of the Dice [36] and Focal [32] loss: + +$$ +\begin{array}{l} \mathcal {L} _ {m a s k} (m _ {i}, m _ {\sigma (i)}) = \\ \frac {1}{T} \sum_ {t = 0} ^ {T} \left[ \mathcal {L} _ {\text {D i c e}} \left(m _ {i, t}, m _ {\sigma (i), t}\right) + \mathcal {L} _ {\text {F o c a l}} \left(m _ {i, t}, m _ {\sigma (i), t}\right) \right], \tag {10} \\ \end{array} +$$ + +where $m$ is the predicted mask, $m_{\sigma}$ is the target mask and $T$ is the number of frames in the video. $\mathcal{L}_{box}$ scores the bounding boxes. We use a linear combination of the sequence level L1 loss and the generalized IOU [43] loss. + +$$ +\begin{array}{l} \mathcal {L} _ {b o x} \left(b _ {i}, b _ {\sigma (i)}\right) = \\ \frac {1}{T} \sum_ {t = 0} ^ {T} \left[ \mathcal {L} _ {i o u} \left(b _ {i, t}, b _ {\sigma (i), t}\right) + \left| \left| b _ {i, t} - b _ {\sigma (i), t} \right| \right| _ {1} \right], \tag {11} \\ \end{array} +$$ + +We use KL divergence [60] to maximize the mutual information between the cross-modal representation $\mathbf{f}$ and the encoded representation $\mathbf{E}$ . + +$$ +\mathcal {L} _ {\text {m u t u a l}} (\mathbf {E} (i, j) | | \mathbf {f} (i, j)) = \sum \mathbf {E} (i, j) \left(\log \frac {\mathbf {E} (i , j)}{\mathbf {f} (i , j)}\right), \tag {12} +$$ + +where $i$ stands for the sequence and $j$ stands for the dimension. $\mathbf{E}$ and $\mathbf{f}$ are sent to the softmax function before + +Table 2. The comparison of different method for audio-guided semantic segmentation on AVOS. + +
ModelJFJ&F
URVOS+ [48]37.1%39.2%38.2%
PAM+ [38]38.6%38.9%38.8%
VisTR+ [56]38.0%39.5%38.8%
Wnet (Ours)43.0%45.0%44.0%
+ +Table 3. The results of different datasets in the AVOS dataset. In this table, we use the same dataset for training and testing. + +
DatasetJFJ&F
RVOS43.0%44.1%43.6%
A2D49.8%55.1%52.5%
J-HMDB65.6%56.7%61.2%
+ +Note: JHMDB-Sentences is only for evaluation, not training, so it is directly evaluated using the checkpoint trained on A2D-Sentences. + +computing KL divergence. The KL divergence is used to pull in the distance between the cross-modal representation and the encoded representation. Thus, the audio guidance is strengthened, which avoids the DWT operation filtering too many audio factors. + +# 5. Experiments + +# 5.1. Performance Criteria + +We evaluate the performance of our Wnet method based on two widely-used evaluation criteria for audio-guided video semantic segmentation following [40]. Given the testing video sequence $\mathbf{v}$ and audio query $\mathbf{q}$ with the ground-truth masks $\mathbf{G}$ , we denote the generated masks from our Wnet method by $\mathbf{S}$ . We employ the Jaccard index $\mathcal{J}$ defined as the intersection-over-union of the generated segmentation and the ground-truth mask $(\mathcal{J} = \left|\frac{S \cap G}{S \cup G}\right|)$ . From a contour-based perspective, one can interpret $S$ as a set of closed contours $c(S)$ delimiting the spatial extent of the mask. Therefore, one can compute the contour-based precision and recall $P_{c}$ and $R_{c}$ between the contour points of $c(S)$ and $c(G)$ . We adopt F-measure as a trade-off between the two $(\mathcal{F} = \frac{2P_{c}R_{c}}{P_{c} + R_{c}})$ . + +# 5.2. Implementation Details + +Visual Feature Extraction. We use a ResNet-50 backbone to extract visual features, which has the same settings as DETR [6]. And it is then fed into a 2D convolution with kernel size 1 to map the model dimension and each frame is concatenated to form the clip level feature. + +Acoustic Feature Extraction. We use a 39-dimensional MFCC to represent its acoustic feature. Then, we use 1D convolution to further extract features and map them to the corresponding dimensions of the model following the implementation by Tsai et al. [51]. The kernel size of 1D convolution is 1. + +![](images/1f38741e10812397961b71194071c87eed961f4fa0c3f44f390f9db4de5edae3.jpg) +Figure 4. Visualization of Wnet and VisTR+ on the AVOS. + +![](images/8094c09f4d97c275469ade94941d69bbb2cee4330a7fbe3542d56f384d26d9d7.jpg) +Figure 5. Visualization of DWT-based denoised features. + +Dataset Processing. Our dataset (AVOS) contains three parts (RVOS, A2D and J-HMDB). For the RVOS part, we use the same videos in Youtube-VIS [59], as VisTR [56]. The mask annotations in validation and test set are unavailable, so we divide the training set into the training, validation and test set in our experiments. However, we also offer the audio queries for original validation and test set. + +Model Setting. We adopt a 2-layer, 8-head multi-head cross-attention [51] module with the width of 3 to fuse visual and audio features. Between the attention layer and the feed-forward layer, a wavelet transform filter layer is used to remove noise from joint representations. For the transformer decoder, we use Fourier transform [30] instead of the self-attention layer. After obtaining the prediction of the decoder and the encoder, for each corresponding frame, we send them to an attention module to obtain the attention map, which is not multiplied by the value. Then it will be fused with the backbone features and the memory to get the mask features for each instance of each frame, following the same practice with VisTR [56]. We expand the num + +ber of frames per video to 36 for end-to-end training, and applied 36 query slots for 36 objects throughout the video. Finally, we use three Conv3d layers and GroupNorm layers [57] with ReLU activation. The Conv3d layers have the kernel size of 3, padding of 2 and dilation of 2. And we use a last Conv3d layer with the kernel size of 1 to obtain the mask. More details are in supplementary material. + +# 5.3. Performance Comparisons + +We compare our proposed method with other existing methods for the problem as follows: + +$\mathrm{VisTR+}$ is the extension of the transformer-based video instance segmentation algorithm [56], where the cross-modal attention layer is added to fuse the two modalities. For the $\mathrm{VisTR+}$ , we use the Hungarian loss as [56]. For our Wnet, we use the box and mask loss. + +URVOS+ is the extension of the unified referring video segmentation network [48], where the MFCC layer [5] is added to encode the audio inputs. + +$\mathbf{PAM}+$ is the extension of the polar relative positional encoding mechanism [38], where the MFCC layer [5] is added to encode the audio inputs. + +Tab. 2 and Tab. 3 presents the performance on AVOS. We exceed VisTR+, URVOS+ and PAM+ with $5.0\%$ , $5.9\%$ and $4.4\%$ in the region similarly. Wnet has an absolute improvement of $5.5\%$ , $5.8\%$ and $6.1\%$ for the contour accuracy. These comparisons mean that the audio-guided video object segmentation is quite different from the text-guided task. There is also a vast difference between the recordings collected from the natural environment and those generated from text-to-speech model. Therefore, it is not suitable to treat audio-guided segmentation as the combination of automatic speech recognition and text-based segmentation. + +The visualization of Wnet on the AVOS test dataset is shown in Fig. 4, with each row containing images sampled from the same video. The comparison between Wnet and VisTR+ shows our efficiency in the audio-guided models. + +Table 4. The results for different components. + +
ModelJFJ&F
Base39.3%41.6%40.4%
Base + AFD41.2%42.5%41.8%
Base + AFD + MIM41.8%43.0%42.4%
Base + AFD + MIM + DWT42.9%44.0%43.5%
+ +Note: We use self-attention layers to replace DWT layers in Base, Base + AFD and Base + AFD + MIM. + +Table 5. The results for different wavelet basis, mentioned in [42]. + +
Wavelet BasisDaubechiesSymletsCoifletsMeyer
J42.9%41.9%41.7%40.7%
F44.0%42.6%42.9%42.7%
+ +Table 6. The results for DWT. $[a, b]$ means the retained coefficients (value is in interval $[a \cdot \max\_value, b \cdot \max\_value]$ ) after filters. For the low pass and high-low pass, we use the hard threshold function. For the high pass, we use the soft threshold function. + +
ModelJFJ&F
Low Pass[0, 0.9]41.8%43.3%42.5%
[0, 0.8]42.1%43.3%42.7%
[0, 0.7]40.3%41.3%40.6%
High-Low Pass[0.008, 0.9]42.1%43.7%42.9%
High Pass[0.01, 1]42.8%43.2%43.1%
[0.008, 1]42.9%44.0%43.5%
[0.006, 1]42.3%43.8%43.1%
+ +Table 7. The results for threshold function selection. Take high pass [0.008, 1] for example. + +
Function Selection for High PassJFJ&F
Hard Function42.1%41.8%42.0%
Soft Function42.9%44.0%43.5%
+ +Table 8. The results for J selection. For different J, the number of the high frequency coefficient matrix is 3J. + +
JNumber of Coefficient MatrixJFJ&F
13 (C1,u)42.9%44.0%43.5%
26 (C1,u; C2,u)41.0%41.7%41.4%
+ +Table 9. The comparison of average inference latency among Wnet and audio-text-segmentation model. The evaluation is conducted on a server with 1 NVIDIA 3090Ti GPU, 12 Intel Xeon CPU. The batch size is set to 1. + +
MethodJLatencySpeedup
Wnet42.9%0.0014s2.10×
ASR+RVOS38.4%0.0032s1.00×
+ +Wnet can segment small objects from the nature environment, while the VisTR+ performs poorly under this circumstance. Furthermore, the visualization of the DWT process in Fig. 5 shows the denoising performance. + +# 5.4. Ablation Study + +In the ablation study, we fine-tune parameters on the validation set. We take the audio-guided RVOS dataset (parts + +of AVOS dataset) as the example. + +About the model components. As shown in Tab. 4, we conduct the experiments to verify the effectiveness of our model design, including the DWT-Based denoising (DWT), mutual information maximum (MIM) and self attention-free decoder (AFD). We use the self-attention layers in the models without the DWT layers. The full model achieves better results than the model (w/o. DWT). It suggests that the DWT layers can filter the noise generated in the audio-video fusion and improve subsequent segmentation results. + +About the wavelet basis. Tab. 5 shows the comparison of different wavelet bases. Results verify that the Daubechies wavelet basis is proper for the discrete joint representations. + +About the threshold parameter selection. We conduct the experiments under high-pass filters and low-pass filters with different threshold parameter selections. Results in Tab. 6 shows that we can get the best performance under the low-pass filters (0.008) with the soft function. + +About the threshold function selection. Two common threshold functions are the hard and the soft function. The hard threshold method can preserve the local features such as the edge of the signal well, while the soft threshold method is relatively smooth. As Tab. 7 shown, we choose the soft function for our model. + +About the J selection. Tab. 8 shows the results for the J selection. The performance will be worse when the order is increasing. We select $\mathrm{J} = 1$ for our model, with 1 low frequency and 3 high-frequency coefficients. + +About the audio-text-segment model. The audio-text-segment model means that we use an ASR model first and then employ the latter referring segmentation model. Tab. 9 shows the results for comparison of Wnet and audio-text-segment model, in terms of speed and quality. We achieve the better performance in these two factors. + +# 6. Conclusion + +In this paper, we present the problem of open-ended audio-guided video semantic segmentation, which can be applied in video analysis, video editing, virtual human and so on, from the viewpoint of end-to-end denoising encoder-decoder network learning. We propose the wavelet-based encoder network to learn the cross-modal representations of the video contents with audio-form queries. Then, a self attention-free decoder network is developed to generate the target masks with frequency-domain transforms. In addition, we construct the first large-scale audio-guided video semantic segmentation dataset. The extensive experiments show the effectiveness of our method. + +Acknowledgments. This work was supported by the National Natural Science Foundation of China (Grant No.61836002, No.62020106007, No.62072150, No.62072397) and Zhejiang Natural Science Foundation (LR19F020006). + +# References + +[1] Emmanuel Azuh, David Harwath, and James R. Glass. Towards bilingual lexicon discovery from visually grounded speech audio. In Interspeech 2019, 20th Annual Conference of the International Speech Communication Association, Graz, Austria, 15-19 September 2019, pages 276-280. ISCA, 2019. 2 +[2] Philip Bachman, R. Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 15509-15519, 2019. 2 +[3] Alexei Baevski, Steffen Schneider, and Michael Auli. vqvav2vec: Self-supervised learning of discrete speech representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. 2 +[4] Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. wav2vec 2.0: A framework for self-supervised learning of speech representations. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. 2 +[5] Lallouani Bouchakour and Mohamed Debyeche. Mfccs and gabor features for improving continuous arabic speech recognition in mobile communication modified. In Proceedings of the 3rd International Conference on Advanced Aspects of Software Engineering, ICAASE 2018, Constantine, Algeria, December 1-2, 2018, volume 2326 of CEUR Workshop Proceedings, pages 115-121. CEUR-WS.org, 2018. 2, 5, 7 +[6] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 213-229. Springer, 2020. 4, 6 +[7] Grzegorz Chrupala. Visually grounded models of spoken language: A survey of datasets, architectures and evaluation techniques. CoRR, abs/2104.13225, 2021. 2, 3 +[8] Grzegorz Chrupala, Lieke Gelderloos, and Afra Alishahi. Representations of language in a model of visually grounded speech signal. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pages 613-622. Association for Computational Linguistics, 2017. 2, 3 +[9] Kirill Gavrilyuk, Amir Ghodrati, Zhenyang Li, and Cees G. M. Snoek. Actor and action video segmentation from a sentence. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 5958-5966. IEEE Computer Society, 2018. 2, 3 +[10] Lieke Gelderloos and Grzegorz Chrupala. From phonemes to images: levels of representation in a recurrent neural model + +of visually-grounded language learning. In COLING 2016, 26th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, December 11-16, 2016, Osaka, Japan, pages 1309-1319. ACL, 2016. 2, 3 +[11] David Harwath and James R. Glass. Towards visually grounded sub-word speech unit discovery. In IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2019, Brighton, United Kingdom, May 12-17, 2019, pages 3017-3021. IEEE, 2019. 2, 3 +[12] David Harwath, Wei-Ning Hsu, and James R. Glass. Learning hierarchical discrete linguistic units from visually-grounded speech. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. 2, 3 +[13] David Harwath, Adrià Recasens, Dídac Surís, Galen Chuang, Antonio Torralba, and James R. Glass. Jointly discovering visual objects and spoken words from raw sensory input. Int. J. Comput. Vis., 128(3):620-641, 2020. 2 +[14] David F. Harwath and James R. Glass. Deep multimodal semantic embeddings for speech and images. In 2015 IEEE Workshop on Automatic Speech Recognition and Understanding, ASRU 2015, Scottsdale, AZ, USA, December 13-17, 2015, pages 237-244. IEEE, 2015. 2 +[15] William N. Havard, Jean-Pierre Chevrot, and Laurent Besacier. Word recognition, competition, and activation in a model of visually grounded speech. In Proceedings of the 23rd Conference on Computational Natural Language Learning, CoNLL 2019, Hong Kong, China, November 3-4, 2019, pages 339-348. Association for Computational Linguistics, 2019. 3 +[16] 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 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 770-778. IEEE Computer Society, 2016. 3 +[17] Bertrand Higy, Lieke Gelderloos, Afra Alishahi, and Grzegorz Chrupala. Discrete representations in neural models of spoken language. CoRR, abs/2105.05582, 2021. 3 +[18] Ronghang Hu, Marcus Rohrbach, and Trevor Darrell. Segmentation from natural language expressions. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part I, volume 9905 of Lecture Notes in Computer Science, pages 108-124. Springer, 2016. 1, 2 +[19] Ronghang Hu, Marcus Rohrbach, Subhashini Venugopalan, and Trevor Darrell. Utilizing large scale vision and text datasets for image segmentation from referring expressions. CoRR, abs/1608.08305, 2016. 1, 2 +[20] Zhiwei Hu, Guang Feng, Jiayu Sun, Lihe Zhang, and Huchuan Lu. Bi-directional relationship inferring network for referring image segmentation. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 4423-4432. IEEE, 2020. 2 +[21] Shaofei Huang, Tianrui Hui, Si Liu, Guanbin Li, Yunchao Wei, Jizhong Han, Luoqi Liu, and Bo Li. Referring image + +segmentation via cross-modal progressive comprehension. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10485-10494. IEEE, 2020. 2 +[22] Gabriel Ilharco, Yuan Zhang, and Jason Baldridge. Large-scale representation learning from visually grounded untranscribed speech. In Proceedings of the 23rd Conference on Computational Natural Language Learning, CoNLL 2019, Hong Kong, China, November 3-4, 2019, pages 55-65. Association for Computational Linguistics, 2019. 2 +[23] Hueihan Jhuang, Juergen Gall, Silvia Zuffi, Cordelia Schmid, and Michael J. Black. Towards understanding action recognition. In IEEE International Conference on Computer Vision, ICCV 2013, Sydney, Australia, December 1-8, 2013, pages 3192-3199. IEEE Computer Society, 2013. 3 +[24] Ya Jing, Tao Kong, Wei Wang, Liang Wang, Lei Li, and Tieniu Tan. Locate then segment: A strong pipeline for referring image segmentation. CoRR, abs/2103.16284, 2021. 2 +[25] Kevin Kaergaard, Søren Hjøllund Jensen, and Sadasivan Puthusserypady. A comprehensive performance analysis of EEMD-BLMS and DWT-NN hybrid algorithms for ECG denoising. Biomed. Signal Process. Control., 25:178-187, 2016. 2 +[26] Herman Kamper and Michael Roth. Visually grounded cross-lingual keyword spotting in speech. In Shyam S. Agrawal, editor, 6th Intl. Workshop on Spoken Language Technologies for Under-Resourced Languages, SLTU 2018, 29-31 August 2018, Gurugram, India, pages 253-257. ISCA, 2018. 2 +[27] Herman Kamper, Shane Settle, Gregory Shakhnarovich, and Karen Livescu. Visually grounded learning of keyword prediction from untranscribed speech. In Francisco Lacerda, editor, *Interspeech* 2017, 18th Annual Conference of the International Speech Communication Association, Stockholm, Sweden, August 20-24, 2017, pages 3677-3681. ISCA, 2017. 2 +[28] Anna Khoreva, Anna Rohrbach, and Bernt Schiele. Video object segmentation with language referring expressions. In Computer Vision - ACCV 2018 - 14th Asian Conference on Computer Vision, Perth, Australia, December 2-6, 2018, Revised Selected Papers, Part IV, volume 11364 of Lecture Notes in Computer Science, pages 123-141. Springer, 2018. 2 +[29] Salim Lahmiri and Mounir Boukadoum. Physiological signal denoising with variational mode decomposition and weighted reconstruction after DWT thresholding. In 2015 IEEE International Symposium on Circuits and Systems, ISCAS 2015, Lisbon, Portugal, May 24-27, 2015, pages 806-809. IEEE, 2015. 2, 3 +[30] James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, and Santiago Ontañón. Fnet: Mixing tokens with fourier transforms. CoRR, abs/2105.03824, 2021. 2, 3, 4, 6, 7 +[31] Ruiyu Li, Kai-Can Li, Yi-Chun Kuo, Michelle Shu, Xiaojuan Qi, Xiaoyong Shen, and Jiaya Jia. Referring image segmentation via recurrent refinement networks. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 5745-5753. IEEE Computer Society, 2018. 1, 2 + +[32] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. IEEE Trans. Pattern Anal. Mach. Intell., 42(2):318-327, 2020. 6 +[33] Chenxi Liu, Zhe Lin, Xiaohui Shen, Jimei Yang, Xin Lu, and Alan L. Yuille. Recurrent multimodal interaction for referring image segmentation. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 1280-1289. IEEE Computer Society, 2017. 1, 2 +[34] Gen Luo, Yiyi Zhou, Xiaoshuai Sun, Liujuan Cao, Chenglin Wu, Cheng Deng, and Rongrong Ji. Multi-task collaborative network for joint referring expression comprehension and segmentation. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10031-10040. IEEE, 2020. 2 +[35] Edgar Margffoy-Tuay, Juan C. Pérez, Emilio Botero, and Pablo Arbeláez. Dynamic multimodal instance segmentation guided by natural language queries. In Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part XI, volume 11215 of Lecture Notes in Computer Science, pages 656-672. Springer, 2018. 1, 2 +[36] Fausto Milletari, Nassir Navab, and Seyed-Ahmad Ahmadi. V-net: Fully convolutional neural networks for volumetric medical image segmentation. In Fourth International Conference on 3D Vision, 3DV 2016, Stanford, CA, USA, October 25-28, 2016, pages 565-571. IEEE Computer Society, 2016. 6 +[37] P. P. Mini, Tessamma Thomas, and R. Gopikakumari. EEG based direct speech BCI system using a fusion of SMRT and MFCC/LPCC features with ANN classifier. Biomed. Signal Process. Control., 68:102625, 2021. 4 +[38] Ke Ning, Lingxi Xie, Fei Wu, and Qi Tian. Polar relative positional encoding for video-language segmentation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pages 948-954. ijcai.org, 2020. 2, 6, 7 +[39] Yasunori Ohishi, Akisato Kimura, Takahito Kawanishi, Kunio Kashino, David Harwath, and James R. Glass. Trilingual semantic embeddings of visually grounded speech with self-attention mechanisms. In 2020 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2020, Barcelona, Spain, May 4-8, 2020, pages 4352-4356. IEEE, 2020. 2 +[40] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams, Luc Van Gool, Markus H. Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 724-732. IEEE Computer Society, 2016. 6 +[41] Shuang Qiu, Yao Zhao, Jianbo Jiao, Yunchao Wei, and Shikui Wei. Referring image segmentation by generative adversarial learning. IEEE Trans. Multim., 22(5):1333-1344, 2020. 2 +[42] V. J. Rehma and M. K. Jeya Kumar. Wavelet based image coding schemes: A recent survey. CoRR, abs/1209.2515, 2012.8 + +[43] Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian D. Reid, and Silvio Savarese. Generalized intersection over union: A metric and a loss for bounding box regression. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 658-666. Computer Vision Foundation / IEEE, 2019. 6 +[44] Ramon Sanabria, Austin Waters, and Jason Baldridge. Talk, don't write: A study of direct speech-based image retrieval. CoRR, abs/2104.01894, 2021. 1, 2, 3, 4 +[45] Gayatri Saripalli, Priyank H. Prajapati, and Anand D. Darji. CSD optimized DWT filter for ECG denoising. In 2020 24th International Symposium on VLSI Design and Test (VDAT), Bhubaneswar, India, July 23-25, 2020, pages 1-6. IEEE, 2020. 2 +[46] Steffen Schneider, Alexei Baevski, Ronan Collobert, and Michael Auli. wav2vec: Unsupervised pre-training for speech recognition. In Gernot Kubin and Zdravko Kacic, editors, Interspeech 2019, 20th Annual Conference of the International Speech Communication Association, Graz, Austria, 15-19 September 2019, pages 3465-3469. ISCA, 2019. 2 +[47] Sebastiaan Scholten, Danny Merkx, and Odette Scharenborg. Learning to recognise words using visually grounded speech. In IEEE International Symposium on Circuits and Systems, ISCAS 2021, Daegu, South Korea, May 22-28, 2021, pages 1-5. IEEE, 2021. 3 +[48] Seonguk Seo, Joon-Young Lee, and Bohyung Han. URVOS: unified referring video object segmentation network with a large-scale benchmark. In Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XV, volume 12360 of Lecture Notes in Computer Science, pages 208-223. Springer, 2020. 3, 6, 7 +[49] Hengcan Shi, Hongliang Li, Fanman Meng, and Qingbo Wu. Key-word-aware network for referring expression image segmentation. In Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part VI, volume 11210 of Lecture Notes in Computer Science, pages 38-54. Springer, 2018. 1, 2 +[50] Hengcan Shi, Hongliang Li, Qingbo Wu, and King Ngi Ngan. Query reconstruction network for referring expression image segmentation. IEEE Trans. Multim., 23:995-1007, 2021. 1, 2 +[51] Yao-Hung Hubert Tsai, Shaojie Bai, Paul Pu Liang, J. Zico Kolter, Louis-Philippe Morency, and Ruslan Salakhutdinov. Multimodal transformer for unaligned multimodal language sequences. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 6558-6569. Association for Computational Linguistics, 2019. 2, 5, 6, 7 +[52] Naveed ur Rehman, Ubaid ur Rehman, Syed Zain Abbas, Anum Asif, and Anum Javed. Translation invariant DWT based denoising using goodness of fit test. In IEEE Statistical Signal Processing Workshop, SSP 2016, Palma de Mallorca, Spain, June 26-29, 2016, pages 1-5. IEEE, 2016. 2 + +[53] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998-6008, 2017. 4, 5 +[54] Hao Wang, Cheng Deng, Fan Ma, and Yi Yang. Context modulated dynamic networks for actor and action video segmentation with language queries. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 12152-12159. AAAI Press, 2020. 2 +[55] Hao Wang, Cheng Deng, Junchi Yan, and Dacheng Tao. Asymmetric cross-guided attention network for actor and action video segmentation from natural language query. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 3938-3947. IEEE, 2019. 2 +[56] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 8741-8750. Computer Vision Foundation / IEEE, 2021. 4, 6, 7 +[57] Yuxin Wu and Kaiming He. Group normalization. Int. J. Comput. Vis., 128(3):742-755, 2020. 4, 7 +[58] Chenliang Xu, Shao-Hang Hsieh, Caiming Xiong, and Jason J. Corso. Can humans fly? action understanding with multiple classes of actors. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, Boston, MA, USA, June 7-12, 2015, pages 2264-2273. IEEE Computer Society, 2015. 3 +[59] Linjie Yang, Yuchen Fan, and Ning Xu. Video instance segmentation. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 5187-5196. IEEE, 2019. 7 +[60] Xue Yang, Xiaojiang Yang, Jirui Yang, Qi Ming, Wentao Wang, Qi Tian, and Junchi Yan. Learning high-precision bounding box for rotated object detection via kullback-leibler divergence. CoRR, abs/2106.01883, 2021. 6 +[61] Linwei Ye, Mrigank Rochan, Zhi Liu, and Yang Wang. Cross-modal self-attention network for referring image segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 10502-10511. Computer Vision Foundation / IEEE, 2019. 1, 2 +[62] Linwei Ye, Mrigank Rochan, Zhi Liu, Xiaqin Zhang, and Yang Wang. Referring segmentation in images and videos with cross-modal self-attention network. CoRR, abs/2102.04762, 2021. 2 +[63] 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 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 1307-1315. IEEE Computer Society, 2018. 1, 2 \ No newline at end of file diff --git a/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/images.zip b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7b0e83c61bb52a4bbf73ad5e3d07bb1bd043ad95 --- /dev/null +++ b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d05475069a5bd862547bd2e7d4c885925e4d67d3c4271882328b76426eea606 +size 535356 diff --git a/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/layout.json b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4986af98d03cf0ae56da0c31924b8d52195287a4 --- /dev/null +++ b/wnetaudioguidedvideoobjectsegmentationviawaveletbasedcrossmodaldenoisingnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:269b9012b3cd6c095809ec60c2757a9758c8ca9f0fb4f18ab3ca92d77fd38e30 +size 450162 diff --git a/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_content_list.json b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8f2984c1bc5f4bee93f85e9841282893b9c9bbc4 --- /dev/null +++ b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b44e94e7fd78900587187fd75b6dec6aecb0d244801c9a8be866339a939f6862 +size 67434 diff --git a/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_model.json b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d9c4237026c32ff9afff056688cc1fef8cd9deda --- /dev/null +++ b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99c233e848d2b7a184b15b8b86ce4ffa9b5871ea85524b844160750b37a08569 +size 83541 diff --git a/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_origin.pdf b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2788c4111ac18bc73389c4492ccbf08d29332279 --- /dev/null +++ b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/b2fb843b-df43-4a90-862b-8ceb1c0cad18_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:662ad5376c97e827bc39e69d53fbf206db05c00515515728071cc2cae3915ef3 +size 1721698 diff --git a/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/full.md b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8f8a5bbf71f13c52b28aa75931db58dc536d9589 --- /dev/null +++ b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/full.md @@ -0,0 +1,240 @@ +# XMP-Font: Self-Supervised Cross-Modality Pre-training for Few-Shot Font Generation + +![](images/6adce2d4f002e66cc752bd81ff9a112683734ae334cf5dedd4012c38ad678a83.jpg) + +![](images/f4c9f929fa73a80c010b12685c2a6d1e1954367ef5c844dbf7927e1400bdf919.jpg) +Figure 1. (a) Illustrations of different Chinese font styles. Typically, a font style involves unique morphological structures of a character at multiple scales. For example, stroke-level styles involve stroke-level features such as weight, hollowness and serif-ness. Component-level styles implies how strokes are oriented and joined to form a component. Character-level styles engage character-level features including the component layout, inter-component spacing and "connected-stroke". (b) Exemplar few-shot font generation results of our method. Please note that each row presents a disparate font style by using only one glyph as reference. In addition, our model generates faithful and consistent results regardless of the type of the source font or the reference variant. + +# Abstract + +Generating a new font library is a very labor-intensive and time-consuming job for glyph-rich scripts. Few-shot font generation is thus required, as it requires only a few glyph references without fine-tuning during test. Existing methods follow the style-content disentanglement paradigm and expect novel fonts to be produced by combining the style codes of the reference glyphs and the content representations of the source. However, these few-shot font generation methods either fail to capture content-independent style representations, or employ localized component-wise style representations, which is insufficient to model many Chinese font styles that involve hyper-component features such as inter-component spacing and "connected-stroke". To resolve these drawbacks and make the style representations more reliable, we propose a self-supervised cross-modality pre-training strategy and a cross-modality transformer-based encoder that is conditioned jointly on the glyph image + +and the corresponding stroke labels. The cross-modality encoder is pre-trained in a self-supervised manner to allow effective capture of cross- and intra-modality correlations, which facilitates the content-style disentanglement and modeling style representations of all scales (stroke-level, component-level and character-level). The pretrained encoder is then applied to the downstream font generation task without fine-tuning. Experimental comparisons of our method with state-of-the-art methods demonstrate our method successfully transfers styles of all scales. In addition, it only requires one reference glyph and achieves the lowest rate of bad cases in the few-shot font generation task (28% lower than the second best). + +# 1. Introduction + +The few-shot font generation task (FFG) aims to produce a new font library using only a few glyphs as reference, without additional fine-tuning of the model at the testing stage. FFG is especially a desirable task when designing a new font library for glyph-rich scripts such as Chinese + +(the total number of characters exceeds 80,000), as the traditional manual font design process is very laborious. FFG is also desired when the target style glyphs are too rare to collect (e.g., historical handwriting). + +Since font styles are highly complex and fine-grained, a simple analysis of the low-level textures of a few reference examples is impossible to perform successful style transfer as in [11, 16, 24, 25, 28]. A common paradigm used for FFG is to disentangle font-specific style and content information from the given glyphs, and synthesize a new glyph by combining the style embeddings extracted from the reference set and the content representations of the source glyph [2, 3, 9, 22, 29, 30, 33, 35, 41, 45]. Early attempts of this stream [9, 45] employ the universal style representations, using a simple convolutional encoder to extract style embeddings directly from the reference glyph images. However, the universal style representations show limited capabilities in capturing reliable and content-independent style representations due to limited awareness of the character structures and correlations between different regions of the input glyph. More advanced architectures such as DM-Font [3], LF-Font [29], MX-Font [30] propose to use structure-aware style representations and learn the localized component-wise style representations. + +To make the localized style representation possible, these methods either condition the style encoders jointly upon the glyph image and the corresponding component labels or introduce component-label-guided losses to train the style encoder. The structure-aware localized style representations remarkably improve the reliability of the style representations. However, as mentioned in [29], learning component-wise styles solely is insufficient for component-rich glyphs like Chinese characters that have over 200 different types of components. It is hard to cover all component types with a few reference glyphs during test. To relieve this problem, LF-Font [29] simplifies the component-wise styles by a product of component factor and style factor, inspired by low-rank matrix factorization. MX-Font [30] extracts multiple style features not explicitly conditioned on component labels, but automatically by multiple experts to represent different local concepts, thus enabling the model to be generalized to a character with unseen components. + +Such solutions relieve the "unseen components" issue to some extent. However, they are prone to generating bad cases when failing to generalize the unseen component styles from seen components. On the other hand, component-wise style representations are incapable of capturing character-level style features (e.g., inter-component spacing), which is an important perspective in many Chinese font libraries: see Figure 1 (a) for the Chinese font styles of all three scales. + +To address these issues, we make two significant changes. First, we employ the stroke labels rather than the + +component labels as the atomic representation of character structure, as the stroke set used in Chinese is significantly fewer (about 28) than that of the component set (more than 200), which can be easier to cover with a few reference glyphs or generalized from seen strokes. On the other hand, to enhance the awareness of the stroke-level styles while not losing component-level or character-level style features, we propose to use the unified all-scale style representations instead of the localized component- or stroke-wise styles. This can be achieved by introducing a cross-modality transformer-based encoder that is conditioned jointly on the glyph image and the corresponding stroke labels. On one hand, the self-attention layers used in the encoder is good at capturing both local and global style features. On the other hand, the self-supervised pretraining of the cross-modality encoder inspires the learning the glyph-stroke alignments, which further facilitates the content-style disentanglement and modeling of style representations at multiple scales in the downstream training phase. + +In addition to the cross-modality pre-training mechanism, we propose a LSTM-based stroke loss and a style-content decoupling network which considers spatial information conservation, to enhance the reliability of the model further. Comprehensive analyses of the experimental results demonstrate our method achieves significantly lower rate of bad cases than prior FFG methods and it can successfully generate novel glyphs based on only one reference example. + +To sum up, the major contributions of the paper include: + +- For the first time, we introduce the cross-modality transformer-based encoder and the mechanism of cross-modality pre-training to the FFG task. The self- and cross-attention layers in the transformer-based encoder pre-trained with self-supervised signals help capture local and global style features (stroke-level, component-level and character-level features) and learn the glyph-stroke alignments, thus enhancing the structure-awareness of style representations and facilitating the style-content disentanglement in the downstream FFG task. +- We elaborate a style-content decoupling network composed of Efficient Channel Attention (ECA) modules [31], and employ an $8 \times 8$ feature map instead of a simple average-pooled vector to represent styles or contents with the expect to conserve spatial information, which prove to be effective in increasing the reliability of the model. +- We also propose a novel stroke loss based on a pretrained LSTM-based stroke order predictor, to enforce the correct stroke order of the generated glyph instead of the existence of stroke labels only, which + +proves to benefit the structure preservation and faithful generation of stroke-order-related style features (e.g., "connected-stroke"). + +- Experimental results see powerful generalizability of our model to unseen font domains. Our model can perform successful font style transfer with only one reference glyph. + +# 2. Related work + +# 2.1. Image-to-image translation + +Image-to-image translation methods [5, 6, 18, 26, 27, 42, 42, 46] that learn the mapping between domains can be used for cross-domain font generation. For example, StarGAN-v2 [6] proposes to do image-to-image translation across multiple-domain in a unified framework. FUNIT [27] aims to translate an image to the given reference style while preserving the content without fine-tuning the model during test, which can be used for the FFG task. In this paper, we have our method compared with StarGAN-v2 as for generating glyphs of seen font domains, and also compared with FUNIT on both seen and unseen font domains. + +# 2.2. Many-shot font generation methods + +Early font generation methods [10, 17, 19, 37, 40] train the cross-domain translators between different font styles. Some font generation methods [10, 17, 19, 40] train a translation model first, and fine-tune the translation model with many reference glyphs of the target style. For example, hundreds of reference glyphs in the target domain are used in [19]. Despite their remarkable performances, their scenario is very limited because collecting hundreds of glyphs with a coherent style can be very expensive. In this paper, we aim to generate an unseen font library without any expensive fine-tuning or collecting a large number of reference glyphs for that style. + +# 2.3. Cross-modality pre-training + +Cross-modality pre-training [4, 21, 23, 32, 36, 43, 44] is widely used in visual-linguistic tasks such as image-text matching [4, 32, 36], visual question answering [4, 23, 34, 36], image captioning [44], etc. Cross-modality tasks require the understanding of both modalities, and the alignment and relationships between the two modalities. The pre-training enables the encoder to produce representations with fused cross-modality information, thus benefiting downstream tasks. Motivated by the concept, we introduce such mechanisms to the font generation tasks. The framework to learn vision-and-language connections is adapted to the glyph-stroke correlation learning, with the expect to increase the structure-awareness of style encoding. In cross-modality pre-training, we build a transformer model that + +consists of three encoders: a glyph processing module, a stroke processing encoder, and a cross-modality module. Next, to endow our model with the capability of connecting a glyph image and its related stroke labels, we pre-train the model with large amounts of glyph-stroke pairs, via self-supervised signals (reconstruction of the input data). This task helps in learning both intra-modality and cross-modality relationships. + +# 3. Method + +# 3.1. Overall pipeline + +As shown in Figure 2 (top), the encoder takes two modalities as input: the glyph image of specific style and a sequence of stroke labels representing the corresponding character structure of the glyph. The encoder processes the two modalities separately with two single-modality modules before they are joined with a cross-modality module. In the pre-training stage, the encoder is followed by a convolutional decoder and stroke label predictor, and is designated for self-supervised representation learning (i.e., trained to reconstruct the inputs). + +In the second stage, the cross-modality encoder is frozen and used for the downstream task: see Figure 2 (bottom). In this stage, we follow the style-content disentanglement paradigm and synthesize novel fonts by combining the style features of the reference glyphs and the content embeddings of the source glyphs. The cross-modality encoder is appended with a decoupling network that aims to decouple the style and content representations from the fused cross-modality representations, which is further followed by a convolutional decoder that is designated to generate novel fonts by taking the style representations of the reference and the content representations of the source as input. + +In the following sections, more detailed descriptions of the sub-modules and training methodologies are presented. + +# 3.2. Cross-modality encoder + +As shown in Figure 2, the cross-modality encoder is made up of two input embedding modules, two single-modality modules and the cross-modality module. The input embedding module converts the input data (glyph and stroke labels) into embeddings sequences. Then, the single-modality module processes each modality separately before they are joined with the cross-modality module. Next, we describe the sub-modules of this cross-modality encoder in detail. + +Input embedding module The input embedding module converts the input data (i.e., a glyph image and a stroke label sequence) into two separate embedding sequences (glyph embeddings and stroke embeddings). The stroke embedding sequence consists of 28 stroke embeddings that ar + +![](images/996c4c97e9bde9aaee3970dbdefcb5fb06c0de38a3557873b62f34c1c59b4726.jpg) + +![](images/f40ccfff3df0652e284b0a0ec36491f000daaf8ac8e57bd3e9f73652a2b662ac.jpg) +Figure 2. The framework of the proposed XMP-Font model. Our approach consists of the pre-trining phase and the downstream font generation phase. The cross-modality encoder is shared in both phases. + +ranged in the stroke order. Note that 28 is the maximum number of strokes forming a commonly-used Chinese character, and the stroke order of each Chinese character is unambiguously determined as strokes are typically arranged based on their spatial coordinates, i.e., from left to right and from top to bottom. The stroke order inputs contain the spatial information, which is also beneficial to improve the final result, especially for the deformation of structure and correct generation of "connected-stroke". Each stroke embedding is a sum of three different embeddings: the stroke label embedding, position embedding and modality type embedding. In detail, the label embedding is a 512-dimensional (512-d) vector mapped from the stroke label with an embedding sub-layer. Similarly, the position index (from 0 to 29) of a stroke is projected to a 512-d position embedding with a position embedding sub-layer, and the modality label (0 for stroke and 1 for glyph image) is projected to a 512-d modality type embedding with a modality type embedding sub-layer. Thus, we obtain a 30-embedding sequence for the stroke modality. + +On the other hand, the input glyph image of size $256 \times 256 \times 3$ is mapped to a feature map of size $8 \times 8 \times 512$ with a 5-layer convolutional encoder. The feature map is further flattened to a sequence of 64 512-d embeddings, in which + +each embedding corresponds to a specific spatial coordinate. Similarly, the position embedding and the modality type embedding of each spatial coordinate are mapped from the x-y coordinate and the modality label respectively with separate embedding sub-layers. The glyph embedding is a sum of the position embedding, modality type embedding and feature embedding. Thus, we obtain a 64-embedding sequence for the glyph modality. + +Note that the inclusion of positional information is necessary for the pre-training and font generation task, because the following transformer layers are agnostic to the absolute indices of their inputs as the order of the stroke or image embeddings is not specified. + +Self- and cross-attention layers We build our single- and cross-modality processing modules mostly on the basis of self-attention layers and cross-attention layers [38]. After the input embedding module, we obtain two embedding sequences each representing a specific modality. We first apply two single-modality modules, i.e., 9 BERT [8] layers to process stroke information and 5 BERT layers for glyph processing. + +Each cross-modality layer in the cross-modality module consists of two self-attention sub-layers [38], one bi + +directional cross-attention sub-layer [36], and two feedforward sub-layers. We stack these cross-modality layers in our implementation. The bi-directional cross-attention sublayer contains two unidirectional cross-attention sub-layers: one from stroke to glyph and one from glyph to stroke. Note that the query and context vectors are the outputs of the former layer (i.e., stroke features and glyph features). The cross-attention sub-layer is used to exchange the information and align the entities between the two modalities in order to learn joint cross-modality representations. For further building internal connections, the self-attention sub-layers are then applied to the output of the cross-attention sub-layer. Lastly, the final output is produced by feed-forward sub-layers. We also add a residual connection and layer normalization after each sub-layer. + +# 3.3. Pre-training strategy + +In order to learn a better initialization which understands connections between the glyph image and its related stroke labels, we pre-train the cross-modality encoder with a pretraining task on a large font library dataset. As shown in Figure 2 (top), to ensure effective interaction between the two modalities, during the training phase, there is a probability of 0.375 that all input stroke labels are masked. In the remaining cases, each stroke has a probability of 0.5 to be masked. We attach the encoder with a stroke prediction head consisting of two fully-connected layers. The embedding sequence of the stroke modality is directly mapped to the stroke labels. In addition to where masked strokes are predicted from the non-masked strokes in the stroke label modality, our model could predict masked strokes from the glyph modality as well, so as to resolve ambiguity. For example, as shown in Figure 2 (top), it is hard to determine the masked stroke from its stroke context but the stroke choice is clear if the visual information is considered. Hence, it helps building connections from the glyph modality to the stroke modality, and we refer to this task as stroke reconstruction task. We perform the task of learning the labels of masked strokes with cross-entropy loss. We also attach the encoder with a convolutional decoder with the expect to reconstruct the glyph image. The 64-embedding sequence of the glyph modality is reshaped to an $8 \times 8$ feature map, and then decoded into an image with the decoder. Further, L1 loss contrasting the input glyph and the output image is used to ensure that there is no loss of information. + +We aggregate a large aligned glyph-stroke dataset from Founder font libraries [7] in the pre-training phase, which consists of 100 different fonts. We pre-train all parameters from scratch (xavier initialization [12]). Our model is pretrained with two losses: the glyph reconstruction loss (L1 loss) and the stroke classification loss. We add these losses with equal weights as in Eq. 1. We take Adam [20] as the optimizer with a linear-decayed learning-rate schedule and + +a peak learning rate at $1e - 4$ . We train the model for 30 epochs (i.e., roughly 4,000,000 optimization steps) with a batch size of 4. + +$$ +L ^ {p r e} = \sum_ {i = 1} ^ {L} B C E \left(\hat {s} _ {i}, s _ {i}\right) + | \hat {I} - I | \tag {1} +$$ + +where $I$ is the predicted glyph and $\hat{I}$ is the ground-truth glyph. $s_i, \hat{s}_i$ ( $i \in \{1, 2, \dots, L\}$ ) are the predicted and the ground-truth stroke labels. + +# 3.4. Downstream task of few-shot font generation + +Model architecture Once the encoder is pre-trained, we freeze the parameters and use it for the font generation task. For the downstream task, the encoder is attached to a decoupling network which is made up of 4 Efficient Channel Attention (ECA) modules [31] to adaptively rescale channel-wise features and disentangle the style and content representations. The output of the decoupling network is an $8 \times 8 \times 512$ feature map, which is split into two $8 \times 8 \times 256$ feature maps. The first split feature map is designated as the style representation and the latter is treated as the content representation. Combining the content representation of the source and style representation of the reference to generate a glyph that represent the source character with the reference style. We employ $8 \times 8$ feature map instead of a latent vector to preserve richer spatial information. + +From the aligned glyph-stroke dataset [7], we only use 30 font libraries and 6741 characters from each library in this phase, which are all covered in the pre-training. We train all parameters of the decoupling network and the glyph decoder while holding the encoder parameters frozen. The font generation model is trained with three losses: adversarial loss, reconstruction loss and stroke loss. The adversarial loss encourages generation of valid glyph images by using a discriminator discriminating the generated from ground-truth glyphs [13]. The reconstruction loss is the L1 difference between the generated glyph and the exact ground-truth (a glyph of target style and source character). As for the stroke loss, we pre-train an LSTM-based [15] stroke predictor, which is able to predict the stroke labels sequentially in the correct order given a glyph image as input: see Figure 3 for details. Then we use the predictor to compute the stroke loss. Instead of using the predicted labels directly, we employ the activations of the second last LSTM layer and compute the feature differences between the generated and the ground-truth glyph. We add these losses with equal weights as in Eq. 2. We take Adam [20] as the optimizer with a linear-decayed learning-rate schedule and a peak learning rate at $1e - 4$ . Like in the pre-training phase, we train the model for 30 epochs (i.e., roughly 5,000,000 optimization steps) with a batch size of 4. + +![](images/b829dde612c20114b277e9b156f54fb526020f1bfd0b0b4cdb0fab6ef1705ea7.jpg) +Figure 3. The LSTM-based stroke predictor, which is pre-trained for stroke order prediction before used to compute the stroke loss. + +$$ +L ^ {f g} = \operatorname {L o s s} _ {a d v} + | \hat {I} - I | + | L S T M (\hat {I}) - L S T M (I) | \tag {2} +$$ + +where $I, \hat{I}$ are the predicted and the ground-truth glyphs. $LSTM(*)$ is the activations of the second last layer of LSTM-based stroke order predictor, while $Loss_{adv}$ is as the same as WGAN-GP [1]. + +# 4. Experimental Results + +Our model is implemented with PyTorch 1.7 and is trained on a NVIDIA Tesla V100. The pre-training takes 2-3 days and the second-phase training costs 6 days. + +We evaluate the state-of-the-art FFG methods and ours on seen and unseen font domains to measure the generalizability of the models. Our method is compared with five font generation methods on the FFG benchmark, in both the qualitative and quantitative settings. Experimental results demonstrate that XMP-Font achieves the lowest failure rate on both seen and unseen domains. The ablation and analysis study helps understand the role and effects of pre-training strategy, the use of stroke loss and other techniques. + +# 4.1. Comparisons + +We compared our XMP-Font with two image-to-image translation methods (StarGAN v2 [6] and FUNIT [27]) and three FFG methods (LF-Font [29], MX-Font [30] and DG-Font [41]). StarGAN v2 and FUNIT are not directly proposed for the font generation task, but the universal image-to-image translation paradigm can be applied to the font generation task as well. While [6] only supports translation of glyphs across seen domains, [27] can be applicable to translations between unseen domains. + +To show the generalizability to the unseen style domains, we propose to do the evaluations in the following FFG scenario; training a FFG model on 100 font style domains [7], and evaluating the model on both seen and unseen style domains by using only one glyph image as reference. As the stroke labels is independent to font style, stroke labels for all 6741 characters are provided. + +Due to the style of the font domain is defined by appearance features of multiple scales, measuring the visual quality with a unified metric is a challenging problem. As mentioned in MX-Font [30], the multiplicity of the font styles + +
ModelFew ShotFID ↓PSNR ↑SSIM ↑L1 ↓Users ↑
Seen Fonts
FUNITYes147.198.980.706929.380.2667
LF-FontYes58.909.780.731225.050.3725
DG-FontYes73.499.730.743325.260.5759
MX-FontYes66.049.100.696330.050.7220
StarganNo35.249.820.733626.640.7974
OursYes31.1412.940.797219.290.9249
Unseen Fonts
FUNITYes173.308.450.680532.180.1060
LF-FontYes86.339.350.705827.630.3185
DG-FontYes53.049.330.720926.830.5220
MX-FontYes135.438.770.681026.170.5906
OursYes36.8012.050.790318.780.8748
+ +Table 1. Quantitative evaluations of our XMP-Font and competitors. The reported values are the average of the whole datasets, where only one reference images per style is used for font generation in each experiment. + +raises the issue when multiple "ground-truths" are satisfying and only one "ground-truth" glyph is present in the evaluation dataset. Thus, in addition to ground-truth-based metrics (SSIM [39], PSNR and L1), we also use evaluation metrics that does not require paired ground truths (FID [14]). + +Other than the objective metrics, we conduct a user study for quantifying the subjective quality. The participants are asked to pick the acceptable cases considering the success of style transfer and correctness of the character structure. Failure of either the content or the style is considered unsuccessful. We randomly select 10 seen font styles and 10 unseen font styles, and 30 characters of each style are generated with each model. Therefore, 3300 samples are generated ( $10 \times 30 \times 6 = 1800$ for seen domains and $10 \times 30 \times 5 = 1500$ samples for unseen domains as StarGAN-v2 does not work for unseen domains). The generated samples of the same style and the same character (by different models though) are put together and shown to a participant at a time. The src glyph and a few glyphs of target styles are also shown to the participant in the meantime to facilitate the rating. After all trials finish, the ratings of all participants are collected and analyzed, as presented in Table 1. We observe that XMP-Font outperforms other methods in both seen and unseen font generation scenario for most evaluation metrics. In the unseen-domain scenario, ours exceeds others in all metrics by large margin. Especially, our method achieves a remarkably $28\%$ higher success rate on unseen font domains over the second best. + +We illustrated the generated samples in Figure 4. We show the source images in the top row and the corresponding stylize transfer results in the below. In Figure 4, we + +![](images/df1491593203b8d6308f27137c43afa9c8ec6eaab8d253844b1a053f88b11a8d.jpg) +Figure 4. Visual comparisons of our XMP-Font with other state-of-the-art methods on famous Chinese poems. The red boxes highlight failures of structure preservation, and blue boxes highlight failures of style transfer. + +![](images/7d8e3297a3afd3ae2713bd1c5e06c48a80261c3f1ed2bdb4b7b5b792be675326.jpg) +Figure 5. Comparisons of our XMP-Font with LF-Font [29] and MX-Font [30] in terms of cursive font generation. The glyph details highlighted with the blue boxes and red boxes reveal the noticeable gap between the other two models and ours. + +observe that FUNIT [27] generates the worst results, as it often fails to preserve the character structure of the source (severe loss of strokes or components) and generates unrecognizable glyphs. LF-Font [29] performs well for some test styles, while its performance is unstable as they are prone to loss of strokes or distortion of components on certain style domains. At a glance, other methods including DG-Font [41], StarGAN-v2 [6], MX-Font [30] and ours seem to preserve the character structure well. However, DG-Font [41] fails to perform style transfer especially when the source style significantly differs from the target. StarGAN-v2 [6] can only do transfer of seen styles, while it occasionally generates unpleasant stroke paddings as highlighted with the red boxes in Figure 4. MX-Font and ours synthesize better detailed structures both in content and style, while there + +is more chance that MX-Font fails to generate fine-grained style features. + +As shown in Figure 5, the blue and red boxes highlight the failure of LF-Font [29] and MX-Font [30] in terms of the generation of stroke-level styles (e.g., selfness), component- and character-level styles (e.g., connected-stroke and inter-component spacing). The advantage of our XMP-Font is highlighted with more successful transfer of styles of all scales. XMP-Font preserves both the detailed local style and fine-grained global styles and generates the plausible and recognizable images consistently. Such a noticeable gap in visual quality explains the large performance leap of XMP-Font in the user study. + +# 4.2. Ablation studies + +Pre-training strategies To show the effectiveness of the pre-training strategy used in our approach, we did three experiments. In Experiment A, the cross-modality encoder is not pre-trained and it is directly trained for the downstream task from scratch. In Experiment B, we pre-train the encoder first and in the second-stage training we only fine-tune the encoder with smaller learning rate $(10^{-6})$ . Experiment C is what we use in our approach, namely pre-training the cross-modality encoder first and then keeping it frozen in the second-phase training. Then, we demonstrate the validation losses (stroke loss and reconstruction loss) in Figure + +![](images/b59939b117e8fb78ca4f801779566da3179093aa1db98b403f61d8bdf2ada043.jpg) +Figure 6. The validation losses over optimization steps when using different pre-training strategies. A is the experiment w/o pre-training (the encoder is trained for the downstream task from scratch). B is the experiment with pre-training first and then fine-tuning for the downstream task. C is what is used in our method, namely pre-training the cross-modality encoder first and then keeping it frozen in the second-phase training. + +6. Figure 6 clearly shows that Experiment A and B fail to converge as C does, implying that the pre-training strategy is essential for our architecture. + +Stroke loss and architecture design Further, to verify the effectiveness of the proposed stroke loss and the architecture of the generator, we compare the performances of different experimental settings and architecture designs on the validation benchmark under seen and unseen domain transfer scenarios. In Experiment A, we simply remove the stroke loss during the second-stage training. The results are shown in Table 2 and Figure 7. Table 2 (A) shows that the objective metrics worsen without the use of stroke loss. The visual results in Figure 7 (A) also show that the preservation of character structure becomes worse and the model is less sensitive to the stroke order. + +In Experiment B, we modify the network architecture to adopt smaller glyph feature map ( $4 \times 4$ instead of $8 \times 8$ ). To make this possible, we employ a down-sampling convolutional layer upon the $8 \times 8$ glyph feature map before it is processed with the decoupling network. We observe from Figure 7 (B) that the smaller feature map is prone to loss of fine-grained structure information and stroke-level style features. This is also reflected by the objective metrics in Table 2 (B). However, using a $16 \times 16$ feature map is intractable due to limitation of GPU memory. Therefore, we choose $8 \times 8$ glyph feature representations in the final architecture. + +In Experiment C, we ablate the decoupling network by replacing the ECA modules with a simple convolutional layer. The results in Figure 7 (C) show that content-style disentanglement worsens without the use of the decoupling network, and some results suffer loss of structure informa + +![](images/48a7c27ce409bf2fa6049354af7933a133e87b456da0cbf0d773735e5db2a0b3.jpg) +Figure 7. Qualitative analysis of the proposed techniques and architecture configurations. A is the experiment w/o stroke loss. B refers to the modified generator architecture with glyph feature size $4 \times 4$ instead of $8 \times 8$ . C is the modified generator architecture w/o ECA modules [31]. + +
ModelsABCOurs
SeenFID33.7370.5632.9331.14
PSNR12.2911.5811.9412.95
SSIM0.79330.76890.78100.7972
L119.8521.2521.0719.28
Stroke Loss0.34240.38960.35820.2709
UnseenFID41.6056.5145.4536.80
PSNR11.7310.8111.1512.05
SSIM0.77250.76530.77320.7903
L121.7021.5921.6318.78
Stroke Loss0.36920.48790.42070.3272
+ +Table 2. Quantitative analysis of the proposed techniques. A is the experiment w/o stroke loss. B refers to the modified generator architecture with glyph feature size $4 \times 4$ instead of $8 \times 8$ . C is the modified generator architecture w/o ECA modules [31]. + +tion and incorrect style features. + +# 5. Conclusion + +We proposed the XMP-Font model for few-shot font generation that can generate a novel font library with high success rate by using only one reference glyph from the target domain. Both qualitative and quantitative comparisons with existing methods verify the remarkable advantages of our approach. Our approach significantly boosts the art as it achieves a record-breaking $87.5\%$ success rate for the few-shot font generation task on unseen font domains. + +Nevertheless, a limitation of our model is that it does not support unseen stroke labels, as it explicitly conditions the style and content representations upon the stroke labels. Neither can it be generalized to unseen languages whose characters are composed of a disparate set of stroke genres. + +# References + +[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International conference on machine learning, pages 214-223. PMLR, 2017. 6 +[2] Samaneh Azadi, Matthew Fisher, Vladimir G Kim, Zhaowen Wang, Eli Shechtman, and Trevor Darrell. Multi-content gan for few-shot font style transfer. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7564-7573, 2018. 2 +[3] Junbum Cha, Sanghyuk Chun, Gayoung Lee, Bado Lee, Seonghyeon Kim, and Hwalsuk Lee. Few-shot compositional font generation with dual memory. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XIX 16, pages 735-751. Springer, 2020. 2 +[4] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In European conference on computer vision, pages 104-120. Springer, 2020. 3 +[5] 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. 3 +[6] Yunjoy Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. Stargan v2: Diverse image synthesis for multiple domains. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8188-8197, 2020. 3, 6, 7 +[7] Founder Corp. Founder Type. https://www.foundertype.com/, 2021.5,6 +[8] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 4 +[9] Yue Gao, Yuan Guo, Zhouhui Lian, Yingmin Tang, and Jianguo Xiao. Artistic glyph image synthesis via one-stage few-shot learning. ACM Transactions on Graphics (TOG), 38(6):1-12, 2019. 2 +[10] Yiming Gao and Jiangqin Wu. Gan-based unpaired chinese character image translation via skeleton transformation and stroke rendering. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 646-653, 2020. 3 +[11] 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. 2 +[12] 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, pages 249–256. JMLR Workshop and Conference Proceedings, 2010. 5 +[13] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and + +Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014. 5 +[14] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017. 6 +[15] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. 5 +[16] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 1501-1510, 2017. 2 +[17] Yaoxiong Huang, Mengchao He, Lianwen Jin, and Yongpan Wang. Rd-gan: few/zero-shot chinese character style transfer via radical decomposition and rendering. In European Conference on Computer Vision, pages 156-172. Springer, 2020. 3 +[18] 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. 3 +[19] Yue Jiang, Zhouhui Lian, Yingmin Tang, and Jianguo Xiao. Scfont: Structure-guided chinese font generation via deep stacked networks. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pages 4015-4022, 2019. 3 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[21] Chenliang Li, Bin Bi, Ming Yan, Wei Wang, Songfang Huang, Fei Huang, and Luo Si. Structural pre-training for form understanding. arXiv preprint arXiv:2105.11210, 2021.3 +[22] Chenhao Li, Yuta Taniguchi, Min Lu, and Shin'ichi Konomi. Few-shot font style transfer between different languages. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 433-442, 2021. 2 +[23] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, pages 121-137. Springer, 2020. 3 +[24] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. arXiv preprint arXiv:1705.08086, 2017. 2 +[25] Yijun Li, Ming-Yu Liu, Xueting Li, Ming-Hsuan Yang, and Jan Kautz. A closed-form solution to photorealistic image stylization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 453-468, 2018. 2 +[26] Alexander H Liu, Yen-Cheng Liu, Yu-Ying Yeh, and Yu-Chiang Frank Wang. A unified feature disentangler for multidomain image translation and manipulation. arXiv preprint arXiv:1809.01361, 2018. 3 +[27] Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, and Jan Kautz. Few-shot unsupervised image-to-image translation. In Proceedings of the + +IEEE/CVF International Conference on Computer Vision, pages 10551-10560, 2019. 3, 6, 7 +[28] Fujun Luan, Sylvain Paris, Eli Shechtman, and Kavita Bala. Deep photo style transfer. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4990-4998, 2017. 2 +[29] Song Park, Sanghyuk Chun, Junbum Cha, Bado Lee, and Hyunjung Shim. Few-shot font generation with localized style representations and factorization. arXiv preprint arxiv:2009.11042, 2020. 2, 6, 7 +[30] Song Park, Sanghyuk Chun, Junbum Cha, Bado Lee, and Hyunjung Shim. Multiple heads are better than one: Few-shot font generation with multiple localized experts. arXiv preprint arXiv:2104.00887, 2021. 2, 6, 7 +[31] Pengfei Zhu Peihua Li Wangmeng Zuo Qilong Wang, Banggu Wu and Qinghua Hu. Eca-net: Efficient channel attention for deep convolutional neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2, 5, 8 +[32] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. CoRR, abs/2103.00020, 2021. 3 +[33] Nikita Srivatsan, Jonathan T Barron, Dan Klein, and Taylor Berg-Kirkpatrick. A deep factorization of style and structure in fonts. arXiv preprint arXiv:1910.00748, 2019. 2 +[34] Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. Vl-bert: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530, 2019. 3 +[35] Danyang Sun, Tongzheng Ren, Chongxun Li, Hang Su, and Jun Zhu. Learning to write stylized chinese characters by reading a handful of examples. arXiv preprint arXiv:1712.06424, 2017. 2 +[36] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. arXiv preprint arXiv:1908.07490, 2019. 3, 5 +[37] Yuchen Tian. zi2zi: Master chinese calligraphy with conditional adversarial networks. Internet J https://github.com/kaonashi-tyc/zi2zi, 2017. 3 +[38] 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. 4 +[39] 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 +[40] Shan-Jean Wu, Chih-Yuan Yang, and Jane Yung-jen Hsu. Calligan: Style and structure-aware chinese calligraphy character generator. arXiv preprint arXiv:2005.12500, 2020. 3 +[41] Yangchen Xie, Xinyuan Chen, Li Sun, and Yue Lu. Dgfont: Deformable generative networks for unsupervised font generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5130-5140, 2021. 2, 6, 7 + +[42] Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-to-image translation. In Proceedings of the IEEE international conference on computer vision, pages 2849-2857, 2017. 3 +[43] Fei Yu, Jiji Tang, Weichong Yin, Yu Sun, Hao Tian, Hua Wu, and Haifeng Wang. Ernie-vil: Knowledge enhanced vision-language representations through scene graph. arXiv preprint arXiv:2006.16934, 1:12, 2020. 3 +[44] Pengchuan Zhang, Xiujun Li, Xiaowei Hu, Jianwei Yang, Lei Zhang, Lijuan Wang, Yejin Choi, and Jianfeng Gao. Vinvl: Revisiting visual representations in vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5579-5588, 2021. 3 +[45] Yexun Zhang, Ya Zhang, and Wenbin Cai. Separating style and content for generalized style transfer. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8447-8455, 2018. 2 +[46] 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. 3 \ No newline at end of file diff --git a/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/images.zip b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7a068a3888a2abf88a04edb1ef19bbdb2c0c4595 --- /dev/null +++ b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4df209c7724311fcab3a9a01a44468c8f2b0fd1832e9086a0d4f35e6295efc08 +size 601171 diff --git a/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/layout.json b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..cad94934cfee276d70ebd0f93fa4a905226fdd33 --- /dev/null +++ b/xmpfontselfsupervisedcrossmodalitypretrainingforfewshotfontgeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72402e765fec7bca72ff620bc5c2318cc111a022495b1278a29e4f210c4b35be +size 279283 diff --git a/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_content_list.json b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7ae6728a5a7e9a1c692f981e4f5fcfbc7540d484 --- /dev/null +++ b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0782d5b99bc7771a7722b438adbbdce85275f67902e53ec7448137969d9fa405 +size 85075 diff --git a/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_model.json b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3b6978cb567bed9b007df7f58b036b5c00ea26f8 --- /dev/null +++ b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83501a12905b103bc2b7a0f2290ef63750a0110d27555f331a1d8cc65ca056bd +size 103026 diff --git a/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_origin.pdf b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..26b531fc16fb7bc6eb4c557363c52678f9e3000c --- /dev/null +++ b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/4aba69cc-6ce7-4711-a8f9-588a9b786fc7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d9beb7d1c0935eac022296da964fc0d4587d1b95e71a395821a5a1aefc9734a +size 1575844 diff --git a/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/full.md b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4ba099ab6560d08b2b440dc74cada1313b9124f6 --- /dev/null +++ b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/full.md @@ -0,0 +1,367 @@ +# X-Pool: Cross-Modal Language-Video Attention for Text-Video Retrieval + +Satya Krishna Gorti $^{1*}$ Noël Vouitsis $^{1,2*}$ Junwei Ma $^{1*}$ +Keyvan Golestan $^{1}$ Maksims Volkovs $^{1}$ Animesh Garg $^{2,3,4}$ Guangwei Yu $^{1}$ + +$^{1}$ Layer 6 AI $^{2}$ University of Toronto $^{3}$ Vector Institute $^{4}$ NVIDIA + +# Abstract + +In text-video retrieval, the objective is to learn a cross-modal similarity function between a text and a video that ranks relevant text-video pairs higher than irrelevant pairs. However, videos inherently express a much wider gamut of information than texts. Instead, texts often capture subregions of entire videos and are most semantically similar to certain frames within videos. Therefore, for a given text, a retrieval model should focus on the text's most semantically similar video sub-regions to make a more relevant comparison. Yet, most existing works aggregate entire videos without directly considering text. Common text-agnostic aggregations schemes include mean-pooling or self-attention over the frames, but these are likely to encode misleading visual information not described in the given text. To address this, we propose a cross-modal attention model called X-Pool that reasons between a text and the frames of a video. Our core mechanism is a scaled dot product attention for a text to attend to its most semantically similar frames. We then generate an aggregated video representation conditioned on the text's attention weights over the frames. We evaluate our method on three benchmark datasets of MSR-VTT, MSVD and LSMDC, achieving new state-of-the-art results by up to $12\%$ in relative improvement in Recall@1. Our findings thereby highlight the importance of joint text-video reasoning to extract important visual cues according to text. Full code and demo can be found at: layer6ai-labs.github.io/xpool/. + +# 1. Introduction + +The advent of video content platforms like TikTok, YouTube and Netflix have enabled the mass outreach of videos around the world. The ability to retrieve videos that are most semantically similar to a provided text-based search query allows us to quickly find relevant information and to make sense of massive amounts of video data. + +![](images/0ea4c626ba6f31c78e6e968d9d42dce7b3cb0e3906d25e37e96bf34f0b027622.jpg) +Man in black suit is having meeting with group of people. + +![](images/2cb4b8ef4954a6c03b5261d141ff9d000d46c45bc1545a9a25ba9b9b2117f9b5.jpg) +A female reporter gives updates on foreign relations and tragedies. +A bus is going on the road and it is fallen in the big dig. + +![](images/42a8dbc79b01d4951177d74169e107c03a0afe4c9d6f581603c284ba1704510e.jpg) +A pope traveling on open body vehicle and blessing the peoples. + +![](images/4e52a318f6afec9defca25388f216342fe82a0a6d03a4b85c5891125ffc06771.jpg) +Figure 1. Illustration of the joint text and visual representations for a single video and its captions taken verbatim from the MSR-VTT dataset. Since the video is capturing more content than each individual text, aggregating the entire video regardless of the input text can be misleading. + +it is fallen in the big dig. + +The task of text-video retrieval is an approach to solve this problem wherein the objective is for a model to learn a similarity function between texts and videos. To compute the similarity between both modalities, a common technique is to first embed a text and a video into a joint latent space and then apply a distance metric such as the cosine similarity between the text and video embeddings [5,12,22]. + +However, there is an important discrepancy between both modalities that makes such a direct comparison challenging. Videos inherently express a much wider gamut of information than texts, so a text generally cannot fully capture the entire contents of a video. Instead, texts are most semantically similar to sub-regions of videos, represented as a subset of frames. Depending on the given text, the frames that are the most semantically similar would differ, so multiple equally valid texts can match a particular video. For example, in Figure 1, we show frames of a sample video from the MSR-VTT dataset [40]. The frames depict various scenes from international news and express different visual content. Moreover, we show multiple captions associated with this video, and observe that each caption best matches a different video frame but can seem irrelevant to others. In this example, we would expect the same video to be re + +trieved for any of these queries, even though the relevant content is limited to sub-regions of the video. + +Based on this observation, we want a retrieval model to focus on the video sub-regions that are most relevant to the given text during retrieval. A model should therefore directly reason between texts and the frames of videos to extract the most relevant information as described in each text. However, most existing works do not apply direct cross-modal reasoning, and instead utilize the entire contents of a video such as through mean-pooling or self-attention [5, 12, 26, 30]. By encoding a video independently from a given text, a model is likely to encode superfluous or even distracting visual information that is not described in the text, which can reduce retrieval performance. + +To address this gap, we design a cross-modal attention model that we call X-Pool to allow for joint reasoning between a text and a video's frames. Unlike previous works that pool the entire frames of a video, our model provides flexibility for a text to attend to its most semantically similar frames and then generates an aggregated video representation conditioned on those frames. + +Our main contributions can be summarized as follows: (i) We show empirically through a proof of concept that text-conditioned video pooling allows a model to reason about the most relevant video frames to a given text, which outperforms baselines that use text-agnostic video pooling; (ii) We propose a cross-modal attention model that extends our proof of concept with parametric capacity for a text to attend to its most semantically similar video frames for aggregation which we call X-Pool. X-Pool obtains state-of-the-art results across the popular benchmark datasets of MSR-VTT [40], MSVD [8] and LSMDC [34]; (iii) We demonstrate the robustness of X-Pool to videos with increasing amounts of content diversity, such as videos with many scene transitions. We show how text-agnostic pooling methods are much more sensitive to such videos compared to our text-conditioned X-Pool model. + +# 2. Related Work + +Joint Language-Image Understanding. Joint language-image models are a form of multimodal learning [6] that aim to understand and relate the text and image modalities. Methods in text-image understanding such as [9, 13, 17-19, 25, 33, 37] are pre-trained to jointly reason about language and image semantics which make them suitable for downstream cross-modal tasks like visual question answering (VQA) [3], image captioning [41] and text-image retrieval [14]. Most recently, methods such as CLIP [33], ALIGN [13], DeCLIP [20] and ALBEF [17] employ unimodal encoders to learn a joint latent space that matches relevant text-image pairs via a contrastive loss. Our goal is to bootstrap from a pre-trained joint text-image model and extend it towards a joint text-video model for + +the task of text-video retrieval. + +Text-Video Retrieval. The prototypical approach to text-video retrieval has been through a pre-trained language expert and often a combination of video experts pre-trained for various tasks and modalities, after which the language and vision streams are consolidated through late fusion. MoEE [29], CE [22], MMT [12] MDMMT [11], and Teach-Text [10] are all such works. The motivation for using pre-trained experts stems from the small-scale nature of the datasets used in text-video retrieval. + +Some works have also benefited from pre-training their own models on either large-scale text-video datasets [5,30, 46] or through text-image pre-training [15, 29]. Among them, ActBERT [46] and ClipBERT [15] are both single stream models that jointly embed text-video pairs through BERT-like architectures for early cross-modal fusion. However, these works do not allow for direct reasoning about the most semantically similar video sub-regions to a given text. + +Recently, the works of CLIP4Clip [26] and Straight-CLIP [32] use the joint language-vision model of CLIP [33] pre-trained on a large-scale text-image dataset as a backbone. Even the trivial use of CLIP in a zero-shot manner outperforms most of the above recent works [32], highlighting how the rich joint text-image understanding of CLIP can be expanded towards videos. CLIP4Clip [26] proposes several video aggregation schemes including mean-pooling, self-attention and a multimodal transformer, yet none allows for direct matching of a text with its most relevant video sub-regions which motivates our cross-modal attention model. Cross-modal attention has been explored in previous related work such as [9, 15, 17-19, 25, 27, 37, 38, 42, 45, 46]. We design a cross-modal attention mechanism for the task of text-video retrieval that shows significant improvement over previous methods. + +# 3. Problem Statement + +In text-video retrieval, the objective is for a model to learn a scalar similarity function $s(t,v)$ between a text $t$ and a video $v$ . We want to assign higher similarity to relevant text-video pairs and assign lower similarity to irrelevant pairs. We define two retrieval tasks, text-to-video retrieval denoted as $t2v$ and video-to-text retrieval denoted as $v2t$ . In $t2v$ , we are given a query text $t$ and a video index set $\mathcal{V}$ . The goal is to rank all videos $v \in \mathcal{V}$ according to their similarities with the query text. Analogously, in $v2t$ , we are given a query video $v$ and a text index set $\mathcal{T}$ . The goal is to rank all texts $t \in \mathcal{T}$ according to their similarities with the query video. In both of these tasks, we are under the assumption that only the index set is known ahead of time. + +The inputs to our problem are a video $v$ and a text $t$ . We define a video $v \in \mathbb{R}^{F \times 3 \times H \times W}$ as a sequence of $F$ sampled image frames in time. That is, $v = [v^1, v^2, \dots, v^F]^T$ where $v^f$ is the $f^{\mathrm{th}}$ image frame of resolution $H \times W$ . We define + +a text $t$ as a sequence of tokenized words. + +# 4. Methodology + +In this section, we incrementally introduce the insights and methodologies that motivate our final model X-Pool. We first describe in Section 4.1 how the use of a pre-trained joint text-image model is an essential component of our model to match texts and images which we extend to match texts and videos. We then explain the drawbacks of aggregating a video into a text-agnostic embedding in Section 4.2, and present an alternative framework that aggregates frames conditioned on a given text in Section 4.3. We then introduce our X-Pool model in Section 4.4, a cross-modal attention model that enables joint reasoning between a text and the frames of a video. Our model learns to aggregate videos using the most semantically similar frames to a given text. + +# 4.1. Expanding Joint Text-Image Models + +Bootstrapping From Joint Text-Image Models. Jointly pre-trained text-image models have demonstrated the ability to match semantically similar texts and images [9, 13, 17, 20, 25, 33]. We can leverage the existing text-image reasoning of such models to bootstrap a joint text-video model. This allows us to learn language-video interactions with substantially less video data and offers a more compute efficient solution during training, while benefiting from the rich cross-modal understanding of pre-trained joint text-image models. In general, the idea of bootstrapping video models from image models stems from the importance of first understanding images in order to understand videos, as shown in [7]. + +CLIP as a Backbone. We bootstrap from CLIP [33] due to its strong downstream performance, its simplicity, and to more objectively compare with recent works that also leverage CLIP as a backbone [26, 32], although other pre-trained text-image models may be suitable backbone candidates. To bootstrap from CLIP for text-video retrieval, we first embed a text and individual video frames into its joint latent space and then pool the frame embeddings to obtain a video embedding [32]. Since the existing information extracted from a pre-trained CLIP model contains rich text-image semantics, we use CLIP as a backbone to learn a new joint latent space to match texts and videos instead of just images. + +More precisely, given a text $t$ a video frame $v^{f}$ as input, CLIP outputs a text embedding $\mathbf{c}_t\in \mathbb{R}^D$ and a frame embedding $\mathbf{c}_v^f\in \mathbb{R}^D$ in a joint latent space: + +$$ +\mathbf {c} _ {t} = \psi (t) \tag {1} +$$ + +$$ +\mathbf {c} _ {v} ^ {f} = \phi (v ^ {f}) \tag {2} +$$ + +where $\psi$ is CLIP's text encoder and $\phi$ is CLIP's image encoder. By computing equation (2) for each frame in a + +video $v$ , we obtain a sequence of frame embeddings $C_v = [\mathbf{c}_v^1, \mathbf{c}_v^2, \dots, \mathbf{c}_v^F]^{T} \in \mathbb{R}^{F \times D}$ . + +Computing Text and Video Embeddings. As mentioned, we want to embed our given text and video into a joint space to compute similarity. That is, we want to compute a text embedding $\mathbf{z}_t\in \mathbb{R}^D$ and a video embedding $\mathbf{z}_v\in \mathbb{R}^D$ . The text embedding is directly taken as the output from CLIP. On the other hand, we compute the video embedding by aggregating the frame embeddings in $C_v$ using a temporal aggregation function $\rho$ : + +$$ +\mathbf {z} _ {t} = \mathbf {c} _ {t} \tag {3} +$$ + +$$ +\mathbf {z} _ {v} = \rho \left(C _ {v}\right) \tag {4} +$$ + +# 4.2. Gap: Text-Agnostic Pooling + +In most existing works, the aggregation function $\rho$ does not directly consider the input text and is purely a function of the frames of the videos such as through mean-pooling, self-attention or an LSTM [1,5, 12, 26, 28, 30, 32]. + +While defining the temporal aggregation function as agnostic to text forms a simple baseline, there are important drawbacks with this approach. Videos are inherently much more expressive than texts, so the information captured in text generally cannot fully capture that of an entire video. Instead, texts are most semantically similar to certain subregions of videos which we define as subsets of frames, as shown in Figure 1. As such, common text-agnostic aggregation schemes that pool entire videos like mean-pooling and self-attention might encode spurious information that is not described in the input text. + +We note that this effect is exacerbated when we consider videos that exhibit significant diversity in their visual content [21] which we refer to as content diversity. To elaborate, it is natural to find videos with scene transitions such as when the actor moves from an indoor setting to an outdoor setting, abrupt scene cuts like in movies, occlusions of key subjects or noise in the form of distractors for example. Since this is an intrinsic property of many videos "in the wild" [16, 35], we want a retrieval model to be robust to such content diversity by focusing its attention to the most relevant video sub-regions described in a given text. Intuitively, any text-agnostic pooling method will fail under this setting since it aggregates information from all scenes of the video, disregarding the input text for retrieval, as we empirically show in Section 5.3. + +# 4.3. Key Insight: Text-Conditioned Pooling + +We note that it is therefore important to match texts not with the entire contents of a video, but with those video frames that are most semantically similar to a given text. Depending on the given text, the frames that are most semantically similar would differ, so there could be multiple equally valid texts that match a particular video. As such, + +![](images/fd7cd7240647b40ecf72fdf042162f2cbd3fc838f114eedcaaede557006cbd2e.jpg) +Figure 2. Diagram of X-Pool. For the given text $t_1$ , we embed it with the text encoder $\psi$ and then apply a query projection to obtain $Q_{t_1}$ . We similarly embed the frames of the given video $v_1$ with the image encoder $\phi$ and then apply a key projection to obtain $K_{v_1}$ . We compute the dot product attention between them as illustrated by the horizontal bar plot in the middle of the figure. Our attention mechanism allows X-Pool to focus on the most relevant frames given an input text. We aggregate a separate set of value-projected frame embeddings that we weight by the previously computed dot product attention scores to obtain an aggregated video embedding that we then pass through a fully connected layer (FC) with a residual connection to obtain $\mathbf{z}_{v_1|t_1}$ . We compute the similarity score $s(t_1, v_1)$ as the cosine similarity between $\mathbf{z}_{v_1|t_1}$ and $\mathbf{z}_{t_1} = \psi(t_1)$ . Finally, we compute a cross entropy loss after obtaining $s(t_i, v_j)$ as just described for each pair $(t_i, v_j)$ within a batch of size $B$ . + +our temporal aggregation function should directly reason between a given text and the frames of a video. + +To that end, we formulate a new temporal aggregation function $\pi$ that allows us to aggregate the video frames that are most semantically similar to a given text $t$ . By conditioning $\pi$ on $t$ , we can extract from a video $v$ the most relevant information as described in $t$ while suppressing noisy and misleading visual cues. We denote the resulting aggregated video embedding as $\mathbf{z}_{v|t}$ and define our similarity function $s(t,v)$ as: + +$$ +\mathbf {z} _ {v \mid t} = \pi \left(C _ {v} \mid t\right) \tag {5} +$$ + +$$ +s (t, v) = \frac {\mathbf {z} _ {t} \cdot \mathbf {z} _ {v \mid t}}{\| \mathbf {z} _ {t} \| \| \mathbf {z} _ {v \mid t} \|} \tag {6} +$$ + +To demonstrate the efficacy of our idea, we first propose a top- $k$ aggregation function $\pi_{\mathrm{top - }k}(C_v\mid t)$ as: + +$$ +\pi_ {\text {t o p} - k} \left(C _ {v} \mid t\right) = \frac {1}{k} \sum_ {f \in \mathcal {K}} \mathbf {c} _ {v} ^ {f} \tag {7} +$$ + +where the set $\kappa$ is defined as: + +$$ +\mathcal {K} = \underset {\substack {\mathcal {K} \subseteq \{1, \dots , F \} \\ | \mathcal {K} | = k}} {\arg \max } \sum_ {f \in \mathcal {K}} \frac {\mathbf {c} _ {t} \cdot \mathbf {c} _ {v} ^ {f}}{\| \mathbf {c} _ {t} \| \| \mathbf {c} _ {v} ^ {f} \|} \tag{8} +$$ + +and the selected frames are those with the highest cosine similarity. Here, we directly select only the frames with the highest cosine similarity to a given text as a proxy for semantic similarity. Only the top- $k$ most semantically similar frames to a given text are pooled while lower similarity frames are completely ignored. + +We observe that even by just applying top- $k$ pooling, there is already a significant improvement over baselines where the temporal aggregation function is text-agnostic. Detailed experiments can be found in Section 5.3. + +# 4.4. Our Model: X-Pool + +Towards Parametric Text-Conditioned Pooling. However, there are still drawbacks with the top- $k$ method. Firstly, the tuning of the $k$ hyperparameter can be task and instance specific as we show in Section 5.3. Secondly, deciding which frames to aggregate from can require more complex reasoning than simple cosine similarity. Lastly, completely suppressing frames with lower + +similarity may be too restrictive. As such, we propose a parametric approach to address these additional considerations while incorporating our insights from applying text-conditioned pooling. + +Cross-Modal Language-Video Attention. Our idea is to design a learned frame aggregation function with parametric capacity for cross-modal reasoning about a text's most semantically similar frames in a video, which we call X-Pool. The core mechanism is our adaptation of a scaled dot product attention [39] between a text and the frames of a video. Conditioned on these frames, we generate a video embedding that learns to capture the most semantically similar video sub-regions as described in a given text. Since the frames with highest semantic similarity can differ depending on the text, our scaled dot product attention mechanism can learn to highlight relevant frames to a given text while suppressing frames not described in said text. Our model's capacity to selectively pick frames based on relevance to a given text is motivated by the same text-conditioning insights as outlined in the previously described top- $k$ approach. However, unlike the top- $k$ approach, our proposed model learns the optimal amount of information to extract for a text-video pair, thereby removing the need to manually specify a $k$ value. Furthermore, our cross-attention module handles both high and low relevancy frames rather than adopting a hard selection of relevant frames as in the top- $k$ approach. + +To elaborate, in our cross-modal attention module, we first project a text embedding $\mathbf{c}_t\in \mathbb{R}^D$ into a single query $Q_{t}\in \mathbb{R}^{1\times D_{p}}$ and a video's frame embeddings $C_v\in \mathbb{R}^{F\times D}$ into key $K_{v}\in \mathbb{R}^{F\times D_{p}}$ and value $V_{v}\in \mathbb{R}^{F\times D_{p}}$ matrices, where $D$ is the size of our model's latent dimension and $D_{p}$ is the size of the projection dimension. The projections are defined as: + +$$ +Q _ {t} = \operatorname {L N} \left(\mathbf {c} _ {t} ^ {T}\right) W _ {Q} \tag {9} +$$ + +$$ +K _ {v} = \mathrm {L N} \left(C _ {v}\right) W _ {K} \tag {10} +$$ + +$$ +V _ {v} = \mathrm {L N} \left(C _ {v}\right) W _ {V} \tag {11} +$$ + +where LN is a Layer Normalization layer [4] and $W_{Q}, W_{K}$ and $W_{V}$ are projection matrices in $\mathbb{R}^{D \times D_p}$ . In order to learn flexible conditioning between the given text and the frames, we then adapt scaled dot product attention from the query-projected text embedding to the key-projected frame embeddings. The dot product attention gives relevancy weights from a text to each frame which we leverage to aggregate the value-projected frame embeddings: + +$$ +\operatorname {A t t e n t i o n} \left(Q _ {t}, K _ {v}, V _ {v}\right) = \operatorname {s o f t m a x} \left(\frac {Q _ {t} K _ {v} ^ {T}}{\sqrt {D _ {p}}}\right) V _ {v} \tag {12} +$$ + +As such, the $Q_{t}$ , $K_{v}$ and $V_{v}$ matrices can be interpreted akin to those in the original scaled dot product attention proposed in [39] except with cross-modal interactions. That is, + +the query-projected text embedding is used to seek from the key-projected frame embeddings to attend to frames with highest relevance. The value-projected embeddings represent the video's context from which we want to aggregate only certain sub-regions depending on the text. + +To embed a video into a joint space with a text, we project the aggregated video representation from the attention module back into $\mathbb{R}^D$ by applying a weight $W_O \in \mathbb{R}^{D_p \times D}$ to obtain: + +$$ +\mathbf {r} _ {v \mid t} = \mathrm {L N} (\text {A t t e n t i o n} (Q _ {t}, K _ {v}, V _ {v}) W _ {O}) \tag {13} +$$ + +where the resulting output $\mathbf{r}_{t|v}$ is an aggregated video embedding conditioned on the text $t$ . We can thereby learn this embedding such that a text can attend to its most semantically similar frames through parametric reasoning in the dot product attention. Our final text-conditioned pooling is defined as: + +$$ +\pi_ {\mathrm {X} - \text {P o o l}} \left(C _ {v} \mid t\right) = \mathrm {L N} \left(\mathrm {F C} \left(\mathbf {r} _ {v | t}\right)\right) + \left. \mathbf {r} _ {v | t}\right) ^ {T} \tag {14} +$$ + +where FC is a fully connected network which together with the residual connection provides additional capacity for more complex reasoning in our aggregation function. + +Figure 2 shows a diagram of our model. We show how X-Pool performs text-conditioned video aggregation over frames by allowing a text to learn to attend to its most semantically similar frames for pooling. In the top example, the input text $t_1$ is most relevant to the first few frames displayed of video $v_1$ of a man yelling at and punching a sink, whereas the final displayed frames of a man near a car do not capture what is described in the text and instead act as misleading visual distractors. We show how our model can reason about semantic similarity by assigning higher attention weights to the text's most relevant frames for aggregation. We emphasize that any text-agnostic pooling method such as mean-pooling would have aggregated the contents from this entire video. The resulting aggregation would thereby capture noisy distractors not described in the input text which could hamper the similarity score for retrieval. In the bottom example, we show a similar behaviour wherein X-Pool can attend to the most relevant frames of two guys jumping in an elevator as described in the text, whereas text-agnostic methods would capture non-relevant content from this video. + +Loss. We train models using a dataset $\mathcal{D}$ consisting of $N$ text and video pairs $\{(t_i, v_i)\}_{i=1}^N$ . In each pair, the text $t_i$ is a matching text description of the corresponding video $v_i$ . We employ the cross entropy loss from [44] by considering matching text-video pairs as positives and by considering all other pairwise text-video combinations in the batch as negatives. Specifically, we jointly minimize the symmetric text-to-video and video-to-text losses: + +$$ +\mathcal {L} _ {t 2 v} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \log \frac {e ^ {s \left(t _ {i} , v _ {i}\right) \cdot \lambda}}{\sum_ {j = 1} ^ {B} e ^ {s \left(t _ {i} , v _ {j}\right) \cdot \lambda}} \tag {15} +$$ + +$$ +\mathcal {L} _ {v 2 t} = - \frac {1}{B} \sum_ {i = 1} ^ {B} \log \frac {e ^ {s \left(t _ {i} , v _ {i}\right) \cdot \lambda}}{\sum_ {j = 1} ^ {B} e ^ {s \left(t _ {j} , v _ {i}\right) \cdot \lambda}} \tag {16} +$$ + +$$ +\mathcal {L} = \mathcal {L} _ {t 2 v} + \mathcal {L} _ {v 2 t} \tag {17} +$$ + +where $s(t_i, v_j)$ is the cosine similarity between the text $t_i$ and the video $v_j$ , $B$ is the batch size and $\lambda$ is a learnable scaling parameter. By bootstrapping from a pre-trained CLIP model and through our cross-modal attention mechanism, training with this loss enables our model to learn to match a text with its most semantically similar sub-regions of the ground-truth video. + +# 5. Experiments + +We perform experiments on the commonly used benchmark text-video retrieval datasets of MSR-VTT [40], MSVD [8] and LSMDC [34] and evaluate our performance following existing literature [5, 12, 22, 29, 43] by reporting Recall@1 (R@1), Recall@5 (R@5), Recall@10 (R@10), Median Rank (MdR), and Mean Rank (MnR). + +# 5.1. Datasets + +MSR-VTT is comprised of 10,000 videos, each paired with about 20 human-labeled captions. We note that the multiple captions for each video in MSR-VTT often describe different video sub-regions, which supports our motivation for matching a given text with its most relevant frames in a video. The lengths of videos in this dataset range from 10 to 32 seconds, and we use two training splits which we call $7k$ -Train and $9k$ -Train to effectively compare with previous works. $7k$ -Train is a subset of roughly $7k$ videos as defined in [30], while $9k$ -Train consists of approximately $9k$ videos following the split in [12]. Unless otherwise stated, we use the $9k$ -Train split for training. To evaluate our models, we use the $1K-A$ test set from [43] consisting of 1,000 selected caption-video pairs. + +MSVD contains about 120k captions that each describe one of 1,970 videos ranging in length from 1 to 62 seconds. Again, videos are paired with multiple captions and each may describe different sub-regions of the same video. In MSVD, the training, validation and test splits are comprised of 1,200, 100 and 670 videos respectively. Our final results are evaluated on the test split that has a varying number of captions per video. To that end, we follow recent methods for evaluation by treating all the provided caption-video pairs as separate instances for evaluation [26, 32]. + +LSMDC is a movie clip dataset containing 118,081 videos each paired with a single caption description. The lengths of videos range from 2 to 30 seconds. 101,079 videos are used for training while 7,408 and 1,000 videos are used for validation and testing respectively. We report all results on the test set. + +# 5.2. Implementation Details + +We use CLIP's ViT-B/32 image encoder as $\phi$ and CLIP's transformer base text encoder as $\psi$ , and initialize all encoder parameters from CLIP's pre-trained weights. We set the query, key and value projection dimension size as $D_p = 512$ to match CLIP's output dimension and initialize our logit scaling parameter $\lambda$ with that from a pre-trained CLIP model. We apply a linear layer with $D = 512$ output units and dropout [36] of 0.3 as our FC. Finally, we initialize all new projection weight matrices with identity and all new biases with zeros to bootstrap our entire model from the existing text-image semantic reasoning of a pre-trained CLIP. Our models are fine-tuned end-to-end on each dataset. To that end, we set our batch size to 32 for all experiments and set the learning rate for CLIP-initialized weights to 1e-6 and for all other parameters to 1e-5. We optimize our model for 5 epochs using the AdamW optimizer [24] with weight decay set to 0.2 and decay the learning rate using a cosine schedule [23] following CLIP [33]. For all experiments, we uniformly sample 12 frames from every video and resize each frame to 224x224 following previous works [5,22,26]. + +# 5.3. Results + +To evaluate our method, we compare its performance with recent works from the literature. We tabulate the $t2v$ retrieval performance of our model trained on the MSR-VTT 9k-Train and 7k-Train splits in Table 1 and Table 2 respectively. Tables 3 and 4 similarly compare the performance of X-Pool on the MSVD and LSMDC datasets respectively. We note that on all datasets and across all metrics, our text-conditioned X-Pool model outperforms all other works that use text-agnostic pooling [5,26,32] includ + +
MethodsR@1 ↑R@5 ↑R@10 ↑MdR ↓MnR ↓
CE [22]20.948.862.46.028.2
MMT [12]26.657.169.64.024.0
Straight-CLIP [32]31.253.764.24.0-
Support Set [31]30.158.569.33.0-
MDMMT [11]38.969.079.72.016.5
Frozen [5]31.059.570.53.0-
TeachText-CE+ [10]29.661.674.23.0-
CLIP4Clip-meanP [26]43.170.480.82.016.2
CLIP4Clip-seqTransf [26]44.571.481.62.015.3
X-Pool (ours)46.972.882.22.014.3
+ +Table 1. ${t2v}$ results on the MSR-VTT-9K dataset. + +
MethodsR@1 ↑R@5 ↑R@10 ↑MdR ↓MnR ↓
HowTo100M [30]14.940.252.89.0-
ActBERT [46]8.623.433.136.0-
NoiseE [2]17.441.653.68.0-
ClipBERT [15]22.046.859.96.0-
CLIP4Clip-meanP [26]42.171.981.42.015.7
CLIP4Clip-seqTransf [26]42.068.678.72.016.2
X-Pool (ours)43.972.582.32.014.6
+ +Table 2. ${t2v}$ results on the MSR-VTT-7K dataset. + +
MethodsR@1 ↑R@5 ↑R@10 ↑MdR ↓MnR ↓
CE [22]19.849.063.86.023.1
Support Set [31]28.460.072.94.0-
NoiseE [2]20.349.063.36.0-
Straight-CLIP [32]37.064.173.83.0-
Frozen [5]33.764.776.33.0-
TeachText-CE+ [10]25.456.971.34.0-
CLIP4Clip-meanP [26]46.276.184.62.010.0
CLIP4Clip-seqTransf [26]45.275.584.32.010.3
X-Pool (ours)47.277.486.02.09.3
+ +Table 3. ${t2v}$ results on the MSVD dataset. + +
MethodsR@1 ↑R@5 ↑R@10 ↑MdR ↓MnR ↓
CE [22]11.226.934.825.3-
MMT [12]12.929.940.119.375.0
NoiseE [2]6.419.828.439.0-
Straight-CLIP [32]11.322.729.256.5-
MDMMT [11]18.838.547.912.358.0
Frozen [5]15.030.839.820.0-
TeachText-CE+ [10]17.236.546.313.7-
CLIP4Clip-meanP [26]20.738.947.213.065.3
CLIP4Clip-seqTransf [26]22.641.049.111.061.0
X-Pool (ours)25.243.753.58.053.2
+ +Table 4. ${t2v}$ results on the LSMDC dataset. + +ing those using video experts in multiple video modalities [1,12,28]. Most notably, our model outperforms the hitherto state-of-the-art methods CLIP4Clip-meanP and CLIP4Clip-seqTransf [26] which are the most directly comparable to X-Pool since they also use CLIP as a backbone. Therefore, we can directly attribute the performance gains of our model to the fact that we use text-conditioned pooling compared to the text-agnostic pooling schemes of CLIP4Clip-meanP and CLIP4Clip-seqTransf. + +More precisely, on the MSR-VTT dataset, we observe a relative improvement of $5\%$ in Recall@1 compared to CLIP4Clip-seqTransf. For the MSVD dataset, we outperform CLIP4Clip-meanP by over $2\%$ in relative improvement in Recall@1. In the case of the LSMDC dataset, the retrieval problem is more challenging since the movie scene text descriptions are much more ambiguous, which can be observed by the overall lower retrieval scores of all previous methods. Yet, our method notably outperforms CLIP4Clip-seqTransf by $12\%$ in relative improvement in Recall@1. Our results thereby highlight the importance of our model's text-conditioned aggregation that can learn to match a text with its most relevant frames while suppressing distracting visual cues from other video sub-regions. + +Top- $k$ Experiments. To better understand the merits and intuition for our X-Pool model, we first revisit our top- $k$ temporal aggregation function defined in equation (7) that we introduce as a proof of concept for our proposed idea of text-conditioned video pooling. To validate this idea, we compare top- $k$ pooling with a mean-pooling baseline as in [26, 32] across two settings: first we apply a pretrained CLIP model in a zero-shot manner similar to [32] + +![](images/ca8f696a0e538cddd67efd627cee8827e04f37af87b69e6ddc900d2ea5678d63.jpg) +(a) + +![](images/53f94607fd5eff8f577a881995a82c5f3a87f949f72c27679fe3c71dc7218782.jpg) +(b) +Figure 3. Top- $k$ analysis on MSR-VTT. (a) $t2v$ retrieval performance comparing mean-pooling with top- $k$ text-conditioned pooling. (b) Histogram showing the $k$ value where each ground truth text-video pair in the MSR-VTT test set achieves the highest cosine similarity when using top- $k$ pooling. + +![](images/b5e5b7897e95278afc9a78e36449ee3be3299d6fa704e4bde9bbd0010fb556a5.jpg) +Figure 4. Robustness to content diversity. We show the $t2v$ Median Rank results on MSR-VTT for different amounts of content diversity measured by the number of scene transitions. Our X-Pool approach remains robust whereas mean-pooling significantly deteriorates as we increase the content diversity. + +to compare mean-pooling and top- $k$ aggregation, and second we fine-tune a pre-trained CLIP model on the MSR-VTT dataset and then measure retrieval performance for mean-pooling and top- $k$ pooling. In both settings, we set $k = 3$ which empirically yields the best overall performance. We compare the $t2v$ results in Table 3a and observe that even by using cosine similarity in top- $k$ pooling as a proxy for semantic similarity between a text and frames, we can outperform mean-pooling across all listed metrics by up to $6\%$ of relative improvement in Recall@1 through our text-conditioned pooling scheme. + +Yet, the top- $k$ aggregation function still presents some drawbacks as mentioned in Section 4.2, most notably relating to the tuning of the $k$ hyperparameter. To analyze this shortcoming, we run an experiment wherein for a zero-shot pre-trained CLIP, we find the optimal $k$ of each individual text-video pair in the MSR-VTT test set and report the results in a histogram in Figure 3b. Here, we define optimal as the $k$ value that yields the highest similarity score between a ground-truth text-video pair as defined in equation (6). We observe that the optimal choice of $k$ varies widely between text-video pairs, which makes $k$ difficult to select in general. Our proposed X-Pool model therefore addresses the drawbacks of top- $k$ pooling while being motivated by our derived insights of text-conditioned pooling. + +Robustness to Content Diversity in Videos. We now analyze the robustness of our model to content diversity as + +we described in Section 4.2. As explained, many videos inherently exhibit diverse visual content such as scene transitions or changes in object appearance for example. While current datasets such as MSR-VTT, LSMDC and MSVD already display these traits to an extent, they are curated by choosing only small video clip segments extracted from larger videos. Therefore, in order to more effectively test the robustness of text-video retrieval methods to content diversity, one way is to introduce additional diversity in visual content with more scene transitions. That is, we augment a video's visual content by randomly injecting another video from the dataset to simulate an abrupt scene transition. By performing retrieval on such augmented videos and their original text captions, we can better evaluate a retrieval model's ability to handle diverse videos in the wild. + +To that end, we construct augmented versions of the MSR-VTT test set by adding scene transitions from each video to other videos in the test set. The number of transitions is defined as the number of random videos that are added to the original video at a random location. We compare the $t2v$ retrieval performance of our X-Pool model to the baseline of mean-pooling, and plot the results in Figure 4. Here, we measure performance using the metric of Median Rank. We can clearly observe that as the number of video transitions increases and we add video content diversity, there is a sharp performance decline in mean-pooling as the Median Rank increases from 2 to 46, whereas our X-Pool model is significantly more robust to content diversity as Median rank only increases from 2 to 9. The performance gap is because any text-agnostic pooling method like mean-pooling aggregates content from all scenes of a video regardless of their relevance to an input text. Therefore, the more diverse a video is in terms of scene transitions, the more possibly noisy distractors are being aggregated. Conversely, X-Pool can extract only the most relevant visual cues as described in a text through text-conditioned pooling. + +Qualitative Results. In Figure 4, we show qualitative examples of our X-Pool model. For each example, we show four sampled frames from a video along with a bar plot representing the associated attention weights of X-Pool from the given text to each frame. In the top example, we can see that our model outputs a higher attention weight for the middle frames when the input text describes a brain animation and lower attention weights everywhere else. On the other hand, when the input text instead describes a fictional character looking at a machine, the attention weight correspondingly activates for the last frame where the text is most relevant. The second example in the middle shows a singing competition. Here, the text of "a judge hearing the voice of competitors" describes an event that requires reasoning over all of the frames. Indeed, we observe that X-Pool attends to the entire video, indicating the flexibility of our approach. + +![](images/3d5aa9a4fa54e6c1b002fd22fb4fbfb252f5e665b6bced5a5fad0f280977e74e.jpg) +Attention Weights + +![](images/de7609819921634e190b987a4a032113127bfe306e72f50a4a41b2d579efd08b.jpg) + +![](images/5f5caadbb343ba532d06e93686ed7f428edbcddb2c8ccba835585b1aceabbf59.jpg) + +![](images/8b824ba2470990d4b5417622c4d518e593287402b3d61d3dabbe3e55be520101.jpg) + +![](images/fd8d2968318cee662dad4835194fad36e755d339640979358a9a2c30322b0569.jpg) +an animation of a brain + +![](images/cf878f96da15d50830b111fde876126020deb9665e37196869e4dc9a8d0ce5e0.jpg) +animation where fictional characters look at a complicated machine + +![](images/aec63189fc527e1b018f9adddbd009eb464c7fca5ddda20f6bbe1b3c3af4dd1a.jpg) + +![](images/0219faa70855b7b3cabe58b2afc0414b1e4cff7a0a4caf62f80295b35d7b5fda.jpg) + +![](images/13546216be3c4d92339cebbb52c116abdfd99c6934d43e927ef078a2326829ba.jpg) + +![](images/5dc1a88532a643dfb54cf9bf6545870595b113985a4f62c0162b6cbc3c69b7f2.jpg) +Attention Weights +three kids sing together on the voice + +![](images/cd63f18a3f9d94d0ba8b648782c12f4365e25ca58b644f0d7e9bffcc27f38cb4.jpg) +a judge hearing the voice of competitors +Attention Weights + +![](images/5dbabe025bc0e6eabfbe8debfa636b2d3db6d904964603117380523e71c1214f.jpg) + +![](images/ef2056b08cc0484a6956b7b93a651220f8ad4f6437694571c6968188b9f4e278.jpg) + +![](images/5d274336e64b0eb171f0eec209c2d5cdff8e755548c6aa6f7f2e164ba6a46bee.jpg) + +![](images/477dd69a5b74a8ce72cf7edc4352d322080c689388bdc358f4cff6bc0f6d8d1c.jpg) +man is crossing the street with big lion and friend +two women and a female lion lay down in a street while music plays +Figure 5. Qualitative results of X-Pool from the MSR-VTT dataset. For each displayed frame above, the bar plot shows its attention weights in our model given a particular text. + +# 6. Conclusion + +In this work, we highlight the drawbacks of text-agnostic video pooling and present an alternative framework for text-conditioned pooling for text-video retrieval. We then extend our idea and derived insights to design a parametric model for cross-modal attention between a text and video frames called X-Pool. We show how X-Pool can learn to attend to the most relevant frames to a given a text, which also makes our model substantially more robust to video content diversity such as in the form of scene transitions, a property that is common in videos in the wild. As part of future work, we plan on applying text-conditioned video pooling to other cross-modal tasks like video question answering. + +# 7. Acknowledgments + +Animesh Garg is supported by CIFAR AI Chair, NSERC Discovery Award, University of Toronto XSeed award, and gifts from LG. + +# References + +[1] Jean-Baptiste Alayrac, Adria Recasens, Rosalia Schneider, Relja Arandjelovic, Jason Ramapuram, Jeffrey De Fauw, Lucas Smaira, Sander Dieleman, and Andrew Zisserman. Self-supervised multimodal versatile networks. NeurIPS, 2(6):7, 2020. 3, 7 +[2] Elad Amrani, Rami Ben-Ari, Daniel Rotman, and Alex Bronstein. Noise estimation using density estimation for self-supervised multimodal learning. arXiv preprint arXiv:2003.03186, 8, 2020. 6, 7 +[3] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 2425-2433, 2015. 2 +[4] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 5 +[5] Max Bain, Arsha Nagrani, Gül Varol, and Andrew Zisserman. Frozen in time: A joint video and image encoder for end-to-end retrieval. arXiv preprint arXiv:2104.00650, 2021. 1, 2, 3, 6, 7 +[6] Tadas Baltrusaitis, Chaitanya Ahuja, and Louis-Philippe Morency. Multimodal machine learning: A survey and taxonomy. IEEE transactions on pattern analysis and machine intelligence, 41(2):423-443, 2018. 2 +[7] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. 3 +[8] David Chen and William B Dolan. Collecting highly parallel data for paraphrase evaluation. In Proceedings of the 49th annual meeting of the association for computational linguistics: human language technologies, pages 190-200, 2011. 2, 6 +[9] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In European conference on computer vision, pages 104-120. Springer, 2020. 2, 3 +[10] Ioana Croitoru, Simion-Vlad Bogolin, Marius Leordeanu, Hailin Jin, Andrew Zisserman, Samuel Albanie, and Yang Liu. Teachtext: Crossmodal generalized distillation for text-video retrieval. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 11583-11593, 2021. 2, 6, 7 +[11] Maksim Dzabraev, Maksim Kalashnikov, Stepan Komkov, and Aleksandr Petiushko. Mdmt: Multidomain multimodal transformer for video retrieval. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3354-3363, 2021. 2, 6, 7 +[12] Valentin Gabeur, Chen Sun, Karteek Alahari, and Cordelia Schmid. Multi-modal transformer for video retrieval. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part IV 16, pages 214–229. Springer, 2020. 1, 2, 3, 6, 7 + +[13] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V Le, Yunhsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. arXiv preprint arXiv:2102.05918, 2021. 2, 3 +[14] 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. 2 +[15] Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L Berg, Mohit Bansal, and Jingjing Liu. Less is more: Clipbert for video-and-language learning via sparse sampling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7331-7341, 2021. 2, 6 +[16] Dingquan Li, Tingting Jiang, and Ming Jiang. Quality assessment of in-the-wild videos. In Proceedings of the 27th ACM International Conference on Multimedia, pages 2351-2359, 2019. 3 +[17] Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. Align before fuse: Vision and language representation learning with momentum distillation. Advances in Neural Information Processing Systems, 34, 2021. 2, 3 +[18] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and perform-. mant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019. 2 +[19] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, pages 121-137. Springer, 2020. 2 +[20] Yangguang Li, Feng Liang, Lichen Zhao, Yufeng Cui, Wanli Ouyang, Jing Shao, Fengwei Yu, and Junjie Yan. Supervision exists everywhere: A data efficient contrastive language-image pre-training paradigm. arXiv preprint arXiv:2110.05208, 2021. 2, 3 +[21] Jingen Liu, Jiebo Luo, and Mubarak Shah. Recognizing realistic actions from videos "in the wild". In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 1996-2003. IEEE, 2009. 3 +[22] Yang Liu, Samuel Albanie, Arsha Nagrani, and Andrew Zisserman. Use what you have: Video retrieval using representations from collaborative experts. arXiv preprint arXiv:1907.13487, 2019. 1, 2, 6, 7 +[23] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016. 6 +[24] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. 6 +[25] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. arXiv preprint arXiv:1908.02265, 2019. 2, 3 +[26] Huaishao Luo, Lei Ji, Ming Zhong, Yang Chen, Wen Lei, Nan Duan, and Tianrui Li. Clip4clip: An empirical study of clip for end to end video clip retrieval. arXiv preprint arXiv:2104.08860, 2021. 2, 3, 6, 7 + +[27] Antoine Miech, Jean-Baptiste Alayrac, Ivan Laptev, Josef Sivic, and Andrew Zisserman. Thinking fast and slow: Efficient text-to-visual retrieval with transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9826–9836, 2021. 2 +[28] Antoine Miech, Jean-Baptiste Alayrac, Lucas Smaira, Ivan Laptev, Josef Sivic, and Andrew Zisserman. End-to-end learning of visual representations from uncurated instructional videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9879-9889, 2020. 3, 7 +[29] Antoine Miech, Ivan Laptev, and Josef Sivic. Learning a text-video embedding from incomplete and heterogeneous data. arXiv preprint arXiv:1804.02516, 2018. 2, 6 +[30] Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto100m: Learning a text-video embedding by watching hundred million narrated video clips. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2630-2640, 2019. 2, 3, 6 +[31] Mandela Patrick, Po-Yao Huang, Yuki Asano, Florian Metze, Alexander Hauptmann, Joao Henriques, and Andrea Vedaldi. Support-set bottlenecks for video-text representation learning. arXiv preprint arXiv:2010.02824, 2020. 6, 7 +[32] Jesús Andrés Portillo-Quintero, José Carlos Ortiz-Bayliss, and Hugo Terashima-Marín. A straightforward framework for video retrieval using clip. In Mexican Conference on Pattern Recognition, pages 3–12. Springer, 2021. 2, 3, 6, 7 +[33] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020, 2021. 2, 3, 6 +[34] Anna Rohrbach, Atousa Torabi, Marcus Rohrbach, Niket Tandon, Christopher Pal, Hugo Larochelle, Aaron Courville, and Bernt Schiele. Movie description. International Journal of Computer Vision, 123(1):94-120, 2017. 2, 6 +[35] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. 3 +[36] 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. 6 +[37] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. arXiv preprint arXiv:1908.07490, 2019. 2 +[38] Reuben Tan, Bryan Plummer, Kate Saenko, Hailin Jin, and Bryan Russell. Look at what i'm doing: Self-supervised spatial grounding of narrations in instructional videos. Advances in Neural Information Processing Systems, 34, 2021. 2 +[39] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 5 +[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. 1, 2, 6 +[41] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pages 2048-2057. PMLR, 2015. 2 +[42] Li Yao, Atousa Torabi, Kyunghyun Cho, Nicolas Ballas, Christopher Pal, Hugo Larochelle, and Aaron Courville. Describing videos by exploiting temporal structure. In Proceedings of the IEEE international conference on computer vision, pages 4507-4515, 2015. 2 +[43] Youngjae Yu, Jongseok Kim, and Gunhee Kim. A joint sequence fusion model for video question answering and retrieval. In Proceedings of the European Conference on Computer Vision (ECCV), pages 471-487, 2018. 6 +[44] Andrew Zhai and Hao-Yu Wu. Classification is a strong baseline for deep metric learning. arXiv preprint arXiv:1811.12649, 2018. 5 +[45] Chuhan Zhang, Ankush Gupta, and Andrew Zisserman. Temporal query networks for fine-grained video understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4486-4496, 2021. 2 +[46] Linchao Zhu and Yi Yang. Actbert: Learning global-local video-text representations. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8746-8755, 2020. 2, 6 \ No newline at end of file diff --git a/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/images.zip b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6b47ce222259a985e09cac86cb9c1474c3b7add1 --- /dev/null +++ b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:345ddb28ba4c52ab040e42f43e1a06e76c34bf272ec34274051a59eb0a20800b +size 457831 diff --git a/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/layout.json b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..16f61dc9df92da495b5f22bc0ee8047b13c76f9a --- /dev/null +++ b/xpoolcrossmodallanguagevideoattentionfortextvideoretrieval/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67be1e466e4a1cd81360e5786bcf6d000a1e08f71372b362726613fc6116f082 +size 470027 diff --git a/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_content_list.json b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9d0cc2be60ac00101d91cf589b797609fbd76ba9 --- /dev/null +++ b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a9f770718d17eb59c21e7e26dbfeaa2f39bcf1fa61f86cfced33ade4c1a830d +size 82445 diff --git a/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_model.json b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7b5994f186d674044362ee8f0d4d0532287a4829 --- /dev/null +++ b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2c420ab16bb38eed601cfa21175f57dd7cdc95065c77cb53a0e4dd6265b7e1c +size 104759 diff --git a/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_origin.pdf b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d0b3748dac4f6a8f91422c0f2f4491839a3fce39 --- /dev/null +++ b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/021a6a48-6817-4361-8f47-74f5ff154eb5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4415a57f15649b4cecdc0180bbf0b085b842e01ee89333804ace09eef6c311f4 +size 1978793 diff --git a/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/full.md b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f46410a6cedb21e553bb54476475bc4d7ea32c88 --- /dev/null +++ b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/full.md @@ -0,0 +1,326 @@ +# X-Trans2Cap: Cross-Modal Knowledge Transfer using Transformer for 3D Dense Captioning + +Zhihao Yuan $^{1,\dagger}$ , Xu Yan $^{1,\dagger}$ , Yinghong Liao $^{1}$ , Yao Guo $^{2}$ , Guanbin Li $^{3}$ , Shuguang Cui $^{1}$ , Zhen Li $^{1,*}$ + +1The Chinese University of Hong Kong (Shenzhen), The Future Network of Intelligence Institute, Shenzhen Research Institute of Big Data, 2Shanghai Jiao Tong University, 3Sun Yat-sen University + +{zhihaoyuan@link., xuyan1@link., lizhen@}cuhk.edu.cn + +# Abstract + +3D dense captioning aims to describe individual objects in 3D scenes by natural language, where 3D scenes are usually represented as RGB-D scans or point clouds. However, only exploiting single modal information, e.g., point cloud, previous approaches fail to produce faithful descriptions. Though aggregating 2D features into point clouds may be beneficial, it introduces an extra computational burden, especially in the inference phase. In this study, we investigate a cross-modal knowledge transfer using Transformer for 3D dense captioning, namely X-Trans2Cap. Our proposed X-Trans2Cap effectively boost the performance of single-modal 3D captioning through the knowledge distillation enabled by a teacher-student framework. In practice, during the training phase, the teacher network exploits auxiliary 2D modality and guides the student network that only takes point clouds as input through the feature consistency constraints. Owing to the well-designed cross-modal feature fusion module and the feature alignment in the training phase, X-Trans2Cap acquires rich appearance information embedded in 2D images with ease. Thus, a more faithful caption can be generated only using point clouds during the inference. Qualitative and quantitative results confirm that X-Trans2Cap outperforms previous state-of-the-art by a large margin, i.e., about +21 and +16 CIDEr points on ScanRefer and Nr3D datasets, respectively. + +# 1. Introduction + +Hitherto, the computer vision community has witnessed significant progress in image captioning [3, 25, 33, 46, 50] and dense captioning [24-26, 30] under the success of deep learning techniques. Unlike image captioning describing a 2D image with a single sentence, dense captioning (DC) better interprets "A picture is worth a thousand words". + +![](images/5af47e4dd08c8896e373d41c9ac914180b245b0409c5de9a4e893e26f8d14fac.jpg) + +![](images/2c7b98a937080f56e5b54e6b6f86ee1114302280b9b4430ae194bdcf629df24f.jpg) +Figure 1. The motivation of cross-modal knowledge transfer. (a) Previous methods use the extra 2D modality as the input in both training and inference phases. (b) In contrast, we exploit a teacher-student framework with multi-modal data during training. For inference, the student network only takes 3D modality input. + +That is to say, for DC task, each object in an image is first perceived, then is provided more customized and detailed descriptions according to its nature and context. + +Most recently, 3D cross-modal learning in vision and language has gained an increasing amount of interest as well. Several datasets [1, 6, 15] and downstream applications [20, 56] are proposed and investigated. Unlike 2D images with regular grids and dense pixels, 3D data represented by a set of points are unordered and scattered in the 3D space, impeding the direct extension of 2D-based methods to 3D scenarios. To perform dense captioning on 3D point clouds, [9] proposes the first method, namely Scan2Cap, by directly combining 3D object detection with natural language generation. Specifically, Scan2Cap first employs a detection backbone to obtain object proposals, + +and then applies a relational graph and a context-aware attention captioning module to learn object relations and generate tokens. Besides, multi-view features extracted by the pre-trained E-Net [36] are further projected onto the input point cloud to enhance final captioning. However, Scan2Cap still has several issues: 1) The object representations in Scan2Cap are defective since they are solely learned from sparse 3D point clouds, thus failing to provide strong texture and color information compared with the ones generated from 2D images. 2) It requires the extra 2D input in both training and inference phases, as shown in Figure 1 (a). However, the extra 2D information is usually computation-intensive and unavailable during inference. For instance, a model training with both 2D and 3D inputs cannot apply to LiDAR scenarios that only contains 3D point cloud. + +To address the above issues, we explore how to ease the barrier of cross-modal learning on 2D and 3D data, and investigate how to effectively combine the merits of both modalities for 3D dense captioning in this paper. To this end, we first time present a flexible and novel cross-modal framework, namely X-Trans2Cap1, which transfers color and texture-aware information from 2D image into 3D object representation using Transformer [44]. Concretely, all the instances in a given scene can be firstly extracted by 3D object detection. Subsequently, the 3D features of each instance and its 2D counterpart are processed by a teacher-student framework. Within this framework, the teacher network takes the multi-modal inputs, while the student one only leverages the 3D inputs. Considering different modalities for teacher and student streams, we innovatively design a Transformer-based knowledge transfer framework with more flexible input control and better representation. Moreover, to further enhance the knowledge transfer, a modified knowledge distillation operation with cross-modal fusion (CMF) module and cross-modal feature alignment objective is proposed for knowledge generalization. Owing to the end-to-end training scheme, the priors in the 2D modality can inherently improve the teacher network and the student as well, i.e., our model takes advantage of the color and texture aware 2D representation and reduces the extra computational cost. Therefore, in the inference phase, X-Trans2Cap can perform superior captioning performance with only 3D inputs, as shown in Figure 1 (b). + +Sufficient experiments evaluated on the ScanRefer [6] and Nr3D [1] datasets have demonstrated the effectiveness of our proposed X-Trans2Cap. In specific, with the extra 2D priors and the novel framework design, X-Trans2Cap can effectively learn a better 3D object representation and boost the performance over the model without 2D priors, i.e., improving the CIDEr points on ScanRefer from 75.75 to 87.09. This result also exceeds the previous state-of-the-art Scan2Cap by about 21 CIDEr. + +In summary, our main contributions are threefold: + +- We first time propose X-Trans2Cap, a simple but effective cross-modal knowledge transfer framework for 3D dense captioning, in which an enhanced 3D representation with 2D priors is achieved. +- X-Trans2Cap leverages a modified knowledge distillation method through a novel cross-modal fusion module and feature alignment techniques merged in Transformer, eliminating extra computation burdens during inference while achieving superior knowledge transfer. +- Our X-Trans2Cap gains significant performance boost on the ScanRefer [6] (+21.0 CIDEr) and Nr3D [1] (+16.7 CIDEr) datasets. + +# 2. Related Work + +# 2.1. Image Captioning and Dense Captioning + +A broad collection of methods have been proposed in the field of image captioning in the last few years [13, 29, 33, 46, 50]. Recently, many methods focus on utilizing the attention mechanism to capture meaningful information in the image, e.g., over grid regions [33, 50] and detected objects [3, 34]. Furthermore, some works attempt to combine attention with graph neural networks [14, 23, 52, 54] or Transformer [10] to boost performance. + +For the dense captioning task, it needs to generate captions for all the detected objects. Johnson et al. [24] is the pioneer in this challenging field. Along this line, [51] considers the context outside the salient image regions and takes advantage of global image features. [26] further introduces the object relations among detected regions. However, due to the limited views of a single image, the performance of image-based dense captioning methods is significantly degraded when directly transferred to 3D scenarios. + +# 2.2. 3D Vision and Language + +Compared to image and language comprehension, 3D vision and language understanding is a relatively emerging research field. Experienced works focus on using language to confine individual objects, e.g., detecting referred 3D objects [8] or distinguishing objects according to language phrases [2]. Recently, ScanRefer [6] and ReferIt3D [1] introduce a task of localizing objects within a 3D scene given the linguistic descriptions, namely 3D visual grounding. TGNN [20] and InstanceRefer [56] follow the above settings and exploit panoptic segmentation to reduce the number of proposals. 3D dense captioning is proposed very lately in Scan2Cap [9]. It focuses on decomposing 3D scenes and describing the chromatic and spatial information of the objects. Very recently, [61] combines the above task of 3D grounding and caption to mutually enhance the performance of two tasks. Though promising, it + +![](images/2e01e063a088ce4e982e8f17875172874c45be7b3113c0943fedc9ac8ec185c4.jpg) +(a) + +![](images/e2b65a5b340fbfb93c15895d20396ffe9678e45eb2ceec856646ddb9f3108831.jpg) +(b) +Figure 2. X-Trans2Cap. Part (a) describes the object representation, where the 3D proposals are utilized in the generation of pure 3D modal inputs. By integrating their 2D counterparts, multi-modal inputs are obtained. Part (b) illustrates the architecture of X-Trans2Cap, where the framework adheres to a teacher-student design. Both the teacher and student networks consist of several Transformer encoder layers and a decoder layer. + +only takes point clouds as input to generate instance features. Compared with the well-organized 2D images containing stronger texture and color information, such representation inherently challenges the learning process. + +# 2.3. Cross-modal Knowledge Transferring + +Previous studies apply 2D images as the extra inputs to 3D tasks, e.g., 3D object detection [28, 37, 39, 49], semantic segmentation [12, 19, 22] and object tracking [59, 60]. However, they require extra 2D information in both the training and inference phases. Thus, it inevitably augments computational burdens during evaluation and severely limits the efficiency in real-world applications. The concept of knowledge distillation was first shown by Hinton et al. [18]. Subsequent research [4, 7] enhanced distillation by matching intermediate representations in the networks along with outputs using different approaches. Zagoruyko et al. [57] proposed to align attentional activation maps between networks. Srinivas and Fleuret [43] improved it by applying Jacobian matching to networks. In recent years, cross-modal knowledge distillation [16, 47, 55, 58] extended knowledge distillation by applying it to transferring knowledge across different modalities. Very recently, there are works attempting to only utilize 2D images during training phase to address the above problems. Among them, the 2D-assisted pre-training [32], inflating 2D convolution kernels to 3D [48] and joint training with mask attention [53] are proposed. Unlike those, we adopt a well-designed teacher + +student framework with cross-modal fusion for more efficacious knowledge transfer, and the experiment results also demonstrate that our approach is much better than previous knowledge transferring. + +# 3. Method + +Our X-Trans2Cap is developed upon a teacher-student framework [18], which is widely exploited in the knowledge distillation research field. The detailed architecture of X-Trans2Caps is presented in Figure 2. X-Trans2Cap takes two types of features as input, i.e., pure 3D modal input for student and multi-modal input for teacher respectively. We first introduce the details of the above feature representation in Section 3.1. Then we propose a baseline model for 3D dense captioning through Transformers [44] in Section 3.2, named TransCap. In Section 3.3, we illustrate how X-Trans2Cap transfers the 2D priors to the 3D representations, in which a cross-modal fusion (CMF) module is proposed. The details of training objectives are presented in Section 3.4. Finally, by incorporating the above components in a whole architecture, we illustrate the data flow of X-Trans2Cap in training and inference phases in Section 3.5. + +# 3.1. Object Representation + +As shown in Figure 2 (a), our framework takes object-level representation as input, and each object feature is de + +noted as a token. Given that there are $M$ objects in the 3D scene, in the remaining section, the objects set is represented as $\mathbf{O} = \{O_m\}_{m=1}^M$ , in which $O_m$ and $O_m^{att}$ are depicted as the $m$ -th object and the attribute of the $m$ -th object, respectively. In each iteration, we randomly choose an object as the target object $(O_*)$ to be described as in [9]. The other $M-1$ objects, i.e., $\{O_m \in \mathbf{O}\} \cap \{O_m \neq O_*\}$ , are treated as the reference objects, and only provide the cues of locations or relations to the target object. + +For the 3D modal input, each object is considered from the perspective of its 3D feature, semantic, size as well as relative position to the target object. Specifically, the object representation is computed as follows: + +$$ +F _ {m} ^ {3 d} = \mathcal {T} _ {1} ([ O _ {m} ^ {f 3 d}; O _ {m} ^ {c l s}; W _ {1} O _ {m} ^ {b 3 d}; W _ {2} O _ {m} ^ {p e} ]), \quad (1) +$$ + +where $[\cdot ;\cdot ]$ indicates the concatenation operation. $O_{m}^{f3d}$ is the output feature extracted by a 3D network, e.g., PointNet++ [40], and $O_{m}^{cls}$ is a one-hot vector for their predicted semantic class. $O_{m}^{b3d}$ is the 3D bounding box of the object, consisting of the bounding box center $(x,y,z)$ and size $(w,h,l)$ . To a better object representation, we further design a positional encoding $O_{m}^{pe}$ for the $m$ -th object as: + +$$ +\begin{array}{l} O _ {m} ^ {p e} = \left[ O _ {m} ^ {x} - O _ {*} ^ {x}; O _ {m} ^ {y} - O _ {*} ^ {y}; O _ {m} ^ {z} - O _ {*} ^ {z}; \right. \tag {2} \\ O _ {m} ^ {w} / O _ {*} ^ {w}; O _ {m} ^ {h} / O _ {*} ^ {h}; O _ {m} ^ {l} / O _ {*} ^ {l} ]. \\ \end{array} +$$ + +The first three elements in the positional encoding calculate the center offset between the target object and $m$ -th object, and the others denote their relative size. Two learnable projection matrices $W_{1}$ and $W_{2}$ in Eqn. (1) then transform the dimensions of $O_{m}^{b3d}$ and $O_{m}^{pe}$ to $d$ . Finally, a transformation function $\mathcal{T}_{1}$ generates the final object feature $F_{m}^{3d}$ for the $m$ -th object. + +Apart from 3D information in the multi-modal input, the corresponding 2D feature $O_{m}^{f2d}$ and 2D bounding box $O_{m}^{b2d}$ are introduced for the $m$ -th object as follows: + +$$ +\begin{array}{l} F _ {m} ^ {\text {m u l t i}} = \mathcal {T} _ {2} ([ O _ {m} ^ {f 3 d}; O _ {m} ^ {c l s}; W _ {1} O _ {m} ^ {b 3 d}; W _ {2} O _ {m} ^ {p e};) \tag {3} \\ O _ {m} ^ {f 2 d}; \left. W _ {3} O _ {m} ^ {b 2 d} \right]). \\ \end{array} +$$ + +Concretely, for each object, its ground truth of the 3D bounding box is projected onto the original ScanNet videos [11] to obtain the corresponding 2D boxes. In each training step, an image is randomly selected from the video sequences to generate an extra input. Features in the 2D box area are extracted by the Faster-RCNN detector [41] pre-trained on the Visual Genome [27] dataset, which are regarded as 2D features for the $m$ -th instance, i.e., $O_{m}^{f2d}$ . Finally, as shown in Eqn. (3), by applying linear and nonlinear transformations $W_{3}$ and $T_{2}$ , a $d$ -dimensional multi-modal representation $F_{m}^{\mathrm{multi}}$ is generated for the $m$ -th object. + +As shown in Figure 2 (a), the multi-modal and 3D modal inputs have the same format, and each of them is a set of + +object features with the shape of $\mathbb{R}^{M\times d}$ , in which the features of the target object and $M - 1$ reference objects are entailed. For convenience, we denote the multi-modal input as $\mathbf{F}^{\mathrm{multi}} = \{F_m^{\mathrm{multi}}\}_{m = 1}^M$ , and the 3D one as $\mathbf{F}^{3d} = \{F_m^{3d}\}_{m = 1}^M$ . Then, these two inputs are fed to the teacher and student networks for the cross-modal knowledge transfer. + +# 3.2. Baseline Model: TransCap + +To apply the 3D and multi-modal object representation to our framework, we first introduce a baseline model, named TransCap, which employs Transformer [44] structure to generate the descriptions of the target object. The student network in Figure 2 (b) displays the architecture of TransCap. It contains $L$ encoder layers and one decoder layer. In each encoder layer, a self-attention mechanism is exploited to obtain a permutation invariant encoding for the input feature. Inspired by [10], we design the self-attention operator SA( $\cdot$ ) as follows: + +$$ +\begin{array}{l} \operatorname {S A} (\mathbf {X}) = \operatorname {A t t e n t i o n} (\mathbf {Q}, \mathbf {K}, \mathbf {V}), \\ \mathbf {Q} = W _ {q} \mathbf {X}, \mathbf {K} = \left[ W _ {k} \mathbf {X}; M _ {k} \right], \mathbf {V} = \left[ W _ {v} \mathbf {X}; M _ {v} \right], \tag {4} \\ \end{array} +$$ + +where $\mathbf{X} \in \mathbb{R}^{M \times D}$ is a $D$ -dimensional sequence, and $W_{q}, W_{k}$ and $W_{v}$ are matrices of learnable weights. Different from the traditional attention mechanism [44], the two persistent memory vectors $M_{k}$ and $M_{v}$ are appended to learn the prior knowledge. + +The captioning decoder is conditioned on previously generated words and features from the encoder layers to generate the next token. Specifically, it integrates the features from different encoder layers and performs the cross-attention on the generated tokens. + +$$ +\operatorname {D e c o d e r} \left(\hat {\mathbf {X}} _ {l}, \mathbf {Y}\right) = \sum_ {l = 1} ^ {L} \alpha_ {l} \odot \operatorname {C A} \left(\hat {\mathbf {X}} _ {l}, \mathbf {Y}\right), \tag {5} +$$ + +where $\mathrm{CA}(\cdot, \cdot)$ stands for the encoder-decoder cross-attention [44], computed using queries from the decoder output $\mathbf{Y}$ , and keys and values from the $l$ -th layer encoder output $\hat{\mathbf{X}}_l$ . $\alpha$ are learnable weights having the same size as the cross-attention results. In this manner, TransCap takes a sequence of object features as the input, and generates the description for the target object. + +# 3.3. Cross-Modal Fusion Module + +The Cross-modal fusion (CMF) module enables cross-modal feature interaction between pure 3D and multi-modal feature representations. As shown in Figure 3, it is designed to construct interaction from the student network to the teacher at the same encoder level, thus building a bridge to fuse features between single and multiple modalities. Moreover, to further enhance the ability of the student network to learn the multi-modal representation, we exploit a random + +![](images/f82197366b2f8c521903cb5b4078a091e9ed7fcc95bc17135cf6889998a3e7f6.jpg) +Figure 3. Cross-Modal Fusion (CMF) Module. It is designed to construct the interactionon from the student to the teacher network at the same encoder level, interacting the features of different modalities. During the training phrase, the features from the teacher network are randomly masked with a specific probability. + +mask on the features from the teacher network. Owing to this framework, the strengths of multi-modal representation can be assimilated to reinforce the student network via an end-to-end training protocol. Specifically, we element-wise add the student features with the masked teacher features. + +$$ +\hat {\mathbf {X}} _ {l} ^ {*} = \hat {\mathbf {X}} _ {l} ^ {\text {s t u d e n t}} \oplus \mathcal {I} (p) \hat {\mathbf {X}} _ {l} ^ {\text {t e a c h e r}}, \tag {6} +$$ + +where the $\hat{\mathbf{X}}_l^{\mathrm{student}}$ and $\hat{\mathbf{X}}_l^{\mathrm{teacher}}$ denote features from $l$ -th encoder layer of student and teacher networks, respectively. The notation $\oplus$ means element-wise addition. The mask indicator $\mathcal{I}(p)$ is initialized with 1 and has the probability of $p$ change to 0. After that, we feed the fused features into the next encoder layer of the teacher network. It should be highlighted that, since our CMF module employs the single-directional connection from the student to the teacher, the teacher network can be discarded during inference, i.e., it introduces no extra computation for the student network. Moreover, various designs for the CMF module, including ablations, are shown in Section 4.4. + +# 3.4. Objective Function + +Feature alignment loss. Following a standard practice in knowledge transfer, we use Huber loss $\mathcal{L}_{\mathrm{align}}$ (i.e., Smooth-L1 regression loss) to align decoder features between teacher and student networks. + +Captioning loss. As in the previous work [9], we apply a conventional cross entropy loss function $\mathcal{L}_{\mathrm{ce}}$ on the generated token probabilities in both teacher and student networks. Furthermore, to further boost the performance, we propose an enhanced version model X-Trans2Cap (C) by applying the CIDEr-D score [3] $\mathcal{L}_{\mathrm{CIDEr}}$ as reward. Following the previous work [10], we baseline the reward using the + +mean of the rewards rather than greedy decoding following previous methods [3, 42]. + +Total objective loss. We combine all three loss terms linearly as our final objective loss function: + +$$ +\mathcal {L} = \alpha \mathcal {L} _ {\text {a l i g n}} + \beta \mathcal {L} _ {\mathrm {c e}} + \gamma \mathcal {L} _ {\mathrm {C I D E r}}, \tag {7} +$$ + +where $\alpha, \beta$ and $\gamma$ are the weights for each individual loss. To guarantee the loss terms are roughly of the same magnitude, we fine-tune weights on the validation split, and set those to $\alpha = 1$ , $\beta = 1$ , and $\gamma = 0.1$ empirically in the experiments. + +# 3.5. Training and Inference Schemes + +The black and red arrows in the Figure 2 (b) illustrate the information flow of the X-Trans2Cap for training and inference. It is noteworthy that teacher and student networks are trained from scratch. In the training phase, both networks are exploited (see the black and red arrows in Figure 2 (b)), and CMF modules between corresponding encoder layers and feature alignment are conducted to enhance mutual representation. During the inference, if only the 3D modality exists, we only apply the student network (see the red arrow in Figure 2 (b)). However, if the auxiliary 2D information is available as well, the stronger teacher framework will be exploited. In our experiment, we demonstrate that our architecture can both enhance the performance of teacher and student networks with and without additional modality. + +# 4. Experiment + +We compare our method with Scan2Cap and 2D baselines proposed in their paper. Extending from [9], we further compare all methods on Nr3D dataset [1]. More experiment results including subjective evaluation and ablations are in the supplementary material. + +# 4.1. Datasets + +ScanRefer. The ScanRefer dataset [6] annotates 800 3D indoor scenes in the ScanNet [11] dataset with 51,583 language queries. It follows the official ScanNet splits and contains 36,665, 9,508, and 5,410 samples in train/val/test sets, respectively. Since the dataset is initially used in visual grounding and the labels of the test set are inaccessible, we follow the same setting as in [9] to form the train and val sets for training and testing. + +Nr3D. The Natural Reference in 3D (Nr3D) [1] has the same train/val split as ScanRefer. It contains 41,503 queries annotated by Amazon Mechanical Turk (AMT) workers. Compared with ScanRefer dataset, Nr3D is more challenging since it does not contain the fixed or redundant sentence patterns, i.e., declarative sentences starting with "this is" or "that is". We do not compare our method on its counterpart, the Spatial Reference in 3D (Sr3D) dataset, since it is totally generated by the machine templates. + +Table 1. Comparison of 3D dense captioning results obtained by X-Trans2Cap and previous methods using ground truth instances on ScanRefer and Nr3D datasets. We introduce the conventional captioning metrics, i.e., CIDEr (C), BLEU-4 (B-4),METEOR (M) and ROUGE (R) for evaluation. The column 'Extra 2D' means whether using extra 2D modality in the inference phase. X-Trans2Cap (C) denotes the original model exploiting extra $\mathcal{L}_{\mathrm{CIDEr}}$ loss in the final objective function. + +
MethodExtra 2DScanReferNr3D
CB-4MRCB-4MR
Scan2Cap [9]X65.7938.5428.8161.9363.3632.0728.9264.56
Scan2Cap (Inst)X64.4436.8928.4260.4261.8932.0228.8864.17
TransCapX75.7542.0628.8262.6270.6035.9929.0466.00
X-Trans2CapX87.0944.1230.6764.3780.0237.9030.4867.64
X-Trans2Cap (C)X89.4644.4630.7164.5581.4439.0830.7968.15
Scan2Cap [9]✓67.9541.4929.2363.6664.1332.9829.7565.24
Scan2Cap (Inst)✓70.0441.5729.6764.1064.0033.1929.5365.29
TransCap✓88.7244.2430.9564.7077.5537.2530.6367.43
X-Trans2Cap✓89.7344.2531.0064.5085.3839.5231.2368.18
X-Trans2Cap (C)✓106.1149.0732.2565.5485.4040.5131.3668.84
+ +# 4.2. Tasks and Metrics + +Tasks. In our experiment, we follow [9] and design two protocols to evaluate the generated caption: + +- Dense captioning with ground truth instances (Oracle DC): In this setting, the point cloud of each instance is given. Then one needs to generate faithful captions based on their attribute information and spatial relationships. +- Dense captioning with 3D scans (Scan DC): This setting is more challenging. One needs to detect objects from the 3D scans first and then generate captions for each object according to the detection results. + +Metrics. In Oracle DC, we directly apply CIDEr [45], BLEU-4 [35], METEOR [5] and ROUGE [31] averagely on all instances as metrics. For brevity, we simplify them as C, B-4, M and R, correspondingly. + +In Scan DC, to jointly measure the quality of generated captions and detected bounding boxes, we evaluate them by combining above metrics with Intersection-over-Union (IoU) scores between predicted bounding boxes and GT bounding boxes. Specifically, we follow [9] and define the combined metrics as $m@k\mathrm{IoU} = \frac{1}{N}\sum_{i=1}^{N}m_iu_i$ , where $u_i \in \{0,1\}$ is set to 1 if the IoU score for the $i$ -th box exceeds $k$ , otherwise 0. We use $m$ to represent the above captioning metrics, e.g., CIDEr. $N$ is the number of detected object bounding boxes. We also use mean average precision (mAP) thresholded by IoU as the object detection metric. + +# 4.3. 3D Dense Captioning Results + +Oracle dense captioning. The results of Oracle DC task are displayed in Table 1. In the upper part, we compare results without the extra 2D input for inference. Scan2Cap and Scan2Cap (Inst) denote the methods that exploit groundtruth (GT) boxes and GT instances as input, respectively. + +Merely using the baseline model TransCap, we improve the captioning result by a large margin compared to Scan2Cap (+9.96 and +7.24 CIDEr points on ScanRefer and Nr3D). Utilizing our cross-modal knowledge transfer training strategy further boost the performance on all the captioning metrics. Specifically, after using our teacher student framework, X-Trans2Cap achieves 11.04 and 9.42 CIDEr improvement over TransCap on the ScanRefer and Nr3D datasets, where the performance on both datasets are about 20 CIDEr scores higher than those of Scan2Cap. The bottom part of Table 1 illustrates the result using extra 2D input in both the training and inference phases. Though using the extra 2D input for inference, the performance of Scan2Cap is still inferior to that of our proposed X-Trans2Cap only exploiting 3D modal input, let alone using multi-modal. Besides, X-Trans2Cap is better than TransCap when both using the extra 2D input, especially on Nr3D (85.38 vs 77.55 CIDEr), which illustrates that training with student network can even improve the result of teacher network. Furthermore, with CIDEr-D score optimization, i.e., X-Trans2Cap (C) model, the performance of captioning can be further improved. + +Scan dense captioning. In Table 2, we compare the result of Scan DC, which shows results without and with extra 2D input in the inference phase. The method for proposal generation is listed in the third column. Among these methods, 2D-3D Proj. and 3D-2D Proj. are two baseline methods proposed in [9]. 2D-3D Proj. applies Mask R-CNN [17] to generate 2D proposals in images, where the corresponding 2D bounding boxes and features are fed into the description generation module [9]. On the contrary, 3D-2D Proj. exploits VoteNet [38] to extract 3D proposals, which are projected back to 2D images. Then the projected 2D proposals are finally adopted [50] to generate captions. As shown in Table 2, 2D-based methods obtain lowest caption + +Table 2. Comparison of 3D dense captioning obtained by X-Trans2Cap and previous methods, taking 3D Scans as the input on ScanRefer dataset. We average the scores of the above captioning metrics, which are with the IoU percentage between the predicted bounding box and the ground truth over 0.25 and 0.5, respectively. The 'Extra 2D' means that whether using the extra 2D modality as above. ${2D} - {3D}$ Proj. and ${3D} - {2D}\operatorname{Proj}$ . represent the method in [9], i.e., 2D proposal mapped to 3D and 3D proposal projected to 2D images, respectively. 'Proposals' shows the methods exploited to obtain 2D or 3D proposals. + +
MethodExtra 2DProposalsC@0.25B-4@0.25M@0.25R@0.25C@0.5B-4@0.5M@0.5R@0.5mAP@0.5
Scan2cap [9]XVoteNet50.7133.0125.4753.6033.5321.5821.0443.0332.46
TransCapXVoteNet55.3632.4625.6453.1940.0822.8621.7244.0433.34
X-Trans2CapXVoteNet58.8134.1725.8154.1041.5223.8321.9044.9734.68
2D-3D Proj. [50]✓Mask R-CNN18.2910.2716.6733.638.312.3112.5425.9310.50
3D-2D Proj. [50]✓VoteNet19.7317.8619.8340.6811.478.5615.7331.6531.83
Scan2cap [9]✓VoteNet56.8234.1826.2955.2739.0823.3221.9744.7832.21
TransCap✓VoteNet60.0435.0426.2754.4643.1224.2522.1544.7234.34
X-Trans2Cap✓VoteNet61.8335.6526.6154.7043.8725.0522.4645.2835.31
+ +![](images/1e2d324cc7306b3540929b45fd3da06e2e9e31d1bb92b93221f62bc431ce65c3.jpg) +Scan2Cap: The cabinet is white and wooden. It is to the right of the bed. + +![](images/e9641cb2c01a6287d75b893ef1af0b865a5e6ad3aad301f4d604495ab4163469.jpg) +X-Trans2Cap: The cabinet is brown and wooden. It is to the left of the bed. +Figure 4. Qualitative comparisons on ScanRefer dataset. The upper illustrates the results applying ground truth instances (i.e., Oracle DC task), and the lower part presents the results using object detection (i.e., Scan DC task). Best viewed in color. + +![](images/b5c1ea7084d137f7d8027ca04b94482332f0e7032ea9a414c0d1cec1aa2b4260.jpg) +Scan2Cap: The bathtub is brown. It is to the right of the toilet. +X-Trans2Cap: There is a white bathtub. This bathtub is in the bathroom. It is to the left of the toilet. + +![](images/a3356677a21cd7f1baf909f6b47636e0f0c4589d873df7bb2d8da91a650c4151.jpg) +Ground Truth: The cabinet is tall and wooden. It is between the window and the bed. +Ground Truth: This is a tan bathtub. This bathtub is in the bathroom, across from the toilet. + +# Scan2Cap + +This is a white refrigerator. It is to the right of the refrigerator. + +# X-Trans2Cap + +This is a white refrigerator. It is in the corner, located to the left of the stove. + +# Ground Truth + +This is a white refrigerator. The refrigerator is in the corner, to the left of the stove. + +ing scores, which reveals that they cannot directly handle the 3D dense captioning task. Though Scan2Cap achieves better results than these 2D based methods, it is much inferior to X-Trans2Cap without the assistance of appealing 2D priors and dedicated network structure. Surprisingly, we observe that the detection performance of X-Trans2Cap is improved as well, though there is no extra 2D input fed into the detector during training and testing. It confirms that our X-Trans2Cap is not only capable of faithful caption generation, but also acquires the knowledge mining capacity within multi-modalities for more complex applications, i.e., digging out the information embedded into language description for 3D visual detection. The results of Scan DC on Nr3D dataset are illustrated in the supplementary. + +Visualization. Figure 4 presents the visualization results + +of X-Trans2Cap, which demonstrates great improvements upon Scan2Cap for more faithful captions. Furthermore, we present the corresponding 2D counterparts within each 3D scene. Regarding 2D images, they can provide stronger texture and color information obviously when compared with sparse point cloud. + +Comparison for knowledge transfer. To further verify the effectiveness of our proposed method upon common teach-student architecture and other cross-modal manners, we compare X-Trans2Cap with typical approaches of knowledge transfer in Table 3. Among all the methods, Hinton et al. [18] and Huang et al. [21] are pure knowledge distillation designs, where the former is the pioneer for the research filed and the latter is newly proposed. As shown in the table, pure knowledge distillation manners cannot be + +Table 3. Comparison for knowledge transfer. The results are obtained in Oracle DC on the ScanRefer dataset, where we compare both single-modal and cross-modal knowledge transfer methods. + +
Method (Year)CB-4MR
Hinton et al. [18] (2015)81.4342.8530.4064.07
Huang et al. [21] (2021)78.6141.9330.1463.78
Pixel-to-point [32] (2021)77.8241.9829.4262.79
2D SAT [53] (2021)80.1341.1330.0063.16
TransCap (baseline)75.7542.0628.8262.62
X-Trans2Cap (pre-trained)79.4142.7829.8863.41
X-Trans2Cap87.0944.1230.6764.37
+ +directly adopted on the 3D DC scenario, and their improvement upon the baseline model is limited. Very recently, approaches [32] and [53] adopt cross-modal knowledge transfer technique in the 3D tasks. The core idea of [32] is using extra 2D input to conduct 3D pre-training. We modify it by first training a TransCap with multi-modal input, then use its pre-trained parameters as initialization weights for pure 3D input training. For 2D semantic-assisted training (SAT) [53], it treats 2D features as additional tokens in (i.e., concatenated in sequence dimension) the same model, and then exploits an attention mask in Transformer layers. This mask only ignores the attention from 3D to the 2D. However, both methods cannot boost the performance as no mutual enhancement is introduced. + +We also offer an offline distillation design, preparing a pre-trained teacher network before training the student network, called X-Trans2Cap (pre-trained) in the bottom part of the Table 3. It can be noticed that using pretrained teacher network results in a performance drop of 7.38 CIDEr, which may result from the distribution gap between multi-modality data. To the end, in the Table 3, X-Trans2Cap significantly performs better, which illustrates the effectiveness of the teacher-student framework and cross-modal fusion (CMF) module. + +# 4.4. Analysis and Ablation Studies + +Does knowledge transfer help? As results shown in Table 1 and 2, when we adopt 2D prior during the training phase (X-Trans2Cap), it can greatly improve the performance upon the baseline model (TransCap). + +Does our proposed components help? To further verify the effectiveness of different components, we conduct the ablation studies in the Table 4. As shown in Table 4, model A is our baseline model (TransCap), and model B is our entire architecture of X-Trans2Cap. The model C is the ablated architecture that discards the feature alignment loss $\mathcal{L}_{\mathrm{align}}$ . It can be found out that there is a great performance drop from 87.09 to 79.58 in terms of CIDEr metric. Fortunately, due to the advantage of CMF module, it still has 3.83 improvement upon the baseline model. Similarly, the per + +Table 4. Ablation study for applying different knowledge transfer designs. The results are obtained in Oracle DC on the ScanRefer dataset. The upper part shows ablated results without specific components, and the lower illustrates results of CMF designs. + +
DesignCB-4MR
ATransCap (baseline)75.7542.0628.8262.62
BX-Trans2Cap87.0944.1230.6764.37
Cw/o L align79.5841.4730.0763.59
Dw/o CMF80.5443.1530.1963.59
EConcatenation79.8743.2830.2264.88
Fw/o Randon Mask85.3642.5730.5264.18
GAttention [44]80.8544.7530.4564.91
+ +formance drop is appearing (-5.25 CIDEr) when removing the CMF module (model D). This result demonstrates that both framework architecture and CMF module play important roles in X-Trans2Cap. + +How to design cross-modal fusion? We illustrate the results from different designs of CMF module in the bottom part of the Table 4. On the one hand, discarding the random mask hampers the caption results, as shown in model F. On the other hand, exploiting more complicated operations such as concatenation and attention mechanism cannot effectively improve the performance. There is only a slight improvement on the metrics of BLEU-4 and Rough for adopting attention. However, it will greatly increase the model complexity while make the CIDEr decline. + +# 5. Conclusion + +In this work, we propose an enhanced 3D dense captioning method via cross-modal knowledge transfer, named X-Trans2Cap. By designing the network architecture and knowledge distillation method carefully, our X-Trans2Cap outperforms previous methods by a large margin on multiple datasets with more faithful captions. We believe that our work can be applied to a wider range of 3D vision and language scenarios, and provide a solution to the comprehension of 3D scenes with severe texture details missing, i.e., leveraging the 2D priors and the cross-modal knowledge transfer to improve the performance. + +# Acknowledgment + +This work was supported in part by NSFC-Youth 61902335, by Key Area R&D Program of Guangdong Province with grant No.2018B030338001, by the National Key R&D Program of China with grant No.2018YFB1800800, by Shenzhen Outstanding Talents Training Fund, by Guangdong Research Project No.2017ZT07X152, by Guangdong Regional Joint Fund-Key Projects 2019B1515120039, by the NSFC 61931024&81922046, by helixon biotechnology company Fund and CCF-Tencent Open Fund. + +# References + +[1] Panos Achlioptas, Ahmed Abdelreheem, Fei Xia, Mohamed Elhoseiny, and Leonidas Guibas. Referit3d: Neural listeners for fine-grained 3d object identification in real-world scenes. In European Conference on Computer Vision, pages 422-440. Springer, 2020. 1, 2, 5 +[2] Panos Achlioptas, Judy Fan, Robert Hawkins, Noah Goodman, and Leonidas J Guibas. Shapeplot: Learning language for shape differentiation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8938-8947, 2019. 2 +[3] 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. 1, 2, 5 +[4] Lei Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? NeurIPS, page 2654-2662, 2014. 3 +[5] Satanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72, 2005. 6 +[6] Dave Zhenyu Chen, Angel X Chang, and Matthias Nießner. Scanrefer: 3d object localization in rgb-d scans using natural language. 16th European Conference on Computer Vision (ECCV), 2020. 1, 2, 5 +[7] Guobin Chen, Wongun Choi, Xiang Yu, Tony Han, and Manmohan Chandraker. Learning efficient object detection models with knowledge distillation. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 742-751, 2017. 3 +[8] Kevin Chen, Christopher B Choy, Manolis Savva, Angel X Chang, Thomas Funkhouser, and Silvio Savarese. Text2shape: Generating shapes from natural language by learning joint embeddings. In *Asian Conference on Computer Vision*, pages 100–116. Springer, 2018. 2 +[9] Zhenyu Chen, Ali Gholami, Matthias Nießner, and Angel X Chang. Scan2cap: Context-aware dense captioning in rgb-d scans. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3193-3203, 2021. 1, 2, 4, 5, 6, 7 +[10] Marcella Cornia, Matteo Stefanini, Lorenzo Baraldi, and Rita Cucchiara. Meshed-memory transformer for image captioning. In Proceedings of the IEEE/CVF + +Conference on Computer Vision and Pattern Recognition, pages 10578-10587, 2020. 2, 4, 5 +[11] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. pages 5828-5839, 2017. 4, 5 +[12] Angela Dai and Matthias Nießner. 3dmv: Joint 3d-multi-view prediction for 3d semantic scene segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 452-468, 2018. 3 +[13] Jeffrey Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2625-2634, 2015. 2 +[14] Lizhao Gao, Bo Wang, and Wenmin Wang. Image captioning with scene-graph based semantic concepts. In Proceedings of the 2018 10th International Conference on Machine Learning and Computing, pages 225–229, 2018. 2 +[15] Ankit Goyal, Kaiyu Yang, Dawei Yang, and Jia Deng. Rel3d: A minimally contrastive benchmark for grounding spatial relations in 3d. Advances in Neural Information Processing Systems, 33, 2020. 1 +[16] Saurabh Gupta, Judy Hoffman, and Jitendra Malik. Cross modal distillation for supervision transfer. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2827-2836, 2016. 3 +[17] 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. 6 +[18] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. NeurIPS Workshops, 2014. 3, 7, 8 +[19] Wenbo Hu, Hengshuang Zhao, Li Jiang, Jiaya Jia, and Tien-Tsin Wong. Bidirectional projection network for cross dimension scene understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14373-14382, 2021. 3 +[20] Pin-Hao Huang, Han-Hung Lee, Hwann-Tzong Chen, and Tyng-Luh Liu. Text-guided graph neural networks for referring 3d instance segmentation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 1610-1618, 2021. 1, 2 +[21] Zhen Huang, Xu Shen, Jun Xing, Tongliang Liu, Xinmei Tian, Houqiang Li, Bing Deng, Jianqiang Huang, + +and Xian-Sheng Hua. Revisiting knowledge distillation: An inheritance and exploration framework. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3579-3588, 2021. 7, 8 +[22] Maximilian Jaritz, Jiayuan Gu, and Hao Su. Multiview pointnet for 3d scene understanding. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, pages 0-0, 2019. 3 +[23] Hu Jingpeng, Li Zhuo, Chen Zhihong, Li Zhen, Wan Xiang, and Chang Tsung-Hui. Graph enhanced contrastive learning for radiology findings summarization. In Proceedings of Association for Computational Linguistics (ACL), 2022. 2 +[24] Justin Johnson, Andrej Karpathy, and Li Fei-Fei. Densecap: Fully convolutional localization networks for dense captioning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4565–4574, 2016. 1, 2 +[25] 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. 1 +[26] Dong-Jin Kim, Jinsoo Choi, Tae-Hyun Oh, and In So Kweon. Dense relational captioning: Triple-stream networks for relationship-based captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6271-6280, 2019. 1, 2 +[27] 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. 4 +[28] Jean Lahoud and Bernard Ghanem. 2d-driven 3d object detection in rgb-d images. In Proceedings of the IEEE international conference on computer vision, pages 4622-4630, 2017. 3 +[29] Jianan Li, Yunchao Wei, Xiaodan Liang, Fang Zhao, Jianshu Li, Tingfa Xu, and Jiashi Feng. Deep attribute-preserving metric learning for natural language object retrieval. pages 181-189, 2017. 2 +[30] Xiangyang Li, Shuqiang Jiang, and Jungong Han. Learning object context for dense captioning. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pages 8650-8657, 2019. 1 +[31] Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81, 2004. 6 + +[32] Yueh-Cheng Liu, Yu-Kai Huang, Hung-Yueh Chiang, Hung-Ting Su, Zhe-Yu Liu, Chin-Tang Chen, Ching-Yu Tseng, and Winston H Hsu. Learning from 2d: Pixel-to-point knowledge transfer for 3d pretraining. arXiv preprint arXiv:2104.04687, 2021. 3, 8 +[33] Jiasen Lu, Caiming Xiong, Devi Parikh, and Richard Socher. Knowing when to look: Adaptive attention via a visual sentinel for image captioning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 375-383, 2017. 1, 2 +[34] Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Neural baby talk. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7219-7228, 2018. 2 +[35] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318, 2002. 6 +[36] Adam Paszke, Abhishek Chaurasia, Sanggil Kim, and Eugenio Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation. arXiv preprint arXiv:1606.02147, 2016. 2 +[37] Charles R Qi, Xinlei Chen, Or Litany, and Leonidas J Guibas. Imvotenet: Boosting 3d object detection in point clouds with image votes. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4404-4413, 2020. 3 +[38] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. pages 9277–9286, 2019. 6 +[39] 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. 3 +[40] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. pages 5099-5108, 2017. 4 +[41] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. Advances in neural information processing systems, 28:91-99, 2015. 4 +[42] 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. 5 +[43] Suraj Srinivas and François Fleuret. Knowledge transfer with jacobian matching. In International Confer + +ence on Machine Learning, pages 4723-4731. PMLR, 2018. 3 +[44] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. pages 5998-6008, 2017. 2, 3, 4, 8 +[45] Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4566-4575, 2015. 6 +[46] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3156-3164, 2015. 1, 2 +[47] Lichen Wang, Jiaxiang Wu, Shao-Lun Huang, Lizhong Zheng, Xiangxiang Xu, Lin Zhang, and Junzhou Huang. An efficient approach to informative feature extraction from multimodal data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 5281-5288, 2019. 3 +[48] Chenfeng Xu, Shijia Yang, Bohan Zhai, Bichen Wu, Xiangyu Yue, Wei Zhan, Peter Vajda, Kurt Keutzer, and Masayoshi Tomizuka. Image2point: 3d pointcloud understanding with pretrained 2d convnets. arXiv preprint arXiv:2106.04180, 2021. 3 +[49] Danfei Xu, Dragomir Anguelov, and Ashesh Jain. Pointfusion: Deep sensor fusion for 3d bounding box estimation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 244–253, 2018. 3 +[50] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pages 2048-2057. PMLR, 2015. 1, 2, 6, 7 +[51] Linjie Yang, Kevin Tang, Jianchao Yang, and Li-Jia Li. Dense captioning with joint inference and visual context. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2193-2202, 2017. 2 +[52] Xu Yang, Kaihua Tang, Hanwang Zhang, and Jianfei Cai. Auto-encoding scene graphs for image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10685–10694, 2019. 2 +[53] Zhengyuan Yang, Songyang Zhang, Liwei Wang, and Jiebo Luo. Sat: 2d semantics assisted training for 3d visual grounding. 2021. 3, 8 + +[54] Ting Yao, Yingwei Pan, Yehao Li, and Tao Mei. Exploring visual relationship for image captioning. In Proceedings of the European conference on computer vision (ECCV), pages 684-699, 2018. 2 +[55] Shanxin Yuan, Bjorn Stenger, and Tae-Kyun Kim. RGB-based 3d hand pose estimation via privileged learning with depth images. arXiv preprint arXiv:1811.07376, 2018. 3 +[56] Zhihao Yuan, Xu Yan, Yinghong Liao, Ruimao Zhang, Sheng Wang, Zhen Li, and Shuguang Cui. Instancerefer: Cooperative holistic understanding for visual grounding on point clouds through instance multi-level contextual referring. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1791-1800, 2021. 1, 2 +[57] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. ICLR, 2017. 3 +[58] Long Zhao, Xi Peng, Yuxiao Chen, Mubbasir Kapadia, and Dimitris N Metaxas. Knowledge as priors: Cross-modal knowledge generalization for datasets without superior knowledge. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6528-6537, 2020. 3 +[59] Chaoda Zheng, Xu Yan, Jiantao Gao, Weibing Zhao, Wei Zhang, Zhen Li, and Shuguang Cui. Box-aware feature enhancement for single object tracking on point clouds. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 13199-13208, 2021. 3 +[60] Chaoda Zheng, Xu Yan, Haiming Zhang, Baoyuan Wang, Shenghui Cheng, Shuguang Cui, and Zhen Li. Beyond 3d siamese tracking: A motion-centric paradigm for 3d single object tracking in point clouds. arXiv preprint arXiv:2203.01730, 2022. 3 +[61] Dave Zhenyu Chen, Qirui Wu, Matthias Nießner, and Angel X Chang. D3net: A speaker-listener architecture for semi-supervised dense captioning and visual grounding in rgb-d scans. arXiv e-prints, pages arXiv-2112, 2021. 2 \ No newline at end of file diff --git a/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/images.zip b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..944d166f5eebbcb29ec0e21baa99d703858f771a --- /dev/null +++ b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a604d79630565407b7b5245752cb97e190f03dd0830def64b1036ddd9bc84b65 +size 540441 diff --git a/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/layout.json b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fe5ed264d2588ea6300e60cbc9b4810b02962422 --- /dev/null +++ b/xtrans2capcrossmodalknowledgetransferusingtransformerfor3ddensecaptioning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80bd62a366974d67c27db7fa7c77d1be1fff09e1f496a3e3dba943be491e3afa +size 401571 diff --git a/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_content_list.json b/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..04ead9fb6506e55c8c69ba8f48e1897b29751f88 --- /dev/null +++ b/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9a2e01046f43e0e7f1e5aef772da0da3d3f117725308588982994ce5e03a64a +size 70717 diff --git a/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_model.json b/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6872de867f70917bdc757d6de35e5f1912fc507c --- /dev/null +++ b/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49f64568596b3e17286502a12a47e765b2f119d68cd5fdd451cdb42913c9cd0f +size 89839 diff --git a/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_origin.pdf b/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a156fb689ee6482c2474cf22ea750c24da52fbcf --- /dev/null +++ b/xydeblurdivideandconquerforsingleimagedeblurring/47259f22-0add-4bff-a1e1-44c1c5c42928_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:191627003d8c814160fa2c14d1a2d8d8f8119570309e99ed42e83ff8d5521b67 +size 19835936 diff --git a/xydeblurdivideandconquerforsingleimagedeblurring/full.md b/xydeblurdivideandconquerforsingleimagedeblurring/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fde47f144cae0ca483f1fdc22a4578d2270e6119 --- /dev/null +++ b/xydeblurdivideandconquerforsingleimagedeblurring/full.md @@ -0,0 +1,319 @@ +# XYDeblur: Divide and Conquer for Single Image Deblurring + +Seo-Won Ji*,1 Jeongmin Lee*,1 Seung-Wook Kim*,2 + +Jun-Pyo Hong $^{1}$ Seung-Jin Baek $^{1}$ Seung-Won Jung $^{\dagger, 1}$ Sung-Jea Ko $^{1}$ + +$^{1}$ Korea University, $^{2}$ Pukyong National University + +# Abstract + +Many convolutional neural networks (CNNs) for single image deblurring employ a U-Net structure to estimate latent sharp images. Having long been proven to be effective in image restoration tasks, a single lane of encoder-decoder architecture overlooks the characteristic of deblurring, where a blurry image is generated from complicated blur kernels caused by tangled motions. Toward an effective network architecture for single image deblurring, we present complemental sub-solution learning with a one-encoder-two-decoder architecture. Observing that multiple decoders successfully learn to decompose encoded feature information into directional components, we further improve both the network efficiency and the deblurring performance by rotating and sharing kernels exploited in the decoders, which prevents the decoders from separating unnecessary components such as color shift. As a result, our proposed network shows superior results compared to U-Net while preserving the network parameters, and using the proposed network as the base network can improve the performance of existing state-of-the-art deblurring networks. + +# 1. Introduction + +Image deblurring is a fundamental image restoration problem in image processing and computer vision, which aims to recover a sharp image from a blurry image caused by a camera or objects in motion. Blurry images affect not only the perceptual image quality but also the performance of various applications such as object detection, image segmentation, and visual odometry. Therefore, despite it being a classical restoration task, image deblurring is still being actively researched. + +In general, the degradation model is formulated as follows: + +$$ +\mathbf {x} = \mathbf {y} * \mathbf {k} + \mathbf {n}, \tag {1} +$$ + +where $\mathbf{x}$ , $\mathbf{y}$ , $\mathbf{k}$ , $\mathbf{n}$ , and $*$ denote the blurry image (observation), sharp image (latent image), blur kernel, additive random noise, and 2D convolution operation, respectively. Since only the blurry image $\mathbf{x}$ is given and the other terms unknown, solving Eq. (1) is considered to be ill-posed, having multiple solutions to a problem. In traditional studies, researchers employed blur kernel estimation followed by deconvolution or regularization using natural image priors in attempts to handle the ill-posedness of the deblurring problem [8, 18, 28, 30, 32]. Thanks to the tremendous advances in deep learning and large-scale data accessibility, numerous methods using convolutional neural networks (CNNs) have recently been proposed and have achieved great success [2, 9, 10, 16, 27, 29, 31, 33, 34]. Many deblurring methods adopt U-Net [25] as their base architecture, which has achieved state-of-the-art performance. U-Net consists of a common CNN-based encoder, successively decreasing the feature resolution to extract high-level image context, and a symmetrically structured decoder, increasing the feature resolution back to the input resolution to generate a restored image. Since the local information at each feature resolution in the encoder is transferred to the one at the corresponding resolution in the decoder via skip connection, U-Net can effectively handle multi-scale degradation of images. + +Motion blur is originated from multiple tangled motions of moving objects in the scene and/or camera shakes. We claim that the common standard of using the unitary lane of U-Net is insufficient for handling the complicated nature of image blurs. We thus propose a simple but effective solution to this problem by dividing the original problem into multiple sub-problems [21]. In terms of network design objective, splitting a decoder can divide the deblurring problem into sub-problems; in other words, the solution space required for deblurring can be decomposed by explicitly separated decoder networks. The proposed network consists of a single encoder and two decoders as shown in Fig. 1, which induces two decoders to separately solve two subproblems of deblurring. One decoder implicitly generates a principal residual in the given 2D scene, and the other one generates the complement residual of its separated decoder. + +![](images/0a0989385e639fe5b6eaedd0f76305e82f26f648d0e5fc4eb5d8737de7e51516.jpg) +Figure 1. Detailed architecture of XYDeblur. + +We observe that without any explicit supervision, the principal and its complement residuals contain blurred edges along the direction of horizontal and vertical axes in an image plane, respectively, which is why we call the proposed network XYDeblur. Based on this observation, we further improve the one-encoder-two-decoder structure of XYDeblur by spatially rotating the convolutional kernels in one decoder and sharing the parameters with the other decoder. Unlike conventional parameter sharing approaches in CNN that sacrifice the performance for network efficiency [1,17], the separated decoders with shared and rotated parameters not only reduce the number of parameters but also improve the performance by eliminating undesired disentanglement of features that are irrelevant to the deblurring task. + +We demonstrate the effectiveness of XYDeblur as compared to U-Net while consuming the same network parameters. We also show the extensibility of the proposed approach by substituting the base structure in state-of-the-art deblurring networks with the proposed architecture. Experimental results validate that the proposed approach successfully guides the network to learn complementary subsolutions and improves the deblurring performance. The contribution of the proposed method can be summarized as follows: + +1. To the best of our knowledge, we are the first to introduce a one-encoder-two-decoder architecture in image deblurring that derives each output from two decoders to have complementary sub-solutions, which are visually orthogonal in the spatial domain. +2. XYDeblur shares rotated convolutional kernels from one decoder with the other, thereby substantially improving the deblurring performance while using the + +same number of parameters as the standard U-Net architecture. + +3. The proposed network can be implemented in many U-Net-based state-of-the-art networks without increasing the model size, and extensive experimental results show that substituting the U-Net with our proposed network can improve the deblurring performance. + +# 2. Related Works + +# 2.1. Image deblurring using U-Net + +Most image restoration methods consider the multi-scale representation of image degradation as their key problem [5, 12, 16, 19, 35]. With a U-Net architecture, several image restoration models estimate a latent image iteratively as follows: + +$$ +\left\{ \begin{array}{l} {\hat {\mathbf {y}} _ {k + 1}, \mathbf {h} _ {k + 1} \} = \mathcal {F} _ {k + 1} (\mathbf {x}, \{\hat {\mathbf {y}} _ {k}, \mathbf {h} _ {k} \}; \Theta_ {k + 1})} \\ \text {f o r} k \subset [ 0, K - 1 ] \end{array} \right. \tag {2} +$$ + +$$ +\text {f o r} k \in [ 0, K - 1 ], +$$ + +where $\mathbf{y}_{k + 1},\mathbf{h}_{k + 1}$ , and $\mathbf{x}$ denote the estimated image at the $(k + 1)$ -th iteration, the hidden features at the $(k + 1)$ -th iteration to be transferred to the next stage, and the input blurry image, respectively, and $\mathcal{F}_{k + 1}(\cdot)$ is the U-Net-based model with the parameter set $\Theta_{k + 1}$ at the $(k + 1)$ -th iteration. + +Many works on image deblurring also follow such trends [2, 16, 27, 29, 33, 34], in which the difference between the estimation and the ground-truth image is gradually predicted by applying U-Nets from the small-to-large scale, or vice versa. In [2, 16, 29], a coarse-to-fine approach is adopted by transferring the deblurred information for the down-sampled image resolution to the larger scale image input. In [27, 33, 34], the deblurring networks take finely-split multi-patch hierarchy as their inputs and transfer the + +sharpened information to the next stage. At the next stage, wider patches, which are made up of several patches from the previous stage, are recovered. + +# 2.2. One-Encoder-Multiple-Decoder architecture + +In multi-task learning, a multi-head decoder with a single encoder is a common network architecture. The single encoder extracts feature embedding having jointly tangled information of the input, and the multiple decoders perform their assigned tasks, which are supervised by given labels. For example, an image decomposition problem, which is one of the multi-task learning problems, can be dealt with the one-encoder-multiple-decoder architecture [6, 13]. To train those multiple decoders, the labels for each task are given [6] or the complicated loss functions are designed using the given data and prior knowledge [13]. In generative models, an additional decoder to a single encoder-decoder network is often employed to guide the encoder [11] or the other decoder [26]. Unlike our proposed method, those methods temporarily adopt a one-encoder-two-decoder architecture to regulate the learning process and utilize the conventional U-Net structure for test. + +# 3. Proposed Method + +# 3.1. Architecture of the proposed XYDeblur + +Fig. 1 illustrates the proposed one-encoder-two-decoder architecture. We design our network to estimate the residual image $\mathbf{r} = \mathbf{y} - \mathbf{x}$ from the blurry image. Formally, the residual estimation, $\hat{\mathbf{r}}$ , can be obtained via the proposed network $\mathcal{F}$ with the learnable parameters $\Theta$ as follows: + +$$ +\hat {\mathbf {r}} = \mathcal {F} (\mathbf {x}; \Theta). \tag {3} +$$ + +We obtain the residual estimation using two separate decoder networks $\mathcal{D}_{\mathrm{hor}}$ and $\mathcal{D}_{\mathrm{ver}}$ as follows: + +$$ +\hat {\mathbf {r}} = \mathcal {D} _ {\text {h o r}} (\mathbf {z}; \Theta_ {\text {h o r}}) + \mathcal {D} _ {\text {v e r}} (\mathbf {z}; \Theta_ {\text {v e r}}), \tag {4} +$$ + +where $\Theta_{\mathrm{hor}}$ and $\Theta_{\mathrm{ver}}$ are the network parameters of $D_{\mathrm{hor}}$ and $D_{\mathrm{ver}}$ , respectively, and $\mathbf{z}$ represents the encoded image feature. Here, the encoded image feature is obtained by + +$$ +\mathbf {z} = \mathcal {E} (\mathbf {x}; \Theta_ {\mathrm {e}}), \tag {5} +$$ + +where $\mathcal{E}$ denotes the encoder with the parameter of $\Theta_{\mathrm{e}}$ . It is worth noting that the two decoders $\mathcal{D}_{\mathrm{hor}}$ and $\mathcal{D}_{\mathrm{ver}}$ have the same structure. If we use the encoder and only one of the decoders, the network structure reduces to a common U-Net structure. + +# 3.2. Separated decoders: 2D blur decoupling + +The proposed network forces the information of the blur degradation in the encoded feature $\mathbf{z}$ to be divided through + +![](images/102f499edb6ace15ca54ca6e5c83c47912d36dc302d874a42d3fccd32c67413d.jpg) +(a) + +![](images/514be4599995869d7b39d73915e4de67681cf1607a0a3800bcc19b6982dcc3e8.jpg) +(b) + +![](images/dec82312c8201791c8d1ab92be53a70cab20d3b8d55b587da4e3460b77881641.jpg) +(c) +Figure 2. Sample images and sub-solutions for each decoder: (a) Blurry images; (b) results of the first decoder $(\hat{\mathbf{r}}_1)$ ; (c) results of the second decoder $(\hat{\mathbf{r}}_2)$ . + +the two separated decoders. According to the linear span theory [14, 15], the linear reconstruction composed of multiple independent regression outputs can encompass a larger output space because the independent regression networks learn the complementary features to span a whole output space. Ideally, it is desired that the two decoders result in independent regression outputs to maximize the solution space. In other words, it is expected that one decoder produces the blur residual along the principal axis, i.e., the degradation components with the largest variation, and the other one generates the complementary residual to complete the linear reconstruction. + +Fig. 2 depicts an example of the estimated residuals from the two decoders, $\mathcal{D}_{\mathrm{hor}}$ and $\mathcal{D}_{\mathrm{ver}}$ . Interestingly, the two residuals obtained using the separated decoders contain the horizontal and vertical motion components. This example implies that the proposed design enables the network to decompose the information inherent in the encoded features into the ones along the $x$ - and $y$ -axes without applying any explicit constraint. This motivates us to propose the scheme to share the parameters of the decoders for more efficient deblurring. + +# 3.3. Spatial kernel rotation for parameter sharing + +Even though the separated decoders can successfully decouple features related to deblurring along $x$ - and $y$ -axes, there is also a possibility that undesirable information decoupling could occur since we do not give any supervision to the network. This is problematic in terms of network capacity [3] and solution space [14, 15] of the network because the undesired division of complementary features limits the potential solution space and degrades the network performance. For example, Figs. 3(a)-(c) illustrate the color shift caused by the two separated decoders. Specifically, the two decoders, U-Net $^{2D}$ , produce the results with the color temperatures shifted to the lower and higher levels, respectively. Such color shift hinders the network from fully exploring the solution space and does not provide any clues for deblur + +![](images/dbf0c229cf06076667169e792d280f5ecd9ffbee1876e01a748224b07d7fefd4.jpg) +(a) + +![](images/a5eb29453fc5f5ea4d734593cfcdc62d249e46ab84001d2a178036b074724900.jpg) + +![](images/bdfd14858c9afb687a456d941b0b606c9731ef48217dde9393238628b9e4d3d3.jpg) + +![](images/0232458faa430a03b17556b821bc699d984c1a9247e0bafd697bb7efb8578167.jpg) +(b) +(d) + +![](images/18e5d2c95ff2d7cb408dd3c9bae127b8bc7fd0eb729bb3cb7a5b829a77ab2a64.jpg) +(c) +(e) +Figure 3. Input ColorChecker image and resultant images. The magnified color white of the chart and its color temperature are shown in the bottom row. (a) ColorChecker image; (b) input $+\hat{\mathbf{r}}_1$ of U-Net $^{2D}$ ; (c) input $+\hat{\mathbf{r}}_2$ of U-Net $^{2D}$ ; (d) input $+\hat{\mathbf{r}}_1$ of XYDeblur; (e) input $+\hat{\mathbf{r}}_2$ of XYDeblur. + +ring (the color shift will be compensated when the residuals are combined). + +To solve this problem, we employ the properties of the separated decoders. Since the two decoders can learn the inherent information along the axes at a right angle, we share the network parameter of the two decoders as follows: + +$$ +\hat {\mathbf {r}} = \mathcal {D} _ {\text {h o r}} (\mathbf {z}; \Theta_ {\mathrm {d}}) + \mathcal {D} _ {\text {v e r}} (\mathbf {z}; \Theta_ {\mathrm {r d}}), \tag {6} +$$ + +where $\Theta_{\mathrm{rd}}$ is the network parameter of $\Theta_{\mathrm{d}}$ rotated 90 degrees counterclockwise. We select $\mathcal{D}_{\mathrm{hor}}$ as a primary decoder. On average, the resultant residual from $\mathcal{D}_{\mathrm{hor}}$ has more signal power than that from $\mathcal{D}_{\mathrm{ver}}$ , which means that the larger variations occur along the horizontal axis as compared to the vertical axis. This is natural as a camera can rotate full 360 degrees around the yaw axis but the pitch rotation is rather limited while photographing. The proposed network design with Eq. (6) has two advantages. First, the decoders are forced to share the other information except for the one along the axial directions, which regularizes the learning process of the network. Thus, the network can focus only on eliminating blur components. As shown in Figs. 3(d) and (e), sharing the rotated kernels guides the network to learn complementary features related to the horizontal and vertical axes and no longer yields unnecessary color shifts. Second, the required parameters for the two separated decoders are halved. Consequently, XYDeblur not only improves the efficiency but also the deblurring performance, which can be seen in Table 1. + +# 3.4. Extension to existing deblurring networks + +XYDeblur can be applied to any conventional networks based on U-Net such as [2, 34]. For example, if we extend the proposed network to the iterative deblurring method explained in Eq. (2), the estimation at the $(k + 1)$ -th iteration can be obtained as follows: + +$$ +\hat {\mathbf {y}} _ {k + 1} = \mathbf {x} + \mathcal {D} _ {\underset {(k + 1)} {\text {h o r}}} ^ {(k + 1)} \left(\bar {\mathbf {z}} _ {k + 1}; \Theta_ {\underset {(k + 1)} {\mathrm {d}}} ^ {(k + 1)}\right) \tag {7} +$$ + +$$ ++ \mathcal {D} _ {\mathrm {v e r}} ^ {(k + 1)} (\bar {\mathbf {z}} _ {k + 1}; \Theta_ {\mathrm {r d}} ^ {(k + 1)}), +$$ + +$$ +\bar {\mathbf {z}} _ {k + 1} = \mathcal {T} \left(\bar {\mathbf {z}} _ {k}, \mathbf {z} _ {k + 1}\right), \tag {8} +$$ + +$$ +\mathbf {z} _ {k + 1} = \mathcal {E} ^ {(k + 1)} \left(\hat {\mathbf {y}} _ {k}; \Theta_ {\mathrm {e}}\right), \tag {9} +$$ + +where $\mathcal{T}(\cdot ,\cdot)$ is a combining function that aggregates the encoded feature at the current iteration, $\mathbf{z}_{k + 1}$ , and the transferred features from the previous iteration, $\bar{\mathbf{z}}_k$ . In the following section, we compare the U-Net and XYDeblur using several top-performing deblurring methods to confirm the efficiency and effectiveness of the proposed method. + +# 4. Experiments + +In this section, we first describe the implementation details of XYDeblur. We validate the effectiveness of the proposed method by conducting experiments on the following two scenarios: 1) the vanilla proposed network; 2) substituting the U-Net in top-performing methods with XYDeblur. Extensive experimental results for the proposed method can be seen in the supplemental material. + +# 4.1. Experimental setting + +Datasets. For training of the networks, GoPro training dataset [16] was used. GoPro dataset is a realistic dataset with blurry images generated by averaging consecutive image frames. It contains 2,103 pairs of blurry and sharp images from 22 different scenes. The images were randomly cropped into $256 \times 256$ patches for training. For testing, GoPro test dataset with 1,111 image pairs was used, and 980 pairs of RealBlur test dataset [24], which is a dataset with real blurred images, was also used. + +Implementation details. The detailed architecture of XYDeblur is described in Fig. 1. Each ResModule consists of six residual blocks with batch normalization excluded from the original residual block [16]. The number of channels in the feature map starts at 32 and is doubled (halved) every time the resolution of the feature map is halved (doubled). All the experiments were conducted on a PC with an Intel i7-8700 CPU, 32GB of RAM, and an NVIDIA Titan Xp GPU. We used the PyTorch [20] to implement the proposed method. For training, we adopted the Adam [7] optimizer with a batch size of four. The learning rate was initialized as $10^{-4}$ , which was halved after every 500 epochs. + +![](images/d2b3b6888b0e9cdf91db0115742d340040b90a488ad165b0412fbee29e858fcb.jpg) +Figure 4. Signal power of $\hat{\mathbf{r}}_1$ and $\hat{\mathbf{r}}_2$ for different degrees of blur: from $0^{\circ}$ (horizontal) to $90^{\circ}$ (vertical). + +The $\ell_1$ criterion was applied as a loss function, which is formulated as + +$$ +L = \frac {1}{N} \sum_ {n = 1} ^ {N} \left\| \hat {\mathbf {y}} ^ {(n)} - \mathbf {y} ^ {(n)} \right\| _ {1}, \tag {10} +$$ + +where $\mathbf{y}^{(n)}$ is the $n$ th target sharp image, $\hat{\mathbf{y}}^{(n)}$ is the corresponding estimation, and $N$ is the number of samples in a mini-batch. The proposed network was trained for 1,300 epochs and took about 65 hours. For state-of-the-art networks, each network and its variations were trained until the peak signal-to-noise ratio (PSNR) of their baseline network reached its reported rate. + +# 4.2. Proposed network - standalone + +To analyze the effectiveness of the proposed approach, three experiments were conducted as follows: 1) the analysis of sub-solutions to confirm whether the proposed network learns complementary solutions as intended, 2) the investigation for a suitable number of decoders and the verification of the rotated-parameter sharing, and 3) the examination to ensure that the proposed approach solves the deblurring problem in a stable and robust manner in different cases. + +The impact of the one-encoder-two-decoder architecture. We attempt to validate that the proposed approach induces the network to regress two complementary subsolutions as intended. To this end, the synthetically blurred images with varying blur directions from $0^{\circ}$ (horizontal) to $90^{\circ}$ (vertical) were used for test. To quantitatively measure how much high-frequency components are restored by the two decoders, $\mathcal{D}_{\mathrm{hor}}$ and $\mathcal{D}_{\mathrm{ver}}$ , the signal power [22] is computed as follows: + +$$ +\operatorname {P o w e r} = \frac {1}{M} \| \mathbf {s} \| _ {2} ^ {2}, \tag {11} +$$ + +where $\mathbf{s}$ and $M$ are the vector/matrix form of discrete signal and the number of elements in $\mathbf{s}$ , respectively. Fig. 4 shows + +Table 1. Performance of various number of decoders + +
MethodGoProComplexity*
PSNRSSIMParamsGMACs
U-Net30.610.94584.92687.93
U-Net2D30.900.94897.421059.77
U-Net3D30.990.94969.921431.61
U-Net4D31.040.950612.421803.45
XYDeblur30.970.95024.921059.77
+ +* The number of parameters is measured in million. +* GMACs is estimated for the input size of 720P. + +![](images/566692f934fec9fa5c1def6ac4f012cc4e1fe85001ed2f6b0ab8e6f2f6fb0518.jpg) +Figure 5. Various number of decoders and their performance. The radius of the circle indicates GMACs of the network. + +the signal power of $\hat{\mathbf{r}}_1$ and $\hat{\mathbf{r}}_2$ for the images blurred in seven different directions. As expected, the closer the blur direction is to the horizontal direction, the signal power of $\hat{\mathbf{r}}_1$ increases; and the closer to the vertical direction, the signal power of $\hat{\mathbf{r}}_2$ increases. The input blurry images with blur direction of $0^{\circ}$ , $45^{\circ}$ , and $90^{\circ}$ and their corresponding $\hat{\mathbf{r}}_1$ and $\hat{\mathbf{r}}_2$ results are depicted in the last three columns of Fig. 4. This result shows that the two decoders successfully decouple the blur components according to the direction of the blur. + +The proper number of decoders and the impact of sharing the rotated parameters. Increasing the number of decoders leads to the division of a problem into multiple sub-problems and potentially expands the coverage of the solution space of the network. To justify that the use of two decoders is sufficient for the proposed network, we trained U-Nets with one to four decoders referred to as U-Net, U-Net $^{2D}$ , U-Net $^{3D}$ , and U-Net $^{4D}$ , respectively. + +As shown in Table 1 and Fig. 5, the deblurring performance improves as the number of decoders used in the network increases. However, unlike the network complexity, which linearly increases as the number of decoders increases, the deblurring performance improvement is abated rapidly after the point when there are two decoders. + +In addition, despite the proposed network having the same network structure as U-Net $^{2D}$ , Table 1 shows that sharing the rotated parameters in the proposed network reduces the network complexity almost by half and even enhances the performance. According to [15], when each branch of a network occupies a feature space (or solution space) that + +![](images/ee12a69d0ca2f4145fe68071131635276baf5848248f758e8c324861d76fe0c1.jpg) +Signal power of $\widehat{\mathbf{r}}_1$ and $\widehat{\mathbf{r}}_2$ for different degrees of blur: from $0^{\circ}$ (horizontal) to $90^{\circ}$ (vertical). + +![](images/2ab7dd6417dd7ca1631a56a66ccc0256446681fd7224d47021b2b83210205d5f.jpg) +(b) +Figure 6. Statistics to certify the consistency of the proposed approach. (a) Signal power of $\hat{\mathbf{r}}_1$ and $\hat{\mathbf{r}}_2$ of different 18 models; (b) correlation between the power of $\hat{\mathbf{r}}_1$ and the degree of blur; (c) correlation between the power of $\hat{\mathbf{r}}_2$ and the degree of blur. + +![](images/1ba9f9c386191bd480838c601bd8b8d4fd2f0607f057689c13c5226b4f083e16.jpg) +(a) +(c) + +is complementary to each other, it can be regarded that the capacity of the network is most efficiently exploited. In this sense, both U-Net $^{2D}$ and the proposed XYDeblur employ two decoders that learn complementary features and ultimately expand the solution space of the networks. However, while the two networks use the same number of decoders, Figs. 3 shows that sharing the rotated parameters guides the network to eliminate the division of complementary features other than directional components related to the rotation of parameters, which is the most relevant to deblurring. As a result, each decoder in XYDeblur can utilize the same amount of network capacity as decoders in U-Net $^{2D}$ but use the network space solely on deblurring. The positive effects brought by sharing of the rotated parameters are reflected in the performance between the two networks. + +The consistency of the proposed approach. To ensure that the proposed model learn the complementary residuals in a stable and robust manner, we randomly divided the GoPro training DB into three and trained 18 models (six models for each divided DB) for 900 epochs using random initial weights with different seeds. Using the same sample + +image shown in Fig. 4, we measured the signal power of $\hat{\mathbf{r}}_1$ and that of $\hat{\mathbf{r}}_2$ for different motion blur along with the seven directions. Through this experiment, it can be confirmed that even if the model is initialized with different weights and trained on different DB, the network consistently learns to solve the deblurring problem in the complementary manner that divides the problem along the vertical and horizontal axes, as shown in Fig. 6 (a). The Pearson's R values of the signal power of the decoder $\hat{\mathbf{r}}_1$ (-0.97) and the decoder $\hat{\mathbf{r}}_2$ (0.98) with respect to the blur angle further support our claim, as shown in Figs. 6 (b) and (c). + +# 4.3. State-of-the-Art deblurring networks with XY-Deblur architecture + +To further validate the applicability and extensibility, we applied the proposed network to more complicated state-of-the-art image deblurring networks. Among the top-performing single image deblurring networks in which the authors released the source code, PSS-NSC [2] and DMPHN [34] were chosen, and the first end-to-end deblurring method MSCNN [16] was also used for the experiment. For each network, the original network and the following three network variations were tested: Network $^{\text{Channel} \uparrow}$ , Network $^{\text{Layer} \uparrow}$ , and Network $^{\text{Ours}}$ . In the case of the DMPHN in which various network candidates exist, the one with the lowest complexity was used. Based on the VRAM usage of the Network $^{\text{Ours}}$ , Network $^{\text{Channel} \uparrow}$ and Network $^{\text{Layer} \uparrow}$ were constructed to occupy similar VRAM by increasing the number of channels in the feature maps and the number of the convolutional layers located in the decoders, respectively. $^{2}$ Each baseline network was trained until it reached its reported PSNR, and the three network variations were trained using the same number of epochs of their baseline network. + +GoPro. The results are listed and visualized in Table 2 and Fig. 7 (a). Network $^{\text{Ours}}$ required the fewest number of parameters along with the baseline network, but it showed the highest performance in comparison with the other network variations. On the contrary, despite a significant increase of network parameters, Network $^{\text{Channel} \uparrow}$ and Network $^{\text{Layer} \uparrow}$ did not show consistent performance improvements over the baseline networks. For DMPHN and MSCNN, DMPHN $^{\text{Channel} \uparrow}$ and MSCNN $^{\text{Layer} \uparrow}$ recorded decreased PSNR compared to its baseline model. The results indicate that simply increasing the number of convolutions or feature channels in the decoders cannot effectively utilize the information in the encoded features, primarily due to over-fitting caused by over-parameterization. On the other hand, XYDeblur consistently improves the baseline deblurring networks while maintaining the number of network pa + +![](images/e365eb240cdcaa73ceded2a4ee7abeeb4a6c8c9270816292d17ffd13cd785fa0.jpg) +(a) + +![](images/43a0946b97bd289a874d204390be1b6ea86e0924f34c22e8b97611d73cdd4465.jpg) +(b) +Figure 7. Effectiveness of the proposed approach on the state-of-the-art networks. The radius of the circle indicates GMACs of the network. (a) Performance changes in GoPro test datasets; (b) performance changes in RealBlur test datasets. + +Table 2. The proposed approach in the top-performing networks + +
MethodVariationsGoProRealBlurComplexity†
PSNRSSIMPSNRSSIMParamsGMACsVRAM
PSS-NSCBaseline*30.94(30.92)0.949428.780.87166.981167.243.79
Channel↑31.060.950928.630.866717.893020.815.97
Layer↑31.180.952428.780.872110.081703.955.55
Ours31.270.953128.880.87656.981784.395.68
DMPHNBaseline*30.28(30.25)0.940826.970.81707.231100.181.62
Channel↑30.230.941426.860.820118.633060.282.52
Layer↑30.480.944327.780.836610.331509.112.30
Ours30.630.945828.020.84597.231754.072.41
MSCNNBaseline*29.22(29.08)0.927327.910.844211.724728.693.21
Channel↑29.340.929227.920.843228.9411673.074.84
Layer↑28.970.925027.920.844917.256960.324.71
Ours29.980.938228.190.855011.726966.134.78
+ +* The PSNR in parentheses is the value reported by the authors in their original paper. +† The number of parameters is measured in million. +$\dagger$ GMACs is estimated for the input resolution of 720P (1280×720). +The usage of VRAM is measured in GB with the input size of $256 \times 256$ . +The increased and decreased PSNR and SSIM value compared to the baseline method are shown in red and blue, respectively. + +rameters. Fig. 8 shows the experimental results for three networks in the GoPro test data. When the proposed approach is applied to the conventional networks, it induces the networks to solve the deblurring problem by dividing it in a complementary manner (see $\hat{\mathbf{r}}_1$ and $\hat{\mathbf{r}}_2$ in Fig. 8), and it can be confirmed that qualitatively better results are obtained compared to the baseline network. $^3$ + +RealBlur. Unless the training and test data are collected from the same distribution, even negligible data differences can significantly degrade the performance of top-performing deep learning networks [23]. This generaliza + +tion problem is observed more severely as the structure of the network becomes more complex than necessary [4]. Therefore, the generalization ability of a network is one of the essential parts of evaluating deep-learning-based approaches. To confirm the generalization ability of the proposed network architecture on the state-of-the-art networks, we set a domain gap between training and test sets. In this experiment, we trained the network variations using the GoPro dataset and tested the networks with the RealBlur dataset. The results are shown in Table 2 and Fig. 7 (b). As compared to the previous experiment on the GoPro test set, the performance results for all networks are degraded. PSS-NSC $^{\text{Channel} \uparrow}$ and DMPHN $^{\text{Channel} \uparrow}$ even show lower performance than their baseline networks. On the contrary, the + +![](images/972086071caba2b799f7e9931c0a0ae54f54eb9685986bcb66063eea2cd12fa0.jpg) +Figure 8. Experimental results for MSCNN, DMPHN, PSS-NSC with and without the proposed approach from the GoPro dataset. + +![](images/fcd5c07173ae4a670d6f26a7a35bde7145e6cdaca0f7026036367e2c407486a1.jpg) + +proposed approach consistently recorded performance improvement in terms of both PSNR and SSIM as compared with the baseline networks. + +# 5. Conclusion + +In this paper, we propose a novel one-encoder-two-decoder network for single image deblurring. We showed that the proposed architecture guides the network to divide the original deblurring problem into two sub-problems by separating the blur residuals along the x-axis and y-axis, each of which is assigned to each decoder. In addition, we share the rotated parameters of one decoder with the other to prevent any undesired division of complementary features. Extensive performance evaluation demonstrated that XYDeblur outperforms the conventional U-Net structure while consuming the same number of parameters. Also, we confirmed that the performance of the state-of-the-art networks can be further boosted by substituting their base structure with the proposed network. + +# 6. Limitation + +These are the possible limitations of the proposed image deblurring method. + +1. Although XYDeblur maintains the number of parameters used in the network and improves the performance, the increase in the number of GMACs and the VRAM usage is inevitable. If the network is used + +in circumstances where the computational capacity is limited, overall adjustment of the network might be required. + +2. To apply the proposed network, learning the residual image $\mathbf{r} = \mathbf{y} - \mathbf{x}$ is essential since the two decoders attempt to reconstruct the lost high-frequency components in a complementary manner. Without residual learning, the entire image including the lost high-frequency information should be estimated, which could overload the network and eventually hinder the deblurring performance. +3. Using the proposed network as a base network architecture can be constrained when the deblurring network has a complicated architecture. Since we construct the proposed network based on a very simple U-Net structure, if a deblurring network contains a complex decoder design, e.g., transfer blocks in decoders, it can be necessary to further redesign or modify the architectures in the two decoders of the proposed network to implement the desired network. + +Acknowledgement This work was supported by Institute of Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIT) (2014-3-00077, Development of global multi-target tracking and event prediction techniques based on real-time large-scale video analysis). This work is supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. 2020R1A4A4079705) + +# References + +[1] Dawei Dai, Liping Yu, and Hui Wei. Parameters sharing in residual neural networks. Neural Processing Letters, pages 1-18, 2019. 2 +[2] Hongyun Gao, Xin Tao, Xiaoyong Shen, and Jiaya Jia. Dynamic scene deblurring with parameter selective sharing and nested skip connections. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3848-3856, 2019. 1, 2, 4, 6 +[3] Ian Goodfellow, *Yoshua Bengio*, Aaron Courville, and *Yoshua Bengio. Deep Learning*, volume 1. MIT Press Cambridge, 2016. 3 +[4] Douglas M Hawkins. The problem of overfitting. Journal of chemical information and computer sciences, 44(1):1-12, 2004. 7 +[5] Huaibo Huang, Ran He, Zhenan Sun, and Tieniu Tan. Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 1689-1697, 2017. 2 +[6] Zhuo Hui, Ayan Chakrabarti, Kalyan Sunkavalli, and Aswin C Sankaranarayanan. Learning to separate multiple illuminants in a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3780-3789, 2019. 3 +[7] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015. 4 +[8] Dilip Krishnan, Terence Tay, and Rob Fergus. Blind deconvolution using a normalized sparsity measure. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 233-240, 2011. 1 +[9] Orest Kupyn, Volodymyr Budzan, Mykola Mykhailych, Dmytro Mishkin, and Jiří Matas. Deblurgan: Blind motion deblurring using conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8183-8192, 2018. 1 +[10] Orest Kupyn, Tetiana Martyniuk, Junru Wu, and Zhangyang Wang. Deblurgan-v2: Deblurring (orders-of-magnitude) faster and better. In Proceedings of the IEEE International Conference on Computer Vision, pages 8878-8887, 2019. 1 +[11] Wonkwang Lee, Donggyun Kim, Seunghoon Hong, and Honglak Lee. High-fidelity synthesis with disentangled representation. In Proceedings of the European Conference on Computer Vision, pages 157-174, 2020. 3 +[12] Juncheng Li, Faming Fang, Kangfu Mei, and Guixu Zhang. Multi-scale residual network for image super-resolution. In Proceedings of the European Conference on Computer Vision, pages 517-532, 2018. 2 +[13] Zhengqi Li and Noah Snavely. Learning intrinsic image decomposition from watching the world. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9039-9048, 2018. 3 +[14] Chang Liu, Wei Ke, Fei Qin, and Qixiang Ye. Linear span network for object skeleton detection. In Proceedings of the European Conference on Computer Vision, pages 133-148, 2018. 3 + +[15] Chang Liu, Yunjie Tian, Jianbin Jiao, and Qixiang Ye. Adaptive linear span network for object skeleton detection. arXiv preprint arXiv:2011.03972, 2020. 3, 5 +[16] Seungjun Nah, Tae Hyun Kim, and Kyoung Mu Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3883-3891, 2017. 1, 2, 3, 4, 6 +[17] Jordan Ott, Erik Linstead, Nicholas LaHaye, and Pierre Baldi. Learning in the machine: To share or not to share? Neural Networks, 126:235-249, 2020. 2 +[18] Jinshan Pan, Deqing Sun, Hanspeter Pfister, and Ming-Hsuan Yang. Blind image deblurring using dark channel prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1628-1636, 2016. 1 +[19] Vardan Papyan and Michael Elad. Multi-scale patch-based image restoration. IEEE Transactions on Image Processing, 25(1):249-261, 2015. 2 +[20] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. 4 +[21] Surya N Patnaik, James D Guptill, and Dale A Hopkins. Subproblem optimization with regression and neural network approximators. Computer Methods in Applied Mechanics and Engineering, 194(30-33):3359-3373, 2005. 1 +[22] John G Proakis. Digital Signal Processing: Principles Algorithms and Applications. Pearson Education India, 2001. 5 +[23] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do ImageNet classifiers generalize to ImageNet? In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 5389-5400. PMLR, 09-15 Jun 2019. 7 +[24] Jaesung Rim, Haeyun Lee, Jucheol Won, and Sunghyun Cho. Real-world blur dataset for learning and benchmarking deblurring algorithms. In Proceedings of the European Conference on Computer Vision, pages 184-201, 2020. 4 +[25] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 234-241, 2015. 1 +[26] Min-cheol Sagong, Yong-goo Shin, Seung-wook Kim, Seung Park, and Sung-jae Ko. Pepsi: Fast image inpainting with parallel decoding network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11360–11368, 2019. 3 +[27] Maitreya Suin, Kuldeep Purohit, and AN Rajagopalan. Spatially-attentive patch-hierarchical network for adaptive motion deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3606–3615, 2020. 1, 2 +[28] Libin Sun, Sunghyun Cho, Jue Wang, and James Hays. Edge-based blur kernel estimation using patch priors. In Pro- + +ceedings of the IEEE International Conference on Computational Photography, pages 1-8, 2013. 1 +[29] Xin Tao, Hongyun Gao, Xiaoyong Shen, Jue Wang, and Jiaya Jia. Scale-recurrent network for deep image deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8174-8182, 2018. 1, 2 +[30] Oliver Whyte, Josef Sivic, and Andrew Zisserman. Deblurring shaken and partially saturated images. International Journal of Computer Vision, 110(2):185-201, 2014. 1 +[31] Li Xu, Jimmy S Ren, Ce Liu, and Jiaya Jia. Deep convolutional neural network for image deconvolution. In Proceedings of the Advances in Neural Information Processing Systems, pages 1790-1798, 2014. 1 +[32] Li Xu, Shicheng Zheng, and Jiaya Jia. Unnatural 10 sparse representation for natural image deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1107-1114, 2013. 1 +[33] Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, and Ling Shao. Multi-stage progressive image restoration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2021. 1, 2 +[34] Hongguang Zhang, Yuchao Dai, Hongdong Li, and Piotr Koniusz. Deep stacked hierarchical multi-patch network for image deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5978-5986, 2019. 1, 2, 4, 6 +[35] Haichao Zhang and Jianchao Yang. Scale adaptive blind deblurring. In Proceedings of the Advances in Neural Information Processing Systems, pages 3005-3013, 2014. 2 \ No newline at end of file diff --git a/xydeblurdivideandconquerforsingleimagedeblurring/images.zip b/xydeblurdivideandconquerforsingleimagedeblurring/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..42e20295d336016ef7574a1a1d7c5323f0d9c18c --- /dev/null +++ b/xydeblurdivideandconquerforsingleimagedeblurring/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2971b6f5203a9976eb50b866addce6570a176d85d105c48db297a2e676b714d9 +size 603309 diff --git a/xydeblurdivideandconquerforsingleimagedeblurring/layout.json b/xydeblurdivideandconquerforsingleimagedeblurring/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1fe7b520444227ae7c265617af52e00e2c8e2290 --- /dev/null +++ b/xydeblurdivideandconquerforsingleimagedeblurring/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47658e88c2379ec51e96bb741dbfe0d3875d0ea3d29d33975f1d18ee49cfb98c +size 412072 diff --git a/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_content_list.json b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5a54590b11df9120496e50545622dd9a8b0744c9 --- /dev/null +++ b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72d28820e0cf1f9afc9ede2f1882ddfb2b54176e83aaa8d50cc4c8e28fc7fc3c +size 71456 diff --git a/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_model.json b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b122efdd06de1da5715351e705f40bee046c7131 --- /dev/null +++ b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d91eef4d66c4a2b0bfd48b5e2fbcbbeff73ae00cf94787d04395a541bdff7f3 +size 87055 diff --git a/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_origin.pdf b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4ad97f4239d4e949396cdf2df1e7872b5b979827 --- /dev/null +++ b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/c4d386f4-9d29-4eee-a52a-a6a00e98c725_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:153688db7c4ec6299e9653de11c3a697d517771d98732596aa33e7f6745cdc79 +size 1393863 diff --git a/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/full.md b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8f91033ddc28914324135100183b2ca33555cd34 --- /dev/null +++ b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/full.md @@ -0,0 +1,286 @@ +# XYLayoutLM: Towards Layout-Aware Multimodal Networks For Visually-Rich Document Understanding + +Zhangxuan Gu $^{1,2}$ , Changhua Meng $^{2}$ , Ke Wang $^{2}$ , Jun Lan $^{2}$ , Weiqiang Wang $^{2}$ , Ming Gu $^{2}$ , Liqing Zhang $^{1*}$ $^{1}$ MoE Key Lab of Artificial Intelligence, Department of Computer Science and Engineering, Shanghai Jiao Tong University, $^{2}$ Ant Group zhangxgu@126.com +{changhua.mch, kaywang.wk, yelan.lj, weiqiang.wwq, guming.mg}@antgroup.com zhang-lq@cs.sjtu.edu.cn + +# Abstract + +Recently, various multimodal networks for Visually-Rich Document Understanding(VRDU) have been proposed, showing the promotion of transformers by integrating visual and layout information with the text embeddings. However, most existing approaches utilize the position embeddings to incorporate the sequence information, neglecting the noisy improper reading order obtained by OCR tools. In this paper, we propose a robust layout-aware multimodal network named XYLayoutLM to capture and leverage rich layout information from proper reading orders produced by our Augmented XY Cut. Moreover, a Dilated Conditional Position Encoding module is proposed to deal with the input sequence of variable lengths, and it additionally extracts local layout information from both textual and visual modalities while generating position embeddings. Experiment results show that our XYLayoutLM achieves competitive results on document understanding tasks. + +# 1. Introduction + +While significant progress has been made in natural language processing and visual understanding [5, 7, 8, 20], less attention has been paid to their challenging variant in the multimodal document understanding domain. The Visually-Rich Document Understanding (VRDU) [28] task requires combining the abundant image, text, and layout information from scanned/digital-born documents (images, PDFs, etc.) Such technology can benefit a great variety of scenarios such as report/receipt understanding, automatic form filling, and document relation extraction. As a result, it is in great need of effective and efficient VRDU approaches. + +To this end, researchers have developed sophisticated + +pipelines for tackling this task [2, 10, 16, 18, 28-30]. Generally speaking, early attempts can be divided into the categories of textual-based [4, 6, 10], convolution-based [12, 15, 24, 26, 34] and GCN-based [19] methods. Text-based methods, e.g., XLM-RoBERT [6] and InfoXLM [4], usually rely on the representation ability of self-supervised models like Bert [7] pretrained on large datasets. Convolution-based method Chargrid [15] utilized a fully convolutional network that predicted a segmentation mask and bounding boxes for document representation. More recently, [19] introduces a Graph Convolutional Networks based model to fuse the textual and visual feature from scanned documents. + +Although attempts like LayoutLM [28], LayoutLMv2 [30] and LayoutXLM [29] have been made to tackle document understanding in a multimodal manner, they still confront two limitations: (1) They rely on the tokens and boxes from OCR [31] tools without exploring the effect of reading orders. The proper reading orders refer to the well-organized readable token sequences, which may not be unique. Intuitively, the reading order of input tokens is crucial to many tasks such as language translation [27] and VQA [33]. For example, the meaning of a sentence may be changed when we shuffle the words, resulting in mistakes during language translation. A common solution is to use position embeddings to denote such sequential order of input tokens. However, we find that multimodal models with widely-used relative position embeddings still suffer improper reading order. Proper reading orders implicitly include the layout information, which is essentially needed in VRDU tasks. (2) They usually leverage fixed-length absolute/relative position embeddings in transformers. Once the model is trained, it can not deal with the test data with longer token sequences. Although bilinear interpolation on position embeddings can be applied to the longer sequence, the performance is not satisfying. Recently, Conditional Position Encoding + +![](images/97d6bd3f8e2fd65544422e1152069ab516b8090268c5dc4638d1f224054bf5b9.jpg) +Figure 1. An example from XFUN dataset. The reading order is denoted by the indices in the boxes while the red ones mean their orders are improper. + +(CPE) [5] is proposed to deal with inputs of variable lengths in image classification tasks. It reshaped the input tokens to 2D features and dynamically extracted local neighbor context from input tokens with convolutions. However, since CPE is designed for only visual tokens, it can not handle 1D textual tokens in VRDU tasks. + +In this paper, we propose an improved version of LayoutLMv2 [30], XYLayoutLM. Instead of pretraining on large private/public document understanding datasets, XYLayoutLM focuses on the generation of position embeddings with two under-explored limitations in VRDU, i.e., improper reading orders, and the disability of dealing with longer sequence, as mentioned above. + +Although it seems a fundamental requirement of multimodal tasks to have proper reading orders, it is non-trivial to directly obtain such reading orders from documents due to various formats, e.g., tables, and columns. Specifically, we show a form from XFUN [29] dataset in Figure 1. The default reading order is noisy. Based on the boxes obtained by OCR tools, traditional sorting approaches such as arranging the tokens in a top-to-bottom and left-to-right way are not satisfying. For example, we list two simple heuristic rules in this figure, namely (a) descending first by Y-axis then X-axis, (b) descending by $\mathrm{Y} + \mathrm{X}$ conditioned on the left-top points of the token boxes. However, the red indices in Figure 1 still highlight the tokens with improper reading orders. Finally, we utilize the XY Cut [11] (c) and successfully obtain one proper reading order. Interestingly, some tokens in the same row may have different locations due to the noise in OCR recognition. It fails two heuristic rules which need the accuracy location of tokens. However, we can still obtain a series of proper reading orders for training by our proposed Augmented XY Cut as an augmentation strategy. + +For input sequences of variable lengths, we utilize a novel Dilated Conditional Position Encoding (DCPE) module to adaptively generate position embeddings according to their input lengths with the dilated convolutions for ex + +tracting local layouts. We demonstrate that the XYLayoutLM can lead to better performance than previous LayoutLMs [28-30], which will benefit a great variety of real-world document understanding applications. We summarize our contributions as follows. + +- For the first time, Augmented XY Cut is proposed and utilized to sort the input tokens for generating different proper reading orders in VRDU tasks. It extracts and leverages the layout information to achieve competitive performances. +- To deal with input sequences of variable lengths, we propose a Dilated Conditional Position Encoding as the position embedding generator to adaptively process the 1D textual and 2D visual tokens. Benefitting from proper reading orders, DCPE can further extract rich local layouts of input tokens with dilated convolutions. +- Comprehensive experiments are conducted on VRDU datasets. Our XYLayoutLM achieves competitive performance among all listed VRDU approaches on semantic entity recognition and relation extraction tasks. + +# 2. Related Works + +# 2.1. Visually-Rich Document Understanding + +Recently, transformers-based methods have been proved to be effective on many computer vision [5, 8, 20] and natural language process [4, 7, 10] domains. Among them, [28-30] proposed a series of transformer-based models focusing on VRDU tasks. As our baseline, LayoutXLM [28] is the multilingual version of LayoutLMv2 [30]. They achieved impressive results by successfully combining textual, layout, and visual features. However, those methods may feed the input tokens to the transformer in the improper reading order caused by OCR tools on complex documents, which will harm VRDU performance. In this paper, we pay more attention to the under-explored challenge, i.e., the proper reading order of input tokens, which is significant to the model performance. + +# 2.2. Positional Encoding + +Positional encodings are commonly employed to incorporate the order of sequences because self-attention is permutation-equivalent. Existing research can be grouped into two categories: absolute and relative position encodings. When the transformer-based model was first proposed by [27], they designed a delicate sin-cos function as the absolute positional encoding. After that, [7] used a learnable absolute embedding which is an embedding of the same length to the input sequence. It can be jointly updated with the network weights during training. Recently, by considering the distance between tokens, [25] proposed to change + +position embedding from absolute way into the relative way. However, they can not handle the longer sequences with fixed-length position encodings. To this end, Conditional Position Encoding (CPE) [5] was proposed to deal with the input sequence of variable lengths in the image classification task. It generates position embeddings conditioned on the local context extracted by 2D convolutional layers. However, CPE can not be used in multimodal networks due to the 1D text features in document understanding tasks. + +# 2.3. Reading Order Detection + +Reading order detection [1, 3, 9, 17, 21, 22] aims to capture proper reading orders for documents. Generally speaking, humans tend to read documents left-to-right and up-to-bottom ways. However, such simple sorting rules may fail due to the tokens extracted by OCR tools on complex documents. Recently, [35] proposed a multimodal network for reading order detection with a large benchmark made by tremendous complex documents. However, compared to our method, the labor for collecting $500\mathrm{k}$ standard Word files and the time for training a LayoutReader [35] cannot be ignored. Meanwhile, the inference time for LayoutReader on reading order detection is much longer than our method (see Appendix). In this paper, we proposed a simple yet effective augmentation algorithm based on XY Cut [11] to obtain different proper reading orders. + +# 3. Methodology + +# 3.1. Overview + +The overall XYlayoutLM architecture is depicted in Figure 2. The model takes the images, textual tokens, and text locations (boxes) as the input. Visual tokens are obtained by adaptively pooling the feature map of ResNeXt-101 to $7 \times 7$ . Then we flatten and concentrate it with the textual tokens to form the input token sequence following [29]. Two individual position embedding generators are utilized for encoding the tokens into position embeddings and box embeddings. Different from the baseline model LayoutXLM [29], our XYLayoutLM has two advantages: (1) An Augmented XY Cut module is proposed to sort the input tokens for different proper reading orders, which will contribute to the model performances by leveraging the layout information in reading order. (2) Instead of generating position embeddings with fixed-length MLPs, we propose the Dilated Conditional Position Encoding (DCPE) module to handle the input tokens of variable lengths from texts and images. In this section, we will first briefly introduce LayoutXLM [29] and then elaborate on the above-proposed components. + +# 3.2. Review of LayoutXLM + +Recall that LayoutXLM [29] accepts inputs of three modalities: text, image, and layout (i.e., token locations). + +The input of each modality is converted to an embedding sequence by a fixed-length MLP operated on the position indices as shown in Figure 2. The text and image embeddings are concatenated, plus the layout embedding to get the input embedding. After that, the input embeddings are encoded by a transformer with the spatial-aware self-attention mechanism within and between modalities. Finally, the visual/text token representations outputted by the transformer are used in the document understanding tasks. Since the architecture of self-attention layers is not our main concern, we omit it here and refer readers to [29, 30] for the details. + +# 3.3. Proper Reading Orders + +How to obtain proper reading orders of documents like forms and receipts is an open question. Intuitively, it is possible to infer how token boxes are aligned and where significant horizontal and vertical gaps are present from projection profiles. Hence, the projection profiles of token boxes can be used to determine the reading order. In this section, we first introduce the projection profiles of token boxes and then present the Augmented XY Cut algorithm. + +Projection Profiles. Suppose we are given a set of token boxes $B = \{b_i\}_{i=1}^K$ , where each $b_i = [x_1^i, y_1^i, x_2^i, y_2^i] \in \mathbb{Z}^4$ denotes a box and $K$ is the number of OCR extracted tokens. We also define the minimum and maximum token locations in $B$ as $(x_{min}, y_{min})$ and $(x_{max}, y_{max})$ . Then the horizontal mapping $H_{b_i}$ of box $b_i$ is formulated as a indicative function: + +$$ +H _ {b _ {i}} (y) = \left\{ \begin{array}{l l} 1, & y _ {1} ^ {i} \leq y \leq y _ {2} ^ {i} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {1} +$$ + +where $y \in \mathbb{Z}^{[y_{min}, y_{max}]}$ . For a location $y$ on Y-axis, $H_{b_i}(y)$ effectively mean whether $y$ is in the projection interval $[y_1^i, y_2^i]$ . Based on $H_{b_i}$ , we can define the horizontal projection profile of the set $B$ by summing all horizontal mapping functions of individual boxes: + +$$ +H _ {B} (y) = \sum_ {i = 1} ^ {K} H _ {b _ {i}} (y). \tag {2} +$$ + +The values of $H_B(y)$ represent how many token boxes are projected onto the Y-axis that covers the input variable $y$ . + +Similar to $H_B(y)$ , the vertical projection profile of $B$ can be denoted as follows: + +$$ +V _ {B} (x) = \sum_ {i = 1} ^ {K} V _ {b _ {i}} (x), \tag {3} +$$ + +where + +$$ +V _ {b _ {i}} (x) = \left\{ \begin{array}{l l} 1, & x _ {1} ^ {i} \leq x \leq x _ {2} ^ {i} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {4} +$$ + +is the vertical mapping on $b_{i}$ with $x \in \mathbb{Z}^{[x_{min}, x_{max}]}$ . + +![](images/7798e6713ae733d024dc84b9ca61dc3416ec850e9035b6fe0d14c8dca9baa631.jpg) +Figure 2. The overview of XYLayoutLM. Different from LayoutXLM, our XYLayoutLM proposes Augmented XY Cut and DCPE to extract and utilize layout information for multimodal document understanding. Best viewed in Adobe Acrobat DC. + +Valleys in Projection Profiles. For simplicity, let us take the horizontal projection profile $H_{B}$ as an example. As we mentioned before, after we have projected the token boxes $B$ to Y-axis to get corresponding intervals $\{[y_1^i,y_2^i ]\}_{i = 1}^K$ , $H_{B}(y)$ is like a histogram for counting the intervals that cover $y$ . As a result, there might be some valleys in the histogram. The valley here is defined as $y^{*}\in \mathbb{Z}^{[y_{min},y_{max}]}$ that meet the condition $H_{B}(y^{*}) = 0$ . There is no token box in the valleys. Thus, valleys of projection profiles can determine where the division has to take place. + +Augmented XY Cut Algorithm. Traditional XY Cut is a heuristic divide and conquer algorithm first proposed by [23] to segment a sentence into words according to the values of every pixel. In 1995, [11] utilized it to decompose documents (like newspapers) by applying XY Cut on the connected components. However, no current work explores the XY Cut in multimodal models or other deep learning transformers for obtaining proper reading orders. + +As mentioned in the introduction, the token locations are often recognized with noise. Instead of expensive human annotations of reading orders, we propose an augmentation strategy on these noisy locations to generate different proper reading orders during network training. We believe the proper reading orders implicitly contain important layout information, significantly benefiting document understanding tasks. We only perform traditional XY Cut as a pre-process during the inference stage. + +With the projection profiles and valleys defined above, Augmented XY Cut can be explained as follows. To better introduce it, we construct an XY Tree for recording the reading order while performing Augmented XY Cut. As shown in Algorithm 1 and Figure 2(b), we take the boxes set $B$ as input, and the algorithm will output an index array $O = \{s(i)\}_{i=1}^{K}$ as one proper reading order. At first, + +we create a root node without any index. Then, unlike traditional XY Cut, we propose an augmentation strategy based on three thresholds: $\lambda_x, \lambda_y, \theta$ . Specifically, $\lambda_x(\lambda_y)$ are thresholds that determine whether we shift a box on X-axis (Y-axis). If so, we will shift a box with $\theta \cdot v_x(\theta \cdot v_y)$ pixels in one direction. For every box, we generate two random values $v_x, v_y$ from $N(-1,1)$ . If $|v_x| > \lambda_x(|v_y| > \lambda_y)$ , then this box will be shifted with $\theta \cdot v_x(\theta \cdot v_y)$ pixels with the direction according to the sign of $v_x(v_y)$ . In this paper, we set hyper-parameters as 0.5, 0.5, 5 by default according to the experimental results. + +At each step, the projection profiles are calculated in either horizontal or vertical directions. Then a division is performed at the valleys in the corresponding projection profile to obtain several clusters. Their token boxes are gathered as the new child nodes of XY Tree in descending order. To obtain a proper reading order of length $K$ is now divided into sub-tasks in each cluster with the number of boxes as the sequence length. The process is repeated recursively until no sufficient valleys are left in both profiles. If a cluster has more than one box and it can not be divided by both horizontal and vertical projection profiles, then the reading order inside this cluster will follow the heuristic rules, e.g., descending first by Y-axis then X-axis. Finally, the output reading order is obtained by collecting the indices on leaves of the XY Tree w.r.t the tree height. + +To better explain the generation of XY Tree, we take Figure 2(b) as an example. In the first step, we horizontally project all seven boxes to the Y-axis by calculating the values of horizontal projection profile $H_{B}(y)$ . We find there is only one valley and then perform a division to get two clusters in descending order according to their location on Y-axis (see 1 and $2\cup 3\cup 4\cup 5\cup 6\cup 7$ in Figure 2(b)). The first cluster only has one element, i.e. box 1, and thus it is the + +# Algorithm 1 Augmented XY Cut Algorithm + +Require: boxes: $B = \{b_i\}_{i=1}^K$ , thresholds: $\lambda_x, \lambda_y, \theta$ + +Ensure: proper reading order: $O = \{s(i)\}_{i=1}^{K}$ + +1: Create a root node. $\triangleright$ Init XY Tree +2: Do augmentation on $B$ with $\lambda_x, \lambda_y, \theta$ . ▷ Augmentation +3: Find the valleys of horizontal $(H_B)$ or vertical $(V_B)$ projection profiles. +4: Do divisions at valleys. Whenever divisions are made, create a new child node. At each recursion level, horizontal and vertical divisions alternate. +5: Do Step 3-4 recursively until no further divisions are possible. +6: Gather the indices on leaves as output $O$ . + +first leaf of XY Tree. The second cluster has six elements with the candidate order array $2 \cup 3 \cup 4 \cup 5 \cup 6 \cup 7$ and thus is fed to the second step with vertical projection profiles. In the second step, two valleys are detected, and thus, the order of 2 and 7 are decided as the leaves of XY Tree while $3 \cup 4 \cup 5 \cup 6$ still need further divisions. By iteratively performing horizontal and vertical projections, we can obtain the final reading orders on the tree leaves. The pseudo-code is shown in the Appendix. + +# 3.4. Dilated Conditional Position Encoding + +Conditional Position Encoding (CPE) [5] aims to generate a various-length position embedding for different inputs in image classification task. Specifically, it reshapes the flattened input sequence $X$ back to $X'$ in the 2D visual space. Then, convolutional layers are repeatedly applied to the $X'$ to produce the positional embedding $E$ with proper kernel and padding size to keep the resolution. Finally, the position embedding $E$ is flattened and added to the token embeddings as the transformer input. + +However, simply replacing the MLP in LayoutXLM to CPE reduces the performance in VRDU tasks. One reason is the wrong neighbors of input tokens due to the improper reading order. Since CPE conditions on local context with convolutions, wrong neighbors will harm the model performances. Another reason is that CPE is designed specialized for image classification. The input visual tokens of image classification are $16 \times 16$ patches, and they can be naturally reshaped to 2D for local context extraction. However, in multimodal tasks, we also have 1D textual tokens in our input. These textual tokens only have 1D relations, so that they can not be reasonably reshaped to 2D. + +The first problem is solved with a proper reading order obtained by using our Augmented XY Cut. In this section, we propose Dilated Conditional Position Encoding (DCPE) to tackle the second problem, i.e., how to extract 1D local layouts from texts. As shown in Figure 2(a), our DCPE processes the textual and visual features individually. Specif + +ically, DCPE reshapes the 2D visual features and generates their position embeddings following the CPE. While for textual features, we utilized 1D convolutions to extract 1D local layouts. The encoded embeddings from the texts and images are concentrated as the final output. + +Another observation is that multimodal tasks often need larger receptive fields while capturing local layouts. For example, in the sentence "he is a very handsome boy", the relation of "he" and "boy" is essential but can not be successfully captured by standard 1D convolutions due to the small convolution kernel size (e.g., 3). To this end, we adopt dilated convolution [32] to replace standard convolutions, aiming for long-range neighbor information with larger receptive fields. Let $l$ be the dilation rate and the dilated convolution $*_{l}$ can be formulated as: + +$$ +(F * _ {l} k) (\mathbf {p}) = \sum_ {\mathbf {s} + l \mathbf {t} = \mathbf {p}} F (\mathbf {s}) k (\mathbf {t}) \tag {5} +$$ + +where $F, k$ are the input feature map and filter. By repeatedly stacking dilated convolutions with different dilation rates $l > 1$ , the DCPE module will pay more attention to the long-range neighbor information. Besides, the dilated convolutions have the same parameters as standard convolutions given the same kernel size, which means our DCPE will not increase the model complexity. Note that new parameters in DCPE are initialized by Xavier and updated with the whole model during training. + +# 4. Experiments + +# 4.1. Setup + +Datasets. Following LayoutXLM [29], we conduct experiments on widely used VRDU datasets FUNSD [14] and XFUN [29]. FUNSD is a form understanding dataset for scanned documents. It contains 199 annotated forms with 31485 words. XFUN is a benchmark for multilingual Form Understanding by extending the FUNSD to 7 other languages, including Chinese, Japanese, Spanish, French, Italian, German, and Portuguese, with 1393 fully annotated forms. Each language includes 199 forms, where the training set includes 149 forms, and the test set includes 50 forms. These two datasets provide the official OCR annotations (boundong boxes and tokens) as the input. + +Tasks. We focus on two tasks from VRDU, Semantic Entity Recognition (SER) and Relation Extraction (RE). Specifically, SER assigns each token a semantic label from a set of four predefined categories: question, answer, header, or other. For RE, following [29], we construct the set of relation candidates by generating all possible pairs of input tokens. We utilize a specific embedding layer for every pair to generate token type embedding as the token relation representation. The representations of head and tail are concatenated and fed into a bi-affine classifier. The F1 score is + +
TaskMethodsXFUN Avg.ZHJAESFRITDEPT
SERXLM-RoBERT [6]0.70470.87740.77610.61050.67430.66870.68140.6818
InfoXLM [4]0.72070.88680.78650.62300.70150.67510.70630.7008
LayoutXLM [29]0.80560.89240.79210.75500.79020.80820.82220.7903
LayoutXLM+CPE0.80470.87760.79090.75510.79080.80630.82270.7898
XYLayoutLM0.82040.91760.80570.76870.79970.81750.83350.8001
REXLM-RoBERT [6]0.47690.51050.58000.52950.49650.53050.50410.3982
InfoXLM [4]0.49100.52140.60000.55160.49130.52810.52620.4170
LayoutXLM [29]0.64320.70730.69630.68960.63530.64150.65510.5718
LayoutXLM+CPE0.63990.70590.69680.68120.62380.63990.64740.5723
XYLayoutLM0.67790.74450.70590.72590.65210.65720.67030.5898
+ +Table 1. Comparison with different methods on the XFUN w.r.t F1 score (↑), where "SER" denotes the semantic entity recognition and "RE" denotes the relation extraction. + +
MethodsModalitySER
BERT [7]Language0.6026
RoBERTa [6]Language0.6648
BROS [13]Language0.8121
LayoutLMv1 [28]Language + Layout+ Vision0.7927
LayoutXLM [29]Language + Layout+ Vision0.8276
DocFormer [2]Language + Layout+ Vision0.8334
SelfDoc [18]Language + Layout+ Vision0.8336
StructuralLM* [16]Language + Layout0.8514
XYLayoutLMLanguage + Layout+ Vision0.8335
+ +Table 2. Comparison with different methods on the FUNSD w.r.t F1 score (↑). The * means StructuralLM use the LARGE model while others use BASE models. + +
MethodsSERRE
ZHESZHES
LayoutXLM0.89240.75500.70730.6896
+CPE0.87760.73060.70590.6812
+2×CPE0.88190.74120.70820.6820
+2×DCPE0.89520.75480.70970.6843
+XY Cut0.89030.75620.72810.7175
+Aug XY Cut0.90230.75700.73890.7213
+Aug XY Cut & CPE0.90370.75970.74010.7236
+Aug XY Cut & DCPE0.91760.76870.74450.7259
+ +used as the evaluation metric for both two tasks. + +Model variants. We init the weight of our XYLayoutLM with pretrained LayoutXLMBASE. We set hidden size $d = 768$ and use a 12-layer 12-head transformer. The visual backbone is ResNeXt101-FPN, and the visual features are from its $P_{2}$ layer in FPN following LayoutXLM. + +Training details. We use the same hyper-parameters with LayoutXLM for fair comparisons on two datasets. On + +Table 3. Ablation studies of XYLayoutLM on XFUN (Chinese, English) for SER and RE tasks w.r.t F1 score $(\uparrow)$ . $2\times$ means we use two convolutional layers in this module. + +
MethodsSERRE
ZHESZHES
default order0.89240.75500.70730.6896
remove-pos-embed0.88420.74770.69410.6682
descending (Y,X)0.88570.74860.72970.7179
descending (X,Y)0.85610.73430.68580.6549
descending (X+Y)0.88440.75130.72350.7086
XY Cut0.89030.75620.72810.7175
Aug descending (Y,X)0.89250.75430.73310.7212
Aug XY Cut (0.5, 0.5, 1)0.89130.75680.72820.7178
Aug XY Cut (0.2, 0.2, 5)0.90110.75860.73870.7202
Aug XY Cut (0.5, 0.5, 5)0.90230.76000.73890.7213
Aug XY Cut (0.7, 0.7, 5)0.89180.75410.72600.7166
Aug XY Cut (0.5, 0.5, 10)0.87020.73990.69200.6894
+ +Table 4. F1 scores (↑) of baseline LayoutXLM based on different reading orders on XFUN (Chinese, English). + +XFUN, the learning rate and batch size are set as $5 \times 10^{-5}$ and 32 for the SER task, respectively. We train the model with 1000 iterations for convergence. For the RE task, the batch size is 8 with 2500 iterations for training. While on the FUNSD, the batch size is 16, and we train the model for 1000 iterations following [30]. + +# 4.2. Main Results + +Here we compare our method with textual-based methods XLM-RoBERT [6], InfoXLM [4] and LayoutXLM [29] on XFUN. The results are shown in Table 1. From the table we can observe that XYLayoutLM achieves the best performance among the listed methods. More specifically, among the multimodal methods, XYLayoutLM outperforms the original LayoutXLM [29] by $1.48\%$ F1 score on the XFUN dataset for the SER task. Besides, our XY-LayoutLM achieves a 0.6779 F1 score in RE task, which is an obvious improvement beyond the baseline LayoutXLM (0.6432). Similar conclusions are drawn on the FUNSD dataset as shown in Table 2. Our XYLayoutLM achieves + +
DCPESERRE
TextImageZHESZHES
Conv2dConv2d0.90370.75970.70590.6812
Conv1dConv1d0.90910.76130.70660.6832
Conv1dConv2d0.91400.76250.72560.7106
D-Conv1dConv2d0.91630.76690.74400.7244
Conv1dD-Conv2d0.91490.76420.74270.7211
D-Conv1dD-Conv2d0.91760.76870.74450.7259
+ +Table 5. F1 scores (↑) of XYLayoutLM based on different DCPE architectures on XFUN (Chinese, English). + +comparable performances with latest methods like DocFormer [2] and SelfDoc [18]. Note that StructuralLM* [16] uses the LARGE model to get the best performance while other methods in this table only use the BASE model. + +Another observation is that only using CPE [5] on the LayoutXLM for position embeddings generation harms the performances on all tasks. This observation verifies our claim on the weakness of CPE for multimodal networks as mentioned in Section 3.4. + +# 4.3. Ablation Studies + +We perform SER experiments on the Chinese and English subsets of the XFUN dataset for the ablation studies. First, we show the impact of progressively integrating our different components: the DCPE and Augmented XY Cut module, to the baseline in Table 3. Then we explore different settings of each component individually. + +Analysis for Components. As shown in Table 3, we first use the CPE to generate position embeddings instead of MLP in LayoutXLM, which decreases about $0.2\%$ F1 score. It can be explained that the local context obtained by CPE for position embeddings generation is noisy due to the unreasonable reading order and wrong neighbors. In the third and fourth rows, we replace the CPE with our proposed DCPE with dilated convolutions, resulting in an improvement on all tasks. Note that $2\times$ means we stack two convolutional layers in each module since only one dilated convolutions may lose the information in the holes. + +However, the performance gain of only using DCPE suffers from improper reading orders. Next, we only add XY Cut to the baseline, leading to significant improvements of F1 score on both SER (1%) and RE (3%) tasks, which verifies the essential effect of proper reading order. Furthermore, when we only perform Augmented XY Cut (Aug XY for short in table), its improvement is satisfactory. The last two rows show the performances of CPE and DCPE associated with Augmented XY Cut. We can observe that our DCPE achieves much better results than CPE because of the larger receptive fields on both textual and visual features. + +Moreover, benefiting from the Augmented XY Cut, the improvements of DCPE are highly promoted. When + +adapted to the baseline model in the default improper reading order, DCPE only gains $0.1\%$ F1 score improvement on the Chinese subset of XFUN in the SER task. However, after Augmented XY Cut, the improvement comes to $1.5\%$ . + +In total, the whole improvements of XYLayoutLM upon baseline LayoutXLM indicates the effectiveness of our two contributions, Augmented XY Cut and DCPE. + +Analysis for Augmented XY Cut. The token reading order is an essential factor of the effective document understanding method. Thus, to evaluate the improvement achieved by our proposed Augmented XY Cut, we conduct experiments on XFUN with different reading orders based on the baseline LayoutXLM as shown in Table 4. When we removed all the position embeddings as shown in the second row, the performance decreased for SER and RE tasks, which indicates the importance of position embeddings for incorporating the reading order. The next four rows are heuristic rules for sorting tokens, i.e., descending first by Y-axis then X-axis, first by X-axis then Y-axis, by $\mathrm{Y} + \mathrm{X}$ based on the left-top point of the token box and traditional XY Cut. However, their performances are not satisfying compared to the baseline. Finally, by using our Augmented XY Cut, the model achieves the best performance. Note that we set the hyper-parameter $\lambda_{x},\lambda_{y},\theta$ as 0.5, 0.5, 5 since it has slightly better performance than other choices. + +Analysis for DCPE. Besides the ability to deal with various-length inputs, the DCPE module also plays a critical role in our XYLayoutLM for gathering local layouts from both textual and visual features. Thus, we compare several settings inside the DCPE module to improve its effectiveness. As presented in Table 5, with the replacement of standard convolutional layers to dilated ones for textual and visual tokens, the network performance improves steadily and achieves the peak F1 score when using dilated convolutions for both textual and visual tokens. Another observation is that 1D convolutions can better extract textual features than 2D ones, which also verifies our claim on the reasons for the failure of CPE in multimodal networks. + +With these ablation studies, we conclude that in XYLayoutLM: the Augmented XY Cut and DCPE module all play essential roles w.r.t. the final performance. + +# 4.4. Visualizations + +Effects on attention scores. We have shown that XYLayoutLM can have better performance than the original baseline LayoutXLM. However, because the Augmented XY Cut and DCPE provide the layout information implicitly in the position embeddings, it is interesting to see the attention weights of the transformers. Given a document, the size of the attention score is $561 \times 561$ following LayoutXLM (512 textual tokens and 49 visual tokens). We visualize the attention score matrix from different attention layers of one sample with the same reading order in Figure 3. Note that + +![](images/07c86a90ec8f086f1a599062a7e649d398bfbc493e802bb4928f65d4973dded5.jpg) +LayoutXLM + +![](images/aa158916947af40b006ff3ed9d9593f8f62bc2acb37aef934c3cef94484ecabe.jpg) + +![](images/929c5d2fcb7ac77f9ddebb00a5b58e815919877794a466e41d4c9a2bdd9b0d61.jpg) +XYLayoutLM + +![](images/4c3090cb9aeab671704dafedc119649350b6a8330893aada9e2dc237ace0dd93.jpg) + +![](images/b5e2fbf3c967d36ecfb53d8a5b8c3efb766f29869ca612e009be00f6fbe06962.jpg) +Figure 3. Visualizations of the attention scores from one sample based on LayoutXLM and XYLayoutLM. The attention score maps are from the twelveth attention head in the first/twelveth attention layer. Best viewed in color. + +![](images/bdd6c21adf94df13c7abb9e0bbc1a5bf12639fd76087d7c5d25b1478bbc15152.jpg) +Figure 4. Visualizations of Augmented XY Cut on input tokens. The reading order is shown as the red indices. +Figure 5. Predictions of LayoutXLM and XYLayoutLM for SER task. The red words are the ground truth. The blue and green words are the prediction of LayoutXLM and XYLayoutLM, respectively. Best viewed in color. + +these attention score maps are all from the twelfth attention head without normalization. + +From Figure 3 we can draw the following conclusions. The attention weights of XYLayoutLM are larger than LayoutXLM in most layers, which means XYLayoutLM can better capture the attention and relations among tokens. Moreover, benefiting from DCPE, XYLayoutLM can extract more layout information from the local neighbors since the bright lines in XYLayoutLM are bolder. + +Augmented XY Cut. We visualize the tokens reading order before and after our proposed Augmented XY Cut in Figure 4. The figure shows that our XY Cut successfully sorts the input tokens in proper reading order. + +Performances on XFUN. The visualization of XYLayoutLM and LayoutXLM on the XFUN dataset is shown in Figure 5. The red color in this figure denotes the ground truth, while the blue and green colors mean the predicted categories of LayoutXLM and XYLayoutLM, respectively. The figure shows that our XYLayoutLM can classify tokens better in challenging situations than LayoutXLM. + +# 5. Conclusion + +In this work, we introduced XYLayoutLM, a simple yet effective multimodal network for document understanding. Our model contains two related contributions, i.e., Augmented XY Cut for proper reading order and DCPE for generating various-length position embeddings with local layout information. Moreover, it achieves competitive results on several VRDU datasets. We hope our work could inspire designing new frameworks to tackle the challenging document understanding tasks. + +# 6. Acknowledgements + +The work is supported by Ant Group through Ant Research Intern Program, the Shanghai Municipal Science and Technology Major Project, China (20511100300, 2021SHZDZX0102) and the National Science Foundation of China (62076162). + +# References + +[1] M. Aiello and Amw Smeulders. Bidimensional relations for reading order detection. 2003. 3 +[2] Srikar Appalaraju, Bhavan Jasani, Bhargava Urala Kota, Yusheng Xie, and R Manmatha. Docformer: End-to-end transformer for document understanding. arXiv preprint arXiv:2106.11539, 2021. 1, 6, 7 +[3] M. Ceci, M. Berardi, G. A. Porcelli, and D. Malerba. A data mining approach to reading order detection. In ICDAR, 2007. 3 +[4] Zewen Chi, Li Dong, Furu Wei, Nan Yang, Saksham Singhal, Wenhui Wang, Xia Song, Xian-Ling Mao, Heyan Huang, and Ming Zhou. Infoxm: An information-theoretic framework for cross-lingual language model pre-training. In NAACL, 2021. 1, 2, 6 +[5] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021. 1, 2, 3, 5, 7 +[6] Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. Unsupervised cross-lingual representation learning at scale. In ACL, 2020. 1, 6 +[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019. 1, 2, 6 +[8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 1, 2 +[9] Stefano Ferilli, Domenico Grieco, Domenico Redavid, and Floriana Esposito. Abstract argumentation for reading order detection. In ACM symposium on Document engineering, 2014. 3 +[10] Lukasz Garncarek, Rafat Powalski, Tomasz Stanisławek, Bartosz Topolski, Piotr Halama, Michal Turski, and Filip Graliński. Lambert: Layout-aware language modeling for information extraction. In ICDAR, 2020. 1, 2 +[11] Jaekyu Ha, Robert M Haralick, and Ihsin T Phillips. Recursive xy cut using bounding boxes of connected components. In ICDAE, 1995. 2, 3, 4 +[12] Leipeng Hao, Liangcai Gao, Xiaohan Yi, and Zhi Tang. A table detection method for pdf documents based on convolutional neural networks. In DAS, 2016. 1 +[13] Teakgyu Hong, Donghyun Kim, Mingi Ji, Wonseok Hwang, Daehyun Nam, and Sungrae Park. Bros: A pre-trained language model focusing on text and layout for better key information extraction from documents. arXiv preprint arXiv:2108.04539, 2021. 6 +[14] Guillaume Jaume, Hazim Kemal Ekenel, and Jean-Philippe Thiran. Funsd: A dataset for form understanding in noisy scanned documents. In ICDARW, 2019. 5 + +[15] Anoop Raveendra Katti, Christian Reisswig, Cordula Guder, Sebastian Brarda, Steffen Bickel, Johannes Höhne, and Jean Baptiste Faddoul. Chargrid: Towards understanding 2d documents. In EMNLP, 2018. 1 +[16] Chenliang Li, Bin Bi, Ming Yan, Wei Wang, Songfang Huang, Fei Huang, and Luo Si. Structurallm: Structural pre-training for form understanding. arXiv preprint arXiv:2105.11210, 2021. 1, 6, 7 +[17] Liangcheng Li, Feiyu Gao, Jiajun Bu, Yongpan Wang, Zhi Yu, and Qi Zheng. An end-to-endOCR text re-organization sequence learning for rich-text detail image comprehension. In ECCV, 2020. 3 +[18] Peizhao Li, Jiuming Gu, Jason Kuen, Vlad I Morariu, Handong Zhao, Rajiv Jain, Varun Manjunatha, and Hongfu Liu. Selfdoc: Self-supervised document representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5652-5660, 2021. 1, 6, 7 +[19] Xiaojing Liu, Feiyu Gao, Qiong Zhang, and Huasha Zhao. Graph convolution for multimodal information extraction from visually rich documents. In NAACL, 2019. 1 +[20] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. 1, 2 +[21] Donato Malerba and Michelangelo Ceci. Learning to order: A relational approach. In IWMCD, 2007. 3 +[22] Donato Malerba, Michelangelo Ceci, and Margherita Berardi. Machine learning for reading order detection in document image understanding. In MLDAR, 2008. 3 +[23] George Nagy and Sharad C Seth. Hierarchical representation of optically scanned documents. In ICPR, 1984. 4 +[24] Sebastian Schreiber, Stefan Agne, Ivo Wolf, Andreas Dengel, and Sheraz Ahmed. Deepdesrt: Deep learning for detection and structure recognition of tables in document images. In ICDAR, 2017. 1 +[25] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. In NAACL-HLT, 2018. 2 +[26] Carlos Soto and Shinjae Yoo. Visual detection with context for document layout analysis. In EMNLP, 2019. 1 +[27] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2 +[28] Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei, and Ming Zhou. Layoutm: Pre-training of text and layout for document image understanding. In KDD, 2020. 1, 2, 6 +[29] Yiheng Xu, Tengchao Lv, Lei Cui, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, and Furu Wei. Layoutxm: Multimodal pre-training for multilingual visually-rich document understanding. arXiv preprint arXiv:2104.08836, 2021. 1, 2, 3, 5, 6 +[30] Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, et al. Layoutmv2: Multi-modal pre-training for visually-rich document understanding. In ACL, 2021. 1, 2, 3, 6 + +[31] Lecun Yann, Bottou Leon, Bengio Yoshua, and Haffner Patrick. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. 1 +[32] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. 5 +[33] Z. Yu, J. Yu, Y. Cui, D. Tao, and Q. Tian. Deep modular coattention networks for visual question answering. In CVPR, 2019. 1 +[34] Xu Zhong, Jianbin Tang, and Antonio Jimeno Yepes. Publaynet: largest dataset ever for document layout analysis. In ICDAR, 2019. 1 +[35] Wang Zilong, Xu Yiheng, Cui Lei, Shang Jingbo, and Wei Furu. Layoutreader: Pre-training of text and layout for reading order detection. In EMNLP, 2021. 3 \ No newline at end of file diff --git a/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/images.zip b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..52ae56f370e335ecb2f2cab088a810069c0ba9f2 --- /dev/null +++ b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41dca1f080e0a1ba419a6c1a67985682beb93484beb49ee394139508be6dd54a +size 528937 diff --git a/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/layout.json b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..aa036aedb72fc9f5061f1cec3f42faaaeda047f9 --- /dev/null +++ b/xylayoutlmtowardslayoutawaremultimodalnetworksforvisuallyrichdocumentunderstanding/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2df6b91ee54df97b6d12384305a9845b82d411f1967cd4d23b6f6b53dd812de +size 346668 diff --git a/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_content_list.json b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4624a2c774197c80a349b7f59d4674698eeae452 --- /dev/null +++ b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dc0405bd6b5a262aab48c3f86f33b2192f0d7a271c13c3eb6abac3328f8b83c +size 84873 diff --git a/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_model.json b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ed893cdd9a38f821f577090a66c21545275621a0 --- /dev/null +++ b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13eda0f59605ea7045705cd1eebc16bf5da4e250c814196a1c8d2a2e271770cf +size 103218 diff --git a/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_origin.pdf b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0ff43f42d1577bab7bbb2552bd997917086016c0 --- /dev/null +++ b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/bd3646e8-5b4b-430e-ac86-7e4063e8e112_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d651716f0eb7c7fbe93a8715759ced7568205938a8faa20727ec7c36fad0708 +size 7443817 diff --git a/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/full.md b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ac9a69e920b59155971c0d5df68953b3078dd391 --- /dev/null +++ b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/full.md @@ -0,0 +1,376 @@ +# You MVOS: An Actor-centric Multi-shot Video Object Segmentation Dataset + +Donglai Wei $^{1\dagger}$ Siddhant Kharbanda $^{2\dagger*}$ Sarthak Arora $^{2*}$ Roshan Roy $^{2*}$ Nishant Jain $^{2*}$ Akash Palrecha $^{2*}$ Tanav Shah $^{2*}$ Shray Mathur $^{2*}$ Ritik Mathur $^{2*}$ Abhijay Kemkar $^{2*}$ Anirudh Chakravarthy $^{2*}$ Zudi Lin $^{2}$ Won-Dong Jang $^{2}$ Yansong Tang $^{3,4}$ Song Bai $^{5}$ James Tompkin $^{6}$ Philip H.S. Torr $^{4}$ Hanspeter Pfister $^{2}$ + +$^{1}$ Boston College $^{2}$ Harvard University $^{3}$ Tsinghua-Berkeley Shenzhen Institute, Tsinghua University $^{4}$ University of Oxford $^{5}$ ByteDance Inc. $^{6}$ Brown University + +![](images/160cb360a0ea6ede06f050308cd2a4983b484e19137f63ee43dba68381fd9384.jpg) +Figure 1: Multi-shot video object segmentation (MVOS). In multi-shot videos, MVOS aims to track and segment selected recurring objects despite changes in appearance (e.g., person in green masks) and disconnected shots (e.g., person in red masks). We show sample (a) frames, (b) segmentation masks, and (c) timelines for the Gangnam Style video in our dataset. + +![](images/c7b0c2f8dec10be03641ff9856747c46b1f276f88bdc60f71f924c047f4f8be4.jpg) + +# Abstract + +Many video understanding tasks require analyzing multi-shot videos, but existing datasets for video object segmentation (VOS) only consider single-shot videos. To address this challenge, we collected a new dataset—YouMVOS—of 200 popular YouTube videos spanning ten genres, where each video is on average five minutes long and with 75 shots. We selected recurring actors and annotated 431K segmentation masks at a frame rate of six, exceeding previous datasets in average video duration, object variation, and narrative structure complexity. We incorporated good practices of model architecture design, memory management, and multi-shot tracking into an existing video segmentation method to build competitive baseline methods. Through error analysis, we found that these baselines still fail to cope with cross-shot appearance variation on our YouMVOS dataset. Thus, our dataset poses new challenges in multi-shot segmentation towards better video analysis. Data, code, and pre-trained models are available at https://donglaw.github.io/proj/youMVOS + +# 1. Introduction + +The broad computer vision goal of video understanding must include the analysis of multi-shot videos with complex narratives [25, 32], including depictions of people and objects that vary in their visual appearance and space-time relationships across shot transitions. Video object segmentation (VOS) [37, 56] plays an essential role in video understanding. In multi-shot videos, this task requires accurately tracking and masking the same object across cuts despite appearance changes (Fig. 1). If multi-shot VOS is achieved, then it can ease video applications like editing [6] for privacy blur, relighting, or semantic color grading, and help in the analysis of poses and actions of specific objects. In the long term, multi-shot VOS data and methods can build towards a more sophisticated high-level video understanding. + +Methods for VOS and the related video instance segmentation (VIS) problem are developed on datasets with single-shot videos that span only several seconds—a limitation highlighted in a recent survey [52]. Consequently, VOS methods often lose track of object instances in multi-shot videos, especially in videos with fast cuts and many object appearance changes, such as in music videos. As there are no existing multi-shot VOS datasets, it is hard to characterize these errors and reliably improve performance. + +To foster research in multi-shot VOS, we collect a new dataset—YouMVOS—consisting of 200 multi-shot YouTube videos at full length that are on average five minutes long and with 75 shots (Tab. 1). The average duration of videos in YouMVOS is at least $7.7 \times$ longer than existing VOS datasets. To choose representative online videos, we first pick ten popular video genres, including sports, cooking, and music videos, and then pick 20 popular videos in each genre with diverse content and temporal structures. Our multi-shot VOS dataset focuses on actors—human, animal, or virtual characters—that vary their positions, poses, and appearances across edited shots. This is similar in intent to object-specific VOS datasets, e.g., cars and pedestrians for autonomous driving [50]. To annotate our dataset efficiently, we build a semi-automatic system with manual proofreading using modern keyframe selection, mask initialization, and mask propagation. This produced 431K annotated instance masks— $46\%$ more masks than the latest VIS dataset [38]. + +To understand the new challenges in YouMVOS, we first benchmark existing unsupervised VOS methods [58] and video instance segmentation (VIS) methods [57, 8, 10], which were developed using short-term single-shot video datasets. To improve single-shot models, we examine model architectures and memory management practices to handle the change of actor position and appearance across shots. Then, we add multi-shot tracking to further improve baseline suitability to YouMVOS. The adapted model defines the baseline performance on YouMVOS. Finally, we perform error analysis using oracle data to identify where improvements can be made in the future, finding that cross-shot appearance variation is still a challenge. + +Our contributions are 1) the YouMVOS dataset with 200 multi-shot YouTube videos and 431K annotated instance masks for the main actors, 2) an improved baseline segmentation model on YouMVOS to better handle long-term multi-shot videos, and 3) an error analysis of the improved baseline methods. Together, this provides a new challenge for the computer vision community and another step towards a more general understanding of complex videos. We also publicly release our data, code, and models. + +# 2. Related Work + +Object Segmentation in Videos. We refer readers to Wang et al. [52] for the survey on video object segmentation methods. There are two main settings: generic video object segmentation (VOS), where object classes are unknown, and video instance segmentation (VIS) with known classes. However, popular datasets only have single-shot videos. + +For VOS, the DAVIS Challenge [37] is the de facto benchmark with semi-supervised, interactive, and unsupervised learning settings to segment single-shot video clips. Our task uses the unsupervised setting, where methods automatically discover primary objects that are frequently present across + +
DatasetsAvg. dur. (sec)Avg. #shotsAvg. #YT views†Total #masks
DAVIS17 [37]2.91N/A14K
YTVOS [56]4.510.1M197K
YouMVOS (Ours)333.175433.8M431K
MOTS [50]43.41N/A65K
BDD [57]40.01N/A129K
YTVIS [57]4.610.1M131K
OVIS [38]12.71N/A296K
A2D [55]5.010.5M16K
J-HMDB [27]1.01N/A31K
+ +Table 1: Statistics of VOS, VIS and VAAS datasets. Our YouMVOS dataset contains full-length YouTube videos with more shots and masks. († by the time of submission) + +frames through co-occurrence, object saliency, or object detection [59, 33, 51, 17, 43, 34]. Instead of primary objects, our YouMVOS dataset focuses on segmenting actors, i.e., leading and supporting actors, from popular full-length YouTube videos that are mostly edited and multi-shot. + +VIS [57], or multi-object tracking and segmentation (MOTS) [50], aims to segment and track all instances of an object class in a single shot. For example, the YouTube-VIS dataset [57] has 40 categories of common objects, while the MOTS dataset [49] labels pedestrians and cars. Built upon existing image instance segmentation pipelines [21], early VIS and MOTS methods add a new tracking head [57, 50]. Recent advances include using better object detection modules [2, 53] and extracting richer image features [30]. However, recent state-of-the-art methods [5, 31] employ heavily engineered models with sophisticated inference schemes, making them inefficient for long-term videos, e.g. videos in our YouMVOS dataset. So instead, we start from an efficient baseline method and add improvements to achieve comparable performance without a heavily engineered scheme. + +In addition, the actor-centric segmentation task, e.g., video actor-action segmentation (VAAS), has recently received attention [55, 18, 26, 12]. In addition to segmenting actors, this task requires classifying the corresponding action classes. However, videos in current datasets [55] are single-shot with only sparse and coarse mask annotation. + +Video Shot Detection. Early shot detection methods cluster frames by color similarity [42], response curves from low-level visual features [40], and other modalities [45, 29]. In addition, spectral clustering [11] and dynamic programming [19, 48] algorithms have been applied. Popular benchmark datasets include IBM OVSD [41] and BBC Planet Earth [3]. The recent MovieScenes dataset [39] further groups shots into semantically consistent scenes for detection. Our baseline method adopts the shot detection results from an online $k$ -means method. + +![](images/43f18365400ade008c57fe3b88f0a63f2656d78faf15d8a32d582cbf96abb1d8.jpg) +Figure 2: YouMVOS dataset. We select ten major video genres with 20 popular videos in each. For each video, the dataset has high-quality segmentation masks of recurring actors for the whole video at 6 FPS. + +![](images/5ed9429051c90f35a90635de3221fd24109214db54d528b9c6e9bb4df3a4116d.jpg) + +![](images/54a8d25ce0dc3dfde6f5e066f7734f761987d9ae461e65a97f9c2fe3a0d2d28d.jpg) + +![](images/89f74430fe5de6531272495b4c4498228349fe171dbeef2d2e4b23a7f9491000.jpg) + +![](images/3d6fbccba02811242f670cd3004aec85fe82fdbe18c388f53d767bc83674bae3.jpg) + +Person Re-identification (Re-ID). To link the same actor across video shots, robust face [1] and body [23, 25] visual features are commonly used. In addition, audio features [35], text features [15, 20, 16, 46], and relational features [24] have been explored for the task. Inspired by Xia et al. [54], our improved baseline method uses multi-modal features to link actors across shots. To simplify the design, we use pre-trained Re-ID models as feature extractors. + +# 3. YouMVOS Dataset + +# 3.1. Dataset Construction + +Video Selection. We compiled a list of YouTube video genres from online blogs and selected ten popular genres with high complexity: music video, kid, movie trailer, cooking, pet, sports, show, how-to, education, and product (Fig. 2). We excluded video genres with few recurring actors (e.g., 'best-of' video compilations) or with static camera pose (e.g., talking heads in gaming videos). For each genre, we selected 20 popular videos—200 total—while balancing gender, race, and sub-genres. The full-length videos were downloaded at $1280 \times 720$ resolution. + +Recurring Actor Selection. Current VOS and VIS datasets label selected or all object instances within their single-shot videos. For our dataset, we annotated actors who appear in at least five shots in the video. In addition to human actors, we included animals and virtual characters to increase the diversity and difficulty of the dataset. In the end, we annotated on average 2.5 actors per video. + +Video-Level Statistics. In Fig. 3a, we plot the mean number of YouTube views to show the popularity gap among video genres (blue bars) and video shots as a measure of complexity (red bars). As expected, music video has both the most number of views and the highest shot change frequency, while videos made by amateurs (e.g., pet) have less sophisticated video structures. We categorize annotated actors into adult, child, animal, and virtual characters and plot a histogram of their occurrence (Fig. 3b). Virtual characters + +![](images/f5c63b4d04e4ba4cf2709ef5f9e3e673efad933614bcbc1e7ee33e1cf443f6af.jpg) +Figure 3: Video-level statistics. We plot (a) the average number of YouTube views and shots for videos in each genre, and (b) histogram of four different types of actors. + +![](images/681bf0717dde4dc447e0073d1d48d7a6b3b048d5aac5b978d75cf9ce3c2cc344.jpg) + +in YouMVOS pose new challenges in appearance that are absent in current VOS and VIS datasets. + +# 3.2. Dataset Annotation + +We annotated objects in representative keyframes and then propagated annotations to frames within corresponding video shots. To refine the actor masks, we built a semi-automatic annotation pipeline for annotators to correct errors from automatic results. Similar to Xu et al. [56], we annotated frames at 6 FPS. + +Step 1: Shot Detection and Selection. The goal is to find frames at 1 FPS with the selected actors for annotation. We first divided frames into shots by frame clustering nearest neighbors. For clustering, we extracted features from the average pooling layer in a ResNet-18 network trained on ImageNet and computed the cosine distance among features. We built a Web visualization tool to correct the shot detection results and select shots containing actors of interest. Then, we pick frames that are closest to cluster centers as keyframes (Fig. 4a). These represent $0.01\%$ of all frames, which reduces downstream mask initialization work. + +Step 2: Mask Initialization. To create initial annotations, we run a pre-trained PointRend network [28] to generate segmentation masks on selected keyframes (Fig. 4b). Then, using the VAST volumetric segmentation annotation software [4] on our video data, human annotators selected masks + +![](images/6f4295beaa567fa1c6de26a0ccca2ce45b359f2e353894deb7720652b9cd1a27.jpg) +(a) Shot detection and selection + +![](images/937444fca2d3308389d39b1cc469056a69c662549153de77bb7515adf66a1c86.jpg) +(b) Mask initialization +Figure 4: Annotation pipeline. (a) We divide frames into shots at 1-FPS, and then select shots with recurring actors. (b) We segment one keyframe per selected shot with a pre-trained PointRend network [28] and manual correction. (c) We iteratively propagate masks from keyframes at 1-FPS to 6-FPS frames with a pre-trained STM network [36] and manual correction. + +![](images/c569d658f90dc64976081ddd373a18998fd9d37aafdcd87a3c21a7981c342788.jpg) +(c) Mask propagation (STM [36]+manual) + +for recurring actors from the PointRend result and manually corrected the masks. Due to the challenging scene composition and actor appearance, we found it not uncommon for automatic prediction to fail totally; in these cases, our human annotators manually segmented the actors. + +Step 3: Mask Propagation. We propagate masks using a Space-Time Memory network (STM) [36]. However, its results can quickly degenerate due to complex actor appearance. Thus, we take a coarse-to-fine approach to mask propagation: from keyframes to labeling a frame every second, and then to labeling a frame around every 0.17 seconds to achieve the final 6 FPS annotations (Fig. 4c). After each propagation step, annotators correct the segmentation in corresponding frames. As mask density increases during annotation, the STM results improve significantly. For post-processing, we remove mask regions that are tiny. + +Annotation Quality. To ensure the high quality of labeled masks, our annotators examined and corrected the segmentation results on all frames for each video. On average, each frame was inspected by three different annotators. Our annotation team had ten annotators who were trained for a week before the formal annotation. To examine annotation consistency, we select representative images and compare the segmentation mask IoU from our semi-automatic annotation pipeline and those from different annotators labeled from scratch. Overall, the IoU score is 0.93, which shows that our annotation pipeline results are similar to a fully-manual approach. We repeat the same annotation consistency evaluation protocol for the YouTube-VOS dataset, which has similar mask quality (0.89) to our dataset. We refer readers to the supplementary material for details. + +# 3.3. Challenges in Multi-shot VOS + +Actor Changes in Different Shots. Cross-shot tracking is challenging due to the on-and-off presence of actors and their sudden appearance and position change (Fig. 5a). We plot a histogram of the number of presence switches for all actors. For appearance change, we compute the cosine distance of pre-trained ResNet-18 features between cropped neighboring frames and average them for each actor for + +![](images/5b1849432881ca2198b114d0a793463613f63464baf5561c428379dcd8e393bf.jpg) +(a) Three frames from three consecutive shots + +![](images/71ba1d6f5f9c5bc789d68a1bc18fc6828d634d6912a646fa1f73ea1edb3a7c25.jpg) + +![](images/b475e77c062862a2303162613992c2960e274e667948cd2e38923e47fe272c2b.jpg) +Figure 5: Challenges in multi-shot VOS. (a) Even in frames from consecutive shots, actors can switch locations (e.g., a jump cut) and change appearance. We plot the number of switches per actor, and the frequencies of actor appearance feature distances and center location distance for same-shot and cross-shot frames. (b) Beyond the cut shot transition, the dip, cross-dissolve, and wipe transitions can be confusing for models to track and segment actors. + +same-shot and cross-shot pairs. We quantize the distance and plot the distance frequency. For position, we compute the center change for same-shot and cross-shot cases and plot the distance. Actors undergo more appearance and position changes across shots than within same-shot frames. + +Shot Transitions. Our dataset contains four visual shot transition effects: cut, dip, cross-dissolve, and wipe. We plot a histogram of transition types (Fig. 5b). Dip, cross-dissolve, and wipe are challenging for VOS and VIS models. For example, cross-dissolve transition blends light intensity, which can lead to false linking of different actors. + +# 3.4. Task Setting and Evaluation Metrics + +For simplicity, we adopt the unsupervised online setting of VOS for our dataset, which does not need the initial mask input. We use the evaluation metrics defined for the unsupervised track in the DAVIS VOS challenge [7]: region similarity score $\mathcal{I}$ and contour accuracy $\mathcal{F}$ . For each video, we use the Hungarian algorithm to match the ground truth video segments to the predicted ones. For each ground truth actor, we average $\mathcal{I}$ and $\mathcal{F}$ with the best-matched proposals. The final score is the weighted average over all ground-truth actors in all videos according to their number of appearances. Due to the annotation difficulty on certain frames, e.g., ambiguous actor boundary in both space and time, we exclude these frames for evaluation. + +# 4. Improved Baseline Model + +As a dataset paper, we also provide a baseline method for the community to compare against. In this section, we first examine existing models (Sec. 4.1), and then improve the module designs of one baseline model for both single-shot (Sec. 4.2) and multi-shot (Sec. 4.3) videos. + +# 4.1. Baseline VIS Models + +For the unsupervised online actor segmentation task, we can directly apply unsupervised video object segmentation (VOS) methods or video instance segmentation (VIS) methods without using class labels. Empirically, we find it hard to adapt unsupervised VOS methods to our multi-shot dataset, as they either require offline processing [43, 34] or have undesirable performance due to the lack of a tracking module [61]. Thus, we evaluate VIS baseline models developed on the YouTube-VIS dataset [57] whose object categories overlap with ours. + +The state-of-the-art VIS methods MaskProp [5] and Propose-Reduce [31] have not publicly released their training codes, making it hard to finetune on YouMVOS. Further, we find the recent transformer-based method VISTR [53] runs significantly slower than the CNN-based methods, making it impractical for long-term videos. Thus, we benchmark MaskTrack R-CNN [57], SipMask [8], and ObjProp [10] that have training code publicly available and run at acceptable speeds for long videos. From these, we choose the ObjProp [10] model as a baseline—best performing among the three—and improve it for both single-shot and cross-shot predictions (Fig 6). + +The ObjProp model explicitly tracks instances based on pairwise matching scores between actors on the current frame and those stored in a memory queue. During inference, the final matching score between $n$ -th actor in memory and $i$ -th actor in the current frame is defined as + +$$ +\mathcal {S} _ {\text {V I S}} (i, n) = \mathcal {S} _ {\text {D E T}} + \alpha \mathcal {S} _ {\text {C L S}} + \beta \mathcal {S} _ {\text {B O X}} + \gamma \mathcal {S} _ {\text {T R K}}, \tag {1} +$$ + +![](images/c320e87d8a65ee548b2252306bba9825b8322f2892e463e2df361af7a31da15f.jpg) +Figure 6: Improved baseline model. Given a single-shot VIS model, we first improve its single-shot module design (SMD), then add a pre-trained Re-ID network to better handle actor appearance change, then finally add frame clustering to handle actor position changes across different shots in a multi-shot module design (MMD). + +where $S_{\mathrm{DET}}$ is the detection score, $S_{\mathrm{CLS}}$ is the class score that is one only if actor $i$ and $n$ have the same class label (zero otherwise), $S_{\mathrm{BOX}}$ is the bounding box intersection over union (IoU) between actors, and $S_{\mathrm{TRK}}$ is the tracking score for actor appearance. The hyperparameters $\alpha = 10, \beta = 2, \gamma = 1$ are the same as previous methods [57, 10]. The predicted instance is assigned to the actor with the best $S_{\mathrm{VIS}}$ score. + +# 4.2. Improved Single-shot Module Design (SMD) + +We incorporate existing good practices for single-shot segmentation and tracking to improve the ObjProp model. + +Model Architecture. Following MaskProp [5], we use the hybrid task cascade (HTC) framework [13] to improve single-frame instance detection and segmentation results. Further, we split the shared bounding box head and classification head to reduce errors from misclassification. + +Memory Management. Most existing VIS methods [57, 50] only keep the latest object features in a queue to link to the current frame predictions. To encourage actor redetection, we use a memory bank to store information of all instances of actors detected until that frame. With this, the baseline model can link detected actors in disconnected frames when the detection module fails on frames in between. To achieve a high recall score for actor detection, the baseline model produces many spurious detections that are linked across only few frames forming short tracklets. To speed up the tracking score computation and improve the tracking accuracy by pruning spurious tracklets, we remove tracklets that are shorter than 7 frames during the postprocessing, where the threshold is set empirically. + +# 4.3. Improved Multi-shot Module Design (MMD) + +Due to the appearance and location changes of actors across shots, we add multi-modal features [54] for more robust tracking and a frame clustering module to enable bounding box tracking for frames from different shots. + +Shot-aware Object Linking (SOL). Linking objects across shots requires two changes: 1) making sure that frame-to-frame bounding box IoU scores $S_{\mathrm{BOX}}$ for an instance are computed only within the same shot, and 2) refraining from propagating object across shots to fill in empty masks as is done in [10] for same-shot frames. Thus, we detect shot changes with a simple online $k$ -means method that assigns the latest frame either to an existing shot cluster or to a new shot cluster if the cosine distance is above a distance threshold $\theta_c$ . For this, we obtain each frame's features from the tracking head module by using a bounding box to cover the input image. Then, we use a long-term memory bank to store the frame feature centers and corresponding frame numbers. + +For our multi-shot videos, we add the bounding box IoU score only when the predicted instance $i$ and the instance to match $n$ are in the same shot cluster $g_{i} = g_{n}$ . Thus, the new scores become + +$$ +\mathcal {S} _ {\text {B O X}} ^ {\prime} (i, n) = \delta \left(g _ {i}, g _ {n}\right) \mathcal {S} _ {\text {B O X}} (i, n) \tag {2} +$$ + +where $\delta(g_i, g_n) = 1$ only if frame $i$ and $n$ belong to the same frame cluster, and $\delta(g_i, g_n) = 0$ otherwise. + +Multi-modal Feature Tracking (MFT). The ObjProp model consists of a tracking branch [57] to learn the tracking feature $\mathbf{f}_i$ for each instance $i$ . Consequently, the appearance tracking score for the predicted current-frame instance $i$ and the $n$ -th instances in the memory bank is the $n$ -th value in the log softmax of the dot product: $S_{\mathrm{TRK}}(i,n) = \log \operatorname{softmax}(\mathbf{f}_i^T\mathbf{F})(n)$ , where tracking features for $N$ actors is $\mathbf{F} = [\mathbf{f}_0,\mathbf{f}_1,\dots ,\mathbf{f}_{N - 1},\mathbf{0}]$ , where $\mathbf{0}$ is for the new actor. + +As actors in our dataset are mostly human, we follow Xia et al. [54] to improve the appearance tracking by incorporating human pose and face features via pre-trained person re-identification (Re-ID) models. Specifically, we crop the predicted instance patch and extract the pose [47] and face [44] feature vectors as $\mathbf{f}_i^{\mathrm{pose}}$ and $\mathbf{f}_i^{\mathrm{face}}$ To balance the weight among three features, we normalize each feature to obtain the new multi-modal appearance feature $\mathbf{f}_i' = \left[\frac{\mathbf{f}_i}{\|\mathbf{f}_i\|},\frac{\mathbf{f}_i^{\mathrm{pose}}}{\|\mathbf{f}_j^{\mathrm{pose}}\|},\frac{\mathbf{f}_i^{\mathrm{face}}}{\|\mathbf{f}_i^{\mathrm{face}}\|}\right]$ . To adjust the number of new tracklets, we add a threshold $\theta_{t}$ to the new actor instance, the last element of the tracking score. The updated score is + +$$ +\mathcal {S} _ {\mathrm {T R K}} ^ {\prime} (i, n) = \log \operatorname {s o f t m a x} \left(\mathbf {f} _ {i} ^ {\prime T} \mathbf {F} ^ {\prime} + [ \vec {0}, \theta_ {t} ]\right) (n) \tag {3} +$$ + +by plugging in the new multi-modal appearance features. + +# 5. Experiments + +We present the performance of our baselines adapted to YouMVOS, and then describe the remaining challenges with error analysis (Sec. 5.2), ablation studies (Sec. 5.3), and a comparison to the YouTube-VIS dataset (Sec. 5.4). + +
MethodVal setTest set
JFJF
SipMask [8]20.920.016.115.1
MaskTrack R-CNN [57]21.420.220.119.2
ObjProp [10]21.820.921.220.0
[10]+SMD (Ours)25.824.825.024.9
[10]+SMD+MMD (Ours)31.830.830.930.6
+ +Table 2: Quantitative results on YouMVOS. The proposed single-shot (SMD) and multi-shot (MMD) module designs significantly improve the baseline ObjProp [10]. + +# 5.1. Experiment Setup + +Dataset Splits and Metrics. For each of the ten video genres, we randomly split the 20 videos into 14 training, 3 validation, and 3 test videos. In total, YouMVOS has 140 training videos (353 actors and 9,042 shots), 30 validation videos (61 actors and 2,002 shots), and 30 test videos (78 actors and 2,406 shots). The final region similarity score $\mathcal{I}$ and the contour accuracy $\mathcal{F}$ are averaged over all actors in the test videos (Sec. 3.4). + +Implementation Details. For the baseline models [57, 8, 43, 58], we use official implementations. The single-shot VIS Models (SipMask, MaskTrack R-CNN, and ObjProp) are pre-trained on YouTube-VIS [57] for 12 epochs, and the tracking and segmentation heads are finetuned on our YouMVOS for another two epochs, with a learning rate of $5 \times 10^{-4}$ . For the HTC-based models, we additionally finetune the bounding box head. Please see the supplemental materials for more details. + +# 5.2. Benchmark Results + +Quantitative Results. The state-of-the-art VIS methods [8, 57, 10] designed for single-shot videos achieve around $20\mathcal{J}$ and $\mathcal{F}$ scores for our multi-shot videos (Tab. 2). Adding the single-shot module design (SMD) and multi-shot module design (MMD) improves ObjProp [10] by around 10 points in absolute $\mathcal{J}$ and $\mathcal{F}$ scores for both the validation and test sets. The large performance gap shows the effectiveness of the proposed improved model designs for multi-shot data. Although our proposed adaptations also improve SipMask on YouMVOS to a lesser extent, the single-stage SipMask performs worse than the two-stage MaskTrack R-CNN due to many false positive object proposals. + +Qualitative Results. We show the predicted segmentation masks overlaid with frames from different videos (Fig. 7). Specifically, our multi-shot module design (MMD) improves segmentation by using pose Re-ID features when the face is not visible or too small (Fig. 7a), using face Re-ID features to link characters despite costume and scene changes (Fig. 7b–c), and clustering frames into camera shots (Fig. 7d). In + +![](images/16bc157ddfd2ac60236f0d270b9c534f0b8f368721c2690e0c803e938e141516.jpg) +(a) + +![](images/843195d3bc954cae95ae5e59a5bd9ae0d6ace3efb6689b3d35d88d1fb5a7c376.jpg) + +![](images/94a144dbc4a3373d6bca22b8a12cf42122f9fb00a0d3e824c86b75fed15231af.jpg) + +![](images/704e110ce7c19ea411080de2e4cea6c18b38060ecd8ac280f3a6e90ad8a824d1.jpg) + +![](images/120724a181f2af0e79bb34dcddbd9390f2ebcec8b862767b71c098bf69e601ce.jpg) + +![](images/bc674da2eeb6cefac0711401eab59f0d6ed7decf4c980558f3a4f641ad4051c9.jpg) +(b) + +![](images/186fce4f7dbc7a160f542027ed23e48707924a1aa5d06b18096be1d4e9b9cfdb.jpg) + +![](images/adb8c65b7b9ce9fbcd607b18bbb2edc6d573cc01eda14ac0eefaf51ccfdc3ec1.jpg) + +![](images/3b0b8c5ddb981f9e4e7be1c9e9dff1728690125a67254ba21aa7c6d94addbff6.jpg) + +![](images/c4cd0e79ead89a8f3840629188d2c69d384c4492e74bd8074f08f0cdd5d9b6d3.jpg) + +![](images/861860837243f9edc0e88b12208458b9fda45949928920a2493a93b99258c50a.jpg) +(c) + +![](images/c08e172a018fcaef170395b257939d6d99ba159f67774b73a95185972653bcb8.jpg) + +![](images/12f3bc380769509760e5a7f5e7d44ab1f9210b35392b97d981672fda4533d07d.jpg) + +![](images/3fea7e88101537d2439f8e53f82cf3686bda2b3f37479eb403619cab71a044f6.jpg) + +![](images/e4a766f223d50ae09f8694e7d5941b5b49cf83e6199ae94484dcad46650c758a.jpg) + +![](images/29c82fad1c91d87bc716c3cd4ff95cc6cb1905c2e5c2058638b5ccd0efeb0794.jpg) +(d) + +![](images/78fb934283dd4621e16b502078a01c892d3e8f50e644c830ae96cedca481e53f.jpg) + +![](images/09f4a1a519c4e07d91659fd6d35f6339013bfce1133a1fd01dce69f4eb66e1e4.jpg) + +![](images/93231d130925569d40fbc9e9940f74e8dcd6e9c2ba5fc8599ee5f9b1c414f27f.jpg) + +![](images/4d1290abc5854e706d17397aa2695523639100f92620a4ddfe4be40a99c7374b.jpg) + +![](images/c6bc37764a9995578dcd0fe8f39a40b91cc92cb91e218157efa5c645d893021b.jpg) +(e) + +![](images/bdb2c242c80e5ebce10893341abfab15153816d804d437a981cbb25451d29411.jpg) +Figure 7: Qualitative results of our improved baseline on YouMVOS validation set. (a-d) For success cases, each row shows five sample frames from different shots in the same video sequence. (e) For failure cases, errors can come from poor detection results due to uncommon actor appearance and camera poses, and poor tracking due to special visual effects. + +![](images/05ff969005f949835d111193af616013ba512c176122fa9f1327769bca2b3374.jpg) + +![](images/1bacd79561f85126e0af4105fbd2ff91d81fa50d54782c2e199d16d05b0c04d7.jpg) + +![](images/bf2b6fb2f74c087e69f1522980e10188121defd1a1dafb9b0a43fdbcb0914050.jpg) + +
Single-frameTrackingJF
BaselineBaseline31.830.77
BaselineOracle65.162.2
Oracle BoxBaseline35.235.1
Oracle BoxOracle80.981.3
Oracle MaskBaseline44.745.5
Oracle MaskOracle100100
+ +Table 3: Oracle analysis on YouMVOS val dataset. Most remaining errors come from actor tracking due to the multi-shot and minute-level long videos in the dataset. + +Fig. 7e, we show typical failure cases, including ambiguous appearance (first image), rare camera poses in the music video (second image), drastic change of instance scales in the soccer game video (third image), and an unexpected split-screen video effect that breaks the one-to-one tracking assumption (last two images). + +Oracle Analysis. We examine the source of errors in our improved baseline method on the YouMVOS validation data by using oracle—known correct—results for different components (Tab. 3). We focus on tracking error caused by long-term cross-shot videos, and produce results with oracle tracking, oracle bounding boxes, and oracle masks. For + +oracle tracking, we match per-frame predictions to their closest ground truth objects with a 0.5 IoU threshold, and then aggregate instances using ground truth object identities. + +We find that resolving tracking errors leads to a significant $30+$ points boost on both region similarity $\mathcal{I}$ and contour accuracy $\mathcal{F}$ , showing that errors are caused mostly by misattributions across shots and across long sequences. Second, providing oracle bounding boxes for segmentation improve baseline performance slightly, but cause another 15 points increase when combined with oracle tracking. This suggests that both tracking and localization improvements are required in the future. Finally, providing oracle masks on top produces perfect scores as expected, but without oracle tracking, many attribution errors remain. In summary, there is still large space for improving existing approaches from different perspectives, and tracking error is currently the dominating factor for the unsatisfactory scores. + +# 5.3. Ablation Studies + +We analyze the effectiveness of each component of the improved baseline on our YouMVOS validation set. + +Cumulative Results. We sequentially add the single-shot module design (SMD), shot-aware object linking (SOL), and multi-modal feature tracking (MFT). Adding SMD leads to a 1 point improvement by reducing lost track errors given + +(a) Cumulative results. + +
Single-shot +HTCMemMulti-shot Tracking (MT)JF
SOLMFT
21.820.9
✓24.323.2
✓✓25.824.8
✓✓✓28.727.6
✓✓✓+pose [47]29.628.7
✓✓✓+face [44]29.928.9
✓✓✓+pose [47] +face [44]31.830.8
+ +(b) Clustering hyperparameter for SOL. + +
θc +J/F0.88 +30.6/29.60.90 +31.8/30.80.92 +31.5/30.6
(c) Multi-modal Feature Tracking (MFT).
Pose +J/FLightMBN [22] +31.2/30.2ABDNet [14] +31.1/30.2CoSAM [47] +31.8/30.8
Face +J/FVGGFace2 [9] +31.8/30.8CASIA-WebFace [60] +31.1/30.2
+ +more instances to match (Tab. 4). SOL further leads to a 2 point improvement by using the location consistency of the object within frame clusters. There can be cases where these assumptions cause errors, but we observe overall improvement. Compared with the original MFT tracking features, the face [44] and pose [47] Re-ID features improve performance by 2-3 points each, and by 10 points combined. + +Shot-aware Object Linking (SOL). We try three different cosine similarity thresholds $(\theta)$ for deciding features in the same cluster in our online nearest neighbor frame clustering method. Intuitively, a bigger $\theta_{c}$ will lead to finer cluster results, but with less utilization of the IoU between bounding boxes in the matching score to take advantage of the locality consistency. We empirically find that $\theta_{c} = 0.9$ achieves the best overall score (Tab. 4b). + +Multi-modal Feature Tracking (MFT). Starting from the best baseline model, we compare popular Re-ID models for pose and face by replacing them one at a time with the current the model. We find that adding pose features [47] achieves around a 3 point improvement over other pose Re-ID features [22, 14, 47]. For face Re-ID features, the FaceNet model [44] pre-trained on VGGFace2 [9] achieves around 5 points improvement over that pre-trained on CASIA-WebFace dataset [60] (Tab. 4c). + +# 5.4. Results on YouTube-VIS Single-shot Dataset + +To demonstrate the effectiveness of our improved module design for single-shot videos (SMD), we benchmark upon the YouTube-VIS dataset [57] with the ResNet-50 backbone without using any external data for a fair comparison (Tab. 5). On the validation split, adding our single-shot module design (SMD) significantly boosts model performance by $8.7\mathrm{mAP}$ for ObjProp [10]. State-of-the-art methods MaskProp [5] and Propose-Reduce [31] do not provide code and so could not be improved; in any case, they use sophisticated and computationally-heavy inference schemes that are more difficult to apply to long videos. + +Table 4: Ablation studies on YouMVOS validation set. (a) We show the cumulative improved results by adding each component. Starting from the best model, we modify it with different (b) SOL hyper-parameters and (c) MFT features. + +
MethodmAP↑AP50AP75AR1AR10
MaskTrack R-CNN [57]30.351.132.631.035.5
STEm-Seg [2]30.650.733.531.637.1
SipMask [8]33.754.135.835.440.1
ObjProp [10]35.156.238.638.644.9
VisTR [53]36.259.836.937.242.4
MaskProp† [5]40.0-42.9--
Propose-Reduce† [31]40.463.043.841.149.7
[10] + SMD (Ours)39.061.242.938.947.6
+ +Table 5: Benchmark results on YouTube-VIS Val [57]. Our single-shot module design (SMD) boosts baseline model performance to much closer to the state of the art (ResNet-50 backbone without external training data). The training code for methods with $\dagger$ is unavailable during our submission. + +# 6. Conclusion + +We have expanded the problem of video object segmentation to long-term multi-shot videos with a new actor-centric 200-video segmentation dataset containing 431K segmentation masks. This provides a new challenge for the computer vision community in addressing objects with location or pose changes, appearance variations, and more complex presence/absence within different narrative structures. Given baseline methods, we analyze sources of error. We discover that cross-shot tracking error is the dominant cause of multishot segmentation error. Overall, better analysis of multishot videos moves us towards longer-term and more-complex computational video understanding—our YouMVOS segmentation dataset provides an early step towards this goal. + +# Acknowledgements + +This work has been supported by NSF grants NCS-FO2124179, NIH grant R01HD104969, UKRI grant Turing AI Fellowship EP/W002981/1, and EPSRC/MURI grant EP/N019474/1. We also thank the Royal Academy of Engineering and FiveAI. + +# References + +[1] Ognjen Arandjelovic and Andrew Zisserman. Automatic face recognition for film character retrieval in feature-length films. In CVPR, 2005. 3 +[2] Ali Athar, Sabarinath Mahadevan, Aljosa Osep, Laura Leal-Taixe, and Bastian Leibe. STEm-Seg: Spatio-temporal Embeddings for Instance Segmentation in Videos. In ECCV, 2020. 2, 8 +[3] Lorenzo Baraldi, Costantino Grana, and Rita Cucchiara. A deep siamese network for scene detection in broadcast videos. In ACM international conference on Multimedia, 2015. 2 +[4] Daniel R Berger, H Sebastian Seung, and Jeff W Lichtman. Vast (volume annotation and segmentation tool): efficient manual and semi-automatic labeling of large 3d image stacks. Frontiers in neural circuits, 12:88, 2018. 3 +[5] Gedas Bertasius and Lorenzo Torresani. Classifying, Segmenting, and Tracking Object Instances in Video with Mask Propagation. In CVPR, 2020. 2, 5, 8 +[6] Benjamin Bratt. Rotoscoping. Taylor & Francis, 2012. 1 +[7] Sergi Caelles, Jordi Pont-Tuset, Federico Perazzi, Alberto Montes, Kevis-Kokitsi Maninis, and Luc Van Gool. The 2019 Davis Challenge on VOS: Unsupervised Multi-object Segmentation. arXiv preprint arXiv:1905.00737, 2019. 5 +[8] Jiale Cao, Rao Muhammad Anwer, Hisham Cholakkal, Fahad Shahbaz Khan, Yanwei Pang, and Ling Shao. SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation. In ECCV, 2020. 2, 5, 6, 8 +[9] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zisserman. Vggface2: A dataset for recognising faces across pose and age. In 2018 13th IEEE international conference on automatic face & gesture recognition (FG 2018), pages 67-74. IEEE, 2018. 8 +[10] Anirudh S Chakravarthy, Won-Dong Jang, Zudi Lin, Donglai Wei, Song Bai, and Hanspeter Pfister. Object propagation via inter-frame attentions for temporally stable video instance segmentation. arXiv preprint arXiv:2111.07529, 2021. 2, 5, 6, 8 +[11] Vasileios T Chasanis, Aristidis C Likas, and Nikolaos P Galatsanos. Scene detection in videos using shot clustering and sequence alignment. Transactions on multimedia, 2008. 2 +[12] Jie Chen, Zhiheng Li, Jiebo Luo, and Chenliang Xu. Learning a weakly-supervised video actor-action segmentation model with a wise selection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9901-9911, 2020. 2 +[13] Kai Chen, Jiangmiao Pang, Jiaqi Wang, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jianping Shi, Wanli Ouyang, et al. Hybrid task cascade for instance segmentation. In CVPR, 2019. 5 +[14] Tianlong Chen, Shaojin Ding, Jingyi Xie, Ye Yuan, Wuyang Chen, Yang Yang, Zhou Ren, and Zhangyang Wang. Abd-net: Attentive but diverse person re-identification. In CVPR, pages 8351–8361, 2019. 8 +[15] Timothee Cour, Benjamin Sapp, Akash Nagle, and Ben Taskar. Talking pictures: Temporal grouping and dialog-supervised person recognition. In CVPR, 2010. 3 + +[16] Mark Everingham, Josef Sivic, and Andrew Zisserman. Hello! my name is... buffy"-automatic naming of characters in tv video. In BMVC, 2006. 3 +[17] Shubhika Garg, Vidit Goel, and Somesh Kumar. Unsupervised video object segmentation using online mask selection and space-time memory networks. In The 2020 DAVIS Challenge on Video Object Segmentation-CVPR Workshops, volume 6, 2020. 2 +[18] Kirill Gavrilyuk, Amir Ghodrati, Zhenyang Li, and Cees GM Snoek. Actor and action video segmentation from a sentence. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5958-5966, 2018. 2 +[19] Bo Han and Weiguo Wu. Video scene segmentation using a novel boundary evaluation criterion and dynamic programming. In International conference on multimedia and expo, 2011. 2 +[20] Monica-Laura Haurilet, Makarand Tapaswi, Ziad Al-Halah, and Rainer Stiefelhagen. Naming tv characters by watching and analyzing dialogs. In WACV, 2016. 3 +[21] 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. 2 +[22] Fabian Herzog, Xunbo Ji, Torben Teepe, Stefan Hörmann, Johannes Gilg, and Gerhard Rigoll. Lightweight multibranch network for person re-identification. arXiv preprint arXiv:2101.10774, 2021. 8 +[23] Qingqiu Huang, Wentao Liu, and Dahua Lin. Person search in videos with one portrait through visual and temporal links. In ECCV, 2018. 3 +[24] Qingqiu Huang, Yu Xiong, and Dahua Lin. Unifying identification and context learning for person recognition. In CVPR, pages 2217-2225, 2018. 3 +[25] Qingqiu Huang, Yu Xiong, Anyi Rao, Jiaze Wang, and Dahua Lin. Movienet: A holistic dataset for movie understanding. In ECCV, 2020. 1, 3 +[26] Tianrui Hui, Shaofei Huang, Si Liu, Zihan Ding, Guanbin Li, Wenguan Wang, Jizhong Han, and Fei Wang. Collaborative spatial-temporal modeling for language-queried video actor segmentation. In CVPR, 2021. 2 +[27] Hueihan Jhuang, Juergen Gall, Silvia Zuffi, Cordelia Schmid, and Michael J Black. Towards understanding action recognition. In CVPR, 2013. 2 +[28] Alexander Kirillov, Yuxin Wu, Kaiming He, and Ross Girshick. Pointrend: Image segmentation as rendering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9799-9808, 2020. 3, 4 +[29] Chao Liang, Yifan Zhang, Jian Cheng, Changsheng Xu, and Hanqing Lu. A novel role-based movie scene segmentation method. In Pacific-Rim Conference on Multimedia, 2009. 2 +[30] Chung-Ching Lin, Ying Hung, Rogerio Feris, and Linglin He. Video Instance Segmentation Tracking With a Modified VAE Architecture. In CVPR, pages 13147-13157, 2020. 2 +[31] Huaijia Lin, Ruizheng Wu, Shu Liu, Jiangbo Lu, and Jiaya Jia. Video instance segmentation with a propose-reduce paradigm. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1739-1748, 2021. 2, 5, 8 + +[32] Xiaolong Liu, Yao Hu, Song Bai, Fei Ding, Xiang Bai, and Philip HS Torr. Multi-shot temporal event localization: a benchmark. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12596-12606, 2021. 1 +[33] Xiankai Lu, Wenguan Wang, Chao Ma, Jianbing Shen, Ling Shao, and Fatih Porikli. See more, know more: Unsupervised video object segmentation with co-attention siamese networks. In CVPR, pages 3623–3632, 2019. 2 +[34] Jonathon Luiten, Idil Esen Zulfikar, and Bastian Leibe. Unovost: Unsupervised offline video object segmentation and tracking. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2000-2009, 2020. 2, 5 +[35] Arsha Nagrani and Andrew Zisserman. From benedict cumberbatch to sherlock holmes: Character identification in tv series without a script. In BMVC, 2017. 3 +[36] Seoung Wug Oh, Joon-Young Lee, Ning Xu, and Seon Joo Kim. Video object segmentation using space-time memory networks. In ICCV, 2019. 4 +[37] Jordi Pont-Tuset, Federico Perazzi, Sergi Caelles, Pablo Arbeláez, Alex Sorkine-Hornung, and Luc Van Gool. The 2017 davis challenge on video object segmentation. arXiv preprint arXiv:1704.00675, 2017. 1, 2 +[38] Jiyang Qi, Yan Gao, Yao Hu, Xinggang Wang, Xiaoyu Liu, Xiang Bai, Serge Belongie, Alan Yuille, Philip HS Torr, and Song Bai. Occluded video instance segmentation. arXiv preprint arXiv:2102.01558, 2021. 2 +[39] Anyi Rao, Linning Xu, Yu Xiong, Guodong Xu, Qingqiu Huang, Bolei Zhou, and Dahua Lin. A local-to-global approach to multi-modal movie scene segmentation. In CVPR, 2020. 2 +[40] Zeeshan Rasheed and Mubarak Shah. Scene detection in hollywood movies and tv shows. In Computer Society Conference on Computer Vision and Pattern Recognition, 2003. Proceedings., 2003. 2 +[41] Daniel Rotman, Dror Porat, and Gal Ashour. Optimal sequential grouping for robust video scene detection using multiple modalities. International Journal of Semantic Computing, 2017. 2 +[42] Yong Rui, Thomas S Huang, and Sharad Mehrotra. Exploring video structure beyond the shots. In Proceedings. IEEE International Conference on Multimedia Computing and Systems, 1998. 2 +[43] S. Kumar S. Garg, V. Goel. Unsupervised video object segmentation using online mask selection and space-time memory networks. The 2020 DAVIS Challenge on Video Object Segmentation - CVPR Workshops, 2020. 2, 5, 6 +[44] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, pages 815-823, 2015. 6, 8 +[45] Panagiotis Sidiropoulos, Vasileios Mezaris, Ioannis Kompatsiaris, Hugo Meinedo, Miguel Bugalho, and Isabel Trancoso. Temporal video segmentation to scenes using high-level audiovisual features. Transactions on Circuits and Systems for Video Technology, 2011. 2 + +[46] Josef Sivic, Mark Everingham, and Andrew Zisserman. "who are you?"-learning person specific classifiers from video. In CVPR, 2009. 3 +[47] Arulkumar Subramaniam, Athira Nambiar, and Anurag Mittal. Co-segmentation inspired attention networks for video-based person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 562–572, 2019, 6, 8 +[48] Makarand Tapaswi, Martin Bauml, and Rainer Stiefelhagen. Storygraphs: visualizing character interactions as a timeline. In CVPR, 2014. 2 +[49] Paul Voigtlaender, Yuning Chai, Florian Schroff, Hartwig Adam, Bastian Leibe, and Liang-Chieh Chen. Feelvos: Fast end-to-end embedding learning for video object segmentation. In CVPR, pages 9481-9490, 2019. 2 +[50] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger, and Bastian Leibe. MOTS: Multi-object tracking and segmentation. In CVPR, pages 7942-7951, 2019. 2, 5 +[51] Wenguan Wang, Hongmei Song, Shuyang Zhao, Jianbing Shen, Sanyuan Zhao, Steven CH Hoi, and Haibin Ling. Learning unsupervised video object segmentation through visual attention. In CVPR, pages 3064-3074, 2019. 2 +[52] Wenguan Wang, Tianfei Zhou, Fatih Porikli, David Crandall, and Luc Van Gool. A survey on deep learning technique for video segmentation. arXiv preprint arXiv:2107.01153, 2021. 1, 2 +[53] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. In CVPR, 2021. 2, 5, 8 +[54] Jiangyue Xia, Anyi Rao, Qingqiu Huang, Linning Xu, Jiangtao Wen, and Dahua Lin. Online multi-modal person search in videos. In European Conference on Computer Vision, pages 174-190. Springer, 2020. 3, 5, 6 +[55] Chenliang Xu, Shao-Hang Hsieh, Caiming Xiong, and Jason J Corso. Can humans fly? action understanding with multiple classes of actors. In CVPR, 2015. 2 +[56] Ning Xu, Linjie Yang, Yuchen Fan, Dingcheng Yue, Yuchen Liang, Jianchao Yang, and Thomas Huang. Youtube-vos: A large-scale video object segmentation benchmark. In ECCV, 2018. 1, 2, 3 +[57] Linjie Yang, Yuchen Fan, and Ning Xu. Video instance segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pages 5188-5197, 2019. 2, 5, 6, 8 +[58] Linjie Yang, Yanran Wang, Xuehan Xiong, Jianchao Yang, and Aggelos K Katsaggelos. Efficient video object segmentation via network modulation. In CVPR, 2018. 2, 6 +[59] Zhao Yang, Qiang Wang, Luca Bertinetto, Weiming Hu, Song Bai, and Philip HS Torr. Anchor diffusion for unsupervised video object segmentation. In ICCV, pages 931-940, 2019. 2 +[60] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z Li. Learning face representation from scratch. arXiv preprint arXiv:1411.7923, 2014. 8 +[61] Tianfei Zhou, Shunzhou Wang, Yi Zhou, Yazhou Yao, Jianwu Li, and Ling Shao. Motion-attentive transition for zero-shot video object segmentation. In AAAI, 2020. 5 \ No newline at end of file diff --git a/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/images.zip b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b25af86ad6ee244a6613f4721774358db05a625c --- /dev/null +++ b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64505a778e45ec407f4f63654c946b71a0b3c40382f70fb6836e02e9fc15c087 +size 661454 diff --git a/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/layout.json b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1eb4d44e4f9da6e1b6731647f5dd54a607d2d861 --- /dev/null +++ b/youmvosanactorcentricmultishotvideoobjectsegmentationdataset/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c7dfe48847cc9e0aa0483bf88b26c7e52dee1072cd0465b4155f4853e4b57d9 +size 436106 diff --git a/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_content_list.json b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..06b3562d8e91a03c9fe499d345c423d7a75ea792 --- /dev/null +++ b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:268e2c177dadabca52856a56406d463ec02cdaa4578a0e3f48839646d9527248 +size 83226 diff --git a/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_model.json b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..70d877a423bb0b91305e45200293895a0bba55a6 --- /dev/null +++ b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51c610c1d76de2df4a9a600ef1c5ea5d773e8ae7adbca0fbb4e2cc4d7f96b227 +size 106587 diff --git a/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_origin.pdf b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7f69a1793f419be3768e0a974124a6ca47b416cb --- /dev/null +++ b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/0232ea31-8663-46ca-9cf5-4b9a5def9e4b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4c8a7c3a528c8c1639f997dbae5f3e8434b7ec72fd6932b0ce61b639af189df +size 995986 diff --git a/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/full.md b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f0c53d4c219c04aa1c133172418f7c492b3215ff --- /dev/null +++ b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/full.md @@ -0,0 +1,330 @@ +# ZebraPose: Coarse to Fine Surface Encoding for 6DoF Object Pose Estimation + +Yongzhi Su $^{1,2*}$ +Mahdi Saleh $^{3*}$ +Torben Fetzer $^{2}$ +Jason Rambach $^{1}$ +Nassir Navab $^{3}$ +Benjamin Busam $^{3}$ +Didier Stricker $^{1,2}$ +Federico Tombari $^{3,4}$ + +$^{1}$ German Research Center for Artificial Intelligence (DFKI) $^{2}$ TU Kaisers Technische Universität München $^{4}$ Google + +{yongzhi.su; jason.rambach; torben.fetzer; didier.stricker}@dfki.de {m-saleh; b.busam; nassir.navab}@tum.de, tombari@in.tum.de + +# Abstract + +Establishing correspondences from image to 3D has been a key task of 6DoF object pose estimation for a long time. To predict pose more accurately, deeply learned dense maps replaced sparse templates. Dense methods also improved pose estimation in the presence of occlusion. More recently researchers have shown improvements by learning object fragments as segmentation. In this work, we present a discrete descriptor, which can represent the object surface densely. By incorporating a hierarchical binary grouping, we can encode the object surface very efficiently. Moreover, we propose a coarse to fine training strategy, which enables fine-grained correspondence prediction. Finally, by matching predicted codes with object surface and using a PnP solver, we estimate the 6DoF pose. Results on the public LM-O and YCB-V datasets show major improvement over the state of the art w.r.t. ADD(-S) metric, even surpassing RGB-D based methods in some cases. + +# 1. Introduction + +Augmented reality and robotics are two of the main application fields of 3D computer vision. In many augmented reality applications, the location and pose of an object of interest has to be determined at a high precision [45,54]. Similarly, object grasping and manipulation is needed for many robotic applications (e.g. automatic manufacturing [50], cooperative assistance [9, 21]), and also demands accurate 6 Degree-of-Freedom (6DoF) object pose information. As the crucial element in both application domains, estimating the 6DoF object pose has received increasing attention from the computer vision research community. + +The correspondence problem is a classical problem in + +![](images/734dacd0d1af7a2f2795d08ac2b4f753ab8faece1bb2011a988a522eeb3b0497.jpg) +Figure 1. ZebraPose assigns a discrete code to each surface vertex hierarchically. We project the code as binary black and white values (top) and learn them using deep neural networks. Our binary descriptor allows one-to-one correspondence for the problem of 6DoF object pose efficiently. + +computer vision. While finding correspondences across the same domain is more straightforward, estimating the 6DoF object pose requires 2D-3D correspondences. In earlier object pose estimation research, depth maps came to help to match image pixels to 3D surface points [28, 64]. Due to cost and setup complications, the detection of 6DoF pose without depth information can be advantageous. However, RGB approaches typically achieve a lower accuracy with respect to their depth-based counterparts [16, 26]. + +Driven by the recent developments in deep learning and Convolutional Neural Networks (CNNs), various methods were proposed, which make 6DoF pose estimation from a single RGB image feasible [10, 34, 53, 61, 69]. In a correspondence-based setting, to estimate the object pose, Perspective-n-Points (PnP) algorithms require at least 4 2D-3D point matches [38]. Therefore, sparse methods are ap + +plied to extract points of interest [47, 52]. However such methods might fail to find object landmarks under viewpoint changes, occlusion, or lack of texture. With the success of deep neural networks in image synthesis problems, researchers use such tools to generate dense correspondence maps. For instance, several methods learn UV [71] or UVW [48, 67] values in object local coordinates. Since the network produces dense smooth results, certain low-level geometry is lost. Moreover, neural networks tend to achieve a higher performance in classification tasks [34]. + +To this aim, we propose a dense correspondence pipeline that combines the concepts of handcrafted features and image segmentation in a hierarchical fashion for RGB-based 6DoF pose estimation. In order to design a descriptor that encodes surfaces efficiently, we use the binary numeral system. Binary-based descriptors are applied in ORB [56] and are still in use in robust SLAM applications [12]. In our work, we split the surface into halves in multiple iterations and define our vertex encoding by stacking the assigned group labels. By leveraging a hierarchical discrete representation, we guarantee a compact mapping and simple learning objective as a multi-label classification problem [29,34]. Moreover, learning how to encode a full sequence at once might be challenging for neural networks. Therefore, we propose a coarse to fine learning scheme. By design, our encodings on the coarse levels are continuously shared in wider object regions. As the network learns to differentiate coarse splits, we focus on finer encoding positions. With a coarse to fine loss and training strategy, we then manage to predict fine-grained surface correspondences. + +In contrast to previous works where there is no guaranteed putative correspondence [48, 49, 67], our encoding promotes direct pixel-to-surface matching just by means of a look-up table. With a simple matching and PnP-RANSAC scheme of Progressive-X [2], we outperform the state of the art in 6DoF pose on the most commonly used benchmarks w.r.t. ADD(-S) metric. + +In summary, we propose ZebraPose, a two-stage RGB-based approach that defines the matching of dense 2D-3D correspondence as a hierarchical classification task. We divide the general two-stage approach for 6DoF object pose estimation into three components: 1) assigning a unique descriptor to the 3D vertex; 2) predicting a dense correspondence between the 2D pixels and 3D vertices; 3) solving the object pose using the predicted correspondences. We can summarize our proposed contributions in this paper related to the first two components: + +- A novel coarse to fine surface encoding method assigning the dense vertex descriptor in an efficient way, which also fully exploits traditional outlier filters used in computer vision task. +- A novel hierarchical training loss and strategy to auto + +matically adjust the weights of each code position. + +Extensive experiments on LM-O [3] and YCB-V [11] datasets show that our proposed approach achieves state of the art results. + +# 2. Related Work + +We limit our in-depth discussion of related work to the most relevant methods to our work, i.e. RGB-based 6DoF pose estimation, and object surface encoding techniques. + +# 2.1. RGB-based 6DoF Pose Estimation + +Traditional Methods. With the development of the feature descriptor [42], the object pose problem could be solved by feeding estimated 2D-3D correspondences into a RANSAC/PnP framework. However, dealing with textureless objects remained a challenge. To overcome the lack of keypoints, Hinterstoisser et al. [25] proposed to utilize the image gradient information and formulate the pose estimation task within a template matching pipeline. Later advances [5] avoided the template searching time by applying a statistical learning-based framework to regress object coordinates and object labels jointly. However, the accuracy that handcrafted methods can achieve is far from that of deep learning methods nowadays. + +End-to-End Methods. PoseNet [35] was the first work that attempted to regress the camera viewpoint with a CNN. Following works usually concatenated an object detector with the pose regression, making multi-object pose estimation possible [69]. Finding a suitable rotation representation for pose regression was a problem at that time and typical rotation parametrization did not populate Euclidean spaces [8]. SSD6D [34] avoided complex parameters by discretization of the rotation space thus treating the rotation estimation as a classification problem. Zhou et.al [73] proposed a continuous 6-dimensional rotation representation that shows advantages over quaternions [43, 44] or Lie algebra [20,60] parametrization for neural network training. This representation is utilized in several direct regression works [19,37,66]. + +In parallel, several efforts have been made to integrate RANSAC and PnP modules to pose learning frameworks. [4,6,7] propose differentiable RANSAC variants, which are not applicable to object pose estimation as they require a good initialization and complex training strategy. [30] proposes a network to solve the PnP problem, with a loss function reflecting pose metrics. At the same time, a new branch of methods has been developed with the growth of neural renderers [15, 33, 41]. [32] is able to define the loss according to the texture colour on pixel level. [58, 65] used a differentiable depth map and achieved self-supervised network fine-tuning with unlabeled RGB-D data. In an effort to combine correspondence-based methods with direct regression + +of 6DoF parameters, [66] used correspondence maps as an intermediate geometric representation to regress the pose. [19] further enhances [66] by employing self-occlusion information that provides richer information to predict the object pose with the predicted 2D-3D correspondences. + +Indirect Methods with Deep Learning. While end-to-end methods have evolved through time by integrating differentiable modules, the performance of such methods are normally below geometrical and indirect methods. Combining learning features and geometrical fitting, [68] uses metric learning to learn an implicit pose representation through triplet loss and finally looks for nearest neighbors in pose space. AAE [61] learns to generate a latent vector based on the visual information of the object in discrete viewpoints. At inference stage, the rotation is obtained by comparing the latent code with the pre-generated rotation-latent code lookup table. The rest of the indirect methods usually estimate the 2D-3D correspondence, and solve the object pose using RANSAC/PnP. BB8 [52] firstly defines the 3D object bounding box corners as the keypoints and PVNet [49] reaches high recall rate in LM [27] dataset by predicting the keypoints with a dense pixel-wise voting for sampled keypoints on the object. The main drawback of such sparse 2D-3D correspondence methods is that the prediction of keypoints in the occluded area lacks in accuracy. Hybrid-Pose [59] proposed to leverage multiple geometric information to tackle this issue while other methods [29, 48, 71] predict pixel-wise dense 2D-3D correspondences. + +# 2.2. Surface Encoding + +The binary surface encoding technique has been successfully used in the field of structured light reconstruction for many years [46,51,57,63]. For this purpose, a video projector illuminates the scene with several successively refined binary fringe patterns. The composition of the different stripe patterns provides an encoding of the surface points. Surface coding using multiple classification problems has proven to be highly reliable and competitive [22]. Since neural networks are ideally suited for solving classification problems, a transfer of the approach as we presented in this work constitutes a logical step. + +In pose estimation domain, to estimate the dense 2D-3D correspondence, each 3D corresponding point must be assigned a unique descriptor. Pix2Pose [48] simply treats the 3D vertex coordinates as this descriptor. DPOD [71] textures the object with a 2-channel UV-map with discrete values to learn the correspondences. EPOS [29] divides the object surface into multiple fragments, and estimates the corresponding points by combining fragment segmentation and local fragments coordinates prediction. Although most of these encodings are limited to local object coordinates, we propose a method that learns dense 2D-3D correspondence through a handcrafted code. Compared to methods + +that predict local coordinates space [67, 71] in 2D or 3D grid, we encode the object surface in a coarse to fine manner. Moreover, unlike EPOS [29] that divides the object surface into multiple coarse bins at once, we divide the object surface iteratively until the fragments are fine enough to define the unique 3D corresponding point. This allows for gradual refinement of the correspondence through the hierarchical levels. + +# 3. Method: ZebraPose + +In this section, we present our approach for the problem of 6DoF object pose, which involves the entire process from our surface encoding to the final pose estimation. + +# 3.1. Coarse to Fine Surface Encoding + +Given a surface CAD model of an object and its vertices $\boldsymbol{v}_i \in \mathbb{R}^3$ , where $i$ stands for the vertex id, we want to represent each $\boldsymbol{v}_i$ with vertex code $c_i \in \mathbb{N}^d$ , where $d$ is the length of the vertex code. We need to define such encoding based on vertices' position relative to the given 3D object surface to enable coarse to fine learning. To enable this, we construct our codes in a non-decimal numeral system. + +Defining our encoding in a numeral system with lower radix makes the representation very efficient and provides easier grounds for coarse to fine grouping of the points. For a code of length $d$ , we perform $d$ iterations of grouping of the vertices. The collection of groups $G_{j}$ in the $j$ -th iteration ( $j \in \{0, \dots, d\} \subset \mathbb{N}$ ) consists of $r^{j}$ groups. $G_{0}$ defines the initial group, including only one group, i.e. the entire object vertices. $G_{j}$ with $j > 1$ is obtained by splitting each group in $G_{j-1}$ into $r$ groups. In a grouping iteration, each vertex $v_{i}$ is assigned with a class id $m_{i,j}$ , where $m_{i,j} \in \{0, \dots, r-1\} \subset \mathbb{N}$ based on the group it belongs to in the $j$ -th grouping. Finally, each vertex is assigned to a vertex code with $d$ digits by stacking the class id of each grouping operation. This representation is stored and fixed for every 3D object. The vertices in each group share the same code. We build the lookup table to map a code to the centroid of the each group in $G_{d}$ , which is further used to build 2D-3D correspondence and solve the pose as described in Sec. 3.6. In this paper, we used k-means for the grouping, more details are in Sec. 4.1. We illustrate this process in Fig. 2 with $r = 2$ and break down the CAD model surface into discrete and equally sized groups. + +# 3.2. Choice of the Radix for Vertex Code + +Following our grouping described in Sec. 3.1, we would have $K$ total number of classes, where $K = r^{d}$ . In a classification problem we learn these maps using $o$ logits, where $o = r \cdot d$ . To minimize the number of outputs while learning the most number of classes we have: + +$$ +o _ {m i n} = \min _ {r} r \cdot d = \min _ {r} r \cdot \log_ {r} K = 2 \cdot \log_ {2} K. \tag {1} +$$ + +![](images/9fdab1d9b7e05ead9763b8f5ca5af6369fd7601922b34c6a6fd587c88238c656.jpg) +Figure 2. Left: Our hierarchical encoding is defined by grouping surface vertices in several iterations. In each iteration, object vertices are split into equally sized groups. In a binary setting, vertices are classified into two groups, 0 (white) and 1 (black). This process happens offline and the generated mapping between vertex code and the corresponding 3D vertex is stored in a look-up table. Right: Our training framework uses a detector to crop the object ROI and predicts a multi-layer code using a fully convolutional neural network. The predicted code is then matched to the 3D surface vertex and passed to RANSAC and PnP modules for pose estimation. + +The best positive integer choice of $r$ to minimize the number of network layers are 2 and 4. Since a value is classified either as positive or negative, we do not need to use the cross entropy loss with 2 explicit output layers for the binary classification. So we can reach $\log_2 K$ as the optimal number of output layers with $r = 2$ . + +Besides the advantages of reduced GPU memory requirement, we show later in the ablation study (see Sec. 4.2) that using the binary vertex code yields the most accurately predicted pose. Thus we choose a binary base for the vertex code. + +# 3.3. Rendering the Training Labels + +Each object pixel in the image corresponds to a 3D object vertex. The network predicts the class id that is assigned to this vertex in each grouping operation. Therefore, we still need to render the class id into the 2D image plane with a given pose for the training. For this purpose, we transfer the class id of vertices into the class id of the mesh faces using the following criteria: if two vertices of a face have the same class id, the face is assigned with this class id. Otherwise, the face has the class id of its first vertex. We repeat this rendering process for $d$ times until the training label class id for each grouping is generated. + +# 3.4. Network Architecture + +In Sec. 3.2 we justify our choice of $r = 2$ . In this regard, our goal is to classify $2^d$ regions with only $d$ binary values. + +During training, we use the object pose annotations to render the labels as layered black and white maps to image coordinates. This way, our objective learning maps are $d + 1$ binary labels ( $d$ for the binary vertex code and 1 for the object mask) for code and visible mask prediction. An + +encoder-decoder network generates $d + 1$ outputs with a single decoder. We round the final output probabilities to represent our discrete vertex codes. + +The entire process from input images to the predicted pose is presented in Fig. 2. To predict the code per pixel in the frame with fine granularity, we process only a Region of Interest (ROI) around object pixels. Following the pipeline similar to [37,40,66], we focus on the object pose and use the available 2D detector predictions to find the ROIs. We crop and resize the ROI from the prediction to a fixed dimension $\mathrm{H} \times \mathrm{W}$ , and apply the exact process to the target vertex code maps during training. Our goal is to predict multiple labels per frame in the ROI. + +# 3.5. Hierarchical Learning + +Predicting correspondences directly from object pixels is a fine-grained task. On the other side, deep neural networks are commonly used for coarse level predictions. This means features predicted per pixel are very similar in a small vicinity. As our encoding is also hierarchical by design, we learn the codes in a coarse to fine manner. Therefore, the predictions are learned in different stages, from coarse groupings to fine ones. We use an error histogram for each position on hierarchical level and weight our Hamming-based loss given the error to design this. + +Mask loss. Firstly, we predict the visible mask to segment the object area from the background. Here, we simply pass the predicted probability to the sigmoid function and use L1 loss as $L_{mask}$ . It is worth noting, for the binary vertex code prediction in the following, we only calculate loss of the pixels within the predicted object mask. + +Hamming distance: The CNN outputs the binary vertex code probabilities $\hat{p} \in \mathbb{R}^d$ for a pixel within a ROI, we + +obtain the predicted discrete binary code $\hat{b}$ by rounding $\hat{p}$ . Given $\hat{b}$ and its known ground truth binary vertex code $b$ , the Hamming distance $H_{\text{hamm}}$ is defined by counting the number of bits $\hat{b}$ which are different from $b$ . This formulation does not favor any of the positions and calculates the error without considering any hierarchical information explicitly. As a common practice in deep learning, we use binary cross-entropy as an activation function for the distance: + +$$ +\operatorname {H a m m} (b, \hat {p}) = \sum_ {j = 1} ^ {d} b _ {j} \log \hat {p _ {j}} + (1 - b _ {j}) \log (1 - \hat {p _ {j}}), \tag {2} +$$ + +where $b_{j}$ stands for the $j$ -th bit in $b$ (the $j$ -th bit is generated in the $j$ -th vertices grouping). + +Active bits. Lower bits in binary vertex code $b$ hold coarse correspondences, and higher bits define finer estimates. During the initial training phase, the network focuses on learning the coarse splits and has a higher error on fine bits. Therefore we adaptively weight the coarse bits by looking at the histogram of error of all bits. As the training proceeds and coarser predictions become more robust, finer bits are induced with more weights. We define our histogram at training step $t$ by looking at the error at different bits: + +$$ +H _ {j} (t) = a v g \left(\lambda \left(b _ {j} ^ {t} - \hat {b _ {j}} ^ {t}\right) + (1 - \lambda) \left(b _ {j} ^ {t - 1} - \hat {b _ {j}} ^ {t - 1}\right)\right), \tag {3} +$$ + +where $\hat{b}_j^t$ defines the predicted binary vertex code $\hat{b}_j$ at training step $t$ , and $\lambda$ is a constant. With the avg operator, we get the error ratio by calculating the average difference in $b_j^t$ and $\hat{b}_j^t$ of all pixels within the predicted object mask in a mini-batch. During training we update the histogram given the previous histogram in training step $t - 1$ and the current error histogram. We show how to define a hierarchical loss based on the histogram in the following. + +Hierarchical loss. We compute a weighting coefficient based on the error histogram, and use it on top of a Hamming distance to form our hierarchical loss with + +$$ +w _ {j} (t) = \exp (\sigma \cdot \min \left\{H _ {j} (t), 0. 5 - H _ {j} (t) \right\}), \tag {4} +$$ + +where the function $w$ uses an exponential term to softly define a weight for $n$ -th bit at training step $t$ , $\sigma$ is a constant. All object pixels in the mini-batch share the same weighting coefficients. We normalize the weights across all bits. We then define our hierarchical loss based on the weighting function of active bits and Hamming distance as below: + +$$ +L _ {h i e r} = \sum_ {j = 1} ^ {d} w _ {j} \cdot H a m m \left(b _ {j}, \hat {p} _ {j}\right). \tag {5} +$$ + +With this loss we focus mainly on active bits which automatically change from coarse to fine during training. + +Total loss to train the CNN. We weight the $L_{mask}$ and $L_{hier}$ with a hyper-parameter $\alpha$ ( $\alpha$ set as 0 for pixels predicted as background), the total per pixel loss can be mathematically expressed as + +$$ +L _ {\text {t o t a l}} = L _ {\text {m a s k}} + \alpha \cdot L _ {\text {h i e r}}. \tag {6} +$$ + +# 3.6. Pose estimation + +In previous sections, we discussed how to generate our descriptor and learn to predict them using a fully convolutional neural network. Now we incorporate the predicted code and visible mask and the reference 3D model encoding to match correspondences. Different from common dense correspondences such as [48,66,67], this compact representation also enables a bijective correspondence between the surface vertices and the descriptor space. That means, unlike the regressed 3D point which can be off the object surface, our estimated 3D correspondences always refers to a vertex on the object model, which eases the matching stage for the pose solver. For the matching, we use a look-up table that extracts the corresponding 2D and 3D points. Following that, we use Progressive-X [2] solver to calculate the rotation $R$ and translation $t$ . + +# 4. Experiments + +In this section, we firstly introduce the implementation details, the datasets and metrics used for the evaluation. Subsequently, we present ablation study experiments on the LM-O [5] dataset. Finally, we compare our experimental results with state of the art methods on the LM-O [5] and YCB-V [69] datasets. Please refer to supplementary materials for more qualitative results. + +# 4.1. Experiments Setup + +Implementation Details. In order to have the same number of classes as DPOD [71] ( $K = 256^2$ ), we firstly upsample the mesh by subdivision of each face using the edge's midpoint [14] until the mesh has more than $256^2$ vertices. Subsequently, we group the 3D vertices of the object model as we described in Sec. 3.1 with $r = 2$ and $d = 16$ . After several iterations of the grouping operation, a group could contain fewer points than 2 and cannot be grouped further. To avoid this, we modified the k-means++ clustering algorithm [1], to force both output groups of points to have equal sizes. + +We modified Deeplabv3 [13] by adding skip connections and used Resnet34 [23] as the backbone. The input ROI is resized to the shape of $256 \times 256 \times 3$ , and the CNN output has a height and width of 128. We applied the same dynamic zoom-in strategy as CDPN [40] to generate the noisy ROI for the training. The parameter $\lambda$ used in the histogram is 0.05. The parameter $\sigma$ used in the hierarchical loss is 0.5, and $\alpha$ has been set as 3 to balance the training for mask and + +vertex code prediction. The CNN has been trained $380k$ steps using the Adam optimizer [36] with a batch size of 32 and a fixed learning rate of 2e-4. During the inference stage, we utilize the detected bounding box with Faster R-CNN [55] and FCOS [62] provided by CDPNv2 [40]. If not specified, we used detected bounding box from Faster R-CNN in the ablation study. + +Additionally, by changing any bit in the vertex code, the code refers to another 3D point, possibly even to a vertex on the other side of the object. To maintain the topology presented with the ground truth correspondence map, we disabled the interpolation during the rendering when we generated the ground truth. The resizing of ground truth is also done with nearest neighbourhood interpolation in the training stage. + +Datasets. The reported recall rate in LM [28] dataset has lately been higher than $95\%$ and quite saturated, therefore we focus on the more challenging LM-O [5] and YCB-V [69] dataset in this paper. LM-O consist of 1214 images and is only used as test images. LM-O annotated 8 objects poses in the images under partial occlusion, making pose estimation more challenging. About $1.2k$ images per object in LM are used as the real training images for LM-O. Compared to LM-O, YCB-V is a large dataset containing 21 objects. Although YCB-V provides more real training images, the objects are strongly occluded in the scene, and many of the objects are geometrically symmetric. + +Since the LM-O dataset includes only a limited number of training images, [34, 49] additionally render a large number of synthetic images for training. However, due to the domain gap between the synthetic and real images, the performance of the methods also heavily depends on the domain randomization and domain adaptation technique [61, 70]. As the physically-based rendering (pbr) training images [18] for both datasets are publicly accessible now, using pbr images to support the training can help us focus on the pose estimation CNN itself. We use the pbr images together with the real images for the training in the same manner as [19, 29, 66]. + +Error Metrics. We selected the ADD(-S) error metric as the most commonly used metric for the 6DoF pose estimation task. This metric calculates the average distance of model points projected to the camera domain using the predicted pose to the same model points projected using the ground truth pose. For symmetric objects, the metric matches the closest model points projected with the ground truth pose instead of the same model point. In all the experiments in this paper, if ADD(-S) error is smaller than $10\%$ (most commonly used threshold) of the object diameter, the predicted pose is considered to be correct. For YCB-V, we also reported the AUC (area under curve) of ADD(-S) with a maximum threshold of $10\mathrm{cm}$ [69]. + +# 4.2. Ablation Study on LM-O + +In this section, we present the results of several ablation studies as follows: + +Length of Binary Vertex Code. The object 3D surface is encoded through iterative k-means++ clustering until the size of the segmented cluster is small enough so that we can map the vertex code to the centroid of each cluster. We used the same total number of classes as DPOD [71], which means each binary vertex code has 16 bits. However, if the objects are small or the distance of the object to the camera is too large, different clusters in the fine level could be rendered into the same pixel when we generate the ground truth data. This makes the binary code in the fine levels (the last few bits) redundant. Due to the distance variation of the object to the camera, we can not determine which bits are redundant. + +In this ablation study, we research which bits are the redundant bits. The models are trained without the hierarchical training strategy, and we use Progressive-X [2] to solve the pose. We ignore the last few bits of the predicted binary code in the inference stage. The new binary vertex code with fewer bits refers to a larger point cloud group (see Fig. 2 left). We calculated the new centroid of the group and reassigned the centroid as the corresponding 3D points for the binary vertex code with fewer bits. From Fig. 3 b) we can see that using 10-bit code is already sufficient to yield an accurate prediction for the objects in LM-O, indicating the last 6 bits are redundant for those objects. The results fluctuated a bit when we applied the redundant bits, which indicates that for some objects the best results is achieved by not using the full 16-bit code. However, in the following experiment, we always report the results with the full predicted vertex code. + +Radix used in Vertex Code. The number of the clusters in each iteration decides the radix of the generated vertex code that describes the 3D vertex. Since our CNN predicts the vertex code, it is meaningful to compare which radix in vertex code suits the representation better. We do not need to generate all the vertex codes used in this ablation study from scratch. More specifically, by merging every $\log_2 r$ bit of a vertex code, we get a code with a radix $r$ . For instance, a vertex with a binary code {11111110 11111111} can be transformed to {254 255} using 256 as the radix. We will get exactly the same code for this vertex if we split the object into 256 groups and split each group again into 256 groups. We use a fix $w_j = 1$ (see eq. 4) for all positions so the loss is essentially a binary cross entropy when $r = 2$ , and cross-entropy loss for other radixes. + +We present the comparison results in Tab. 1. If RANSAC/PnP is used to solve the pose, the results with different radices are quite similar. There is no clear indication whether using the small or large radix is better. If we switch the pose solver to Progressive-X [2], the code + +![](images/b3bbb0a5d8a5c02f0763483c0c72fc83389b8e2d28ec23a567ca569eeafe1697.jpg) +Figure 3. a) In the first row, a yellow dot has the ground truth binary vertex code beginning with 000, and the yellow circle refers to the neighborhood vertex of this yellow dot. If the vertex code has been predicted as 100 (the first bit is wrong, marked as red in the figure) during the inference stage, the estimated yellow dot lies somewhere on the head of the drill (marked in blue). The estimated 3D vertex is far away from its original neighborhood and can be easily found by checking the spatial coherency. We show four similar cases in this figure. b) We calculated ADD pose metrics only on the first $j$ bits of the predicted code to build the 2D-3D correspondence. Here we observe from which bit the predictions are stable. c) We present the average error rate at different bit positions on the LM-O dataset [5]. + +![](images/29b1f66d37998480a8e91ebb56713f71ba61d6d28afdc391dfee1d7e1a8aa1c1.jpg) + +![](images/9cdeb657443e70149d4a4f88912444d3ec8a06bd13ad5ea1c584839188e762eb.jpg) + +with small radix improves the most and yields the best accuracy. Progressive-X solver includes a spatial coherence filter that checks neighboring 3D points with respect to its assigned 2D correspondences based on label cost energy minimization as introduced in [17]. It can therefore deal particularly well with the type of outliers, from our method as we mentioned in Fig. 3. We show in the Fig. 3 a), if the CNN predicts the first few bits wrong for the yellow dot, the estimated corresponding 3D points is far away from the ground truth position and totally incoherent with its original neighbourhood. Assuming that most predictions are correct, most neighbourhood vertices are posed within the yellow circle in the figure. In this case, this false estimated 3D corresponding can be easily filtered by calculating the coherency with its neighbourhood. This spatial coherency filter can not detect outliers well if the wrong prediction is in the last few bits, and the same for 256 as radix, as divide the vertices into 256 groups is already a fine grouping. Nevertheless, the Fig. 3 b) already shows that the last few bits do not affect the solved pose. So we argue that the binary vertex code suits this task the best. Moreover, the prediction of binary codes requires the least RAM in GPU, as we discussed in Sec. 3.1. + +Effectiveness of Hierarchical Training. According to the first ablation study, the last few bits are redundant and may not be trainable (see Fig. 3c)). During the training, we can recognize redundant bits based on the error histogram and focus on the decisive bits as described in Sec. 3.5. Tab. 2 shows that the results are further improved by our proposed hierarchical training. + +Influence of 2D detection. The CNN estimates the pose with the cropped ROI from the detected bounding box. The object pose estimation is meaningless with a false-positive detection, also the pose is not even estimated in the case of false-negative detection. By leveraging the detected bound + +
MethodRANSAC/ Pnp [38]Progressive-X [2]
2 as radix73.0675.23 (+2.17)
4 as radix72.9474.59 (+1.65)
16 as radix73.0474.98 (+1.94)
256 as radix73.2574.52 (+1.27)
+ +Table 1. Ablation study on LM-O [5]. We tested the use of different radices to encode the vertices, and using different solvers to calculate the pose. The results are presented in terms of average recall of ADD(-S) in %. + +
MethodADD
2 as radix75.23
2 as radix + Hierarchical Learning75.86
2 as radix + Hierarchical Learning + Faster R-CNN [55] → FCOS [62]76.91
+ +Table 2. Ablation study on LM-O [5]. We compare the result with and w/o applying our hierarchical loss, as well as the impact of the prior object detector. The results are presented with average recall of ADD(-S) in %. + +ing box with FCOS [62] instead of the one from Faster R-CNN [55], the recall rate improved $1.05\%$ . + +# 4.3. Comparison to State of the Art + +We use 2 as radix, i.e. binary vertex code and apply the hierarchical training strategy and Progressive-X pose solver [2] in our proposed ZebraPose to compare to state of the art on LM-O [5] and YCB-V [69] datasets. The detected bounding box of FCOS [62] detector are provided by CDPNv2 [40]. + +Results on LM-O. We report the recall of ADD(-S) met + +
MethodRGB InputRGB-D Input
HybridPose [59]RePose [32]GDR-Net [66]SO-Pose [19]OursPR-GCN [72]FFB6D [24]
ape20.931.146.848.457.940.247.2
can75.380.090.885.895.076.285.2
cat24.925.640.532.760.657.045.7
driller70.273.182.677.494.882.381.4
duck27.943.046.948.964.530.053.9
eggbox*52.451.754.252.470.968.270.2
glue*53.854.375.878.388.767.060.1
holepuncher54.253.660.175.383.097.285.9
mean47.551.662.262.376.96566.2
+ +ric in Tab. 3. We ordered the methods according to the input modality. HybridPose [59] and RePose [32] have been trained with synthetic and real images. GDR-Net [66] also reported their recall of $53\%$ when trained with synthetic and real images. Therefore, GDR-Net outperforms HybridPose and RePose. In our Tab.3, we report the best results that GDR-Net and SO-Pose [19] presented, which are also trained with pbr and real images. GDR-Net used faster R-CNN [55] as the detector, ZebraPose yields a recall of $75.86\%$ with faster R-CNN (see Tab. 2), which can be seen as a more fair comparison with GDR-Net. + +To summarize, our ZebraPose outperforms state of the art RGB based methods with a large margin on this dataset. Additionally, we found that our ZebraPose also outperforms state of the art RGB-D based methods [24,72]. Most objects in the LM-O dataset are texture-less, meaning that RGB-D based methods should have more advantage in feature extraction on the objects with the help of depth image. Even in this case, our results still exceed theirs. + +Results on YCB-V. We compare ZebraPose with other approaches in the YCB-V dataset in Tab. 4. The AUC reported in Tab. 4 has been calculated using all-points interpolation. Tab. 4 shows that ZebraPose is still better than state of the art w.r.t. ADD(-S) and AUC of ADD(-S) metrics and comparable to them w.r.t. the AUC of ADD-S metric. + +# 4.4. Runtime Analysis + +We tested the runtime on a desktop with an Intel 3.50GHz CPU and an Nvidia 2080Ti GPU. The CNN runtime plus the time to build the 2D-3D correspondence is about $52\mathrm{ms}$ . The FCOS detector [62] takes $55\mathrm{ms}$ . RANSAC/PnP [38] needs only $4\mathrm{ms}$ to solve the pose, while Progressive-X [2] requires $150\mathrm{ms}$ to obtain the pose. So for ZebraPose used in Sec.4.3, it totally needs about $250\mathrm{ms}$ to estimate the object pose. If we use RANSAC/PnP to solve the pose, the runtime reduces to $110\mathrm{ms}$ , while with about $2.6\%$ recall drop on LM-O dataset. + +Table 3. Comparison with State of the Art on LM-O [5]. We report the Recall of ADD(-S) in % and compare with state of the art. (*) denotes symmetric objects. + +
MethodADD(-S)AUC of ADD-SAUC of ADD(-S)
SegDriven [31]39.0--
SingleStage [30]53.9--
CosyPose [37]-89.884.5
RePose [32]62.188.582.0
GDR-Net [66]60.191.684.4
SO-Pose [19]56.890.983.9
Ours80.590.185.3
+ +Table 4. Comparison with State of the Art on YCB-V [69]. We compare our ZebraPose with state of the art w.r.t ADD(-S), AUC of ADD(-S) and AUC of ADD-S in %. (-) denotes results missing from the original paper. + +# 5. Conclusion + +In this work, we proposed a novel coarse to fine surface encoding technique to provide 2D-3D correspondences for 6DoF object pose estimation. We also designed a specific hierarchical training strategy that maximizes the prediction accuracy for our proposed binary vertex code. Solving the object pose using a PnP solver based on our vertex code surpasses the state of the art on different benchmarks, proving our approach's effectiveness. In the future, we would like to extend our vertex code solution to the problem of category-level object pose [39]. + +# Acknowledgements + +This work was partially funded by the Federal Ministry of Education and Research of the Federal Republic of Germany (BMBF), under grant agreements 16SV8732 (GreifbAR) and 01IW21001 (DECODE). We are thankful to René Schuster, Fangwen Shu, Yaxu Xie and Ghazal Ghazaei for proofreading the paper. + +# References + +[1] David Arthur and Sergei Vassilvitskii. k-means++: The advantages of careful seeding. Technical report, Stanford, 2006. 5 +[2] Daniel Barath and Jiri Matas. Progressive-x: Efficient, anytime, multi-model fitting algorithm. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3780-3788, 2019. 2, 5, 6, 7, 8 +[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. 2 +[4] Eric Brachmann, Alexander Krull, Sebastian Nowozin, Jamie Shotton, Frank Michel, Stefan Gumhold, and Carsten Rother. Dsac-differentiable ransac for camera localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6684-6692, 2017. 2 +[5] Eric Brachmann, Frank Michel, Alexander Krull, Michael Ying Yang, Stefan Gumhold, and others. 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, 6, 7, 8 +[6] Eric Brachmann and Carsten Rother. Learning less is more-6d camera localization via 3d surface regression. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4654–4662, 2018. 2 +[7] Eric Brachmann and Carsten Rother. Neural-guided ransac: Learning where to sample model hypotheses. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4322-4331, 2019. 2 +[8] Benjamin Busam, Tolga Birdal, and Nassir Navab. Camera pose filtering with local regression geodesics on the riemannian manifold of dual quaternions. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 2436-2445, 2017. 2 +[9] Benjamin Busam, Marco Esposito, Simon Che'Rose, Nassir Navab, and Benjamin Frisch. A stereo vision approach for cooperative robotic movement therapy. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 127-135, 2015. 1 +[10] Benjamin Busam, Hyun Jun Jung, and Nassir Navab. I like to move it: 6d pose estimation as an action decision process. arXiv preprint arXiv:2009.12678, 2020. 1 +[11] Berk Calli, Arjun Singh, Aaron Walsman, Siddhartha Srinivasa, Pieter Abbeel, and Aaron M Dollar. The ycb object and model set: Towards common benchmarks for manipulation research. In Advanced Robotics (ICAR), 2015 International Conference on, pages 510-517. IEEE, 2015. 2 +[12] Carlos Campos, Richard Elvira, Juan J Gómez Rodríguez, José MM Montiel, and Juan D Tardós. Orb-slam3: An accurate open-source library for visual, visual-inertial, and multimap slam. IEEE Transactions on Robotics, 2021. 2 +[13] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for seman + +tic image segmentation. arXiv preprint arXiv:1706.05587, 2017. 5 +[14] Qi Chen and Hartmut Prautzsch. General midpoint subdivision. arXiv preprint arXiv:1208.3794, 2012. 5 +[15] Wenzheng Chen, Huan Ling, Jun Gao, Edward Smith, Jaakko Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. Advances in Neural Information Processing Systems, 32:9609-9619, 2019. 2 +[16] Alvaro Collet, Manuel Martinez, and Siddhartha S Srinivasa. The moped framework: Object recognition and pose estimation for manipulation. The international journal of robotics research, 30(10):1284-1306, 2011. 1 +[17] Andrew Delong, Anton Osokin, Hossam N Isack, and Yuri Boykov. Fast approximate energy minimization with label costs. International journal of computer vision, 96(1):1-27, 2012. 7 +[18] Maximilian Denninger, Martin Sundermeyer, Dominik Winkelbauer, Youssef Zidan, Dmitry Olefir, Mohamad Elbadrawy, Ahsan Lodhi, and Harinandan Katam. Blenderproc. arXiv preprint arXiv:1911.01911, 2019. 6 +[19] Yan Di, Fabian Manhardt, Gu Wang, Xiangyang Ji, Nassir Navab, and Federico Tombari. So-posed: Exploiting selfocclusion for direct 6d pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 12396–12405, 2021. 2, 3, 6, 8 +[20] T Do, Trung Pham, Ming Cai, and Ian Reid. Real-time monocular object instance 6d pose estimation. 2019. 2 +[21] Ghazal Ghazaei, Iro Laina, Christian Rupprecht, Federico Tombari, Nassir Navab, and Kianoush Nazarpour. Dealing with ambiguity in robotic grasping via multiple predictions. In Asian Conference on Computer Vision, pages 38-55. Springer, 2018. 1 +[22] Silvio Giancola, Matteo Valenti, and Remo Sala. A survey on 3D cameras: Metrological comparison of time-of-flight, structured-light and active stereoscopy technologies. Springer, 2018. 3 +[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 +[24] Yisheng He, Haibin Huang, Haoqiang Fan, Qifeng Chen, and Jian Sun. Ffb6d: A full flow bidirectional fusion network for 6d pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3003-3013, 2021. 8 +[25] Stefan Hinterstoisser, Cedric Cagniart, Slobodan Ilic, Peter Sturm, Nassir Navab, Pascal Fua, and Vincent Lepetit. Gradient response maps for real-time detection of textureless objects. IEEE transactions on pattern analysis and machine intelligence, 34(5):876-888, 2011. 2 +[26] Stefan Hinterstoisser, Cedric Cagniart, Slobodan Ilic, Peter Sturm, Nassir Navab, Pascal Fua, and Vincent Lepetit. Gradient response maps for real-time detection of textureless objects. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(5):876-888, 2012. 1 +[27] Stefan Hinterstoisser, Stefan Holzer, Cedric Cagniart, Slobodan Ilic, Kurt Konolige, Nassir Navab, and Vincent Lepetit. + +Multimodal templates for real-time detection of texture-less objects in heavily cluttered scenes. In 2011 international conference on computer vision, pages 858-865. IEEE, 2011. 3 +[28] 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. 1, 6 +[29] Tomas Hodan, Daniel Barath, and Jiri Matas. Epos: Estimating 6d pose of objects with symmetries. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11703-11712, 2020. 2, 3, 6 +[30] Yinlin Hu, Pascal Fua, Wei Wang, and Mathieu Salzmann. Single-stage 6d object pose estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 2930-2939, 2020. 2, 8 +[31] Yinlin Hu, Joachim Hugonot, Pascal Fua, and Mathieu Salzmann. Segmentation-driven 6d object pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3385-3394, 2019. 8 +[32] Shun Iwase, Xingyu Liu, Rawal Khirodkar, Rio Yokota, and Kris M Kitani. Repose: Fast 6d object pose refinement via deep texture rendering. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3303-3312, 2021. 2, 8 +[33] Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. Neural 3d mesh renderer. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3907-3916, 2018. 2 +[34] 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 International Conference on Computer Vision (ICCV 2017), Venice, Italy, pages 22–29, 2017. 1, 2, 6 +[35] 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. 2 +[36] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[37] Yann Labbe, Justin Carpentier, Mathieu Aubry, and Josef Sivic. Cosypose: Consistent multi-view multi-object 6d pose estimation. In European Conference on Computer Vision, pages 574-591. Springer, 2020. 2, 4, 8 +[38] 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-166, 2009. 1, 7, 8 +[39] Xiaolong Li, He Wang, Li Yi, Leonidas J Guibas, A Lynn Abbott, and Shuran Song. Category-level articulated object pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3706-3715, 2020. 8 +[40] 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/CVF International Conference on Computer Vision, pages 7678-7687, 2019. 4, 5, 6, 7 +[41] Matthew M Loper and Michael J Black. Opendra: An approximate differentiable renderer. In European Conference on Computer Vision, pages 154-169. Springer, 2014. 2 +[42] David G Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2):91-110, 2004. 2 +[43] 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/CVF International Conference on Computer Vision, pages 6841-6850, 2019. 2 +[44] 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. 2 +[45] Eric Marchand, Hideaki Uchiyama, and Fabien Spindler. Pose estimation for augmented reality: a hands-on survey. IEEE transactions on visualization and computer graphics, 22(12):2633-2651, 2016. 1 +[46] Michihiko MIMOU, Takeo Kanade, and Toshiyuki SAKAI. A method of time-coded parallel planes of light for depth measurement. IEICE TRANSACTIONS (1976-1990), 64(8):521-528, 1981. 3 +[47] Markus Oberweger, Mahdi Rad, and Vincent Lepetit. Making Deep Heatmaps Robust to Partial Occlusions for 3D Object Pose Estimation. pages 2-4. 2 +[48] Kiru Park, Timothy Patten, and Markus Vincze. Pix2pose: Pixel-wise coordinate regression of objects for 6d pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7668-7677, 2019. 2, 3, 5 +[49] Sida Peng, Yuan Liu, Qixing Huang, Xiaowei Zhou, and Hu-jun Bao. Pvnet: Pixel-wise voting network for 6dof pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4561-4570, 2019. 2, 3, 6 +[50] Luis Pérez, Ínigo Rodr\`iguez, Nuria Rodr\`iguez, Rubén Usamentiaga, and Daniel Garc\`ia. Robot guidance using machine vision techniques in industrial environments: A comparative review. Sensors, 16(3):335, 2016. 1 +[51] Jeffrey L Posdamer and MD Altschuler. Surface measurement by space-encoded projected beam systems. Computer graphics and image processing, 18(1):1-17, 1982. 3 +[52] 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 ICCV, 2017. 2, 3 +[53] Jason Rambach, Chengbiao Deng, Alain Pagani, and Didier Stricker. Learning 6dof object poses from synthetic single channel images. In 2018 IEEE International Symposium on Mixed and Augmented Reality Adjunct (ISMAR-Adjunct), pages 164–169. IEEE, 2018. 1 +[54] Jason Rambach, Alain Pagani, Michael Schneider, Oleksandr Artemenko, and Didier Stricker. 6dof object tracking + +based on 3d scans for augmented reality remote live support. Computers, 7(1):6, 2018. 1 +[55] 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. 6, 7, 8 +[56] Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary Bradski. ORB: An efficient alternative to SIFT or SURF. In 2011 International Conference on Computer Vision, pages 2564-2571. IEEE, 11 2011. 2 +[57] Joaquim Salvi, Jordi Pages, and Joan Battle. Pattern codification strategies in structured light systems. Pattern recognition, 37(4):827-849, 2004. 3 +[58] Juil Sock, Guillermo Garcia-Hernando, Anil Armagan, and Tae-Kyun Kim. Introducing pose consistency and warp-alignment for self-supervised 6d object pose estimation in color images. In 2020 International Conference on 3D Vision (3DV), pages 291-300. IEEE, 2020. 2 +[59] Chen Song, Jiaru Song, and Qixing Huang. Hybridpose: 6d object pose estimation under hybrid representations. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 431-440, 2020. 3, 8 +[60] Yongzhi Su, Jason Rambach, Alain Pagani, and Didier Stricker. Synpo-net—accurate and fast cnn-based 6dof object pose estimation using synthetic training. Sensors, 21(1):300, 2021. 2 +[61] 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. 1, 3, 6 +[62] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In Proceedings of the IEEE/CVF international conference on computer vision, pages 9627-9636, 2019. 6, 7, 8 +[63] Marjan Trobina. Error model of a coded-light range sensor. Technical report, 1995. 3 +[64] Joel Vidal, Chyi-Yeu Lin, and Robert Mart\`i. 6D pose estimation using an improved method based on point pair features. In 2018 4th International Conference on Control, Automation and Robotics (ICCAR), pages 405-409. IEEE, 2018. 1 +[65] Gu Wang, Fabian Manhardt, Jianzhun Shao, Xiangyang Ji, Nassir Navab, and Federico Tombari. Self6d: Self-supervised monocular 6d object pose estimation. In European Conference on Computer Vision, pages 108-125. Springer, 2020. 2 +[66] Gu Wang, Fabian Manhardt, Federico Tombari, and Xi-angyang Ji. Gdr-net: Geometry-guided direct regression network for monocular 6d object pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16611–16621, 2021. 2, 3, 4, 5, 6, 8 +[67] He Wang, Srinath Sridhar, Jingwei Huang, Julien Valentin, Shuran Song, and Leonidas J Guibas. Normalized object coordinate space for category-level 6d object pose and size estimation. In Proceedings of the IEEE/CVF Conference + +on Computer Vision and Pattern Recognition, pages 2642-2651, 2019. 2, 3, 5 +[68] Paul Wohlhart and Vincent Lepetit. Learning descriptors for object recognition and 3d pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3109-3118, 2015. 3 +[69] Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. Poseconn: A convolutional neural network for 6d object pose estimation in cluttered scenes. arXiv preprint arXiv:1711.00199, 2017. 1, 2, 5, 6, 7, 8 +[70] Sergey Zakharov, Wadim Kehl, and Slobodan Ilic. Deceptionnet: Network-driven domain randomization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 532-541, 2019. 6 +[71] Sergey Zakharov, Ivan S. Shugurov, and Slobodan Ilic. Dpod: 6d pose object detector and refiner. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 1941-1950, 2019. 2, 3, 5, 6 +[72] Guangyuan Zhou, Huiqun Wang, Jiaxin Chen, and Di Huang. Pr-gcn: A deep graph convolutional network with point refinement for 6d pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2793-2802, 2021. 8 +[73] Yi Zhou, Connelly Barnes, Jingwan Lu, Jimei Yang, and Hao Li. On the continuity of rotation representations in neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5745-5753, 2019. 2 \ No newline at end of file diff --git a/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/images.zip b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..05b2347e30efbfef4d05ef1da6c8d8d2b79d5272 --- /dev/null +++ b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:853a444b9d9a17ae067b1f5ca22210b369dd8cb3cfc081784bb478de4b5aab01 +size 308169 diff --git a/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/layout.json b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..10d2b4818836b8008177a2193e9c6134c63088ec --- /dev/null +++ b/zebraposecoarsetofinesurfaceencodingfor6dofobjectposeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0287470307c8e647f5ece5576d5c248d7e032dcedc6edbb0ba73c1a0d9a01f92 +size 423049 diff --git a/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_content_list.json b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..838333d5093f574bd0a86c0c27e9f4fa84402f78 --- /dev/null +++ b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b4cdc322805951a13a4a80fd56be41891a8757712cc73a90b4fc798cb047a73 +size 87142 diff --git a/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_model.json b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_model.json new file mode 100644 index 0000000000000000000000000000000000000000..26260faa502461cfb91cc0831fe87d051ef71055 --- /dev/null +++ b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3ae2fe9e31cea2ba625dfd8e987c5174be851643be70e5e5f255306f963eadd +size 115105 diff --git a/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_origin.pdf b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8f797f66887b7f86025bbbb1550a85673e454586 --- /dev/null +++ b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/24eb2531-a4a0-4ade-9fe6-928670b8c145_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0ec023cf9d132c63dac4be433f6f110be0eed7bc023d1bf573895ddfe422b1e +size 2141753 diff --git a/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/full.md b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4cdab4869c906699c819864dd2558a814da13086 --- /dev/null +++ b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/full.md @@ -0,0 +1,401 @@ +# ZeroCap: Zero-Shot Image-to-Text Generation for Visual-Semantic Arithmetic + +Yoad Tewel Yoav Shalev Idan Schwartz Lior Wolf School of Computer Science, Tel Aviv University + +# Abstract + +Recent text-to-image matching models apply contrastive learning to large corpora of uncurated pairs of images and sentences. While such models can provide a powerful score for matching and subsequent zero-shot tasks, they are not capable of generating caption given an image. In this work, we repurpose such models to generate a descriptive text given an image at inference time, without any further training or tuning step. This is done by combining the visual-semantic model with a large language model, benefiting from the knowledge in both web-scale models. The resulting captions are much less restrictive than those obtained by supervised captioning methods. Moreover, as a zero-shot learning method, it is extremely flexible and we demonstrate its ability to perform image arithmetic in which the inputs can be either images or text and the output is a sentence. This enables novel high-level vision capabilities such as comparing two images or solving visual analogy tests. Our code is available at: https://github.com/YoadTew/zero-shot-image-to-text. + +# 1. Introduction + +Deep learning has led to at least three major revolutions in computer vision: (i) machines that achieve, in multiple domains, what is considered a human level of performance earlier than anticipated [39,64], (ii) effective transfer learning, which supports rapid modeling of new domains [74], and (iii) a leap in unsupervised learning through the use of adversarial and self-supervised learning [9,23]. + +A fourth revolution that is currently taking place is that of zero-shot learning. A seminal work by OpenAI presented the transformer-based [65] GPT-3 model [6]. This model is trained on extremely large text corpora and can then generate text given a prompt. If the prompt contains an instruction, GTP-3 can often carry it out. For example, given the prompt "Translate English to French: typical $\rightarrow$ typique, house $\rightarrow$ ..." would generate the word "maison." + +Impressive zero-shot capability was later on demonstrated, also by OpenAI, in computer vision. While state-of-the-art computer vision models are often trained as task + +specific models that infer a fixed number of labels, Radford et al. [55] have presented the CLIP image-text transformer model, which can perform tens of downstream tasks, without further training, with an accuracy comparable to the state of the art. This is done by selecting, given an image, the best match out of sentences of the form "This is an image of X." Subsequently, Ramesh et al. [57] presented a bimodal Transformer termed DALL-E, which generates images that match a given description in unseen domains with unprecedented performance. + +In this work, we employ CLIP to perform the inverse task of DALL-E, namely zero-shot image captioning. Given an image, we employ CLIP together with the GPT-2 language model [56] (we do not have access to GPT-3) to generate a textual description of the input image. This adds a new image-analysis capability to CLIP, beyond the fixed-prompt zero-shot learning demonstrated by Radford et al. + +As a zero-shot method, our approach does not involve any training. One can argue that the underlying CLIP model is trained with exactly the same type of supervision that image captioning methods [62, 76] are trained on, i.e., pairs of matching images and captions. However, image captioning methods are trained from curated sources, such as MS-COCO [43] or Visual Genome [38], while CLIP is trained on WebImageText (WIT), which is an automatically collected web-scale dataset. Previous attempts to train a captioning model on WIT have led to poor performance in recognizing the objects in the image, see Sec. 2. + +As a result of the difference in both methodology and underlying data, the captions produced by our method are very different from those obtained by the supervised captioning methods. While supervised methods can mimic human annotators and provide similar sentences, in terms of conventional NLP metrics (such as BLEU [53]) to the ground truth sentences, our results exhibit much more freedom and match the image better in the visual-semantic CLIP embedding space (ours is optimized for this). Moreover, the semantic knowledge incorporated into CLIP and GPT-2 is manifested in the resulting caption, see Fig. 1. + +In addition to the different nature of the obtained captions, our method is also more flexible, since all the computing occurs at inference time. Specifically, we show the + +![](images/36d7aa1fcfd515047bdd4f650d235a82e1f4405dd519d0c27b50702a27c7b5f0.jpg) +CLIP-VL: A blue hat sitting on top of a black table. +VinVL: A police hat sitting on top of a toilet. +Ours: A promotional cap from the Toronto Blue Jays 10/09 season. + +![](images/3a8dd632c51658ddfd731cd06c9aec2bacc11df5eb381a2cd321e9ce91a7d9cc.jpg) +CLIP-VL: A living room with a television and a book shelf. +VinVL: A living room with a television and pictures on the wall. +Ours: A room dedicated to games and other forms of entertainment that were popular in the late 90s. + +![](images/af09d6b8f32fd36f2560f6a8cbcc7e1d3fa7eacf8e53f2700de988ad6c73299e.jpg) +CLIP-VL: A birthday cake with +candy on top of it. +VinVL: A blue cake with candy on top of it. +Ours: Sean's truck cake. + +![](images/4c930eaa82908e87ee997fb58592c19ad3cf5b4bee959fed1110010a67790227.jpg) +Visual-Semantic Arithmetics + +![](images/1d4febcbe90ef8ffe61bf49072ec364028151adc4f48e38177d620b2d1641b50.jpg) +Figure 1. Our novel captioning method ZeroCap exhibits real-world knowledge, generates text that is more diverse and less scripted than existing methods, can address the written content of an image, and can perform visual-semantic arithmetic. + +ability to perform semantic analysis in image space by using a new form of arithmetic. A well-known example for concept arithmetic in NLP is that of retrieving the word 'queen' as the closest word, in the embedding space, to the equation involving the embedding vectors associated with 'king,' 'man,' and 'woman,' after subtracting the 2nd from the 1st and adding the 3rd. We present the novel ability to do the same, only with images instead of words, such that the result is generated as a short sentences, and not just a word, see Fig. 1. + +As a corollary, we can, for example, ask what the difference is between two scenes. This ability to compare two images semantically is a novel computer vision capability, which further demonstrates the power of zero-shot learning. + +# 2. Related work + +The first deep captioning methods applied RNNs to generate sequences of words [37, 48]. Attention was added to identify relevant salient objects [59, 61, 71]. Graph neural networks and scene graphs incorporated spatial as well as semantic relationships between objects [36, 72, 73]. Subsequently, Transformers modeled interactions among all image elements with self-attention [17, 51, 60, 65]. On the text modeling side of the problem, language models (LMs) have also advanced with the development of LSTMs [16, 69], CNNs [4] and Transformers [27, 29, 47]. Language improvements include devising better image grounding [46], decoding non-visual words (e.g., 'the,' 'and') [45], generating fine, novel and diverse sentences [7, 24, 70], and incorporating information from different semantic taggers [12, 33]. + +In recent years, significant improvements have been achieved by utilizing large-scale vision-language data sets. The unsupervised data is used as a pre-training phase, to initialize models with image-text correspondence [15, 41, 76]. With this technique, millions of image and text pairs from the web can be adopted. Nevertheless, in previous work we are aware of, all captioning models employ + +human-annotated datasets, such as MS-COCO or the Visual Genome, in the last stage of training. + +It is likely impossible to construct a database of curated captions that is large enough, to describe even a modestly large fraction of plausible images and objects. This results in biases [20, 21, 68]. Several approaches focused on describing novel objects by conditioning the model on external unsupervised data during training [1, 28, 67]. Alternatively, external object taggers can be used during different phases (e.g., pre-training, training, or inference) [3, 18, 31, 42, 46]. Semi-supervised methods are also available [35]. Unsupervised approaches can be achieved by training with a visual concept detector or by learning a joint image-language embedding space [19, 40]. In contrast, our method makes use of an existing image-text alignment score to direct an existing large-scale LM toward a given image without training. + +CLIP is trained on 400M images/sentence pairs from the web [55], resulting with a powerful text-image matching score. Originally CLIP's authors explored training an image-to-caption language model with this training set, but found that it struggled with zero-shot transfer. In a 16 GPU-day experiment, a language model only achieved $16\%$ accuracy on ImageNet [14]. CLIP achieves the same level of accuracy roughly 10x faster. + +Using prompts, it is possible to imitate some capabilities of text generation. For example, CLIP-based applications exhibit zero-shot solving capabilities in various scenarios never seen before. With careful engineering of the prompt, one can, for example, improve detection of unseen objects [26]. Zero-shot prompt engineering has also been used for higher-level tasks (e.g., VQA), but it is nowhere near the level of supervised methods [62]. + +CLIP also provides powerful means for supporting text-driven image manipulation with Generative Adversarial Networks (GANs) or other generative models [8, 54, 58]. Our work explores the other direction: generating text us + +ing an image, by guiding a large-scale LM with CLIP. + +Guided language modeling has become a primary challenge, as researchers strive to tune prior knowledge within large-scale LMs, such as GPT-2 [56]. Fine-tuning is often accomplished by employing Reinforcement Learning [77] or GANs [75] for each attribute separately. Disentangling the latent representations into style and content is also relevant in terms of text style transfer [32, 63]. A controllable LM can also be formed using fixed control codes [34]. Ideally, conditioning should be applied directly to the existing large-scale LM, without the need for fine-tuning. Several studies have explored the idea of steering an LM using small neural networks [10, 25]. Following that, PPLM [13] demonstrated that a simple attribute classifier could steer a model without any further training. With our work, we present a novel visual LM guidance from visual cues. + +# 3. Method + +Visual captioning is the process of generating a descriptive sentence for an image. It can be formalized as a sequence generation problem given an input image $I$ , i.e., as a conditional probability inference for the $i$ -th word $x_{i}$ of the sentence, i.e., $p(x_{i}|[x_{t}]_{t < i}, I)$ . + +This is typically accomplished in a supervised manner, by optimizing weights to reproduce ground truth sentences. However, since carefully curated datasets are small, and cannot adequately describe all images, the sentences generated often describe the content at the basic level of the objects present in the scene and sound artificial. Such problems can be mitigated with the use of web-scale datasets. We present a zero-shot method for guiding large-scale language models with a large-scale text-image alignment model. + +Overview Our approach uses a transformer-based LM (e.g., GPT-2) to infer the next word from an initial prompt, such as "Image of a," as illustrated in Fig. 2. To incorporate image-related knowledge to the auto-regression process, a calibrated CLIP loss $\mathcal{L}_{\mathrm{CLIP}}$ stimulates the model to generate sentences that describe a given image. An additional loss term $\mathcal{L}_{\mathrm{CE}}$ is used to maintain the next token distribution similar to the original language model. Optimization occurs during auto-regression, and repeated for each token. + +Furthermore, the flexibility of our method enables the capturing of semantic relations through simple arithmetic of visual cues in CLIP's embedding space. Finally, combining multi-modal encoders with our method allows knowledge to be extracted in a new way that mixes between text and images. + +Language models In recent years, LMs have improved significantly and are getting closer to AI-complete capabilities, including broad external knowledge and solving a wide variety of tasks with limited supervision. A Transformer + +based LM typically models interactions between the generated token and past tokens at each time-step. + +Recall that the transformer block has three embedding functions $K, Q, V$ [65]. The first two, $K, Q$ , learn the token interactions that determine the distribution over $V$ . The attention mechanism pools values based on the similarity between queries and keys. Specifically, the pooled value for each token $i$ depends on the query associated with this token $Q_{i}$ , which is computed using the function $Q$ over the current embedding of this token. The result is obtained as the weighted average of the value vectors, based on the cosine similarity between $Q_{i}$ and the keys associated with all tokens $K_{j}$ . + +While $K$ and $V$ are functions, the obtained key and values $K_{j}$ and $V_{j}$ are used repeatedly when generating text, one word at a time. $K_{j}$ and $V_{j}$ can therefore be stored in what is called a context cache, in order to keep track of past embedding outputs of $K$ and $V$ . The sequence generation process can then be written as + +$$ +x _ {i + 1} = \operatorname {L M} \left(x _ {i}, \left[ \left(K _ {j} ^ {l}, V _ {j} ^ {l}\right) \right] _ {j < i, 1 \leq l \leq L}\right), \tag {1} +$$ + +where $x_{i}$ is the $i$ -th word of the generated sentence, $K_{j}^{l}, V_{j}^{l}$ are the context transformer's key and value of the $j$ -th token, and $l$ indicates the index of the transformer layers, out of a total of $L$ layers. Our method employs GPT-2, which has $L = 24$ layers. + +We next describe how we align our LM with the input image. We do so by modifying, during inference, the values of the context cache $C_i = [(K_j^l,V_j^l)]_{j < i,1\leq l\leq L}$ leaving the LM unchanged. + +CLIP-Guided language modelling Our goal is to guide the LM towards a desired visual direction with each generation step. The guidance we propose has two primary goals: (i) alignment with the given image; and (ii) maintaining language attributes. The first goal is obtained through CLIP, which is used to assess the relatedness of a token to an image and adjust the model (or, rather, the cache) accordingly. For the second goal, we regularize the objective to be similar to the original target output, i.e., before it was modified. + +The solved optimization problem adjusts the context cache $C_i$ at each time point and is formally defined as $\arg \min_{C_i} \mathcal{L}_{\mathrm{CLIP}}(\mathrm{LM}(x_i, C_i), I)$ + +$$ ++ \lambda \mathcal {L} _ {\mathrm {C E}} \left(\operatorname {L M} \left(x _ {i}, C _ {i}\right), \hat {x} _ {i + 1}\right), \tag {2} +$$ + +where $\hat{x}_{i+1}$ is the token distribution obtained using the original, unmodified, context cache. The second term employs CE loss to ensure that the probability distribution across words with the modified context is close to the one of the original LM. The hyperparameter $\lambda$ balances the two loss terms. It was set to 0.2 early on in the development process and was unmodified since. Next, we explain how the CLIP loss term is calculated. + +![](images/7f960a05a8d115354373acb39d728dc857331fb055507ba7719d6a9adc964e28.jpg) +Figure 2. An overview of our approach. We guide the model towards the phrase 'eagle' instead of 'man'. We do this by adjusting the context $(C_4)$ , using the gradients of CLIP loss $(\mathcal{L}_{\mathrm{CLIP}})$ illustrated with a red arrow. To maintain language attributes, we optimize the minimum distance to the original distribution of the LM $(\mathcal{L}_{\mathrm{CE}})$ . + +CLIP loss We calculate image relevance for the possible tokens at time $i$ . It is sufficient to compute potentials for the top 512 token candidates and set the rest to zero potential for efficiency. To this end, the corresponding candidate sentence $s_i^k = (x_1, \dots, x_{i-1}, x_i^k)$ for the $k$ -th candidate token is matched against the image $I$ . + +The clip potential of the $k$ -th token is computed as + +$$ +p _ {i} ^ {k} \propto \exp \left(\mathrm {D} _ {\text {C L I P}} \left(E _ {\text {T e x t}} \left(s _ {i} ^ {k}\right), E _ {\text {I m a g e}} (I)\right) / \tau_ {c}\right)), \tag {3} +$$ + +where $D_{\mathrm{CLIP}}$ is the cosine distance between CLIP's embeddings of the text (i.e., $E_{\mathrm{Text}}$ ) and the image (i.e., $E_{\mathrm{Image}}$ ), and $\tau_c > 0$ is a temperature hyperparameter that controls the sharpness of the target distribution. In all our experiments, we set $\tau_c$ to 0.01. + +The CLIP loss is defined as the cross-entropy loss between the clip potential distribution and the target distribution of the next token $x_{i + 1}$ obtained by the language model: + +$$ +\mathcal {L} _ {\mathrm {C L I P}} = \mathrm {C E} \left(p _ {i}, x _ {i + 1}\right). \tag {4} +$$ + +This loss encourages words that lead to higher CLIP matching scores between the image and the generated sentence. + +Inference As a zero-shot method, no training takes place. At inference time one optimizes the problem in Eq. (2), which we denote as $p(x_{i + 1}|C_i)$ , by conducting five steps of gradient descent, i.e., + +$$ +C _ {i} \longleftarrow C _ {i} + \alpha \frac {\nabla_ {C _ {i}} p \left(x _ {i + 1} \mid C _ {i}\right)}{\| \nabla_ {C _ {i}} p \left(x _ {i + 1} \mid C _ {i}\right) \| ^ {2}}. \tag {5} +$$ + +This update rule is simplified for brevity. With each newly-generated token, the optimization is re-done. In our implementation, the gradients are normalized with Euclidean normalization before each step, separately for each transformer layer. We set the learning rate $\alpha$ to 0.3. + +Beam search The byte-level tokenizer used employs 256 bytes of base tokens to represent every word in existence [56]. Any word can also be split into more than one subwords, e.g., the word 'zebra' is tokenized as 'zeb' and 'ra'. As a result, we found that images of zebras are described as striped animals, since the token 'zeb' is not picked. Beam search inference helps solve this problem by enabling the search to be conducted in a less myopic way. + +# 4. Visual-Semantic Arithmetic + +Recent studies suggested that CLIP multi-modal representation holds an elaborate concept taxonomy [22]. In accordance with this intuition, we find that our method can express CLIP's embedding in a textual way. For instance, subtracting between CLIP-encoded images and applying our method transcribes a relationship between the two images. Furthermore, by summing vectors we can steer the generated caption towards a conceptual direction. + +To perform arithmetic in CLIP's embedding space, we first encode the image/text using CLIP's image/text encoder. For instance, let $I_1, I_2$ be two images. We encode the images with CLIP's encoder, i.e., $E_{\mathrm{image}}(I_1), E_{\mathrm{image}}(I_2)$ . Next, we carry out the desired arithmetic, e.g., addition with $E_{\mathrm{image}}(I_1) + E_{\mathrm{image}}(I_2)$ . Finally, we use the obtained result instead of the image encoding $E_{\mathrm{image}}(I)$ within Eq. (3) to steer the generated sentence. + +Consequently, we can generate detailed knowledge of the external world by moving in conceptual directions. This way, our method can answer questions expressed visually, for example, "who is the president of Germany?" To achieve this, we subtract "America's flag" from an image of "Obama" and obtain a presidential-direction, to which we can then add the image of a second country's flag. + +Our approach extends beyond visual interactions alone. Using CLIP's textual encoder, interaction with a natural lan + +
MethodSupervised MetricsDiversity MetricsUnsupervised Metric
B@4MCSCLIP-SRefVocab%NovelCLIP-S
ClipCap [50]32.1527.1108.3520.120.81165066.4%0.77
CLIP-VL [62]40.229.7134.223.80.82246485.1%0.77
VinVL [76]41.031.1140.925.20.83112577.9%0.78
Ours2.611.514.65.50.798681100%0.87
+ +Table 1. For each method, we report supervised metrics (i.e., ones requiring human references): B@1 = BLEU-1, M = METEOR, C = CIDEr, S = SPICE. We also report diversity metrics, which measures the vocabulary size (Vocab), and the number of novel sentences w.r.t the training set (%Novel). Finally, we report semantic relatedness to the image (CLIP-S), and to the human references (CLIP-SRef) based on CLIP's embeddings. + +guage is possible. In this case, one performs arithmetic operations in the embedding space such that the expression contains both image- and text-embeddings. + +# 5. Experiments + +For all the results reported in this section, we used a strategy for reducing repetitions, in which the probability for generating tokens that were generated at the last four time-steps was decreased by a factor of two. We also incorporated a mechanism that directly controls the length of the generated text by multiplying the probability of the end token by a factor of $f_{e}$ , starting from time-step $t_e$ . We use $f_{e} = 1.04$ and $t_e = 3$ for image captioning, and $f_{e} = 1.06$ and $t_e = 1$ for image arithmetic. On a single Titan X GPU, five beams and 512 candidate tokens can be generated in three seconds. Inference time is proportional to the number of candidates and beams. + +# 5.1. Image Captioning + +We begin by studying our zero-shot method for caption generation. Notably, we find our captions to exhibit human-like characteristics, such as generating diverse captions, reading, exploiting a wide range of external knowledge, and coping with abstract concepts. In Tab. 1, we present our results for COCO's test set [43]. Two recent baselines that use CLIP's embedding are compared to: ClipCap [50] and CLIP-VL [62]. In ClipCap, the image is encoded using CLIP and the representation is transferred and plugged as a token into a fine-tuned GPT-2. CLIP-VL incorporates spatial grid features from CLIP into a transformer network. Another method, VinVL [76] is a state-of-the-art technique. + +We first consider supervised metrics, i.e., metrics requiring human references. These metrics include the BLEU [52], METEOR [5], CIDEr [66], SPICE [2], and CLIPScoreRef that we discuss below. As can be seen, our method lags in these metrics in comparison to the supervised captioning methods. Since the ground truth human annotation is obtained similarly to the training set, with the same group of annotators using similar terms, there is a + +clear advantage for methods trained on COCO annotations. + +We next consider diversity metrics. Our vocabulary over COCO's test set is significantly larger than previous approaches (8681 vs. 2464). In addition, none of the generated sentences appear in the training set of COCO (100% on %Novel). + +CLIPScore [30] is a reference-free method for evaluating relatedness between an image and its caption, using CLIP's alignment score. Evidently, our method is much better in this metric than the supervised method (87% vs. 77%). As an alternative to exact correspondence with human reference, we use CLIPScoreRef to measure the semantic distance from the references. Although supervised methods outperform our method in this score (similarity in the vocabulary and the sentence style still provide an advantage), the gap is narrower than in other supervised metrics. + +Qualitative Analysis Fig. 3 compares our zero-shot approach with other baselines, demonstrating that our method can generate human-like captions, i.e., textually richer, better at image reasoning, and more effective at grounding objects. We discuss each image from left to right. First, as opposed to CLIP-VL, which assumes a toilet is in the bathroom, and VinVL, which disregards the background buildings and presumes it is on a sidewalk, our method determines it is on a rooftop. Next, our method attempts to generate the written text on a boat's side. The following image describes a flight meal as a regular tray of food with the baselines, whereas our method describes it as a flight meal. We accurately describe the next image as a bar restroom with portraits and not a bathroom. Our method and VinVL specify specific birds in the following photo (red falcons and hawks are hard to tell apart). Next, the baselines repeat the same sentence, while our method mentions an interesting mesh tile pattern. In the next photo, our method identifies a family rather than a general group. Last, our method accurately describes a room's interior, such as a bedroom with posters, and deduce that the posters depict bands. Note that the baselines' captions are generally of the same pattern, while our method generates novel sentences. Also, note that the images are taken from COCO dataset, + +![](images/ed175de1bc712dcd7146f606b3cadc1aaf240509fcddf550545e2f23ca789299.jpg) +CLIP-VL: A toilet sitting on a ledge in a bathroom. VinVL: A white toilet sitting on a sidewalk next to a wall Ours: A new rooftop toilet being installed on a residential street. + +![](images/2d98c180b0a3efb94ede664eb25da75521a4bf2ea236fcc8f4f3f462bba306bf.jpg) +CLIP-VL: A boat with a picture on it in the water. VinVL: A sail boat is tied up in the water. Ours: A boat with message on the side saying "token". + +![](images/f81a11455c0900e0f9e70a1fa5d87b40db7c3dfb127bbb706a39f454bfc992e6.jpg) +CLIP-VL: A tray of food on a table with bread and drinks. +VinVL: A tray of food on a table with a lot of items. +Ours: A flight meal being served on the Boeing 707 aircraft. + +![](images/8ba1fd7259a5d4e2170b8389817be6696403ec7a3302bc58bbdf4f60d2a2099e.jpg) +CLIP-VL: A bathroom with a sink and a mirror. +VinVL: A bathroom sink with a mirror and pictures. +Ours: A bar restroom with portraits of the late 19th and 20th century. + +![](images/77fe1f49ce3076285af4913b03c21fa1c7e8423dd1be7c80023b802b11756a57.jpg) +CLIP-VL: A bird sitting on top of a window. +VinVL: A hawk perched on top of a window sill.. +Ours: A Red Falcon in the exhibit. + +![](images/c5d67d40c1530199592e87071294c4e202d79b55670371ad1f93c897f20b2a1a.jpg) +CLIP-VL: A bathroom with a sink and a mirror. +VinVL: A bathroom with a sink and a mirror. +Ours: A bathroom with a mesh tile pattern. + +![](images/38972ca65fe3dcd13c75cf7b4dae3282cafdc2d128a844e427923771750e8c38.jpg) +CLIP-VL: A group of people standing in the snow with skis VinVL:A group of people standing in the snow with skis Ours: Winter activities of parents with children. + +![](images/5a53fd460547d4a6a2b8dad8836154bfc8c061c06cc891bc5742bcab2bc048a7.jpg) +CLIP-VL: A mirror on the wall in a bedroom with a bed. VinVL: A bedroom with a bed and posters on the wall. Ours: A bedroom with posters on the wall that shows hands. + +![](images/4c6ac3989349386da172361d4de914d463fd40d167df9472000ccb484c8880c2.jpg) +The president Kennedy's death. + +![](images/0045ddeed4ae435896de346f3d0f66e737b9c2679d7becb5e91a4d5eedf94181.jpg) +Figure 3. Examples of our zero-shot image captioning compared against supervised captioning methods. +Welcome. + +![](images/2a62c038ecdfcc579e064d156a29650b75773998064fece6bb454aa6aa59033c.jpg) +The University of Stanford. + +![](images/78c6e14d8af754d571adfde23476be6f85e67508a6dbe750c5027939c5ddc46c.jpg) +Central PARK. + +![](images/7ce72e294252000690ca6254ead12ab308e2fa338e76ba0bb9d0d17008f9dc71.jpg) +The President Trump smiles. +Figure 5. Examples of real-world knowledge. + +![](images/5cacee3a4ef53ee7da65c83e331a10c11835db5c57a211d3637a1b341747b8f2.jpg) +Figure 4. Examples of OCR capabilities. +The Simpsons + +![](images/cf8a4a719788767df100902a5fcfd31fa82648cd3b9867cfab748c244b7bdbe9.jpg) +Manhattan on the iconic island + +![](images/14d27746456c157475b7be09a5a20a41b8cc249f6aa0bb18f0baa65ee704fbfe.jpg) +The Avengers poster. + +![](images/79cf37d2fb2edbd4328f9cf41381bd3c63d2087b453e49e4f326098c581a57e0.jpg) +Mario driving + +![](images/902c20bed82566c7b531e0d48f1c2573ec50d4a20b7ad82ce1108c3fcefb6f99.jpg) +Stanford University. + +which was used to fine-tune CLIP-VL and VinVL. + +OCR The ability of CLIP to classify text within an image from a closed set of possible prompts is impressive [55]. We show in Fig. 4 that these capabilities can be exploited in a generative manner. To accomplish this, we change the prefix prompt we use in our method from "Image of a" to "Image of text that says." Results include impressive understanding. e.g., "The president Kennedy's death" from an image of a paper declaring it or generating "The University of Stanford" from a sign depicting its name. + +External knowledge The generated captions comprise a wealth of real-world knowledge on a variety of topics. In Fig. 5 we show samples of famous people (e.g., Trump), animated shows (e.g., Simpsons), cities (e.g., Manhattan), movies (e.g., Avengers), games (e.g., Mario driving), and places (e.g., Stanford). + +# 5.2. Visual-Semantic Arithmetic Study + +We demonstrate how our method can generate text for subtraction to explain semantic directions. Next, we demonstrate that the summation operator allows guidance of the generated text through visual cues. One can then apply the above insights to solve visual analogy puzzles. + +Subtraction Subtracting vectors intuitively represents a direction between the vectors. In Fig. 6 we demonstrate our method's ability to express relations through several examples. "A caricature illustration" is the result of subtracting a real photo of an airplane from a caricature. To put + +it another way, adding the concept "A caricature illustration" to the right image of a real plane will match the image on the left of a caricature plane. Concepts of quantity and color can also be seen, for example, a comparison of a green apple versus a red apple yields 'Red,' and vice-versa, subtracting one basketball from many basketballs results in "a bunch." Furthermore, we find directions related to a geographical area, e.g., 'Snow,' and 'Desert.' Further, a concept directly tied to day and night, and a concept of prison (i.e., 'Jailed'). It should be noted that the operator is not symmetric, and cannot always be derived textually. For instance, on the right images, the concept direction from a skateboard to a skateboard tournament can be generated as "The event." However, the direction from a skateboard tournament to a skateboard generated "schematic fossil view," which is irrelevant. + +Summation Through the addition operation, the generated text can be guided through visual semantics. In Fig. 7 we show examples of guidance. On the left side, with the addition of a police officer's hat, the caption describes a man running as "A police officer...," if we add a hammer to a man, we get "The judge." On the right side, we show that a concept can be abstract. For example, the Apple company can be represented by an apple. Thus, adding an apple to a phone, results in the text "Apple's iPhone released." Additionally, a country's concept can be represented visually with flags. If Canada's flag is added to a tree, "Toronto Maple" results. + +Guidance with Visual-Relations In the field of natural language processing, semantic relations have long been studied [49]. Previous efforts studied visual relations with expensive annotated language-priors [44]. With the introduction of CLIP, richer visual concepts from large-scale data became available [22]. Through visual arithmetic, we are able to exploit this richer embedding space. + +In Fig. 8, we show our proposed strategy. Using subtraction, we first determine the direction. For example, the concept of leadership is represented by an image of Obama minus the American flag. With this direction in hand, we can now manipulate the case of other nations. By adding the direction to the German flag, we obtain "Angela Merkel." A different example is to examine the concept direction of CEO-to-company. With different images (e.g., Bill Gates + +![](images/9dbece596d40345205323fa7d8b39ee7782cf3ceadf2fe88b657352be2974dee.jpg) +Figure 6. Examples of vector directions derived by subtracting representations from CLIP's embedding space. By generating text for the given direction, the concept is revealed. + +![](images/bb295fa4f1af5c042989dc30575ce8326a84cea38b109234cfc0df77332710be.jpg) +Figure 7. Examples of caption guidance with an image through the addition operator. + +and Microsoft, Jeff Bezos and Amazon), the direction can be summed to Mark Zuckerberg and Steve Jobs generating 'Facebook' and 'Apple,' respectively. On the right side, we study various interactions with country-related representations. We guide the image of a baguette to generate 'France' by taking photos of pizza and Italy and deriving the country-to-food direction. + +The Visual Relations benchmark To further study the relation capabilities of our technique quantitatively, we introduce a new benchmark of visual relations, VR for short. This benchmark comprises 320 relations of the following templates: buildings $\rightarrow$ country, countries $\rightarrow$ capital, foods $\rightarrow$ country, leaders $\rightarrow$ country, and CEO $\rightarrow$ company. These were chosen because they are roughly many to one, i.e., a country has many buildings, but a building only relates to one country. The benchmark is designed to measure both the ability to model relations visually and to apply real-world knowledge to perform the task. + +We constructed the benchmark through the following steps: (i) we created semantic directions by subtracting visual pairs and (ii) we then used each direction and added it to a visual element in another pair to create its corresponding text companion. As an example, we used images of ('japan,' 'sushi') to convey the direction of food $\rightarrow$ country, and then we added this direction to an image of a pizza and examined the appearance of Italy in the generated text. + +We focused on single-word answers. The three evaluation metrics we find relevant to this setting are (1) BLEU-1, which measures unigram precision; (2) Recall@5, which indicates a word's appearance within the first five words generated; and (3) CLIP-score, which indicates semantic relatedness. To calculate the CLIP-score, we first add "Image of" as a prefix to the ground truth. Using CLIP's textual encoder, we then use a cosine distance. More details are provided in the supplementary material. + +In Tab. 2, we show performance for each relation. While + +this task is challenging, our approach resulted in a significant success rate of $30\%$ at $\mathbb{R}@\mathbb{5}$ in most relations. Note that, since the benchmark lacks multiple references, it is still limited, e.g., we mark a miss if the generated word is 'US', while the ground truth is 'USA'. Observing the returned answers reveals that some mistakes are understandable, e.g., answering Sydney instead of Canberra or the Sinai province instead of the country Egypt. However, other cases return truncated sentences, e.g., returning 'flag' instead of a country name or returning general concepts such as "flickr image". See supplementary for a discussion. When employing the softer CLIP-Score metric, which is based on a semantic distance, a correlation of $70\%$ is observed. + +We compared our results with ClipCap [50] that encodes the image with CLIP's image encoder and uses it as an initial token for GPT-2. The method is fine-tuned based on COCO dataset. As can be seen, this method fails to retrieve the correct response, despite employing the same large-scale models as we do and performing arithmetic in the same CLIP embedding space. CLIP-VL [62] and the supervised captioning methods cannot be tested on this benchmark since it uses spatial grid features as embedding. + +Multi-modal Arithmetic Our method enables multimodal reasoning, which involves manipulating images and text simultaneously in the same embedding space. Using CLIP's textual encoder, $E_{\mathrm{Text}}$ . In Fig. 9, we show that a day-to-night direction can be obtained with text inputs, i.e., "image of a night," and "image of a day." The direction steers an image of breakfast to "Nighttime dinner." + +# 6. Discussion and Limitations + +The zero-shot capabilities presented by CLIP [55] pave a new path for computer vision. However, these are limited to multiclass classification. DALL-E [57] presents an impressive ability to generate images that are very different from its training images in what is termed zero-shot generation ability. However, this ability is exactly the generative task DALL-E was trained to do, only in new domains. No previous computer vision work, as far as we can ascertain, has presented a generative semantic zero-shot capability of the sort that is revolutionizing the NLP world with transformers, such as GPT-3 [6]. Our work is the first to present a generative visual-semantic work. + +While the ability to rely on pre-trained models such as + +![](images/17623bbdf20459c9486844e791ae9005aae7e09163faad9295bd23f8b2d56b75.jpg) +Figure 8. Image arithmetic with both summation and subtraction. For example, on the left side, by removing the American flag from Obama, a leadership direction results. The presidents of different countries are generated when the derived vector is added to their flags. + +
MethodBuilding → CountryCountry → CapitalCEO → CompanyFood → CountryLeader → Country
B@1R@5C-sB@1R@5C-sB@1R@5C-sB@1R@5C-sB@1R@5C-s
ClipCap [50]0.0030.0350.240.00.00.220.0040.050.180.00.00.240.0080.240.26
Ours0.10.320.70.140.320.680.10.30.640.030.330.660.10.280.68
+ +Table 2. Comparison of our method and ClipCap baseline on our novel benchmark for visual relations. B@1 = BLEU-1, R@5 = Recall@5, C-s = CLIP-score. + +![](images/ad250c5e6383bb7a01788f3418a0a986eed7031d23a5d671c5275de69db21a74.jpg) +Figure 9. Our method is not only devoted to visual relations, but it also allows arithmetic between image and language. + +GPT-2 [56] and CLIP allows us to achieve such new capabilities, they also highlight the uneven playing field AI has become. GPT-2 is far inferior to GPT-3 and other recent LMs in which resources far beyond the reach of most research labs are invested. + +On a similar note, it is likely that combining zero-shot with supervised training would lead to a method that outperforms the baselines in all captioning metrics. However, the amount of resources currently used to train supervised captioning methods is becoming a deterring factor from pursuing this direction. For instance, UNITER uses 3645 hours of a V100 GPU [11]. + +The use of an LM and an image-language matching model trained on large corpora of collected data inevitably leads to biases. For example, the models we employ are clearly oriented towards Western knowledge and can recognize people, places, objects and concepts that are popular in Western media, while being much less knowledgeable about other cultures. For example, our model fails to form relations with the president of China, Xi Jinping. + +# 7. Conclusions + +The marriage between a language model and a visual-semantic matching model is a powerful union, with the po + +tential to provide zero-shot captioning that brings together real-world variability in text, recognition abilities that are unrestricted by categories, and real-world knowledge that is embedded in the models through web-scale datasets. + +We propose a zero-shot method for combining the two models, which does not involve optimizing over the weights of the models. Instead, we modify, for all layers and attention heads, the key-value pairs of the tokens generated by the language model up to each inference step. + +As a captioning model, our method produces results that are less restrictive than those provided by the human annotators on the datasets used by supervised captioning methods. While this lowers the word-to-word metrics, the captions generated seem to be a good match to the image at the semantic level and exhibit real-world information. Moreover, the flexibility of using an embedding-space zero-shot method enables us to perform visual-semantic arithmetic. + +We show how we can describe in words the difference between two images and how we can combine concepts from multiple images. Both are novel high-level recognition tasks. Combining these two capabilities, a powerful image analogy machine is obtained, which answers, by providing a text string, questions of the form "A is to B as C is to X" ( $X \sim C + B - A$ ), in which A, B, and C can each be either textual or visual. + +# Acknowledgments + +This project has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research, innovation programme (grant ERC CoG 725974). The contribution of the first author is part of a PhD thesis at Tel Aviv University. + +# References + +[1] Harsh Agrawal, Karan Desai, Yufei Wang, Xinlei Chen, Rishabh Jain, Mark Johnson, Dhruv Batra, Devi Parikh, Stefan Lee, and Peter Anderson. nocaps: novel object captioning at scale. In ICCV, 2019. 2 +[2] Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. Spice: Semantic propositional image caption evaluation. In ECCV, 2016. 5 +[3] Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. Guided open vocabulary image captioning with constrained beam search. EMNLP, 2017. 2 +[4] Jyoti Aneja, Aditya Deshpande, and Alexander G Schwing. Convolutional image captioning. In CVPR, 2018. 2 +[5] Satanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In ACL, 2005. 5 +[6] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In NeurIPS, 2020. 1, 7 +[7] Moitreya Chatterjee and Alexander G Schwing. Diverse and coherent paragraph generation from images. In ECCV, 2018. 2 +[8] Hila Chefer, Sagie Benaim, Roni Paiss, and Lior Wolf. Image-based clip-guided essence transfer. arXiv preprint arXiv:2110.12427, 2021. 2 +[9] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597-1607. PMLR, 2020. 1 +[10] Yun Chen, Victor OK Li, Kyunghyun Cho, and Samuel R Bowman. A stable and effective learning strategy for trainable greedy decoding. EMNLP, 2018. 3 +[11] 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. In ECCV, 2020. 8 +[12] Marcella Cornia, Matteo Stefanini, Lorenzo Baraldi, and Rita Cucchiara. Meshed-memory transformer for image captioning. In CVPR, 2020. 2 +[13] Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. Plug and play language models: A simple approach to controlled text generation. In ICLR, 2020. 3 +[14] 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. 2 +[15] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. NAACL, 2019. 2 + +[16] Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. CVPR, 2015. 2 +[17] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021. 2 +[18] Qianyu Feng, Yu Wu, Hehe Fan, Chenggang Yan, Mingliang Xu, and Yi Yang. Cascaded revision network for novel object captioning. TCSVT, 2020. 2 +[19] Yang Feng, Lin Ma, Wei Liu, and Jiebo Luo. Unsupervised image captioning. In CVPR, 2019. 2 +[20] Itai Gat, Idan Schwartz, and Alex Schwing. Perceptual score: What data modalities does your model perceive? NeurIPS, 34, 2021. 2 +[21] Itai Gat, Idan Schwartz, Alexander Schwing, and Tamir Hazan. Removing bias in multi-modal classifiers: Regularization by maximizing functional entropies. NeurIPS, 2020. 2 +[22] Gabriel Goh, Nick Cammarata, Chelsea Voss, Shan Carter, Michael Petrov, Ludwig Schubert, Alec Radford, and Chris Olah. Multimodal neurons in artificial neural networks. *Distill*, 2021. 4, 6 +[23] Ian J. 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 27th International Conference on Neural Information Processing Systems - Volume 2, NIPS'14, page 2672-2680, Cambridge, MA, USA, 2014. MIT Press. 1 +[24] Jieuxiang Gu, Jianfei Cai, Gang Wang, and Tsuhan Chen. Stack-captioning: Coarse-to-fine learning for image captioning. In AAAI, 2018. 2 +[25] Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor OK Li. Learning to translate in real-time with neural machine translation. EACL, 2017. 3 +[26] Xiuye Gu, Tsung-Yi Lin, Weicheng Kuo, and Yin Cui. Zero-shot detection via vision and language knowledge distillation. arXiv preprint arXiv:2104.13921, 2021. 2 +[27] Longteng Guo, Jing Liu, Xinxin Zhu, Peng Yao, Shichen Lu, and Hanqing Lu. Normalized and geometry-aware self-attention network for image captioning. In CVPR, 2020. 2 +[28] Lisa Anne Hendricks, Subhashini Venugopalan, Marcus Rohrbach, Raymond Mooney, Kate Saenko, and Trevor Darrell. Deep compositional captioning: Describing novel object categories without paired training data. In CVPR, 2016. 2 +[29] Simao Herdade, Armin Kappeler, Kofi Boakye, and Joao Soares. Image captioning: Transforming objects into words. NeurIPS, 2019. 2 +[30] Jack Hessel, Ari Holtzman, Maxwell Forbes, Ronan Le Bras, and Yejin Choi. Clipscore: A reference-free evaluation metric for image captioning. EMNLP, 2021. 5 +[31] Xiaowei Hu, Xi Yin, Kevin Lin, Lijuan Wang, Lei Zhang, Jianfeng Gao, and Zicheng Liu. Vivo: Visual vocabulary pre-training for novel object captioning. AAAI, 2021. 2 + +[32] Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. In ICML, 2017. 3 +[33] Jiayi Ji, Yunpeng Luo, Xiaoshuai Sun, Fuhai Chen, Gen Luo, Yongjian Wu, Yue Gao, and Rongrong Ji. Improving image captioning by leveraging intra-and inter-layer global representation in transformer network. In AAAI, 2021. 2 +[34] Nitish Shirish Keskar, Bryan McCann, Lav R Varshney, Caiming Xiong, and Richard Socher. Ctrl: A conditional transformer language model for controllable generation. arXiv preprint arXiv:1909.05858, 2019. 3 +[35] Dong-Jin Kim, Jinsoo Choi, Tae-Hyun Oh, and In So Kweon. Image captioning with very scarce supervised data: Adversarial semi-supervised learning approach. EMNLP, 2019. 2 +[36] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. *ICLR*, 2017. 2 +[37] Benjamin Klein, Guy Lev, Gil Sadeh, and Lior Wolf. Fisher vectors derived from hybrid gaussian-laplacian mixture models for image annotation. arXiv preprint arXiv:1411.7399, 2014. 2 +[38] 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. ICCV, 2017. 1 +[39] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Proceedings of the Advances in Neural Information Processing Systems, pages 1097-1105, 2012. 1 +[40] Iro Laina, Christian Rupprecht, and Nassir Navab. Towards unsupervised image captioning with shared multimodal embeddings. In ICCV, 2019. 2 +[41] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, et al. Oscar: Object-semantics aligned pre-training for vision-language tasks. In ECCV, 2020. 2 +[42] Yehao Li, Ting Yao, Yingwei Pan, Hongyang Chao, and Tao Mei. Pointing novel objects in image captioning. In CVPR, 2019. 2 +[43] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 1, 5 +[44] Cewu Lu, Ranjay Krishna, Michael Bernstein, and Li Fei-Fei. Visual relationship detection with language priors. In ECCV. Springer, 2016. 6 +[45] Jiasen Lu, Caiming Xiong, Devi Parikh, and Richard Socher. Knowing when to look: Adaptive attention via a visual sentinel for image captioning, corr abs/1612.01887 (2016). CVPR, 2017. 2 +[46] Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Neural baby talk. In CVPR, 2018. 2 +[47] Yunpeng Luo, Jiayi Ji, Xiaoshuai Sun, Liujuan Cao, Yongjian Wu, Feiyue Huang, Chia-Wen Lin, and Rongrong Ji. Dual-level collaborative transformer for image captioning. AAAI, 2021. 2 + +[48] J. Mao, W. Xu, Y. Yang, J. Wang, and A. L. Yuille. Deep Captioning with Multimodal Recurrent Neural Networks (mRNN). CoRR, abs/1412.6632, 2014. 2 +[49] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. NIPS, 2013. 6 +[50] Ron Mokady, Amir Hertz, and Amit H Bermano. Clipcap: Clip prefix for image captioning. arXiv preprint arXiv:2111.09734, 2021. 5, 7, 8 +[51] Yingwei Pan, Ting Yao, Yehao Li, and Tao Mei. X-linear attention networks for image captioning. In CVPR, 2020. 2 +[52] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In ACL, 2001. 5 +[53] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318, 2002. 1 +[54] Or Patashnik, Zongze Wu, Eli Shechtman, Daniel Cohen-Or, and Dani Lischinski. Styleclip: Text-driven manipulation of stylegan imagery. In ICCV, 2021. 2 +[55] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. ICML, 2021. 1, 2, 6, 7 +[56] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. 1, 3, 4, 8 +[57] Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. arXiv preprint arXiv:2102.12092, 2021. 1, 7 +[58] Aditya Sanghi, Hang Chu, Joseph G Lambourne, Ye Wang, Chin-Yi Cheng, and Marco Fumero. Clip-forge: Towards zero-shot text-to-shape generation. arXiv preprint arXiv:2110.02624, 2021. 2 +[59] Idan Schwartz, Alexander G Schwing, and Tamir Hazan. High-order attention models for visual question answering. NIPS, 2017. 2 +[60] Idan Schwartz, Alexander G. Schwing, and Tamir Hazan. A simple baseline for audio-visual scene-aware dialog. In CVPR, 2019. 2 +[61] Idan Schwartz, Seunghak Yu, Tamir Hazan, and Alexander G Schwing. Factor graph attention. In CVPR, 2019. 2 +[62] Sheng Shen, Liunian Harold Li, Hao Tan, Mohit Bansal, Anna Rohrbach, Kai-Wei Chang, Zhewei Yao, and Kurt Keutzer. How much can clip benefit vision-and-language tasks? arXiv preprint arXiv:2107.06383, 2021. 1, 2, 5, 7 +[63] Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. Style transfer from non-parallel text by cross-alignment. NIPS, 2017. 3 +[64] Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014. 1 + +[65] 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. 1, 2, 3 +[66] Ramakrishna Vedantam, C. Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In CVPR, 2014. 5 +[67] Subhashini Venugopalan, Lisa Anne Hendricks, Marcus Rohrbach, Raymond Mooney, Trevor Darrell, and Kate Saenko. Captioning images with diverse objects. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5753-5761, 2017. 2 +[68] Sahil Verma, Michael Ernst, and Rene Just. Removing biased data to improve fairness and accuracy. arXiv preprint arXiv:2102.03054, 2021. 2 +[69] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. corr abs/1411.4555 (2014). ICML, 2015. 2 +[70] Liwei Wang, Alexander G Schwing, and Svetlana Lazebnik. Diverse and accurate image description using a variational auto-encoder with an additive gaussian encoding space. NIPS, 2017. 2 +[71] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pages 2048-2057, 2015. 2 +[72] Xu Yang, Kaihua Tang, Hanwang Zhang, and Jianfei Cai. Auto-encoding scene graphs for image captioning. In CVPR, 2019. 2 +[73] Ting Yao, Yingwei Pan, Yehao Li, and Tao Mei. Exploring visual relationship for image captioning. In ECCV, 2018. 2 +[74] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? arXiv preprint arXiv:1411.1792, 2014. 1 +[75] L Yu, W Zhang, J Wang, and Y Yu. Seqgan: Sequence generative adversarial nets with policy gradient. arxiv e-prints, page. AAAI, 2017. 3 +[76] Pengchuan Zhang, Xiujun Li, Xiaowei Hu, Jianwei Yang, Lei Zhang, Lijuan Wang, Yejin Choi, and Jianfeng Gao. Vinvl: Revisiting visual representations in vision-language models. In CVPR, 2021. 1, 2, 5 +[77] Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593, 2019. 3 \ No newline at end of file diff --git a/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/images.zip b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..414a00259a704bf7e312c43ea3ca81d839ae6d34 --- /dev/null +++ b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59ecd65986d664cf9821548a15c3ecd33ab0d7ee92afbcf8e1a0631407f6f197 +size 505986 diff --git a/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/layout.json b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9530784c83c4154d3b579a9b1f4fcced802269ba --- /dev/null +++ b/zerocapzeroshotimagetotextgenerationforvisualsemanticarithmetic/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eb48f51506c768043b28bf689e6390b22d65196b08890d056914e5d2e8890c6 +size 468406 diff --git a/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_content_list.json b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0b2e376dbea65ff6e6cde4ff430a17517e454dc8 --- /dev/null +++ b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1f80dbaccc68463018c7f8e800fc0c085fe3c3b3175738c7707bb9e075b0013 +size 83074 diff --git a/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_model.json b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f1c179676a3ec9299151963b4fee703154e1b902 --- /dev/null +++ b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:655eb2837c2b73d31ca00b221063899b3576875ab2bf151ec79ab600b16f365c +size 104803 diff --git a/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_origin.pdf b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c6f876f26cd05d33cf9c6b979bd64e5273aeb205 --- /dev/null +++ b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/9738ecd0-bb15-48a4-8232-afc5db0b57c1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:700ef9f2680207b8b31cf583e4c0bd5d3ef0aa36d7c6c229846086c5a9797a4a +size 862641 diff --git a/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/full.md b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1752d2ccace423b3f56a0fe521f5761159ed1dde --- /dev/null +++ b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/full.md @@ -0,0 +1,298 @@ +# Zero Experience Required: Plug & Play Modular Transfer Learning for Semantic Visual Navigation + +Ziad Al-Halah1 Santhosh K. Ramakrishnan1,2 Kristen Grauman1,2 +1The University of Texas at Austin 2Meta AI + +ziadlh1h@gmail.com, srama@cs.utexas.edu, grauman@cs.utexas.edu + +# Abstract + +In reinforcement learning for visual navigation, it is common to develop a model for each new task, and train that model from scratch with task-specific interactions in 3D environments. However, this process is expensive; massive amounts of interactions are needed for the model to generalize well. Moreover, this process is repeated whenever there is a change in the task type or the goal modality. We present a unified approach to visual navigation using a novel modular transfer learning model. Our model can effectively leverage its experience from one source task and apply it to multiple target tasks (e.g., ObjectNav, RoomNav, ViewNav) with various goal modalities (e.g., image, sketch, audio, label). Furthermore, our model enables zero-shot experience learning, whereby it can solve the target tasks without receiving any task-specific interactive training. Our experiments on multiple photorealistic datasets and challenging tasks show that our approach learns faster, generalizes better, and outperforms SoTA models by a significant margin. Project page: https://vision.cs.utexas.edu/projects/zsel/ + +# 1. Introduction + +In visual navigation, an agent must intelligently move around in an unfamiliar environment to reach a goal, using its egocentric camera to avoid obstacles and decide where to go next. As a fundamental research problem in embodied AI, visual navigation has many potential applications—such as service robots in the home or workplace, mobile search and rescue robots, assistive technology for the visually impaired, and augmented reality systems to help people navigate or find objects. + +Recent work in computer vision explores visual navigation from many different fronts. In PointNav, an agent is asked to go to a specific position in an unmapped environment (e.g., go to $(x,y))$ [6,56,57]. In ObjectNav, the agent must find an object by name (e.g., go to the nearest tele + +![](images/ca49cccb1034e3352971dd51e4ebefe244a5e768edd606d478dd0a441151a4e4.jpg) +Figure 1. Our novel modular transfer learning approach for semantic visual navigation learns a general purpose semantic search policy by finding image views sampled randomly in the environment (top). Then, this experience is leveraged to search for previously unseen types of goals and search tasks (bottom). Our approach enables zero-shot experience learning (i.e., perform the target task without receiving any new experiences) and it adapts its policy much faster using fewer target-specific interactions. + +phone) [6,9]. In RoomNav, the agent must find a room (e.g., go to the kitchen) [49,56,67]. In AudioNav, the agent must find a sounding target (e.g., find the ringing phone) [16,28]. In ImageNav, the agent must go to where a given photo was taken [14, 55, 75]. Each case presents a distinct goal to the agent. Accordingly, researchers have pursued task-specific models to treat each one, typically training policies with deep reinforcement learning (RL). + +Despite exciting advances, learning task-specific navigation policies has inherent limitations. Training embodied agents from scratch for each new task and relying on special-purpose architectures and priors (e.g., room layout maps for RoomNav, object co-occurrence priors for ObjectNav, directional cues for AudioNav, etc.) requires repeated access to training environments for gathering new agent ex + +experience in the context of each task, greatly hindering sample efficiency. Even with today's fast simulators and photorealistic scanned environments [12, 57, 68], this typically amounts to days and weeks of computation on a small army of GPU servers to train a single policy. Moreover, by tackling each variant in isolation, agents fail to capture what is common across the tasks. Finally, some tasks require manual annotations such as object labels in 3D space, which naturally limits how extensively they can be trained. + +In this work, we challenge the assumption that distinct navigation tasks require distinct policies. Intuitively, finding a good policy for one navigation task should help with the rest. For example, if we know how to find a microwave, then finding a kitchen should be easy too; if we know how to find an object by name, then finding it based on a hand-drawn sketch—or the sounds it emits—should be possible too. In short, it should be beneficial to learn one navigation task and then apply the accumulated experience to many. + +To that end, we propose a modular transfer learning approach for semantic visual navigation that enables zero-shot experience learning. See Figure 1. First, we develop a general-purpose semantic search policy. Specifically, using a novel reward and task augmentation strategy, we train a source policy for the image-goal task, where the agent receives a picture taken at some unknown camera pose somewhere in the environment, and must travel to find it. Next, we develop a joint goal embedding that is trained offline (i.e., no interactive agent experience) to relate various target goal types to image-goals. Finally, we address target downstream tasks either by zero-shot transfer with no new agent experience, or by fine-tuning with a limited amount of agent experience on the target task. + +Zero-shot learning traditionally focuses on supervised tasks such as image recognition [5, 38, 69], where models forgo using labeled samples for the new class. Instead, the proposed zero-shot experience learning (ZSEL) focuses on reinforcement learning tasks, where models forgo using interactions in the physical environment for the new navigation task. ZSEL is important for lifelong learning, where an agent will face novel tasks once it is deployed and must solve them while using no or few training episodes. + +Using hundreds of multi-room environments from Matterport3D [12], Gibson [68], and HM3D [52], we demonstrate our approach for four challenging tasks and goals expressed with five different modalities—images, category names, audio, hand-drawn sketches, and edgemaps. Our ImageNav results advance the state of the art, and our modular transfer approach outperforms the best existing methods of transfer based on self-supervision, supervision, and RL. Finally, our ZSEL performance on 5 semantic navigation tasks is equivalent to 507 million interactions required by task-specific policies learned from scratch. + +# 2. Related Work + +Visual Navigation Traditional methods in visual navigation often rely on mapping the 3D space and then planning their movements [8, 27, 63]. However, fueled by fast simulators [35, 57] and large-scale photorealistic datasets [12, 16, 52, 68] there have been great advances in learning-based navigation approaches [14, 17, 50] leading to a near-perfect agent for tasks like point-goal navigation [65]. In this work, we consider semantic visual navigation, where the agent is given a semantic description of the goal (e.g., object-goal [6, 9, 51], image-goal [14, 75], room-goal [67], audio-goal [15, 16]) but, unlike point-goal, the goal location is unknown. Hence, the agent needs to leverage learned scene priors to explore the environment efficiently to find and navigate to the target. Current approaches tackle each navigation task separately: a new model is trained for each task and each target modality [9, 14, 15, 67], which has the disadvantages discussed above. In contrast, we propose a unified approach to semantic visual navigation, in which a single trained policy can handle diverse tasks and goal modalities. + +Transfer Learning in Navigation Pre-learning a representation from large-scale image datasets [21, 43] and transferring it to a downstream task proved to be very successful for visual recognition [10, 18, 19, 29, 73]. We observe a similar trend in embodied navigation, where pre-learning good representations of the 3D environment [47, 48, 53, 70, 74] or primitive skills [25, 30, 42, 65] help the agent to learn a downstream task better while using fewer training samples. Recent methods focus on pre-training the observation encoder of the agent, either in a supervised [30, 39, 58, 62, 72] or self-supervised [19, 22] fashion. While this leads to improved performance on the target tasks, a new policy is still learned from scratch for each task, resulting in low sample efficiency. In contrast, our approach enables a full transfer paradigm where all the agent's components can be reused efficiently on the downstream tasks. Prior work shows that transferring a strong point-goal policy to non-goal driven tasks (e.g., flee and exploration) can lead to better performance [65]. Differently, we propose to learn and transfer a general-purpose semantic search policy. Our policy can find semantic goals presented in different modalities for a diverse set of goal-driven navigation tasks. + +Sharing knowledge between multiple tasks can be achieved in a multi-task learning setup [13, 64] where all tasks are learned jointly in a supervised manner, or via meta-RL [26, 66] where a meta policy learned from a distribution of tasks is finetuned on the target. Unlike these methods, our policy is learned from one task that does not require manual annotations, and it can be transferred in a zero-shot setup where the policy does not receive any interactive training on the target. + +Zero-Shot Learning Zero-shot learning (ZSL) can be seen as an extreme case of transfer learning where the + +target task has zero training samples. Prior ZSL work focuses on supervised learning, e.g., image classification [4, 5, 24, 38, 40, 54, 69]. In contrast, the proposed zero-shot experience learning (ZSEL) setup learns behaviors rather than classifiers; the policy learned on a source task needs to perform a set of target tasks, without receiving any new interactive experiences on the target. Further, unlike [60] where a world model for synthetic environments is constructed, and control policies are trained on 'imagined' episodes, we consider a model-free approach and a ZSEL setup in realistic environments where the policy receives zero target interactions (i.e., neither imagined nor real). To our knowledge, we are first to propose a ZSEL model for embodied navigation. + +# 3. Plug & Play Modular Transfer Learning + +We introduce a novel transfer learning approach for visual navigation. Our model has three main components: 1) we start by learning a semantic search policy for image goals using a novel reward and task augmentation (Fig. 2a); 2) we leverage the image goal encoder to learn a joint goal embedding space for the different goal modalities (Fig. 2b); and finally, 3) we transfer the learned agent modules to downstream tasks in a plug and play fashion (Fig. 2c). + +In the following, we consider an agent with 3 main modules: 1) an observation encoder $(f_{O})$ that encodes the received observations $o_{t}$ from the environment; 2) a goal encoder $(f_{G})$ that encodes the task's goal; 3) a policy $(\pi)$ that uses the output of $f_{O}$ and $f_{G}$ to navigate and find the goal. + +# 3.1. Semantic Search Policy for Image Goals + +The policy is a key component in the modern end-to-end visual navigation agent. It guides the agent towards solving a task given a set of sequential observations and a goal. Such policies are often learned with reinforcement learning (RL) where the agent interacts with its environment (by moving about) and attempts to solve the task in a trial and error fashion. If the agent succeeds in its attempt, then it receives a reward to encourage such behavior from the policy in the future. + +A main challenge for this learning paradigm is that the policy requires a large number of interactions with the environment in order to find a proper way to solve the task. This usually amounts to tens and hundreds of millions [44, 45] and up to billions [65] of interactions, and correspondingly days or weeks of GPU cluster time. Furthermore, for each new task a policy is typically learned from scratch, which further increases the learning cost substantially. + +We propose to learn a general-purpose semantic search policy that can be transferred and perform well on a variety of navigation tasks. Our idea is to learn such a policy with the image-goal task, where the agent receives a picture + +taken at some unknown camera pose somewhere in the environment, and must travel to find it. Our choice of imagegoal for the source policy is significant. It requires no manual annotations, and image-goals can be sampled freely anywhere in a training environment. As a result, the policy can be trained on large-scale experience (e.g., collected from a fleet of robots deployed in various environments) which can improve its generalization to new tasks and domains. Furthermore, an image-goal encourages the learned policy to capture semantic priors for finding things in a 3D space. For example, by seeking images of couches and chairs, the agent learns implicitly to leverage these objects' context and the room layout in order to find the image views effectively. + +Task Definition In an episode of image goal navigation, the agent starts from a random position $p_0$ in an unexplored scene, and it is tasked to find a certain location $p_G$ given an image $I_G$ sampled with the camera at $p_G$ . The agent receives an RGB observation $o_t$ at each step $t$ and needs to perform the best sequence of actions $a_t \in \{\text{move_forward}, \text{turn_left}, \text{turn_right}, \text{stop}\}$ that would bring it to the goal within a maximum number of steps $S$ . Unlike the common point-goal task where the goal location is known [6], here $p_G$ is unknown, and the agent needs to leverage the learned semantic priors to search and find where $I_G$ could have been sampled from. + +Our setup differs from recent methods in ImageNav where panoramic $360^{\circ}$ FoV sensors are required [14,37,45]. Here, we consider a standard $90^{\circ}$ FoV for the agent's view [75]. While having a complete FoV sensor simplifies localization, this strong requirement is often not available in common robotic platforms [1-3] and leads to high computational cost. This reduces the scalability and adoption of such methods by diverse agent configurations. In addition, our task setup allows our model to transfer to a diverse set of semantic navigation tasks in a plug and play fashion without the need for modifications to the target tasks (for which the literature does not use panoramic images). + +View Reward It is common to use the reduced distance to the goal to reward the agent for getting closer to $p_{G}$ in addition to the success reward of finding and stopping within a small distance $d_{s}$ of $p_{G}$ . However, while this reward proves to be quite successful for navigation tasks like point-goal, we argue it is less suited for semantic goals like images. Since the reward does not carry a signal about the semantic goal itself, the agent may fail or require much more experience in order to capture the implicit relation between the goal and the distance to goal reward (DTG). For example, if the goal shows an image of an oven, the agent may get close and stop nearby while looking at a book on the counter, and nonetheless receive a full success reward. This may lead to capturing trivial or incoherent associations between the goal and the agent's observations. + +![](images/90ad44fb07a20e33dc098d5d810c9b682ef155f1a4174a1650aa22f56c4b7a72.jpg) +Figure 2. Our approach (a) starts by learning a semantic search policy using a novel reward function for finding random image views in a 3D scene. Then, (b) we learn a joint goal embedding space for various goal modalities where the learning is guided by the image-goal encoder. Finally, (c) we transfer our model in a plug & play fashion to a new target task where it can perform out of the box (zero-shot) or it is finetuned using few experiences on the target task. + +![](images/9b88ac434a5b7601a8472ee8a3c1b78367c5f0069a3e24b936ae68905b133efb.jpg) + +![](images/389171aa91182e5fd3403a9fbf3af19587fe856d60309217ebd73a34e41f06c5.jpg) + +In order to encourage the agent to leverage the information provided in the goal description $I_{G}$ and effectively capture useful semantic priors that may help it in finding $p_{G}$ , we propose a new reward function that rewards the agent for looking at $I_{G}$ when getting closer to $p_{G}$ , so it can better draw the association between its $o_{t}$ and $I_{G}$ . Specifically, we define the reward function at step $t$ as: + +$$ +r _ {t} = r _ {d} \left(d _ {t}, d _ {t - 1}\right) + \left[ d _ {t} \leq d _ {s} \right] r _ {\alpha} \left(\alpha_ {t}, \alpha_ {t - 1}\right) - \gamma , \tag {1} +$$ + +where $r_d$ is the reduced distance to the goal from the current position relative to the previous one, $r_\alpha$ is the reduced angle in radians to the goal view from the current view relative to the previous one, $[\cdot]$ is the indicator function, and $\gamma = 0.01$ is a slack reward to encourage efficiency. Note, this reward will encourage the agent to look at $I_G$ when it gets near the goal, since it is rewarded to reduce the angle between its current view $v_t$ and the view of the goal $v_G$ (see Fig. 2a). Finally, the agent receives a maximum success reward of 10 if it reaches the goal and stops within a distance of $d_s$ from $p_G$ and an angle $\alpha_s$ from $v_G$ : + +$$ +R _ {s} = 5 \times \left(\left[ d _ {t} \leq d _ {s} \right] + \left[ d _ {t} \leq d _ {s} \text {a n d} \alpha_ {t} \leq \alpha_ {s} \right]\right). \tag {2} +$$ + +We set $d_{s} = 1$ m (the success distance of the task) and $\alpha_{s} = 25^{\circ}$ to allow for a good overlap between $v_{t}$ and $v_{G}$ and enable the agent to draw the association between its observation $o_{t}$ and the goal $I_{G}$ . + +View Augmentation In addition to the view reward introduced above, we also provide a simple task augmentation method to promote generalization by increasing the diversity of goals presented to the agent. For each training episode, rather than having a fixed $I_{G}$ , we sample a view from a random angle at location $p_{G}$ and provide the agent with the associated $I_{G}$ from the sampled view as the goal descriptor. This has a regularization effect on the model learning; the agent will be less likely to overfit due to the changing goal description each time the agent experiences a given goal. Furthermore, with the start $p_{0}$ and the goal lo + +cation $p_{G}$ fixed in a training episode but not $I_{G}$ , this encourages the agent to capture implicit spatial semantic priors of things that usually appear near each other as viewed from $p_{G}$ . For example, the agent would learn that an image of chairs as seen when peeking from the door is likely to be at the same location of the current image goal that is showing a dining table, since the agent experienced the same episode before but with $I_{G}$ showing the chairs, hence prompting the agent to explore the dining room. + +Policy Training We train our policy using reinforcement learning (RL), Fig. 2a. For each training episode, we sample an image-goal $I_G$ from $p_G$ . The agent encodes its current observation $o_t$ (an RGB image) with $f_O$ and the image-goal with $f_G^I$ and passes these encodings to the policy $\pi$ . The policy further encodes these information along with the history of observations so far to produce a state embedding $s_t$ . An actor-critic network leverages $s_t$ to predict state value $c_t$ and the agent's next action $a_t$ . Based on the agent's state in the environment, it receives a reward (Eq. 1 and Eq. 2). The model is trained end-to-end using PPO [59]. + +# 3.2. Joint Goal Embedding Learning + +Having learned the semantic search policy, we can now transfer our model to downstream tasks. Specifically, we consider downstream navigation tasks where the goals are object categories (ObjectNav [9]), room types (RoomNav [67]), or view encodings (ViewNav), and they may be expressed by the modalities of a label name, a sketch, an audio clip, or an edgemap; see Sec. 4.2. A key advantage of learning the semantic search policy using RGB image-goals is that these goals contain rich information about the target visual appearance and context. Furthermore, in order to solve the image-goal navigation task, our model learns to encode these visual cues via a compact dense representation produced by the image-goal encoder $f_{G}^{I}$ . + +Our idea is to leverage $f_{G}^{I}$ to learn a joint embedding space of different goal modalities for the various tasks. In other words, we upgrade the image-goal embedding space + +to be a joint goal embedding space to draw associations between the images and the different goal modalities like sketches, category names, and audio (Fig. 2b). This step can be carried out quite efficiently and using an offline dataset. For example, to learn about object-goals that are represented with a label (e.g., a chair) we only need to annotate a set of images with chairs. Then we train an object-goal encoder to produce an embedding similar to the image-goal encoder for compatible image-label pairs. In our experiments, we use offline datasets of size $20\mathrm{K}$ images or less in which the "annotations" are actually automatic object detections. This is several orders of magnitude smaller than the amount of interactions usually needed to train a target-specific policy (tens to hundreds of millions) [44, 71]. + +Formally, let $D = \{(x_i, g_i)\}$ be a set of images $x_i$ and their associated goals $g_i$ , where $g_i$ can be of any goal modality (e.g., audio, sketch, image, category name, edgemap) depending on the downstream task specifications. We learn a joint goal embedding space by minimizing the loss: + +$$ +\mathcal {L} \left(x _ {i}, g _ {i}\right) = \left\{ \begin{array}{l l} 1 - \cos \left(f _ {G} ^ {I} \left(x _ {i}\right), f _ {G} ^ {M} \left(g _ {i}\right)\right), & \text {i f} y _ {i} = + 1 \\ \max \left(0, \cos \left(f _ {G} ^ {I} \left(x _ {i}\right), f _ {G} ^ {M} \left(g _ {i}\right)\right)\right), & \text {i f} y _ {i} = - 1 \end{array} \right. \tag {3} +$$ + +where $f_{G}^{M}(\cdot)$ is the new goal encoder of modality $M$ , $\cos(\cdot, \cdot)$ is the cosine similarity between two embeddings, and $y_{i}$ indicates whether the pair $(x_{i}, g_{i})$ is similar or not, as derived from the offline annotations (e.g., chair and a picture of a chair are similar; the audio of TV and a picture of the TV are similar). + +During goal embedding learning, we freeze $f_{G}^{I}$ and learn $f_{G}^{M}$ using Eq. 3 such that $f_{G}^{M}$ learns to encode its goal similar to the corresponding image embedding from $f_{G}^{I}$ . + +# 3.3. Transfer and Zero-Shot Experience Learning + +Having learned the semantic search policy and the joint goal embedding as described above, now we can transfer our model to downstream navigation tasks (Fig. 2c). For that, we only need to replace $f_{G}^{I}$ with the suitable goal encoder for the task, such that: + +$$ +a _ {t} \sim \pi \left(f _ {O} ^ {I} \left(o _ {t}\right), f _ {G} ^ {M} (g)\right). \tag {4} +$$ + +Our plug and play modular transfer approach has multiple advantages. Since all modules are compatible with each other, this means the model can perform the target task out of the box, i.e., it does not require any further task-specific interactions to solve the target task. We refer to this setup as zero-shot experience learning (ZSEL). Training policies with modern RL frameworks is the most expensive part of the model learning, and with ZSEL we manage to circumvent this requirement. Furthermore, due to the modular nature of our approach, it is easy to generalize to a wide variety of tasks and goal modalities. For a new task, only the respective goal encoder is trained with an offline dataset then integrated in the full model in a plug&play fashion. + +Finally, our model can be easily finetuned for the downstream task to capture any additional cues specific to the task to reach a better performance. Unlike the common approach in the literature where only $f_{O}$ is pretrained and transferred [22, 30, 58, 74], here the full model is transferred to the target task. This leads to higher initial performance, faster convergence, and better overall performance, as we will show in Sec. 4. + +# 4. Evaluation + +In the following experiments, we first evaluate our semantic search policy performance in the source task (image-goal navigation) compared to state-of-the-art methods (Sec. 4.1); then we show how our model transfers to a diverse set of downstream navigation tasks (Sec. 4.2). + +Shared Implementation Setup For fair comparisons, we adopt the same architecture and training pipeline for our model and all RL baselines, and we note any deviations from this shared setup in the respective sections. We use a ResNet9 [32, 61] for $f_{O}$ and a GRU [20] of 2 layers and embedding size of 128 for $\pi$ . For goal encoders $f_{G}$ , we use a ResNet9 to encode image-, sketch-, edgemap- and audiogoal modalities. We transform an audio clip to a spectrogram before encoding it by $f_{G}$ . If the goal is a category name, we use a 2 layer MLP for $f_{G}$ . We train the policy using DD-PPO [65] and allocate the same computation resources for all models. We use input augmentation (random cropping and color-jitter) during training to improve the stability and performance of the RL methods [36, 41, 45]. See Supp for more details. We adopt end-to-end RNN-based RL since it is a common [22, 30, 45, 58, 65, 74, 75], generic architecture, does not require hand-crafted modules, shows good performance on real-data [11, 46], and learned in sim has the potential to generalize well to real [34]. However, our contributions are orthogonal to the RL architecture used. + +Agent Configuration The action space of the agent consists of move-forward by $25\mathrm{cm}$ , turn-left and right by $30^{\circ}$ , and stop. The agent uses only RGB observations of $128 \times 128$ resolution and $90^{\circ}$ FoV sensor. + +# 4.1. Image-Goal Navigation + +Task Setup We adopt the image-goal task as defined in Sec. 3.1. We set $S = 1000$ and $d_{s} = 1 \mathrm{~m}$ from $p_{G}$ . + +Datasets We use the Habitat simulator [57] and the Gibson [68] environments to train our model. We use the dataset from [45]. The training split contains 9K episodes sampled from each of the 72 training scenes. Following the setup from [45], all RL models are trained for 50K updates (500 million frames) on the training split. The test split has 4.2K episodes sampled uniformly from 14 disjoint (unseen) scenes. For direct comparison with [31], we also test our model on a second split ("split B") provided by [31] + +
ModelSplitSucc.SPL
Imitation LearningA9.99.5
Zhu et al. [75]A19.614.5
Mezghani et al. [45] w/ 90° FoVA9.06.0
DTG-RLA22.618.0
OursA29.221.6
Ours (View Aug. Only)A22.018.8
Ours (View Reward Only)A24.417.3
Hahn et al. [31]B24.012.4
OursB33.023.6
Hahn et al. [31] w/ noisy actuationB20.38.8
Ours w/ noisy actuationB25.917.6
+ +that has 3K episodes and the same structure as the test split from [45] ("split A"). + +Baselines We compare our image-goal model to the following baselines and SoTA methods: 1) Imitation Learning: This model's policy is trained using supervised learning to predict the ground truth best action on the shortest path to the goal given its current observation. 2) Zhu et al. [75]: The model uses a ResNet50 shared between $f_{O}$ and $f_{G}$ , pretrained on ImageNet and frozen. 3) Mezghani et al. [45]: This is the SoTA panoramic image-goal navigation model. It uses a ResNet18 for $f_{O}$ and $f_{G}$ , a 2 layer LSTM [33] for $\pi$ , and a specialized episodic memory. We adapt this model to our $90^{\circ}$ FoV for $o_{t}$ and $I_{G}$ and train it using the author's code. 4) DTG-RL: This model uses the shared architecture along with the common distance to goal dense reward for training. 5) Hahn et al. [31]: This model learns from a passive dataset of videos collected from the Gibson training scenes and uses a customized architecture based on topological maps (see [31] for details). + +Results and Analysis Table 1 reports the overall performance in terms of average success rate (Succ) and Success weighted by inverse Path Length (SPL) over 3 random seeds. Our model outperforms strong baselines and the SoTA in image-goal navigation by a significant margin. In split A, our model gains $+6.6\%$ in Succ and $+2.6\%$ in SPL over the best baseline. The method designed for panoramic sensors [45] tends to underperform in this challenging setting. We see a drop in Succ from $69\%$ [45] to $9\%$ when using $360^{\circ}$ and $90^{\circ}$ FoV, respectively, since such methods rely heavily on the $360^{\circ}$ FoV for accurate localization. In split B, our model gains $+9\%$ in Succ and $+11.2\%$ in SPL over [31]. It is important to note that the model from [31] uses a much more complete sensor configuration than our method (pose sensor, RGB and Depth sensors of $480 \times 640$ resolution, and a $120^{\circ}$ FoV) and it is trained offline from passive videos sampled from the simulator. Nonetheless, our model outperforms [31] by a large margin, showing that interactive learning of end-to-end RL models still has an advantage over heuristic and passive approaches. + +Table 1. Image-goal navigation results on Gibson [68]. + +
ModelMP3D [12]HM3D [52]
Succ.SPLSucc.SPL
Imitation Learning5.35.12.01.9
Zhu et al. [75]9.87.94.42.7
Mezghani et al. [45] w/ 90° FoV6.93.93.51.9
DTG-RL11.09.05.53.7
Hahn et al. [31]9.35.26.64.3
Ours14.610.89.66.3
+ +Table 2. Image-goal navigation results on MP3D and HM3D in a cross-domain evaluation setup. + +Ablations To validate our contributions from Sec. 3.1, we test our model performance when removing the view reward or the view augmentation. As shown in Table 1, we see a degradation in performance whenever one of these components are removed, and the largest gain is realized when they work in tandem. Additionally, we test our model under noisy actuation. While methods in split A do not provide results under noisy conditions, [31] does. Following the setup from [31], we use the noise model from [14] that simulates actions learned from a Locobot [3]. Our model shows robustness to noise and maintains its advantage over the baselines (Table 1 bottom). + +Cross-Domain Generalization Next we test the models trained on Gibson on datasets from Matterport3D (MP3D) [12] and HM3D [52]. In addition to the visual domain gap between these datasets, MP3D has more complex and larger scenes than Gibson, and HM3D has high diversity in terms of scene types. This poses a very challenging cross-domain evaluation setting. The test split from each dataset has in total 3K episodes sampled uniformly from 100 and 18 scenes for HM3D and MP3D, respectively. Table 2 shows the results. Overall, we see a drop in performance for all models in this challenging setting, especially for HM3D since there is high diversity in the 100 test scenes. Nonetheless, our model outperforms all baselines on both datasets, showing that our contributions lead to better generalization by encouraging the agent to pay closer attention to the semantic information provided by the goal. + +# 4.2. Transfer to Downstream Tasks + +Tasks We consider 3 target tasks and 4 goal modalities: 1) ObjectNav: The agent is asked to find the nearest instance of one of 6 categories (bed, chair, couch, potted plant, toilet, and tv) specified by the goal. We extend the standard ObjectNav specification [9] where the goal is given by its label (e.g., find a chair) to goals specified by a hand drawn sketches of the category, or audio produced by the object (e.g., sounds from TV). In the beginning of an episode, the agent gets either a label, a sketch, or a 4 second audio clip from a random category. An episode is successful if the agent stops within $1\mathrm{m}$ of the goal while using less than $S = 500$ steps. For sketches, we use images of the object categories from the Sketch dataset [23]. For audio + +
ModelSource TaskObjectNav LabelSketch AudioRoomNav LabelViewNav Edgemap
Task Expert-8.06.76.68.90.8
MoCo v2 [19] (Gib.)SSL10.59.98.89.31.0
MoCo v2 [19] (IMN)SSL7.812.711.59.71.3
Visual Priors [58]SL9.39.99.113.10.6
Zhou et al. [74]SL15.67.69.610.30.7
CRL [22]RL1.90.51.01.20.0
SplitNet [30]RL9.06.58.87.70.6
DD-PPO (PN) [65]RL13.913.612.913.91.7
Ours (ZSEL)RL11.311.44.411.25.4
OursRL21.922.018.027.97.4
+ +Table 3. Transfer learning success rate on downstream semantic navigation tasks. + +clips we sample sounds from the audio dataset in [15] and the audio heard by the agent is scaled by the distance to the goal (i.e., further away goals have fainter sounds). While for label goals, the category name is the same during training and testing, for audio and sketches, the goal instances used during training are disjoint from those used in testing. This poses another challenging dimension for the agent to generalize across in addition to the unseen test scenes. + +2) RoomNav: The agent is tasked with finding the nearest room of 6 types: living-room, kitchen, bedroom, office, bathroom, and dining-room. The goal is a label (find an office) and the episode is successful if the agent steps inside the room with the maximum episode length $S = 500$ [49]. +3) ViewNav: This task is similar to the image-goal navigation task considered above, except a different modality (an edgemap) represents the goal. This helps quantify the model performance in target tasks that are more aligned with the source task but with a substantially different goal modality. In each episode, the agent receives an edgemap from a random view in the scene and needs to find the goal and stops within $1\mathrm{m}$ to succeed. We set $S = 1000$ to give the agent enough time to succeed in this challenging task. + +Datasets For all target tasks, we use 24 train / 5 test scenes from the Gibson [68] tiny set that has semantic annotations [7]. These scenes are disjoint from those used in Sec. 4.1. We train all methods for up to 20 million steps on the target tasks and report evaluation performance averaged over 3 random seeds. See Supp for details. + +To train the goal embedding for the modalities in ObjectNav and RoomNav, we sample 14K images of objects and 20K of rooms from the training scenes. We use the object labels generated by a model from [7] to draw the associations between the images and each modality. For ViewNav, we sample 170K views from the training scenes and generate their edgemaps using an edge texture model [73]. The number of samples for the offline datasest is driven by the available instances of each goal type in the training scenes. While there is a finite number of rooms and objects, we can sample views freely from any location in a scene. + +![](images/a53d2ec832653f7c72e915b2c1a3ae0d908769c23f1e7d7f4583c065bbf026d6.jpg) +Figure 3. Transfer learning and ZSEL performance on downstream navigation tasks. See Supp for all tasks and modalities. + +![](images/f3dc0def2ef66ac1b13e85f14da8e1953fb34b7bf69623443d58aca9394c24b7.jpg) + +![](images/31e102e42fbf9562f197da2dc4549488b584a32ce64316f155d4c3cffbd41be2.jpg) + +Baselines We compare our model to a set of baselines and SoTA models in transfer learning: 1) Task Expert which learns from scratch on the downstream task. 2) MoCo v2 [19] initializes $f_{O}$ using MoCo training on ImageNet (IMN) or on a set of images randomly sampled from the Gibson (Gib.) training scenes. 3) CRL [22] pretrains $f_{O}$ (ResNet50) using a combination of curiosity-based exploration and self-supervised learning. We initialize $f_{O}$ from a pretrained model provided by the authors. 4) Visual Prirors [58] uses a set of 4 ResNet50s pretrained encoders as $f_{O}$ . The encoders are trained in a supervised manner to predict 4 features (e.g. semantic segmentation, surface normal) that provide maximum coverage for downstream navigation tasks [58]. 5) Zhou et al. [74] transfers 2 pretrained ResNet50s for depth prediction and semantic segmentation; however, unlike [58], these are used with an RGB encoder (ResNet9) trained from scratch. 6) SplitNet [30] pretrains $f_{O}$ (customized CNN) using a mix of 6 auxiliary tasks (motion and visual tasks) and point-goal navigation. We initialize $f_{O}$ from a pretrained model provided by the authors. 7) DD-PPO (PN) [65] pretrains the model for point-goal navigation (PN) and both $f_{O}$ and $\pi$ are transferred. + +Transfer Learning Table 3 shows the results. Our approach outperforms all baselines by a significant margin. Interestingly, the self-supervised methods [19] reach a competitive performance to those that rely on the availability of dense annotations (like semantic segmentation and ground truth depth) for supervised representation learning [58, 74]. Furthermore, methods that learn a curiosity-based representation (CRL [22]) or via auxiliary tasks and RL (SplitNet [30]) do not transfer as well as the SSL and SL methods. Additionally, compared to the strong DD-PPO [65] approach which was trained on the same data as our policy but for the PointNav task, our model achieves substantial gains in success rate (from $+5\%$ and up to $+14\%$ ) across all tasks. This indicates that our semantic search policy is much better suited to transfer to diverse downstream tasks compared to the PointNav policy. Moreover, when looking at the test performance over the course of training for the best transfer methods compared to ours (Fig. 3), we notice that our approach has a much higher start and improves faster to better performance. Our model reaches the top performance of the best competitor up to $12.5 \times$ faster. + +![](images/77d2835814ac584750a21ef5d66eb471fdc8b72faff37a19bb407c097c5e2825.jpg) +Figure 4. Our model ablation for modular transfer (left) and scalability (right). + +![](images/ef07ec14f8e1cd6099a9ad60adf2cb5b4b4deebf4ae25e6efaf2b33e7eb33cda.jpg) + +Zero-Shot Experience Learning A unique feature of our approach is its ability to perform the downstream task without receiving any new experiences from it. Our model shows excellent performance under the challenging ZSEL setting. Our ZSEL model outperforms the Task Expert in 4 out 5 of the tasks despite receiving zero new experience on the target, and even after training the Task Expert for up to 20 million steps (Ours-ZSEL in Table 3). + +In addition, we see in Fig. 3 that the majority of transfer learning models struggle to reach our ZSEL performance. Note that our model does not have any advantages in terms of architecture, which is shared with the rest of the models. Thus, the high ZSEL performance is attributable to our modular transfer approach. In ObjectNav and RoomNav, the best competitor requires between 2 to 16 million steps to reach our ZSEL performance, and with the exception of ObjectNav-Audio the competitors show little improvement over that level. In ViewNav, we notice that none of the baselines are capable of reaching our ZSEL level. This can be attributed to the challenging goal modality where estimating distances for successful stopping is difficult, and to the close proximity of this task to the source ImageNav task that our semantic policy is most familiar with. + +Modular Transfer Ablation Fig. 4 (left) shows a modular ablation of our approach on the ObjectNav-Label task. Transferring individual modules separately has mixed impact on performance. While transferring $f_{G}$ and $\pi$ only does not improve over the 'No Transfer' case, $f_{O}$ leads to positive transfer effect. This is expected since in this model $f_{O}$ is a deep CNN with the largest portion of parameters. Having a good initialization of this component is beneficial. Nonetheless, when combining the modules together with our plug and play modular approach we see substantial gains. Our full model demonstrates the best performance and enables ZSEL, thus validating our contributions. + +Scalability We evaluate our model's ability to scale in terms of experience gathered on the source task. We find a strong correlation between the experience gathered on the source task and the ZSEL performance on downstream ones. As our semantic search policy receives more experience on the source task (ImageNav), its ZSEL performance on the target task gets better (Fig. 4 right). This is impor + +![](images/9e00a0aabbb60ed0d18f52a264c8d8f5a2a33ded1c09c5908356dd826fd5eee5.jpg) +Figure 5. Long-term Task Expert training. See Supp for all tasks. + +![](images/be909e0e97a3a11a84b4856c2c2f319e360194a5646aecf36a16ba3f1e361b29.jpg) + +![](images/9843d76287c41b3c5c5b2d81ac706a69ede6ffa8ce2d91d7b640e2609c1d807c.jpg) + +tant since our source task requires no annotations and can be easily scaled to more scenes and large datasets. For an analysis of our model in terms of the used sensors, see Supp. + +Long-Term Task Expert Training We saw above that our model scales well and its transfer improves when more experience is gathered on the source task. However, does a task expert become competitive if it simply gets longer training on the target task? How long does that model take to catch up with our approach? To find out, we train the Task Expert on each of the target tasks for up to 500M steps. Fig. 5 shows the results. The Task Expert requires on average more than 22M steps on ObjectNav and RoomNav, and up to 416M on ViewNav (in total 507M steps over the 5 tasks) to reach our ZSEL performance. It never reaches our model's top performance when our model is finetuned on the target task. Moreover, our model reaches the best performance of the Task Expert $34.7 \times$ faster. The Task Expert needs task-specific experience with task-specific annotations, which can be expensive and limits the available training data. In contrast, our model learns in the source task using more diverse goals that can be sampled randomly from the (unannotated) scene, thus scaling more effectively. + +Additional Results and Discussions Please see Supp for qualitative results, an analysis of failure cases, and a discussion of limitations and the societal impact of our approach. + +# 5. Conclusion + +We introduce a plug&play modular transfer learning approach that provides a unified model for a diverse set of semantic visual navigation tasks with different goal modalities. Our semantic search policy outperforms the SoTA in the source task of image-goal navigation, as well as the SoTA in transfer learning for visual navigation by a significant margin. Furthermore, our model is able to perform new tasks effectively with zero-shot experience—to our knowledge, a completely new functionality for visual navigation. This is a stepping stone for future work, especially for tasks with high-cost training data. Being able to do ZSEL and learn from few experiences is a crucial skill for an agent in open-world and lifelong learning settings. + +Acknowledgements: UT Austin is supported in part by DARPA L2M, the UT Austin IFML NSF AI Institute, and the FRL Cog Sci Consortium. K.G is paid as a Research Scientist by Meta AI. Thanks to Lina Mezghani for providing access to data and code. + +# References + +[1] Hello Robot. https://hello-robot.com/. [Online]. 3 +[2] TurtleBot. https://www.turtlebot.com/. [Online]. 3 +[3] Locobot: An open source low cost robot. http://www.locobot.org, 2019. [Online]. 3, 6 +[4] Ziad Al-Halah and Rainer Stiefelhagen. Automatic Discovery, Association Estimation and Learning of Semantic Attributes for a Thousand Categories. In CVPR, 2017. 3 +[5] Ziad Al-Halah, Makarand Tapaswi, and Rainer Stiefelhagen. Recovering the Missing Link: Predicting Class-Attribute Associations for Unsupervised Zero-Shot Learning. In CVPR, 2016. 2, 3 +[6] Peter Anderson, Angel Chang, Devendra Singh Chaplot, Alexey Dosovitskiy, Saurabh Gupta, Vladlen Koltun, Jana Kosecka, Jitendra Malik, Roozbeh Mottaghi, Manolis Savva, et al. On evaluation of embodied navigation agents. arXiv preprint arXiv:1807.06757, 2018. 1, 2, 3 +[7] Iro Armeni, Zhi-Yang He, JunYoung Gwak, Amir R Zamir, Martin Fischer, Jitendra Malik, and Silvio Savarese. 3D Scene Graph: A Structure for Unified Semantics, 3D Space, and Camera. In ICCV, 2019. 7 +[8] Tim Bailey and Hugh Durrant-Whyte. Simultaneous localization and mapping (SLAM): Part II. IEEE Robotics & Automation Magazine, 13(3):108-117, 2006. 2 +[9] Dhruv Batra, Aaron Gokaslan, Aniruddha Kembhavi, Oleksandr Maksymets, Roozbeh Mottaghi, Manolis Savva, Alexander Toshev, and Erik Wijmans. Objectnav revisited: On evaluation of embodied agents navigating to objects. arXiv preprint arXiv:2006.13171, 2020. 1, 2, 4, 6 +[10] Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In NeurIPS, 2020. 2 +[11] M. Chancán and M. Milford. MVP: Unified Motion and Visual Self-Supervised Learning for Large-Scale Robotic Navigation. arXiv preprint arXiv:2003.00667, 2020. 5 +[12] Angel Chang, Angela Dai, Thomas Funkhouser, Maciej Halber, Matthias Niessner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3D: Learning from RGB-D Data in Indoor Environments. International Conference on 3D Vision (3DV), 2017. Matterport3D license available at http://kaldir.vc.in.tum.de/matterport/MP_TOS.pdf. 2, 6 +[13] Devendra Singh Chaplot, Lisa Lee, Ruslan Salakhutdinov, Devi Parikh, and Dhruv Batra. Embodied multimodal multitask learning. *IJCAI*, 2020. 2 +[14] Devendra Singh Chaplot, Ruslan Salakhutdinov, Abhinav Gupta, and Saurabh Gupta. Neural topological slam for visual navigation. In CVPR, 2020. 1, 2, 3, 6 +[15] Changan Chen, Ziad Al-Halah, and Kristen Grauman. Semantic Audio-Visual Navigation. In CVPR, 2021. 2, 7 +[16] Changan Chen, Unnat Jain, Carl Schissler, Sebastia Vicenc Amengual Gari, Ziad Al-Halah, Vamsi Ithapu, Philip W Robinson, and Kristen Grauman. SoundSpaces: Audio-Visual Navigation in 3D Environments. In ECCV, 2020. 1, 2 + +[17] Changan Chen, Sagnik Majumder, Ziad Al-Halah, Ruohan Gao, Santhosh K. Ramakrishnan, and Kristen Grauman. Learning to Set Waypoints for Audio-Visual Navigation. In ICLR, 2021. 2 +[18] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. 2 +[19] Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. 2, 7 +[20] Kyunghyun Cho, Bart Van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. In Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation (SSST-8), 2014. 5 +[21] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 2 +[22] Yilun Du, Chuang Gan, and Phillip Isola. Curious Representation Learning for Embodied Intelligence. In ICCV, 2021. 2, 5, 7 +[23] Mathias Eitz, James Hays, and Marc Alexa. How Do Humans Sketch Objects? ACM Trans. Graph. (Proc. SIGGRAPH), 31(4):44:1-44:10, 2012. 6 +[24] Mohamed Elhoseiny, Babak Saleh, and Ahmed Elgammal. Write a classifier: Zero-shot learning using purely textual descriptions. In ICCV, 2013. 3 +[25] Benjamin Eysenbach, Abhishek Gupta, Julian Ibarz, and Sergey Levine. Diversity is All You Need: Learning Skills without a Reward Function. In ICLR, 2018. 2 +[26] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017. 2 +[27] Jorge Fuentes-Pacheco, José Ruiz-Ascencio, and Juan Manuel Rendon-Mancha. Visual simultaneous localization and mapping: a survey. Artificial Intelligence Review, 43(1):55–81, 2015. 2 +[28] Chuang Gan, Yiwei Zhang, Jiajun Wu, Boqing Gong, and Joshua B Tenenbaum. Look, Listen, and Act: Towards Audio-Visual Embodied Navigation. In ICRA, 2020. 1 +[29] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. 2 +[30] Daniel Gordon, Abhishek Kadian, Devi Parikh, Judy Hoffman, and Dhruv Batra. SplitNet: Sim2Sim and Task2Task Transfer for Embodied Visual Navigation. In ICCV, 2019. 2, 5, 7 +[31] Meera Hahn, Devendra Chaplot, Mustafa Mukadam, James Rehg, Shubham Tulsiani, and Abhinav Gupta. No RL, No Simulation: Learning to Navigate without Navigating. In NeurIPS, 2021. 5, 6 +[32] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016. 5 +[33] Sepp Hochreiter and Jürgen Schmidhuber. Long Short-Term Memory. Neural Computation, 9(8):1735-1780, 1997. 6 + +[34] Abhishek Kadian, Joanne Truong, Aaron Gokaslan, Alexander Clegg, Erik Wijmans, Stefan Lee, Manolis Savva, Sonia Chernova, and Dhruv Batra. Sim2real predictivity: Does evaluation in simulation predict real-world performance? IEEE Robotics and Automation Letters, 5(4):6670-6677, 2020. 5 +[35] Eric Kolve, Roozbeh Mottaghi, Winson Han, Eli Vanderbilt, Luca Weihs, Alvaro Herrasti, Daniel Gordon, Yuke Zhu, Abhinav Gupta, and Ali Farhadi. AI2-THOR: An Interactive 3D Environment for Visual AI. arXiv, abs/1712.05474, 2017. 2 +[36] Ilya Kostrikov, Denis Yarats, and Rob Fergus. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. In ICLR, 2021. 5 +[37] Obin Kwon, Nuri Kim, Yunho Choi, Hwiyeon Yoo, Jeongho Park, and Songhwai Oh. Visual Graph Memory with Unsupervised Representation for Visual Navigation. In ICCV, 2021. 3 +[38] Christoph H Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In CVPR, 2009. 2, 3 +[39] Federico Landi, Lorenzo Baraldi, Marcella Cornia, Massimiliano Corsini, and Rita Cucchiara. Multimodal attention networks for low-level vision-and-language navigation. Computer Vision and Image Understanding, 210:103255, 2021. 2 +[40] Hugo Larochelle, Dumitru Erhan, and Yoshua Bengio. Zero-data Learning of New Task. In AAAI, 2008. 3 +[41] Michael Laskin, Kimin Lee, Adam Stooke, Lerrel Pinto, Pieter Abbeel, and Aravind Srinivas. Reinforcement learning with augmented data. In NeurIPS, 2020. 5 +[42] Juncheng Li, Xin Wang, Siliang Tang, Haizhou Shi, Fei Wu, Yueting Zhuang, and William Yang Wang. Unsupervised reinforcement learning of transferable meta-skills for embodied navigation. In CVPR, 2020. 2 +[43] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 2 +[44] Oleksandr Maksymets, Vincent Cartillier, Aaron Gokaslan, Erik Wijmans, Wojciech Galuba, Stefan Lee, and Dhruv Batra. THDA: Treasure Hunt Data Augmentation for Semantic Navigation. In ICCV, 2021. 3, 5 +[45] Lina Mezghani, Sainbayar Sukhbaatar, Thibaut Lavril, Oleksandr Maksymets, Dhruv Batra, Piotr Bojanowski, and Karteek Alahari. Memory-Augmented Reinforcement Learning for Image-Goal Navigation. arXiv, 2021. 3, 5, 6 +[46] Piotr Mirowski, Matt Grimes, Mateusz Malinowski, Karl Moritz Hermann, Keith Anderson, Denis Teplyashin, Karen Simonyan, Koray Kavukcuoglu, Andrew Zisserman, and Raia Hadsell. Learning to navigate in cities without a map. In NeurIPS, 2018. 5 +[47] Arsalan Mousavian, Alexander Toshev, Marek Fiser, Jana Košecka, Ayzaan Wahid, and James Davidson. Visual representations for semantic target driven navigation. In ICRA, 2019. 2 +[48] Matthias Müller, Alexey Dosovitskiy, Bernard Ghanem, and Vladlen Koltun. Driving policy transfer via modularity and abstraction. In CoRL, 2018. 2 + +[49] Medhini Narasimhan, Erik Wijmans, Xinlei Chen, Trevor Darrell, Dhruv Batra, Devi Parikh, and Amanpreet Singh. Seeing the un-scene: Learning amodal semantic maps for room navigation. In ECCV, 2020. 1, 7 +[50] Santhosh K. Ramakrishnan, Ziad Al-Halah, and Kristen Grauman. Occupancy Anticipation for Efficient Exploration and Navigation. In ECCV, 2020. 2 +[51] Santhosh K. Ramakrishnan, Devendra Singh Chaplot, Ziad Al-Halah, Jitendra Malik, and Kristen Grauman. PONI: Potential Functions for ObjectGoal Navigation with Interaction-free Learning. In CVPR, 2022. 2 +[52] Santhosh K. Ramakrishnan, Aaron Gokaslan, Erik Wijmans, Oleksandr Maksymets, Alex Clegg, John Turner, Eric Undersander, Wojciech Galuba, Andrew Westbury, Angel X Chang, et al. Habitat-Matterport 3D Dataset (HM3D): 1000 Large-scale 3D Environments for Embodied AI. In NeurIPS Datasets and Benchmarks Track (Round 2), 2021. HM3D license available at https://matterport.com/matterport-end-user-license-agreement-academic-use-model-data. 2, 6 +[53] Santhosh K. Ramakrishnan, Tushar Nagarajan, Ziad Al-Halah, and Kristen Grauman. Environment Predictive Coding for Embodied Agents. In ICLR, 2022. 2 +[54] Marcus Rohrbach, Michael Stark, and Bernt Schiele. Evaluating knowledge transfer and zero-shot learning in a large-scale setting. In CVPR, 2011. 3 +[55] Nikolay Savinov, Alexey Dosovitskiy, and Vladlen Koltun. Semi-parametric topological memory for navigation. In ICLR, 2018. 1 +[56] Manolis Savva, Angel X. Chang, Alexey Dosovitskiy, Thomas Funkhouser, and Vladlen Koltun. MINOS: Multimodal indoor simulator for navigation in complex environments. arXiv:1712.03931, 2017. 1 +[57] Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, Devi Parikh, and Dhruv Batra. Habitat: A Platform for Embodied AI Research. In ICCV, 2019. 1, 2, 5 +[58] Alexander Sax, Jeffrey O Zhang, Bradley Emi, Amir Zamir, Silvio Savarese, Leonidas Guibas, and Jitendra Malik. Learning to navigate using mid-level visual priors. In CoRL, 2019. 2, 5, 7 +[59] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. 4 +[60] Ramanan Sekar, Oleh Rybkin, Kostas Daniilidis, Pieter Abbeel, Danijar Hafner, and Deepak Pathak. Planning to Explore via Self-Supervised World Models. In ICML, 2020. 3 +[61] Brennan Shacklett, Erik Wijmans, Aleksei Petrenko, Manolis Savva, Dhruv Batra, Vladlen Koltun, and Kayvon Fatahalian. Large Batch Simulation for Deep Reinforcement Learning. In ICLR, 2021. 5 +[62] William B Shen, Danfei Xu, Yuke Zhu, Leonidas J Guibas, Li Fei-Fei, and Silvio Savarese. Situational fusion of visual representation for visual navigation. In ICCV, 2019. 2 +[63] Sebastian Thrun. Probabilistic robotics. Communications of the ACM, 45(3):52-57, 2002. 2 + +[64] Xin Eric Wang, Vihan Jain, Eugene Ie, William Yang Wang, Zornitsa Kozareva, and Sujith Ravi. Environment-agnostic multitask learning for natural language grounded navigation. In ECCV, 2020. 2 +[65] Erik Wijmans, Abhishek Kadian, Ari Morcos, Stefan Lee, Irfan Essa, Devi Parikh, Manolis Savva, and Dhruv Batra. DD-PPO: Learning Near-Perfect PointGoal Navigators from 2.5 Billion Frames. In ICLR, 2020. 2, 3, 5, 7 +[66] Mitchell Wortsman, Kiana Ehsani, Mohammad Rastegari, Ali Farhadi, and Roozbeh Mottaghi. Learning to learn how to learn: Self-adaptive visual navigation using meta-learning. In CVPR, 2019. 2 +[67] Yi Wu, Yuxin Wu, Aviv Tamar, Stuart Russell, Georgia Gkioxari, and Yuandong Tian. Bayesian Relational Memory for Semantic Visual Navigation. In ICCV, 2019. 1, 2, 4 +[68] Fei Xia, Amir R. Zamir, Zhi-Yang He, Alexander Sax, Jitendra Malik, and Silvio Savarese. Gibson Env: Real-World Perception for Embodied Agents. In CVPR, 2018. Gibson license available at http://svl.stanford.edu/gibson2/ assets/GDS_agreement.pdf. 2, 5, 6, 7 +[69] Yongqin Xian, Bernt Schiele, and Zeynep Akata. Zero-shot learning-the good, the bad and the ugly. In CVPR, 2017. 2, 3 +[70] Wei Yang, Xiaolong Wang, Ali Farhadi, Abhinav Gupta, and Roozbeh Mottaghi. Visual semantic navigation using scene priors. In ICLR, 2019. 2 +[71] Joel Ye, Dhruv Batra, Abhishek Das, and Erik Wijmans. Auxiliary Tasks and Exploration Enable ObjectGoal Navigation. In ICCV, 2021. 5 +[72] Lin Yen-Chen, Andy Zeng, Shuran Song, Phillip Isola, and Tsung-Yi Lin. Learning to see before learning to act: Visual pre-training for manipulation. In ICRA, 2020. 2 +[73] Amir R Zamir, Alexander Sax, William Shen, Leonidas J Guibas, Jitendra Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. In CVPR, 2018. 2, 7 +[74] Brady Zhou, Philipp Krahenbuhl, and Vladlen Koltun. Does computer vision matter for action? Science Robotics, 2019, 2, 5, 7 +[75] Yuke Zhu, Roozbeh Mottaghi, Eric Kolve, Joseph J Lim, Abhinav Gupta, Li Fei-Fei, and Ali Farhadi. Target-driven Visual Navigation in Indoor Scenes using Deep Reinforcement Learning. In ICRA, 2017. 1, 2, 3, 5, 6 \ No newline at end of file diff --git a/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/images.zip b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fb35bffcd2e5b05ab8fee709d1390d8586b04565 --- /dev/null +++ b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26640c27bfe5d2c88af5ffaea7ad32cb50bb45816ec14724faee2546905a171d +size 338424 diff --git a/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/layout.json b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..75edcc42d15383d5ec439fa1850646554e5ee053 --- /dev/null +++ b/zeroexperiencerequiredplugplaymodulartransferlearningforsemanticvisualnavigation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a94a0980b5059318638d904a326634c1f761c63cc7e34d1fd5acf76f563dd23 +size 434795 diff --git a/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_content_list.json b/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f0345d0ee612b9b40c80f0566c8462e81245c70c --- /dev/null +++ b/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3793aa5e2a1b2faa53bb302825c722e8fd0615b4b2795d516f4ff1e25b8de39d +size 84409 diff --git a/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_model.json b/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_model.json new file mode 100644 index 0000000000000000000000000000000000000000..00673554ae50f75a4ce1a3e035c7d7eb25e92109 --- /dev/null +++ b/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:389b26a16a4a88ed517dca6c5367a9369835256e5fbf7afdd57d80a7ca68a180 +size 107124 diff --git a/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_origin.pdf b/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..33a8d5e652aac1cee916df9e9600f84dccd8b3ca --- /dev/null +++ b/zeroquerytransferattacksoncontextawareobjectdetectors/44970747-0f71-463f-89b9-0354ab332cac_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7268dfaed17878dd0a600035022565be7c270b39a13b8dd4737b52d17709946 +size 975319 diff --git a/zeroquerytransferattacksoncontextawareobjectdetectors/full.md b/zeroquerytransferattacksoncontextawareobjectdetectors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fcada4abfd1014fa76b8a6725bb31e9442b3cdc1 --- /dev/null +++ b/zeroquerytransferattacksoncontextawareobjectdetectors/full.md @@ -0,0 +1,308 @@ +# Zero-Query Transfer Attacks on Context-Aware Object Detectors + +Zikui Cai $^{1}$ , Shantanu Rane $^{2}$ , Alejandro E. Brito $^{2}$ , Chengyu Song $^{1}$ , Srikanth V. Krishnamurthy $^{1}$ , Amit K. Roy-Chowdhury $^{1}$ , M. Salman Asif $^{1*}$ $^{1}$ University of California, Riverside, USA $^{2}$ Palo Alto Research Center, Palo Alto, USA {zcai032}@ucr.edu, {srane, abrito}@parc.com {csong, krish}@cs.ucr.edu, {amitrc, sasif}@ece.ucr.edu + +# Abstract + +Adversarial attacks perturb images such that a deep neural network produces incorrect classification results. A promising approach to defend against adversarial attacks on natural multi-object scenes is to impose a context-consistency check, wherein, if the detected objects are not consistent with an appropriately defined context, then an attack is suspected. Stronger attacks are needed to fool such context-aware detectors. We present the first approach for generating context-consistent adversarial attacks that can evade the context-consistency check of black-box object detectors operating on complex, natural scenes. Unlike many black-box attacks that perform repeated attempts and open themselves to detection, we assume a "zero-query" setting, where the attacker has no knowledge of the classification decisions of the victim system. First, we derive multiple attack plans that assign incorrect labels to victim objects in a context-consistent manner. Then we design and use a novel data structure that we call the perturbation success probability matrix, which enables us to filter the attack plans and choose the one most likely to succeed. This final attack plan is implemented using a perturbation-bounded adversarial attack algorithm. We compare our zero-query attack against a few-query scheme that repeatedly checks if the victim system is fooled. We also compare against state-of-the-art context-agnostic attacks. Against a context-aware defense, the fooling rate of our zero-query approach is significantly higher than context-agnostic approaches and higher than that achievable with up to three rounds of the few-query scheme. + +# 1. Introduction + +Despite achieving significant performance gains on a variety of vision and language tasks, deep neural networks (DNNs) are vulnerable to adversarial attacks [49]. One + +![](images/ffac7ebf7e297b4075670c3f59170a5b92ae5dcf899f42b6bab1569ac42f2987.jpg) +Figure 1. For natural scenes containing multiple objects, applying an evasion attack on an individual object (e.g., crosswalk $\rightarrow$ boat) violates the context: A boat and a stop-sign rarely occur together. A context-aware detector can detect this attack. In this work, we perturb multiple objects in a context-consistent way (e.g., crosswalk $\rightarrow$ boat, stop-sign $\rightarrow$ water) in a single attempt. The combination (person, boat, water) does not violate context and thus fools even a context-aware detector. + +of the most popular adversarial approaches is the class of perturbation-bounded evasion attacks [9, 19, 35, 41]. Here, an attacker can make a model yield arbitrarily wrong classification results by adding imperceptible perturbations to the input image. These attacks are quite practical and can be performed at test time without needing access to the training data. The vast majority of work in this area has focused on attacking classifiers trained on datasets like ImageNet, MNIST, CIFAR-10, and CIFAR-100, where the classifier attempts to recognize one dominant object in a given image. In contrast, we are primarily concerned with object detectors [24, 29, 39, 42, 44] that localize and recognize multiple objects in an image, which is the case in most natural images. Such detectors often take a holistic view of an image, rather than considering it as a collection of arbitrary objects [55, 57]. The objects in natural scene images form a context that can help identify the scene or given the scene we are likely to find the objects that conform to the scene + +context. For instance, a boat is unlikely to co-occur with a stop sign, and much more likely to co-occur with water. Leveraging this observation, some recent attack [7] and defense [28, 62] mechanisms have been proposed that take image context into account. Context-aware defense methods in [28, 62] can detect attacks that are inconsistent with the scene context, as shown in Figure 1. To evade these defenses, changing one object in the image is insufficient. The context-aware attack method in [7] uses the knowledge of co-occurrence between different object classes in complex images to generate a sequence of transferable attacks for black-box object detectors; however, this method needs a few queries to test which attack plan is successful. We present, for the first time, a zero-query attack algorithm that changes multiple objects simultaneously in a context-consistent manner thereby creating a holistic adversarial scene that can overcome context-aware defenses. + +In this work, we consider "zero-query" attacks (ZQA) that refer to a setting in which the attacker has no feedback channel to access the classification decisions of the victim system. This setting is extremely useful in practice because in many applications the victim system is inaccessible to the attacker; even if the victim system is accessible, the attacker's communications can be monitored, and thus draw suspicion. ZQA, on the other hand, is a truly stealthy attack. The attacker can only implement an attack plan once by perturbing multiple objects in a given scene and submitting the perturbed image to the victim system. Furthermore, we assume that the victim system is explicitly context-aware; that is, it will examine the list of detected objects and determine whether that list is "context-consistent" or not. If yes, then the detector will not suspect an attack. If not, it will suspect that the image has been perturbed by an attacker. Our ZQA approach is able to subvert more sophisticated multi-label object detectors that either implicitly or explicitly take context relationships across objects into account while performing their inference. In fact, accounting for context is what makes it possible to achieve high success rates in a single attempt. + +Several approaches exist for scene context modeling [2, 17, 22, 38, 50]. In this paper, we restrict our attention to object co-occurrence, which is the most fundamental approach to modeling semantic context. The context model is represented by a co-occurrence graph (or equivalently the co-occurrence matrix) that is computed for a given set of images. We consider a list of objects as context-consistent only if the corresponding labels form a fully connected subgraph within the co-occurrence graph. + +The main contributions of this paper are as follows. + +- We develop an architecture for designing attacks on multi-object scenes that fool context-aware object detectors. Our detectors explicitly use object co-occurrence to model scene context. + +- We propose an approach for zero-query context-aware attacks that generate adversarial scenes to fool a context-aware detector in a single step. +- We introduce the concept of a perturbation success probability matrix (PSPM) that models the probability of successfully perturbing a given target object to a given victim object in the white box setting. We use the PSPM to refine our attack plans, essentially choosing the one which is most likely to succeed. We show that the PSPM-guided attacks improve the fooling rate even in a black-box setting. +- We show experimentally that the fooling rate of ZQA is significantly higher than that achieved by a context-agnostic black-box attack. Furthermore, we compare our results against a possible "few-query" strategy [7] that repeatedly enhances the attack plan, while observing the detector output, until the detector is fooled. For the Pascal VOC dataset [18], the ZQA attacks provide fooling rates comparable to 5-query and 3-query attacks in the white-box and black-box settings, respectively. + +# 2. Background and Preliminaries + +# 2.1. Context in Object Detection + +The role of context in improving visual recognition tasks has been well studied [37, 46, 61]. The state-of-the-art object detectors locate and detect several objects in the scene based on holistic information in the image [42, 44]. Many of these methods explicitly utilize context information to improve the performance of object detectors [3-5, 14, 34, 52]. Co-occurrence-based contextual information derived from image pixels [28], object labels [7], and language models [62] have also been used to build a context-aware object detector. Different from the above contributions, to the best of our knowledge, this is the first paper that proposes a context-aware attack to fool a context-aware detector with zero queries. + +# 2.2. Black-Box Attacks + +In a black-box attack, the attacker has no access to the internal parameters of the model; thus, instead of generating the perturbed image by backpropagation, the attacker can only test a perturbed image on the victim model. In some cases, the attacker can observe the output but in many cases even that is not possible [27]. This renders query-based attacks inapplicable, which usually take an overwhelmingly large number (often hundreds or thousands) of queries [6, 11, 13, 20, 25, 53]. In this paper, we explore the most stringent case where no model queries are allowed. Such attacks will be extremely hard to detect, free from suspicion of repeated queries, and thus will be a more viable option for subversion. Several papers [16, 26, 33, 41] have examined the phenomenon of transfer attacks where + +the adversarial examples generated using a surrogate network can fool a black-box victim network. A large body of work exists on designing (perturbation-bounded) evasion attacks for images containing one predominant object and evaluating how well they transfer in a black-box setting [8, 10, 19, 40, 48]. In this work, our goal is to fool object detectors for general scenes. This is considered a harder problem because of the need to perturb multiple objects [55, 57]. This difficulty is exacerbated by the need to preserve contextual consistency during the attack [28]. A "few-query" strategy for context-aware attacks was proposed in [7] that repeatedly enhances the attack plan, while observing the detector output, until the detector is fooled. Our goal in this paper is to develop context-aware attacks with zero queries. + +# 2.3. Attacks against Object Detectors + +Attacking object detectors is harder than attacking classifiers, since the attack must obfuscate the category as well as the location of one or more objects [55,57]. Object detectors [42, 44] implicitly use contextual information – for instance, relationships between object pixels and background pixels – to increase the speed of inference. Researchers have exploited this fact by developing various kinds of adversarial patches [23, 32, 45] which do not overlap with the victim objects, but can still fool the detectors. Some other attacks [15, 54, 57, 63], perturbing the image globally, are also successful in fooling object detectors in a white-box setting. A recently proposed method has demonstrated the ability to transfer attack black-box object detectors by exploiting context information, but the victim models do not explicitly check for context-consistency and also the attack needs multiple queries [7]. + +# 2.4. Defense methods + +Some representative defense mechanisms [43] for mitigating adversarial attacks include enhancing adversarial robustness of the model intrinsically through adversarial training [1, 35, 51] or strengthening model architectures [31, 58]; and destroy adversary externally through input transformation [21, 56] or denoising [36, 47, 60]. These defenses are context-agnostic. Some recent papers consider context-aware object detectors operating on natural multi-object scenes [28, 62]. Although these works use different notions of context from our work, they confirm that attacking a context-aware detector is more difficult. + +# 3. Context-Aware Zero-Query Attacks + +We describe ZQA for natural scenes. A high-level diagram of zero-query context-aware black-box attacks is shown in Figure 2. We first present a high-level description and later elaborate on the building blocks. The attacker determines a list of objects detected in the scene and + +uses the co-occurrence-based context model to derive several context-aware attack plans that perturb one or more target objects to their respective victim labels. Then, given the perturbation budget, the attacker refines the list using a precomputed PSPM, which we will discuss in detail later. The result is an attack plan that consists of a list of (victim label, target label) pairs that are most likely to succeed in fooling the victim object detector. The attacker then uses an evasion attack algorithm to generate the perturbed scene according to the refined attack plan. The perturbed image is sent to a black-box classification / detection machine equipped with an explicit context-consistency detection mechanism. The attack is considered successful only if the victim object is successfully perturbed to the target label and the victim system's object detector does not find any context inconsistency in its list of detected objects. We now describe the building blocks of the attack in detail. + +# 3.1. Context Model + +The context model is used by the attacker and the victim system's object detector to determine whether a given list of objects is context-consistent or not. Let us first define what is considered as context-consistent and what is context-inconsistent. Intuitively, combinations of objects detected in natural images from the training data should be considered as context-consistent, since these objects appear together in such scenes. On the other hand, combinations of objects should be considered as context-inconsistent if some of the objects have never appeared together in the training data. Thus, object co-occurrence is a fundamental cue in determining context-consistency. + +Co-occurrence matrix/graph. We build a matrix, called the co-occurrence matrix $\mathbf{G}$ , to model the co-occurrence relationships between objects as follows. Given a training data set with $N$ labels and a label set $\mathcal{N} = \{\ell_1,\dots ,\ell_N\}$ , a co-occurrence matrix $\mathbf{G}$ is an $N\times N$ matrix whose entries $\mathbf{G}(i,j)$ represent the number of unique pairs of objects with labels $\ell_i,\ell_j\in \mathcal{N}$ appearing together in the images. This matrix is symmetric before normalization. After normalizing each entry in $\mathbf{G}$ with the sum of elements in its row, we obtain $\bar{\mathbf{G}}$ , where $\bar{\mathbf{G}} (i,j)$ indicates the conditional probability $p_{j|i}$ which is the probability of observing label $\ell_j$ if label $\ell_i$ is observed. In general, $\bar{\mathbf{G}}$ is not symmetric. An example of $\bar{\mathbf{G}}$ for the Pascal VOC Dataset is illustrated in Figure 3. The co-occurrence matrix can also be interpreted as a context graph (which we will also denote by $\mathbf{G}$ ) with $N$ nodes, where the weight of the edge between nodes $i$ and $j$ represents the number of times that those two labels appear together in the training data. + +Context consistency. If two nodes in a context graph do not have an edge connecting them, then these two la + +![](images/bbb84a9ba26d650787361c44d4feb0dd7f5277b0614795e59a4c6afac1b35117.jpg) +Figure 2. High-level diagram of zero-query context-aware black-box attacks. Given a victim image to be attacked, the attacker first finds a list of detected objects in the image and then consults the semantic context associated with the detector to design a context-aware attack plan that perturbs a victim object to a target label. To improve attack success rate, the attacker checks the PSPM corresponding to the perturbation machine with a certain perturbation budget $\epsilon$ and refines the original attack plan. With the refined attack plan, the attacker perturbs the image within bound $\epsilon$ , using the perturbation machine. The attacker's action is now complete. The perturbed image is then sent to a black-box classification / detection machine equipped with an explicit context-consistency detection mechanism. The attack is considered successful only if the victim object is successfully perturbed to the target object and the context-inconsistency detector does not find any inconsistency in the list of all detected objects. + +![](images/1ddcad94bf660efe5250436372afa37a2e21c452a9e1cc144ed740aa788c6818.jpg) +Figure 3. Co-occurrence matrix (conditional probability form) for the Pascal VOC07 training data set. Each cell indicates the probability as a quantized integer percentage (\%). + +bels never appear together in an image. Using this notion of co-occurrence-based context, we can define context-consistency and context-inconsistency as follows. A list of objects is considered as context-consistent if all the nodes representing the labels of those objects form a fully connected subgraph of the context graph $\mathbf{G}$ . All the natural images in the data set satisfy this condition. A list of objects is considered as context-inconsistent if there are at least two nodes, representing the labels of two objects, that do not + +have an edge between them in the context graph. + +Generalized context-consistency. Suppose we threshold the entries of $\mathbf{G}$ to obtain a matrix $\mathbf{H}_{\eta}$ , where $\mathbf{H}_{\eta}(i,j) = \mathbf{G}(i,j)$ if $\mathbf{G}(i,j) > \eta$ , for some threshold $\eta$ . Otherwise $\mathbf{H}_{\eta}(i,j) = 0$ . Build a context graph using $\mathbf{H}_{\eta}$ , which we will also denote by the same symbol $\mathbf{H}_{\eta}$ . Then the cooccurrence based notion of context consistency can be readily generalized as follows. A list of objects is considered as context-consistent up to a threshold $\eta$ if all the nodes representing the labels of those objects form a fully connected subgraph of the context graph $\mathbf{H}_{\eta}$ . Generalized context-inconsistency is defined similarly. + +We describe the notion of context consistency for a list of object labels in Figure 1. Let us take a clean image containing three objects as an example. Suppose we have a person, a crosswalk and a stop-sign in the image as indicated by the dark blue nodes. These three nodes form a fully connected subgraph indicating that these three objects are context consistent. Suppose we want to perturb the crosswalk in the image to a boat. An example of a context-inconsistent attack involves just perturbing the victim object (crosswalk) to the target label (boat denoted as a red node). The perturbed object list (person, boat, stop-sign) is no longer context-consistent because these three nodes of boat, person and stop-sign do not form a fully connected graph, indicating that the combination never appears in the training data. Intuitively, it would be unlikely to see a boat with a stop-sign in the natural images. An example of a context-consistent attack is to perturb the crosswalk to a boat but also perturb + +the stop-sign to water. That combination (person, water, boat) does appear in the training data, as seen from the fact that the label nodes form a fully connected sub-graph. + +# 3.2. Perturbation Success Probability Matrix + +Perturbation Success Probability Matrix (PSPM) is an $N\times N$ matrix denoted as $\mathbf{M}_{\mathcal{C},\epsilon ,\alpha}$ that is defined for an ensemble of classification models $\mathcal{C}$ , perturbation budget $\epsilon$ , and an object perturbation algorithm $\alpha$ . PSPM is defined for a specific training data set with labels $\mathcal{N} = \{\ell_1,\dots ,\ell_N\}$ . $\mathbf{M}_{\mathcal{C},\epsilon ,\alpha}(i,j)$ encodes the probability that an object with label $\ell_{i}$ can be successfully perturbed to label $\ell_{j}$ by the perturbation algorithm $\alpha$ using the perturbation budget $\epsilon$ . + +The PSPM expresses an attacker's ability to perturb individual objects in a scene. The utility of the PSPM can be explained as follows. Suppose the list of objects in the given scene is $\mathcal{A} = \{A_1, \dots, A_S\}$ . Suppose the list $\mathcal{A}$ is perturbed to a list $\mathcal{B}$ using an evasion attack algorithm $\alpha$ with perturbation budget $\epsilon$ . A context-agnostic attack would choose the labels in $\mathcal{B}$ at random from the label set $\mathcal{N}$ . A context-aware attack would make sure that the labels in $\mathcal{B}$ are context-consistent as determined by the co-occurrence matrix $\bar{\mathbf{G}}$ . Then, there are in general one or more possible perturbation assignments $\mathcal{A} \rightarrow \mathcal{B}$ that are context-consistent. Depending upon the training set (e.g., the presence of objects in different poses, sizes, illuminations) some object perturbations, $A_i \rightarrow B_j$ , are likely to be more successful than others, even in a white-box setting. Thus, each perturbation assignment $\mathcal{A} \rightarrow \mathcal{B}$ suggested by an examination of the co-occurrence matrix has a different likelihood of success. The PSPM enables us to select the assignment that is most likely to succeed. An example of a PSPM for the Pascal VOC07 dataset is shown in Figure 4. + +Some ways to choose an assignment amongst many assignments permitted by the co-occurrence matrix include + +1. Choose the assignment $\mathcal{A} \to \mathcal{B}$ that maximizes each $\mathbf{M}_{\mathcal{C}, \epsilon, \alpha}(i, j)$ with $i \in \mathcal{A}, j \in \mathcal{B}$ . +2. Choose the assignment $\mathcal{A} \to \mathcal{B}$ that maximizes the average of all $\mathbf{M}_{\mathcal{C},\epsilon,\alpha}(i,j)$ with $i \in \mathcal{A}, j \in \mathcal{B}$ . +3. Choose the assignment $\mathcal{A} \to \mathcal{B}$ that maximizes the minimum of all $\mathbf{M}_{\mathcal{C},\epsilon,\alpha}(i,j)$ with $i \in \mathcal{A}, j \in \mathcal{B}$ . + +For simplicity, we use the first approach in the ensuing development. Admittedly, the PSPM considers the success of perturbing some $A_{i} \in \mathcal{A}$ to $B_{j} \in \mathcal{B}$ in a white-box setting; that is, for one or more classification models specified in the given ensemble $\mathcal{C}$ . In a black-box setting, the attacker does not know which model is being used at the victim side. Thus, attack plans based on the PSPM are, at best, approximations. We hypothesize that these approximations are still better than choosing, at random, one of many possible assignments $\mathcal{A} \to \mathcal{B}$ suggested by the co-occurrence matrix. + +![](images/d8b554136e643f650019286b839717d67e7872753e880707388b47e91711a0ed.jpg) +Figure 4. PSPM of Pascal VOC07 data set for $\mathcal{C} = \{\text{"Faster R-CNN"}\}$ , $\epsilon = 10$ , $\alpha = \{\text{"PGD"}\}$ . Each cell indicates the probability as a quantized integer percentage (\%). + +Our experiments, described in Section 4, indicate that refining the attack plan using the PSPM indeed improves the fooling rate compared to choosing an attack plan at random from the context-consistent candidate attacks suggested by the co-occurrence matrix. + +# 3.3. Context-Consistent Attack Plan Generation + +We now describe the zero-query method for deriving context-consistent attack plans using the co-occurrence matrix $\mathbf{G}$ and the PSPM matrix $\mathbf{M}_{\mathcal{C},\epsilon,\alpha}$ . The overall procedure is described in Algorithm 1. We assume that there is a desired target assignment for one object in the scene (e.g., change one of the horses to a bicycle). As discussed, just perturbing one object can result in a context-inconsistent list of objects in the perturbed scene. Thus, other objects in the scene may need to be perturbed so that the resulting list is context-consistent. The procedure described below ensures not only the attack plan is context-consistent, but it is also the plan that is most likely to succeed in a white-box setting. As we mentioned earlier, for a black-box setting this plan may not always be the most likely to succeed. Experimentally, we found that the attack plan guided by PSPM also increases the fooling rate for black-box models. + +# 3.4. Implementation of Attack Plan + +To generate the adversarial scene, evasion attacks can be implemented using a single or multiple surrogate model(s). Our attack generation method with a single surrogate detector is based on projected gradient descent (PGD) [35] within a $\ell_{\infty}$ ball, which can be considered as a powerful multi-step variant of FGSM [19]. We initialize a zero per + +# Algorithm 1 Zero-Query Context-Consistent Attack Plan + +Inputs: A list of objects in the scene $\mathcal{A} = \{A_1 = \ell_v, A_2, \ldots, A_S\}$ where $S$ denotes the total number of objects in the scene, the desired target assignment consisting of (victim label $\ell_v \in \mathcal{A}$ , target label $\ell_t$ ) pair for one object, co-occurrence matrix $\mathbf{G}$ computed over the training data, co-occurrence threshold $\eta$ , perturbation budget $\epsilon$ , perturbation success probability matrix $\mathbf{M}_{\mathcal{C}, \epsilon, \alpha}$ generated in advance from the training data. + +Output: Attack plan $\mathcal{B}$ that is context-consistent with $\mathbf{G}$ and most likely to succeed in a white-box setting. + +Initialization: $\mathcal{B} = \{\ell_t\}$ + +# Procedure: + +1. Obtain a set of labels that co-occur with $\ell_t$ , denoted as $\mathcal{T} \subset \mathcal{N}$ such that $\mathbf{G}(j, t) > \eta$ for all $\ell_j \in \mathcal{T}$ . +2. Set running counter $k = 2$ . +3. While $k \leqslant S$ , compute + +$$ +\ell^ {*} = \underset {\ell_ {b} \in \mathcal {T}} {\operatorname {a r g m a x}} \mathbf {M} _ {\mathcal {C}, \epsilon , \alpha} (a, b), \tag {1} +$$ + +where $a$ is the index of label $A_{k}$ + +$$ +\mathcal {B} \leftarrow \mathcal {B} \bigcup \ell^ {*} +$$ + +$$ +k \leftarrow k + 1 +$$ + +turbation $\delta^0 = 0$ , and update it in each iteration as + +$$ +\delta^ {t + 1} = \Pi_ {\mathcal {S}} \left(\delta^ {t} - \lambda \operatorname {s g n} \left(\nabla_ {\delta} \mathcal {L} (x + \delta^ {t}, y)\right)\right), \tag {2} +$$ + +where $\mathcal{L}$ is the loss function, $x\in \mathbb{R}^d$ is the input image and $y$ is the target label. We generate the desired output $y$ based on our attack plan, which includes object categories, locations, and confidence scores. We take a step size $\lambda$ at each iteration $t$ , and project (clip) $\Pi_S$ the perturbation $\delta^t$ to the feasible set $S$ which satisfies the following two criteria + +$$ +\left\{ \begin{array}{l} \| \delta^ {t} \| _ {\infty} \leqslant \epsilon , \\ x + \delta^ {t} \in [ 0, 2 5 5 ] ^ {d}. \end{array} \right. \tag {3} +$$ + +We use PGD for its simplicity in our experiments, but we can easily modify our method to use other (more advanced) perturbation methods such as MIM [16] and DIM [59] etc. without losing generalizability. + +# 4. Experiments + +We performed extensive experiments on two large-scale object detection datasets to evaluate the proposed context-aware zero-query attack strategy. We construct a query-based baseline scheme and evaluate the fooling rate of our proposed zero-query approach against it. + +Datasets: We conduct our experiments using images from both PASCAL VOC [18] and MS COCO [30] datasets. VOC contains 20 common classes of objects, and COCO contains 80 classes which is a super-set of the categories in VOC. We randomly selected 500 images from voc2007test and coco2017val respectively, which contain multiple $(2 - 6)$ objects. This manuscript contains results for various models on the voc2007test. The results for the coco2017val are in the supplementary. + +Attack models: To mimic a realistic black-box setting, we pick a variety of object detectors, including two-stage detectors: Faster RCNN [44] and Libra R-CNN [39]; one-stage detector: RetinaNet [29]; and anchor-free detector: FoveaBox [24]. We use implementations of the aforementioned models from the MMDetection [12] code repository. The models in MMDetection are trained on coco2017train; therefore, while testing the detectors on VOC images, we only return the object labels available in VOC. The models under such adaptation still get good detection performance, as shown in Table 1. + +Table 1. Mean average precision (mAP) at IOU (intersection over union) threshold 0.5 of different detectors used in our experiments. Models are evaluated on VOC07 test set. Legend: Faster R-CNN (FRCNN), RetinaNet (Retina), Libra R-CNN (Libra), FoveaBox (Fovea). + +
ModelFRCNNRetinaLibraFovea
mAP@.5078.30%78.51%79.01%77.68%
+ +Zero-Query attacks (ZQA and ZQA-PSPM): We evaluate two variants of our zero-query attack. The first variant (ZQA) ensures that the attack plan is chosen at random from the available set of context-consistent attacks and is determined using Equation (4). The second variant (ZQA-PSPM) generates a context-consistent attack plan based on the PSPM matrix that was pre-computed for the given classification model, perturbation budget and evasion attack algorithm. See Equation (1). ZQA-PSPM is the key contribution of this paper, and our results demonstrate that that ZQA-PSPM provides better fooling success rate compared to ZQA and baselines. + +Baselines and comparisons: We compare the ZQA and ZQA-PSPM schemes against two relevant baselines. The first is the context-agnostic zero-query attack, which we call "Context-Agnostic". In this attack, the attack plan that drives the scene perturbation is chosen randomly (i.e., without explicitly enforcing co-occurrence-based context). This means that some attack plans in the Context-Agnostic scheme may be context-consistent by accident, while others are context-inconsistent. Comparison against Context- + +Agnostic is performed with the aim of investigating the benefits of exploiting context while designing the attack plan. + +We also compare with a second, more powerful baseline, which we refer to as the "Few-Query" approach [7]. In this scheme, the attacker is equipped with the co-occurrence matrix $\mathbf{G}$ but doesn't have the PSPM matrix. More importantly, the few-query attacker can query the victim system to find out whether the attack succeeded. Because of this, they don't need to perturb all the objects in the scene in one step. The few-query attacker proceeds as described in Algorithm 2. The few-query attack is denoted as "Few-Query $q$ " in Table 2 and Table 3 where $q$ is the number of previous queries that the current attack is built on, $q\in \{0,1,2,3,4,5\}$ , thus "Few-Query 0" is identical to ZQA in terms of queries. + +# Algorithm 2 Few-Query Context-Consistent Attack Plans + +Inputs: Same as the inputs to Algorithm 1 but with no PSPM matrix, number of victim system queries allowed $q \leq S$ where $S$ is the number of objects in the scene. + +Output: A sequence of attack plans $\mathcal{D}_k$ consistent with $\mathbf{G}$ , where $k = 1,2,\ldots,q$ . + +Initialization: $\mathcal{D}_1 = \{\ell_t\}$ + +# Procedure: + +1. Obtain the label set $\mathcal{T} \subset \mathcal{N}$ such that $\mathbf{G}(j, t) > \eta$ for all $\ell_j \in \mathcal{T}$ . +2. Set running counter $k = 2$ . +3. While $k \leq q$ , compute + +$$ +\widehat {\ell} \stackrel {i i d} {\sim} U (\mathcal {T}) \quad \triangleright \text {u n i f o r m l y s a m p l e f r o m} \mathcal {T} \tag {4} +$$ + +$$ +\mathcal {D} _ {k} \leftarrow \mathcal {D} _ {k - 1} \bigcup \hat {\ell} +$$ + +$$ +k \leftarrow k + 1 +$$ + +The attacker implements $\mathcal{D}_1$ and queries the victim system. If the attack succeeded, they stop; else, they implement $\mathcal{D}_2$ and query the victim system, and so on, until the attack succeeds. + +Attack generation: We use the PGD-based method to generate a perturbation on the whole image (as discussed in Equation (2)). We experiment with $L_{\infty}$ perturbation budget $\epsilon \in \{10, 20, 30, 40, 50\}$ . The step size $\lambda = 2$ , and maximum number of iterations is 50. We observe that when an object is very close to or overlaps with the victim object, perturbing that object to any label different from the victim's target label reduces the success rate; thus, we map all objects whose regions have IOU $\geqslant 0.3$ with the victim object to the victim's target label. + +Evaluation metrics: We use the metric "context-consistent attack success rate" (or fooling rate) to evaluate the attack performance on a victim object detector. For an attack to be regarded as a successful context-consistent attack, it must (1) successfully perturb the victim object to the target label, and (2) pass the context-consistency check described in Figure 1. We define the fooling rate as the percentage of the number of test cases for which the above two conditions are satisfied. + +Comparing zero-query attacks with few-query attacks: The fooling rates of the few-query attacks with different numbers of queries (Few-Query 0 to Few-Query 5) and the zero-query attack under white-box and black-box settings at different perturbation budgets are shown in Table 2 and Table 3. The settings for both tables are detailed in the captions. The fooling rates for the few-query attacks are cumulative; that is, the values reported for few-query- $k$ accounts for successful attacks with $0,1,\ldots,k$ queries. + +We observe that ZQA can achieve higher fooling rates than the few-query attack for up to 4 queries in the white-box setting and up to 2 queries in the black-box setting. When PSPM is used to refine the zero-query attack plan (ZQA-PSPM), the fooling rate increases, outperforming up to 5 queries of the few-query attack in the white-box setting and up to 3 queries in the black-box setting. These results are consistent across several detector models tested. As $\epsilon$ reduces, the perturbation is not always enough to carry out the evasion attacks, and thus the fooling rates fall from $\epsilon = 50$ to $\epsilon = 10$ . + +The results clearly demonstrate the advantage of simultaneous context-aware perturbation of all objects in the scene. In many cases, using the PSPM to refine the context-aware attack further improves the fooling rate. While the few-query approach eventually outperforms the ZQA attack, recall that the former requires the attacker to communicate with the detector, which is either not always possible, or might expose the attacker. + +# 5. Discussion + +Limitations and Future Work: We have assumed that the data distribution at the victim system is known. We also assume that the context is consistent across surrogate and victim systems. In practice, this is rarely the case. The attacker and the victim system may have different data distributions, overlapping but non-identical label sets, and thus similar but non-identical context models. A useful avenue for future work is to introduce controlled discrepancies between the distributions, context models, and label sets and examine their effect on the fooling rate of the ZQA attack. + +While co-occurrence is a fundamental notion of context, it does not capture key properties such as relative size and + +Table 2. Fooling rates $(\%)$ of different attack strategies under different $L_{\infty}$ perturbation $\leqslant \epsilon \in \{50,40,30,20,10\}$ . We compare ZQA and ZQA-PSPM with Context-Agnostic ZQA, and Few-Query attacks where feedback from blackbox (BB) models is allowed. The white-box (WB) is Faster R-CNN and three black-box models (BB1, BB2, BB3) are RetinaNet, Libra R-CNN and FoveaBox respectively. Fooling rate is counted as the percentage of attacks where victim is perturbed to a target label and all detected labels satisfy context consistency. Tested on 500 images from VOC 2007 test set which contain multiple (2-6) objects. Shaded cell indicates up to which few-query step, ZQA or ZQA-PSPM has better performance than few-query attack. +Lighter shades are for ZQA, and darker shades are for ZQA-PSPM. + +
Methodε = 50ε = 40ε = 30ε = 20ε = 10
WBBB1BB2BB3WBBB1BB2BB3WBBB1BB2BB3WBBB1BB2BB3WBBB1BB2BB3
Context-Agnostic34.029.030.025.436.826.230.029.635.427.431.227.835.224.430.827.630.413.815.617.8
ZQA90.046.652.254.092.048.055.051.891.646.057.052.287.439.650.451.065.221.023.824.2
ZQA-PSPM92.651.261.656.892.051.855.454.493.049.257.254.088.244.051.453.470.623.227.428.2
Few-Query 060.029.829.834.864.234.634.239.866.234.235.037.861.229.230.835.848.214.814.020.2
Few-Query 164.435.840.443.068.041.044.249.469.641.845.247.668.236.040.243.458.421.623.827.8
Few-Query 277.648.056.259.080.050.052.657.278.447.054.254.677.643.850.049.870.427.029.634.2
Few-Query 386.855.465.065.889.655.458.662.086.254.862.061.286.449.657.255.477.031.434.039.8
Few-Query 491.660.071.869.495.261.463.866.091.258.068.267.289.653.260.659.881.434.237.843.2
Few-Query 595.061.875.073.497.262.868.069.496.261.271.070.693.056.665.263.485.235.840.246.2
+ +Table 3. Follow the setting in Table 2 but use Libra R-CNN as WB and use Faster R-CNN, RetinaNet and FoveaBox as BB1, BB2, BB3 respectively. Fooling rates $(\%)$ of different attack strategies under different $L_{\infty}$ perturbation $\leqslant \epsilon \in \{50,40,30,20,10\}$ are as follows. + +
Methodε = 50ε = 40ε = 30ε = 20ε = 10
WBBB1BB2BB3WBBB1BB2BB3WBBB1BB2BB3WBBB1BB2BB3WBBB1BB2BB3
Context-Agnostic30.626.218.221.434.629.424.224.434.828.820.423.437.624.816.819.429.215.810.213.0
ZQA90.447.833.043.491.848.432.240.088.648.633.041.886.639.425.635.064.423.813.421.6
ZQA-PSPM92.251.034.245.092.452.834.444.092.848.835.242.086.242.827.237.667.225.414.823.4
Few-Query 063.035.625.834.064.237.027.032.263.237.025.233.062.233.223.232.244.019.011.019.6
Few-Query 166.843.632.441.068.243.632.439.267.843.832.039.468.042.828.838.258.628.017.827.4
Few-Query 277.451.838.247.876.851.437.647.278.251.437.445.676.647.433.243.067.633.821.433.0
Few-Query 387.857.845.055.287.459.443.054.085.456.442.850.485.853.036.850.275.436.424.034.6
Few-Query 493.461.047.459.493.463.647.058.891.460.645.455.892.457.439.854.080.840.225.837.6
Few-Query 596.864.849.661.897.067.049.661.095.863.247.058.095.259.641.857.084.641.627.239.6
+ +location of the objects or the relationship between the object and the background. Extending the ZQA attack to more sophisticated context models is a topic for future research. Furthermore, evaluating the ZQA in situations where the attacker uses a different notion of context than the victim system – e.g., attacker uses semantic context, detector uses context learned from pixels – would help researchers understand the broader applicability of this work. + +Another limitation is that it is expensive to precompute the PSPM. Unlike the context graph, which only depends on the dataset, PSPM is a function of the dataset, attack model and perturbation level. We need to measure the attack success rate for each surrogate model at each perturbation level, and for all possible perturbations of a given object. + +Potential negative societal impact and mitigation: This paper, as any other work that investigates an attack method, may be used maliciously to generate attacks against victim systems. Our goal with this work is to reduce technical surprise, and to fuel the development of defenses against powerful attacks. This work already makes the case for using a context-aware detector to thwart simple attacks. To thwart ZQA attacks described in this paper, the detector can attempt to constantly update its training data and label sets, + +and to develop increasingly sophisticated context models. + +# 6. Conclusions + +In this paper, we craft a novel zero-query attack by exploiting "a context graph" that captures co-occurrence relations of objects in a natural image. Against context-aware detectors, the fooling rate is significantly higher than that achieved by a context-agnostic attack. Unlike prior query-based attacks, our attack is extremely hard to detect since it hinges on using a single attempt. It achieves fairly good fooling rates by choosing an attack plan (i.e., perturbing multiple objects simultaneously to ensure context consistency) which is likely to succeed. The key innovation is a PSPM that provides this information offline. We observe that the use of PSPM not only boosts fooling rates in white-box settings, but also carries over to the black-box setting (i.e., when the detector model is different from that of the attacker) consistently for different attacker-defender pairs. + +Acknowledgments. This material is based upon work supported by the Defense Advanced Research Projects Agency (DARPA) under agreement number HR00112090096. Approved for public release; distribution is unlimited. + +# References + +[1] Tao Bai, Jinqi Luo, Jun Zhao, Bihan Wen, and Qian Wang. Recent advances in adversarial training for adversarial robustness. In International Joint Conference on Artificial Intelligence, 2021. 3 +[2] Ehud Barnea and Ohad Ben-Shahar. Exploring the bounds of the utility of context for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7412-7420, 2019. 2 +[3] Ehud Barnea and Ohad Ben-Shahar. Exploring the bounds of the utility of context for object detection. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2019. 2 +[4] Sara Beery, Guanhang Wu, Vivek Rathod, Ronny Votel, and Jonathan Huang. Context R-CNN: Long term temporal context for per-camera object detection. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2020. 2 +[5] 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 Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2016. 2 +[6] Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. International Conference on Learning Representations, 2018. 2 +[7] Zikui Cai, Xinxin Xie, Shasha Li, Mingjun Yin, Chengyu Song, Srikanth V Krishnamurthy, Amit K Roy-Chowdhury, and M Salman Asif. Context-aware transfer attacks for object detection. In Proceedings of the AAAI Conference on Artificial Intelligence, 2022. 2, 3, 7 +[8] Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 3-14, 2017. 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. 1 +[10] Anirban Chakraborty, Manaar Alam, Vishal Dey, Anupam Chattopadhyay, and Debdeep Mukhopadhyay. Adversarial attacks and defences: A survey. arXiv preprint arXiv:1810.00069, 2018.3 +[11] Jianbo Chen, Michael I Jordan, and Martin J Wainwright. Hopskipjumpattack: A query-efficient decision-based attack. In 2020 IEEE symposium on security and privacy (sp), pages 1277-1294. IEEE, 2020. 2 +[12] 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. 6 +[13] Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black- + +box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 15-26, 2017. 2 +[14] Zhe Chen, Shaoli Huang, and Dacheng Tao. Context refinement for object detection. In Proceedings of the European conference on computer vision (ECCV), pages 71-86, 2018. 2 +[15] Ka-Ho Chow, Ling Liu, Margaret Loper, Juhyun Bae, Mehmet Emre Gursoy, Stacey Truex, Wenqi Wei, and Yanzhao Wu. Adversarial objectness gradient attacks in real-time object detection systems. In 2020 Second IEEE International Conference on Trust, Privacy and Security in Intelligent Systems and Applications (TPS-ISA), pages 263–272. IEEE, 2020. 3 +[16] Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting Adversarial Attacks with Momentum. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9185-9193, 2018. 2, 6 +[17] Nikita Dvornik, Julien Mairal, and Cordelia Schmid. Modeling visual context is key to augmenting object detection datasets. In Proceedings of the European Conference on Computer Vision (ECCV), pages 364-380, 2018. 2 +[18] 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. 2, 6 +[19] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. 1, 3, 5 +[20] Chuan Guo, Jacob Gardner, Yurong You, Andrew Gordon Wilson, and Kilian Weinberger. Simple black-box adversarial attacks. In International Conference on Machine Learning, pages 2484-2493. PMLR, 2019. 2 +[21] Chuan Guo, Mayank Rana, Moustapha Cisse, and Laurens Van Der Maaten. Countering adversarial images using input transformations. In International Conference on Learning Representations, 2017. 3 +[22] Andrew Hollingworth. Does consistent scene context facilitate object perception? Journal of Experimental Psychology: General, 127(4):398, 1998. 2 +[23] Shengnan Hu, Yang Zhang, Sumit Laha, Ankit Sharma, and Hassan Foroosh. Cca: Exploring the possibility of contextual camouflage attack on object detection. In 2020 25th International Conference on Pattern Recognition (ICPR), pages 7647-7654. IEEE, 2021. 3 +[24] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, Lei Li, and Jianbo Shi. Foveabox: Beyound anchor-based object detection. IEEE Transactions on Image Processing, 29:7389-7398, 2020. 1, 6 +[25] Huichen Li, Xiaojun Xu, Xiaolu Zhang, Shuang Yang, and Bo Li. Qeba: Query-efficient boundary-based blackbox attack. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1221-1230, 2020. 2 +[26] Maosen Li, Cheng Deng, Tengjiao Li, Junchi Yan, Xinbo Gao, and Heng Huang. Towards transferable targeted attack. + +In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 641-649, 2020. 2 +[27] Qizhang Li, Yiwen Guo, and Hao Chen. Practical no-box adversarial attacks against dnns. Advances in Neural Information Processing Systems, 33:12849-12860, 2020. 2 +[28] Shasha Li, Shitong Zhu, Sudipta Paul, Amit Roy-Chowdhury, Chengyu Song, Srikanth Krishnamurthy, Ananthram Swami, and Kevin S Chan. Connecting the dots: Detecting adversarial perturbations using context inconsistency. In European Conference on Computer Vision, pages 396-413. Springer, 2020. 2, 3 +[29] 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. 1, 6 +[30] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 6 +[31] 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. 3 +[32] Xin Liu, Huanrui Yang, Ziwei Liu, Linghao Song, Hai Li, and Yiran Chen. Dpatch: An adversarial patch attack on object detectors. AAAI Workshop on Artificial Intelligence Safety, 2019. 3 +[33] Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. 5th International Conference on Learning Representations, ICLR 2017 - Conference Track Proceedings, 2017. 2 +[34] Yong Liu, Ruiping Wang, Shiguang Shan, and Xilin Chen. Structure inference net: Object detection using scene-level context and instance-level relationships. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6985-6994, 2018. 2 +[35] 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. 1, 3, 5 +[36] 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, 2017. 3 +[37] Roozbeh Mottaghi, Xianjie Chen, Xiaobai Liu, Nam-Gyu Cho, Seong-Whan Lee, Sanja Fidler, Raquel Urtasun, and Alan Yuille. The role of context for object detection and semantic segmentation in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 891–898, 2014. 2 +[38] Aude Oliva, Antonio Torralba, Monica S Castelhano, and John M Henderson. Top-down control of visual attention in object detection. In Proceedings 2003 International Conference on Image Processing (Cat. No. 03CH37429), volume 1, pages I-253. IEEE, 2003. 2 + +[39] Jiangmiao Pang, Kai Chen, Jianping Shi, Huajun Feng, Wanli Ouyang, and Dahua Lin. Libra r-cnn: Towards balanced learning for object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 6 +[40] Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016. 3 +[41] Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia conference on computer and communications security, pages 506-519, 2017. 1, 2 +[42] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2016. 1, 2, 3 +[43] Kui Ren, Tianhang Zheng, Zhan Qin, and Xue Liu. Adversarial attacks and defenses in deep learning. Engineering, 6(3):346-360, 2020. 3 +[44] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 1, 2, 3, 6 +[45] Aniruddha Saha, Akshayvarun Subramanya, Koninika Patil, and Hamed Piriavash. Role of spatial context in adversarial robustness for object detection. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, 2020. 3 +[46] Ruslan Salakhutdinov, Antonio Torralba, and Josh Tenenbaum. Learning to share visual appearance for multiclass object detection. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2011. 2 +[47] Pouya Samangouei, Maya Kabbab, and Rama Chellappa. Defense-gan: Protecting classifiers against adversarial attacks using generative models. In International Conference on Learning Representations, 2018. 3 +[48] Samuel Henrique Silva and Peyman Najafirad. Opportunities and challenges in deep learning adversarial robustness: A survey. arXiv preprint arXiv:2007.00753, 2020. 3 +[49] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, 2014. 1 +[50] Antonio Torralba. Contextual priming for object detection. International journal of computer vision, 53(2):169-191, 2003. 2 +[51] Florian Tramér, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. In International Conference on Learning Representations, 2018. 3 +[52] Angtian Wang, Yihong Sun, Adam Kortylewski, and Alan Yuille. Robust object detection under occlusion with context-aware compositionalnets. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2020. 2 + +[53] Yajie Wang, Yu an Tan, Wenjiao Zhang, Yuhang Zhao, and Xiaohui Kuang. An adversarial attack on DNN-based black-box object detectors. Journal of Network and Computer Applications, 161, 2020. 2 +[54] Xingxing Wei, Siyuan Liang, Ning Chen, and Xiaochun Cao. Transferable adversarial attacks for image and video object detection. In *IJCAI International Joint Conference on Artificial Intelligence*, 2019. 3 +[55] Zuxuan Wu, Ser-Nam Lim, Larry S Davis, and Tom Goldstein. Making an invisibility cloak: Real world adversarial attacks on object detectors. In European Conference on Computer Vision, pages 1-17. Springer, 2020. 1, 3 +[56] Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. In International Conference on Learning Representations, 2018. 3 +[57] Cihang Xie, Jianyu Wang, Zhishuai Zhang, Yuyin Zhou, Lingxi Xie, and Alan Yuille. Adversarial examples for semantic segmentation and object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 1369-1378, 2017. 1, 3 +[58] Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 501-509, 2019. 3 +[59] Cihang Xie, Zhishuai Zhang, Yuyin Zhou, Song Bai, Jianyu Wang, Zhou Ren, and Alan L Yuille. Improving transferability of adversarial examples with input diversity. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2730-2739, 2019. 6 +[60] Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. In Annual Network and Distributed System Security Symposium, 2017. 3 +[61] Jian Yao, Sanja Fidler, and Raquel Urtasun. Describing the scene as a whole: Joint object detection, scene classification and semantic segmentation. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2012. 2 +[62] Mingjun Yin, Shasha Li,zikui Cai, Chengyu Song, M Salman Asif, Amit K Roy-Chowdhury, and Srikanth V Krishnamurthy. Exploiting multi-object relationships for detecting adversarial attacks in complex scenes. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7858-7867, 2021. 2, 3 +[63] Hantao Zhang, Wengang Zhou, and Houqiang Li. Contextual Adversarial Attacks for Object Detection. International Conference on Multimedia and Expo (ICME), 2020. 3 \ No newline at end of file diff --git a/zeroquerytransferattacksoncontextawareobjectdetectors/images.zip b/zeroquerytransferattacksoncontextawareobjectdetectors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7ed7d872afde2cf8f85f4d880461a4c116020baa --- /dev/null +++ b/zeroquerytransferattacksoncontextawareobjectdetectors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63474c55f99521894dd44620311ebd65ff62675917c71eb1d35230faadd35f6a +size 451050 diff --git a/zeroquerytransferattacksoncontextawareobjectdetectors/layout.json b/zeroquerytransferattacksoncontextawareobjectdetectors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..718cfa8630990988268bf82ed253b939d4912a33 --- /dev/null +++ b/zeroquerytransferattacksoncontextawareobjectdetectors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:985beb97f0498d28f5a9711a8a529dcd064cf635ded8315a3b0119396d884b25 +size 449827 diff --git a/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_content_list.json b/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..14e032bb5452e0129b34a0df2159a7c9c3fca298 --- /dev/null +++ b/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e31ea3133349d6c7797ace7830ec23e405ea5ce6653a6b3bffdbe17ba8a6eef2 +size 81664 diff --git a/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_model.json b/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ae1302febad15665ac04797467957617b9cd837f --- /dev/null +++ b/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa3b0c590b70fef167c2b6d5d94a578442634025edc27e34ea9b9252e9777e62 +size 103182 diff --git a/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_origin.pdf b/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..134ead23d3c058740736f6ef040f42720b70c0ab --- /dev/null +++ b/zeroshottextguidedobjectgenerationwithdreamfields/dc4ea712-e328-4af7-a178-a89d47e5dcc8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd894db8a0633691dbcd6da79c75ea8d282fd5002f0681c345811103c30916d2 +size 4999501 diff --git a/zeroshottextguidedobjectgenerationwithdreamfields/full.md b/zeroshottextguidedobjectgenerationwithdreamfields/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a0cc26f0f18ca73587043654f23c23ba2b423630 --- /dev/null +++ b/zeroshottextguidedobjectgenerationwithdreamfields/full.md @@ -0,0 +1,342 @@ +# Zero-Shot Text-Guided Object Generation with Dream Fields + +Ajay Jain $^{1,2*}$ + +Ben Mildenhall2 + +Jonathan T. Barron + +Pieter Abbeel + +Ben Poole + +![](images/bac225cc617f9c5d50ee002f0adeadebb51947056cc3fa5681857e1f912da5f5.jpg) +Figure 1. Given a caption, we learn a Dream Field, a continuous volumetric representation of an object's geometry and appearance learned with guidance from a pre-trained model. We optimize the Dream Field by rendering images of the object from random camera poses that are scored with frozen pretrained image and text encoders trained on web images and alt-text. 2D views share the same underlying radiance field for consistent geometry. + +![](images/5a941d6a670aa223beea3ae541135474ced0fff4e8dba105240b92ac367731be.jpg) +Figure 2. Example Dream Fields rendered from four perspectives. On the right, we show transmittance from the final perspective. We create diverse outputs using the compositionality of language; these captions from MSCOCO describe three flower arrangements with different properties like context and color. + +# Abstract + +We combine neural rendering with multi-modal image and text representations to synthesize diverse 3D objects solely from natural language descriptions. Our method, Dream Fields, can generate the geometry and color of a wide range of objects without 3D supervision. Due to the scarcity of diverse, captioned 3D data, prior methods only generate objects from a handful of categories, such as ShapeNet. Instead, we guide generation with image-text models pre-trained on large datasets of captioned images from the web. Our method optimizes a Neural Radiance Field from many camera views so that rendered images score highly with a target caption according to a pre-trained CLIP model. To improve fidelity and visual quality, we introduce simple geometric priors, including sparsity-inducing transmittance regularization, scene bounds, and new MLP architectures. In experiments, Dream Fields produce realistic, multi-view consistent object geometry and color from a variety of natural language captions. + +# 1. Introduction + +Detailed 3D object models bring multimedia experiences to life. Games, virtual reality applications and films are each populated with thousands of object models, each designed and textured by hand with digital software. While expert artists can author high-fidelity assets, the process is painstakingly slow and expensive. Prior work leverages 3D datasets to synthesize shapes in the form of point clouds, voxel grids, triangle meshes, and implicit functions using generative models like GANs [4,21,57,65]. These approaches only support a few object categories due to small labeled 3D shape datasets. But multimedia applications require a wide variety of content, and need both 3D geometry and texture. + +In this work, we propose Dream Fields, a method to automatically generate open-set 3D models from natural language prompts. Unlike prior work, our method does not require any 3D training data, and uses natural language prompts that are easy to author with an expressive interface for specifying desired object properties. We demonstrate that the compositionality of language allows for flexible creative control over shapes, colors and styles. + +A Dream Field is a Neural Radiance Field (NeRF) trained to maximize a deep perceptual metric with respect to both + +the geometry and color of a scene. NeRF and other neural 3D representations have recently been successfully applied to novel view synthesis tasks where ground-truth RGB photos are available. NeRF is trained to reconstruct images from multiple viewpoints. As the learned radiance field is shared across viewpoints, NeRF can interpolate between viewpoints smoothly and consistently. Due to its neural representation, NeRF can be sampled at high spatial resolutions unlike voxel representations and point clouds, and are easy to optimize unlike explicit geometric representations like meshes as it is topology-free. + +However, existing photographs are not available when creating novel objects from descriptions alone. Instead of learning to reconstruct known input photos, we learn a radiance field such that its renderings have high semantic similarity with a given text prompt. We extract these semantics with pre-trained neural image-text retrieval models like CLIP [46], learned from hundreds of millions of captioned images. As NeRF's volumetric rendering and CLIP's image-text representations are differentiable, we can optimize Dream Fields end-to-end for each prompt. Figure 1 illustrates our method. + +In experiments, Dream Fields learn significant artifacts if we naively optimize the NeRF scene representation with textual supervision without adding additional geometric constraints (Figure 3). We propose general-purpose priors and demonstrate that they greatly improve the realism of results. Finally, we quantitatively evaluate open-set generation performance using a dataset of diverse object-centric prompts. Our contributions include: + +- Using aligned image and text models to optimize NeRF without 3D shape or multi-view data, +- Dream Fields, a simple, constrained 3D representation with neural guidance that supports diverse 3D object generation from captions in zero-shot, and +- Simple geometric priors including transmittance regularization, scene bounds, and an MLP architecture that together improve fidelity. + +# 2. Related Work + +Our work is primarily inspired by DeepDream [34] and other methods for visualizing the preferred inputs and features of neural networks by optimizing in image space [36, 37, 39]. These methods enable the generation of interesting images from a pre-trained neural network without the additional training of a generative model. Closest to our work is [35], which studies differentiable image parameterizations in the context of style transfer. Our work replaces the style and content-based losses from that era with an image-text loss enabled by progress in contrastive representation learning on image-text datasets [12, 26, 46, 60]. The use of image-text models enables easy and flexible control over the style and content of generated imagery through textual prompt design. We optimize both geometry and color using + +![](images/e35d337d917f30da49d7ea81f5cec687d5c0cdfe2566ba196566f160877f799e.jpg) +Figure 3. Challenges of text-to-3D synthesis: (a) Poor generalization from limited 3D datasets: Most 3D generative models are learned on datasets of specific object categories like ShapeNet [7], and won't generalize to novel concepts zero-shot. (b) Neural Radiance Fields are too flexible without multi-view supervision: NeRF learns to represent geometry and texture from scene-specific multi-view data, so it does not require a diverse dataset of objects. Yet, when only a source caption is available instead of multi-view images, NeRF produces significant artifacts (e.g., near field occlusions). (c) Dream Fields: We introduce general geometric priors that retain much of NeRF's flexibility while improving realism. + +![](images/a9a48a1f275c6a87cc49fd9f40da07634fdf07fbcb2a167f8eaaba1da7dfb765.jpg) + +the differentiable volumetric rendering and scene representation provided by NeRF, whereas [35] was restricted to fixed geometry and only optimized texture. Together these advances enable a fundamentally new capability: open-ended text-guided generation of object geometry and texture. + +Concurrently to Dream Fields, a few early works have used CLIP [46] to synthesize or manipulate 3D object representations. CLIP-Forge [49] generates multiple object geometries from text prompts using a CLIP embedding-conditioned normalizing flow model and geometry-only decoder trained on ShapeNet categories. Still, CLIP-Forge generalizes poorly outside of ShapeNet categories and requires ground-truth multi-view images and voxel data. Text2Shape [9] learns a text-conditional Wasserstein GAN [1, 19] to synthesize novel voxelized objects, but only supports finite resolution generation of individual ShapeNet categories. In [10], object geometry is optimized evolutionarily for high CLIP score from a single view then manually colored. ClipMatrix [25] edits the vertices and textures of human SMPL models [31] to create stylized, deformable humanoid meshes. [44] creates an interactive interface to edit signed-distance fields in localized regions, though they do not optimize texture or synthesize new shapes. Text-based manipulation of existing objects is complementary to us. + +For images, there has been an explosion of work that leverages CLIP to guide image generation. Digital artist Ryan Murdock (@advadnoun) used CLIP to guide learning of the weights of a SIREN network [52], similar to NeRF + +but without volume rendering and focused on image generation. Katherine Crowson (@rivershavewings) combined CLIP with optimization of VQ-GAN codes [16] and used diffusion models as an image prior [14]. Recent work from Mario Klingemann (@quasimondo) and [43] have shown how CLIP can be used to guide GAN models like StyleGAN [27]. Some works have optimized parameters of vector graphics, suggesting CLIP guidance is highly general [17, 23, 50]. These methods highlighted the surprising capacity of what image-text models have learned and their utility for guiding 2D generative processes. Direct text to image synthesis with generative models has also improved tremendously in recent years [48, 61], but requires training large generative models on large-scale datasets, making such methods challenging to directly apply to text to 3D where no such datasets exist. + +There is also growing progress on generative models with NeRF-based generators trained solely from 2D imagery. However, these models are category-specific and trained on large datasets of mostly forward-facing scenes [5,20,38,51,66], lacking the flexibility of open-set text-conditional models. Shape-agnostic priors have been used for 3D reconstruction [2,58,64]. + +# 3. Background + +Our method combines Neural Radiance Fields (NeRF) [33] with an image-text loss from [46]. We begin by discussing these existing methods, and then detail our improved approach and methodology that enables high quality text to object generation. + +# 3.1. Neural Radiance Fields + +NeRF [33] parameterizes a scene's density and color using a multi-layer perceptron (MLP) with parameters $\theta$ trained with a photometric loss relying on multi-view photographs of a scene. In our simplified model, the NeRF network takes in a 3D position $\mathbf{x}$ and outputs parameters for an emission-absorption volume rendering model: density $\sigma_{\theta}(\mathbf{x})$ and color $\mathbf{c}_{\theta}(\mathbf{x})$ . Images can be rendered from desired viewpoints by integrating color along an appropriate ray, $\mathbf{r}(t)$ , for each pixel according to the volume rendering equation: + +$$ +\mathbf {C} (r, \theta) = \int_ {t _ {n}} ^ {t _ {f}} T (\mathbf {r}, t) \sigma_ {\theta} (\mathbf {r} (t)) \mathbf {c} _ {\theta} (\mathbf {r} (t)) d t, \tag {1} +$$ + +$$ +\text {w h e r e} T (\mathbf {r}, \theta , t) = \exp \left(- \int_ {t _ {n}} ^ {t} \sigma_ {\theta} (\mathbf {r} (s)) d s\right). \tag {2} +$$ + +The integral $T(\mathbf{r},\theta ,t)$ is known as "transmittance" and describes the probability that light along the ray will not be absorbed when traveling from $t_n$ (the near scene bound) to $t$ . In practice [33], these two integrals are approximated by breaking up the ray into smaller segments $[t_{i - 1},t_i)$ within + +which $\sigma$ and $\mathbf{c}$ are assumed to be roughly constant: + +$$ +\mathbf {C} (\mathbf {r}, \theta) \approx \sum_ {i} T _ {i} \left(1 - \exp \left(- \sigma_ {\theta} \left(\mathbf {r} \left(t _ {i}\right)\right) \delta_ {i}\right)\right) \mathbf {c} _ {\theta} \left(\mathbf {r} \left(t _ {i}\right)\right) \tag {3} +$$ + +$$ +T _ {i} = \exp \left(- \sum_ {j < i} \sigma_ {\theta} (\mathbf {r} (t _ {j})) \delta_ {j}\right), \quad \delta_ {i} = t _ {i} - t _ {i - 1}. \tag {4} +$$ + +For a given setting of MLP parameters $\theta$ and pose $\mathbf{p}$ , we determine the appropriate ray for each pixel, compute rendered colors $C(\mathbf{r},\theta)$ and transmittances, and gather the results to form the rendered image, $I(\theta ,\mathbf{p})$ and transmittance $T(\theta ,\mathbf{p})$ . + +In order for the MLP to learn high frequency details more quickly [55], the input $\mathbf{x}$ is preprocessed by a sinusoidal positional encoding $\gamma$ before being passed into the network: + +$$ +\gamma (\mathbf {x}) = \left[ \cos \left(2 ^ {l} \mathbf {x}\right), \sin \left(2 ^ {l} \mathbf {x}\right) \right] _ {l = 0} ^ {L - 1}, \tag {5} +$$ + +where $L$ is referred to as the number of "levels" of positional encoding. In our implementation, we specifically apply the integrated positional encoding (IPE) proposed in mip-NeRF to combat aliasing artifacts [3] combined with a random Fourier positional encoding basis [55] with frequency components sampled according to + +$$ +\omega = 2 ^ {u} \mathbf {d}, \quad \text {w h e r e} u \sim \mathcal {U} [ 0, L ], \mathbf {d} \sim \mathcal {U} (\mathbb {S} ^ {2}). \tag {6} +$$ + +# 3.2. Image-text models + +Large-scale datasets of images paired with associated text have enabled training large-scale models that can accurately score whether an image and an associated caption are likely to correspond [12, 26, 46]. These models consist of an image encoder $\mathbf{g}$ , and text encoder $\mathbf{h}$ , that map images and text into a shared embedding space. Given a sentence $y$ and an image $\mathbf{I}$ , these image-text models produce a scalar score: $\mathbf{g}(\mathbf{I})^{\mathrm{T}}\mathbf{h}(\mathbf{y})$ that is high when the text is a good description of the image, and low when the image and text are mismatched. Note that the embeddings $\mathbf{g}(\mathbf{I})$ and $\mathbf{h}(\mathbf{y})$ are often normalized, i.e. $\| \mathbf{g}(\mathbf{I}) \| = \| \mathbf{h}(\mathbf{y}) \| = 1$ . Training is typically performed with a symmetric version of the InfoNCE loss [40, 45] that aims to maximize a variational lower bound on the mutual information between images and text. Prior work has shown that once trained, the image and text encoders are useful for a number of downstream tasks [46, 60]. In [48], the image and text encoders are used to score the correspondence of outputs of a generative image model to a target caption [48]. We build on this work by optimizing a volume to produce a high-scoring image, not just reranking. + +# 4. Method + +In this section, we develop Dream Fields: a zero-shot object synthesis method given only a natural language caption. + +# 4.1. Object representation + +Building on the NeRF scene representation (Section 3.1), a Dream Field optimizes an MLP with parameters $\theta$ that produces outputs $\sigma_{\theta}(\mathbf{x})$ and $\mathbf{c}_{\theta}(\mathbf{x})$ representing the differential + +volume density and color of a scene at every 3D point $\mathbf{x}$ . This field expresses object geometry via the density network. Our object representation is only dependent on 3D coordinates and not the camera's viewing direction, as we did not find it beneficial. Given a camera pose $\mathbf{p}$ , we can render an image $\mathbf{I}(\theta, \mathbf{p})$ and compute the transmittance $T(\theta, \mathbf{p})$ using $N$ segments via (4). Segments are spaced at roughly equal intervals with random jittering along the ray. The number of segments, $N$ , determines the fidelity of the rendering. In practice, we fix it to 192 during optimization. + +# 4.2. Objective + +How can we train a Dream Field to represent a given caption? If we assume that an object can be described similarly when observed from any perspective, we can randomly sample poses and try to enforce that the rendered image matches the caption at all poses. We can implement this idea by using a CLIP network to measure the match between a caption and image given parameters $\theta$ and pose $\mathbf{p}$ : + +$$ +\mathcal {L} _ {\mathrm {C L I P}} (\theta , \text {p o s e} \mathbf {p}, \text {c a p t i o n} y) = - \mathbf {g} (\mathbf {I} (\theta , \mathbf {p})) ^ {\mathrm {T}} \mathbf {h} (\mathbf {y}) \tag {7} +$$ + +where $\mathbf{g}(\cdot)$ and $\mathbf{h}(\cdot)$ are aligned representations of image and text semantics, and $\mathbf{I}(\theta, \mathbf{p})$ is a rendered image of the scene from camera pose $\mathbf{p}$ . Each iteration of training, we sample a pose $\mathbf{p}$ from a prior distribution, render $\mathbf{I}$ , and minimize $\mathcal{L}_{\mathrm{CLIP}}$ with respect to the parameters of the Dream Field MLP, $\theta$ . Equation (7) measures the similarity of an image and the provided caption in feature space. + +We primarily use image and text encoders from CLIP [46], which has a Vision Transformer image encoder $\mathbf{g}(\cdot)$ [15] and masked transformer text encoder $\mathbf{h}(\cdot)$ [56] trained contrastively on a large dataset of 400M captioned $224^{2}$ images. We also use a baseline Locked Image-Text Tuning (LiT) ViT B/32 model from [60] trained via the same procedure as CLIP on a larger dataset of billions of higher-resolution $(288^{2})$ captioned images. The LiT training set was collected following a simplified version of the ALIGN web alt-text dataset collection process [26] and includes noisy captions. + +Figure 1 shows a high-level overview of our method. DietNeRF [24] proposed a related semantic consistency regularizer for NeRF based on the idea that "a bulldozer is a bulldozer from any perspective". The method computed the similarity of a rendered and a real image. In contrast, (7) compares rendered images and a caption, allowing it to be used in zero-shot settings when there are no object photos. + +# 4.3. Challenges with CLIP guidance + +Due to their flexibility, Neural Radiance Fields are capable of high-fidelity novel view synthesis on a tremendous diversity of real-world scenes when supervised with multiview consistent images. Their reconstruction loss will typically learn to remove artifacts like spurious density when sufficiently many input images are available. However, we + +![](images/dce48110b1f10ff899657295701f70fbd8a96cb60b38efb02f67c529982ad92b.jpg) +Figure 4. To encourage coherent foreground objects, Dream Fields train with 3 types of background augmentations: blurred Gaussian noise, textures and checkerboards. At test time, we render with a white background. Prompt: "A sculpture of a rooster." + +find that the NeRF scene representation is too unconstrained when trained solely with $\mathcal{L}_{\mathrm{CLIP}}$ (7) alone from a discrete set of viewpoints, resulting in severe artifacts that satisfy $\mathcal{L}_{\mathrm{CLIP}}$ but are not visually compatible according to humans (see Figure 3b). NeRF learns high-frequency and near-field [62] artifacts like partially-transparent "floating" regions of density. It also fills the entire camera viewpoint rather than generating individual objects. Geometry is unrealistic, though textures reflect the caption, reminiscent of the artifacts in Deep Dream feature visualizations [34, 39]. + +# 4.4. Pose sampling + +Image data augmentations such as random crops are commonly used to improve and regularize image generation in DeepDream [34] and related work. Image augmentations can only use in-plane 2D transformations. Dream Fields support 3D data augmentations by sampling different camera pose extrinsics at each training iteration. We uniformly sample camera azimuth in $360^{\circ}$ around the scene, so each training iteration sees a different orientation of the object. As the underlying scene representation is shared, this improves the realism of object geometry. For example, sampling azimuth in a narrow interval tended to create flat, billboard geometry. + +The camera elevation, focal length and distance from the subject can also be augmented, but we did not find this necessary. Instead, we use a fixed camera focal length during optimization that is scaled by $m_{\mathrm{focal}} = 1.2$ to enlarge the object $20\%$ . Rendering cost is constant in the focal length. + +# 4.5. Encouraging coherent objects through sparsity + +To remove near-field artifacts and spurious density, we regularize the opacity of Dream Field renderings. Our best results maximize the average transmittance of rays passing through the volume up to a target constant. Transmittance is the probability that light along ray $r$ is not absorbed by participating media when passing between point $t$ along the ray and the near plane at $t_n$ (2). We approximate the total transmittance along the ray as the joint probability of light passing through $N$ discrete segments of the ray according to + +Eq. (4). Then, we define the following transmittance loss: + +$$ +\mathcal {L} _ {T} = - \min (\tau , \operatorname {m e a n} (T (\theta , \mathbf {p}))) \tag {8} +$$ + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {C L I P}} + \lambda \mathcal {L} _ {T} \tag {9} +$$ + +This encourages a Dream Field to increase average transmittance up to a target transparency $\tau$ . We use $\tau = 88\%$ in experiments. $\tau$ is annealed in from $\tau = 40\%$ over 500 iterations to smoothly introduce transparency, which improves scene geometry and is essential to prevent completely transparent scenes. Scaling $1 - \tau \propto f^2 / d^2$ preserves object cross sectional area for different focal and object distances. + +When the rendering is alpha-composed with a simple white or black background during training, we find that the average transmittance approaches $\tau$ , but the scene is diffuse as the optimization populates the background. Augmenting the scene with random background images leads to coherent objects. Dream Fields use Gaussian noise, checkerboard patterns and the random Fourier textures from [35] as backgrounds. These are smoothed with a Gaussian blur with randomly sampled standard deviation. Background augmentations and a rendering during training are shown in Figure 4. + +We qualitatively compare (9) to baseline sparsity regularizers in Figure 5. Our loss is inspired by the multiplicative opacity gating used by [35]. However, the gated loss has optimization challenges in practice due in part to its nonconvexity. The simplified additive loss is more stable, and both are significantly sharper than prior approaches for sparsifying Neural Radiance Fields. + +# 4.6. Localizing objects and bounding scene + +When Neural Radiance Fields are trained to reconstruct images, scene contents will align with observations in a consistent fashion, such as the center of the scene in NeRF's Realistic Synthetic dataset [33]. Dream Fields can place density away from the center of the scene while still satisfying the CLIP loss as natural images in CLIP's training data will not always be centered. During training, we maintain an estimate of the 3D object's origin and shift rays accordingly. The origin is tracked via an exponential moving average of the center of mass of rendered density. To prevent objects from drifting too far, we bound the scene inside a cube by masking the density $\sigma_{\theta}$ . + +# 4.7. Neural scene representation architecture + +The NeRF network architecture proposed in [33] parameterizes scene density with a simple 8-layer MLP of constant width, and radiance with an additional two layers. We use a residual MLP architecture instead that introduces residual connections around every two dense layers. Within a residual block, we find it beneficial to introduce Layer Normalization at the beginning and increase the feature dimension in a bottleneck fashion. Layer Normalization improves optimization on challenging prompts. To mitigate vanishing gradient + +![](images/82deb6431c7c1c69d1816b57bf47e028e7dee160161bb7a1facda66a87496300.jpg) +Figure 5. Our transmittance losses and background augmentations are complementary. Top: Without background augmentations, priors on transmittance (right three columns) do not remove low-density structures. NeRF's density perturbations improve coherence, but cloudy artifacts remain. Bottom: When the object is alpha composited with random backgrounds during training, CLIP fills the scene with opaque material to conceal the background. However, gated and our simplified additive transmittance regularizers both limit the opacity of the volume successfully and lead to a sharper object. Inset panels depict transmittance. Prompt: "an illustration of a pumpkin on the vine." + +issues in highly transparent scenes, we replace ReLU activations with Swish [47] and rectify the predicted density $\sigma_{\theta}$ with a softmax function. Our MLP architecture uses 280K parameters per scene, while NeRF uses 494K parameters. + +# 5. Evaluation + +We evaluate the consistency of generated objects with their captions and the importance of scene representation, then show qualitative results and test whether Dream Fields can generalize compositionally. Ablations analyze regularizers, CLIP and camera poses. Finally, supplementary materials have further examples and videos. + +# 5.1. Experimental setup + +3D reconstruction methods are evaluated by comparing the learned geometry with a ground-truth reference model, e.g. with Chamfer Distance. Novel view synthesis techniques like LLFF [32] and NeRF do not have ground truth models, but compare renderings to pixel-aligned ground truth images from held-out poses with PSNR or LPIPS, a deep perceptual metric [63]. + +As we do not have access to diverse captioned 3D models or captioned multi-view data, Dream Fields are challenging to evaluate with geometric and image reference-based metrics. Instead, we use the CLIP R-Precision metric [41] from the text-to-image generation literature to measure how well rendered images align with the true caption. In the context of text-to-image synthesis, R-Precision measures the fraction of generated images that a retrieval model associates with the caption used to generate it. We use a different CLIP model for learning the Dream Field and computing the evaluation metric. As with NeRF evaluation, the image is rendered from + +a held-out pose. Dream Fields are optimized with cameras at a $30^{\circ}$ angle of elevation and evaluated at $45^{\circ}$ elevation. For quantitative metrics, we render at resolution $168^{2}$ during training as in [24]. For figures, we train with a $50\%$ higher resolution of $252^{2}$ . + +We collect an object-centric caption dataset with 153 captions as a subset of the Common Objects in Context (COCO) dataset [28] (see supplement for details). Object centric examples are those that have a single bounding box annotation and are filtered to exclude those captioned with certain phrases like "extreme close up". COCO includes 5 captions per image, but only one is used for generation. Hyperparameters were manually tuned for perceptual quality on a set of 20-74 distinct captions from the evaluation set, and are shared across all other scenes. Additional dataset details and hyperparameters are included in the supplement. + +# 5.2. Analyzing retrieval metrics + +In the absence of 3D training data, Dream Fields use geometric priors to constrain generation. To evaluate each proposed technique, we start from a simplified baseline Neural Radiance Field largely following [33] and introduce the priors one-by-one. We generate two objects per COCO caption using different seeds, for a total of 306 objects. Objects are synthesized with 10K iterations of CLIP ViT B/16 guided optimization of $168 \times 168$ rendered images, bilinearly upsampled to the contrastive model's input resolution for computational efficiency. R-Precision is computed with CLIP ViT B/32 [46] and $\mathrm{LiT_{uu}B / 32}$ [60] to measure the alignment of generations with the source caption. + +Table 1 reports results. The most significant improvements come from sparsity, scene bounds and architecture. As an oracle, the ground truth images associated with object-centric COCO captions have high R-Precision. The NeRF representation converges poorly and introduces aliasing and banding artifacts, in part from its use of axis-aligned positional encodings. + +We instead combine mip-NeRF's integrated positional encodings with random Fourier features, which improves qualitative results and removes a bias toward axis-aligned structures. However, the effect on precision is neutral or negative. The transmittance loss $\mathcal{L}_T$ in combination with background augmentations significantly improves retrieval precision $+18\%$ and $+15.6\%$ , while the transmittance loss is not sufficient on its own. This is qualitatively shown in Figure 5. Our MLP architecture with residual connections, normalization, bottleneck-style feature dimensions and smooth nonlinearities further improves the R-Precision $+8\%$ and $+2\%$ . Bounding the scene to a cube improves retrieval $+13\%$ and $+11\%$ . The additional bounds explicitly mask density $\sigma$ and concentrate samples along each ray. + +We also scale up Dream Fields by optimizing with an image-text model trained on a larger captioned dataset of + +
MethodR-Precision ↑
CLIP B/32LiTuu B/32
BaselineCOCO GT images77.1±3.475.2±3.5
Simplified NeRF31.4±2.710.8±1.8
Positional encoding+ mip-NeRF IPE29.7±2.612.4±1.9
+ Higher freq.24.2±2.510.5±1.8
Fourier features
Sparsity, augment+ random crops25.8±2.510.5±1.8
+ transmittance loss23.7±2.47.6±1.5
+ background aug.44.1±2.826.1±2.5
Scene param.+ MLP architecture52.0±2.927.8±2.6
+ scene bounds65.4±2.738.9±2.8
+ track origin59.8±2.834.6±2.7
Scaling+ LiTuu ViT B/3259.5±2.8-
+ 20K iterations, 2522 renders68.3±2.7-
+ +Table 1. When used together, geometric priors improve caption retrieval precision. We start with a simplified version of the NeRF scene representation and add in one prior at a time until all are used in conjunction. Captions are retrieved from rendered images of the generated objects at held-out camera poses using CLIP's ViT B/32. Objects are generated with $\mathcal{L}_{\mathrm{CLIP}}$ guidance from the pre-trained CLIP ViT B/16 except in scaling experiments where we experiment with the higher-resolution $\mathrm{LiT_{uu}B / 32}$ model. + +3.6B images from [60]. We use a ViT B/32 model with image and text encoders trained from scratch. This corresponds to the uu configuration from [60], following the CLIP training procedure to learn both encoders contrastively. The $\mathrm{LiT}_{\mathrm{uu}}$ ViT encoder used in our experiments takes higher resolution $288^{2}$ images while CLIP is trained with $224^{2}$ inputs. Still, $\mathrm{LiT}_{\mathrm{uu}}$ B/32 is more compute-efficient than CLIP B/16 due to the larger patch size in the first layer. + +$\mathrm{LiT_{uu}}$ does not significantly help R-Precision when optimizing Dream Fields with low resolution renderings, perhaps because the CLIP B/32 model used for evaluation is trained on the same dataset as the CLIP B/16 model in earlier rows. Optimizing for longer with higher resolution $252^{2}$ renderings closes the gap. $\mathrm{LiT_{uu}}$ improves visual quality and sharpness (Appendix A), suggesting that improvements in multimodal image-text models transfer to 3D generation. + +# 5.3. Compositional generation + +In Figure 6, we show non-cherrypicked generations that test the compositional generalization of Dream Fields to fine-grained variations in captions taken from the website of [48]. We independently vary the object generated and stylistic descriptors like shape and materials. DALL-E [48] also had a remarkable ability to combine concepts in prompts out of distribution, but was limited to 2D image synthesis. + +![](images/51fd55b82855bdbe02810d0c1182929ba4e2a17a57eb16ceb377784dd83d4326.jpg) +Figure 6. Compositional object generation. Dream Fields allow users to express specific artistic styles via detailed captions. Top two rows: Similar to text-to-image experiments in [48], we generate objects with the caption "armchair in the shape of an avocado. armchair imitating avocado." Bottom: Generations vary the texture of a single snail. Captions follow the template "a snail made of baguette. a snail with the texture of baguette" Results are not cherry-picked. + +
MethodLoss or parameterizationR-Prec.
No regularizer\(\mathcal{L}_{\text{CLIP}} (7)\)35.3
Perturb \(\sigma\) [33]\(\sigma = \text{softplus}(f_{\theta}(\mathbf{x}) + \epsilon)\)47.7
Beta prior [30](10)50.3
Gated T [35]- mean\((T(\theta, \mathbf{p})) \cdot \mathcal{L}_{\text{CLIP}}\)34.6
Clipped gated T-\(\mathcal{L}_{T} \cdot \mathcal{L}_{\text{CLIP}}\) (11)62.1
Clipped additive T\(\mathcal{L}_{\text{CLIP}} + \lambda \mathcal{L}_{T}\) (9)62.1
+ +Table 2. Ablating sparsity regularizers. Optimization is done for 10K iterations at $168^{2}$ resolution with $\mathrm{LiT_{uu}}$ ViT B/32 and background augmentation, and retrieval uses CLIP ViT B/32. For the purposes of ablation, we run one seed per caption (153 runs). + +Dream Fields produces compositions of concepts in 3D, and supports fine-grained variations in prompts across several categories of objects. Some geometric details are not realistic, however. For example, generated snails have eye stalks attached to their shell rather than body, and the generated green vase is blurry. + +# 5.4. Model ablations + +Ablating sparsity regularizers While we regularize the mean transmittance, other sparsity losses are possible. We compare unregularized Dream Fields, perturbations to the density $\sigma$ [33], regularization with a beta prior on transmittance [30], multiplicative gating versions of $\mathcal{L}_T$ and our additive $\mathcal{L}_T$ regularizer in Figure 5. On real-world scenes, NeRF added Gaussian noise to network predictions of the density prior to rectification as a regularizer. This can encourage sharper boundary definitions as small densities will often be zeroed by the perturbation. The beta prior from + +![](images/6d5f596b9f51541d648da58b1434ce096c4b16343d30f7e85dbdc4d4357b318c.jpg) +Figure 7. The target transmittance $\tau$ affects the size of generated objects. Inset panels depict transmittance. Prompt from Object Centric COCO: "A cake topped [sic] with white frosting flowers with chocolate centers." + +Neural Volumes [30] encourages rays to either pass through the volume or be completely occluded: + +$$ +\mathcal {L} _ {\text {t o t a l}} ^ {\text {b e t a}} = \mathcal {L} _ {\text {C L I P}} + \lambda \cdot \text {m e a n} (\log T (\theta , \mathbf {p}) + \log (1 - T (\theta , \mathbf {p}))) \tag {10} +$$ + +The multiplicative loss is inspired by the opacity scaling of [35] for feature visualization. We scale the CLIP loss by a clipped mean transmittance: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \min (\tau , \operatorname {m e a n} (T (\theta , \mathbf {p}))) \cdot \mathcal {L} _ {\mathrm {C L I P}} \tag {11} +$$ + +Table 2 compares the regularizers, showing that density perturbations and the beta prior improve R-Precision $+12.4\%$ and $+15\%$ , respectively. Scenes with clipped mean transmittance regularization best align with their captions, $+26.8\%$ over the baseline. The beta prior can fill scenes with opaque material even without background augmentations as it encourages both high and low transmittance. Multiplicative gating works well when clipped to a target and with background augmentations, but is also non-convex and sensitive to hyperparameters. Figure 7 shows the effect of varying the target transmittance $\tau$ with an additive loss. + +
Optimized modelRetrieval model R-Precision
CLIP B/32CLIP B/16LiTuu B/32
COCO GT77.1±3.479.1±3.375.2±3.5
CLIP B/32 [46](86.6±2.0)74.2±2.542.8±2.8
CLIP B/16 [46]59.8±2.8(93.5±1.4)35.6±2.7
LiTuu B/3259.5±2.866.7±2.7(88.9±1.8)
+ +Table 3. The aligned image-text representation used to optimize Dream Fields influences their quantitative validation R-Precision according to a held-out retrieval model. All contrastive models produce high retrieval precision, though qualitatively CLIP B/32 produced overly smooth and simplified objects. We optimize for 10K iterations at $168^{2}$ resolution. (Italicized) metrics use the optimized model at a held-out pose and indicate Dream Fields overfit. + +Varying the image-text model We compare different image and text representations $h(\cdot), g(\cdot)$ used in $\mathcal{L}_{\mathrm{CLIP}}(7)$ and for retrieval metrics. Table 3 shows the results. CLIP B/32, B/16 and $\mathrm{LiT_{uu}}$ B/32 all have high retrieval precision, indicating they can synthesize objects generally aligned with the provided captions. CLIP B/32 performs the best, outperforming the more compute intensive CLIP B/16 model. The architectures differ in the number of pixels encoded in each token supplied to the Transformer backbone, i.e. the ViT patch size. A larger patch size may be sufficient due to the low resolution of renders: $168^2$ cropped to $154^2$ , then upsampled to CLIP's input size of $224^2$ . Qualitatively, training with $\mathrm{LiT_{uu}}$ B/32 produced the most detailed geometry and textures, suggesting that open-set evaluation is challenging. + +Each training iteration, Dream Fields samples a camera pose $\mathbf{p}$ to render the scene. In experiments, we used a full $360^{\circ}$ sampling range for the camera's azimuth, and fixed the elevation. Figure 8 shows multiple views of a bird when optimizing with smaller azimuth ranges. In the left-most column, a view from the central azimuth (frontal) is shown, and is realistic for all training configurations. Views from more extreme angles (right, left, rear view columns) have artifacts when the Dream Field is optimized with narrow azimuth ranges. Training with diverse cameras is important for viewpoint generalization. + +# 6. Discussion and limitations + +There are a number of limitations in Dream Fields. Generation requires iterative optimization, which can be expensive. 2K-20K iterations are sufficient for most objects, but more detail emerges when optimizing longer. Meta-learning [54] or amortization [42] could speed up synthesis. + +We use the same prompt at all perspectives. This can lead to repeated patterns on multiple sides of an object. The target caption could be varied across different camera poses. Many of the prompts we tested involve multiple subjects, + +a bird that has many colors on it. + +
Frontal viewRight viewRear viewLeft view
.0
.54
.06
.081
.093
+ +Figure 8. Training with diversely sampled camera poses improves generalization across views. In the top row, we sample camera azimuth from a single viewpoint. The rendered view from the same perspective (left column) is realistic, but the object structure is poor as seen from other angles. Qualitative results improve with larger sampling intervals, with the best results from $360^{\circ}$ sampling. + +but we do not target complex scene generation [6,8,11,13] partly because CLIP poorly encodes spatial relations [29,53]. Scene layout could be handled in a post-processing step. + +The image-text models we use to score renderings are not perfect even on ground truth training images, so improvements in image-text models may transfer to 3D generation. Our reliance on pre-trained models inherits their harmful biases. Identifying methods that can detect and remove these biases is an important direction if these methods are to be useful for larger-scale asset generation. + +# 7. Conclusion + +Our work has begun to tackle the difficult problem of object generation from text. By combining scalable multimodal image-text models and multi-view consistent differentiable neural rendering with simple object priors, we are able to synthesize both geometry and color of 3D objects across a large variety of real-world text prompts. The language interface allows users to control the style and shape of the results, including materials and categories of objects, with easy-to-author prompts. We hope these methods will enable rapid asset creation for artists and multimedia applications. + +# References + +[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. ICML, 2017. 2 +[2] Jonathan T. Barron and Jitendra Malik. Shape, illumination, and reflectance from shading. TPAMI, 2015. 3 +[3] Jonathan T. Barron, Ben Mildenhall, Matthew Tancik, Peter Hedman, Ricardo Martin-Brualla, and Pratul P. Srinivasan. Mip-NeRF: A multiscale representation for anti-aliasing neural radiance fields. ICCV, 2021. 3 +[4] Ruojin Cai, Guandao Yang, Hadar Averbuch-Elor, Zekun Hao, Serge Belongie, Noah Snively, and Bharath Hariharan. Learning gradient fields for shape generation. ECCV, 2020. 1 +[5] Eric Chan, Marco Monteiro, Petr Kellnhofer, Jiajun Wu, and Gordon Wetzstein. pi-gan: Periodic implicit generative adversarial networks for 3d-aware image synthesis. CVPR, 2021. 3 +[6] Angel Chang, Will Monroe, Manolis Savva, Christopher Potts, and Christopher D. Manning. Text to 3d scene generation with rich lexical grounding. ACL-IJCNLP, 2015. 8 +[7] 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. 2 +[8] Angel X Chang, Manolis Savva, and Christopher D Manning. Learning spatial knowledge for text to 3D scene generation. EMNLP, 2014. 8 +[9] Kevin Chen, Christopher B. Choy, Manolis Savva, Angel X. Chang, Thomas A. Funkhouser, and Silvio Savarese. Text2shape: Generating shapes from natural language by learning joint embeddings. CoRR, abs/1803.08495, 2018. 2 +[10] Eric Chu. Evolving evocative 2d views of generated 3d objects. NeurIPS Creativity and Design Workshop, 2021. 2 +[11] Bob Coyne and Richard Sproat. Wordsey: an automatic text-to-scene conversion system. Computer graphics and interactive techniques, 2001. 8 +[12] Karan Desai and Justin Johnson. VirTex: Learning Visual Representations from Textual Annotations. CVPR, 2021. 2, 3 +[13] Terrance DeVries, Miguel Angel Bautista, Nitish Srivastava, Graham W. Taylor, and Joshua M. Susskind. Unconstrained scene generation with locally conditioned radiance fields. arXiv, 2021. 8 +[14] Prafulla Dhariwal and Alex Nichol. Diffusion models beat gans on image synthesis. arXiv:2105.05233, 2021. 3 +[15] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021. 4 +[16] Patrick Esser, Robin Rombach, and Bjorn Ommer. Taming transformers for high-resolution image synthesis. CVPR, 2021. 3 +[17] Kevin Frans, Lisa B. Soros, and Olaf Witkowski. Clipdraw: Exploring text-to-drawing synthesis through language-image encoders. CoRR, 2021. 3 + +[18] Gabriel Goh, Nick Cammarata †, Chelsea Voss †, Shan Carter, Michael Petrov, Ludwig Schubert, Alec Radford, and Chris Olah. Multimodal neurons in artificial neural networks. Distill, 2021. https://distill.pub/2021/multimodal-neurons. 13 +[19] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. NeurIPS, 2014. 2 +[20] Jiatao Gu, Lingjie Liu, Peng Wang, and Christian Theobalt. Stylenerf: A style-based 3d-aware generator for high-resolution image synthesis, 2021. 3 +[21] Kunal Gupta and Manmohan Chandraker. Neural mesh flow: 3d manifold mesh generation via diffeomorphic flows, 2020. 1 +[22] Jonathan Heek, Anselm Levskaya, Avital Oliver, Marvin Ritter, Bertrand Rondepierre, Andreas Steiner, and Marc van Zee. Flax: A neural network library and ecosystem for JAX, 2020. 12 +[23] Ajay Jain. VectorAscent: Generate vector graphics from a textual description, 2021. 3 +[24] Ajay Jain, Matthew Tancik, and Pieter Abbeel. Putting nerf on a diet: Semantically consistent few-shot view synthesis. ICCV, 2021. 4, 6 +[25] Nikolay Jetchev. Clipmatrix: Text-controlled creation of 3d textured meshes, 2021. 2 +[26] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. ICML, 2021. 2, 3, 4 +[27] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. CVPR, 2020. 3 +[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. ECCV, 2014. 6 +[29] Nan Liu, Shuang Li, Yilun Du, Joshua B. Tenenbaum, and Antonio Torralba. Learning to compose visual relations. In Thirty-Fifth Conference on Neural Information Processing Systems, 2021. 8 +[30] Stephen Lombardi, Tomas Simon, Jason Saragih, Gabriel Schwartz, Andreas Lehrmann, and Yaser Sheikh. Neural volumes: Learning dynamic renderable volumes from images. ACM Trans. Graph., 2019. 7 +[31] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. SMPL: A skinned multiperson linear model. SIGGRAPH Asia, 2015. 2 +[32] Ben Mildenhall, Pratul P. Srinivasan, Rodrigo Ortiz-Cayon, Nima Khademi Kalantari, Ravi Ramamoorthi, Ren Ng, and Abhishek Kar. Local light field fusion: Practical view synthesis with prescriptive sampling guidelines. ACM Transactions on Graphics (TOG), 2019. 5 +[33] Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. ECCV, 2020. 3, 5, 6, 7 +[34] Alexander Mordvintsev, Christopher Olah, and Mike Tyka. Inceptionism: Going deeper into neural networks. 2015. 2, 4 + +[35] Alexander Mordvintsev, Nicola Pezzotti, Ludwig Schubert, and Chris Olah. Differentiable image parameterizations. Distill, 2018. https://distill.pub/2018/differentiable-parameterizations.2,5,7 +[36] Anh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & play generative networks: Conditional iterative generation of images in latent space. CVPR, 2017. 2 +[37] Anh Nguyen, Alexey Dosovitskiy, Jason Yosinski, Thomas Brox, and Jeff Clune. Synthesizing the preferred inputs for neurons in neural networks via deep generator networks. NeurIPS, 2016. 2 +[38] Michael Niemeyer and Andreas Geiger. Giraffe: Representing scenes as compositional generative neural feature fields. CVPR, 2021. 3 +[39] Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. Feature visualization. Distill, 2017. https://distill.pub/2017/feature-visualization. 2, 4 +[40] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv:1807.03748, 2018. 3 +[41] Dong Huk Park, Samaneh Azadi, Xihui Liu, Trevor Darrell, and Anna Rohrbach. Benchmark for compositional text-to-image synthesis. NeurIPS, 2021. 5 +[42] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. CVPR, 2019. 8 +[43] Or Patashnik, Zongze Wu, Eli Shechtman, Daniel Cohen-Or, and Dani Lischinski. Styleclip: Text-driven manipulation of stylegan imagery. ICCV, 2021. 3 +[44] Victor Perez, Joel Simon, and Tal Shiri. Sculpting with words. 2021. 2 +[45] Ben Poole, Sherjil Ozair, Aaron Van Den Oord, Alex Alemi, and George Tucker. On variational bounds of mutual information. ICML, 2019. 3 +[46] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. CoRR, abs/2103.00020, 2021. 2, 3, 4, 6, 8 +[47] Prajit Ramachandran, Barret Zoph, and Quoc V. Le. Searching for activation functions. CoRR, abs/1710.05941, 2017. 5 +[48] Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. CoRR, abs/2102.12092, 2021. 3, 6, 7 +[49] Aditya Sanghi, Hang Chu, Joseph G. Lambourne, Ye Wang, Chin-Yi Cheng, and Marco Fumero. Clip-forge: Towards zero-shot text-to-shape generation, 2021. 2 +[50] Peter Schaldenbrand, Zhixuan Liu, and Jean Oh. Styleclipdraw: Coupling content and style in text-to-drawing synthesis, 2021. 3 +[51] Katja Schwarz, Yiyi Liao, Michael Niemeyer, and Andreas Geiger. Graf: Generative radiance fields for 3d-aware image synthesis. NeurIPS, 2020. 3 + +[52] Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. NeurIPS, 2020. 2 +[53] Sanjay Subramanian, Will Merrill, Trevor Darrell, Matt Gardner, Sameer Singh, and Anna Rohrbach. Reclip: A strong zero-shot baseline for referring expression comprehension. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, Dublin, Ireland, May 2022. Association for Computational Linguistics. 8 +[54] Matthew Tancik, Ben Mildenhall, Terrance Wang, Divi Schmidt, Pratul P. Srinivasan, Jonathan T. Barron, and Ren Ng. Learned initializations for optimizing coordinate-based neural representations. CVPR, 2021. 8 +[55] Matthew Tancik, Pratul P. Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan T. Barron, and Ren Ng. Fourier features let networks learn high frequency functions in low dimensional domains. NeurIPS, 2020. 3 +[56] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. NeurIPS, pages 5998-6008, 2017. 4 +[57] Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems, pages 82–90, 2016. 1 +[58] Jiajun Wu, Chengkai Zhang, Xiuming Zhang, Zhoutong Zhang, William T Freeman, and Joshua B Tenenbaum. Learning 3D Shape Priors for Shape Completion and Reconstruction. In European Conference on Computer Vision (ECCV), 2018. 3 +[59] Lior Yariv, Jiatao Gu, Yoni Kasten, and Yaron Lipman. Volume rendering of neural implicit surfaces. arXiv:2106.12052, 2021. 13 +[60] Xiaohua Zhai, Xiao Wang, Basil Mustafa, Andreas Steiner, Daniel Keysers, Alexander Kolesnikov, and Lucas Beyer. Lit: Zero-shot transfer with locked-image text tuning, 2021. 2, 3, 4, 6 +[61] Han Zhang, Jing Yu Koh, Jason Baldridge, Honglak Lee, and Yinfei Yang. Cross-modal contrastive learning for text-to-image generation. CVPR, 2021. 3 +[62] Kai Zhang, Gernot Riegler, Noah Snavely, and Vladlen Koltun. Nerf++: Analyzing and improving neural radiance fields. arXiv:2010.07492, 2020. 4 +[63] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. CVPR, 2018. 5 +[64] Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Joshua B Tenenbaum, William T Freeman, and Jiajun Wu. Learning to Reconstruct Shapes From Unseen Classes. In Advances in Neural Information Processing Systems (NeurIPS), 2018. 3 +[65] Linqi Zhou, Yilun Du, and Jiajun Wu. 3d shape generation and completion through point-voxel diffusion. ICCV, 2021. 1 +[66] Peng Zhou, Lingxi Xie, Bingbing Ni, and Qi Tian. CIPS-3D: A 3D-Aware Generator of GANs Based on Conditionally-Independent Pixel Synthesis. 2021. 3 \ No newline at end of file diff --git a/zeroshottextguidedobjectgenerationwithdreamfields/images.zip b/zeroshottextguidedobjectgenerationwithdreamfields/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b0fd9bd37086f2cdb623a7d42484dd9580e77f6b --- /dev/null +++ b/zeroshottextguidedobjectgenerationwithdreamfields/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:359cc893c774da168566daaf9a3a0e9a48426c613a89d8e156862ec0fac2049b +size 497255 diff --git a/zeroshottextguidedobjectgenerationwithdreamfields/layout.json b/zeroshottextguidedobjectgenerationwithdreamfields/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d0e9a1128013a7e276514756562d3fc180435e09 --- /dev/null +++ b/zeroshottextguidedobjectgenerationwithdreamfields/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a86ba84916ea72bee4f447f41f9bbd7826622a77b58849aee33c404a74108ef8 +size 426328 diff --git a/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_content_list.json b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..37c52cf5371b8853d6c11fb08b9aecee6261bb3b --- /dev/null +++ b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6a4b698489fae46f2e00547f5effa6de8d0535e1e1127541d99636266b5b0d0 +size 70803 diff --git a/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_model.json b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..30b359ce7e0c06f7e7d3a181b81c3258cce3656e --- /dev/null +++ b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae606fcdf71f1bb8cd7fec3b3eb3ac12ae54316d04b7e2d6279db7c1bc051a58 +size 91219 diff --git a/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_origin.pdf b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c868e439d157100fb566c038e5ab4cc7c132cd27 --- /dev/null +++ b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/4e74e4da-1ad0-48ca-be5b-4f47cca6d99c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe92aa96397a3473593106719af2f632672d8de69eb2990fd5d877d151b69b10 +size 5753727 diff --git a/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/full.md b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5d39cfe4c907eb307e2c19fa6af9ee883fb7d0a1 --- /dev/null +++ b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/full.md @@ -0,0 +1,255 @@ +# ZeroWaste Dataset: Towards Deformable Object Segmentation in Cluttered Scenes + +Dina Bashkirova1* + +Mohamed Abdelfattah2 + +Ziliang Zhu + +James Akl³ + +Fadi Alladkani + +Ping Hu + +Vitaly Ablavsky + +Berk Calli 3 + +Sarah Adel Bargal1 + +Kate Saenko1,5 + +$^{1}$ Boston University $^{2}$ American University in Cairo $^{3}$ Worcester Polytechnic Institute $^{4}$ University of Washington $^{5}$ MIT-IBM Watson AI Lab + +# Abstract + +Less than $35\%$ of recyclable waste is being actually recycled in the US [2], which leads to increased soil and sea pollution and is one of the major concerns of environmental researchers as well as the common public. At the heart of the problem are the inefficiencies of the waste sorting process (separating paper, plastic, metal, glass, etc.) due to the extremely complex and cluttered nature of the waste stream. Recyclable waste detection poses a unique computer vision challenge as it requires detection of highly deformable and often translucent objects in cluttered scenes without the kind of context information usually present in human-centric datasets. This challenging computer vision task currently lacks suitable datasets or methods in the available literature. In this paper, we take a step towards computer-aided waste detection and present the first in-the-wild industrial-grade waste detection and segmentation dataset, ZeroWaste. We believe that ZeroWaste will catalyze research in object detection and semantic segmentation in extreme clutter as well as applications in the recycling domain. Our project page can be found at http://ai.bu.edu/zerowaste/ + +# 1. Introduction + +As the world population grows and becomes increasingly urbanized, waste production is estimated to reach 2.6 billion tonnes a year in 2030, an increase from its current level of around 2.1 billion tonnes [28]. Efficient recycling + +strategies are critical to reduce the devastating environmental effects of rising waste production. Materials Recovery Facilities (MRFs) are at the center of the recycling process. These facilities are where the collected recyclable waste is sorted into separate bales of plastic, paper, metal and glass (and other sub-categories). Even though the MRFs utilize a large number of machines alongside manual labor [24], the recycling rates as well as the profit margins stay at undesirably low levels (e.g. less than $35\%$ of the recyclable waste actually got recycled in the United States in 2018 [2]). Another crucial aspect of manual waste sorting is the safety of the workers, who risk their health daily getting exposed to dangerous and unsanitary objects (e.g. knives, medical needles). At the same time, the extremely cluttered nature of the waste stream makes automated waste detection (i.e. detection of waste objects that should be removed from the conveyor belt) very challenging to achieve. + +Recent advances in object classification and segmentation provide a great opportunity to make the recycling process more efficient, more profitable and safer for the workers. Unfortunately, the research community is lacking the high-quality in-the-wild datasets to train and evaluate the classification and segmentation algorithms for industrial waste sorting. While several companies do development in the automated waste sorting space (e.g. [49, 50, 57]), they keep their data private, and the few existing open-source datasets [38, 48, 54, 60] are very limited in the amount of data and/or are generated in uncluttered environments, not representing the complexity of the domain (see Figure 1). + +In this paper, we propose the largest openly available in-the-wild waste detection dataset ZeroWaste that is specifically designed for evaluating label-efficient industrial + +![](images/b6761921c28adb762d4bbb188d8169c7819f2b3bc45294b58a2d34b5c1b45249.jpg) +TACO dataset +Labeled Waste in the Wild dataset + +![](images/289d8033e9c41e3050e8218c74930d2ad68d697851ace9721445b87441618086.jpg) + +![](images/98620fd4225424172e4fff2181757c5f1daab0ac836ea82882f04c6120519824.jpg) +ReSortIT dataset + +![](images/94b78b8fee90084b452cee0804b46474f5362ed95e5ead12250efad23a937024.jpg) +Real MRF facility (our setup) +ZeroWaste dataset + +![](images/7358fc48bec5953466179b537398b828e5e946084a76af38b5aad3bc86370f95.jpg) +Figure 1. Left: examples of the existing waste detection and classification datasets (top to bottom): Trash Annotation in Context (TACO) [48], Labeled Waste in the Wild [54], ReSortIT [31] datasets. Right: footage of the waste sorting process at a real Materials Recovery Facilities (MRF). The domain shift between the simplified datasets with solid background and little to no clutter and the real images of the conveyor belt from the MRF, as well as the object-centric nature of the existing datasets, makes it impossible to use models trained on these datasets for automated detection on real waste processing plants. In this paper, we propose a new ZeroWaste dataset collected from a real waste sorting plant. Our dataset includes a set of densely annotated frames for training and evaluation of the detection and segmentation models, as well as a large number of unlabeled frames for semi- and self-supervised learning methods. We also include frames of the conveyor belt before and after manual collection of foreground objects to facilitate research on weakly supervised detection and segmentation. Please see Figure 2 for the illustration of our ZeroWaste dataset. + +![](images/d6ca98cd8e6d0e961b4b995832e116d500ca2c0622e5b692da397dc5d12221d4.jpg) + +waste detection. ZeroWaste is a dataset that is fundamentally different from the popular detection and segmentation benchmarks: high level of clutter, presence of highly deformable and translucent objects, as well as a fine-grained difference between the object classes - all these aspects pose a unique challenge for the automated vision. In addition to that, due to the ever-changing nature of the stream, content and visual qualities of the stream are often MRF-specific and highly depend on the season, therefore the detection algorithm must be label-efficient and able to learn and adapt to the changes in the stream with only a few labeled examples. We envision that our open-access dataset will allow researchers to develop more robust and data-efficient algorithms for object detection and other related problems beyond human-centric domains. We summarize our contributions as follows: + +1. We propose the first fully-annotated ZeroWaste- $f$ dataset industrial waste object detection. The ZeroWaste- $f$ dataset presents a challenging real + +life computer vision problem of detecting highly deformable objects in severely cluttered scenes. In addition to the fully annotated frames from ZeroWaste-f set, we include the unlabeled ZeroWaste-s set for semi-supervised learning. We also propose a version of our ZeroWaste data augmented with objects from the TACO [48] dataset, ZeroWasteAug, to combat class imbalance. We show that introduction of object augmentation significantly improves the segmentation quality of the rare classes. + +2. We introduce a novel before-after data collection setup and propose the ZeroWaste- $w$ dataset for binary classification of frames before and after the collection of target objects. This binary classification setup allows much cheaper data annotation and catalyzes further development of weakly supervised segmentation and detection methods. Our experimental results show that meaningful foreground segmentation can be achieved using ZeroWaste- $w$ , however, more efficient weakly- + +![](images/7ae00178a35fbded1600d14ee8dc38cffb8a7f730fee55c5aa6c056c7c3443d4.jpg) +Figure 2. Left: example of an image from ZeroWaste-f dataset. Right: the corresponding ground truth instance segmentation. At the end of this conveyor belt, only paper objects must remain. Therefore, we annotated the removable objects of four material types as foreground: soft plastic, rigid plastic, cardboard and metal. The background includes the conveyor belt and paper objects. Severe clutter and occlusions, high variability of the foreground object shapes and textures, as well as severe deformations of objects usually not present in other segmentation datasets, make this domain very challenging for object detection. More examples of our annotated data can be found in Section 7.3 of the Appendix (best viewed in color). + +![](images/8a8e60788a5d56fd353a6b7f608932f52cea1630bcf760fa070a365544760835.jpg) + +supervised methods are needed to reach the segmentation quality achieved by fully-supervised methods. + +3. We implement the fully-supervised detection and segmentation baselines for the ZeroWaste- $f$ dataset and semi- and weakly-supervised baselines for ZeroWaste- $s$ and ZeroWaste- $w$ datasets. Our results show that popular detection and segmentation methods, such as Mask-RCNN, TridentNet and DeepLabV3+, struggle to generalize to our data, which indicates a challenging nature of our in-the-wild dataset and suggests that new and more robust methods must be developed to solve the problem efficiently and be applied in the real waste sorting plants. + +# 2. Related work + +Detection and Segmentation Datasets Many datasets for image segmentation have been proposed with the goal of densely recognizing general objects and "stuff" in image scenes like street view [7, 17, 61], natural scenes [9, 20, 35, 44, 65], and indoor spaces [13, 19, 53]. Yet, few of them have been designed for the more challenging vision task required in automated waste recycling. Several related datasets have been proposed that contain only image-level labels, like Portland State University Recycling [38] consists of labeled images of box-board, glass bottles, soda cans, crushed soda cans and plastic bottles, and a small-scale StanfordtrashNet [60] dataset containing images of single waste objects from six predefined classes. Though beneficial for image-level classification in well-defined conditions, images of in these two datasets have very simple background and do not apply to waste object localization. To enable localization tasks, Labeled Waste in the Wild [54] annotated bounding boxes for objects of 20 waste classes. Perhaps the most + +similar dataset to ours is the *Trash Annotation in Context (TACO)* [48] of 1500 densely annotated images containing objects of 60 litter classes. Yet TACO contains deliberately collected outdoor scenes with one or a few foreground objects that are rarely occluded, which makes it less practical for materials recovery scenarios (see Table 1 and Figure 1 for comparison). Another great effort towards automated waste sorting is the synthetic ReSort-IT [31] dataset for waste object detection on the conveyor belt, as well as the FloW [16] dataset of the floating waste detection in the inland waters. In contrast, our ZeroWaste has almost 3 times more annotated images and more than 10 times more annotated instances than TACO and is collected from the front lines of a waste sorting plant where the objects are frequently severely deformed and occluded, which makes our dataset the closest one to the real applications, e.g., robotic grasping or waste stream analysis. + +Detection and Segmentation Methods Image segmentation can be formulated as a task of classifying each pixel into a set of labels [41]. Recent semantic segmentation models [12,37,62,63] have achieved state-of-the-art performance for recognizing general object/stuff classes from natural scene images. Representative frameworks like MaskR-CNN [39] effectively detect objects in images and simultaneously generate high-quality masks, which enables efficient interaction between robots and target objects. Yet due to their data-hungry nature, these methods rely on large volumes of annotated data for training, which can be challenging and expensive, especially in specialized application scenarios [5]. Recycling annotation in particular requires expert labelers and is thus even more costly. Semi-supervised segmentation methods have been proposed to address such + +limitations by jointly learning from both annotated and unannotated images [11, 22, 29, 40, 42, 45]. For example, ReCo [36] introduces an unsupervised loss to optimize both intra- and inter-class variance of pixels so as to further boost the segmentation performance. In a more data-efficient setting, weakly-supervised segmentation methods exploit annotations that are even easier to obtain, e.g. image-level tags [3, 30, 46]. These methods typically utilize Class Activation Maps (CAM) [64] to select the most discriminative regions, which are later used as pixel-level supervision for segmentation networks [10, 21, 56]. By constraining consistency between partial and full features, PuzzleCAM [27] effectively enhances the quality of CAMs without adding layers. All these advanced segmentation models are trained on large-scale general-purpose data, such as MS-COCO [35] or PASCAL VOC [20], and applying them to the cluttered real-world scenarios presents challenges like domain shift and poor generalization. We provide the experimental results on the popular fully-, semi- and weakly-supervised semantic segmentation and object detection methods on our ZeroWaste dataset and analyze their performance on this real industrial task. + +# 3. ZeroWaste Dataset + +In this section, we describe our ZeroWaste- $f$ dataset for fully supervised detection and evaluation, unlabeled ZeroWaste- $s$ for semi-supervised learning, ZeroWaste- $w$ of images before and after the removal of target objects for weakly supervised detection, and ZeroWasteAug of multi-domain augmented waste objects for comparison in all fully-, semi-, and weakly-supervised settings. The datasets are licensed under the Creative Commons Attribution-NonCommercial 4.0 International License [1]. The MRF at which the data was collected agreed to release the data for any non-commercial purposes and decided to remain unacknowledged. + +![](images/c8757dc5f3648a265fd5d06aee6b6d0c63d22c3a28760059154709be957106df.jpg) +Figure 3. The footage recording setup is designed to fit the constraints of the facility environment. Left: Assembly of each recording apparatus. Right: Layout of the recording setup in the recycling environment. + +![](images/480e46771e532ae75083b0bd8fd096cc2fa6008d7a41ecf88c5d6fcf1405ad31.jpg) +Figure 4. Statistics of the number of foreground objects per frame in train, val and test splits of ZeroWaste- $f$ . The overall number of objects in the scene, including paper objects, is much higher (best viewed in color). + +Data Collection and Pre-processing The data was collected from a high-quality paper conveyor of a single stream recycling facility in Massachusetts. The sorting operation on this conveyor aims to keep high quality paper and consider anything else as contaminants including non-paper items (e.g. metal, plastic, brown paper, cardboard, boxboard). We collected data during the regular operation of the MRF using two compact recording installations at the start and end of the conveyor belt (see Fig. 6), that is, footage is captured simultaneously both at the unsorted and sorted sections of the same conveyor. The recording apparatus is designed to fit the constraints of the facility: In order not to disrupt the MRF operation and be able to work in confined spaces available near the conveyor the recording platform needs to be compact, non-intrusive (to the workers), and portable (easy to move, battery-powered). Note that the cameras are not directly mounted on the conveyor but to a stand-alone platform, to reduce vibrations transmitted to the cameras. Additional considerations are made (see Figure 3): (1) Damping pads are installed to counter the ground vibrations of the heavy machinery and reduce vibrations on the camera even further; (2) Weighted bases lower the center of mass to keep the apparatus stable. We used the GoPro Hero 7 camera to collect the video data, and installed two LitraTorch 2.0 portable lamps with a light diffuser to maintain consistent lighting. Both cameras were installed at around $100\mathrm{cm}$ above the conveyor, and the light sources at around $80\mathrm{cm}$ . + +Sequences of 12 videos of total length of 95 minutes and 14 seconds with FPS 120 and size $1920 \times 1080$ were collected and processed through the following steps: + +1. Rotation and cropping. The frames were rotated so that the conveyor belt is parallel to the frame borders and cropped to remove the regions outside the conveyor belt. + +We ensured that any personal information or identifiable footage of the workers at the conveyor belt was excluded from our data. + +2. Optical distortion. We removed the distortion [8] using the OpenCV [6] library to compensate for the fish-eye effect caused by the proximity of the cameras to the conveyor belt. +3. Deblurring. We used the SRN-Deblur [55] method to remove motion blur resulting from the fast-moving conveyor belt. According to our visual inspection, SRN-Deblur achieves satisfactory deblurring and does not introduce the undesired artifacts that usually appear when classical deconvolution-based methods are used. + +The illustration of the original frames shot at the beginning of the conveyor belt and the corresponding preprocessing results can be found in Figure 12 in Section 7.3 of the Appendix. + +Densely Annotated ZeroWaste- $f$ and Unlabeled ZeroWaste- $s$ Datasets The fully annotated ZeroWaste- $f$ dataset consists of 4661 frames sampled from the processed videos and the corresponding ground truth polygon segmentation. We used the open-source CVAT [51] annotation toolkit to manually collect the polygon annotations of objects of four material types: cardboard, soft plastic, rigid plastic and metal. We chose this set of class labels following the MRF's guidelines for the workers to collect cardboard, plastic and metal into separate bins, as well as the fact that grasping of rigid and non-rigid objects might require the use of fundamentally different kinds of robotic systems. We annotated 1805 frames with a subsampling rate of 10 to enable training and evaluation of object tracking methods, as well as 2616 frames with a subsampling rate of 100 to increase the dataset diversity. The polygon annotation was performed according to the following set of rules: + +![](images/443139a20921f87fd26943f5bc350f9fdd40b1d18522d5797d929459198cbf67.jpg) +Figure 5. Left: example of an image from ZeroWaste- $f$ dataset. Right: the corresponding ground truth instance segmentation. Expert training and common sense knowledge are required to distinguish between the cardboard object on the left (red circle) and the brown paper on the right (blue circle), as they are visually very similar but differ in thickness and rigidity. Trained annotators achieve average pixel-level precision of $79.57\%$ and recall of $71.96\%$ for the cardboard class. (best viewed in color). + +![](images/0cb79a99a046b2b0944726874d93af2db1974d1b3a17877841830599f20133bd.jpg) + +![](images/2c7c3a57c00985a54d99213ab87ab41eb50d89b32407ba876fdc0f1f60f9b3ec.jpg) +Figure 6. We installed two stationary cameras above the conveyor belt: one at the beginning of the line and another one at the end. At this particular conveyor belt, workers are asked to remove objects of any material other than paper, such as cardboard, plastic and metal. Therefore, the footage collected from the beginning of the line contains the "foreground" objects that need to be removed, and the frames from the end of the conveyor belt are supposed to only contain the "background" paper objects. We used this setup as a foundation of our ZeroWaste- $w$ dataset. + +1. Objects of four material types were annotated as foreground: cardboard (including parcel packages, boxboard such as cereal boxes and other carton food packaging), soft plastic (e.g. plastic bags, wraps), rigid plastic (e.g. food containers, plastic bottles) and metal (e.g. metal cans). Paper objects were treated as background. +2. A polygon must include all foreground object pixels, and it might include a small amount of background pixels. +3. If an object is partially occluded and separate parts are visible, we annotated them as separate objects, since it is is impossible to certainly tell whether it is one or several visually similar objects. + +Each annotated video frame was validated by an independent reviewer to pass the standards above (see Figure 2). The review process was performed by the students and researchers with a computer science background specifically trained to perform the annotation. We did not delegate the annotation to the crowd-sourcing platforms, such as Amazon Mechanical Turk [18], due to the complexity of the domain that requires expert knowledge to be able to detect and correctly classify the foreground objects (see the illustration in Figure 5). Instead, the professional annotators have been hired via Upwork1 to annotate the frames, with the + +
Split#ImagesCardboardSoft PlasticRigid PlasticMetal#ObjectsDomain
Train30021294048621160 +2778263 +437319225 +7151
Validation5722167855305 +63760 +10103387 +1647
Test92934281236315 +88663 +9905042 +1876Real
Unlabeled6212-----
Total107151853569531780 +4301386 +637027744 +10584
TACO149924065211835062581Real
ReSortIT16000800080008000800032000Synthetic
+ +estimated average time spent on the annotation and review about 12.5 minutes per frame (details on that can be found in Section 7.4 of Appendix). Each frame was assessed by an expert reviewer for consistency and quality control. The resulting average annotation agreement across 20 frames is $84.2\%$ before expert review and above $94\%$ after the review, more details on the human annotation agreement can be found on Figure 7. The dataset was split into training, validation and test splits and stored in the widely used MS COCO [35] format for object detection and segmentation using the open-source Voxel51 toolkit [43]. Please refer to Table 1 and Figure 4 for more details about the class-wise statistics of all splits. In addition, we provide 6212 unlabeled images that comprise ZeroWaste- $s$ dataset. ZeroWaste- $s$ can be used to refine the detection using semi-supervised or self-supervised learning methods. + +ZeroWasteAug Dataset As seen in Table 1, there is a significant imbalance in the class distribution of the collected ZeroWaste dataset that can degrade the performance of the detection methods, e.g. metal objects are more than 40 times more rare than the cardboard. ZeroWasteAug comprises a version of ZeroWaste- $f$ in which frames were augmented with the objects of the rare metal and rigid plastic classes that were cropped out of TACO [48] dataset. To minimize the domain shift between the TACO objects and the ZeroWaste frames, the contrast, brightness, and blurriness of each cropped object were changed to match the average value of the frame on which the object was augmented. Random resizing, cropping, mirroring were applied on each TACO object before augmentation (please refer to Figure 15 for the examples). + +Weakly supervised ZeroWaste- $w$ Dataset We leverage the videos taken of the conveyor belt before and after the removal of the foreground objects to create a weakly-supervised ZeroWaste- $w$ dataset. This dataset contains 1202 frames with the foreground objects (before class) and 1208 frames without the foreground objects (after class). + +Table 1. Statistics of the total number of objects in the training, validation and test splits of ZeroWasteAug and ZeroWaste- $f$ datasets, in comparison with TACO [48] dataset dataset with labels mapped to our set of classes and the Synthetic Complex subset of the ReSortIT [31] dataset. The numbers written in green, e.g. +10584, reflect the number of augmented objects added in ZeroWasteAug. Row 4 presents the unlabeled ZeroWaste-s set of images for semi-supervised learning. + +
APAP50AP75APsAPmAPI
RetinaNet21.033.522.24.39.522.7
MaskRCNN22.834.924.44.610.625.8
TridentNet24.236.326.64.810.726.1
+ +Table 2. Mean average precision on the test set of ZeroWaste- $f$ of MS-COCO-pretrained Mask R-CNN, TridentNet and RetinaNet finetuned on ZeroWaste- $f$ . Please refer to Table 4 and Figure 8 in the Appendix for class-wise results. + +One advantage of such a setup is that it is relatively cheap to acquire the ground truth labels (only an image-level inspection is required to ensure there are no false negatives in the after class subset). The ZeroWaste- $w$ dataset is specifically collected to be used in the weakly-supervised setup and is meant to provide an alternative and more data-efficient solution to the problem. The ground truth instance segmentation is available for all images of the before class as it overlaps with the ZeroWaste- $f$ dataset. Please see Figure 6 for examples of ZeroWaste- $w$ dataset. + +# 4. Experiments + +In this section, we provide baseline results for our proposed ZeroWaste dataset. We perform fully-supervised object detection on ZeroWaste- $f$ using the most widely used Mask R-CNN [39], RetinaNet [34], TridentNet [33] models, and we train DeepLabV3+ [14] as a semantic segmentation baseline. We also perform fully- and semi-supervised semantic segmentation on ZeroWaste- $s$ using the ReCo [36] and CCT [45], and report the weakly-supervised segmentation results of RISE [47] CAMs, PuzzleCAM [27] and EPS [32] trained on ZeroWaste- $w$ . We will provide the implementation and a detailed description of our experiments in the supplementary material. + +
MethodSupervisionValidationTest
mIoUPixel Acc.mIoUPixel Acc.
Trained with ZeroWaste-w
Randomnone7.275.38.471.8
CAMweak-w16.731.419.133.7
PuzzleCAMweak-w29.8767.6328.4665.96
EPSweak-w34.5657.9834.0657.20
Trained with ZeroWaste-f and ZeroWaste-s
DeepLabv3+full45.6183.3652.3084.79
DeepLabv3+full+aug46.1383.351.6385.23
ReCofull51.3089.2252.2889.33
ReCosemi49.4989.5844.1288.36
CCTfull30.7984.8029.3285.91
CCTsemi28.7086.3332.4987.30
EPSweak-f13.7559.9613.9160.65
+ +Table 3. Results on validation and test sets of the ZeroWaste-f dataset of fully-, semi-, and weakly- supervised learning methods, separately trained on original non-augmented datasets and the augmented ZeroWasteAug dataset. 'weak-w', 'weak-f', and 'weak-aug' denote weak image-level supervision from ZeroWaste-w (before/after labels), ZeroWaste-f (class-wise labels), and ZeroWasteAug (class-wise labels) respectively. More details can be found in section 7.2 of Appendix. + +# 4.1. Object Detection + +Experiments It has been shown that pretraining the model on a large-scale dataset, such as MS COCO [35], improves generalization and helps to prevent overfitting [23, 26, 52]. Therefore, in our first experiments, we used the model with weights learned on COCO and further fine-tuned it with our ZeroWaste- $f$ dataset. We used a standard implementation of the popular Mask R-CNN, RetinaNet [34] and the TridentNet [33] models both with ResNet-50 [25] backbone. We used the Detectron2 [58] library in all of the experiments The model was finetuned for 40000 iterations on the training set of our ZeroWaste- $f$ dataset on a single Geforce GTX 1080 GPU with batch size 8. To compensate for a relatively small number examples in the training set and to avoid overfitting, we leveraged heavy data augmentation, including random rotation and cropping, adjustment of brightness and hue, etc. We report the experimental results in Table 2 (COCO $\rightarrow$ ZeroWaste section). A more detailed description of the results can be found in Section 7.1 of Appendix. + +Results and Analysis The experimental results of Mask R-CNN, TridentNet ans RetinaNet indicate that the proposed ZeroWaste dataset is significantly challenging for the state-of-the-art detection methods, with TridentNet performing slightly better than other methods. All methods especially struggle with small objects, which are usually + +harder to label correctly. Additional results of the models pretrained on TACO dataset with labels mapped to ZeRoWaste set of labels show that finetuning from a TACO-pretrained model slightly improves the detection precision (see Table 4 in the Appendix). Recalling the history of success with other complex segmentation and detection datasets (e.g. from mIoU $57\%$ in 2015 [4] to $84\%$ in 2020 [15] on CityScapes [17], or from AP50 29.9 [35] in 2015 to 61.3 [59] on MS-COCO [35] in 2021, and knowing that the task can be solved by humans with a little training, we believe that the computer vision community will eventually come up with efficient methods for this challenging task. + +# 4.2. Semantic Segmentation + +Fully-supervised Experiments We used the state-of-the-art DeepLabv3+ [14] model as a fully-supervised semantic segmentation baseline for our dataset. DeepLabv3+ combines the atrous convolutions to extract features in multiple scales with an encoder-decoder paradigm to gradually sharpen the object boundary using the intermediate features. We used the model with ResNet-101 backbone with three $3 \times 3$ convolutions, froze the first three stages of the backbone, and separately fine-tuned the model on the training sets of ZeroWaste- $f$ and ZeroWasteAug. + +Semi-supervised Experiments For a semi-supervised segmentation baseline, we used the official implementation of Regional Contrast [36] (ReCo) and CCT [45] methods. ReCo utilizes the pixel-level local context and the global context represented in the semantic class relationships across the entire dataset, and the conventional Mean Teacher Framework in which a teacher network is used to generate pseudo-labels for the unlabeled images. CCT uses cross-consistency training that forces the predicted segmentation masks of unlabeled examples produced by decoders with various types of augmentations to be consistent. For comparison, we conducted four experiments with ReCo and CCT on ZeroWaste-s in both the fully-supervised and semi-supervised learning settings. We used the default hyperparameters for both methods. + +Weakly-supervised Experiments For weakly-supervised segmentation, we followed the standard procedure based on generating Class Activation Maps (CAMs) to serve as pseudo-labels for training a segmentation network. To do so, we conducted three experiments in which we trained a classifier using image-level labels from 1) ZeroWaste- $w$ (before/after labels) and 2) ZeroWaste- $f$ (multiclass labels). For CAM generation, we incorporated the current state-of-the-art Puzzle-Cam [27] and EPS [32] methods that enhances CAM object coverage by matching the CAM of an entire image with those produced for the non-overlapping tiles of the + +![](images/45d6c4f388646098ed039f04d664059c65af6fbcde2dfba748afa142c47b7839.jpg) +Figure 7. Left: Semantic segmentation confusion matrix of the manual annotations over 20 frames represents human expert agreement after expert review, with the average pixel-level agreement above $94\%$ (see Figure 16 of the Supplementary for the corresponding confusion matrix before expert review). Center: Confusion matrix of DeepLabV3+ on the test split of ZeroWaste-f. Right: Confusion matrix of DeepLabV3+ on the test split of ZeroWaste-f when trained on ZeroWasteAug. + +![](images/45e2e01999b28a4318345ba21b01dda22050401487467359e02817b0a40e675e.jpg) + +![](images/5953a300e1e91851d60b290f3ff0ae09efb28788916419eda4d9cbe14ea3688f.jpg) + +image. We then threshold the generated CAMs with 0.45 to produce pseudo segmentation labels for training the DeepLabv3+ segmentation network. + +Results and Analysis Experimental results for fully-, semi- and weakly- supervised experiments are presented in Table 3. Class-wise results and visualizations can be found in Section 7.2 of the Appendix. Table 3 results indicate that our in-the-wild ZeroWaste dataset proposes a challenging semantic segmentation task. The confusion matrices on Figure 7 (center) show that the fully-supervised DeepLabV3+ can distinguish cardboard from paper in only $58\%$ of the cases, and missclassifies most rigid plastic objects as soft plastic. Additionally, metal objects are often segmented as background as they appear rarely in the original dataset. Further, training on ZeroWasteAug significantly improves the pixel accuracy of the rare classes on the original non-augmented test split of ZeroWaste-f (see Figure 7, right). This suggests that aggressive data augmentation is an efficient technique for semantic segmentation that significantly reduces the generalization gap on the class-imbalanced data. The semi-supervised learning results indicate that the unlabeled examples from the ZeroWaste-s subset significantly worsened the performance of ReCo. This suggests that, while the inductive bias of the ReCo model that efficiently utilizes the object context information (i.e. surrounding background pixels) is not efficient for ZeroWaste that has little to no context prior. In contrast, CCT performance increases slightly when the unlabeled examples are added during training, which suggests that the contrastive approach is more efficient for the proposed dataset. Additionally, results of the weakly-supervised experiments show that a simple CAM-based approach, as well as the state-of-the-art weakly supervised PuzzleCAM with cheap image-level annotations provide meaningful object localization cues. + +# 5. Impact and Limitations of ZeroWaste + +Societal Impact We believe that human-robot collaboration is essential for more efficient computer-aided recycling, quality control of the sorting process, as well as in establishing safer work conditions for the MRF workers, e.g. by detecting dangerous waste items. In the big picture, establishing a human-robot workflow that can maximize efficiency, profit, safety and work quality in MRFs is an essential need to address the critical waste problem in an equitable and just manner. + +Limitations and Future Directions Despite the fact that ZeroWaste is the largest public dataset for waste detection to date, it is still smaller than the standard large-scale benchmarks due to the fact that the annotation process for this domain is very expensive. As future work, we plan to increase the dataset diversity by using synthetic-to-real domain adaptation and other data augmentation techniques. Acknowledgements This paper was supported in part by the National Science Foundation under grant FW-HTF-RL #1928506. + +# 6. Conclusion + +This work introduces ZeroWaste, which is the largest public dataset for waste detection up to date. ZeroWaste is designed as a benchmark for the training and evaluation of fully, weakly, and semi-supervised detection and segmentation methods, and can be used for various other tasks including label-efficient learning. We provide baseline results for the most popular fully, weakly, semi-supervised, and transfer learning techniques. Our results show that current state-of-the-art detection and segmentation methods cannot efficiently handle this complex in-the-wild domain. We anticipate that our dataset will motivate the computer vision community to develop more data-efficient methods applicable to a wider range of real-world computer vision problems. + +# References + +[1] Creative commons attribution-noncommercial 4.0 international license. [EB/OL]. http://creativecommons.org/licenses/by-nc/4.0/ Accessed May 22, 2021. 4 +[2] United States Environmental Protection Agency. National overview: Facts and figures on materials, wastes and recycling. [EB/OL]. 1 +[3] Jiwoon Ahn and Suha Kwak. Learning pixel-level semantic affinity with image-level supervision for weakly supervised semantic segmentation. In CVPR, 2018. 4 +[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. 7 +[5] Adela Barriuso and Antonio Torralba. Notes on image annotation. arXiv preprint arXiv:1210.3448, 2012. 3 +[6] G. Bradski. The OpenCV Library. Dr. Dobb's Journal of Software Tools, 2000. 5 +[7] Gabriel J Brostow, Jamie Shotton, Julien Fauqueur, and Roberto Cipolla. Segmentation and recognition using structure from motion point clouds. In ECCV, 2008. 3 +[8] Duane C Brown. Decentering distortion of lenses. Photogrammetric Engineering, 1966. 5 +[9] Holger Caesar, Jasper Uijlings, and Vittorio Ferrari. Cocostuff: Thing and stuff classes in context. In CVPR, 2018. 3 +[10] Yu-Ting Chang, Qiaosong Wang, Wei-Chih Hung, Robinson Piramuthu, Yi-Hsuan Tsai, and Ming-Hsuan Yang. Weakly-supervised semantic segmentation via sub-category exploration. In CVPR, 2020. 4 +[11] Liang-Chieh Chen, Raphael Gontijo Lopes, Bowen Cheng, Maxwell D Collins, Ekin D Cubuk, Barret Zoph, Hartwig Adam, and Jonathon Shlens. Semi-supervised learning in video sequences for urban scene segmentation. ECCV, 2020. 4 +[12] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017.3 +[13] 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 +[14] 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. 6, 7, 12, 13 +[15] 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 Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12475–12485, 2020. 7 +[16] Yuwei Cheng, Jiannan Zhu, Mengxin Jiang, Jie Fu, Chang-song Pang, Peidong Wang, Kris Sankaran, Olawale Onabola, Yimin Liu, Dianbo Liu, et al. Flow: A dataset and + +benchmark for floating waste detection in inland waters. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10953-10962, 2021. 3 +[17] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 3, 7 +[18] Kevin Crowston. Amazon mechanical turk: A research tool for organizations and information systems scholars. In *Shaping the future of ICT research: methods and approaches*, pages 210–221. Springer, 2012. 5 +[19] 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, 2017. 3 +[20] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. *IJCV*, 88:303-338, 2010. 3, 4 +[21] Junsong Fan, Zhaoxiang Zhang, Chunfeng Song, and Tieniu Tan. Learning integral objects with intra-class discriminator for weakly-supervised semantic segmentation. In CVPR, 2020. 4 +[22] Geoff French, Timo Aila, Samuli Laine, Michal Mackiewicz, and Graham Finlayson. Semi-supervised semantic segmentation needs strong, high-dimensional perturbations. arXiv preprint arXiv:1906.01916, 2019. 4 +[23] 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. 7 +[24] Sathish Paulraj Gundupalli, Subrata Hait, and Atul Thakur. A review on automated sorting of source-separated municipal solid waste for recycling. Waste management, 60:56-74, 2017. 1 +[25] 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 +[26] Minyoung Huh, Pulkit Agrawal, and Alexei A Efros. What makes imagenet good for transfer learning? arXiv preprint arXiv:1608.08614, 2016. 7 +[27] Sanghyun Jo and In-Jae Yu. Puzzle-cam: Improved localization via matching partial and full features. CVPR, 2021. 4, 6, 7, 12 +[28] Silpa "Kaza, Lisa C. Yao, Perinaz Bhada-Tata, and Frank Van Woerden. "What a Waste 2.0: A Global Snapshot of Solid Waste Management to 2050". "World Bank", "Washington, DC", "2018". 1 +[29] Jongmok Kim, Jooyoung Jang, and Hyunwoo Park. Structured consistency loss for semi-supervised semantic segmentation. arXiv preprint arXiv:2001.04647, 2020. 4 +[30] Alexander Kolesnikov and Christoph H Lampert. Seed, expand and constrain: Three principles for weakly-supervised image segmentation. In ECCV, 2016. 4 + +[31] Maria Koskinopoulou, Fredy Raptopoulos, George Papadopoulos, Nikitas Mavrakis, and Michail Maniadakis. Robotic waste sorting technology: Toward a vision-based categorization system for the industrial robotic separation of recyclable waste. IEEE Robotics & Automation Magazine, 28(2):50-60, 2021. 2, 3, 6 +[32] Seungho Lee, Minhyun Lee, Jongwuk Lee, and Hyunjung Shim. Railroad is not a train: Saliency as pseudo-pixel supervision for weakly supervised semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5495-5505, 2021. 6, 7 +[33] Yanghao Li, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Scale-aware trident networks for object detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6054-6063, 2019. 6, 7 +[34] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980-2988, 2017. 6, 7 +[35] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 3, 4, 6, 7 +[36] Shikun Liu, Shuaifeng Zhi, Edward Johns, and Andrew J. Davison. Bootstrapping semantic segmentation with regional contrast. arXiv preprint arXiv:2104.04465, 2021. 4, 6, 7 +[37] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. CVPR, 2021. 3 +[38] Anthony Martin. Recycling image classification. [EB/OL]. http://web.cecs.pdx.edu/~singh/rcyc-web/index.html/ Accessed May 22, 2021. 1, 3 +[39] Francisco Massa and Ross Girshick. maskrcnn-benchmark: Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch. https://github.com/facebookresearch/maskrcnn-benchmark, 2018. Accessed: [Insert date here]. 3, 6 +[40] Robert Mendel, Luis Antonio de Souza, David Rauber, João Paulo Papa, and Christoph Palm. Semi-supervised segmentation based on error-correcting supervision. In ECCV, 2020. 4 +[41] Shervin Minaee, Yuri Y Boykov, Fatih Porikli, Antonio J Plaza, Nasser Kehtarnavaz, and Demetri Terzopoulos. Image segmentation using deep learning: A survey. IEEE Trans. on PAMI, 2021. 3 +[42] Sudhanshu Mittal, Maxim Tatarchenko, and Thomas Brox. Semi-supervised semantic segmentation with high-and low-level consistency. IEEE Trans. on PAMI, 2019. 4 +[43] B. E. Moore and J. J. Corso. Fiftyone. GitHub. Note: https://github.com/voxel51/fiftyone, 2020.6 +[44] Roozbeh Mottaghi, Xianjie Chen, Xiaobai Liu, Nam-Gyu Cho, Seong-Whan Lee, Sanja Fidler, Raquel Urtasun, and Alan Yuille. The role of context for object detection and semantic segmentation in the wild. In CVPR, 2014. 3 + +[45] Yassine Ouali, Celine Hudelot, and Myriam Tami. Semi-supervised semantic segmentation with cross-consistency training. In The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 4, 6, 7 +[46] Deepak Pathak, Philipp Krahenbuhl, and Trevor Darrell. Constrained convolutional neural networks for weakly supervised segmentation. In ICCV, 2015. 4 +[47] Vitali Petsiuk, Abir Das, and Kate Saenko. Rise: Randomized input sampling for explanation of black-box models. arXiv preprint arXiv:1806.07421, 2018. 6 +[48] Pedro F Proença and Pedro Simões. Taco: Trash annotations in context for litter detection. arXiv preprint arXiv:2003.06975, 2020. 1, 2, 3, 6 +[49] AMP Robotics. https://www.amprobotics.com/. Accessed: 2020-05-30. 1 +[50] Zen Robotics. https://zenrobotics.com/. Accessed: 2020-05-30. 1 +[51] Boris Sekachev, Nikita Manovich, Maxim Zhiltsov, Andrey Zhavoronkov, Dmitry Kalinin, Ben Hoff, TOsmanov, Dmitry Kruchinin, Artyom Zankevich, Dmitriy Sidnev, Maksim Markelov, Johannes222, Mathis Chenuet, a andre, telenachos, Aleksandr Melnikov, Jijoong Kim, Liron Ilouz, Nikita Glazov, Priya4607, Rush Tehrani, Seungwon Jeong, Vladimir Skubriev, Sebastian Yonekura, vugia truong, zliang7, lizhming, and Tritin Truong. opencv/cvat: v1.1.0, Aug. 2020. 5 +[52] Hoo-Chang Shin, Holger R Roth, Mingchen Gao, Le Lu, Ziyue Xu, Isabella Nogues, Jianhua Yao, Daniel Mollura, and Ronald M Summers. Deep convolutional neural networks for computer-aided detection: CNN architectures, dataset characteristics and transfer learning. IEEE transactions on medical imaging, 35(5):1285-1298, 2016. 7 +[53] Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and support inference from rgbd images. In ECCV, 2012. 3 +[54] Joao Sousa, Ana Rebelo, and Jaime S Cardoso. Automation of waste sorting with deep learning. In 2019 XV Workshop de Visão Computacional (WVC), pages 43-48. IEEE, 2019. 1, 2, 3 +[55] Xin Tao, Hongyun Gao, Xiaoyong Shen, Jue Wang, and Jiaya Jia. Scale-recurrent network for deep image deblurring. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 5 +[56] Yude Wang, Jie Zhang, Meina Kan, Shiguang Shan, and Xilin Chen. Self-supervised equivariant attention mechanism for weakly supervised semantic segmentation. In CVPR, 2020. 4 +[57] Waste-Robotics. https://wasterobotic.com/. Accessed: 2020-05-30. 1 +[58] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detector2. https://github.com/facebookresearch/detectron2, 2019.7, 12 +[59] Mengde Xu, Zheng Zhang, Han Hu, Jianfeng Wang, Lijuan Wang, Fangyun Wei, Xiang Bai, and Zicheng Liu. End-to-end semi-supervised object detection with soft teacher. arXiv preprint arXiv:2106.09018, 2021. 7 +[60] Mindy Yang and Gary Thung. Classification of trash for recyclability status. CS229 Project Report, 2016, 2016. 1, 3 + +[61] Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In CVPR, 2020. 3 +[62] Yuhui Yuan, Xilin Chen, and Jingdong Wang. Object-contextual representations for semantic segmentation. ECCV, 2020. 3 +[63] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. 3 +[64] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, 2016. 4 +[65] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In CVPR, 2017. 3 \ No newline at end of file diff --git a/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/images.zip b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6fada7d64cb1159edb6790aeac2626f388471f1d --- /dev/null +++ b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b4b1c7d7be59094a294913b5c8976991c7669beb3f6e69971c1ba1207d6b000 +size 619047 diff --git a/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/layout.json b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..356d86861302d3968b9705c056e96840ecaec59e --- /dev/null +++ b/zerowastedatasettowardsdeformableobjectsegmentationinclutteredscenes/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ede4bcee71f4e2f39fdade94cfadd2cb7550e001e361fc35019b275a12762207 +size 341598 diff --git a/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_content_list.json b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..648f6d8f1a3306a6f26b899cfff66e6f06e58de9 --- /dev/null +++ b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:458e12ea45e15fb00994629b5228e09191b4b28c203f9149f2112b83d5cd054d +size 84424 diff --git a/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_model.json b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..291d1956163ef617950ada982d1b9a583556bcbf --- /dev/null +++ b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:446f2c4ba7482c9d4295239695592b193d36f32b8c679b085dada152fcadfee8 +size 102698 diff --git a/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_origin.pdf b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9ce64c98ac8a8e44b3baeab60e1c31a19dde1cf7 --- /dev/null +++ b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/e703727b-7d3a-40fe-a412-bfb2c1bb08c8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d5705e7301369f6e222b32bbd3358411a65b3a2b33ff2e4ea5b633cebfb2ba7 +size 4918073 diff --git a/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/full.md b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f4e35c404f7ffb59d2fa7e01bb24f36006d3f55d --- /dev/null +++ b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/full.md @@ -0,0 +1,250 @@ +# Zoom In and Out: A Mixed-scale Triplet Network for Camouflaged Object Detection + +Youwei Pang $^{1\dagger}$ , Xiaqi Zhao $^{1\dagger}$ , Tian-Zhu Xiang $^{3}$ , Lihe Zhang $^{1*}$ and Huchuan Lu $^{1,2}$ $^{1}$ Dalian University of Technology, China $^{2}$ Peng Cheng Laboratory, China $^{3}$ Inception Institute of Artificial Intelligence, UAE + +{lartpang, zxq}@mail.dlut.edu.cn, tianzhu.xiang19@gmail.com, {zhanglihe, lhchuan}@dlut.edu.cn + +# Abstract + +The recently proposed camouflaged object detection (COD) attempts to segment objects that are visually blended into their surroundings, which is extremely complex and difficult in real-world scenarios. Apart from high intrinsic similarity between the camouflaged objects and their background, the objects are usually diverse in scale, fuzzy in appearance, and even severely occluded. To deal with these problems, we propose a mixed-scale triplet network, ZoomNet, which mimics the behavior of humans when observing vague images, i.e., zooming in and out. Specifically, our ZoomNet employs the zoom strategy to learn the discriminative mixed-scale semantics by the designed scale integration unit and hierarchical mixed-scale unit, which fully explores imperceptible clues between the candidate objects and background surroundings. Moreover, considering the uncertainty and ambiguity derived from indistinguishable textures, we construct a simple yet effective regularization constraint, uncertainty-aware loss, to promote the model to accurately produce predictions with higher confidence in candidate regions. Without bells and whistles, our proposed highly task-friendly model consistently surpasses the existing 23 state-of-the-art methods on four public datasets. Besides, the superior performance over the recent cutting-edge models on the SOD task also verifies the effectiveness and generality of our model. The code will be available at https://github.com/lartpang/ZoomNet. + +# 1. Introduction + +Camouflaged objects are often "seamlessly" integrated into the environment by changing their appearance, coloration or pattern to avoid detection, such as chameleons, cuttlefishes and flatfishes. This is mainly due to their self-protection mechanism in the harsh living environment. + +![](images/afdb5c7b570cce368c9e31d6e5e7d0c4cdc6d6099984d35fc676b7cf2e841abb.jpg) +Figure 1. Illustration of ZoomNet. Based on zoom strategy, our model distills the differentiated features at different "zoom" scales. Then we design SIUs to screen and aggregate scale-specific features, and HMUs to reorganize and enhance mixed-scale features. Under the supervision of BCEL and the proposed UAL, the model produces the accurate and reliable camouflaged object prediction. Note that BCEL is computed based on ground truth while UAL is not. $f$ : feature map; $A$ : attention map. LastCBR: the last "ConvBN-ReLU" layer before the prediction. $l / m / s$ : Different input scales. The whiter region denotes the larger activation response. + +Broadly speaking, camouflaged objects also refer to the objects that are extremely small in size, highly similar to the background, or heavily obscured. They subtly hide themselves in the surroundings, making them difficult to be found, e.g., soldiers wearing camouflaged uniforms and lions hiding in the grass. Camouflaged object detection (COD) is far more complex and challenging than traditional salient object detection or other object segmentation. Recently, it has attracted ever-growing research interest from the computer vision community and facilitates many valuable real-life applications, such as search and rescue [6], species discovery [36], and medical image analysis [8,9,12,18,55]. + +Recently, numerous deep learning-based methods have been proposed and achieved significant progress. Nevertheless, they are still struggled to accurately and reliably detect camouflaged objects, due to visual insignificance of camouflaged objects, and high diversity in scale, appearance + +and occlusion. By observing our experiments, it is found that the current COD detectors are susceptible to distractors from background surroundings. Thus it is difficult to excavate discriminative and subtle semantic cues for camouflaged objects, resulting in the inability to clearly segment the camouflaged objects from the chaotic background and the predictions of some uncertain (low-confidence) regions. Taking these into mind, in this paper, we summarize the COD issue into two aspects: 1) How to accurately locate camouflaged objects under conditions of inconspicuous appearance and various scales? 2) How to suppress the obvious interference from the background and infer camouflaged objects more reliably? Intuitively, to accurately find the vague or camouflaged objects in the scene, humans may try to refer to and compare the changes in the shape or appearance at different scales by zooming in and out (rescaling) the image. This specific behavior pattern of human beings motivates us to identify camouflaged objects by mimicking the zooming in and out strategy. + +With this inspiration, in this paper, we propose a mixed-scale triplet network, ZoomNet, which significantly improves the existing camouflaged object detection performance. Firstly, for accurate object location, we employ scale space theory [23, 24, 43] to imitate zooming in and out strategy. Specifically, we design two key modules, i.e., the scale integration unit (SIU) and the hierarchical mixed-scale unit (HMU). As shown in Fig. 1, our model extracts differentiated camouflaged object features at different "zoom" scales using the triplet architecture, then adopts SIUs to screen and aggregate scale-specific features, and utilizes HMUs to further reorganize and enhance mixed-scale features. Thus, our model is able to mine the accurate and subtle semantic clues between objects and background under the mixed scales, and produce accurate predictions. Besides, we use the shared weight strategy, which achieves a good balance of efficiency and effectiveness. Secondly, it is related to reliable prediction in complex scenarios. Although the object is accurately located, the indistinguishable texture and background will easily bring negative effects to the model learning, e.g. predicting uncertain/ambiguity regions, which greatly reduces the detection performance and cannot be ignored. This can be seen in Fig. 6 (Row 3 and 4) and Fig. 1 in the supp. To this end, we design an uncertainty-aware loss (UAL) to guide the model training, which is only based on the prior knowledge that a good COD prediction should have a clear polarization trend. Its GT-independent characteristic makes it suitable for enhancing the GT-based BCE loss. This targeted enhancement strategy can force the network to optimize the prediction of the uncertain regions during the training process, enabling our ZoomNet to distinguish the uncertain regions and segment the camouflaged objects reliably. + +Our contributions can be summarized as follows: 1) + +For the COD task, we propose a mixed-scale triplet network, ZoomNet, which can credibly capture the objects in complex scenes by characterizing and unifying the scale-specific appearance features at different "zoom" scales and the purposeful optimization strategy. 2) To obtain the discriminative feature representation of camouflaged objects, we design SIUs and HMUs to distill, aggregate and strengthen the scale-specific and subtle semantic representation for accurate COD. 3) We propose a simple yet effective optimization enhancement strategy, UAL, which can significantly suppress the uncertainty and interference from the background without increasing extra parameters. 4) Our model greatly surpasses recent 23 state-of-the-art methods under seven metrics on four COD datasets. Furthermore, it shows good generalization in the SOD task and the superior performance compared with the existing SOD methods. + +# 2. Related Work + +Camouflaged Object. The study of camouflage has a long history in biology. This behavior of creatures in nature can be regarded as the result of natural selection and adaptation. In fact, in human life and other parts of society, it also has a profound impact, e.g., arts, popular culture, and design. More details can be found in [40]. In the field of computer vision, research on camouflaged objects is often associated with salient object detection (SOD), which mainly deals with those salient and easily observed objects in the scene. In general, saliency models are designed for the general observation paradigm (i.e., finding visually prominent objects). They are not suitable for the specific observation (i.e., finding concealed objects). Therefore, it is necessary to establish models based on the essential requirements and specific data of the task to learn the special knowledge. + +Camouflaged Object Detection (COD). Different from the traditional SOD task, the COD pays more attention to the undetectable objects (mainly because of too small size, occlusion, concealment or self-disguise). Due to the differences in the attributes of the objects of interest, the goals of the two tasks are different. The difficulty and complexity of the COD far exceed the SOD due to the high similarity between the object and the environment. Some valuable attempts have been made in recent years. Recent works [19, 29, 48] construct the multi-task learning framework in the prediction process of camouflaged objects and introduce some auxiliary tasks like classification and edge detection. Some uncertainty-aware methods [20, 47] are proposed to model and cope with the uncertainty in data annotation or COD data itself. In the other two methods [31, 41], contextual feature learning also plays an important role. There are also a number of bio-inspired methods, such as [7, 46]. They capture camouflaged objects by imitating the behavior process of hunters or changing the viewpoint of the scene. Although our method can also be at + +![](images/e0eb2e8dd53be5ff7655a4a256be71ed9229d570ebba90130a42f0a159d0d4e7.jpg) +Figure 2. Overall framework. The shared triplet feature encoder is used to extract multi-level features corresponding to different input "zoom" scales, which is composed of E-Net and C-Net for extracting and compressing features, respectively. At different levels of the scale merging layer, SIUs are adopted to screen and aggregate the critical cues from different scales. Then the fused features are gradually integrated through the top-down up-sampling path in the hierarchical mixed-scale decoder. HMUs further enhance the feature discrimination by constructing a multi-path structure inside the features. Finally, a probability map of the camouflaged object corresponding to the input image can be obtained. In the training stage, the binary cross entropy and the proposed UAL are used as the loss function. + +tributed to the last category, ours is different from the above methods. Our method simulates the behavior of humans to understand complex images by zooming in and out strategy. The proposed method explores the scale-specific and imperceptible semantic features under the mixed scales for accurate predictions, with the supervision of BCE and our proposed uncertainty-aware loss. Accordingly, our method achieves a more comprehensive understanding of the scene, and accurately and robustly segments the camouflaged objects from the complex background, which even can be transferred to the SOD task effectively and smoothly. + +Scale Space Integration. The scale-space theory aims to promote an optimal understanding of image structure, which is an extremely effective and theoretically sound framework for addressing naturally occurring scale variations. Its ideas have been widely used in computer vision, including the image pyramid [2] and the feature pyramid [22]. Due to the structural and semantic differences at different scales, the corresponding features play different roles. However, the commonly-used inverted pyramid-like feature extraction structures [13, 52] often cause the feature representation to lose too much texture and appearance details, which are unfavorable for dense prediction tasks [27, 38] that emphasize the integrity of regions and edges. Thus, some recent CNN-based COD methods [3, 7, 31, 41, 48] and SOD methods [14-17, 21, 25, 34, 35, 53, 54, 56] explore the combination strategy of inter-layer features to enhance the feature representation. These bring some positive gains for accurate localization and segmentation of objects. However, for the COD task, the existing approaches overlook the performance bottleneck caused by the ambiguity of the structural information of the data itself that makes it difficult to be fully perceived at a single scale. Different from them, + +we mimic the zoom strategy to synchronously consider differentiated relationships between object and background at multiple scales, thereby fully perceiving the camouflaged objects and confusing scenes. Besides, we also further explore the fine-grained feature scale space between channels. + +# 3. Proposed Method + +In this section, we first elaborate on the overall architecture of the proposed ZoomNet, and then present the details of each module and the uncertainty-aware loss. + +# 3.1. Overall Architecture + +The overall architecture of the proposed ZoomNet is illustrated in Fig. 2. Inspired by the zoom strategy from human beings when observing confusing scenes, we argue that different zoom scales often contain their specific information. Aggregating the differentiated information on different scales will benefit exploring the inconspicuous yet valuable clues from confusing scenarios, thus facilitating COD. To implement it, intuitively, we resort to the image pyramid. Specifically, we customize an image pyramid based on the single scale input to identify the camouflaged objects. The scales are divided into a main scale (i.e. the input scale) and two auxiliary scales. The latter is obtained by re-scaling the former to imitate the operation of zooming in and out. We utilize the shared triplet feature encoder to extract features on different scales and feed them to the scale merging layer. To integrate these features that contain rich scale-specific information, we design a series of scale integration units (SIUs) based on the attention-aware filtering mechanism. Thus, these auxiliary scales are integrated into the main scale, i.e., information aggregation of "zoom in and out" operation. This will largely enhance the model to distill crit + +![](images/3814a97aea45977df8ec80852028668b78dbb99b9944bd69da8b2c00cec81806.jpg) +Figure 3. Illustration of the scale integration unit (SIU). + +ical and informative semantic cues for capturing difficult-to-detect camouflaged objects. After that, we construct hierarchical mixed-scale units (HMUs) to gradually integrate multi-level features in a top-down manner to enhance the mixed-scale feature representation. It further increases the receptive field range and diversifies feature representation within the module. The captured fine-grained and mixedscale clues promote the model to accurately segment the camouflaged objects in the chaotic scenes. Besides, to overcome the uncertainty in the prediction caused by the inherent complexity of the data, we design an uncertainty-aware loss (UAL) to assist the BCE loss, enabling the model to distinguish these uncertain regions and produce an accurate and reliable prediction. + +# 3.2. Triplet Feature Encoder + +We start by extracting deep features through a shared triplet feature encoder for the group-wise inputs, which consists of the feature extraction and the channel compression networks, i.e. E-Net and C-Net. For the trade-off between efficiency and effectiveness, the main scale and the two auxiliary scales are empirically set to $1.0 \times$ , $1.5 \times$ and $0.5 \times$ . E-Net is constituted by the commonly-used ResNet-50 [11] that is removed the structure after "layer4". C-Net is cascaded to further optimize computation and obtain a more compact feature. For more details about it, please see the supp. Thus, three sets of 64-channel feature maps corresponding to three input scales are produced, i.e., $\{f_i^k\}_{i=1}^5$ , $k \in \{0.5, 1.0, 1.5\}$ . Next, these features are fed successively to the scale merging layer and the hierarchical mixed-scale decoder for subsequent processing. + +# 3.3. Scale Merging Layer + +We design an attention-based SIU to screen (weight) and combine scale-specific information, as shown in Fig. 3. Several such units make up the scale merging layer. Through filtering and aggregation, the expression of different scales is self-adaptively highlighted. Before scale integration, the features $f_{i}^{1.5}$ and $f_{i}^{0.5}$ are first resized to be consistent resolution with the main scale feature $f_{i}^{1.0}$ . Specifically, for $f_{i}^{1.5}$ , we use a hybrid structure of "max-pooling + +![](images/0d0c111d0048e8f422bd2c9a3a53ea6d9f8410c7f4fe086eb8d3fa42354fbb0f.jpg) +Figure 4. Hierarchical mixed-scale unit (HMU). We adopt groupwise interaction and channel-wise modulation to explore the discriminative and valuable semantics from different channels. Note that each group of features is executed sequentially from top to bottom. The latter one integrates part of the features of the previous one before the feature transformation. + ++ average-pooling" to down-sample it, which helps to preserve the effective and diverse responses for camouflaged objects in high-resolution features. For $f_{i}^{0.5}$ , we directly up-sample it by the bi-linear interpolation. Then, these features are fed into the "attention generator", and a three-channel feature map is calculated through a series of convolutional layers. After a softmax activation layer, the attention map $A^{k}$ ( $k \in \{0.5, 1.0, 1.5\}$ ) corresponding to each scale can be obtained and used as respective weights for the final integration. The process is formulated as: + +$$ +\begin{array}{l} A _ {i} = \operatorname {s o f t m a x} (\Psi (\left[ \mathcal {U} (f _ {i} ^ {0. 5}), f _ {i} ^ {1. 0}, \mathcal {D} (f _ {i} ^ {1. 5}) \right], \phi)), \\ f _ {i} = A _ {i} ^ {0. 5} \cdot \mathcal {U} \left(f _ {i} ^ {0. 5}\right) + A _ {i} ^ {1. 0} \cdot f _ {i} ^ {1. 0} + A _ {i} ^ {1. 5} \cdot \mathcal {D} \left(f _ {i} ^ {1. 5}\right), \tag {1} \\ \end{array} +$$ + +where $\Psi (\star ,\phi)$ indicates the stacked "Conv-BN-ReLU" layers in the attention generator, and $\phi$ means the parameters of these layers. $[\star ]$ represents the concatenation operation. $\mathcal{D}$ and $\mathcal{U}$ refer to the hybrid pooling and bi-linear interpolation operations mentioned above, respectively. Note that some operations before and after the sampling operation are not shown in Equ. 1 for simplicity but can be seen in Fig. 3. These designs aim to selectively aggregate the scale-specific information to explore subtle but critical semantic cues at different scales, boosting the feature representation. + +# 3.4. Hierarchical Mixed-scale Decoder + +After SIUs, the auxiliary-scale information is integrated into the main-scale branch. Similar to the multi-scale case, different channels also contain differentiated semantics. Thus, it is necessary to excavate valuable clues contained in different channels. To this end, we design HMUs to conduct information interaction and feature refinement between channels, which strengthen features from coarse-grained group-wise iteration to fine-grained channel-wise modulation in the decoder, as depicted in Fig. 4. The input $\hat{f}_i$ of the $\mathrm{HMU}_i$ contains the multi-scale fused feature + +Table 1. Comparisons of different methods on COD datasets. The best three results are highlighted in red, green and blue. “—”: Not available; *: Using more datasets. + +
ModelCAMOCHAMELEONCOD10KNC4K
Sm↑Fβ↑MAE↓Fβ↑Em↑Sm↑Fβ↑MAE↓Fβ↑Em↑Sm↑Fβ↑MAE↓Fβ↑Em↑Sm↑Fβ↑MAE↓Fβ↑Em↑
Salient Object Detection / Medical Image Segmentation
NLDF [28]0.6650.4950.1230.5640.7900.7980.6520.0630.7140.8930.7010.4730.0590.5390.8190.7380.5860.0830.6560.846
PiCANet [26]0.7010.5100.1250.5730.7990.7650.5520.0850.6180.8460.6960.4150.0810.4890.7880.7580.5700.0880.6400.835
BASNet [37]0.6150.4340.1240.5030.7270.8470.7710.0440.7950.8940.6610.4320.0710.4860.7490.6950.5460.0950.6100.785
CPD [44]0.7160.5560.1130.6180.7960.8570.7310.0480.7710.9230.7500.5310.0530.5950.8530.7870.6450.0720.7050.866
PoolNet [25]0.7300.5750.1050.6430.8190.8450.6900.0540.7490.9330.7400.5060.0560.5750.8440.7850.6350.0730.6990.865
EGNet [51]0.7320.6040.1090.6700.8200.7970.6490.0650.7020.8840.7360.5170.0610.5820.8540.7770.6390.0750.6960.864
F3Net [42]0.7110.5640.1090.6160.7800.8480.7440.0470.7700.9170.7390.5440.0510.5930.8190.7800.6560.0700.7050.848
SCRN [45]0.7790.6430.0900.7050.8500.8760.7410.0420.7870.9390.7890.5750.0470.6510.8800.8300.6980.0590.7570.897
CSNet [10]0.7710.6410.0920.7050.8490.8560.7180.0470.7660.9280.7780.5690.0470.6340.8710.7500.6030.0880.6550.793
SSAL [50]0.6440.4930.1260.5790.7800.7570.6390.0710.7020.8560.6680.4540.0660.5270.7890.6990.5610.0930.6440.812
UCNet [49]0.7390.6400.0940.7000.8200.8800.8170.0360.8360.9410.7760.6330.0420.6810.8670.8110.7290.0550.7750.886
MINet [35]0.7480.6370.0900.6910.8380.8550.7710.0360.8020.9370.7700.6080.0420.6570.8590.8120.7200.0560.7640.887
ITSD [57]0.7500.6100.1020.6630.8300.8140.6620.0570.7050.9010.7670.5570.0510.6150.8610.8110.6790.0640.7290.883
PraNet [8]0.7690.6630.0940.7100.8370.8600.7630.0440.7890.9350.7890.6290.0450.6710.8790.8220.7240.0590.7630.888
Camouflaged Object Detection
ANet_SRM [19]0.6820.4840.1260.5410.722———————————————
SINet [7]0.7450.6440.0920.7020.8290.8720.8060.0340.8270.9460.7760.6310.0430.6790.8740.8080.7230.0580.7690.883
SLSR [29]0.7870.6960.0800.7440.8540.8900.8220.0300.8410.9480.8040.6730.0370.7150.8920.8400.7660.0480.8040.907
MGL-R [48]0.7750.6730.0880.7260.8420.8930.8120.0310.8330.9410.8140.6660.0350.7100.8900.8330.7390.0530.7820.893
PFNet [31]0.7820.6950.0850.7460.8550.8820.8100.0330.8280.9450.8000.6600.0400.7010.8900.8290.7450.0530.7840.898
UJSC* [20]0.8000.7280.0730.7720.8730.8910.8330.0300.8470.9550.8090.6840.0350.7210.8910.8420.7710.0470.8060.907
MirrorNet [46]0.7850.7190.0770.7540.850——————————————
C2FNet [41]0.7960.7190.0800.7620.8640.8880.8280.0320.8440.9460.8130.6860.0360.7230.9000.8380.7620.0490.7950.904
UGTR [47]0.7840.6840.0860.7350.8510.8880.7940.0310.8190.9400.8170.6660.0360.7110.8900.8390.7460.0520.7870.899
Ours0.8200.7520.0660.7940.8920.9020.8450.0230.8640.9580.8380.7290.0290.7660.9110.8530.7840.0430.8180.912
+ +$f_{i}$ from the $\mathrm{SIU}_i$ and the feature $\tilde{f}_{i + 1}$ from the $\mathrm{HMU}_{i + 1}$ : + +$$ +\hat {f} _ {i} = f _ {i} + \mathcal {U} (\tilde {f} _ {i + 1}). \tag {2} +$$ + +Group-wise Iteration. We adopt $1 \times 1$ convolution to extend the channel number of feature map $\hat{f}_i$ . The features are then divided into $G$ groups $\{g_j\}_{j=1}^G$ along the channel dimension. Feature interaction between groups is carried out in an iterative manner. Specifically, the first group $\{g_1\}$ is split into three feature sets $\{g'_1\}_{k=1}^3$ after a convolution block. Among them, the $g'_1$ is adopted for information exchange with the next group, and the other two are used for channel-wise modulation. In the $j^{th}$ ( $1 < j < G$ ) group, the feature $g_j$ is concatenated with the feature $g'_j_{-1}$ from the previous group along the channel, followed by a convolution block and a split operation, which similarly divides this feature group into three feature sets. It is noted that the output of the group $G$ with the similar input form to the previous groups only contains $g'_G^2$ and $g'_G^3$ . Such an iterative mixing strategy strives to learn the critical clues from different channels and obtain a powerful feature representation. From another perspective, the iterative structure in HMU can be equivalent to a kernel pyramid structure. + +Channel-wise Modulation. The features $\left[\left\{g_{j}^{\prime 2}\right\}_{j=1}^{G}\right]$ are concatenated and converted into the feature modulation vector $\alpha$ by a small convolutional network, which is employed to weight another concatenated feature $\left[\left\{g_{j}^{\prime 3}\right\}_{j=1}^{G}\right]$ . The weighted feature is then processed by a convolutional layer, which is defined as: + +$$ +\tilde {f} _ {i} = \mathcal {A} \left(\hat {f} _ {i} + \mathcal {N} \left(\mathcal {T} \left(\alpha \cdot \left[ \left\{g ^ {\prime 3} _ {j} \right\} _ {j = 1} ^ {G}\right]\right)\right)\right), \tag {3} +$$ + +where $\mathcal{A},\mathcal{N}$ and $\mathcal{T}$ represent the activation layer, the normalization layer and the convolutional layer, respectively. + +Based on five cascaded HMUs and several stacked convolutional layers, a single-channel logits map is obtained. The final confidence map $\mathbf{P}$ that highlights the camouflaged objects is then generated by a sigmoid function. + +# 3.5. Loss Functions + +The binary cross entropy loss (BCEL) is widely used in various image segmentation tasks and its mathematical form is $l_{BCEL}^{i,j} = -\mathbf{g}_{i,j}\log \mathbf{p}_{i,j} - (1 - \mathbf{g}_{i,j})\log (1 - \mathbf{p}_{i,j})$ , where $\mathbf{g}_{i,j}\in \{0,1\}$ and $\mathbf{p}_{i,j}\in [0,1]$ denote the ground truth and the predicted value at position $(i,j)$ , respectively. As shown in Fig. 6, due to the complexity of the COD data, if trained only under the BCEL, the model produces serious ambiguity and uncertainty in the prediction and fails to accurately capture objects, of which both will reduce the reliability of COD. To force the model to enhance "confidence" in decision-making and increase the penalty for fuzzy prediction, we design a strong constraint as the auxiliary of the BCEL, i.e., the uncertainty-aware loss (UAL). + +In the final probability map of the camouflaged object, the pixel value range is [0, 1], where 0 means the pixel belongs to the background, and 1 means it belongs to the camouflaged object. Therefore, the closer the predicted value is to 0.5, the more uncertain the determination about the property of the pixel is. To optimize it, a direct way is to use the ambiguity as the supplementary loss for these difficult samples. To this end, we first need to define the ambiguity measure of the pixel $x$ , which maximizes at $x = 0.5$ and + +![](images/9e3a3aa7f2b1888e4ed2c84c11b6970f96c7656da0a912c164f1e11afb436ddb.jpg) +Figure 5. Visual comparisons of some recent COD methods and ours on different types of samples. Please zoom in for more details. + +minimizes at $x = 0$ or $x = 1$ . And as a loss, the function should be smooth and continuous with only a finite number of non-differentiable points. For brevity, we empirically consider two forms, $\Phi_{pow}^{\alpha}(x) = 1 - |2x - 1|^{\alpha}$ based on the power function and $\Phi_{exp}^{\alpha}(x) = e^{-(\alpha (x - 0.5))^2}$ based on the exponential function. Besides, inspired by the form of the weighted BCE loss, we also try to use $\omega = 1 + \Phi_{pow}^2(x)$ as the weight of BCE loss to increase the loss of hard pixels. After massive experiments (Sec. 4.3), the proposed UAL is formulated as $l_{UAL}^{i,j} = 1 - |2\mathbf{p}_{i,j} - 1|^2$ . Finally, the total loss function can be written as: + +$$ +L = L _ {B C E L} + \lambda \times L _ {U A L}, \tag {4} +$$ + +where $\lambda$ is the balance coefficient and we design three adjustment strategies of $\lambda$ , i.e., a fixed constant value, an increasing linear strategy, and an increasing cosine strategy in Sec. 4.3. The different forms and corresponding results are listed in the supp. From the results, we find that the increasing strategies, especially "cosine", do achieve better performance. So, the cosine strategy is used by default. + +# 4. Experiments + +# 4.1. Experiment Setup + +Datasets. We use four COD datasets, CAMO [19], CHAMELEON [39], COD10K [7] and NC4K [29]. CAMO consists of 1,250 camouflaged and 1,250 non-camouflaged images. CHAMELEON contains 76 hand-annotated images. COD10K includes 5,066 camouflaged, 3,000 background and 1,934 non-camouflaged images. NC4K is + +another large-scale COD testing dataset including 4,121 images from the Internet. Following the data partition of [7,29,31,48], we use all images with camouflaged objects in the experiments, in which 3,040 images from COD10K and 1,000 images from CAMO are used for training, and the rest ones for testing. Besides, we also show the performance on five SOD datasets in the supp. + +Evaluation Criteria. For COD and SOD, we use seven common metrics for evaluation based on [32, 33], including S-measure [4] ( $S_m$ ), weighted F-measure [30] ( $F_\beta^\omega$ ), mean absolute error (MAE), F-measure [1] ( $F_\beta$ ), E-measure [5] ( $E_m$ ), precision-recall (PR) curve and $F_\beta$ -threshold curve ( $F_\beta$ curve). The curves can be found in the supp. + +Implementation Details. The proposed ZoomNet is implemented with PyTorch. As the settings in recent methods [7,29,31,48], the encoder is initialized with the parameters of ResNet-50 pretrained on ImageNet, and the remaining parts are randomly initialized. SGD with momentum 0.9 and weight decay 0.0005 is chosen as the optimizer. The learning rate is initialized to 0.05 and follows a linear warm-up and linear decay strategy. The entire model is trained for 40 epochs with a batch size of 8 in an end-to-end manner on an NVIDIA 2080Ti GPU. During training and inference, the main scale is $384 \times 384$ . Random flipping and rotating are employed to augment the training data. + +# 4.2. Comparisons with State-of-the-arts + +COD is an emerging field, so we introduce some methods for salient object detection and medical image segmentation for comparison. The results of all these methods come from existing public data or are generated by models + +Table 2. Ablation study on the COD10K-Test. SIU: Scale integration unit; HMU: Hierarchical mixed-scale unit with $g$ groups; UAL: Uncertainty-aware loss; ⑤: The simple extension of baseline ① with the similar number of parameters and FLOPs to ④. + +
ModelGFLOPsParams. (M)HMUSIUUALSm↑Fω↑MAE↓Fβ↑Em↑
①41.88530.4530.8120.6370.0390.6920.898
②78.56030.696g=60.8200.6540.0370.7060.897
③166.82130.453✓0.8370.6820.0340.7310.912
④203.49628.794g=6✓0.8430.6940.0320.7430.909
⑤207.64741.9750.8150.6320.0400.6890.896
⑥173.61630.819g=2✓✓0.8350.7210.0300.7580.902
⑥188.55631.600g=4✓✓0.8360.7230.0290.7610.905
⑥203.49632.382g=6✓✓0.8380.7290.0290.7660.911
⑥218.43633.163g=8✓✓0.8360.7260.0290.7630.907
+ +that are retrained based on the code released by the authors. Quantitative Evaluation. Tab. 1 shows the detailed comparison results. It can be seen that the proposed model consistently and significantly surpasses recent methods on all datasets without relying on any post-processing tricks. Compared with the recent best COD method UJSC, although it introduces extra SOD data for training and has suppressed other existing methods, our method still shows the obvious performance improvement on these datasets. Especially, our approach has more advantages on the metrics $\mathrm{F}_{\beta}^{\omega}$ , MAE, and $\mathrm{F}_{\beta}$ . On four datasets, the proposed method averagely outperforms the second-best method $\mathrm{C}^{2}\mathrm{F}$ -Net by $19.3\%$ in terms of MAE and the average gains in terms of $\mathrm{F}_{\beta}^{\omega}$ and $\mathrm{F}_{\beta}$ are $4\%$ . Besides, PR and $\mathrm{F}_{\beta}$ curves shown in the supp. also demonstrate the effectiveness of the proposed method. The flatness of the $\mathrm{F}_{\beta}$ curve reflects the consistency and uniformity of the prediction. Our curves are almost horizontal, which can be attributed to the effect of the proposed UAL. It drives the predictions to be more polarized and reduces the ambiguity. + +Qualitative Evaluation. Visual comparisons of different methods on several typical samples are shown in Fig. 5. They present the complexity in different aspects, such as big objects (Col. 1), middle objects (Col. 2-8), small objects (Col. 9-13), occlusions (Col. 2 and 10), background interference (Col. 10-13), and indefinable boundaries (Col. 1, 2, 6-13). These results intuitively show the superior performance of the proposed method. In addition, it can be noticed that our predictions have clearer and more complete object regions and sharper contours. + +# 4.3. Ablation Studies + +In this section, we perform comprehensive ablation analyses on different components. Because COD10K is the most widely-used large-scale COD dataset, and contains various objects and scenes, all subsequent ablation experiments are carried out on it. + +Effectiveness of SIUs and HMUs. In the proposed model, both the SIU and the HMU are very important structures. We install them one by one on the baseline model to eval + +![](images/32e841715c169aec18eb19dcf1bd4ab70a683ccac4f9b76355718dd1b630e8a2.jpg) +Figure 6. Visual comparisons for showing the effects of the proposed components. B: Baseline; +S: +SIUs; +H: +HMUs; +S+H: +SIUs+HMUs; +S+H+L: +SIUs+HMUs+UAL. + +Table 3. Comparisons of mixed and single scale input schemes on CAMO and COD10K. All models are based on ① in Tab. 2. + +
Input ScaleCombination StrategySm↑Fβ↑MAE↓Fβ↑Em↑AVG. Relative Improvement
1.0×—0.7970.6490.0630.7040.875
0.5×—0.7460.5530.0760.6160.833↓12.03%
0.5×, 1.0×Addition0.8010.6470.0620.7020.876↑0.31%
0.5×, 1.0×SIU0.8060.6580.0590.7090.879↑1.86%
1.5×—0.8200.6830.0590.7370.890↑4.05%
0.5×, 1.5×Addition0.8200.6800.0580.7350.894↑4.43%
0.5×, 1.5×SIU0.8220.6870.0560.7400.893↑5.33%
1.0×, 1.5×Addition0.8190.6850.0580.7380.892↑4.47%
1.0×, 1.5×SIU0.8260.6970.0560.7450.897↑5.97%
0.5×, 1.0×, 1.5×Addition0.8210.6900.0560.7420.894↑5.43%
0.5×, 1.0×, 1.5×SIU0.8270.7000.0540.7510.898↑6.91%
+ +uate their performance. The results are shown in Tab. 2. Our baseline $①$ and other models $②$ and $⑤$ only use the inputs of the main scale. As can be seen, our baseline shows a good performance, probably due to the proper training setup and the more reasonable network architecture detailed in the supp. From $①-4$ , it can be seen that the two proposed modules make a significant contribution to the performance when compared to the baseline. Besides, the results in Fig. 6 show that the two modules can benefit each other and reduce their errors (e.g., Col. 1, 2, 5 and 7) to locate and distinguish objects more accurately. These components effectively help the model to excavate and distill the critical and valuable semantics and improve the capability of distinguishing hard objects. Under the cooperation between the proposed modules and loss functions, ZoomNet can completely capture the camouflaged objects of different scales and generate the predictions with higher contrast and consistency. In addition, in Tab. 2, the model $⑤$ is a simple extension of the baseline model $①$ using some standard convolutional blocks, to make the similar number of parameters and FLOPs with $④$ . The model $④$ still achieves better performance, which reflects the effectiveness of the proposed modules and the rationality of the design. + +Number of Groups in HMUs. In Tab. 2, we also show the effects of different group numbers in the proposed HMU. It can be seen from the results that the best performance appears when the number of groups is equal to 6. Also, it achieves a good balance between performance and efficiency. So, in other experiments, we set the number of + +Table 4. Different forms of the proposed UAL. Form 0 is our model without UAL. “—”: Unable to converge. Form 1.5 is used by default because of its balanced performance. Their curves are shown in the supp. + +
No.Form\( \alpha \)\( {\mathrm{S}}_{m} \uparrow \)\( {\mathrm{F}}_{\beta }^{2} \uparrow \)MAE \( \downarrow \)\( {\mathrm{F}}_{\beta } \uparrow \)\( {\mathrm{E}}_{m} \uparrow \)
0✘✘0.8430.6940.0320.7430.909
1.1, 1.2, 1.31/8, 1/4, 1/2-----
1.410.8340.7160.0290.7570.903
1.5\( {\Phi }_{pow}^{\alpha }\left( x\right) = 1 - {\left| 2x - 1\right| }^{\alpha } \)20.8380.7290.0290.7660.911
1.640.8340.7270.0290.7630.903
1.780.8330.7250.0290.7600.900
2.11/80.8440.6980.0320.7440.907
2.21/40.8450.7000.0320.7460.911
2.31/20.8430.7010.0310.7460.908
2.4\( {\Phi }_{exp}^{\alpha }\left( x\right) = {e}^{-{\left( \alpha \left( x - {0.5}\right) \right) }^{2}} \)10.8420.7130.0300.7540.908
2.520.8390.7200.0300.7610.908
2.640.8390.7060.0320.7520.909
2.780.8410.6980.0320.7450.910
3BCE w/ \( \omega = 1 + {\Phi }_{pow}^{2}\left( x\right) \)20.8440.6970.0320.7440.913
+ +groups in each HMU to 6. + +Mixed-scale Input Scheme. Our model is designed to mimic the behavior of "Zoom In&Out". The feature expression is enriched by combining the scale-specific information from different scales. In Fig. 1, the intermediate features and attention maps show that our mixed-scale scheme plays a positive and important role in locating the camouflaged object. Considering that the objects in COD10K are mainly small objects [7], which may limit the role of $0.5 \times$ input to some extent, we list average results on COD10K and CAMO in Tab. 3. The proposed scheme performs better than the single-scale one and simply mixed one. This verifies the rationality of such a design for the COD task. + +Options of Setting $\lambda$ . We compare three strategies and the results are listed in the supp., in which the increasing cosine strategy achieves the best performance. This may be due to the advantage of its smooth change process. This smooth intensity warm-up strategy of UAL motivates the model to take advantage of UAL in improving the learning process and to mitigate the possible negative interference of UAL on BCEL due to the lower accuracy of the model during the early stage of training. + +Forms of UAL. Different forms of UAL are listed in Tab. 4 and the corresponding curves are illustrated in the supp. As can be seen, Form 1.5 has a more balanced performance. Also, it is worth noting that, when approaching 0 or 1, the form which can maintain a larger gradient will obtain better performance in terms of $\mathrm{F}_{\beta}^{\omega}$ , MAE and $\mathrm{F}_{\beta}$ . This may provide some reference for designing a better loss. + +Effectiveness of UAL. The results of Fig. 6 intuitively show that the UAL greatly reduces the ambiguity caused by the interference from the background. Besides, we visualize the histogram maps of all results on CHAMELEON and the intermediate features from different stages in the decoder in the supp. In the stacked histogram map "w/o UAL", a large number of pixels appear in the middle area, which corresponds to more visually blurred/uncertain pre + +dictions. Besides, in the corresponding feature visualization, especially in the region inside the red box, there is clear background interference due to the complex scenarios and blurred edges, which are extremely prone to yield false positive predictions. However, when UAL is introduced, it can be seen that the middle interval of "w UAL" is flatter than the one of "w/o UAL", that is, most pixel values approach two extremes. And the feature maps become more discriminative and present a more compact and complete response in the regions of camouflaged objects. + +# 4.4. Discussion on SOD and COD + +It can be seen from the experiments in the supp. that our method not only performs well on COD, but also shows outstanding performance on SOD. Considering the difference between these two tasks, we may wonder why our method consistently performs well on such two seemingly different tasks. We attribute this to the generality and rationality of the designed structure. In fact, SOD and COD have a clear commonality, i.e., the accurate segmentation has to depend on multi-scale and category-free discriminative features. By integrating rich scale-specific features, our model can extract critical and informative cues from scenes and objects, which helps precise localization and smooth segmentation of objects. In addition, the proposed UAL can mitigate the ambiguity of predictions caused by the inherent complexity of scenes. Although the objects in SOD are salient, it can also benefit from UAL due to the vagueness introduced by the CNN model itself in the detailed information recovery process. All of these components are built on the common demand of the two tasks, which provides a solid foundation for the performance. + +# 5. Conclusion + +In this paper, we propose the ZoomNet by imitating the behavior of human beings to zoom in and out on images. This process actually considers the differentiated expressions about the scene from different scales, which helps to improve the understanding and judgment of camouflaged objects. We first filter and aggregate scale-specific features through the scale merging layer to enhance feature representation. Next, in the hierarchical mixed-scale decoder, the strategies of grouping, mixing and fusion further mine the mixed-scale semantics. Lastly, we introduce the uncertainty-aware loss to penalize the ambiguity of the prediction. Extensive experiments verify the effectiveness of the proposed method in both the COD and SOD tasks with superior performance to existing state-of-the-art methods. + +Acknowledgements This work was supported by the National Natural Science Foundation of China #61876202 and #61829102, the Liaoning Natural Science Foundation #2021-KF-12-10, and the Fundamental Research Funds for the Central Universities #DUT20ZD212. + +# References + +[1] Radhakrishna Achanta, Sheila Hemami, Francisco Estrada, and Sabine Susstrunk. Frequency-tuned salient region detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, number CONF, pages 1597-1604, 2009. 6 +[2] Edward Adelson, Charles Anderson, James Bergen, Peter Burt, and Joan Ogden. Pyramid methods in image processing. RCA Eng., 29, 11 1983. 3 +[3] Xuelian Cheng, Huan Xiong, Deng-Ping Fan, Yiran Zhong, Mehrtash Harandi, Tom Drummond, and Zongyuan Ge. Implicit motion handling for video camouflaged object detection. In CVPR, 2022. 3 +[4] Deng-Ping Fan, Ming-Ming Cheng, Yun Liu, Tao Li, and Ali Borji. Structure-measure: A new way to evaluate foreground maps. In Proceedings of the IEEE International Conference on Computer Vision, pages 4548-4557, 2017. 6 +[5] Deng-Ping Fan, Cheng Gong, Yang Cao, Bo Ren, Ming-Ming Cheng, and Ali Borji. Enhanced-alignment measure for binary foreground map evaluation. In International Joint Conference on Artificial Intelligence, pages 698-704, 2018. 6 +[6] Deng-Ping Fan, Ge-Peng Ji, Ming-Ming Cheng, and Ling Shao. Concealed object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021. 1 +[7] Deng-Ping Fan, Ge-Peng Ji, Guolei Sun, Ming-Ming Cheng, Jianbing Shen, and Ling Shao. Camouflaged object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 2777-2787, 2020. 2, 3, 5, 6, 8 +[8] Deng-Ping Fan, Ge-Peng Ji, Tao Zhou, Geng Chen, Huazhu Fu, Jianbing Shen, and Ling Shao. Pranet: Parallel reverse attention network for polyp segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 263-273, 2020. 1, 5 +[9] Deng-Ping Fan, Tao Zhou, Ge-Peng Ji, Yi Zhou, Geng Chen, Huazhu Fu, Jianbing Shen, and Ling Shao. Inf-net: Automatic Covid-19 lung infection segmentation from ct images. IEEE Transactions on Medical Imaging, 39(8):2626-2637, 2020. 1 +[10] Shang-Hua Gao, Yong-Qiang Tan, Ming-Ming Cheng, Chengze Lu, Yunpeng Chen, and Shuicheng Yan. Highly efficient salient object detection with 100k parameters. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Proceedings of European Conference on Computer Vision, pages 702-721, Cham, 2020. Springer International Publishing. 5 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 4 +[12] Ge-Peng Ji, Yu-Cheng Chou, Deng-Ping Fan, Geng Chen, Debesh Jha, Huazhu Fu, and Ling Shao. Progressively normalized self-attention network for video polyp segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 142–152, 2021. 1 + +[13] Ge-Peng Ji, Deng-Ping Fan, Keren Fu, Zhe Wu, Jianbing Shen, and Ling Shao. Full-duplex strategy for video object segmentation. Computational Visual Media, 8, 2022. 3 +[14] Wei Ji, Jingjing Li, Qi Bi, chuan guo, Jie Liu, and Li Cheng. Promoting saliency from depth: Deep unsupervised RGB-d saliency detection. In International Conference on Learning Representations, 2022. 3 +[15] Wei Ji, Jingjing Li, Shuang Yu, Miao Zhang, Yongri Piao, Shunyu Yao, Qi Bi, Kai Ma, Yefeng Zheng, Huchuan Lu, and Li Cheng. Calibrated rgb-d salient object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 9471-9481, 2021. 3 +[16] Wei Ji, Jingjing Li, Miao Zhang, Yongri Piao, and Huchuan Lu. Accurate RGB-D salient object detection via collaborative learning. In Proceedings of European Conference on Computer Vision, pages 52-69, 2020. 3 +[17] Wei Ji, Ge Yan, Jingjing Li, Yongri Piao, Shunyu Yao, Miao Zhang, Li Cheng, and Huchuan Lu. Dmra: Depth-induced multi-scale recurrent attention network for rgb-d saliency detection. IEEE Transactions on Image Processing, pages 1-16, 2022. 3 +[18] Wei Ji, Shuang Yu, Junde Wu, Kai Ma, Cheng Bian, Qi Bi, Jingjing Li, Hanruo Liu, Li Cheng, and Yefeng Zheng. Learning calibrated medical image segmentation via multi-rater agreement modeling. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 12341-12351, 2021. 1 +[19] Trung-Nghia Le, Tam V. Nguyen, Zhongliang Nie, MinhTriet Tran, and Akihiro Sugimoto. Anabranch network for camouflaged object segmentation. Computer Vision and Image Understanding, 184:45 - 56, 2019. 2, 5, 6 +[20] Aixuan Li, Jing Zhang, Yunqiu Lyu, Bowen Liu, Tong Zhang, and Yuchao Dai. Uncertainty-aware joint salient object and camouflaged object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 5 +[21] Jingjing Li, Wei Ji, Qi Bi, Cheng Yan, Miao Zhang, Yongri Piao, Huchuan Lu, and Li Cheng. Joint semantic mining for weakly supervised RGB-d salient object detection. In International Conference on Neural Information Processing Systems, 2021. 3 +[22] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 2117-2125, 2017. 3 +[23] Tony Lindeberg. Scale-Space Theory in Computer Vision, pages 187-226. 01 1994. 2 +[24] Tony Lindeberg. Feature detection with automatic scale selection. International Journal of Computer Vision, 30(2):79-116, Nov 1998. 2 +[25] Jiang-Jiang Liu, Qibin Hou, Ming-Ming Cheng, Jiashi Feng, and Jianmin Jiang. A simple pooling-based design for real-time salient object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 3912-3921, 2019. 3, 5 + +[26] Nian Liu, Junwei Han, and Ming-Hsuan Yang. Picanet: Learning pixel-wise contextual attention for saliency detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 3089-3098, 2018. 5 +[27] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 3431-3440, 2015. 3 +[28] Zhiming Luo, Akshaya Mishra, Andrew Achkar, Justin Eichel, Shaozi Li, and Pierre-Marc Jodoin. Non-local deep features for salient object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 6593-6601, Los Alamitos, CA, USA, jul 2017. IEEE Computer Society. 5 +[29] Yunqiu Lyu, Jing Zhang, Yuchao Dai, Aixuan Li, Bowen Liu, Nick Barnes, and Deng-Ping Fan. Simultaneously localize, segment and rank the camouflaged objects. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 5, 6 +[30] Ran Margolin, Lihi Zelnik-Manor, and Ayellet Tal. How to evaluate foreground maps? In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2014. 6 +[31] Haiyang Mei, Ge-Peng Ji, Ziqi Wei, Xin Yang, Xiaopeng Wei, and Deng-Ping Fan. Camouflaged object segmentation with distraction mining. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, June 2021. 2, 3, 5, 6 +[32] Youwei Pang. Pysodeval toolkit: A python-based evaluation toolbox for salient object detection and camouflaged object detection. https://github.com/lartpang/PySODEvalToolkit, 2020.6 +[33] Youwei Pang. Pysodmetrics: A simple and efficient implementation of sod metrics. https://github.com/lartpang/PysODMetrics, 2020.6 +[34] Youwei Pang, Lihe Zhang, Xiaqi Zhao, and Hutchuan Lu. Hierarchical dynamic filtering network for rgb-d salient object detection. In Proceedings of European Conference on Computer Vision, pages 235-252, 2020. 3 +[35] Youwei Pang, Xiaqi Zhao, Lihe Zhang, and Huchuan Lu. Multi-scale interactive network for salient object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 9410-9419, June 2020. 3, 5 +[36] Ricardo Pérez-de la Fuente, Xavier Delclos, Enrique Penalver, Mariela Speranza, Jacek Wierzchos, Carmen Ascaso, and Michael S Engel. Early evolution and ecology of camouflage in insects. PNAS, 109(52):21414-21419, 2012. 1 +[37] Xuebin Qin, Zichen Zhang, Chenyang Huang, Chao Gao, Masood Dehghan, and Martin Jagersand. Basnet: Boundary-aware salient object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 7479-7489, 2019. 5 +[38] 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, 2015. 3 + +[39] Przemysław Skurowski, Hassan Abdulameer, Jakub Błaszczyk, Tomasz Depta, Adam Kornacki, and Przemysław Koziel. Animal camouflage analysis: Chameleon database, 2017. http://kgwisc.aei.polsl.pl/index.php/pl/dataset/63-animal-camouflage-analysis.6 +[40] Martin Stevens and Sami Merilaita. Animal camouflage: Current issues and new perspectives. Philosophical transactions of the Royal Society of London. Series B, Biological sciences, 364:423-7, 12 2008. 2 +[41] Yujia Sun, Geng Chen, Tao Zhou, Yi Zhang, and Nian Liu. Context-aware cross-level fusion network for camouflaged object detection. In Zhi-Hua Zhou, editor, International Joint Conference on Artificial Intelligence, pages 1025-1031. ijcai.org, 2021. 2, 3, 5 +[42] Jun Wei, Shuhui Wang, and Qingming Huang. $\mathbf{F}^3$ net: Fusion, feedback and focus for salient object detection. In AAAI Conference on Artificial Intelligence, volume 34, pages 12321-12328, 2020. 5 +[43] A. Witkin. Scale-space filtering: A new approach to multiscale description. In International Conference on Acoustics, Speech and Signal Processing, volume 9, pages 150-153, March 1984. 2 +[44] Zhe Wu, Li Su, and Qingming Huang. Cascaded partial decoder for fast and accurate salient object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 3907-3916, 2019. 5 +[45] Zhe Wu, Li Su, and Qingming Huang. Stacked cross refinement network for edge-aware salient object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 7264-7273, 2019. 5 +[46] Jinnan Yan, Trung-Nghia Le, Khanh-Duy Nguyen, Minh-Triet Tran, Thanh-Toan Do, and Tam V. Nguyen. Mirror-net: Bio-inspired camouflaged object segmentation. IEEE Access, 9:43290-43300, 2021. 2, 5 +[47] Fan Yang, Qiang Zhai, Xin Li, Rui Huang, Ao Luo, Hong Cheng, and Deng-Ping Fan. Uncertainty-guided transformer reasoning for camouflaged object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 4146-4155, October 2021. 2, 5 +[48] Qiang Zhai, Xin Li, Fan Yang, Chenglizhao Chen, Hong Cheng, and Deng-Ping Fan. Mutual graph learning for camouflaged object detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 3, 5, 6 +[49] Jing Zhang, Deng-Ping Fan, Yuchao Dai, Saeed Anwar, Fatemeh Sadat Saleh, Tong Zhang, and Nick Barnes. Uc-net: Uncertainty inspired rgb-d saliency detection via conditional variational autoencoders. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 8579-8588, 2020. 5 +[50] Jing Zhang, Xin Yu, Aixuan Li, Peipei Song, Bowen Liu, and Yuchao Dai. Weakly-supervised salient object detection via scribble annotations. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2020. 5 +[51] Jia-Xing Zhao, Jiang-Jiang Liu, Deng-Ping Fan, Yang Cao, Jufeng Yang, and Ming-Ming Cheng. Egnet: Edge guidance + +network for salient object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 8779-8788, 2019. 5 +[52] Xiaoqi Zhao, Youwei Pang, Jiaxing Yang, Lihe Zhang, and Huchuan Lu. Multi-source fusion and automatic predictor selection for zero-shot video object segmentation. In Proceedings of the ACM International Conference on Multimedia, pages 2645-2653, 2021. 3 +[53] Xiaoqi Zhao, Youwei Pang, Lihe Zhang, Huchuan Lu, and Xiang Ruan. Self-supervised pretraining for rgb-d salient object detection. In AAAI Conference on Artificial Intelligence, 2022. 3 +[54] Xiaoqi Zhao, Youwei Pang, Lihe Zhang, Huchuan Lu, and Lei Zhang. Suppress and balance: A simple gated network for salient object detection. In Proceedings of European Conference on Computer Vision, pages 35-51, 2020. 3 +[55] Xiaoqi Zhao, Lihe Zhang, and Huchuan Lu. Automatic polyp segmentation via multi-scale subtraction network. In International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer, 2021. 1 +[56] Xiaoqi Zhao, Lihe Zhang, Youwei Pang, Huchuan Lu, and Lei Zhang. A single stream network for robust and real-time rgb-d salient object detection. In Proceedings of European Conference on Computer Vision, pages 646-662, 2020. 3 +[57] Huajun Zhou, Xiaohua Xie, Jian-Huang Lai, Zixuan Chen, and Lingxiao Yang. Interactive two-stream decoder for accurate and fast saliency detection. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pages 9138-9147, 2020. 5 \ No newline at end of file diff --git a/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/images.zip b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0b6a4272c56048670f9995c547c5593d8c274ff5 --- /dev/null +++ b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37621ec329dd2e113e438bd6cc47acbcd2f943dab73b56f1acb0dfc0cfe5c487 +size 651519 diff --git a/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/layout.json b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..97c92f9b003de3f53fb8403c0bda6732a7ecaaf6 --- /dev/null +++ b/zoominandoutamixedscaletripletnetworkforcamouflagedobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c90f9ae49f592ad41f683b0f6f4b79369cc8250be622e0bd3c43ee7e580ef58 +size 366190 diff --git a/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_content_list.json b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ba430891efc36af9c6924dcf1fbb237a789aa099 --- /dev/null +++ b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8d68848ac129f336c197cf533c1b987a19610eaa60e5fcde261a012a1642f1b +size 90044 diff --git a/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_model.json b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..80291eb8b860d58c51af934254cb5881275c2697 --- /dev/null +++ b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cca85903e37c399ef534b054ce5e14e13aca243ee36e749ddc35be5dc9a2ce3b +size 110824 diff --git a/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_origin.pdf b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..03a1c6521044915213c9b4d6fa53707b67edcab7 --- /dev/null +++ b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/5b63e73a-1534-40d8-9509-dba1df9d024d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad0a459f214996123aedda4890f28997e56bcccd6ccc8723ae6a2e2c3d1da8ff +size 665872 diff --git a/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/full.md b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9669e30163bedcc368aeac7c3b0e4f23701828c0 --- /dev/null +++ b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/full.md @@ -0,0 +1,393 @@ +# ZZ-Net: A Universal Rotation Equivariant Architecture for 2D Point Clouds + +Georg Bokmana, Fredrik Kahla, Axel Flintha,b + +bokman@chalmers.se, fredrik.kahl@chalmers.se, axel.flinth@umu.se + +$^{a}$ Department of Electrical Engineering, Chalmers University of Technology + +$^{\mathrm{b}}$ Department of Mathematics and Mathematical Statistics, Umeå University + +# Abstract + +In this paper, we are concerned with rotation equivariance on 2D point cloud data. We describe a particular set of functions able to approximate any continuous rotation equivariant and permutation invariant function. Based on this result, we propose a novel neural network architecture for processing 2D point clouds and we prove its universality for approximating functions exhibiting these symmetries. + +We also show how to extend the architecture to accept a set of 2D-2D correspondences as indata, while maintaining similar equivariance properties. Experiments are presented on the estimation of essential matrices in stereo vision. + +# 1. Introduction + +The need to interpret and process point clouds arises in many different application areas such as autonomous driving, augmented reality and robotics [18]. Basic problem examples in computer vision are classification, segmentation and object detection as well as correspondence problems in multiple view geometry [34]. Considering as input object a point cloud or a pair of point clouds, it is a natural requirement that permuting the order of the points doesn't change the object in question. Such a permutation should therefore not change the way the points are processed. This permutation symmetry needs to be considered when designing a neural network for point cloud input, which is typically done by having equivariant network layers. Another possible symmetry is rotation of the point clouds about the origin. For an example of a single point cloud processing task that is rotation equivariant, see Figure 1. We will also consider rotational symmetries for pairs of point clouds. + +Equivariance. Let us introduce some notation and provide a formal definition of equivariance. Given a group $G$ we consider sets which exhibit $G$ -symmetries (in a sense to be made precise shortly) and functions between such sets. A $G$ -set is a set $X$ equipped with a $G$ -action, i.e., a group homomorphism $\varphi$ from $G$ to the group of bijections from + +![](images/ccb0d955fc9afe28e4a6ea30839d53a6faccaaff8b3a41849a72ad75dfcce877.jpg) +Figure 1. A simple example of rotation equivariance. The illustration shows the task of determining the direction to the North Star given other stars in the night sky. The input is the set of locations of the visible stars in some 2D coordinate frame. Rotation equivariance of the point cloud processor $f$ means here that the determined direction should rotate if the night sky (or the observer) rotates. (Picture of stars [2].) + +$X$ to $X$ . One should think of a $G$ -action $\varphi$ as a way to relate elements of $G$ to symmetries of $X$ . Typically, we will suppress the group homomorphism in the notation and write $gx$ or $g^{*}x$ for $\varphi(g)(x)$ . An example of a $G$ -set is $\mathbb{C}^m$ acted on by the permutation group $S_m$ . Note that $S_m$ could act on $\mathbb{C}^m$ in different ways and we must specify the action to describe a $G$ -set. The canonical action is to permute the $m$ dimensions, but another obvious action is the trivial action given by $\pi Z = Z$ for all $\pi \in S_m$ and all $Z \in \mathbb{C}^m$ . If we have two $G$ -sets $X$ and $Y$ , we say that a function $f: X \to Y$ is $(G)$ -equivariant if it commutes with the $G$ -actions: $f(gx) = gf(x)$ . A special case is when the action on $Y$ is trivial and then we call $f$ invariant: $f(gx) = f(x)$ . For more information on groups, symmetries and equivariance in general, we refer to e.g. [22]. + +In this paper, we focus on the group $SO(2)\times S_m$ . The $SO(2)$ -action on a point cloud is given by rotating all points about the origin and the $S_{m}$ -action is given by permuting the points. More concretely, we are concerned with functions that are invariant to permutations, but equivariant to + +rotations. Let us call the set of such functions $\mathcal{R}(m)$ . + +Additionally, we go further, and describe new results and neural network architectures for the case of clouds of pair of points, or correspondences. In this case, we deal with functions that are permutation invariant, rotation equivariant to one of the clouds, and rotation invariant with respect to the other. We call this set of functions $\mathcal{R}_2(m)$ . + +An obvious limitation with our work is that we only deal with $SO(2)$ -equivariance and not higher order rotations. Still, it is an important case with many different applications. For instance, in many scenarios, invariance with respect to rotation around one axis is the correct model. Another example is essential matrix estimation [16], which we will explore in Section 5.2. Note that the derivations are simplified and the computations can be made more efficient as the group of 2D rotations is commutative, which is not the case for $SO(d)$ with $d > 2$ . + +The main contributions of this paper are as follows. First, we describe a dense set of equivariant functions on 2D point clouds (Theorem 2). With that set as a basis, we describe a neural network architecture for approximating the function space $\mathcal{R}(m)$ and prove its universality (Theorem 3). We then present how to extend that architecture to also cover $\mathcal{R}_2(m)$ and discuss the extension's universality properties. We test our architecture on a (toy) rotation estimation problem and the estimation of essential matrices in stereo vision. + +# 1.1. Related work + +Equivariance for regular image grids has been studied in various settings, ranging from classical CNNs for translation invariance [14, 24] to rotation and rigid transformation invariance [42, 44, 45]. Equivariance on more general domains and under general groups has also been investigated in a recent line of research. In particular there has been a focus on describing linear equivariant functions, which can be alternated with non-linearities to obtain equivariant neural network architectures [1, 4, 5, 12, 23]. Recent surveys of the theory include [3, 15, 43]. + +There exist a number of high-performing deep learning architectures for 3D point cloud processing, mostly targeted for recognition, classification and segmentation, including methods that do not take rotation equivariance into account [33, 54] and methods that do consider the effects of rotations [7, 13, 31, 37]. The approach most similar in spirit to ours is [47], but while we let every point in the point cloud gather information from all others to obtain rotation invariant and permutation equivariant features, they use the sorted Gram matrix of local neighbourhoods to obtain local rotation and permutation invariant features. They do not prove the universality of their approach. + +We focus on 2D rather than 3D. While the approaches for the 3D case could be modified to apply to the 2D case as well, doing so would not take advantage of the fact that + +the 2D case is simpler. Specifically, all rotations in 2D commute and this fact plays a crucial role in our proofs. + +Our work is inspired by fundamental theoretical results in machine learning which aim to characterize equivariant point cloud networks. In the seminal work of [52], all permutation equivariant functions were shown to belong to a particular family of functions from which equivariant network architectures can be constructed. In more recent work, the theory has been further developed and additional symmetries have been considered [20, 29, 30, 41, 50]. In [8], the authors present a method for proving universality for rotation equivariant point cloud networks in 3D. Their proof technique is applicable to networks which allow latent features consisting of arbitrary high order tensors, such as for e.g Tensor Field Networks [37]. In contrast, our networks only need to handle tensors of order two. + +While finalizing this work, we were made aware of the concurrent papers [40, 49], with an approach that is related to ours. In fact, Proposition 10 of [40] is similar to our Theorem 2 but for the group $O(2)$ instead of $SO(2)$ (in fact, they deal with a $d$ -dimensional underlying space and the group $O(d)$ ). In particular, we make a more thorough description and analysis of neural network architectures. + +From an application point-of-view, we are interested in correspondence problems and more generally, robust fitting problems in multiple view geometry. State-of-the-art deep learning approaches in this context include early work such as CNe [51] and OANet [53] but also the more recent approaches ACNe [36] where attentive context normalization is shown to improve permutation-equivariant learning and T-Net [55] which also consists of a permutation equivariant network that is able to capture both global and channel-wise contextual information. However, these methods only incorporate permutation equivariance, which make them dependent on the coordinate frame of the points. We give experimental comparisons to some of these approaches. + +Notation. Throughout the entire paper, we will identify $\mathbb{R}^2$ with $\mathbb{C}$ . The group $SO(2)$ of rotations is then naturally identified with the unit circle $\mathbb{S} \subset \mathbb{C}$ . To keep things simple, we understand point clouds as vectors $Z = (z_0, \ldots, z_{m-1}) \in \mathbb{C}^m$ , where $m$ is the number of points. Note that the action of $SO(2)$ on $\mathbb{C}^m$ can be simply written $\theta Z$ , where $\theta \in \mathbb{S}$ and that this can be equivalently read as complex multiplication or an action of the rotation group. We write $[m]$ for the set of indices from 0 to $m-1$ . The group of permutations is denoted $S_m$ , and for $\pi \in S_m$ , we let $\pi^* Z$ denote the permuted version of $Z$ , i.e., $[\pi^* Z]_i = Z_{\pi^{-1}(i)}$ . As in [29], we extend the latter to tensors: for $T \in (\mathbb{C}^m)^{\otimes 2}$ , $[\pi^* T]_{ij} = T_{\pi^{-1}(i)\pi^{-1}(j)}$ . Let us further denote the subgroup of permutations which fix the 0-element, i.e., $\{\pi \in S_m | \pi(0) = 0\}$ with $\mathrm{Stab}(0)$ , which is called the stabilizer of 0. Finally, we let $\tau_i \in S_m$ be the transposition of $i$ and 0. + +# 2. Approximating functions in $\mathcal{R}(m)$ + +In this section we describe the theory underlying our permutation invariant, rotation equivariant neural network architecture. We denote the set of continuous rotation equivariant and permutation invariant functions, i.e., functions $f: \mathbb{C}^m \to \mathbb{C}$ with $f(\theta \pi^* Z) = \theta f(Z)$ for all $\pi \in S_m$ and $\theta \in \mathbb{S}$ with $\mathcal{R}(m)$ . Throughout the paper, $m$ is fixed. + +# 2.1. A dense set of functions in $\mathcal{R}(m)$ + +To get an idea of how to design a network for approximating functions on $\mathcal{R}(m)$ , let us look at the DeepSet [52], or PointNet [33], architectures. In a nutshell, the reason that they are universal for approximating permutation invariant functions is that all such functions can be written as $\chi(\sum_{i\in[m]}\varrho(z_i))$ for some $K\in \mathbb{N}$ and functions $\varrho:\mathbb{C}\to \mathbb{R}^{K}$ and $\chi:\mathbb{R}^{K}\to \mathbb{C}$ . A natural Ansatz for approximating functions in $\mathcal{R}(m)$ is therefore to use a network of the same structure, but letting $\varrho$ and $\chi$ be rotation equivariant. Unfortunately, this simple idea will provably not succeed. + +Proposition 1. For any $m \geq 5$ , there are functions $f \in \mathcal{R}(m)$ that cannot be uniformly approximated only using functions as $\chi(\sum_{i \in [m]} \varrho(z_i))$ for $\chi$ and $\varrho$ rotation equivariant. + +The technical proof is given in Section A.2 in the supplementary material. An idea for a design is instead given by the following theorem. + +Theorem 2. The set of functions on the form + +$$ +f (Z) = \sum_ {i \in [ m ]} \gamma \left(\tau_ {i} ^ {*} Z\right) z _ {i}, \tag {1} +$$ + +where $\gamma$ is an arbitrary continuous, rotation invariant and $\operatorname{Stab}(0)$ -invariant function, is dense in $\mathcal{R}(m)$ . + +We remind the reader that $\tau_{i}$ is the transposition of 0 and $i$ . The proof of Theorem 2, which rests upon the density of polynomials and algebraic manipulations of them, is found in Section A.3 in the supplementary material. Let us here instead concentrate on intuitively explaining it. + +It is fruitful to interpret the values $(\gamma(\tau_i^* Z))_{i \in [m]}$ as scaled rotations $c_i \theta_i$ , with $c_i \in \mathbb{R}$ and $\theta_i \in \mathbb{S}$ . Considering this, (1) can be interpreted as a weighted centroid of the point cloud, where each point can be individually rotated prior to calculation of the weighted centroid. + +To calculate the rotation invariant weight $\gamma (\tau_i^* Z)$ for point $z_{i}$ , we are allowed to examine the entire cloud, and not only $z_{i}$ . Hence, (1) can be interpreted as an attention mechanism (compare, e.g., [13, 19, 25, 36, 39, 46, 48]) - when calculating 'its' weight, $z_{i}$ can attend to all other points in the + +network. It does not however do so in an arbitrary fashion: when calculating $\gamma(Z)$ , because of the $\operatorname{Stab}(0)$ -invariance, the point $z_0$ takes a special role, but the collective $(z_i)_{i \geq 1}$ is treated like a set. In the vector $\tau_i^* Z$ , the special, first, position is occupied by $z_i$ . Hence, when $z_i$ calculate 'its' weight, it is allowed to attend to its own position $z_i$ and to the positions of the rest of the points $(z_j)_{j \neq i}$ as a set. Finally, note that the weight calculation function $\gamma$ is shared by all the points. + +# 2.2. A universal architecture for $\mathcal{R}(m)$ + +We now describe how a neural network for approximation of functions in $\mathcal{R}(m)$ can be built. In the light of Theorem 2, we should design a weight unit $\alpha : \mathbb{C}^m \to \mathbb{C}$ which is invariant to both rotations and $\operatorname{Stab}(0)$ -permutations, approximating the function $\gamma$ . As for the rotation invariance, we propose to let the network simply act on the tensor $Z \otimes \overline{Z} = (z_i \overline{z}_j)_{i,j \in [m]}$ instead of $Z$ since $Z \otimes \overline{Z}$ is invariant to rotations of the network, the entire network will then automatically also be. Note that the real part of $Z \otimes \overline{Z}$ is the Gram matrix of scalar products $(\langle z_i, z_j \rangle)_{i,j \in [m]}$ , where we see the $z_i$ as vectors in $\mathbb{R}^2$ . This strategy hence has clear connections to [47], which uses sorted Gram matrices of local neighbourhoods. Compared to them, we apply a different way of handling the $\operatorname{Stab}(0)$ -invariance. We follow a canonical design idea for equivariant networks - first alternately apply equivariant linear layers and pointwise nonlinearities, add an invarizing step, and thereafter apply fully connected layers. We denote the resulting set of neural networks $\mathcal{NS}(m)$ . In the following closer description, 'linear layer' always refer to a real-linear layer with bias term. + +The $\mathcal{NS}(m)$ architecture is constructed as follows (cf. Figure 2): + +Early layers. The very first layer consists of applying a Stab(0)-equivariant linear layer + +$$ +B _ {0}: (\mathbb {C} ^ {m}) ^ {\otimes 2} \to (\mathbb {C} ^ {m}) ^ {\ell_ {1}} +$$ + +to $Z \otimes \overline{Z}$ . Here, as in the following, $\ell_j$ refers to the number of channels in layer $j$ . Then, a nonlinearity $\rho : \mathbb{C} \rightarrow \mathbb{C}$ is applied pointwise, i.e., $\rho(X)_i = \rho(x_i)$ . Concretely, we use a standard activation function separately applied to real- and imaginary parts. + +Subsequently, $L$ Stab(0)-equivariant layers + +$$ +B _ {i}: (\mathbb {C} ^ {m}) ^ {\ell_ {i}} \to (\mathbb {C} ^ {m}) ^ {\ell_ {i + 1}} +$$ + +are applied in alternation with a pointwise linearity $\rho : \mathbb{C} \to \mathbb{C}$ . The final output of the early layers is a multivector $V \in (\mathbb{C}^m)^{\ell_L}$ + +Invarization step. Next, we calculate $v = \sum_{i\in [m]}v_i$ . Note that this transforms the $\mathrm{Stab}(0)$ -equivariant multivector $V$ into a $\mathrm{Stab}(0)$ -invariant multiscalar $v$ . In fact, we + +![](images/76cdbb612384ddc178f87698a10a52dbf171e98ec78a0882717b8ef10c27cf7f.jpg) +Figure 2. The $\mathcal{NS}(m)$ (left) and $\mathcal{NS}^{+}(m)$ (right) architectures. Note that one of the points takes on a special role in the left architecture, whence the highlightings. + +![](images/0e2157edfa17d95a28e5efbb021977cf97c81ca52745551cf432d65a1af19604.jpg) + +could here instead apply any $\operatorname{Stab}(0)$ -invariant functional, but we concentrate on summation for simplicity. + +Late layers. Finally, a number of fully connected layers are applied to $v$ . + +Importantly, the very first linear layer maps into a space of multivectors, rather than multitensors. This saves a significant amount of memory compared to letting all early layers handle multitensors, which would be the naive way to process the tensor $Z \otimes \overline{Z}$ . In fact, it is even possible to apply the first layer without explicitly calculating $Z \otimes \overline{Z}$ - see Section C of the supplementary material. + +When implementing $\mathcal{NS}(m)$ , one of course needs a way to parametrize the $\operatorname{Stab}(0)$ -equivariant linear layers. In Section A.4 of the supplementary material, heavily building on the results from [29] about permutation equivariant linear maps, we provide such a parametrization. It is not needed to know this construction in order to follow the rest of the paper. Let us just note that the number of parameters needed to describe each input-output-channel pair is independent of $m$ (just as for the permutation invariant layers in [29]). + +In order to build a provably universal architecture for $\mathcal{R}(m)$ , it turns out that the above approximation of the $\gamma$ -function is not enough. We instead need to add another component, a 'vector unit' $\psi : \mathbb{C} \to \mathbb{C}$ acting on the individual points $z_{i}$ . These units use fully connected complex-linear linearities without bias and complex ReLUs $\rho_{\mathbb{C}}$ , + +$$ +\rho_ {\mathbb {C}} (z, \eta) = \operatorname {R e L U} (| z | - \eta) \frac {z}{| z |} +$$ + +as nonlinearities. Here, $\eta \in \mathbb{R}_+$ is a learnable parameter, and ReLU is the real ReLU. Note that $\rho_{\mathbb{C}}$ is rotation equivariant. Since the complex-linear maps also are, the entire $\psi$ -unit automatically becomes rotation equivariant. Let us call the set of such rotation equivariant networks $\mathcal{NC}$ .4 + +Using $\alpha$ -units from $\mathcal{NS}(m)$ and $\psi$ -units in $\mathcal{NC}$ , we may + +now build a set $\mathcal{NR}(m)^5$ of rotation equivariant, permutation invariant $\Psi$ networks through + +$$ +\Psi (Z) = \sum_ {i \in [ m ]} \alpha \left(\tau_ {i} ^ {*} Z\right) \psi \left(z _ {i}\right). \tag {2} +$$ + +Our main result is now that this architecture is universal for $\mathcal{R}(m)$ . + +# Theorem 3. $\mathcal{NR}(m)$ is universal for $\mathcal{R}(m)$ . + +Proof Sketch. The entire proof is too long to present here, and is postponed to Section A.5 of the supplementary material. Let's however sketch it. + +Step 1: Universality of $\mathcal{NS}(m)$ . First, one proves that for any $\epsilon >0$ , $\mathcal{NS}(m)$ is dense in the set of $\operatorname{Stab}(0)$ - and rotation invariant function when restricting to point clouds with $|z_0| > \epsilon$ . Intuitively, we apply the Stone-Weierstrass Theorem [35, 7.32] to show that $\alpha$ can approximate any function of the form $\phi (|z_0|^2,z_0\overline{Z})$ , where $\phi$ is permutation invariant with respect to the second argument. Since we are only concerned with the case of $|z_0|\neq 0$ , the map $Z\rightarrow (z_0,z_0\overline{Z})$ is injective. From that, we obtain the claim. + +Step 2: Universality of $\mathcal{NR}(m)$ . The first step shows that for any fixed $\epsilon > 0$ , $\alpha$ can be chosen so that $\alpha(\tau_i^* Z) \approx \gamma(\tau_i^* Z)$ as long as $|z_i| > \epsilon$ . However, since the product $\gamma(\tau_i^* Z) \cdot z_i$ is small if $|z_i| < \epsilon$ , we can still achieve a good approximation anywhere. This is the technical reason for the inclusion of the vector unit - it can eliminate any problem with large $\alpha(\tau_i^* Z)$ -values when $z_i$ is small. + +# 3. Modifications of the universal architecture + +Although the architecture in the previous section is universal, we will modify it in a number of ways before using them for our experiments. + +# 3.1. A richer, parallel architecture + +In the $\mathcal{NR}(m)$ -nets, note that each permuted version $\tau_i^* Z$ of the cloud is sent through the $\alpha$ -unit individually. It + +would intuitively be better to calculate all weights in parallel, and in that process let the weight values 'communicate' with each other. A simple way to achieve this is the following modification, which we denote $\mathcal{NS}^{+}(m)$ . + +The $\mathcal{NS}^+(m)$ architecture consists of the following: (see also Figure 2). + +Early layers. Apply an $S_{m}$ -equivariant linear layer + +$$ +B _ {0} ^ {+}: (\mathbb {C} ^ {m}) ^ {\otimes 2} \rightarrow ((\mathbb {C} ^ {m}) ^ {\otimes 2}) ^ {\ell_ {1}} +$$ + +to $Z\otimes \overline{Z}$ . Subsequently, apply, in alternation, a point-wise non-linearity and $S_{m}$ -equivariant layers + +$$ +B _ {i} ^ {+}: \left(\left(\mathbb {C} ^ {m}\right) ^ {\otimes 2}\right) ^ {\ell_ {i}} \rightarrow \left(\left(\mathbb {C} ^ {m}\right) ^ {\otimes 2}\right) ^ {\ell_ {i + 1}}. +$$ + +The final output of the early layers is then a multitensor $T \in ((\mathbb{C}^m)^{\otimes 2})^{\ell_L}$ . + +Invarization step. Next, $V = (\sum_{j \in [m]} T_{ij})_{i \in [m]}$ is calculated, which transforms the $S_m$ -equivariant multiconductor $T$ to an $S_m$ -equivariant multivector $V$ . + +Late layers. Now apply, in alternation, $S_{m}$ -equivariant layers $C_i: (\mathbb{C}^m)^{\ell_{L+i}} \to (\mathbb{C}^m)^{\ell_{L+i+1}}$ and pointwise nonlinearities. The final network output is $\alpha^{+}(Z) \in \mathbb{C}^{m}$ . + +We also modify the architecture for calculating the $\psi$ -units: We still use $\rho_{\mathbb{C}}$ as the non-linearity and apply $\mathbb{C}$ -linear layers, however $S_{m}$ -equivariant such to the entire cloud $Z$ . The final output of such networks is thus a vector $\psi^{+}(Z) \in \mathbb{C}^{m}$ . The set of these networks are called $\mathcal{NC}^{+}$ . + +Given an $\alpha^{+} \in \mathcal{NS}^{+}(m)$ and a $\psi^{+} \in \mathcal{NC}^{+}$ , we now build a network $\Psi^{+}$ through + +$$ +\Psi^ {+} (Z) = \sum_ {i \in [ m ]} \alpha^ {+} (Z) _ {i} \cdot \psi^ {+} (Z) _ {i} +$$ + +Let us denote the set of these networks $\mathcal{NR}^{+}(m)$ . These networks are still equivariant, and are at least as expressive as the non-modified ones. + +Proposition 4. (i) The new architecture has the correct equivariance, i.e., $\mathcal{NR}^{+}(m)\subseteq \mathcal{R}(m)$ + +(ii) The new architecture is at least as expressive as the non-modified, i.e., $\mathcal{NR}(m)\subseteq \mathcal{NR}^{+}(m)$ + +See Section A.6 in the supplement for a proof. + +It does take more parameters to parametrize each input-output-channel pair of the linear layers in the $\mathcal{NR}^{+}(m)$ , but this can be compensated by using less input-output-channel pairs. As for the memory requirements, we have to handle 2-tensors in memory, which leads to a quadratic cost. This is worse than the $\mathcal{NR}(m)$ -architecture, whose memory cost is only linear. However, recall that we need to calculate $m$ values $\alpha (\tau_i^* Z)$ , $i\in [m]$ for each application of the network. If we want to parallelize those calculations, which we should do for efficiency, we need to handle $m$ vectors, again resulting in a quadratic memory cost. + +A subtle, but nonetheless reasonable, reason for using the $\mathcal{NR}^{+}(m)$ -architecture instead of the $\mathcal{NR}(m)$ architecture is that it allows for more exchange of information between the points. As an example, notice that when calculating the weight $\alpha (\tau_i^* Z)$ , each early layer in an $\mathcal{NR}(m)$ -net is only allowed to attend to one vector, which can be seen as a preliminary version of the vector weight. In the $\mathcal{NR}(m)^+$ -architecture, it is additionally allowed to attend to all the 'preliminary weight vectors', i.e., the other columns of the input tensor (as a set). This arguably makes the modified architecture more versatile. + +# 4. Approximating functions in $\mathcal{R}_2(m)$ + +In our experiments, we will actually consider tasks which take pairs $(Z,X)$ of point clouds as indata. Thereby, we assume that for each $i$ , the points $z_{i}$ and $x_{i}$ correspond to each other, meaning that we only get invariance towards simultaneous permutations of both clouds. The tasks we consider will be (or will be transformed into ones that are) rotation equivariant with respect to one cloud, and rotation invariant with respect to the other. That is, we will have to approximate functions $f$ such that for every $\pi \in S_m$ and $\theta, \omega \in \mathbb{S}$ , we have + +$$ +f \left(\theta \pi^ {*} Z, \omega \pi^ {*} X\right) = \theta f (Z, X). +$$ + +We denote the set of such functions $\mathcal{R}_2(m)$ . + +We can use the same ideas as above to build an architecture for them. We propose to use the exact same scheme, with the only difference that the very first layer $L$ of the $\alpha$ -unit depends on $Z \otimes \overline{Z}$ and $X \otimes \overline{X}$ , as + +$$ +L (Z, X) = A (Z \otimes \bar {Z}) + B (X \otimes \bar {X}), +$$ + +where $A$ and $B$ are linear layers of the same flavor as for $\mathcal{NR}(m)$ and $\mathcal{NR}(m)^+$ , respectively. This yields architectures $\mathcal{NR}_2(m)$ and $\mathcal{NR}_2^+(m)$ . In Section A.7 of the supplementary material, we prove that $\mathcal{NR}_2(m)$ is not dense for the whole of $\mathcal{R}_2(m)$ . We however also prove that if we only consider cloud pairs $(Z, X)$ for which no points close to the origin in $X$ correspond to points far away from the origin in $Z$ , we again obtain universality for both versions. + +# 4.1. A deeper architecture + +We can easily combine several weight and vector units $\alpha_{k}\in \mathcal{NS}^{+}(m)$ , $\psi_{k}\in \mathcal{NC}^{+}$ , to build an iterative architecture. If $Z = Z^0$ is the input cloud, we iteratively define new clouds $Z^{k}$ through + +$$ +z _ {i} ^ {k + 1} = \alpha_ {k} ^ {+} (Z ^ {k}) _ {i} \cdot \psi_ {k} ^ {+} (Z ^ {k}) _ {i}, +$$ + +$i \in [m]$ . A particular case where such chains of units can be especially beneficial is the case when the cloud is filled with outliers. The weight units of early layers can then be + +![](images/d2686a25a4c9fde482b5e03050ae877f102702eadec2fd1afd1a7fb39894e564.jpg) +Figure 3. The architecture of a ZZ-unit. Two clouds are fed into $SO(2)$ -invariant weight units and $SO(2)$ -equivariant vector units, and then combined to produce a new pair of clouds. Best viewed in color. + +used to filter those out, by giving the outliers small weights. They will then cluster around the origin, which can safely be ignored by later weight units. This is in spirit similar to (attentive) context normalization [36, 51]. + +In the cloud pair case, we can iteratively construct new pairs of clouds by chaining pairs of weight and vector units (see Figure 3): + +$$ +z _ {i} ^ {k + 1} = \alpha_ {k} ^ {+} \left(Z ^ {k}, X ^ {k}\right) _ {i} \cdot \psi_ {k} ^ {+} \left(Z ^ {k}\right) _ {i}, +$$ + +$$ +x _ {i} ^ {k + 1} = \beta_ {k} ^ {+} (X ^ {k}, Z ^ {k}) _ {i} \cdot \phi_ {k} ^ {+} (X ^ {k}) _ {i}. +$$ + +The final output of such a network is then a pair of scalars $(F_0(Z,X),F_1(X,Z))$ , where the first scalar is equivariant to rotations in the first cloud, and invariant to rotations in the second, and vice versa. If we let $\alpha_{k} = \beta_{k}$ and $\psi_{k} = \phi_{k}$ , we will even obtain a network which is equivariant to switching the pairs. This is the version we are using in our experiments. Since the weight-units are using tensors of the form $Z\otimes \overline{Z}$ as input, we will refer to such layers as ZZ-units. + +To obtain a rotation equivariant output of the network, we sum over $i$ in the final (respective) cloud. The set of such obtained architecture will be referred to as ZZ-nets. + +# 4.2. Limitations of the architecture + +Although our architecture is provably universal, it has its limitations. First and foremost, it operates on tensors rather than vectors, making its memory requirement quadratic in the number of points per cloud. Secondly, all linear layers of our architecture are global in nature, which could hurt performance. + +A simple way to mitigate these issues would be to let the weight units $\alpha$ only operate on the nearest neighbors to $z_{i}$ when calculating the weight for $i -$ we would then return to a memory requirement which is linear in the cloud sizes, and induce locality. However, such an architecture would not be universal. + +![](images/2a45f6b837bbca051211f2107accf993e4ac99308b258c72b91734102ce35402.jpg) +Figure 4. A pair of noisy point clouds as used in the rotation estimation experiments. The inlier points are larger and colored green for illustration purposes. Here the outlier ratio $r$ is 0.4. + +# 5. Experiments + +Here we present two experiments to demonstrate our network in action. Further details about the experiments are given in Section B of the supplementary material. Code for the experiments is available at github.com/georg-bn/zz-net. + +# 5.1. Estimating rotations between noisy point clouds + +Let us, as a proof of concept more than anything else, test our model on a toy problem: Given a point pair $(Z,X)$ , estimate a rotation $R(Z,X)$ so that $X = R(Z,X)Z$ . This rotation responds to rotations of either cloud through $R(\theta Z,\omega X) = \omega \overline{\theta} R(Z,X)$ . + +If $Z$ and $X$ are completely noise-free, this is of course trivial (one can e.g. calculate $z_0 / x_0$ ). In order to make the problem more challenging, we consider a setting with both inlier and outlier noise. + +Data. We synthetically generate data. The details of the data generation are presented in the supplementary B.1. Each point cloud pair $(Z, X)$ contains $m = 100$ correspondences out of which a fraction $r$ are outliers. The inliers lie on a triangle with low-level inlier noise. An example pair is shown in Figure 4. + +Models. We test two versions of our model: A 'broad' and a 'deep' one. The 'broad' model consists of a single ZZ-unit, with 2 early and 3 late layers in the weight unit, and 2 layers in the vector unit. The 'deep' model consists of three ZZ-units, where each unit only has 1 early and 2 late weight-layer units, and 1 vector layer, and each such layer is smaller than for the broad model. The broad unit has around $4\mathrm{k}$ , and the deep around $7\mathrm{k}$ , parameters in total. + +We train a unit with weights shared, thus outputting two scalars $F(Z,X)$ and $F(X,Z)$ . The final output of our model $\widehat{\theta}(X,Z) = F(X,Z)\overline{F(Z,X)} \in \mathbb{C}$ then responds correctly to rotations of either cloud. + +For comparison, we implement two alternative models. A PointNet and a simplified version of ACNe [36] which we call 'ACNe-'. They have 34k and 11k parameters respectively. Details about these models are presented in the supplementary B.1. + +Experiments. We test each of the models on four outlier ratios: 0.4, 0.6, 0.8 and 0.85. We use an $\ell_2$ -loss between + +
Outlier ratior = 0.4r = 0.6
Threshold1°5°10°1°5°10°
Broad ZZ-net.42.97.99.21.87.96
Deep ZZ-net.85.991.0.84.99.99
PointNet.02.45.78.03.34.67
ACNe-.05.63.96.04.54.90
Outlier ratior = 0.8r = 0.85
Threshold1°5°10°1°5°10°
Broad ZZ-net†.03.46.81.02.24.50
Deep ZZ-net.32.90.96.11.73.90
PointNet.03.25.54.03.21.37
ACNe-.01.27.69.02.45.75
+ +Table 1. Results for rotation estimation with varying outlier ratios. This experiment was stopped early due to severe overfitting. + +the ground truth rotation and the output of the networks, and manually tune hyperparameters to optimize the mean error on the validation set. + +To evaluate the experiments, we test how many of the ground truth rotations the models can estimate within an error that corresponds to a difference $1^{\circ}$ , $5^{\circ}$ and $10^{\circ}$ for two normalized complex numbers (note that the output of our models is not necessarily normalized), respectively. The results are presented in Table 1. The broad model easily beats the PointNet model, and also the 'ACNe-'-model for low outlier ratios, but starts to struggle against the context-normalization based model for $r = 0.85$ . The deep model however easily outperforms all other models. + +We notice that some models struggled somewhat on the $r = 0.8$ -data set. We had to stop the broad model early due to severe overfitting, and the 'ACNe-' model did worse on the 0.8-set than on the 0.85-set. We suspect that this ultimately boils down to the fact that due to our data generation method, the actual outlier ratios are random. Therefore, the 0.8 dataset could contain some especially hard examples just by chance. + +# 5.2. Essential matrix estimation + +The input in the problem is a (noisy) set of calibrated 2D-2D correspondences $\{(p_1, p_2)\}$ , where $p_1, p_2 \in \mathbb{R}^2$ are points of interest in two images of the same object. The task is then to estimate the essential matrix $E \in \mathbb{R}^{3 \times 3}$ such that $\tilde{p}_2^T E \tilde{p}_1 = 0$ for the (correct) correspondences. Here, $\tilde{p}$ is the homogeneous representation of $p$ obtained by adding a third coordinate 1 to $p$ . See [16] for an in-depth description of essential matrices. Considering the points $\{p_1\}$ as elements of $\mathbb{C}$ and stacking them into a vector yields the $Z$ vector considered in earlier sections, and similar for $\{p_2\}$ and $X$ . + +Rotation equivariance of $E$ . If $\tilde{p}_2^T E\tilde{p}_1 = 0$ for a set of correspondences $\{(p_1,p_2)\}$ , it follows that if we rotate $p_1$ by an image plane rotation $R\in SO(2)$ , say to $q_{1} = Rp_{1}$ + +then $\tilde{p}_2^T E\tilde{R}^T\tilde{q}_1 = 0$ where $\tilde{R}\in SO(3)$ is the rotation obtained by applying $R$ as a rotation around the $z$ -axis. Hence, $E\tilde{R}^{T}$ is an essential matrix for the correspondences $\{(q_1,p_2)\}$ . Similarly one shows that a rotation of $p_2$ to $q_{2} = Rp_{2}$ yields an essential matrix $\tilde{R} E$ for the correspondences $\{(p_1,q_2)\}$ . + +The essential matrix has an SVD of the form $E = USV^T$ , where $U$ and $V$ are orthogonal and $S = \mathrm{diag}(1,1,0)$ . Since $E$ is only determined up to scale, we can choose $U$ and $V$ as rotation matrices. It is then possible to decompose $U$ and $V$ into Euler rotations about the $z-$ and $y$ -axes: $E = R_{z,2}R_{y,2}R_{z',2}SR_{z',1}^{T}R_{y,1}^{T}R_{z,1}^{T}$ where we can merge $R_{z',2}$ and $R_{z',1}$ as they commute with $S$ . We obtain $E = R_{z,2}R_{y,2}R_{z'}SR_{y,1}^{T}R_{z,1}^{T}$ and we have one degree of freedom for each $R$ , thus five in total, as expected. + +The equivariance properties of $E$ imply that $R_{z,1}$ is equivariant to rotations in $p_1$ and $R_{z,2}$ is equivariant to rotations in $p_2$ , both while being invariant to rotations of the other cloud. The other matrices are invariant to rotations in both clouds. We design the network to output five complex numbers on the unit circle $\mathbb{S}$ , where two of them lie in $\mathcal{R}_2(m)$ , and three are invariant to rotations in either cloud. + +The model: ZZ-net. We use a back-bone architecture $\mathcal{B}$ with three ZZ-units, the first two units having 2 early, 2 late and 2 vector layers and the last unit having 1 early, 1 late and 1 vector layer. We also add skip-connections between the units in the back-bone for ease of training. This back-bone outputs 8 channels of point clouds which are fed into two further units. One is a ZZ-unit $\mathcal{E}$ which is responsible for predicting the equivariant $R_{z,2}$ and $R_{z,1}$ . The second is a PointNet $\mathcal{I}$ that takes as input the $\alpha^{+}$ -values of the last layer of the back-bone (which are rotation invariant) to predict the invariant $R_{y,2}$ , $R_{y,1}$ and $R_{z'}$ . + +To account for the symmetry of changing order of the clouds, we approximate $R_{z,1}$ with $\mathcal{E}(\mathcal{B}(Z,X))$ , and $R_{z,2}$ with $\mathcal{E}(\mathcal{B}(X,Z))$ . In turn, $\mathcal{I}(\mathcal{B}(Z,X))$ yields two rotations: $R_{y,1}$ and $R_{z',1}$ , while $\mathcal{I}(\mathcal{B}(X,Z))$ yields $R_{y,2}$ and $R_{z',2}$ . $R_{z',1}$ and $R_{z',2}$ are combined to form $R_{z'} = R_{z',2}R_{z',1}^T$ . In total, the architecture thus outputs five rotations. It has around 55k parameters. + +Similar to OANet [53], we use a geometric loss based on virtual matches generated from the ground truth essential matrix. For further information on the model and training setup, see the supplementary B.2. + +Data. We use the subset of the YFCC100M data [38] corresponding to the sequence 'Reichstag' compiled by [17]. Two example images can be seen in Figure 5. The image sequence is processed to obtain SIFT-matches [28] between image pairs using code supplied by the authors of CNe [51]. Some image pairs are discarded due to visibility issues and for each remaining image pair 2000 correspondences are found, many of which might be incorrect matches. The obtained dataset is quite small - the training + +![](images/6a4bc4b06cdb4454be932a01bf2a2e7a2c3e8a6f61c1e032077b34ab12d03763.jpg) +Figure 5. Two images from the 'Reichstag' data. + +set consists of 3302, the validation set of 56 and the test set of 52 point cloud pairs6. Therefore our experiments should be viewed as a limited data case study. + +Evaluation metric. From the essential matrix we can recover the rotation between the two views and the translation between the views up to scale. We evaluate the estimated essential matrix in terms of the mAP score proposed by [51], which is a measure of error in angle of the estimated translation and rotation axes. + +Comparisons. We compare against CNe [51], OANet [53] and ACNe [36]. These methods build on the idea of learning inlier weights for the correspondences and using a weighted formulation of the 8 point method [27] as a final layer in the network. They are all very good at handling outliers, as they are explicitly trained on classifying each correspondence as an inlier or outlier as well as outputting a reasonable essential matrix. In contrast, our network is only trained to output a reasonable essential matrix but does it in a way that is resilient to rotations of the data, which is not part of the other frameworks. We do not compare against T-net [55] as they have not published their code at the time of writing. + +We retrain the implementation of the authors of CNe, OANet and ACNe on the 'Reichstag' dataset. For the sake of fairness, we do not use RANSAC at test time. Note that therefore our reported numbers for CNe are below what they report in their paper. CNe has 394k parameters, ACNe 400k parameters and OANet 2347k parameters. + +Rotated test data. To demonstrate the resilience of our method to rotation perturbations of the data, we evaluate both on the original test data as well as versions of the test data where the $p_1$ points are rotated a random amount (and the ground truth essential matrix is altered correspondingly, as described earlier). We sample rotations for each test example uniformly in the interval $(-a, a)$ and consider three different values for the maximum rotation angle: $a = 30^\circ, 60^\circ, 180^\circ$ . All methods are evaluated on the same rotated versions of the test set for consistency. + +Results. We present results in Table 2 for mAP at $20^{\circ}$ . The results for our method are averaged over two training runs. The maximum difference in mAP scores between the two runs was 0.01. mAP scores at $10^{\circ}$ and $30^{\circ}$ are presented in the supplementary B.2 and they tell a similar story. + +
Max. test rot. a =0°30°60°180°
ZZ-net (Ours)0.260.260.260.26
ACNe0.670.250.150.038
CNe0.430.140.120.0048
OANet0.420.240.0770.0048
+ +Table 2. Results for essential matrix estimation. mAP at $20^{\circ}$ error in the estimated translation and rotation vectors for different values of image plane rotations $a$ at test time. + +Discussion. Our method does not compete well on the base problem $(a = 0^{\circ})$ . This may in part be due to the order of magnitude fewer parameters of our network. Note that we had to limit the number of parameters due to the quadratic memory cost of the weight-units. We however demonstrate the resilience to rotation perturbations of ZZ-net. Already at modest rotations uniformly sampled from $-30^{\circ}$ to $30^{\circ}$ it is on par with the more mature competitors. At larger rotations ZZ-net is superior. It should however be noted that for this dataset, all images are oriented close to parallel with the ground. There is hence a clear bias in the training data, so that the comparison to the other models on artificially rotated test data is not completely fair. + +We still believe that rotation equivariance can add robustness to methods attacking the essential matrix estimation problem and regard it as an interesting future research direction to try to merge our approach with the outlier robust methods, using for instance the weighted 8-point method. Furthermore, it would be interesting to develop methods which are equivariant only to small rotations - rotations larger than $60^{\circ}$ will typically not be seen in practice. This would require leaving the mathematical framework of group theory, as such bounded rotations do not form a group. + +# 6. Conclusions + +We have presented a foundational framework for learning tasks based on a rotation equivariant and permutation invariant neural network architecture. A proof is given showing that this architecture is indeed universal. We have described several ways of modifying the architecture, in particular, how to extend it to pairs of point clouds as appearing in correspondence problems and how to perform efficient computations. As for limitations, the framework is only applicable in two dimensions. Our architecture further lacks locality and has a high memory requirement. To mitigate the latter issues are examples of interesting future work. + +# Acknowledgements + +The authors acknowledge support from CHAIR, SSF, as well as WASP funded by the Knut and Alice Wallenberg Foundation. The computations were enabled by resources provided by SNIC at C3SE. + +# References + +[1] Jimmy Aronsson. Homogeneous vector bundles and $G$ -equivariant convolutional neural networks. arXiv:2105.05400 [cs, math, stat], May 2021. 2 +[2] BreakdownDiode. Big Dipper 20210116.jpg, used under Creative Commons Attribution-ShareAlike 4.0 International license // Stars in main constellation brightened. https://commons.wikimedia.org/wiki/File:Big_Dipper_20210116.jpg, 2021.1 +[3] Michael M. Bronstein, Joan Bruna, Taco Cohen, and Petar Velicković. Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges. arXiv:2104.13478 [cs, stat], May 2021. 2 +[4] Taco Cohen and Max Welling. Group equivariant convolutional networks. In Int. Conf. Machine Learning, 2016. 2 +[5] Taco S. Cohen. Equivariant Convolutional Networks (PhD Thesis). PhD thesis, University of Amsterdam, June 2021. 2 +[6] George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303-314, 1989. 17 +[7] Congyue Deng, Or Litany, Yueqi Duan, Adrien Poulenard, Andrea Tagliasacchi, and Leonidas J. Guibas. Vector neurons: A general framework for so(3)-equivariant networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 12200-12209, October 2021. 2 +[8] Nadav Dym and Haggai Maron. On the universality of rotation equivariant point cloud networks. In ICLR, 2021. 2, 13 +[9] JA Eidswick. A proof of Newton's power sum formulas. The American Mathematical Monthly, 75(4):396-397, 1968. 18 +[10] William Falcon and The PyTorch Lightning team. PyTorch Lightning, Mar. 2019. 24 +[11] Marc Finzi, Max Welling, and Andrew Gordon Wilson. A Practical Method for Constructing Equivariant Multilayer Perceptrons for Arbitrary Matrix Groups. arXiv:2104.09459 [cs, math, stat], Apr. 2021. 15 +[12] Marc Finzi, Max Welling, and Andrew Gordon Gordon Wilson. A practical method for constructing equivariant multilayer perceptrons for arbitrary matrix groups. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 3318-3328. PMLR, 18-24 Jul 2021. 2 +[13] Fabian B. Fuchs, Daniel E. Worrall, Volker Fischer, and Max Welling. SE(3)-Transformers: 3D roto-translation equivariant attention networks. In NeurIPS, 2020. 2, 3 +[14] K. Fukushima. Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biol. Cybernetics, 36:193-202, 1980. 2 +[15] Jan E. Gerken, Jimmy Aronsson, Oscar Carlsson, Hampus Linander, Fredrik Ohlsson, Christoffer Petersson, and Daniel Persson. Geometric Deep Learning and Equivariant Neural Networks. arXiv:2105.13926 [hep-th], May 2021. 2 + +[16] Richard Hartley and Andrew Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, Cambridge, UK; New York, 2nd ed edition, 2003. 2, 7 +[17] Jared Heinly, Johannes L. Schonberger, Enrique Dunn, and Jan-Michael Frahm. Reconstructing the world* in six days. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3287-3295, Boston, MA, USA, June 2015. IEEE. 7 +[18] Shahram Izadi, David Kim, Otmar Hilliges, David Molyneaux, Richard Newcombe, Pushmeet Kohli, Jamie Shotton, Steve Hodges, Dustin Freeman, Andrew Davison, and Andrew Fitzgibbon. Kinectfusion: Real-time 3d reconstruction and interaction using a moving depth camera. In UIST '11 Proceedings of the 24th annual ACM symposium on User interface software and technology, pages 559-568. ACM, October 2011. 1 +[19] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and koray kavukcuoglu. Spatial transformer networks. In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 28. Curran Associates, Inc., 2015. 3 +[20] Nicolas Keriven and Gabriel Peyre. Universal invariant and equivariant graph neural networks. NeurIPS, 32:7092-7101, 2019. 2, 11 +[21] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. 26 +[22] Yvette Kosmann-Schwarzbach. Groups and Symmetries. Springer New York, New York, NY, 2010. 1 +[23] Leon Lang and Maurice Weiler. A wigner- Eckart theorem for group equivariant convolution kernels. In International Conference on Learning Representations, 2021. 2 +[24] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4):541-551, 1989. 2 +[25] Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In Proceedings of the 36th International Conference on Machine Learning, pages 3744-3753, 2019. 3 +[26] Richard Liaw, Eric Liang, Robert Nishihara, Philipp Moritz, Joseph E Gonzalez, and Ion Stoica. Tune: A research platform for distributed model selection and training. arXiv preprint arXiv:1807.05118, 2018. 24 +[27] H. C. Longuet-Higgins. A computer algorithm for reconstructing a scene from two projections. Nature, 293(5828):133-135, Sept. 1981. 8 +[28] David G. Lowe. Distinctive Image Features from Scale-Invariant Keypoints. International Journal of Computer Vision, 60(2):91-110, Nov. 2004. 7 +[29] Haggai Maron, Heli Ben-Hamu, Nadav Shamir, and Yaron Lipman. Invariant and equivariant graph networks. In ICLR, 2018. 2, 4, 14, 15, 17, 27 + +[30] Haggai Maron, Ethan Fetaya, Nimrod Segol, and Yaron Lipman. On the universality of invariant networks. In Int. Conf. Machine Learning, pages 4363-4371, 2019. 2, 11, 13 +[31] Pavlo Melnyk, Michael Felsberg, and Marten Wadenback. Embed me if you can: A geometric perceptron. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 1276-1284, October 2021. 2 +[32] 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 H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc., 2019. 24 +[33] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. PointNet: Deep learning on point sets for 3D classification and segmentation. In CVPR, pages 652-660, 2017. 2, 3 +[34] Joshua Rapp, Julian Tachella, Yoann Altmann, Stephen McLaughlin, and Vivek K Goyal. Advances in single-photon lidar for autonomous vehicles: Working principles, challenges, and recent advances. IEEE Signal Processing Magazine, 37(4):62-71, 2020. 1 +[35] Walter Rudin. Principles of Mathematical Analysis. McGraw-Hill, 1953. 4, 17 +[36] Weiwei Sun, Wei Jiang, Eduard Trulls, Andrea Tagliasacchi, and Kwang Moo Yi. ACNe: Attentive context normalization for robust permutation-equivariant learning. In CVPR, 2020. 2, 3, 6, 8, 25 +[37] Nathaniel Thomas, Tess Smidt, Steven Kearnes, Lusann Yang, Li Li, Kai Kohlhoff, and Patrick Riley. Tensor field networks: Rotation- and translation-equivariant neural networks for 3D point clouds. arXiv:1802.08219 [cs], May 2018. 2 +[38] 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. Commun. ACM, 59(2):64-73, Jan. 2016. 7 +[39] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Ilia Polosukhin. Attention is All you Need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. 3 +[40] Soledad Villar, David W. Hogg, Kate Storey-Fisher, Weichi Yao, and Ben Blum-Smith. Scalars are universal: Equivariant machine learning, structured like classical physics. Preprint. arXiv: 2106.06610, 2021. 2 +[41] Edward Wagstaff, Fabian Fuchs, Martin Engelcke, Ingmar Posner, and Michael A. Osborne. On the limitations of representing functions on sets. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 6487-6494. PMLR, 09-15 Jun 2019. 2 + +[42] Maurice Weiler and Gabriele Cesa. General e(2)-equivariant steerable cnns. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 2 +[43] Maurice Weiler, Patrick Forre, Erik Verlinde, and Max Welling. Coordinate Independent Convolutional Networks - Isometry and Gauge Equivariant Convolutions on Riemannian Manifolds. arXiv:2106.06020 [cs, stat], June 2021. 2 +[44] Maurice Weiler, Fred A. Hamprecht, and Martin Storath. Learning steerable filters for rotation equivariant CNNs. In CVPR, 2018. 2 +[45] Daniel E. Worrall, Stephan J. Garbin, Daniyar Turmukhambetov, and Gabriel J. Brostow. Harmonic networks: Deep translation and rotation equivariance. In CVPR, 2017. 2 +[46] Saining Xie, Sainan Liu, Zeyu Chen, and Zhuowen Tu. Attentional ShapeContextNet for Point Cloud Recognition. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4606-4615, June 2018. 3 +[47] Jianyun Xu, Xin Tang, Yushi Zhu, Jie Sun, and Shiliang Pu. Sgmnet: Learning rotation-invariant point cloud representations via sorted gram matrix. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10468-10477, October 2021. 2, 3 +[48] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. In Proceedings of the 32nd International Conference on Machine Learning, pages 2048-2057. PMLR, June 2015. 3 +[49] Weichi Yao, Kate Storey-Fisher, David W. Hogg, and Soledad Villar. A simple equivariant machine learning method for dynamics based on scalars. arXiv:2110.03761 [cs], Oct. 2021. 2 +[50] Dmitry Yarotsky. Universal approximations of invariant maps by neural networks. Constructive Approximation, pages 1-68, 2021. 2, 13 +[51] Kwang Moo Yi, Eduard Trulls, Yuki Ono, Vincent Lepetit, Mathieu Salzmann, and Pascal Fua. Learning to find good correspondences. In CVPR, 2018. 2, 6, 7, 8, 26, 27 +[52] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In NeurIPS, volume 30, 2017. 2, 3 +[53] 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. International Conference on Computer Vision (ICCV), 2019. 2, 7, 8 +[54] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip H.S. Torr, and Vladlen Koltun. Point transformer. In ICCV, pages 16259-16268, October 2021. 2 +[55] Zhen Zhong, Guobao Xiao, Linxin Zheng, Yan Lu, and Jiayi Ma. T-Net: Effective permutation-equivariant network for two-view correspondence learning. In ICCV, 2021. 2, 8 \ No newline at end of file diff --git a/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/images.zip b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0e4e5e8e8e1b2967fcf10269dae0040faf54ca73 --- /dev/null +++ b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae7c7ec8c2de498ba6298a7b315195fba441d3747bb134f78ff4c805549e28fb +size 207286 diff --git a/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/layout.json b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..aa2d0e65385db5efee9c0a014f917f4229be0599 --- /dev/null +++ b/zznetauniversalrotationequivariantarchitecturefor2dpointclouds/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57722a261d13eda19f31a5bcff3cc813ea891d406870835c679d8a3d65847165 +size 679768